DIFFMK(1) — USER COMMANDS
NAME
diffmk − mark differences between document files
SYNOPSIS
diffmk oldfile changedfile markedfile
DESCRIPTION
diffmk compares two versions of a file and creates a third file that includes “change mark” commands for troff(1). name1 and name2 are the old and new versions of the file. diffmk generates name3, which, contains the text from name2 with troff(1) “change mark” requests (.mc) inserted where changedfile differs from oldfile. When name3 is formatted, changed or inserted text is shown by | at the right margin of each line. The position of deleted text is shown by a single ∗.
diffmk can also be used to produce listings of C (or other) programs with changes marked. A typical command line for such use is:
diffmk old.c new.c tmp; nroff reqs tmp | pr
where the file reqs contains the commands:
.pl 1
.ll 77
.nf
.eo
.nc
The .ll request might specify a different line length, depending on the nature of the program being printed. The .eo and .nc requests are probably needed only for C programs.
If the characters | and ∗ are inappropriate, you might run markedfile through sed(1V) to globally change them.
SEE ALSO
BUGS
Aesthetic considerations may dictate manual adjustment of some output. File differences involving only formatting requests may produce undesirable output, i.e., replacing .sp by .sp 2 will produce a “change mark” on the preceding or following line of output.
Sun Release 3.2 — Last change: 9 April 1986