YAZ
5.34.0
|
Implements command line options parsing. More...
Go to the source code of this file.
Functions | |
int | options (const char *desc, char **argv, int argc, char **arg) |
command-line options parsing for main More... | |
Variables | |
static int | arg_no = 1 |
static size_t | arg_off = 0 |
static int | eof_options = 0 |
Implements command line options parsing.
Definition in file options.c.
int options | ( | const char * | desc, |
char ** | argv, | ||
int | argc, | ||
char ** | arg | ||
) |
command-line options parsing for main
0 | non-option arg (e.g. filename). |
-1 | unknown option (error). arg is name of unknown option |
-2 | no more options (end of options) |
c | option char |
The first char is what is returned when met (single char option char). The second is zero ore more long option values (synonum for single char) If colon is appended, it means the option takes an argument. If argv includes empty long option (–) that means "end of options" : all argv data following that is considered non-options .. (0 returned for each).
Definition at line 21 of file options.c.
References arg_no, arg_off, eof_options, type, YAZ_OPTIONS_EOF, and YAZ_OPTIONS_ERROR.
Referenced by check_options(), process_initRequest(), ZOOM_connection_create(), ZOOM_connection_get_databases(), and ZOOM_connection_package().