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