|
libusual
0.1
|
getopt compat. More...
Data Structures | |
| struct | option |
| Long option description. More... | |
Defines | |
| #define | no_argument |
| long option takes no argument | |
| #define | required_argument |
| long option requires argument | |
| #define | optional_argument |
| long option has optional argument | |
Functions | |
| int | getopt (int argc, char *argv[], const char *options) |
| Compat: getopt. | |
| int | getopt_long (int argc, char *argv[], const char *options, const struct option *longopts, int *longindex) |
| Compat: getopt_long. | |
| int | getopt_long_only (int nargc, char *argv[], const char *options, const struct option *long_options, int *idx) |
| Compat: getopt_long_only. | |
Variables | |
| char * | optarg |
| argument to current option, or NULL if it has none | |
| int | optind |
| Current position in arg string. | |
| int | opterr |
| whether getopt() should print error messages on problems. | |
| int | optopt |
| Option char which caused error. | |
getopt compat.
This module provides getopt() and getopt_long().
| #define no_argument |
long option takes no argument
| #define required_argument |
long option requires argument
| #define optional_argument |
long option has optional argument
| int getopt | ( | int | argc, |
| char * | argv[], | ||
| const char * | options | ||
| ) |
Compat: getopt.
| int getopt_long | ( | int | argc, |
| char * | argv[], | ||
| const char * | options, | ||
| const struct option * | longopts, | ||
| int * | longindex | ||
| ) |
Compat: getopt_long.
| int getopt_long_only | ( | int | nargc, |
| char * | argv[], | ||
| const char * | options, | ||
| const struct option * | long_options, | ||
| int * | idx | ||
| ) |
Compat: getopt_long_only.
| char* optarg |
argument to current option, or NULL if it has none
| int optind |
Current position in arg string.
Starts from 1. Setting to 0 resets state.
| int optopt |
Option char which caused error.
1.7.6.1