GetOpt formatting improvements

Brandon S.Allbery KF8NH allbery at ece.cmu.edu
Wed Jul 2 10:13:17 EDT 2008


On 2008 Jul 2, at 6:40, Isaac Dupree wrote:

> Brandon S. Allbery KF8NH wrote:
>> 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).
>
> and we say cabal uses a getopt equivalent to this?  Yet it doesn't  
> work that way for me, in

We've apparently reinvented the situation that led to AT&T freeing the  
original getopt() code, I see :)  People who roll their own getopt()  
clone usually miss the corner cases.

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




More information about the Libraries mailing list