#ifndef GETOPT_H
#define GETOPT_H

// command line option switches
//
typedef struct CmdOpt {
  char *option;   // option string, e.g. "/o"
  char *format;   // scanf format string, e.g. "%d",
                  // or NULL for boolean on/off switches
  void *param;    // where to store the parameter
  char *help;     // description for usage display
} CmdOpt;


extern  int   getopt(int argc, char *argv[], CmdOpt *options);
extern  void  getopt_help(const char *cmdname, CmdOpt *options);


#endif