NAME
getopt_long_only - parse long command-line options
LIBRARY
Standard C library (libc, -lc)
SYNOPSIS
#define _GNU_SOURCE #include <getopt.h>
int getopt_long_only(int argc, char *argv[], const char *optstring, const struct option *longopts, int *longindex);
DESCRIPTION
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 |
STANDARDS
GNU.