A cross platform implementation of getopt,