4 * Copyright (c) 2008 James McKenzie <james@fishsoup.dhs.org>,
9 static char rcsid[] = "$Id$";
13 * Revision 1.1 2008/02/03 23:31:25 james
14 * *** empty log message ***
19 html_entity (FILE * f, int c)
24 fprintf (f, " ");
41 html_render (FILE * f, CRT_CA c)
43 if (c.attr & CRT_ATTR_REVERSE)
45 fprintf (f, "<td bgcolor='#000000'><font color='#ffffff'>");
52 if (c.attr & CRT_ATTR_UNDERLINE)
54 if (c.attr & CRT_ATTR_BOLD)
62 html_entity (f, c.chr);
64 if (c.attr & CRT_ATTR_BOLD)
66 if (c.attr & CRT_ATTR_UNDERLINE)
68 if (c.attr & CRT_ATTR_REVERSE)
70 fprintf (f, "</font>");
76 html_draw (FILE * f, CRT * c)
81 fprintf (f, "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n");
82 for (p.y = 0; p.y < CRT_ROWS; ++p.y)
84 o = CRT_ADDR (p.y, 0);
86 for (p.x = 0; p.x < CRT_ROWS; ++p.x, ++o)
88 html_render (f, c->screen[o]);
90 fprintf (f, "</tr>\n");
92 fprintf (f, "</table>\n");