GNU style option parsing. More...
Go to the source code of this file.
Data Structures | |
struct | GNoption |
Macros | |
#define | LOG(kind, ...) GNUNET_log_from (kind, "util-getopt", __VA_ARGS__) |
#define | LOG_STRERROR(kind, syscall) GNUNET_log_from_strerror (kind, "util-getopt", syscall) |
#define | _(msgid) (msgid) |
#define | SWAP_FLAGS(ch1, ch2) |
#define | NONOPTION_P (argv[GNoptind][0] != '-' || argv[GNoptind][1] == '\0') |
Enumerations | |
enum | { REQUIRE_ORDER , PERMUTE , RETURN_IN_ORDER } |
Functions | |
char * | getenv () |
static char * | my_index (const char *str, int chr) |
static void | exchange (char **argv) |
static const char * | _getopt_initialize (int argc, char *const *argv, const char *optstring) |
static int | GN_getopt_internal (int argc, char *const *argv, const char *optstring, const struct GNoption *longopts, int *longind, int long_only) |
static int | GNgetopt_long (int argc, char *const *argv, const char *options, const struct GNoption *long_options, int *opt_index) |
int | GNUNET_GETOPT_run (const char *binaryOptions, const struct GNUNET_GETOPT_CommandLineOption *allOptions, unsigned int argc, char *const *argv) |
Parse the command line. More... | |
Variables | |
static char * | GNoptarg = NULL |
static int | GNoptind = 1 |
static char * | nextchar |
static enum { ... } | ordering |
static char * | posixly_correct |
static int | first_nonopt |
static int | last_nonopt |
GNU style option parsing.
TODO: get rid of statistics (make reentrant) and replace main GNU getopt parser with one that actually fits our API.
Definition in file getopt.c.
#define LOG | ( | kind, | |
... | |||
) | GNUNET_log_from (kind, "util-getopt", __VA_ARGS__) |
#define LOG_STRERROR | ( | kind, | |
syscall | |||
) | GNUNET_log_from_strerror (kind, "util-getopt", syscall) |
anonymous enum |
char * getenv | ( | ) |
Referenced by _getopt_initialize(), expand_dollar(), get_homedir(), get_path_from_GNUNET_PREFIX(), get_path_from_PATH(), GNUNET_CONFIGURATION_config_tool_run(), GNUNET_CONFIGURATION_default_filename(), GNUNET_CONFIGURATION_load(), GNUNET_log_setup(), GNUNET_OS_install_parent_control_handler(), GNUNET_PLUGIN_unload(), GNUNET_PROGRAM_conf_and_options(), GNUNET_PROGRAM_run2(), GNUNET_SERVICE_run_(), GNUNET_STRINGS_filename_expand(), GNUNET_TESTBED_system_create_with_portrange(), handle_union_p2p_strata_estimator(), main(), mktemp_name(), my_timegm(), output_message(), parent_control_handler(), parse_definitions(), plugin_fini(), set_cont(), setup_service(), share_tree_trim(), and write_benchmark_data().
|
static |
Definition at line 196 of file getopt.c.
Referenced by GN_getopt_internal().
|
static |
Definition at line 251 of file getopt.c.
References first_nonopt, GNoptind, last_nonopt, and SWAP_FLAGS.
Referenced by GN_getopt_internal().
|
static |
Definition at line 316 of file getopt.c.
References first_nonopt, getenv(), GNoptind, last_nonopt, nextchar, ordering, PERMUTE, posixly_correct, REQUIRE_ORDER, and RETURN_IN_ORDER.
Referenced by GN_getopt_internal().
|
static |
Definition at line 406 of file getopt.c.
References _, _getopt_initialize(), exchange(), first_nonopt, GNoption::flag, GNoptarg, GNoptind, GNoption::has_arg, last_nonopt, my_index(), GNoption::name, nextchar, NONOPTION_P, ordering, p, PERMUTE, posixly_correct, REQUIRE_ORDER, and GNoption::val.
Referenced by GNgetopt_long().
|
static |
Definition at line 870 of file getopt.c.
References GN_getopt_internal(), and options.
Referenced by GNUNET_GETOPT_run().
|
static |
Definition at line 119 of file getopt.c.
Referenced by GN_getopt_internal(), and GNUNET_GETOPT_run().
|
static |
Definition at line 134 of file getopt.c.
Referenced by _getopt_initialize(), exchange(), GN_getopt_internal(), and GNUNET_GETOPT_run().
|
static |
Definition at line 143 of file getopt.c.
Referenced by _getopt_initialize(), and GN_getopt_internal().
enum { ... } ordering |
Referenced by _getopt_initialize(), and GN_getopt_internal().
|
static |
Definition at line 178 of file getopt.c.
Referenced by _getopt_initialize(), and GN_getopt_internal().
|
static |
Definition at line 230 of file getopt.c.
Referenced by _getopt_initialize(), exchange(), and GN_getopt_internal().
|
static |
Definition at line 231 of file getopt.c.
Referenced by _getopt_initialize(), exchange(), and GN_getopt_internal().