IOR
Data Structures | Macros | Enumerations | Functions
option.h File Reference
#include <stdint.h>
Include dependency graph for option.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  option_help
 
struct  option_module
 
struct  options_all
 

Macros

#define LAST_OPTION   {0, 0, 0, (option_value_type) 0, 0, NULL}
 

Enumerations

enum  option_value_type { OPTION_FLAG, OPTION_OPTIONAL_ARGUMENT, OPTION_REQUIRED_ARGUMENT }
 

Functions

int64_t string_to_bytes (char *size_str)
 
void option_print_current (option_help *args)
 
int option_parse (int argc, char **argv, options_all *args)
 

Macro Definition Documentation

◆ LAST_OPTION

#define LAST_OPTION   {0, 0, 0, (option_value_type) 0, 0, NULL}

Definition at line 36 of file option.h.

Referenced by mdtest_run(), and ParseCommandLine().

Enumeration Type Documentation

◆ option_value_type

Enumerator
OPTION_FLAG 
OPTION_OPTIONAL_ARGUMENT 
OPTION_REQUIRED_ARGUMENT 

Definition at line 10 of file option.h.

Function Documentation

◆ option_parse()

int option_parse ( int  argc,
char **  argv,
options_all args 
)

Definition at line 223 of file option.c.

References options_all::module_count, options_all::modules, NULL, o, OPTION_FLAG, OPTION_OPTIONAL_ARGUMENT, option_print_help(), OPTION_REQUIRED_ARGUMENT, option_module::options, option_module::prefix, and string_to_bytes().

Referenced by airoi_parse_options().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ option_print_current()

void option_print_current ( option_help args)

Definition at line 217 of file option.c.

References OPTION_FLAG, OPTION_OPTIONAL_ARGUMENT, OPTION_REQUIRED_ARGUMENT, and print_current_option_section().

Here is the call graph for this function:

◆ string_to_bytes()

int64_t string_to_bytes ( char *  size_str)

Definition at line 13 of file option.c.

References rc, and size.

Referenced by DecodeDirective(), NodeMemoryStringToBytes(), and option_parse().

Here is the caller graph for this function: