| version 1.6, 2001/12/02 23:28:35 |
version 1.7, 2001/12/08 18:23:52 |
| Line 10 void cfg_set_context_flags(const CFG_CON |
|
| Line 10 void cfg_set_context_flags(const CFG_CON |
|
| con->cur_idx_tmp = con->flags & CFG_PROCESS_FIRST ? 0 : 1; |
con->cur_idx_tmp = con->flags & CFG_PROCESS_FIRST ? 0 : 1; |
| } |
} |
| |
|
| void cfg_clear_cmdline_stop_str(const CFG_CONTEXT con) |
void __cfg_clear_strdyn_array(char ***where) |
| { |
{ |
| if (con->line_stop_str != NULL) |
if (*where != NULL) |
| strdyn_free(con->line_stop_str); |
strdyn_free(*where); |
| |
|
| con->line_stop_str = NULL; |
*where = NULL; |
| } |
} |
| |
|
| void cfg_add_cmdline_stop_str(const CFG_CONTEXT con, char *str) |
int __cfg_add_strdyn_array(char ***where, char *str) |
| { |
{ |
| if (con->line_stop_str == NULL) |
if (*where == NULL) |
| con->line_stop_str = strdyn_create(); |
*where = strdyn_create(); |
| |
|
| con->line_stop_str = strdyn_add(con->line_stop_str, str); |
*where = strdyn_add(*where, str); |
| |
|
| |
return *where == NULL ? 0 : 1; |
| } |
} |
| |
|
| void cfg_clear_cfgfile_stop_str(const CFG_CONTEXT con) |
int __cfg_remove_strdyn_array(char ***where, char *str) |
| { |
{ |
| if (con->file_stop_str != NULL) |
if (*where != NULL) |
| strdyn_free(con->file_stop_str); |
*where = strdyn_remove_str_all(*where, str); |
| |
|
| con->file_stop_str = NULL; |
return *where == NULL ? 0 : 1; |
| } |
} |
| |
|
| void cfg_add_cfgfile_stop_str(const CFG_CONTEXT con, char *str) |
/* |
| { |
void cfg_clear_cmdline_stop_str(const CFG_CONTEXT con) |
| if (con->file_stop_str == NULL) |
{ |
| con->file_stop_str = strdyn_create(); |
if (con->line_stop_str != NULL) |
| |
strdyn_free(con->line_stop_str); |
| |
|
| con->file_stop_str = strdyn_add(con->file_stop_str, str); |
con->line_stop_str = NULL; |
| } |
} |
| |
|
| |
void cfg_add_cmdline_stop_str(const CFG_CONTEXT con, char *str) |
| |
{ |
| |
if (con->line_stop_str == NULL) |
| |
con->line_stop_str = strdyn_create(); |
| |
|
| |
con->line_stop_str = strdyn_add(con->line_stop_str, str); |
| |
} |
| |
|
| |
void cfg_clear_cfgfile_stop_prefix(const CFG_CONTEXT con) |
| |
{ |
| |
if (con->file_stop_prefix != NULL) |
| |
strdyn_free(con->file_stop_prefix); |
| |
|
| |
con->file_stop_prefix = NULL; |
| |
} |
| |
|
| |
void cfg_add_cfgfile_stop_prefix(const CFG_CONTEXT con, char *str) |
| |
{ |
| |
if (con->file_stop_prefix == NULL) |
| |
con->file_stop_prefix = strdyn_create(); |
| |
|
| |
con->file_stop_prefix = strdyn_add(con->file_stop_prefix, str); |
| |
} |
| |
|
| void cfg_clear_cfgfile_comment_str(const CFG_CONTEXT con) |
void cfg_clear_cfgfile_comment_prefix(const CFG_CONTEXT con) |
| { |
{ |
| if (con->comment_str != NULL) |
if (con->comment_prefix != NULL) |
| strdyn_free(con->comment_str); |
strdyn_free(con->comment_prefix); |
| |
|
| con->comment_str = NULL; |
con->comment_prefix = NULL; |
| } |
} |
| |
|
| void cfg_add_cfgfile_comment_str(const CFG_CONTEXT con, char *str) |
void cfg_add_cfgfile_comment_prefix(const CFG_CONTEXT con, char *str) |
| { |
{ |
| if (con->comment_str == NULL) |
if (con->comment_prefix == NULL) |
| con->comment_str = strdyn_create(); |
con->comment_prefix = strdyn_create(); |
| |
|
| con->comment_str = strdyn_add(con->comment_str, str); |
con->comment_prefix = strdyn_add(con->comment_prefix, str); |
| } |
} |
| |
|
| void cfg_clear_cmdline_short_option_prefix(const CFG_CONTEXT con) |
void cfg_clear_cmdline_short_option_prefix(const CFG_CONTEXT con) |
| Line 90 void cfg_add_cmdline_long_option_prefix( |
|
| Line 117 void cfg_add_cmdline_long_option_prefix( |
|
| con->long_option_prefix = strdyn_add(con->long_option_prefix, str); |
con->long_option_prefix = strdyn_add(con->long_option_prefix, str); |
| } |
} |
| |
|
| void cfg_clear_cmdline_multi_separator(const CFG_CONTEXT con) |
void cfg_clear_cmdline_multi_vals_separator(const CFG_CONTEXT con) |
| { |
{ |
| if (con->multi_separator != NULL) |
if (con->multi_vals_separator != NULL) |
| strdyn_free(con->multi_separator); |
strdyn_free(con->multi_vals_separator); |
| |
|
| con->multi_separator = NULL; |
con->multi_vals_separator = NULL; |
| } |
} |
| |
|
| void cfg_add_cmdline_multi_separator(const CFG_CONTEXT con, char *str) |
void cfg_add_cmdline_multi_vals_separator(const CFG_CONTEXT con, char *str) |
| { |
{ |
| if (con->multi_separator == NULL) |
if (con->multi_vals_separator == NULL) |
| con->multi_separator = strdyn_create(); |
con->multi_vals_separator = strdyn_create(); |
| |
|
| con->multi_separator = strdyn_add(con->multi_separator, str); |
con->multi_vals_separator = strdyn_add(con->multi_vals_separator, str); |
| } |
} |
| |
|
| void cfg_clear_cmdline_option_arg_separator(const CFG_CONTEXT con) |
void cfg_clear_cmdline_option_arg_separator(const CFG_CONTEXT con) |
| Line 123 void cfg_add_cmdline_option_arg_separato |
|
| Line 150 void cfg_add_cmdline_option_arg_separato |
|
| strdyn_add(con->line_option_arg_separator, str); |
strdyn_add(con->line_option_arg_separator, str); |
| } |
} |
| |
|
| |
void cfg_clear_cfgfile_multi_line_postfix(const CFG_CONTEXT con) |
| |
{ |
| |
if (con->multi_line_postfix != NULL) |
| |
strdyn_free(con->multi_line_postfix); |
| |
|
| |
con->multi_line_postfix = NULL; |
| |
} |
| |
|
| |
void cfg_add_cfgfile_multi_line_postfix(const CFG_CONTEXT con, char *str) |
| |
{ |
| |
if (con->multi_line_postfix == NULL) |
| |
con->multi_line_postfix = strdyn_create(); |
| |
|
| |
con->multi_line_postfix = |
| |
strdyn_add(con->multi_line_postfix, str); |
| |
} |
| |
|
| void cfg_clear_cfgfile_option_arg_separator(const CFG_CONTEXT con) |
void cfg_clear_cfgfile_option_arg_separator(const CFG_CONTEXT con) |
| { |
{ |
| if (con->file_option_arg_separator != NULL) |
if (con->file_option_arg_separator != NULL) |
| Line 139 void cfg_add_cfgfile_option_arg_separato |
|
| Line 183 void cfg_add_cfgfile_option_arg_separato |
|
| con->file_option_arg_separator = |
con->file_option_arg_separator = |
| strdyn_add(con->file_option_arg_separator, str); |
strdyn_add(con->file_option_arg_separator, str); |
| } |
} |
| |
*/ |
| |
|