An ANSI C library for parsing GNU-style command-line options with minimal fuss
http://argtable.sourceforge.net/