Argtable is an ANSI C library for parsing GNU style command line arguments, as in "foo -abc -o myfile --help --count=7". It enables a program's command line syntax to be defined in the source code as an array of argtable structs. The command line is then parsed according to that specification, and the resulting values are returned in those same structs where they are accessible to the main program. The default parsing, validation, and error reporting routines may be replaced by user-defined callbacks if desired, and new argtable data types may be created to parse user-defined argument types.
The parsing itself is done using GNU getopt and so is 100% GNU compatible.