OPT_OPTIONAL /* see howto-man-page.txt about short option */
};
static const struct option longopts[] = {
- { "no-argument", no_argument, NULL, 'n' },
- { "required", required_argument, NULL, 'r' },
- { "extremely-long-long-option", no_argument, NULL, 'e' },
- { "xyzzy", no_argument, NULL, OPT_XYZZY },
- { "long-explanation", no_argument, NULL, 'l' },
- { "foobar", no_argument, NULL, 'f' },
- { "version", no_argument, NULL, 'V' },
- { "help", no_argument, NULL, 'h' },
+ { "no-argument", no_argument, NULL, 'n' },
+ { "optional", optional_argument, NULL, OPT_OPTIONAL },
+ { "required", required_argument, NULL, 'r' },
+ { "extremely-long-long-option", no_argument, NULL, 'e' },
+ { "xyzzy", no_argument, NULL, OPT_XYZZY },
+ { "long-explanation", no_argument, NULL, 'l' },
+ { "foobar", no_argument, NULL, 'f' },
+ { "version", no_argument, NULL, 'V' },
+ { "help", no_argument, NULL, 'h' },
{ NULL, 0, NULL, 0 }
};