]> git.sesse.net Git - vlc/blobdiff - src/config/vlc_getopt.h
getopt: remove optional argument support
[vlc] / src / config / vlc_getopt.h
index e6bf78d86f399a5afdea86e97989d6240b5a0c1f..72b2341110fd95ec0a5ef8e1ead5737116deda09 100644 (file)
@@ -54,9 +54,8 @@
    zero.
 
    The field `has_arg' is:
-   no_argument          (or 0) if the option does not take an argument,
-   required_argument    (or 1) if the option requires an argument,
-   optional_argument    (or 2) if the option takes an optional argument.
+   false if the option does not take an argument,
+   true if the option requires an argument.
 
    If the field `flag' is not NULL, it points to a variable that is set
    to the value given in the field `val' when the option is found, but
     struct option
     {
         const char *name;
-        /* has_arg can't be an enum because some compilers complain about
-           type mismatches in all the code that assumes it is an int.  */
-        int has_arg;
+        bool has_arg;
         int *flag;
         int val;
     };
 
-/* Names for the values of the `has_arg' field of `struct option'.  */
-
-#define    no_argument        0
-#define required_argument    1
-#define optional_argument    2
-
     extern int vlc_getopt_long(int argc, char *const *argv, const char *shortopts,
                    const struct option *longopts, int *longind);