--- psiconv/trunk/lib/psiconv/configuration.c 2004/02/04 15:28:56 200 +++ psiconv/trunk/lib/psiconv/configuration.c 2004/02/22 22:32:04 218 @@ -41,7 +41,7 @@ #define CONFIGURATION_SEARCH_PATH PSICONVETCDIR "/psiconv.conf:~/.psiconv.conf" #endif static struct psiconv_config_s default_config = - { PSICONV_VERB_WARN, 2, 0,0,0,psiconv_bool_false,NULL,'?' }; + { PSICONV_VERB_WARN, 2, 0,0,0,psiconv_bool_false,NULL,'?','?',{ 0 },psiconv_bool_false }; static void psiconv_config_parse_statement(const char *filename, int linenr, @@ -59,9 +59,15 @@ psiconv_config result; result = malloc(sizeof(*result)); *result = default_config; + psiconv_unicode_select_characterset(result,1); return result; } +void psiconv_config_free(psiconv_config config) +{ + free(config); +} + void psiconv_config_parse_statement(const char *filename, int linenr, const char *var, int value, @@ -70,7 +76,7 @@ int charnr; if (!(strcasecmp(var,"verbosity"))) { - if ((value >= 1) && (value <= 4)) + if ((value >= 1) && (value <= 5)) (*config)->verbosity = value; else psiconv_error(*config,0,0,"Configuration file %s, line %d: " @@ -110,7 +116,7 @@ psiconv_unicode_select_characterset(*config,value); else psiconv_error(*config,0,0,"Configuration file %s, line %d: " - "CharacterSet should be between 0 and 0", + "CharacterSet should be between 0 and 1", filename,linenr); } else if (!(strcasecmp(var,"unknownunicodechar"))) { if ((value >= 1) && (value < 0x10000)) @@ -354,4 +360,5 @@ psiconv_config_parse_file(filename,config); free(filename); } + free(path); }