#include <config.h>
#include <stdio.h>
#include <isc/commandline.h>
#include <isc/msgs.h>
#include <isc/string.h>
#include <isc/util.h>
Go to the source code of this file.
Defines | |
#define | BADOPT '?' |
#define | BADARG ':' |
#define | ENDOPT &endopt |
Functions | |
int | isc_commandline_parse (int argc, char *const *argv, const char *options) |
parse command line | |
Variables | |
LIBISC_EXTERNAL_DATA int | isc_commandline_index = 1 |
Index into parent argv vector. | |
LIBISC_EXTERNAL_DATA int | isc_commandline_option |
Character checked for validity. | |
LIBISC_EXTERNAL_DATA char * | isc_commandline_argument |
Argument associated with option. | |
LIBISC_EXTERNAL_DATA char * | isc_commandline_progname |
For printing error messages. | |
LIBISC_EXTERNAL_DATA isc_boolean_t | isc_commandline_errprint = ISC_TRUE |
Print error messages. | |
LIBISC_EXTERNAL_DATA isc_boolean_t | isc_commandline_reset = ISC_TRUE |
Reset processing. | |
static char | endopt = '\0' |
The primary change has been to rename items to the ISC namespace and format in the ISC coding style.
Definition in file commandline.c.
#define BADOPT '?' |
#define BADARG ':' |
#define ENDOPT &endopt |
int isc_commandline_parse | ( | int | argc, | |
char *const * | argv, | |||
const char * | options | |||
) |
parse command line
getopt -- Parse argc/argv argument vector.
Definition at line 95 of file commandline.c.
References BADARG, BADOPT, ENDOPT, isc_commandline_argument, isc_commandline_errprint, isc_commandline_index, isc_commandline_option, isc_commandline_progname, isc_commandline_reset, ISC_FALSE, ISC_MSG_ILLEGALOPT, ISC_MSG_OPTNEEDARG, isc_msgcat_get(), ISC_MSGSET_COMMANDLINE, and REQUIRE.
Referenced by main(), parse_args(), parse_command_line(), and pre_parse_args().
LIBISC_EXTERNAL_DATA int isc_commandline_index = 1 |
Index into parent argv vector.
Definition at line 72 of file commandline.c.
Referenced by isc_commandline_parse(), main(), parse_args(), parse_command_line(), and pre_parse_args().
LIBISC_EXTERNAL_DATA int isc_commandline_option |
Character checked for validity.
Definition at line 74 of file commandline.c.
Referenced by isc_commandline_parse(), main(), parse_args(), parse_command_line(), and pre_parse_args().
LIBISC_EXTERNAL_DATA char* isc_commandline_argument |
Argument associated with option.
Definition at line 76 of file commandline.c.
Referenced by isc_commandline_parse(), main(), parse_args(), parse_command_line(), and pre_parse_args().
LIBISC_EXTERNAL_DATA char* isc_commandline_progname |
For printing error messages.
Definition at line 78 of file commandline.c.
Referenced by isc_commandline_parse().
LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_errprint = ISC_TRUE |
Print error messages.
Print error message.
Definition at line 80 of file commandline.c.
Referenced by isc_commandline_parse(), main(), and parse_command_line().
LIBISC_EXTERNAL_DATA isc_boolean_t isc_commandline_reset = ISC_TRUE |
Reset processing.
Reset getopt.
Definition at line 82 of file commandline.c.
Referenced by isc_commandline_parse(), main(), and pre_parse_args().
char endopt = '\0' [static] |
Definition at line 84 of file commandline.c.