1 2 #ifndef GETOPT_H 3 #define GETOPT_H 4 5 #ifdef __cplusplus 6 extern "C" { 7 #endif 8 9 extern int opterr; /* useless, never set or used */ 10 extern int optind; /* index into parent argv vector */ 11 extern int optopt; /* character checked for validity */ 12 extern char* optarg; /* argument associated with option */ 13 14 int getopt(int argc, char * const *argv, const char *optstring); 15 16 #ifdef __cplusplus 17 } /* end of extern "C" */ 18 #endif 19 20 #endif /* GETOPT_H */ 21 22