Retrieves long arguments from a command line argument list.
#include <getopt.h> int getopt_long_only ( int argc, char * const argv[], const char *optstring, const struct option *longopts, int *longindex);
(IN) Specifies the length of the argv parameter.
(IN) Points to an array of options.
(IN) Points to which short options to accept.
(IN) Points to an array of option structures which specify which long options to accept. The last element in the array must be a zero filled option structure.
(OUT) Points to the index into the longopts array for the long option.
When getopt_long_only has no more options to handle, it returns -1.
The getopt_long_only function parses options passed with a single hyphen (-), first as a long option and if it is not found in the long option array, parses it as a short option. For example, if -fab is passed as the option, getopt_long_only looks for a long option named fab. If it is not found, then fab is parsed as three short options, -f, -a, and -b.