flag.h
flag.h copied to clipboard
Command-line flag parsing in C
- Add `aliases` and `alias_count` fields to the `Flag` struct - Respect the aliases when parsing flags - Print out aliases when printing out options - Update example to feature...
Added a macro `parse_unsigned_int` to be used in functions that will replace the calls to `strtoull`, very loosely based on the source code for `strtoull`. If you think a macro...
Add remaining C numeric types; make default values optional; add ability to mark flags as required
**Breaks existing API?:** Yes (the `flag_bool`, `flag_str`, etc. functions have a parameter removed) `flag_[TYPE]_default` functions added to allow the user to specify a default value on a flag, by providing...
If calculation of size based on its suffix overflows, then treat it as integer overflow. Otherwise, a wrong value is returned. Keep suffixes for backwards compatibility, i.e. report an integer...