1 | /* |
1 | /* |
2 | psiconv.c - Part of psiconv, a PSION 5 file formats converter |
2 | psiconv.c - Part of psiconv, a PSION 5 file formats converter |
3 | Copyright (c) 1999-2004 Frodo Looijaard <frodol@dds.nl> |
3 | Copyright (c) 1999-2005 Frodo Looijaard <frodo@frodo.looijaard.name> |
4 | |
4 | |
5 | This program is free software; you can redistribute it and/or modify |
5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by |
6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or |
7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. |
8 | (at your option) any later version. |
… | |
… | |
142 | const char *extra_configfile = NULL; |
142 | const char *extra_configfile = NULL; |
143 | char *type = NULL; |
143 | char *type = NULL; |
144 | encoding encoding_type=ENCODING_UTF8; |
144 | encoding encoding_type=ENCODING_UTF8; |
145 | psiconv_list outputlist; |
145 | psiconv_list outputlist; |
146 | int verbosity = 0; |
146 | int verbosity = 0; |
|
|
147 | psiconv_config config; |
147 | |
148 | |
148 | int c,i,res; |
149 | int c,i,res; |
149 | psiconv_buffer buf; |
150 | psiconv_buffer buf; |
150 | psiconv_file file; |
151 | psiconv_file file; |
151 | fileformat ff = NULL; |
152 | fileformat ff = NULL; |
… | |
… | |
220 | if (!(inputfilename = strdup(argv[optind]))) { |
221 | if (!(inputfilename = strdup(argv[optind]))) { |
221 | fputs("Out of memory error",stderr); |
222 | fputs("Out of memory error",stderr); |
222 | exit(1); |
223 | exit(1); |
223 | } |
224 | } |
224 | |
225 | |
225 | psiconv_config config = psiconv_config_default(); |
226 | config = psiconv_config_default(); |
226 | psiconv_config_read(extra_configfile,&config); |
227 | psiconv_config_read(extra_configfile,&config); |
227 | if (verbosity) |
228 | if (verbosity) |
228 | config->verbosity = verbosity; |
229 | config->verbosity = verbosity; |
229 | |
230 | |
230 | /* Open inputfile for reading */ |
231 | /* Open inputfile for reading */ |