NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/46102: The banner(1) manpage, as well as the program's `usage' line, could use improvement



>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:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 26 19:55:00 +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@localhost
 .\"
-.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);
 }



Home | Main Index | Thread Index | Old Index