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