--- psiconv/trunk/program/psiconv/gen_html.c 2000/10/04 19:02:04 52 +++ psiconv/trunk/program/psiconv/gen_html.c 2000/10/21 00:49:13 53 @@ -279,16 +279,22 @@ fputs("

\n",of); } -int psiconv_gen_html(FILE *of,const psiconv_file file, const char *dest) +int psiconv_gen_html(const char * filename,const psiconv_file file, + const char *dest) { + FILE *of = fopen(filename,"w"); + if (! of) + return -1; + if (file->type == psiconv_word_file) { psiconv_gen_html_word(of,(psiconv_word_f) file->file); - return 0; } else if (file->type == psiconv_texted_file) { psiconv_gen_html_texted(of,(psiconv_texted_f) file->file); - return 0; - } else + } else { + fclose(of); return -1; + } + return fclose(of); } void psiconv_gen_html_texted(FILE *of,psiconv_texted_f tf)