Mikhail Teterin <[EMAIL PROTECTED]> writes: > I wonder, how GNU's getopt implementation, where flags' arguments can be > optional, deals with the cases of such an option followed by something, that > begins with a dash itself: > > m4 -d -X
It's the same way that (for example) 'pr -e' works: if there's no string immediately after the -e, then no option-argument was specified. In your example, -d has no option-argument and -X is another option, which happens to be invalid. > The bug, IMHO, is in the use of getopt, that departs from POSIX' > specifications for the function, There's no bug here, as GNU m4 builds and runs on BSD, and conforms to POSIX in this area. > "Embrace and Extend" :-/ This nontechnical namecalling is unworthy of you, and does not help the discussion in any way.