getopt_long_only3
Parse long command-line options
Usage
#define _GNU_SOURCE #include <getopt.h>
int getopt_long_only(int argc, char *argv[], const char *optstring, const struct option *longopts, int *longindex);
Library
Standard C library (libc, -lc)
Overview
getopt_long_only() is like getopt_long(3), but '-' as well as "--" can indicate a long option. If an option that starts with '-' (not "--") doesn't match a long option, but does match a short option, it is parsed as a short option instead.
Attributes
For an explanation of the terms used in this section, see attributes(7).
| Interface | Attribute | Value |
| getopt_long_only() | Thread safety | MT-Unsafe race:getopt env |
Releases
19 releases since Debian 1.1 (Buzz); the text changed 17 times.