Subject: Re: bin/21970 (printf(1) breaks when format begins with "-")
To: None <hubertf@NetBSD.org, gnats-admin@netbsd.org,>
From: None <hubertf@netbsd.org>
List: netbsd-bugs
Date: 11/27/2006 00:42:19
Synopsis: printf(1) breaks when format begins with "-"
Responsible-Changed-From-To: bin-bug-people->hubertf
Responsible-Changed-By: hubertf@netbsd.org
Responsible-Changed-When: Mon, 27 Nov 2006 00:42:17 +0000
Responsible-Changed-Why:
let's try
State-Changed-From-To: open->feedback
State-Changed-By: hubertf@netbsd.org
State-Changed-When: Mon, 27 Nov 2006 00:42:17 +0000
State-Changed-Why:
I've sent out a patch as a suggestion, but I'm not sure this came through
properly, so here it is again... if I missed the point, please let me
know or do the cut&paste yourself, see also localsrc/legal/TheOpenGroup
while there.
- Hubert
P.S.: I also have a patch that has 12.1 Utility Argument Syntax
of the SUSv3 in *roff format, just in case that's what you want to have
in that manpage. Let me know if so!
So, here's my proposed patch:
Index: intro.1
===================================================================
RCS file: /cvsroot/src/share/man/man1/intro.1,v
retrieving revision 1.10
diff -u -r1.10 intro.1
--- intro.1 10 Nov 2004 16:35:57 -0000 1.10
+++ intro.1 27 Nov 2006 00:30:08 -0000
@@ -29,7 +29,7 @@
.\"
.\" @(#)intro.1 8.2 (Berkeley) 12/30/93
.\"
-.Dd April 21, 1998
+.Dd November 27, 2006
.Dt INTRO 1
.Os
.Sh NAME
@@ -50,6 +50,18 @@
formatted output tools,
and line printer commands.
.Pp
+Many of the commands use the
+.Xr getopt 3
+function for parsing of command line options.
+For those commands the argument
+.Dq --
+is accepted as a delimiter to indicate the end of options.
+Any following arguments are treated as operands, even if they begin with the
+.Sq -
+character. The
+.Dq --
+argument are not used as an option or as an operand.
+.Pp
All commands set a status value upon exit which may be tested
to see if the command completed normally.
The exit values and their meanings are explained in the individual