From owner-freebsd-doc@FreeBSD.ORG Thu Jan 1 03:10:31 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5AF9816A4CE for ; Thu, 1 Jan 2004 03:10:31 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0E0B43D5E for ; Thu, 1 Jan 2004 03:10:27 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i01BARFR081827 for ; Thu, 1 Jan 2004 03:10:27 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i01BARfu081825; Thu, 1 Jan 2004 03:10:27 -0800 (PST) (envelope-from gnats) Date: Thu, 1 Jan 2004 03:10:27 -0800 (PST) Message-Id: <200401011110.i01BARfu081825@freefall.freebsd.org> To: freebsd-doc@FreeBSD.org From: Giorgos Keramidas Subject: Re: docs/59991: diff manpage lacks a return value section X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Giorgos Keramidas List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2004 11:10:31 -0000 The following reply was made to PR docs/59991; it has been noted by GNATS. From: Giorgos Keramidas To: Erik Greenwald Cc: bug-followup@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 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 %%%