#ifndef __GETOPT_H__
#define __GETOPT_H__
#ifdef __cplusplus
extern "C" {
#endif
extern int opterr;
extern int optind;
extern int optopt;
extern int optreset;
extern char *optarg;
struct option
{
const char *name;
int has_arg;
int *flag;
int val;
};
#define no_argument 0
#define required_argument 1
#define optional_argument 2
int getopt(int, char**, const char*);
int getopt_long(int, char**, const char*, const struct option*, int*);
#ifdef __cplusplus
}
#endif
#endif