xapian-core
1.4.26
|
Wrappers to allow GNU getopt to be used cleanly from C++ code. More...
#include <cctype>
Go to the source code of this file.
Classes | |
struct | option |
Macros | |
#define | GNU_GETOPT_INTERFACE_VERSION 2 |
#define | no_argument 0 |
#define | required_argument 1 |
#define | optional_argument 2 |
Functions | |
int | gnu_getopt_internal_ (int, char *const *, const char *, const struct option *, int *, int) |
int | gnu_getopt (int argc_, char *const *argv_, const char *shortopts_) |
int | gnu_getopt_long (int argc_, char *const *argv_, const char *shortopts_, const struct option *longopts_, int *optind_) |
int | gnu_getopt_long_only (int argc_, char *const *argv_, const char *shortopts_, const struct option *longopts_, int *optind_) |
Variables | |
char * | optarg |
int | optind |
int | opterr |
int | optopt |
Wrappers to allow GNU getopt to be used cleanly from C++ code.
Definition in file gnu_getopt.h.
#define GNU_GETOPT_INTERFACE_VERSION 2 |
Definition at line 29 of file gnu_getopt.h.
#define no_argument 0 |
Definition at line 79 of file gnu_getopt.h.
Referenced by main(), and test_driver::parse_command_line().
#define optional_argument 2 |
Definition at line 81 of file gnu_getopt.h.
#define required_argument 1 |
Definition at line 80 of file gnu_getopt.h.
Referenced by main().
|
inline |
Definition at line 90 of file gnu_getopt.h.
References gnu_getopt_internal_().
Referenced by main().
int gnu_getopt_internal_ | ( | int | , |
char *const * | , | ||
const char * | , | ||
const struct option * | , | ||
int * | , | ||
int | |||
) |
Definition at line 339 of file getopt.cc.
References _, exchange(), first_nonopt, option::flag, getopt_initialize(), getopt_initialized, option::has_arg, last_nonopt, option::name, nextchar, NONOPTION_P, optarg, opterr, optind, optopt, ordering, PERMUTE, posixly_correct, REQUIRE_ORDER, and option::val.
Referenced by gnu_getopt(), gnu_getopt_long(), and gnu_getopt_long_only().
|
inline |
Definition at line 97 of file gnu_getopt.h.
References gnu_getopt_internal_().
Referenced by main(), and test_driver::parse_command_line().
|
inline |
Definition at line 103 of file gnu_getopt.h.
References gnu_getopt_internal_().
char* optarg |
Definition at line 79 of file getopt.cc.
Referenced by gnu_getopt_internal_(), main(), and test_driver::parse_command_line().
int opterr |
Definition at line 99 of file getopt.cc.
Referenced by gnu_getopt_internal_().
int optind |
Definition at line 94 of file getopt.cc.
Referenced by exchange(), getopt_initialize(), gnu_getopt_internal_(), main(), and test_driver::parse_command_line().
int optopt |
Definition at line 105 of file getopt.cc.
Referenced by gnu_getopt_internal_().