#ifndef _GETOPT_H_ #define _GETOPT_H_ struct option { char *name; int has_arg; int *flag; int val; }; #define no_argument 0 #define required_argument 1 #define optional_argument 2 extern char *optarg; extern int optind; extern int optopt; extern int opterr; extern int optreset; int getopt_long(int , char **, char *, struct option *, int *); #endif /* !_GETOPT_H_ */