[Lxr-commits] CVS: lxr Local.pm,1.10,1.11 diff,1.8,1.9 find,1.7,1.8 ident,1.14,1.15 search,1.9,1.10
Brought to you by:
ajlittoz
|
From: Malcolm B. <mb...@us...> - 2002-03-18 14:55:47
|
Update of /cvsroot/lxr/lxr
In directory usw-pr-cvs1:/tmp/cvs-serv26092
Modified Files:
Local.pm diff find ident search source
Log Message:
Apply patch 530997 from Ville Skyttä to improve the HTML produced.
Index: Local.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/Local.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Local.pm 15 Aug 2001 15:50:26 -0000 1.10
+++ Local.pm 18 Mar 2002 14:55:43 -0000 1.11
@@ -283,15 +283,15 @@
# check if there's a short desc nested inside the long desc. If not, do
# a non-greedy search for a long desc. assume there are no other stray
# spans within the description.
- if ($string =~ /<SPAN CLASS=LXRLONGDESC>(.*?<SPAN CLASS=LXRSHORTDESC>.*?<\/SPAN>.*?)<\/SPAN>/is) {
+ if ($string =~ /<span class=["']?lxrlongdesc['"]?>(.*?<span class=["']?lxrshortdesc['"]?>.*?<\/span>.*?)<\/span>/is) {
$long = $1;
if (!($long =~ /<span.*?\<span/is)) {
- print($long . "<P>\nSEE ALSO: <A HREF=\"README.html\">README</A>\n");
+ print($long . "<p>\nSEE ALSO: <a href=\"README.html\">README</a></p>\n");
}
- } elsif ($string =~ /<SPAN CLASS=LXRLONGDESC>(.*?)<\/SPAN>/is) {
+ } elsif ($string =~ /<span class=["']?lxrlongdesc['"]?>(.*?)<\/span>/is) {
$long = $1;
if (!($long =~ /\<span/is)) {
- print($long . "<P>\nSEE ALSO: <A HREF=\"README.html\">README</A>\n");
+ print($long . "<p>\nSEE ALSO: <a href=\"README.html\">README</a></p>\n");
}
}
}
@@ -397,7 +397,7 @@
$string =~ s/\s*\n$//gs;
chomp($string);
- print($string . "<P>\n");
+ print($string . "<p>\n");
}
}
@@ -411,7 +411,7 @@
$string =~ s/<p>\n\s+o\s/<p>\n\ \;\ \;o /sg;
$string =~ s/\n\s+o\s/ \;\n<br>\ \;\ \;o /sg;
- #find paragraph breaks and replace with <P>
+ #find paragraph breaks and replace with <p>
$string =~ s/\n\s*\n/<p>\n/sg;
return($string);
Index: diff
===================================================================
RCS file: /cvsroot/lxr/lxr/diff,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- diff 16 Oct 2001 20:38:37 -0000 1.8
+++ diff 18 Mar 2002 14:55:43 -0000 1.9
@@ -66,7 +66,7 @@
$vars[$#vars-1] .= " or ".pop(@vars) if $#vars > 0;
- print("<p align=center>\n",
+ print("<p align=\"center\">\n",
"Please indicate the version of the file you wish to\n",
"compare to by clicking on the appropriate\n",
join(", ",@vars)," button.\n",
@@ -75,7 +75,7 @@
}
if ($pathname =~ m|/$|) {
- print("<h3 align=center>Diff not yet supported for directories.</h3>\n");
+ print("<h3 align=\"center\">Diff not yet supported for directories.</h3>\n");
return;
}
@@ -182,14 +182,14 @@
my @orig = split(/\n/, $orig);
my @new = split(/\n/, $new);
- print("<pre class=file>\n");
+ print("<pre class=\"file\">\n");
foreach $i (0..$len) {
my $o = htmlsub($orig[$i], 50);
my $n = $new[$i];
my $diffmark = $chg{$i+1} ?
- ("<span class=diff-mark>" . $chg{$i+1} . "</span>") : " ";
- #print("$o <span class=diff-mark>",
+ ("<span class=\"diff-mark\">" . $chg{$i+1} . "</span>") : " ";
+ #print("$o <span class=\"diff-mark\">",
# ($chg{$i+1} || " "), "</span> $n\n");
print "$o $diffmark $n\n";
}
Index: find
===================================================================
RCS file: /cvsroot/lxr/lxr/find,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- find 3 Feb 2002 05:31:32 -0000 1.7
+++ find 18 Mar 2002 14:55:43 -0000 1.8
@@ -32,23 +32,23 @@
sub find {
- print("<P ALIGN=CENTER>\n",
+ print("<p align=\"center\">\n",
"Search for files (by name) using regular expressions.\n",
- "<BR>(Need some <A HREF=\"search-help.html\">Hints</A> ",
- "on performing searches?)\n");
+ "<br>(Need some <a href=\"search-help.html\">Hints</a> ",
+ "on performing searches?)</p>\n");
- print ("<form method=get action=\"find\">\n");
+ print ("<form method=\"get\" action=\"find\">\n");
foreach ($config->allvariables) {
if ($config->variable($_) ne $config->vardefault($_)) {
- print("<input type=hidden name=\"",$_, "\" ",
+ print("<input type=\"hidden\" name=\"",$_, "\" ",
"value=\"", $config->variable($_), "\">\n");
}
}
- print("<B>Find file: </B><input type=text name=\"string\" ",
- "value=\"",$searchtext,"\" size=50>\n",
- "<input type=submit value=\"search\">\n",
+ print("<b>Find file: </b><input type=\"text\" name=\"string\" ",
+ "value=\"",$searchtext,"\" size=\"50\">\n",
+ "<input type=\"submit\" value=\"search\">\n",
"</form>\n");
Index: ident
===================================================================
RCS file: /cvsroot/lxr/lxr/ident,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- ident 7 Mar 2002 15:44:31 -0000 1.14
+++ ident 18 Mar 2002 14:55:43 -0000 1.15
@@ -36,8 +36,8 @@
my $ret = '';
foreach ($config->allvariables) {
if ($config->variable($_) ne $config->vardefault($_)) {
- $ret .= "<input type=hidden name='$_' value='" .
- $config->variable($_) . "'>\n";
+ $ret .= "<input type=\"hidden\" name=\"$_\" value=\"" .
+ $config->variable($_) . "\">\n";
}
}
return $ret;
@@ -65,7 +65,7 @@
}
));
-# print("<span class=search-li1> $type_names{$type} in ".
+# print("<span class=\"search-li1\"> $type_names{$type} in ".
# fileref("$file, line $line", "search-decl",
# $file, $line).
# " $rel</span>\n");
Index: search
===================================================================
RCS file: /cvsroot/lxr/lxr/search,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- search 3 Feb 2002 05:31:32 -0000 1.9
+++ search 18 Mar 2002 14:55:43 -0000 1.10
@@ -139,21 +139,21 @@
sub search {
- print("<p align=center>\n",
- "<form method=get action=\"search\">\n");
+ print("<p align=\"center\">\n",
+ "<form method=\"get\" action=\"search\">\n");
foreach ($config->allvariables) {
if ($config->variable($_) ne $config->vardefault($_)) {
- print("<input type=hidden name=\"",$_, "\" ",
+ print("<input type=\"hidden\" name=\"",$_, "\" ",
"value=\"", $config->variable($_), "\">\n");
}
}
my $searchtext = $HTTP->{'param'}->{'string'};
- print("<B>Search for: </B><input type=text name=\"string\" ",
- "value=\"",$searchtext,"\" size=50>\n",
- "<input type=submit value=\"search\">\n",
+ print("<b>Search for: </b><input type=\"text\" name=\"string\" ",
+ "value=\"",$searchtext,"\" size=\"50\">\n",
+ "<input type=\"submit\" value=\"search\">\n",
"</form>\n");
$| = 1; print('');
Index: source
===================================================================
RCS file: /cvsroot/lxr/lxr/source,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- source 23 Oct 2001 15:23:50 -0000 1.30
+++ source 18 Mar 2002 14:55:43 -0000 1.31
@@ -42,7 +42,7 @@
$img = "internal-gopher-menu";
}
- return fileref("<img align=bottom border=0 src=\"$img\" alt=\"folder\">", "",
+ return fileref("<img align=\"bottom\" border=\"0\" src=\"$img\" alt=\"folder\">", "",
$dir.$node);
}
@@ -73,8 +73,8 @@
# $img = "/icons/text.gif";
$img = "internal-gopher-unknown";
}
- return fileref("<img align=bottom border=0 src=\"$img\">", "",
- $dir.$node);
+ return fileref("<img align=\"bottom\" border=\"0\" src=\"$img\" alt=\"\">",
+ "", $dir.$node);
}
sub filename {
@@ -151,7 +151,7 @@
@nodes = $files->getdir($dir, $release);
unless (@nodes) {
- print("<p align=center>\n<i>The directory ".
+ print("<p align=\"center\">\n<i>The directory ".
$files->toreal($dir, $release).
" does not exist.</i>\n");
#FIXME what does this do?
@@ -266,14 +266,14 @@
$l =~ s/(\n)/$1.shift(@ann)/ge;
print $l;
};
- &$outfun("<pre class=file>\n");
+ &$outfun("<pre class=\"file\">\n");
markupfile($fileh, $outfun);
&$outfun("</pre>\n");
}
}
else {
- print("\<p align=center>\n<i>The file $pathname does not exist.</i>\n");
+ print("\<p align=\"center\">\n<i>The file $pathname does not exist.</i>\n");
if (-f $files->toreal($pathname, $release)) {
warning("Unable to open ".$files->toreal($pathname, $release));
}
@@ -286,7 +286,7 @@
if ($config->filter && $pathname !~ $config->filter) {
makeheader('source');
- print("\<p align=center>\n<i>The file $pathname does not exist.</i>\n");
+ print("\<p align=\"center\">\n<i>The file $pathname does not exist.</i>\n");
makefooter('source');
exit;
}
|