--- psiconv/trunk/program/psiconv/gen_html4.c 1999/10/11 19:17:17 14 +++ psiconv/trunk/program/psiconv/gen_html4.c 2000/10/21 00:49:13 53 @@ -26,6 +26,7 @@ #include "data.h" #include "list.h" #include "gen.h" +#include "psiconv.h" #ifndef TRUE #define TRUE (0==0) @@ -446,8 +447,10 @@ fputs("}\n", of); } -void psiconv_gen_html4(FILE * of, psiconv_file file) +static int psiconv_gen_html4(const char *filename, const psiconv_file file, + const char *dest) { + FILE * of; int i; psiconv_paragraph para; psiconv_word_style normal, sty; @@ -457,10 +460,12 @@ wf = file->file; else { /* Fall back on the normal HTML generator */ - psiconv_gen_html(of,file); - return; + return psiconv_gen_html(filename,file,dest); } + if (! (of = fopen(filename,"w"))) + return -1; + fputs("", of); fputs("\n\n\n \n", of); @@ -490,5 +495,19 @@ fput_para(of, para, wf); } fputs("\n\n", of); + + return fclose(of); +} + +static struct psiconv_fileformat ff = + { + "HTML4", + "HTML 4.0 with cascading style sheets", + psiconv_gen_html4 + }; + +void init_html4(void) +{ + psiconv_list_add(fileformat_list,&ff); }