IOR
option.h
Go to the documentation of this file.
1 #ifndef _IOR_OPTION_H
2 #define _IOR_OPTION_H
3 
4 #include <stdint.h>
5 
6 /*
7  * Initial version by JK
8  */
9 
10 typedef enum{
15 
16 typedef struct{
17  char shortVar;
18  char * longVar;
19  char * help;
20 
22  char type; // data type, H = hidden string
23  void * variable;
24 } option_help;
25 
26 typedef struct{
27  char * prefix; // may be NULL to include it in the standard name
30 
31 typedef struct{
34 } options_all;
35 
36 #define LAST_OPTION {0, 0, 0, (option_value_type) 0, 0, NULL}
37 
38 int64_t string_to_bytes(char *size_str);
40 
41 //@return the number of parsed arguments
42 int option_parse(int argc, char ** argv, options_all * args);
43 
44 #endif
int option_parse(int argc, char **argv, options_all *args)
Definition: option.c:223
option_value_type
Definition: option.h:10
int64_t string_to_bytes(char *size_str)
Definition: option.c:13
void * variable
Definition: option.h:23
option_module * modules
Definition: option.h:33
char * longVar
Definition: option.h:18
int module_count
Definition: option.h:32
char shortVar
Definition: option.h:17
option_value_type arg
Definition: option.h:21
char * help
Definition: option.h:19
option_help * options
Definition: option.h:28
char * prefix
Definition: option.h:27
char type
Definition: option.h:22
void option_print_current(option_help *args)
Definition: option.c:217