Subject: Re: bin/32340: rs doesn't parse options POSIXly
To: None <gnats-bugs@netbsd.org>
From: Michael van Elst <mlelstv@serpens.de>
List: netbsd-bugs
Date: 12/19/2005 22:51:45
On Mon, Dec 19, 2005 at 09:30:03PM +0000, David Laight wrote:
> The following reply was made to PR bin/32340; it has been noted by GNATS.
>
> From: David Laight <david@l8s.co.uk>
> To: gnats-bugs@netbsd.org
> Cc:
> Subject: Re: bin/32340: rs doesn't parse options POSIXly
> Date: Mon, 19 Dec 2005 21:28:55 +0000
>
> On Mon, Dec 19, 2005 at 07:05:03PM +0000, Christos Zoulas wrote:
> >
> > Yes, but it needs to be able to parse both -s and -s <arg> for example
> > which you cannot do with getopt. What does posix say about this?
>
> Posix doesn't allow options to have optional arguments.
My patch allows that the mandatory arguments are separated from the
option character. I.e. -w 120 and -w120 remain valid. On the other
hand it may cause a subsequent 'rows' argument to be treated as
the argument of an option.
So I guess that 'rs' should remain as is and the documentation
should be fixed.
Saying this: what about the undocumented options? Is there
a history?
--
Michael van Elst
Internet: mlelstv@serpens.de
"A potential Snark may lurk in every tree."