00001
00034 #ifndef __GETOPT_H__
00035 #define __GETOPT_H__
00036
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040
00041 struct option {
00042 char * name;
00043 int has_arg;
00044 int * flag;
00045 int val;
00046 };
00047
00048 extern int opterr;
00049 extern int optind;
00050 extern int optopt;
00051 extern int optreset;
00052 extern char *optarg;
00054 int getopt (int, char * const *, const char *);
00055
00056 int getopt_long (int, char **, char *, struct option *, int *);
00057
00058 #define no_argument 0
00059 #define required_argument 1
00060 #define optional_argument 2
00061
00062 #ifdef __cplusplus
00063 }
00064 #endif
00065
00066 #endif