#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#define ERRORNONE    (0)   /* set optarg to this if no errors (0 errs)    */
#define ARGSUCCESS   (-1)  /* returned when processing completed          */
#define ERRORFORMAT  (-2)  /* returned for options not preceded by - or / */
#define ERRORINVALID (-3)  /* returned for an argument not in optstring   */
#define ERRORDONE    (-4)  /* returned when argument processing is done   */
#define ERRORARGLEN  (-5)  /* returned when argument is more than a letter*/
#define ERRORPARAM   (-6)  /* returned when param doesn't follow arg that 
                              requires a parameter                        */


int minigetopt( int argc, char *argv[], char *optstring );

