gdiffmk
mark differences between groff/nroff/troff files
- Provided by: groff (Version: 1.24.1-1)
- Report a bug
mark differences between groff/nroff/troff files
gdiffmk |
[-a add-mark] [-c change-mark] [-d delete-mark] [-x diff-command] [-D [-B] [-M mark1 mark2]] [--] file1 file2 [output-file] |
gdiffmk |
--help |
gdiffmk |
--version |
gdiffmk compares two roff(7) documents, file1 and file2, and writes another, derived from both, to the standard output stream (or output-file), adding margin character (mc) requests at places in the output where the input documents differ. gdiffmk does not interpret the source documents; it treats roff comments and nilpotent changes to formatting as meaningful. For example, it does not know that \h'3m', \h'(1 * 3m)', and \h'3m+0' all mean the same thing. If the file1 or file2 argument is “-”, gdiffmk reads the standard input stream for that input. If the output operand is present, gdiffmk writes output to a file of that name. If it is “-” or absent, gdiffmk writes output to the standard output stream. “-” cannot be both an input and output operand.
--help displays a usage message and --version shows version information; both exit afterward.
gdiffmk exits with status 0 if the input files are the same; 1 if they differ; 2 upon a usage error; 3 if the system's diff(1) or sh(1) commands do not support features gdiffmk requires; and 4 if the output argument is a duplicate of file1 or file2.
The output is not necessarily compatible with all macro packages or preprocessors. A reliable workaround is to run gdiffmk on the output of the final preprocessor instead of the input source.
gdiffmk relies on the -D option of GNU diff to make a merged “#ifdef” output format. Busybox diff is known to not support it. Also see the -x diff-command option.
gdiffmk was written by Mike Bianchi, now retired. It is maintained by the groff developers.