1GDIFFMK(1) General Commands Manual GDIFFMK(1)
2
3
4
6 gdiffmk - mark differences between groff/nroff/troff files
7
9 gdiffmk [-a addmark] [-c changemark] [-d deletemark] [-D [-B] [-M mark1
10 mark2]] [-x diffcmd] [--] file1 file2 [output]
11
12 gdiffmk --help
13
14 gdiffmk --version
15
17 gdiffmk compares two groff(1), nroff(1), or troff(1) documents, file1
18 and file2, and creates an output which is file2 with added “margin
19 character” (.mc) commands that indicate the differences.
20
21 If the output filename is present, the output is written there. If it
22 is - or absent the output is written to the standard output.
23
24 If the file1 or file2 argument is - the standard input is read for that
25 input. Clearly both cannot be -.
26
27 Note that the output is not necessarily compatible with all macro pack‐
28 ages and all preprocessors. See section “Bugs” below.
29
31 -aaddmark
32 Use the addmark for source lines not in file1 but present in
33 file2. Default: +.
34
35 -B By default, the deleted texts marked by the -D option end with
36 an added troff break command, .br, to ensure that the deletions
37 are marked properly. This is the only way to guarantee that
38 deletions and small changes get flagged. This option directs
39 the program not to insert these breaks; it makes no sense to use
40 it without -D.
41
42 -cchangemark
43 Use the changemark for changed source lines. Default: |.
44
45 -ddeletemark
46 Use the deletemark for deleted source lines. Default: *.
47
48 -D Show the deleted portions from changed and deleted text. De‐
49 fault delimiting marks: [[ ... ]].
50
51 -Mmark1 mark2
52 Change the delimiting marks for the -D option. It makes no
53 sense to use this option without -D.
54
55 -xdiffcmd
56 Use the diffcmd command to perform the comparison of file1 and
57 file2. In particular, diffcmd should accept the GNU diff -Dname
58 option. Default: diff(1).
59
60 -- All the following arguments are treated as file names, even if
61 they begin with -.
62
63 --help Print a usage message on standard error output and exit.
64
65 --version
66 Print version information on the standard output and exit.
67
69 The output is not necessarily compatible with all macro packages and
70 all preprocessors. A workaround that is often successful against pre‐
71 processor problems is to run gdiffmk on the output of all the pre‐
72 processors instead of the input source.
73
74 gdiffmk relies on the -Dname option of GNU diff(1) to make a merged
75 “#ifdef” output format. It hasn't been tested whether other versions
76 of diff(1) do support this option. See also the -xdiffcmd option.
77
79 gdiffmk was written and is maintained by Mike Bianchi ⟨MBianchi@
80 Foveal.com⟩.
81
83 groff(1), nroff(1), gtroff(1), diff(1)
84
85
86
87groff 1.22.4 17 March 2021 GDIFFMK(1)