[llvm-commits] CVS: llvm/test/Programs/GenerateReport.pl
Chris Lattner
lattner at cs.uiuc.edu
Wed Jan 22 15:13:01 PST 2003
Changes in directory llvm/test/Programs:
GenerateReport.pl updated: 1.6 -> 1.7
---
Log message:
Add grid lines to table
---
Diffs of the changes:
Index: llvm/test/Programs/GenerateReport.pl
diff -u llvm/test/Programs/GenerateReport.pl:1.6 llvm/test/Programs/GenerateReport.pl:1.7
--- llvm/test/Programs/GenerateReport.pl:1.6 Tue Jan 21 16:31:30 2003
+++ llvm/test/Programs/GenerateReport.pl Wed Jan 22 15:11:58 2003
@@ -133,22 +133,29 @@
print "<td><table border='0' cellspacing='0' cellpadding='3'><tr><td>$Str</td></tr></table></td>\n";
}; "";
}
+ sub printLine {
+ print "<td bgcolor='" . ($_[0] ? "#DDDDDD" : "#AAAAAA") . "' width=1>\n";
+ }
print "<table border='0' cellspacing='0' cellpadding='0'>\n";
print "<tr bgcolor=#FFCC99>\n";
- map { $_ = "<b><a href=\"#$_\">$_</a></b>" if $_ ne "|"; printCell $_ } @Header;
+ map {
+ print "<td bgcolor='#DDAA77' width='1'></td>";
+ $_ = "<b><a href=\"#$_\">$_</a></b>"
+ if $_ ne "|"; printCell $_
+ } @Header;
+ print "<td bgcolor='#DDAA77' width='1'></td>";
print "\n</tr><tr bgcolor='black'>";
- print "<td height=1></td>" x @Header;
+ print "<td height=1></td>" x (2*@Header+1);
print "</tr>\n";
my $RowCount = 0;
foreach $Row (@Values) {
- if (++$RowCount <= 2) {
- print "<tr bgcolor='white'>\n";
- } else {
- print "<tr bgcolor='#CCCCCC'>\n";
- $RowCount = 0 if ($RowCount > 3);
- }
- map { printCell $_ } @$Row;
+ my $IsWhite;
+ $IsWhite = ++$RowCount <= 2;
+ print "<tr bgcolor='" . ($IsWhite ? "white" : "#CCCCCC") . "'>\n";
+ $RowCount = 0 if ($RowCount > 3);
+ map { printLine($IsWhite); printCell $_ } @$Row;
+ printLine($IsWhite);
print "\n</tr>\n";
}
print "\n</table>\n";
@@ -167,7 +174,6 @@
}
}
}
-
#
# Print out the table now...
More information about the llvm-commits
mailing list