Glenn Fowler wrote:
> On Thu, 25 Jan 2007 16:38:38 -1000 Joseph Kowalski wrote:
>   
>> Having a long option is not allowed by POSIX.
>>     
>
> long options of the form
>       --long-name             # option '-' with arg "long-name"
>       --long-name=value       # option '-' with arg "long-name=value"
> are supported by
>       getopts -- -:
> where '-' is the option flag name that takes an option argument
>
> posix states option flags should be alnum, but does not "shall out"
> other chars like '-'
>
> not that long options should be coded this way
> (most of the work must be done outside of getopts on the optarg string)
> just that posix does not forbid them
> and actually (unintentionally?) provides an interface to handle them
>
> -- Glenn Fowler -- AT&T Research, Florham Park NJ --
>   
Oh wow, this really gets into the differences between the XPG/SUS text about
command line options, the XPG/SUS specification of getopt() and the semantic
definition of "--".  That's a pretty deep diversion from the substance 
of this case
(and yea, I've been a huge part of that diversion).

Its time for me to call a halt to this.  If Joerg, Glenn or anybody else 
wants to
continue this in a different forum, I'd be glad to.  Its not like I 
haven't been here
before.

Of course, a parting shot...
    Its not what the routine will or will not let you do.
    Its about what the associated text says you should or should not do.

- jek3


Reply via email to