From: cuz Date: Sun, 19 Aug 2007 12:54:45 +0000 (+0000) Subject: Applied Magervalps colorization changes with some minor modifications. X-Git-Tag: V2.12.0~68 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=24709a67d7ac60ce161f0b8a463e6862eef8fc13;p=cc65 Applied Magervalps colorization changes with some minor modifications. Colorization is now done by using CSS style sheets, so even colorized pages are valid HTML. git-svn-id: svn://svn.cc65.org/cc65/trunk@3788 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65html/ca65html b/src/ca65html/ca65html index cab0d6f80..9bca799d9 100755 --- a/src/ca65html/ca65html +++ b/src/ca65html/ca65html @@ -180,22 +180,60 @@ sub StripPath { sub DocHeader { my $OUT = shift (@_); my $Asm = shift (@_); - if (not $Colorize) { - # Colorization generates invalid HTML. Common browsers display it - # correctly, but we don't claim it adheres to some standard ... - print $OUT "\n"; - } + print $OUT "\n"; print $OUT <<"EOF"; $Asm + - -


-

$Asm

-


+ +

$Asm

EOF } @@ -208,15 +246,13 @@ sub DocFooter { my $Today = localtime; # Print - print $OUT "


\n"; - print $OUT "


\n"; + print $OUT "
\n"; print $OUT "
\n"; - if (not $Colorize) { - print $OUT "\"Valid\n"; - } + print $OUT "\"Valid"; print $OUT "$Name; generated on $Today by ca65html
\n"; print $OUT "uz@cc65.org\n"; print $OUT "
\n"; + print $OUT "
\n"; print $OUT "\n"; print $OUT "\n"; } @@ -231,7 +267,7 @@ sub DocFooter { sub ColorizeComment { if ($Colorize && $_[0] ne "") { - return "$_[0]"; + return "$_[0]"; } else { return $_[0]; } @@ -241,7 +277,7 @@ sub ColorizeComment { sub ColorizeCtrl { if ($Colorize) { - return "$_[0]"; + return "$_[0]"; } else { return $_[0]; } @@ -251,7 +287,7 @@ sub ColorizeCtrl { sub ColorizeKeyword { if ($Colorize) { - return "$_[0]"; + return "$_[0]"; } else { return $_[0]; } @@ -261,7 +297,7 @@ sub ColorizeKeyword { sub ColorizeString { if ($Colorize) { - return "$_[0]"; + return "$_[0]"; } else { return $_[0]; } @@ -385,7 +421,7 @@ sub Process1 { while ($Line = ) { # Remove the newline - chop ($Line); + chomp ($Line); # Check for a label if ($Line =~ /^\s*(\@?)([_a-zA-Z]\w*)(:(?!=)|\s*:?=)/) { @@ -520,7 +556,7 @@ sub Process2 { $LineNo++; # Remove the newline - chop ($Line); + chomp ($Line); # If requested, convert tabs to spaces if ($CvtTabs) {