This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Fix optional arguments in getopt.


On Tue, Feb 12, 2008 at 12:21:10PM -0500, Jeff Johnston wrote:
> Peter Rosin wrote:
> >A while back Peter Rosin wrote:
> >>I noticed that the getopt implementation does not handle optional
> >>arguments very well. E.g. ./foo --listen, where listen is an optional
> >>long argument, is interpreted to have an isten argument. Also, it is
> >>broken if other short options precede an optional short option. I.e.
> >>when -l is optional, ./foo -l works, but ./foo -il does not.

*snip*

> >Ping? The patch is simple enough, always reset optwhere to 1 after handling
> >an option with an optional argument.
> >
> 
> Sorry, fell through the cracks.  Patch applied.

Nice, thank you!

Cheers,
Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]