/[public]/psiconv/trunk/program/psiconv/gen_html4.c
ViewVC logotype

Diff of /psiconv/trunk/program/psiconv/gen_html4.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 67 Revision 142
28#include "gen.h" 28#include "gen.h"
29#include "psiconv.h" 29#include "psiconv.h"
30 30
31#ifndef TRUE 31#ifndef TRUE
32#define TRUE (0==0) 32#define TRUE (0==0)
33#endif
34
35#ifdef DMALLOC
36#include "dmalloc.h"
33#endif 37#endif
34 38
35/* 39/*
36 * Various string tables for HTML4 settings 40 * Various string tables for HTML4 settings
37 */ 41 */
130 } 134 }
131} 135}
132 136
133static const char *screenfont_name(psiconv_u8 screenfont) 137static const char *screenfont_name(psiconv_u8 screenfont)
134{ 138{
135 if (screenfont == 1) 139 if (screenfont == psiconv_font_sansserif)
136 return "sans-serif"; 140 return "sans-serif";
137 else if (screenfont == 2) 141 else if (screenfont == psiconv_font_nonprop)
138 return "monospace"; 142 return "monospace";
139 else if (screenfont == 3) 143 else if (screenfont == psiconv_font_serif)
140 return "serif"; 144 return "serif";
141 else 145 else
142 return "serif"; 146 return "serif";
143} 147}
144 148
468 472
469 fputs("<!doctype html public \"-//W3C//DTD HTML 4.0 STRICT//EN\">", of); 473 fputs("<!doctype html public \"-//W3C//DTD HTML 4.0 STRICT//EN\">", of);
470 fputs("\n<HTML>\n<HEAD>\n <META NAME=\"GENERATOR\"", of); 474 fputs("\n<HTML>\n<HEAD>\n <META NAME=\"GENERATOR\"", of);
471 fputs(" CONTENT=\"psiconv-" VERSION "\">\n", of); 475 fputs(" CONTENT=\"psiconv-" VERSION "\">\n", of);
472 476
477 if (wf->page_sec->header->text) {
473 if (psiconv_list_length(wf->page_sec->header->text->paragraphs) > 0) { 478 if (psiconv_list_length(wf->page_sec->header->text->paragraphs) > 0) {
474 fputs(" <TITLE>", of); 479 fputs(" <TITLE>", of);
475 para = psiconv_list_get(wf->page_sec->header->text->paragraphs, 0); 480 para = psiconv_list_get(wf->page_sec->header->text->paragraphs, 0);
476 i = 0; 481 i = 0;
477 fput_text(of, para->text, strlen(para->text), &i); 482 fput_text(of, para->text, strlen(para->text), &i);
478 fputs("</TITLE>\n", of); 483 fputs("</TITLE>\n", of);
484 }
479 } 485 }
480 486
481 normal = wf->styles_sec->normal; 487 normal = wf->styles_sec->normal;
482 fputs(" <STYLE TYPE=\"text/css\"><!--\n", of); 488 fputs(" <STYLE TYPE=\"text/css\"><!--\n", of);
483 fprintf(of," BODY { background-color: #%02x%02x%02x }\n", 489 fprintf(of," BODY { background-color: #%02x%02x%02x }\n",
488 for (i = 0; i < psiconv_list_length(wf->styles_sec->styles); i++) { 494 for (i = 0; i < psiconv_list_length(wf->styles_sec->styles); i++) {
489 sty = psiconv_list_get(wf->styles_sec->styles, i); 495 sty = psiconv_list_get(wf->styles_sec->styles, i);
490 fput_style(of, normal, sty, wf); 496 fput_style(of, normal, sty, wf);
491 } 497 }
492 fputs(" --></STYLE>\n</HEAD>\n<BODY>\n", of); 498 fputs(" --></STYLE>\n</HEAD>\n<BODY>\n", of);
499 if (wf->page_sec->header->text) {
493 for (i = 0; i < psiconv_list_length(wf->paragraphs); i++) { 500 for (i = 0; i < psiconv_list_length(wf->paragraphs); i++) {
494 para = psiconv_list_get(wf->paragraphs, i); 501 para = psiconv_list_get(wf->paragraphs, i);
495 fput_para(of, para, wf); 502 fput_para(of, para, wf);
503 }
496 } 504 }
497 fputs("</BODY>\n</HTML>\n", of); 505 fputs("</BODY>\n</HTML>\n", of);
498 506
499 return fclose(of); 507 return fclose(of);
500} 508}

Legend:
Removed from v.67  
changed lines
  Added in v.142

frodo@frodo.looijaard.name
ViewVC Help
Powered by ViewVC 1.1.26