Imported Upstream version 1.22.4
[platform/upstream/groff.git] / contrib / gdiffmk / gdiffmk.1.man
1 .TH GDIFFMK @MAN1EXT@ "@MDATE@" "groff @VERSION@"
2 .SH NAME
3 gdiffmk \- mark differences between groff/nroff/troff files
4 .
5 .
6 .\" ====================================================================
7 .\" Legal Terms
8 .\" ====================================================================
9 .\"
10 .\" Copyright (C) 2004-2018 Free Software Foundation, Inc.
11 .\"
12 .\" This file is part of gdiffmk, which is part of groff, the GNU roff
13 .\" type-setting system.
14 .\"
15 .\" This program is free software: you can redistribute it and/or modify
16 .\" it under the terms of the GNU General Public License as published by
17 .\" the Free Software Foundation, either version 3 of the License, or
18 .\" (at your option) any later version.
19 .\"
20 .\" This program is distributed in the hope that it will be useful, but
21 .\" WITHOUT ANY WARRANTY; without even the implied warranty of
22 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23 .\" General Public License for more details.
24 .\"
25 .\" You should have received a copy of the GNU General Public License
26 .\" along with this program.  If not, see
27 .\" <http://www.gnu.org/licenses/>.
28 .
29 .
30 .\" ====================================================================
31 .SH SYNOPSIS
32 .\" ====================================================================
33 .
34 .SY gdiffmk
35 .OP \-a addmark
36 .OP \-c changemark
37 .OP \-d deletemark
38 .RB [ \-D
39 .RB [ \-B ]
40 .RB [ \-M
41 .IR "mark1 mark2" ]]
42 .OP \-x diffcmd
43 .OP \-\-
44 .I file1
45 .I file2
46 .RI [ output ]
47 .YS
48 .
49 .SY gdiffmk
50 .B \-\-help
51 .YS
52 .
53 .SY gdiffmk
54 .B \-\-version
55 .YS
56 .
57 .\" ====================================================================
58 .SH DESCRIPTION
59 .\" ====================================================================
60 .
61 .B gdiffmk
62 compares two
63 .BR groff (1),
64 .BR nroff (1),
65 or
66 .BR troff (1)
67 documents,
68 .I file1
69 and
70 .IR file2 ,
71 and creates an output which is
72 .I file2
73 with added \[lq]margin character\[rq] (.mc) commands that indicate the
74 differences.
75 .
76 .
77 .LP
78 If the
79 .I output
80 filename is present,
81 the output is written there.
82 .
83 If it is
84 .B \-
85 or absent the output is written to the standard output.
86 .
87 .
88 .LP
89 If the
90 .I file1
91 or
92 .I file2
93 argument is
94 .B \-
95 the standard input is read for that input.
96 .
97 Clearly both cannot be
98 .BR \- .
99 .
100 .
101 .LP
102 Note that the output is not necessarily compatible with all macro packages
103 and all preprocessors.
104 .
105 See section \(lqBugs\(rq below.
106 .
107 .
108 .\" ====================================================================
109 .SH OPTIONS
110 .\" ====================================================================
111 .
112 .TP
113 .BI \-a addmark
114 Use the
115 .I addmark
116 for source lines not in
117 .I file1
118 but present in
119 .IR file2 .
120 .
121 Default:
122 .BR + .
123 .
124 .TP
125 .B \-B
126 By default, the deleted texts marked by the
127 .B \-D
128 option end
129 with an added troff break command,
130 .BR .br ,
131 to ensure that the deletions are marked properly.
132 .
133 This is the only way to guarantee that deletions and small
134 changes get flagged.
135 .
136 This option directs the program not to insert these breaks; it makes
137 no sense to use it without
138 .BR \-D .
139 .
140 .TP
141 .BI \-c changemark
142 Use the
143 .I changemark
144 for changed source lines.
145 .
146 Default:
147 .BR | .
148 .
149 .TP
150 .BI \-d deletemark
151 Use the
152 .I deletemark
153 for deleted source lines.
154 .
155 Default:
156 .BR * .
157 .
158 .TP
159 .B \-D
160 Show the deleted portions from changed and deleted text.
161 .
162 Default delimiting marks:
163 .BR "[[" " \&.\|.\|.\& " "]]" .
164 .
165 .TP
166 .BI \-M "mark1 mark2"
167 Change the delimiting marks for the
168 .B \-D
169 option.
170 .
171 It makes no sense to use this option without
172 .BR \-D .
173 .
174 .TP
175 .BI \-x diffcmd
176 Use the
177 .I diffcmd
178 command to perform the comparison of
179 .I file1
180 and
181 .IR file2 .
182 .
183 In particular,
184 .I diffcmd
185 should accept the GNU
186 .B diff
187 .BI \-D name
188 option.
189 .
190 Default:
191 .BR diff (1).
192 .
193 .TP
194 .B \-\-
195 All the following arguments are treated as file names,
196 even if they begin with
197 .BR \- .
198 .
199 .TP
200 .B \-\-help
201 Print a usage message on standard error output and exit.
202 .
203 .TP
204 .B \-\-version
205 Print version information on the standard output and exit.
206 .
207 .
208 .\" ====================================================================
209 .SH BUGS
210 .\" ====================================================================
211 .
212 The output is not necessarily compatible with all macro packages
213 and all preprocessors.
214 .
215 A workaround that is often successful against preprocessor problems is
216 to run
217 .B gdiffmk
218 on the output of all the preprocessors instead of the input source.
219 .
220 .
221 .LP
222 .B gdiffmk
223 relies on the
224 .BI \-D name
225 option of GNU
226 .BR diff (1)
227 to make a merged \[lq]#ifdef\[rq] output format.
228 .
229 It hasn't been tested whether other versions of
230 .BR diff (1)
231 do support this option.
232 .
233 See also the
234 .BI \-x diffcmd
235 option.
236 .
237 .
238 .\" ====================================================================
239 .SH AUTHORS
240 .\" ====================================================================
241 .B gdiffmk
242 was written and is maintained by
243 .MT MBianchi@\:Foveal.com
244 Mike Bianchi
245 .ME .
246 .
247 .
248 .\" ====================================================================
249 .SH "SEE ALSO"
250 .\" ====================================================================
251 .
252 .BR groff (@MAN1EXT@),
253 .BR nroff (@MAN1EXT@),
254 .BR gtroff (@MAN1EXT@),
255 .BR diff (@MAN1EXT@)
256 .
257 .\" Local Variables:
258 .\" mode: nroff
259 .\" End:
260 .\" vim: set filetype=groff: