NetBSD Problem Report #46102
From www@NetBSD.org Sun Feb 26 19:51:52 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 752FC63B952
for <gnats-bugs@gnats.NetBSD.org>; Sun, 26 Feb 2012 19:51:52 +0000 (UTC)
Message-Id: <20120226195125.0D6B063B952@www.NetBSD.org>
Date: Sun, 26 Feb 2012 19:51:25 +0000 (UTC)
From: bughunting@xs4all.nl
Reply-To: bughunting@xs4all.nl
To: gnats-bugs@NetBSD.org
Subject: The banner(1) manpage, as well as the program's `usage' line, could use improvement
X-Send-Pr-Version: www-1.0
>Number: 46102
>Category: bin
>Synopsis: The banner(1) manpage, as well as the program's `usage' line, could use improvement
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: doc-bug
>Submitter-Id: net
>Arrival-Date: Sun Feb 26 19:55:00 +0000 2012
>Closed-Date: Sun Feb 26 21:16:23 +0000 2012
>Last-Modified: Wed Feb 29 17:20:02 +0000 2012
>Originator: Bug Hunting
>Release: NetBSD-current (6.99.3)
>Organization:
>Environment:
>Description:
The banner(1) manpage and the program's `usage' line are inconsistent.
Also, the manpage could use an `EXIT STATUS' section.
>How-To-Repeat:
"man 1 banner" (show the manpage);
(e.g.) "banner -q" (print the `usage'-line, using a non-existent option).
>Fix:
Apply the following proposed patch (the MD5-sum of this patch is
d43fb8307c9ae07d0b486ab46495c242, please verify it before applying;
please also update the date in the `.Dd' macro when needed):
Index: usr.bin/banner/banner.1
===================================================================
RCS file: /cvsroot/src/usr.bin/banner/banner.1,v
retrieving revision 1.7
diff -u -r1.7 banner.1
--- usr.bin/banner/banner.1 30 Sep 2002 09:33:39 -0000 1.7
+++ usr.bin/banner/banner.1 26 Feb 2012 19:12:02 -0000
@@ -15,7 +15,7 @@
.\" Please send copies of changes and bug-fixes to:
.\" sjg@zen.void.oz.au
.\"
-.Dd April 9, 1995
+.Dd February 26, 2012
.Dt BANNER 1
.Os
.Sh NAME
@@ -24,10 +24,10 @@
.Sh SYNOPSIS
.Nm
.Bk -words
-.Op Fl f Ar fg
+.Op Fl b Ar bg
.Ek
.Bk -words
-.Op Fl b Ar bg
+.Op Fl f Ar fg
.Ek
.Bk -words
.Op Fl l
@@ -63,5 +63,7 @@
.Nm
font.
.El
+.Sh EXIT STATUS
+.Ex -std
.Sh SEE ALSO
.Xr banner 6
Index: usr.bin/banner/banner.c
===================================================================
RCS file: /cvsroot/src/usr.bin/banner/banner.c,v
retrieving revision 1.13
diff -u -r1.13 banner.c
--- usr.bin/banner/banner.c 29 Aug 2011 14:24:03 -0000 1.13
+++ usr.bin/banner/banner.c 26 Feb 2012 19:12:02 -0000
@@ -205,7 +205,7 @@
static void
usage(void)
{
- fprintf(stderr, "usage: %s [-f fgchar] [-b bgchar] [-l] message...\n",
+ fprintf(stderr, "usage: %s [-b bg] [-f fg] [-l] string ...\n",
getprogname());
exit(1);
}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: bouyer@NetBSD.org
State-Changed-When: Sun, 26 Feb 2012 20:58:27 +0000
State-Changed-Why:
duplicate of bin/46103
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46102 CVS commit: src/usr.bin/banner
Date: Sun, 26 Feb 2012 21:04:11 +0000
Module Name: src
Committed By: wiz
Date: Sun Feb 26 21:04:10 UTC 2012
Modified Files:
src/usr.bin/banner: banner.1 banner.c
Log Message:
Sort options in man page. Add EXIT STATUS section. Bump date.
Sync usage with man page.
Mostly from Bug Hunting in PR 46102.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/usr.bin/banner/banner.1
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/banner/banner.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: closed->open
State-Changed-By: bouyer@NetBSD.org
State-Changed-When: Sun, 26 Feb 2012 21:13:18 +0000
State-Changed-Why:
It's not a duplicate after all (banner(1) vs banner(6)). Sorry ...
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 26 Feb 2012 21:16:23 +0000
State-Changed-Why:
Committed, thanks :)
From: Bug Hunting <bughunting@xs4all.nl>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org, wiz@NetBSD.org
Subject: Re: bin/46102 (The banner(1) manpage, as well as the program's
`usage' line, could use improvement)
Date: Wed, 29 Feb 2012 00:42:41 +0100
--u5E4XgoOPWr4PD9E
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
On Sun, Feb 26, 2012 at 09:16:24PM +0000, wiz@NetBSD.org wrote:
> State-Changed-From-To: open->closed
> [...]
> Committed, thanks :)
Thanks for extending the patch a bit, and applying the end result.
However, some things seemed to go wrong as well: trailing white
space was added to the manpage, the final argument in banner.c's
`usage' line (still) isn't synchronized with the manpage's notation
of it, and a dash (`-') disappeared from that same line,
The patch attached (MD5 sum: c8a1e6dced6895706359e160e2dc2dab)
fixes all this; please apply it.
Thanks,
Bug Hunting
--u5E4XgoOPWr4PD9E
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="46102.patch"
Index: banner.1
===================================================================
RCS file: /cvsroot/src/usr.bin/banner/banner.1,v
retrieving revision 1.8
diff -u -r1.8 banner.1
--- banner.1 26 Feb 2012 21:04:10 -0000 1.8
+++ banner.1 28 Feb 2012 23:03:53 -0000
@@ -57,7 +57,7 @@
.Nm
font.
.El
-.Sh EXIT STATUS
-.Ex -std
+.Sh EXIT STATUS
+.Ex -std
.Sh SEE ALSO
.Xr banner 6
Index: banner.c
===================================================================
RCS file: /cvsroot/src/usr.bin/banner/banner.c,v
retrieving revision 1.14
diff -u -r1.14 banner.c
--- banner.c 26 Feb 2012 21:04:10 -0000 1.14
+++ banner.c 28 Feb 2012 23:03:53 -0000
@@ -205,7 +205,7 @@
static void
usage(void)
{
- fprintf(stderr, "usage: %s [-l] [b bg] [-f fg] message...\n",
+ fprintf(stderr, "usage: %s [-l] [-b bg] [-f fg] string ...\n",
getprogname());
exit(1);
}
--u5E4XgoOPWr4PD9E--
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46102 CVS commit: src/usr.bin/banner
Date: Wed, 29 Feb 2012 08:54:56 +0000
Module Name: src
Committed By: wiz
Date: Wed Feb 29 08:54:55 UTC 2012
Modified Files:
src/usr.bin/banner: banner.1
Log Message:
Remove trailing whitespace. From Bug Hunting in PR 46102.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/usr.bin/banner/banner.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/46102 CVS commit: src/usr.bin/banner
Date: Wed, 29 Feb 2012 08:55:25 +0000
Module Name: src
Committed By: wiz
Date: Wed Feb 29 08:55:25 UTC 2012
Modified Files:
src/usr.bin/banner: banner.c
Log Message:
Sync usage with man page. From Bug Hunting in PR 46102.
To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/usr.bin/banner/banner.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Thomas Klausner <wiz@NetBSD.org>
To: NetBSD bugtracking <gnats-bugs@NetBSD.org>
Cc:
Subject: Re: bin/46102 (The banner(1) manpage, as well as the program's
`usage' line, could use improvement)
Date: Wed, 29 Feb 2012 13:11:00 +0100
On Wed, Feb 29, 2012 at 12:42:41AM +0100, Bug Hunting wrote:
> However, some things seemed to go wrong as well: trailing white
> space was added to the manpage, the final argument in banner.c's
> `usage' line (still) isn't synchronized with the manpage's notation
> of it, and a dash (`-') disappeared from that same line,
Oops. That's what I get for manually applying it. Better now?
Thomas
From: Bug Hunting <bughunting@xs4all.nl>
To: gnats-bugs@NetBSD.org
Cc: gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: bin/46102 (The banner(1) manpage, as well as the program's
`usage' line, could use improvement)
Date: Wed, 29 Feb 2012 18:18:43 +0100
Hi,
On Wed, Feb 29, 2012 at 12:15:04PM +0000, Thomas Klausner wrote:
> Oops. That's what I get for manually applying it. Better now?
Yes; all is okay now.
Thanks,
Bug Hunting
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.