#include <eh_utils.h>Go to the source code of this file.
Classes | |
| struct | Label_is_valid_st |
| struct | Print_opt_pad_st |
Functions | |
| Eh_args * | eh_create_args (void) |
| void | eh_destroy_args (Eh_args *args) |
| Eh_args * | eh_opts_init (int argc, char *argv[]) |
| Eh_symbol_table | eh_get_opt_defaults (const char *prog_name) |
| char * | eh_args_lookup (Eh_args *t, char *key) |
| void | eh_args_insert (Eh_args *t, char *key, char *value) |
| void | eh_args_insert_default (Eh_args *t, char *key, char *value) |
| void | check_label_is_possible (char *key, char *value, Label_is_valid_st *user_data) |
| void | check_label_is_valid (char *key, char *value, int *err_flag) |
| gboolean | eh_check_opts (Eh_args *args, char **required, char **possible, char *help[]) |
| void | eh_print_opt (Eh_args *args, char *label) |
| char * | eh_get_opt (Eh_args *args, char *label) |
| char * | eh_get_opt_default (Eh_args *args, char *label) |
| char * | eh_get_arg_n (Eh_args *args, int n) |
| char * | eh_get_opt_str (Eh_args *args, char *label, char *default_val) |
| gboolean | eh_get_opt_bool (Eh_args *args, char *label, gboolean default_val) |
| int | eh_get_opt_key (Eh_args *args, char *label, int default_val, char *keys[]) |
| int | eh_get_opt_int (Eh_args *args, char *label, int default_val) |
| double | eh_get_opt_dbl (Eh_args *args, char *label, double default_val) |
| gint | eh_print_message (FILE *fp, char *msg[]) |
| void | print_opt_pad (char *key, char *value, Print_opt_pad_st *user_data) |
| void | get_max_label_length (char *key, char *value, Print_opt_pad_st *user_data) |
| void | eh_print_all_opts (Eh_args *args, char *prog_name, FILE *fp) |
| void check_label_is_possible | ( | char * | key, | |
| char * | value, | |||
| Label_is_valid_st * | user_data | |||
| ) |
Definition at line 177 of file eh_get_opt.c.
References Label_is_valid_st::err_flag, and Label_is_valid_st::possible.
Referenced by eh_check_opts().
| void check_label_is_valid | ( | char * | key, | |
| char * | value, | |||
| int * | err_flag | |||
| ) |
| void eh_args_insert | ( | Eh_args * | t, | |
| char * | key, | |||
| char * | value | |||
| ) |
Definition at line 125 of file eh_get_opt.c.
References Eh_args::args, and eh_symbol_table_insert().
| void eh_args_insert_default | ( | Eh_args * | t, | |
| char * | key, | |||
| char * | value | |||
| ) |
Definition at line 130 of file eh_get_opt.c.
References Eh_args::defaults, and eh_symbol_table_insert().
Referenced by eh_get_opt_bool(), eh_get_opt_dbl(), eh_get_opt_int(), eh_get_opt_key(), and eh_get_opt_str().
| char* eh_args_lookup | ( | Eh_args * | t, | |
| char * | key | |||
| ) |
Definition at line 120 of file eh_get_opt.c.
References Eh_args::args, and eh_symbol_table_lookup().
Referenced by eh_get_opt().
| gboolean eh_check_opts | ( | Eh_args * | args, | |
| char ** | required, | |||
| char ** | possible, | |||
| char * | help[] | |||
| ) |
Definition at line 145 of file eh_get_opt.c.
References Eh_args::args, check_label_is_possible(), check_label_is_valid(), eh_get_opt_bool(), eh_print_message(), eh_symbol_table_foreach(), eh_symbol_table_lookup(), Label_is_valid_st::err_flag, and Label_is_valid_st::possible.
Referenced by main().
| Eh_args* eh_create_args | ( | void | ) |
Definition at line 23 of file eh_get_opt.c.
References Eh_args::args, Eh_args::defaults, eh_new, and eh_symbol_table_new().
| void eh_destroy_args | ( | Eh_args * | args | ) |
Definition at line 31 of file eh_get_opt.c.
References Eh_args::args, Eh_args::defaults, eh_free, and eh_symbol_table_destroy().
| char* eh_get_arg_n | ( | Eh_args * | args, | |
| int | n | |||
| ) |
| char* eh_get_opt | ( | Eh_args * | args, | |
| char * | label | |||
| ) |
Definition at line 219 of file eh_get_opt.c.
References eh_args_lookup(), and eh_get_opt_default().
Referenced by eh_get_arg_n(), eh_get_opt_bool(), eh_get_opt_dbl(), eh_get_opt_int(), eh_get_opt_key(), eh_get_opt_str(), eh_print_opt(), and print_opt_pad().
| gboolean eh_get_opt_bool | ( | Eh_args * | args, | |
| char * | label, | |||
| gboolean | default_val | |||
| ) |
Definition at line 261 of file eh_get_opt.c.
References eh_args_insert_default(), eh_get_opt(), eh_get_opt_default(), and eh_str_to_boolean().
Referenced by eh_check_opts(), and main().
| double eh_get_opt_dbl | ( | Eh_args * | args, | |
| char * | label, | |||
| double | default_val | |||
| ) |
Definition at line 327 of file eh_get_opt.c.
References eh_args_insert_default(), eh_get_opt(), and eh_get_opt_default().
Referenced by main().
| char* eh_get_opt_default | ( | Eh_args * | args, | |
| char * | label | |||
| ) |
Definition at line 230 of file eh_get_opt.c.
References Eh_args::defaults, and eh_symbol_table_lookup().
Referenced by eh_get_opt(), eh_get_opt_bool(), eh_get_opt_dbl(), eh_get_opt_int(), eh_get_opt_key(), eh_get_opt_str(), and eh_print_opt().
| Eh_symbol_table eh_get_opt_defaults | ( | const char * | prog_name | ) |
Definition at line 79 of file eh_get_opt.c.
References eh_free, eh_is_readable_file(), eh_key_file_scan_for(), eh_symbol_table_destroy(), eh_symbol_table_merge(), and eh_symbol_table_new().
Referenced by eh_opts_init().
| int eh_get_opt_int | ( | Eh_args * | args, | |
| char * | label, | |||
| int | default_val | |||
| ) |
Definition at line 310 of file eh_get_opt.c.
References eh_args_insert_default(), eh_get_opt(), and eh_get_opt_default().
Referenced by main().
| int eh_get_opt_key | ( | Eh_args * | args, | |
| char * | label, | |||
| int | default_val, | |||
| char * | keys[] | |||
| ) |
Definition at line 277 of file eh_get_opt.c.
References eh_args_insert_default(), eh_exit(), eh_get_opt(), and eh_get_opt_default().
Referenced by main().
| char* eh_get_opt_str | ( | Eh_args * | args, | |
| char * | label, | |||
| char * | default_val | |||
| ) |
Definition at line 243 of file eh_get_opt.c.
References eh_args_insert_default(), eh_get_opt(), and eh_get_opt_default().
Referenced by main().
| Eh_args* eh_opts_init | ( | int | argc, | |
| char * | argv[] | |||
| ) |
Definition at line 43 of file eh_get_opt.c.
References Eh_args::args, Eh_args::defaults, eh_free, eh_get_opt_defaults(), eh_new, eh_symbol_table_insert(), and eh_symbol_table_new().
Referenced by main().
| void eh_print_all_opts | ( | Eh_args * | args, | |
| char * | prog_name, | |||
| FILE * | fp | |||
| ) |
Definition at line 367 of file eh_get_opt.c.
References Print_opt_pad_st::args, Eh_args::defaults, eh_symbol_table_foreach(), get_max_label_length(), Print_opt_pad_st::max_key_len, Print_opt_pad_st::max_value_len, and print_opt_pad().
Referenced by main().
| gint eh_print_message | ( | FILE * | fp, | |
| char * | msg[] | |||
| ) |
Definition at line 344 of file eh_get_opt.c.
Referenced by eh_check_opts(), eh_fprint_version_info(), main(), and sedflux_get_file_name_interactively().
| void eh_print_opt | ( | Eh_args * | args, | |
| char * | label | |||
| ) |
Definition at line 213 of file eh_get_opt.c.
References eh_get_opt(), and eh_get_opt_default().
Referenced by main().
| void get_max_label_length | ( | char * | key, | |
| char * | value, | |||
| Print_opt_pad_st * | user_data | |||
| ) |
Definition at line 401 of file eh_get_opt.c.
References Print_opt_pad_st::max_key_len, and Print_opt_pad_st::max_value_len.
Referenced by eh_print_all_opts().
| void print_opt_pad | ( | char * | key, | |
| char * | value, | |||
| Print_opt_pad_st * | user_data | |||
| ) |
Definition at line 383 of file eh_get_opt.c.
References Print_opt_pad_st::args, E_NOVAL, eh_free, eh_get_opt(), Print_opt_pad_st::max_key_len, and Print_opt_pad_st::max_value_len.
Referenced by eh_print_all_opts().
1.5.2