docs/59991: diff manpage lacks a return value section

Giorgos Keramidas keramida at freebsd.org
Thu Jan 1 11:10:31 UTC 2004


The following reply was made to PR docs/59991; it has been noted by GNATS.

From: Giorgos Keramidas <keramida at freebsd.org>
To: Erik Greenwald <erik at smluc.org>
Cc: bug-followup at freebsd.org
Subject: Re: docs/59991: diff manpage lacks a return value section
Date: Thu, 1 Jan 2004 13:20:36 +0200

 On 2003-12-06 15:57, Erik Greenwald <erik at smluc.org> wrote:
 > No text indicates what return values to expect from diff...
 > [...]
 > --- diff.1.patch begins here ---
 > --- gnu/usr.bin/diff/diff.1.orig	Sat Dec  6 10:48:42 2003
 > +++ gnu/usr.bin/diff/diff.1	Sat Dec  6 10:54:16 2003
 > @@ -474,6 +474,10 @@
 >  .TP
 >  .B \-y
 >  Use the side by side output format.
 > +.SH RETURN VALUE
 > +.I diff
 > +returns a 0 if the files are identical or a 1 if the files differ. If one or
 > +both of the files cannot be opened, then the return value is set to 2.
 >  .SH ENVIRONMENT
 >  The environment variable
 >  .B DIFF_OPTIONS
 
 Nice catch!
 
 Note, though, that it is a good practice to start a new line with every new
 sentence, when writing manpages.  I'd probably write the same diff without
 the 'a' article before numbers too:
 
 %%%
 --- gnu/usr.bin/diff/diff.1.orig	Sat Dec  6 10:48:42 2003
 +++ gnu/usr.bin/diff/diff.1	Sat Dec  6 10:54:16 2003
 @@ -474,6 +474,11 @@
  .TP
  .B \-y
  Use the side by side output format.
 +.SH RETURN VALUE
 +.I diff
 +returns 0 if the files are identical or 1 if the files differ.
 +If one or both of the files cannot be opened,
 +then the return value is set to 2.
  .SH ENVIRONMENT
  The environment variable
  .B DIFF_OPTIONS
 %%%



More information about the freebsd-doc mailing list