YAZ
5.34.0
|
Header for command line options parsing utilities. More...
#include <yaz/yconfig.h>
Go to the source code of this file.
Macros | |
#define | YAZ_OPTIONS_ERROR (-1) |
#define | YAZ_OPTIONS_EOF (-2) |
Functions | |
int | options (const char *desc, char **argv, int argc, char **arg) |
command-line options parsing for main More... | |
Header for command line options parsing utilities.
Definition in file options.h.
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().