--- psiconv/trunk/program/psiconv/gen_html.c 1999/12/02 17:18:55 34
+++ psiconv/trunk/program/psiconv/gen_html.c 2000/12/15 18:52:49 67
@@ -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 */
@@ -102,7 +102,7 @@
psiconv_bool_false, /* bold */
psiconv_normalscript, /* super_sub */
psiconv_bool_false, /* underline */
- psiconv_bool_false, /* strike_out */
+ psiconv_bool_false, /* strikethrough */
NULL, /* font */
};
base_char_struct.color = color;
@@ -133,7 +133,7 @@
fputs("",of);
if (old->underline)
fputs("",of);
- if (old->strike_out)
+ if (old->strikethrough)
fputs("",of);
if (old->super_sub == psiconv_superscript)
fputs("",of);
@@ -175,7 +175,7 @@
fputs("",of);
if (new->underline)
fputs("",of);
- if (new->strike_out)
+ if (new->strikethrough)
fputs("",of);
if (new->super_sub == psiconv_superscript)
fputs("",of);
@@ -200,8 +200,8 @@
else
fputs("",of);
}
- if (old->strike_out != new->strike_out) {
- if (old->strike_out)
+ if (old->strikethrough != new->strikethrough) {
+ if (old->strikethrough)
fputs("",of);
else
fputs("",of);
@@ -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",