This is adopt, a portable command-line argument parser for C that handles short (-a, -b foo, etc) and long (--arg-a, --arg-b=foo) style options. It is meant to be compatible with GNU getopt in command-line usage (though not as an API) and available under an MIT license.
Adopt can also produces help syntax and usage messages based on the arguments you accept, so that you don't need to remember to update your usage messages when you add a new option.