aboutsummaryrefslogtreecommitdiffstats
path: root/src/html.c
diff options
context:
space:
mode:
authorstaffcvs <>2008-02-20 23:42:05 +0000
committerstaffcvs <>2008-02-20 23:42:05 +0000
commit93781eb2af7b9bf6b45dc6ddfbaa700104cb489a (patch)
tree081ad71df5f9d9deba08d922f6b5a38404dc3062 /src/html.c
parent1e871729edbe4dc505fb42dca59422b097fe2392 (diff)
downloadsympathy-93781eb2af7b9bf6b45dc6ddfbaa700104cb489a.tar.gz
sympathy-93781eb2af7b9bf6b45dc6ddfbaa700104cb489a.tar.bz2
sympathy-93781eb2af7b9bf6b45dc6ddfbaa700104cb489a.zip
*** empty log message ***
Diffstat (limited to 'src/html.c')
-rw-r--r--src/html.c37
1 files changed, 24 insertions, 13 deletions
diff --git a/src/html.c b/src/html.c
index 5b79219..cc10a58 100644
--- a/src/html.c
+++ b/src/html.c
@@ -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
}