--- psiconv/trunk/program/psiconv/psiconv.c 2003/11/23 21:47:24 167 +++ psiconv/trunk/program/psiconv/psiconv.c 2003/11/25 17:57:05 168 @@ -54,6 +54,7 @@ #include "psiconv/data.h" #include "psiconv/parse.h" +#include "psiconv/configuration.h" #include "gen.h" #include "psiconv.h" @@ -132,7 +133,7 @@ psiconv_file file; psiconv_fileformat ff; - psiconv_verbosity = PSICONV_VERB_WARN; + psiconv_config config = psiconv_config_read(NULL); fileformat_list = psiconv_list_new(sizeof(struct psiconv_fileformat_s)); init_txt(); @@ -149,11 +150,11 @@ switch(c) { case 'h': print_help(); exit(0); case 'V': print_version(); exit(0); - case 'v': if (psiconv_verbosity < PSICONV_VERB_PROGRESS) - psiconv_verbosity = PSICONV_VERB_PROGRESS; + case 'v': if (config->verbosity < PSICONV_VERB_PROGRESS) + config->verbosity = PSICONV_VERB_PROGRESS; break; - case 'd': psiconv_verbosity = PSICONV_VERB_DEBUG; break; - case 's': psiconv_verbosity = PSICONV_VERB_FATAL; break; + case 'd': config->verbosity = PSICONV_VERB_DEBUG; break; + case 's': config->verbosity = PSICONV_VERB_FATAL; break; case 'o': outputfilename = strdup(optarg); break; case 'T': type = strdup(optarg); break; case 'u': encoding_type = PSICONV_ENCODING_UTF8; break; @@ -196,7 +197,7 @@ exit(1); } - if (psiconv_parse(buf,&file) || (file->type == psiconv_unknown_file)) + if (psiconv_parse(config,buf,&file) || (file->type == psiconv_unknown_file)) { fprintf(stderr,"Parse error\n"); exit(1);