GetOpt formatting improvements

Brandon S. Allbery KF8NH allbery at
Sun Jun 29 19:54:15 EDT 2008

On 2008 Jun 29, at 19:40, Isaac Dupree wrote:

> maybe these can be resolved somehow without keeping really verbose  
> documentation: what do other people think?  Are these cases obscure  
> but nevertheless standard cases of getopt since Unix/GNU history?  
> (e.g. it seems that compilers behave differently from "normal  
> programs", behave differently from everyone else's slightly  
> different implementations of arguments)

On of the points of getopt is that -fFLAGS and -f FLAGS both work  
without any extra code.  Standard getopt doesn't do optional arguments  
at all; GNU getopt handles -vn, -v n, and -v -- or -v -x (for random  
options -v, -x, the former taking an optional argument; the latter two  
cases are recognized as argument omitted).

(That compilers behave differently is not, IMO, a good thing --- but - 
l is problematic at best.)

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at
system administrator [openafs,heimdal,too many hats] allbery at
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Libraries mailing list