diff options
-rw-r--r-- | src/html.c | 37 | ||||
-rw-r--r-- | version-md5sums | 1 | ||||
-rw-r--r-- | version-micro | 2 |
3 files changed, 26 insertions, 14 deletions
@@ -10,6 +10,9 @@ static char rcsid[] = "$Id$"; /* * $Log$ + * Revision 1.6 2008/02/20 23:42:05 staffcvs + * *** empty log message *** + * * Revision 1.5 2008/02/20 23:31:48 staffcvs * *** empty log message *** * @@ -92,15 +95,13 @@ html_render (FILE * f, CRT_CA c) if (c.attr & CRT_ATTR_BOLD) fg |= CRT_COLOR_INTENSITY; } -#if 1 +#ifdef CSS + fprintf (f, "<span style='color: #%06x; background-color: #%06x'>", + colormap[fg], colormap[bg]); +#else fprintf (f, "<td bgcolor='#%06x'><font color='#%06x'>", colormap[bg], colormap[fg]); -#endif - fprintf (f, "<tt>"); -#if 0 - fprintf (f, "<span style='color: #%06x; background-color: #%06x'>", - colormap[fg], colormap[bg]); #endif if (c.attr & CRT_ATTR_UNDERLINE) @@ -123,13 +124,12 @@ html_render (FILE * f, CRT_CA c) { fprintf (f, "</font>"); } +#ifdef CSS + fprintf (f, "</span>"); +#else fprintf (f, "</tt>"); -#if 1 fprintf (f, "</td>"); #endif -#if 0 - fprintf (f, "</span>"); -#endif } static void @@ -138,21 +138,32 @@ html_draw (FILE * f, CRT * c) CRT_Pos p; int o; -// fprintf (f, "<pre>"); +#ifdef CSS + fprintf (f, "<pre>"); +#else fprintf (f, "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n"); +#endif for (p.y = 0; p.y < CRT_ROWS; ++p.y) { o = CRT_ADDR (p.y, 0); +#ifndef CSS fprintf (f, "<tr>"); +#endif for (p.x = 0; p.x < CRT_COLS; ++p.x, ++o) { html_render (f, c->screen[o]); } +#ifdef CSS + fprintf (f, "\n"); +#else fprintf (f, "</tr>\n"); -// fprintf(f,"\n"); +#endif } +#ifdef CSS + fprintf (f, "</pre>\n"); +#else fprintf (f, "</table>"); -// fprintf (f, "</pre>\n"); +#endif } diff --git a/version-md5sums b/version-md5sums index 3a0cf05..6259056 100644 --- a/version-md5sums +++ b/version-md5sums @@ -1 +1,2 @@ 6488eda7d5c4d46ce3f587f5dc745dfa 1.0.1 +ca1ac5a7fc122af620b0cf7296c324c3 1.0.2 diff --git a/version-micro b/version-micro index d00491f..0cfbf08 100644 --- a/version-micro +++ b/version-micro @@ -1 +1 @@ -1 +2 |