--- psiconv/trunk/program/extra/rewrite.c 2003/11/23 21:47:24 167 +++ psiconv/trunk/program/extra/rewrite.c 2003/11/25 17:57:05 168 @@ -19,7 +19,9 @@ #include #include +#include +#include #include int main(int argc, char *argv[]) @@ -27,6 +29,7 @@ FILE *fp; psiconv_buffer buf; psiconv_file psionfile; + psiconv_config config; /* psiconv_verbosity = PSICONV_VERB_DEBUG; */ @@ -35,6 +38,10 @@ fprintf(stderr,"Syntax: INFILE OUTFILE\n"); exit(1); } + if (!(config = psiconv_config_read(NULL))) { + fprintf(stderr,"Can't get config\n"); + exit(1); + } if (!(fp = fopen(argv[1],"r"))) { perror("Can't open file"); exit(1); @@ -48,14 +55,14 @@ exit(1); } fclose(fp); - if ((psiconv_parse(buf,&psionfile))) { + if ((psiconv_parse(config,buf,&psionfile))) { fprintf(stderr,"Parse error\n"); exit(1); } psiconv_buffer_free(buf); buf = NULL; - if (psiconv_write(&buf,psionfile)) { + if (psiconv_write(config,&buf,psionfile)) { fprintf(stderr,"Generate error\n"); exit(1); }