--- psiconv/trunk/program/psiconv/gen_html.c 1999/12/02 17:18:55 34 +++ psiconv/trunk/program/psiconv/gen_html.c 2000/12/10 16:49:40 58 @@ -21,8 +21,8 @@ #include #include #include -#include "data.h" -#include "list.h" +#include "psiconv/data.h" +#include "psiconv/list.h" #include "gen.h" #include "psiconv.h" @@ -93,7 +93,7 @@ const psiconv_color color, const psiconv_color back_color) { - struct psiconv_character_layout base_char_struct = + struct psiconv_character_layout_s base_char_struct = { NULL, /* color */ NULL, /* back_color */ @@ -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) @@ -349,7 +355,7 @@ psiconv_free_character_layout(base_char); } -static struct psiconv_fileformat ff = +static struct psiconv_fileformat_s ff = { "HTML3", "HTML 3.2, not verified so probably not completely compliant",