IOR
|
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <limits.h>
#include <option.h>
Go to the source code of this file.
Functions | |
int64_t | string_to_bytes (char *size_str) |
static int | print_value (option_help *o) |
static void | print_help_section (option_help *args, option_value_type type, char *name) |
void | option_print_help (option_help *args) |
static int | print_option_value (option_help *o) |
static void | print_current_option_section (option_help *args, option_value_type type) |
void | option_print_current (option_help *args) |
static void | option_parse_token (char **argv, int *flag_parsed_next, int *requiredArgsSeen, options_all_t *opt_all, int *error, int *print_help) |
int | option_parse_str (char *val, options_all_t *opt_all) |
int | option_parse_key_value (char *key, char *val, options_all_t *opt_all) |
int | option_parse (int argc, char **argv, options_all_t *opt_all) |
int option_parse | ( | int | argc, |
char ** | argv, | ||
options_all_t * | opt_all | ||
) |
Definition at line 376 of file option.c.
References options_all_t::module_count, options_all_t::modules, NULL, o, option_parse_token(), option_print_help(), OPTION_REQUIRED_ARGUMENT, option_module::options, and option_module::prefix.
Referenced by mdtest_run(), and ParseCommandLine().
int option_parse_key_value | ( | char * | key, |
char * | val, | ||
options_all_t * | opt_all | ||
) |
Definition at line 364 of file option.c.
References NULL, and option_parse_token().
Referenced by DecodeDirective().
int option_parse_str | ( | char * | val, |
options_all_t * | opt_all | ||
) |
Definition at line 354 of file option.c.
References NULL, and option_parse_token().
|
static |
Definition at line 231 of file option.c.
References options_all_t::module_count, options_all_t::modules, NULL, o, OPTION_FLAG, OPTION_OPTIONAL_ARGUMENT, OPTION_REQUIRED_ARGUMENT, option_module::options, and string_to_bytes().
Referenced by option_parse(), option_parse_key_value(), and option_parse_str().
void option_print_current | ( | option_help * | args | ) |
Definition at line 225 of file option.c.
References OPTION_FLAG, OPTION_OPTIONAL_ARGUMENT, OPTION_REQUIRED_ARGUMENT, and print_current_option_section().
void option_print_help | ( | option_help * | args | ) |
Definition at line 142 of file option.c.
References OPTION_FLAG, OPTION_OPTIONAL_ARGUMENT, OPTION_REQUIRED_ARGUMENT, and print_help_section().
Referenced by option_parse().
|
static |
Definition at line 200 of file option.c.
References option_help::arg, option_help::longVar, o, OPTION_FLAG, print_option_value(), option_help::shortVar, and option_help::variable.
Referenced by option_print_current().
|
static |
Definition at line 105 of file option.c.
References option_help::arg, option_help::help, option_help::longVar, NULL, o, print_value(), and option_help::shortVar.
Referenced by option_print_help().
|
static |
Definition at line 149 of file option.c.
References option_help::arg, NULL, OPTION_OPTIONAL_ARGUMENT, OPTION_REQUIRED_ARGUMENT, option_help::type, and option_help::variable.
Referenced by print_current_option_section().
|
static |
Definition at line 53 of file option.c.
References option_help::arg, NULL, OPTION_FLAG, OPTION_OPTIONAL_ARGUMENT, OPTION_REQUIRED_ARGUMENT, option_help::type, and option_help::variable.
Referenced by print_help_section().
int64_t string_to_bytes | ( | char * | size_str | ) |
Definition at line 13 of file option.c.
Referenced by DecodeDirective(), NodeMemoryStringToBytes(), and option_parse_token().