#include <stdio.h>
#include <glib.h>
#include <utils/eh_types.h>
#include <utils/eh_symbol_table.h>
Go to the source code of this file.
Classes | |
struct | Eh_args |
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) |
gboolean | eh_check_opts (Eh_args *args, char **required, char **possible, char **help_message) |
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) |
void | eh_print_opt (Eh_args *args, char *label) |
char * | eh_get_opt_str (Eh_args *args, char *label, char *default_val) |
int | eh_get_opt_int (Eh_args *args, char *label, int 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[]) |
double | eh_get_opt_dbl (Eh_args *args, char *label, double default_val) |
gint | eh_print_message (FILE *fp, char *message[]) |
void | eh_print_all_opts (Eh_args *args, char *prog_name, FILE *fp) |
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_message | |||
) |
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 * | message[] | |||
) |
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().