/* * Copyright (C) 2006 Christian Stigen Larsen, http://csl.sublevel3.org * Distributed under the GNU General Public License (GPL) v2. * * Project homepage on http://jp2a.sf.net * * $Id: html.c 442 2006-09-01 12:25:21Z csl $ */ #include #include #include "options.h" void print_html_start(const int fontsize, FILE *f) { fputs( "\n" "\n" "\n" "\n", f); fprintf(f, "%s\n", html_title); fputs( "\n" "\n" "\n" "
\n", f);
}

void print_html_end(FILE *f) {
	fputs("
\n
\n\n\n", f); } const char* html_entity(const char ch) { static char s[2]; switch ( ch ) { case ' ': return " "; break; case '<': return "<"; break; case '>': return ">"; break; case '&': return "&"; break; default: s[0]=ch; s[1]=0; return s; break; } } void print_html_char(FILE *f, const char ch, const int r_fg, const int g_fg, const int b_fg, const int r_bg, const int g_bg, const int b_bg) { if ( colorfill ) { fprintf(f, "%s", r_fg, g_fg, b_fg, r_bg, g_bg, b_bg, html_entity(ch)); } else fprintf(f, "%s", r_fg, g_fg, b_fg, html_entity(ch)); } void print_html_newline(FILE *f) { fputs("
", f); }