From 468bea9977fabc5ca544bb3f668b74a97e20ae28 Mon Sep 17 00:00:00 2001 From: Jorge Arellano Cid Date: Wed, 27 May 2015 11:07:04 -0300 Subject: Made view-source dpi use CSS formatting (it's shorter and cleaner) BTW, is there a point in using a monospaced font? Besides it looks like code printing (which is good), a proportional-spaced font may be easier to read. --- dpi/vsource.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'dpi') diff --git a/dpi/vsource.c b/dpi/vsource.c index c28e7b49..9d5694b5 100644 --- a/dpi/vsource.c +++ b/dpi/vsource.c @@ -118,7 +118,10 @@ void send_html_text(Dsh *sh, const char *url, int data_size) "\n" "\n" "Source for %s\n" - "\n" "\n" "\n\n", url); @@ -131,10 +134,9 @@ void send_html_text(Dsh *sh, const char *url, int data_size) while (*p) { if (line > old_line) { snprintf(line_str, 128, - "%s
%d%s
",
-                     (line > 1) ? "
" : "", - (line & 1) ? "#B87333" : "#DD7F32", line, - (line == 1 || (line % 10) == 0) ? "  " : ""); + "
%d%s", + (line & 1) ? "r1" : "r2", line, + (line == 1 || (line % 10) == 0) ? " " : ""); a_Dpip_dsh_write_str(sh, 0, line_str); old_line = line; } @@ -158,8 +160,6 @@ void send_html_text(Dsh *sh, const char *url, int data_size) dFree(token); } - if (data_size > 0) - a_Dpip_dsh_write_str(sh, 0, ""); a_Dpip_dsh_write_str(sh, 1, "
"); } -- cgit v1.2.3