Age | Commit message (Collapse) | Author |
|
parsing infrastructure segfaults because there's no next shortopt but the list isn't empty. (There was a test for this, but we're simultaneously traversing two lists and it was testing the wrong one.)
|
|
|
|
macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags).
This means the flag space is no longer packed, but leaves gaps where the zeroes
go. (Actual flag bit positions are the same for all configs.) Since the
option parsing needs to know where the holes are, the OPTSTR values are
now generated as part of flags.h with ascii 1 values for the disabled values.
(So generated/oldflags.h went away.)
This also means that the option string argument for OLDTOY() went away, it now
uses the same arguments as the NEWTOY() it references.
|
|
identify the culprit).
|
|
Only the first __long__ option, without any __short__ option had a proper
flag value, rest all were defined to ZERO. Becaus the _flist_ was not moved
to the next in this case.
|
|
implementation FLAG_xxx macros are generated for long options too. with __-__ sign in the macro, it will generate errors.
I am of the opinion that __-__ be converted to '_' for generating the FLAG_xxx macros and be used in the command.
This will enable the user to 'abc-def', but be handled like 'abc_def' in code.
|
|
usages don't have to be in alphabetical order.
|
|
Don't #undefine TT in the CLEANUP blocks of generated/flags.h, and #ifdef
around the other TT definition. That way you can put a union at the start
of your GLOBALS() with the arguments filled out by option parsing, and then
have multiple main() functions with different argumetns and different
FLAG_x macros, while sharing infrastructure that's not under lib.
|
|
|
|
|
|
This should actually generate FLAG_longopt 0 #defines for disabled bare
longopts (ala ls without --color). Put temporary executables under "generated"
(including instlist for install).
|