| version 1.53, 2002/10/07 10:54:42 |
version 1.54, 2002/12/27 17:46:48 |
|
|
| * http://www.platon.sk/projects/libcfg+/ |
* http://www.platon.sk/projects/libcfg+/ |
| */ |
*/ |
| |
|
| /* $Platon: cfg+.c,v 1.51 2002/08/27 13:19:18 rajo Exp $ */ |
/* $Platon: libcfg+/src/cfg+.c,v 1.53 2002/10/07 10:54:42 rajo Exp $ */ |
| |
|
| /* Includes {{{ */ |
/* Includes {{{ */ |
| #ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
| Line 464 ar_print(name, format, vals) |
|
| Line 464 ar_print(name, format, vals) |
|
| } |
} |
| else { |
else { |
| register char *s; |
register char *s; |
| s = strdyn_implode_str((char **) vals, "]["); |
s = PLATON_FUNC(strdyn_implode_str)((char **) vals, "]["); |
| printf("%s = [%s]\n", name, s); |
printf("%s = [%s]\n", name, s); |
| if (s != NULL) |
if (s != NULL) |
| free(s); |
free(s); |
| } |
} |
| |
|
| strdyn_free((char **) vals); |
PLATON_FUNC(strdyn_free)((char **) vals); |
| } |
} |
| else |
else |
| printf("%s uninitialized\n", name); |
printf("%s uninitialized\n", name); |
| Line 541 main(argc, argv) |
|
| Line 541 main(argc, argv) |
|
| cfg_set_cmdline_context(con, 1, argc, argv); |
cfg_set_cmdline_context(con, 1, argc, argv); |
| cfg_set_context_flag(con, CFG_ADVANCED_LEFTOVERS); |
cfg_set_context_flag(con, CFG_ADVANCED_LEFTOVERS); |
| cfg_set_context_flag(con, CFG_FILE_LINE_POS_USAGE); |
cfg_set_context_flag(con, CFG_FILE_LINE_POS_USAGE); |
| |
if (0) { /* Testing if short command line options |
| |
works also without '-' prefix */ |
| |
cfg_clear_property(con, CFG_LINE_SHORT_OPTION_PREFIX); |
| |
cfg_add_property(con, CFG_LINE_SHORT_OPTION_PREFIX, ""); |
| |
} |
| |
if (0) { /* Testing if long command line options |
| |
works also without '--' prefix */ |
| |
cfg_clear_property(con, CFG_LINE_LONG_OPTION_PREFIX); |
| |
cfg_add_property(con, CFG_LINE_LONG_OPTION_PREFIX, ""); |
| |
} |
| } |
} |
| else { |
else { |
| cfg_set_cfgfile_context(con, 1, 0, o_cfgfile); |
cfg_set_cfgfile_context(con, 1, 0, o_cfgfile); |