From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: Linux I2C <linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: [PATCH 1/2] decode-dimms: Generate HTML 4.01 compliant markup
Date: Fri, 31 May 2013 14:20:10 +0200 [thread overview]
Message-ID: <20130531142010.48f9f013@endymion.delvare> (raw)
In HTML output mode, generate HTML 4.01 compliant markup.
---
eeprom/decode-dimms | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
--- i2c-tools.orig/eeprom/decode-dimms 2013-05-31 13:18:17.139571898 +0200
+++ i2c-tools/eeprom/decode-dimms 2013-05-31 13:45:09.704948120 +0200
@@ -490,14 +490,16 @@ sub real_printl($$) # print a line w/ la
}
}
-sub printl2($$) # print a line w/ label and value (outside a table)
+sub printl2 # print a line w/ label and value (outside a table)
{
- my ($label, $value) = @_;
+ my ($label, $value, $style) = @_;
if ($opt_html) {
$label = html_encode($label);
$value = html_encode($value);
+ print "<p", (defined $style ? " style=\"$style\"" : ""), ">";
}
print "$label: $value\n";
+ print "</p>\n" if $opt_html;
}
sub real_prints($) # print separator w/ given text
@@ -2165,7 +2167,7 @@ if (!$opt_igncheck) {
if ($opt_html && !$opt_bodyonly) {
- print "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">\n",
+ print "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01//EN\">\n",
"<html><head>\n",
"\t<meta HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">\n",
"\t<title>PC DIMM Serial Presence Detect Tester/Decoder Output</title>\n",
@@ -2350,9 +2352,8 @@ for $current (0 .. $#dimm) {
if ($opt_side_by_side) {
print "\n\n";
} else {
- print "<b><u>" if $opt_html;
- printl2("\n\nDecoding EEPROM", $dimm[$current]->{file});
- print "</u></b>" if $opt_html;
+ printl2("\n\nDecoding EEPROM", $dimm[$current]->{file},
+ "text-decoration: underline; font-weight: bold;");
}
print "<table border=1>\n" if $opt_html;
--
Jean Delvare
next reply other threads:[~2013-05-31 12:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 12:20 Jean Delvare [this message]
[not found] ` <20130531142010.48f9f013-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org>
2013-06-07 6:49 ` [PATCH 1/2] decode-dimms: Generate HTML 4.01 compliant markup Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130531142010.48f9f013@endymion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox