4 #define no_argument 0
\r
5 #define required_argument 1
\r
6 #define optional_argument 2
\r
10 const char *name; /* name of the long option */
\r
13 * has_arg is : no_argument (or 0), if the option doesn't take an argument,
\r
14 * required_argument (or 1) if the option takes an argument,
\r
15 * optional_argument (or 2) if the option takes an optional argument.
\r
18 int *flag; /* specify the mean used to return a result for a long option:
\r
19 * if flag is NULL, then getopt_long() returns val
\r
20 * in the other case getopt_long() returns 0, and flag points to the
\r
21 * variable specified bay the content of the field val when the option
\r
22 * is found but it is not update if the option is not found.
\r
25 int val; /* val is the value returned by getopt_long() when the pointer flag
\r
26 * is NULL or the value of the variable referenced by the pointer flag
\r
27 * when the option is found.
\r
45 getopt (int argc, char * const argv[], const char *optstring);
\r
48 getopt_long(int argc, char * const argv[], const char *optstring, const struct option *longopts, int *longindex);
\r
51 getopt_long_only (int argc, char * const argv[], const char *optstring, const struct option *longopts, int *longindex);
\r
54 #endif /* !__GETOPT_H */
\r