--- psiconv/trunk/program/psiconv/gen_html.c 1999/10/11 19:17:17 14 +++ psiconv/trunk/program/psiconv/gen_html.c 1999/12/02 17:18:55 34 @@ -24,6 +24,7 @@ #include "data.h" #include "list.h" #include "gen.h" +#include "psiconv.h" /* This determines for each character how it is displayed */ static const char *char_table[0x100] = @@ -94,16 +95,19 @@ { struct psiconv_character_layout base_char_struct = { - color, /* color */ - back_color, /* back_color */ + NULL, /* color */ + NULL, /* back_color */ 13.0, /* font_size */ psiconv_bool_false, /* italic */ psiconv_bool_false, /* bold */ psiconv_normalscript, /* super_sub */ psiconv_bool_false, /* underline */ psiconv_bool_false, /* strike_out */ - font, /* font */ + NULL, /* font */ }; + base_char_struct.color = color; + base_char_struct.back_color = back_color; + base_char_struct.font = font; return psiconv_clone_character_layout(&base_char_struct); } @@ -275,14 +279,16 @@ fputs("

\n",of); } -void psiconv_gen_html(FILE *of,psiconv_file file) +int psiconv_gen_html(FILE *of,const psiconv_file file, const char *dest) { - if (file->type == psiconv_word_file) + if (file->type == psiconv_word_file) { psiconv_gen_html_word(of,(psiconv_word_f) file->file); - else if (file->type == psiconv_texted_file) + return 0; + } else if (file->type == psiconv_texted_file) { psiconv_gen_html_texted(of,(psiconv_texted_f) file->file); - else - return; + return 0; + } else + return -1; } void psiconv_gen_html_texted(FILE *of,psiconv_texted_f tf) @@ -343,4 +349,14 @@ psiconv_free_character_layout(base_char); } +static struct psiconv_fileformat ff = + { + "HTML3", + "HTML 3.2, not verified so probably not completely compliant", + &psiconv_gen_html + }; +void init_html(void) +{ + psiconv_list_add(fileformat_list,&ff); +}