unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (HP-UX-11.11)
Page:
Section:
Apropos / Subsearch:
optional field



 diffmk(1)							   diffmk(1)




 NAME
      diffmk - mark changes between two different versions of a file

 SYNOPSIS
      diffmk prevfile currfile markfile

 DESCRIPTION
      diffmk compares the previous version of a file with the current
      version and creates a file that includes nroff/troff ``change mark''
      commands.	 prevfile is the name of the previous version of the file
      and currfile is the name of the current version of the file.  diffmk
      generates markfile which contains all the lines of the currfile plus
      inserted formatter ``change mark'' (.mc) requests.  When markfile is
      formatted, changed or inserted text is shown by a | character at the
      right margin of each line.  The position of deleted text is shown by a
      single *.

      If the characters | and * are inappropriate, a copy of diffmk can be
      edited to change them because diffmk is a shell script.

 EXTERNAL INFLUENCES
    International Code Set Support
      Single- and multi-byte character code sets are supported.

 EXAMPLES
      A typical command line for comparing two versions of an nroff/troff
      file and generating a file with the changes marked is:

	   diffmk prevfile currfile markfile; nroff markfile | pr

      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 prevfile.c currfile.c markfile.c; nroff macs markfile.c |
	   pr

      where the file macs contains:

	   .pl 1
	   .ll 77
	   .nf
	   .eo

      The .ll request can specify a different line length, depending on the
      nature of the program being printed.  The .eo request is probably
      needed only for C programs.

 WARNINGS
      Aesthetic considerations may dictate manual adjustment of some output.





 Hewlett-Packard Company	    - 1 -   HP-UX Release 11i: November 2000






 diffmk(1)							   diffmk(1)




      diffmk does not differentiate between changes in text and changes in
      formatter request coding.	 Thus, file differences involving only
      formatting changes (such as replacing .sp with .sp 2 in a text source
      file) with no change in actual text can produce change marks.

      Although unlikely, certain combinations of formatting requests can
      cause change marks to either disappear or to mark too much.  Manual
      intervention may be required because the subtleties of various
      formatting macro packages and preprocessors is beyond the scope of
      diffmk.  tbl cannot tolerate .mc commands in its input (see tbl(1)),
      so any .mc request that would appear inside a .TS range is silently
      deleted.	The script can be changed if this action is inappropriate,
      or diffmk can be run on two files that have both been run through the
      tbl preprocessor before any comparisons are made.

      diffmk uses diff, and thus has the same limitations on file size and
      performance that diff may impose	(see diff(1)).	In particular the
      performance is nonlinear with the size of the file, and very large
      files (well over 1000 lines) may take extremely long to process.
      Breaking the file into smaller pieces may be advisable.

      diffmk also uses the ed(1) editor.  If the file is too large for ed,
      ed error messages may be embedded in the file.  Again, breaking the
      file into smaller pieces may be advisable.

 SEE ALSO
      diff(1), nroff(1).



























 Hewlett-Packard Company	    - 2 -   HP-UX Release 11i: November 2000