summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-06-07 06:43:47 +0000
committerkhali <khali@7894878c-1315-0410-8ee3-d5d059ff63e0>2013-06-07 06:43:47 +0000
commiteff186ba302455501f86ae9c5c923891220f3b82 (patch)
treef429082f24f572abf5f508ee4c3226713e3a0955
parent2181e881e4743a784dae95f85fbde31d4ba227ea (diff)
downloadi2c-tools-eff186ba302455501f86ae9c5c923891220f3b82.tar.gz
decode-dimms: Generate HTML 4.01 compliant markup
In HTML output mode, generate HTML 4.01 compliant markup. git-svn-id: http://lm-sensors.org/svn/i2c-tools/trunk@6182 7894878c-1315-0410-8ee3-d5d059ff63e0
-rw-r--r--CHANGES1
-rwxr-xr-xeeprom/decode-dimms13
2 files changed, 8 insertions, 6 deletions
diff --git a/CHANGES b/CHANGES
index af5c633..d163de0 100644
--- a/CHANGES
+++ b/CHANGES
@@ -37,6 +37,7 @@ SVN HEAD
Add support for Load Reduced DIMM (LRDIMM) DDR3 modules
Fully decode the DDR3 SDRAM Device Type field
Encode "degrees" to HTML degree symbol
+ Generate HTML 4.01 compliant markup
i2cdetect: Do a best effort detection if functionality is missing
Clarify the SMBus commands used for probing by default
i2c-dev.h: Minimize differences with kernel flavor
diff --git a/eeprom/decode-dimms b/eeprom/decode-dimms
index 7792cdb..eb7900e 100755
--- a/eeprom/decode-dimms
+++ b/eeprom/decode-dimms
@@ -490,14 +490,16 @@ sub real_printl($$) # print a line w/ label and values
}
}
-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;