--- psiconv/trunk/program/extra/rewrite.c 2003/11/25 17:57:05 168 +++ psiconv/trunk/program/extra/rewrite.c 2005/11/15 15:52:34 270 @@ -1,6 +1,6 @@ /* rewrite.c - Part of psiconv, a PSION 5 file formats converter - Copyright (c) 1999 Frodo Looijaard + Copyright (c) 1999-2004 Frodo Looijaard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -38,10 +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); - } + + config = psiconv_config_default(); + psiconv_config_read(NULL,&config); + if (!(fp = fopen(argv[1],"r"))) { perror("Can't open file"); exit(1); @@ -77,5 +77,6 @@ } fclose(fp); psiconv_buffer_free(buf); + psiconv_config_free(config); exit(0); }