lxr-commits Mailing List for LXR Cross Referencer (Page 26)
Brought to you by:
ajlittoz
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(11) |
Sep
(13) |
Oct
(11) |
Nov
(19) |
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(11) |
Feb
(14) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
(8) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2003 |
Jan
|
Feb
|
Mar
(10) |
Apr
|
May
(2) |
Jun
(4) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
(26) |
Jul
(83) |
Aug
(4) |
Sep
(4) |
Oct
(9) |
Nov
|
Dec
(17) |
| 2005 |
Jan
(1) |
Feb
(71) |
Mar
(1) |
Apr
(3) |
May
(9) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
(1) |
Nov
(6) |
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
(35) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(12) |
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2009 |
Jan
|
Feb
|
Mar
(30) |
Apr
(55) |
May
(28) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(5) |
| 2013 |
Jan
(35) |
Feb
|
Mar
(7) |
Apr
(12) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(1) |
Sep
(32) |
Oct
|
Nov
(45) |
Dec
(18) |
| 2014 |
Jan
(9) |
Feb
|
Mar
(10) |
Apr
(2) |
May
(4) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(7) |
Nov
(4) |
Dec
|
|
From: Malcolm B. <mb...@us...> - 2002-07-29 01:17:35
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory usw-pr-cvs1:/tmp/cvs-serv3997/lib/LXR Modified Files: Common.pm Log Message: Applied patch [ 571608 ] Adding Glimpse Indexing into genxref from andrewbeck. Also updated to use 'glimpsedir' to store the glimpse database files - example now in lxr.conf Index: Common.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- Common.pm 29 Jul 2002 00:50:32 -0000 1.42 +++ Common.pm 29 Jul 2002 01:17:32 -0000 1.43 @@ -488,7 +488,6 @@ # sourcedirhead - Corresponds to the configig options # sourcehead - # htmldir - -# dbdir - # sourceroot - # htmlhead - # incprefix - |
|
From: Malcolm B. <mb...@us...> - 2002-07-29 01:06:05
|
Update of /cvsroot/lxr/lxr
In directory usw-pr-cvs1:/tmp/cvs-serv1782
Modified Files:
initdb-mysql
Log Message:
Fix error message if db doesn't exist. Patch from MK - #570826
Index: initdb-mysql
===================================================================
RCS file: /cvsroot/lxr/lxr/initdb-mysql,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- initdb-mysql 18 Nov 2001 03:31:33 -0000 1.7
+++ initdb-mysql 29 Jul 2002 01:06:02 -0000 1.8
@@ -1,7 +1,7 @@
/* Read this into mysql with "\. initdb-mysql" when logged in as root
to delete the old lxr database and create a new */
-drop database lxr;
+drop if exists database lxr;
create database lxr;
use lxr;
|
|
From: Malcolm B. <mb...@us...> - 2002-07-29 01:03:46
|
Update of /cvsroot/lxr/lxr In directory usw-pr-cvs1:/tmp/cvs-serv1283 Modified Files: INSTALL Log Message: Apply patch from magsilva to correct documentation. Index: INSTALL =================================================================== RCS file: /cvsroot/lxr/lxr/INSTALL,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- INSTALL 26 Feb 2002 16:18:46 -0000 1.7 +++ INSTALL 29 Jul 2002 01:03:41 -0000 1.8 @@ -59,7 +59,10 @@ Now you have to put the perl modules that LXR uses into a directory on your system that will be searched by mod_perl when the LXR scripts are -executed. Execute +executed. Execute: + + cp /usr/local/lxr/Local.pm /usr/lib/perl5/site_perl/ + cp -r /usr/local/lxr/lib/LXR /usr/lib/perl5/site_perl Now you should copy the template files for LXR to your installation |
|
From: Malcolm B. <mb...@us...> - 2002-07-29 00:58:45
|
Update of /cvsroot/lxr/lxr/lib/LXR/Lang
In directory usw-pr-cvs1:/tmp/cvs-serv32508
Modified Files:
Generic.pm
Log Message:
Fix from bug 523647 from David Houlder.
Index: Generic.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/Generic.pm,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- Generic.pm 26 Feb 2002 15:56:23 -0000 1.11
+++ Generic.pm 29 Jul 2002 00:58:42 -0000 1.12
@@ -179,7 +179,7 @@
my $ls;
while (defined($frag)) {
- @lines = ($frag =~ /(.*?\n)/g, $frag =~ /[^\n]*$/);
+ @lines = ($frag =~ /(.*?\n)/g, $frag =~ /([^\n]*)$/);
if (defined($btype)) {
if ($btype eq 'comment' or $btype eq 'string' or $btype eq 'include') {
|
|
From: Malcolm B. <mb...@us...> - 2002-07-29 00:50:35
|
Update of /cvsroot/lxr/lxr/lib/LXR
In directory usw-pr-cvs1:/tmp/cvs-serv30984
Modified Files:
Common.pm
Log Message:
Fix for bug 554063 - add a title for sourcedir pages
Index: Common.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- Common.pm 18 Mar 2002 14:55:43 -0000 1.41
+++ Common.pm 29 Jul 2002 00:50:32 -0000 1.42
@@ -608,7 +608,7 @@
sub titleexpand {
my ($templ, $who) = @_;
- if ($who eq 'source' || $who eq 'diff') {
+ if ($who eq 'source' || $who eq 'diff' || $who eq 'sourcedir') {
return $config->sourcerootname.$pathname;
}
elsif ($who eq 'ident') {
|
|
From: Malcolm B. <mb...@us...> - 2002-03-18 14:55:48
|
Update of /cvsroot/lxr/lxr/templates
In directory usw-pr-cvs1:/tmp/cvs-serv26092/templates
Modified Files:
html-dir.html html-head.html html-ident.html html-search.html
html-tail.html
Log Message:
Apply patch 530997 from Ville Skyttä to improve the HTML produced.
Index: html-dir.html
===================================================================
RCS file: /cvsroot/lxr/lxr/templates/html-dir.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- html-dir.html 27 Sep 2001 16:12:21 -0000 1.2
+++ html-dir.html 18 Mar 2002 14:55:43 -0000 1.3
@@ -1,17 +1,17 @@
-<table border=0 cellspacing=0 width="100%">
- <tr valign=middle>
+<table border="0" cellspacing="0" width="100%">
+ <tr valign="middle">
<th class='dirheader' width="1%"> </th>
- <th class='dirheader' width="1%" nowrap align=left>Name</th>
- <th class='dirheader' width="1%" nowrap align=right>Size</th>
- <th class='dirheader' width="1%" nowrap align=left>Date (GMT)</th>
- <th class='dirheader' width="96%" nowrap align=left>Description</TH>
+ <th class='dirheader' width="1%" nowrap="nowrap" align="left">Name</th>
+ <th class='dirheader' width="1%" nowrap="nowrap" align="right">Size</th>
+ <th class='dirheader' width="1%" nowrap="nowrap" align="left">Date (GMT)</th>
+ <th class='dirheader' width="96%" nowrap="nowrap" align="left">Description</th>
</tr>
$files{
- <tr valign=middle class="$css">
- <td nowrap>$iconlink</td>
- <td nowrap>$namelink</td>
- <td nowrap align=right>$filesize{$bytes bytes} </td>
- <td nowrap align=right>$modtime </td>
+ <tr valign="middle" class="$css">
+ <td nowrap="nowrap">$iconlink</td>
+ <td nowrap="nowrap">$namelink</td>
+ <td nowrap="nowrap" align="right">$filesize{$bytes bytes} </td>
+ <td nowrap="nowrap" align="right">$modtime </td>
<td>$description{<i>$desctext</i>}</td>
</tr>}
</table>
Index: html-head.html
===================================================================
RCS file: /cvsroot/lxr/lxr/templates/html-head.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- html-head.html 17 Nov 2001 03:48:25 -0000 1.4
+++ html-head.html 18 Mar 2002 14:55:43 -0000 1.5
@@ -1,8 +1,8 @@
-<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>$title</title>
-<base href="$baseurl" >
+<base href="$baseurl">
<link href="$stylesheet" rel="STYLESHEET" type="text/css">
</head>
@@ -11,17 +11,17 @@
<tr>
<td rowspan='3'>
<img src="pengmini.gif"
- alt="Penguin" border=0 width=67 height=92 align=middle>
+ alt="Penguin" border="0" width="67" height="92" align="middle">
</td>
<td>
<table width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr>
<td align='center'>
- <a href="blurb.html" class=main>The LXR Cross Referencer</a>
+ <a href="blurb.html" class="main">The LXR Cross Referencer</a>
</td>
</tr>
<tr>
- <td align=center>$banner</td>
+ <td align="center">$banner</td>
</tr>
</table>
<td>
@@ -33,13 +33,13 @@
<tr><td colspan='3'> </td></tr>
<tr>
<td colspan='3'>
- <table width="100%" border=0 cellpadding='0' cellspacing='0'>
+ <table width="100%" border="0" cellpadding='0' cellspacing='0'>
$variables{
<tr>
- <td align=left>
+ <td align="left">
$varname:
</td>
- <td align=right>
+ <td align="right">
$varlinks{
[ $varvalue ]}
<br>
Index: html-ident.html
===================================================================
RCS file: /cvsroot/lxr/lxr/templates/html-ident.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- html-ident.html 18 Nov 2001 03:31:34 -0000 1.2
+++ html-ident.html 18 Mar 2002 14:55:43 -0000 1.3
@@ -4,16 +4,16 @@
<p>
Matches are case-sensitive.
-<form method=get action="ident">
+<form method="get" action="ident">
$variables
<b>Identifier: </b>
-<input type=text name="i" value='$identifier' size="15">
-<input type=submit value="Find">
+<input type="text" name="i" value='$identifier' size="15">
+<input type="submit" value="Find">
</form>
-<span class=search-ident>$identifier</span>
+<span class="search-ident">$identifier</span>
<p>
<table>
<tr><td colspan='2'><b>Declarations:</b></td></tr>
Index: html-search.html
===================================================================
RCS file: /cvsroot/lxr/lxr/templates/html-search.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- html-search.html 4 Aug 2001 18:54:15 -0000 1.1
+++ html-search.html 18 Mar 2002 14:55:43 -0000 1.2
@@ -1,33 +1,41 @@
-<div align=center>
- This searchpage is powered by <a href="http://glimpse.cs.arizona.edu">Glimpse</a>
+<div align="center">
+ This searchpage is powered by <a href="http://www.webglimpse.org/">Glimpse</a>
- <form method=get action="http:search">
+ <form method="get" action="http:search">
$variables{<input type="hidden" name="$variable" value="$value">}
- <table border=1 cellpadding=5 rules=none>
+ <table border="1" cellpadding="5" rules="none">
<tr>
- <td colspan=3>
+ <td colspan="3">
String to search for: <br>
- <input type=text name="string" value="$searchtext" size=60>
- <input type=submit value="Search">
-
- <tr border=0>
- <td align=center>
+ <input type="text" name="string" value="$searchtext" size="60">
+ <input type="submit" value="Search">
+ </td>
+ </tr>
+ <tr border="0">
+ <td align="center">
$casecheck Case sensitive
- <td align=center>
+ </td>
+ <td align="center">
$regexpcheck Regular expression
- <td align=center>
+ </td>
+ <td align="center">
$errorselect
Misspellings allowed
-
+ </td>
+ </tr>
<tr>
- <td colspan=3 align=center>
+ <td colspan="3" align="center">
Maximum number of files returned:
$maxfilesselect
+ </td>
+ </tr>
<tr>
- <td colspan=3 align=center>
+ <td colspan="3" align="center">
Maximum number of matches per file returned:
$maxlinesselect
+ </td>
+ </tr>
</table>
</form>
Index: html-tail.html
===================================================================
RCS file: /cvsroot/lxr/lxr/templates/html-tail.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- html-tail.html 23 Oct 2001 14:05:16 -0000 1.2
+++ html-tail.html 18 Mar 2002 14:55:43 -0000 1.3
@@ -1,27 +1,26 @@
<hr>
-<table width="100%" cellpadding=0 border=0>
- <tr valign=middle>
+<table width="100%" cellpadding="0" border="0">
+ <tr valign="middle">
$modes{
- <td align=center nowrap>
+ <td align="center" nowrap="nowrap">
[ $modelink ]</td>}
</tr>
</table>
<hr>
-<table width="100%" cellpadding=0 border=0>
+<table width="100%" cellpadding="0" border="0">
<tr>
- <td align=left>
+ <td align="left">
This page was automatically generated by the
- <a href="http://lxr.sf.net">LXR engine</a>.
+ <a href="http://lxr.sf.net/">LXR engine</a>.
<address>
<a href="mailto:lxr...@li...">
The LXR team</a>
</address>
</td>
- <td align=right>
- <a href="http://validator.w3.org/check/referer">
- <img src="http://www.w3c.org/Icons/valid-html401.png" border=0
- alt="Valid HTML 4.01" height="31" width="88">
- </a>
+ <td align="right">
+ <a href="http://validator.w3.org/check/referer"><img border="0"
+ src="http://www.w3.org/Icons/valid-html401"
+ alt="Valid HTML 4.01!" height="31" width="88"></a>
</td>
</tr>
</table>
@@ -33,3 +32,4 @@
</table>
</body>
+</html>
|
|
From: Malcolm B. <mb...@us...> - 2002-03-18 14:55:48
|
Update of /cvsroot/lxr/lxr/lib/LXR/Lang
In directory usw-pr-cvs1:/tmp/cvs-serv26092/lib/LXR/Lang
Modified Files:
Perl.pm
Log Message:
Apply patch 530997 from Ville Skyttä to improve the HTML produced.
Index: Perl.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/Perl.pm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Perl.pm 27 Sep 2001 16:12:20 -0000 1.4
+++ Perl.pm 18 Mar 2002 14:55:43 -0000 1.5
@@ -98,14 +98,14 @@
$$comm = join('', map {
if (/^=head(\d)\s*(.*)/s) {
- "<span class=pod><font size=\"+".(4-$1)."\">$2<\/font></span>";
+ "<span class=\"pod\"><font size=\"+".(4-$1)."\">$2<\/font></span>";
}
elsif (/^=item\s*(.*)/s) {
- "<span class=podhead>* $1 ".
+ "<span class=\"podhead\">* $1 ".
("-" x (67 - length($1)))."<\/span>";
}
elsif (/^=(pod|cut)/s) {
- "<span class=podhead>".
+ "<span class=\"podhead\">".
("-" x 70)."<\/span>";
}
elsif (/^=.*/s) {
@@ -113,10 +113,10 @@
}
else {
if (/^\s/s) { # Verbatim paragraph
- s|^(.*)$|<span class=pod><code>$1</code></span>|gm;
+ s|^(.*)$|<span class="pod"><code>$1</code></span>|gm;
}
else { # Normal paragraph
- s|^(.*)$|<span class=pod>$1</span>|gm;
+ s|^(.*)$|<span class="pod">$1</span>|gm;
s/C\0\<(.*?)\0\>/<code>$1<\/code>/g;
}
$_;
|
|
From: Malcolm B. <mb...@us...> - 2002-03-18 14:55:47
|
Update of /cvsroot/lxr/lxr/lib/LXR
In directory usw-pr-cvs1:/tmp/cvs-serv26092/lib/LXR
Modified Files:
Common.pm Lang.pm
Log Message:
Apply patch 530997 from Ville Skyttä to improve the HTML produced.
Index: Common.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- Common.pm 18 Mar 2002 14:44:23 -0000 1.40
+++ Common.pm 18 Mar 2002 14:55:43 -0000 1.41
@@ -289,7 +289,7 @@
my ($btype, $frag) = &LXR::SimpleParse::nextfrag;
- #&$outfun("<pre class=file>\n");
+ #&$outfun("<pre class=\"file\">\n");
&$outfun(join($line++, @ltag)) if defined($frag);
while (defined($frag)) {
@@ -327,7 +327,7 @@
#&$outfun("</pre>");
}
elsif ($pathname =~ /$config->graphicfile/) {
- &$outfun("<ul><table><tr><th valign=center><b>Image: </b></th>");
+ &$outfun("<ul><table><tr><th valign=\"center\"><b>Image: </b></th>");
&$outfun("<img src=\"$config->{virtroot}/source".
$pathname.&urlargs("raw=1").
"\" border=\"0\" alt=\"$pathname\">\n");
@@ -367,7 +367,7 @@
}
else {
- #&$outfun("<pre class=file>\n");
+ #&$outfun("<pre class=\"file\">\n");
do {
&LXR::SimpleParse::untabify($_);
&markspecials($_);
@@ -585,7 +585,7 @@
$fpath .= $_;
# jwz: put a space after each / in the banner so that it's
- # possible for the pathnames to wrap. The <WBR> tag ought
+ # possible for the pathnames to wrap. The <wbr> tag ought
# to do this, but it is ignored when sizing table cells,
# so we have to use a real space. It's somewhat ugly to
# have these spaces be visible, but not as ugly as getting
@@ -594,7 +594,7 @@
}
$furl =~ s|/</a>|</a>/|gi;
- return "<span class=banner>$furl</span>";
+ return "<span class=\"banner\">$furl</span>";
}
else {
return '';
@@ -685,7 +685,7 @@
push(@mlist, "<span class='modes-sel'>freetext search</span>");
}
else {
- push(@mlist, "<a class=modes ".
+ push(@mlist, "<a class=\"modes\" ".
"href=\"$config->{virtroot}/search".
urlargs."\">freetext search</a>");
}
@@ -694,7 +694,7 @@
push(@mlist, "<span class='modes-sel'>file search</span>");
}
else {
- push(@mlist, "<a class='modes'".
+ push(@mlist, "<a class='modes' ".
"href=\"$config->{virtroot}/find".
urlargs."\">file search</a>");
}
@@ -719,7 +719,7 @@
$oldval = $config->variable($var);
foreach $val ($config->varrange($var)) {
if ($val eq $oldval) {
- $vallink = "<span class=var-sel>$val</span>";
+ $vallink = "<span class=\"var-sel\">$val</span>";
}
else {
if ($who eq 'source' || $who eq 'sourcedir') {
@@ -737,13 +737,13 @@
$vallink = &idref($val, "varlink", $identifier, "$var=$val");
}
elsif ($who eq 'search') {
- $vallink = "<a class=varlink href=\"$config->{virtroot}/search".
+ $vallink = "<a class=\"varlink\" href=\"$config->{virtroot}/search".
&urlargs("$var=$val",
"string=".$HTTP->{'param'}->{'string'}).
"\">$val</a>";
}
elsif ($who eq 'find') {
- $vallink = "<a class=varlink href=\"$config->{virtroot}/find".
+ $vallink = "<a class=\"varlink\" href=\"$config->{virtroot}/find".
&urlargs("$var=$val",
"string=".$HTTP->{'param'}->{'string'}).
"\">$val</a>";
Index: Lang.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- Lang.pm 5 Feb 2002 10:34:43 -0000 1.28
+++ Lang.pm 18 Mar 2002 14:55:43 -0000 1.29
@@ -81,8 +81,8 @@
sub processcomment {
my ($self, $frag) = @_;
- $$frag = "<span class='comment'>$$frag</span>";
- $$frag =~ s#\n#</span>\n<span class=comment>#g;
+ $$frag = "<span class=\"comment\">$$frag</span>";
+ $$frag =~ s#\n#</span>\n<span class=\"comment\">#g;
}
sub referencefile {
|
|
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;
}
|
|
From: Malcolm B. <mb...@us...> - 2002-03-18 14:44:27
|
Update of /cvsroot/lxr/lxr/lib/LXR
In directory usw-pr-cvs1:/tmp/cvs-serv20680
Modified Files:
Common.pm
Log Message:
Check that a configuration is found, otherwise produce a fatal error
Index: Common.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- Common.pm 26 Feb 2002 16:07:06 -0000 1.39
+++ Common.pm 18 Mar 2002 14:44:23 -0000 1.40
@@ -446,6 +446,7 @@
}
if ($HTTP->{'param'}->{'raw'}) {
+ #FIXME - need more types here
my %type = ('gif' => 'image/gif',
'html' => 'text/html');
@@ -518,9 +519,12 @@
$identifier = $HTTP->{'param'}->{'i'};
$config = new LXR::Config($HTTP->{'this_url'});
+ die "Can't find config for ".$HTTP->{'this_url'} if !defined($config);
$files = new LXR::Files($config->sourceroot);
+ die "Can't create Files for ".$config->sourceroot if !defined($files);
$index = new LXR::Index($config->dbname);
-
+ die "Can't create Index for ".$config->dbname if !defined($index);
+
foreach ($config->allvariables) {
$config->variable($_, $HTTP->{'param'}->{$_}) if $HTTP->{'param'}->{$_};
}
|
|
From: Malcolm B. <mb...@us...> - 2002-03-18 14:18:22
|
Update of /cvsroot/lxr/lxr
In directory usw-pr-cvs1:/tmp/cvs-serv9167
Modified Files:
genxref
Log Message:
Add error checking to initialisation
Index: genxref
===================================================================
RCS file: /cvsroot/lxr/lxr/genxref,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- genxref 23 Jan 2002 15:52:51 -0000 1.25
+++ genxref 18 Mar 2002 14:18:19 -0000 1.26
@@ -66,7 +66,9 @@
die("No matching configuration") unless $config->sourceroot;
$files = new LXR::Files($config->sourceroot);
+die "Can't create file access object ".$config->sourceroot if !defined($files);
$index = new LXR::Index($config->dbname, O_RDWR|O_CREAT);
+die "Can't create Index ".$config->dbname if !defined($index);
my @versions;
|
|
From: Malcolm B. <mb...@us...> - 2002-03-07 15:44:35
|
Update of /cvsroot/lxr/lxr
In directory usw-pr-cvs1:/tmp/cvs-serv16133
Modified Files:
ident
Log Message:
Implement separate templates for the declarations and the references in the
ident display.
This helps speed up getting the results to the client browser, since the
declarations can be sent before the references query is completed.
Fixes bug 526807
Index: ident
===================================================================
RCS file: /cvsroot/lxr/lxr/ident,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- ident 20 Nov 2001 15:34:00 -0000 1.13
+++ ident 7 Mar 2002 15:44:31 -0000 1.14
@@ -97,31 +97,47 @@
sub printident {
my $dir = shift;
- my $templ;
+ my ($templ, $templ_refs);
#$templ = "<ul>\n\$files{\n<li>\$iconlink \$namelink\n}</ul>\n";
if ($config->htmlident) {
- unless (open(TEMPL, $config->htmlident)) {
- warning("Template ".$config->htmlident." does not exist.");
- } else {
- local($/) = undef;
- $templ = <TEMPL>;
- close(TEMPL);
+ unless (open(TEMPL, $config->htmlident)) {
+ warning("Template ".$config->htmlident." does not exist.");
+ } else {
+ local($/) = undef;
+ $templ = <TEMPL>;
+ close(TEMPL);
+ }
+ } else {
+ die "Ident template not configured";
}
- }
+
+
+ if ($config->htmlident_refs) {
+ unless (open(TEMPL, $config->htmlident_refs)) {
+ warning("Template ".$config->htmlident_refs." does not exist.");
+ } else {
+ local($/) = undef;
+ $templ_refs = <TEMPL>;
+ close(TEMPL);
+ }
+ } else {
+ die "Ident refs template not configured";
+ }
+
# print the description of the current directory
#dirdesc($dir);
# print the listing itself
print(expandtemplate($templ,
- (test => sub { "testik" },
- variables => \&varinputs,
- identifier => sub { return $identifier },
- refs => sub { refexpand(@_) },
- uses => sub { usesexpand(@_) },
- )
- ));
+ (variables => \&varinputs,
+ identifier => sub { return $identifier },
+ refs => sub { refexpand(@_) },
+ )));
+ print(expandtemplate($templ_refs,
+ (uses => sub { usesexpand(@_) },
+ )));
}
|
|
From: Malcolm B. <mb...@us...> - 2002-03-07 15:44:35
|
Update of /cvsroot/lxr/lxr/templates
In directory usw-pr-cvs1:/tmp/cvs-serv16133/templates
Modified Files:
lxr.conf
Added Files:
html-ident-refs.html
Log Message:
Implement separate templates for the declarations and the references in the
ident display.
This helps speed up getting the results to the client browser, since the
declarations can be sent before the references query is completed.
Fixes bug 526807
--- NEW FILE: html-ident-refs.html ---
<p>
<table>
<tr><td colspan='2'><b>References:</b></td></tr>
$uses{<tr>
<td width='30'> </td><td>$fileref</td>
</tr>}
</table>
Index: lxr.conf
===================================================================
RCS file: /cvsroot/lxr/lxr/templates/lxr.conf,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- lxr.conf 26 Feb 2002 16:18:47 -0000 1.10
+++ lxr.conf 7 Mar 2002 15:44:32 -0000 1.11
@@ -68,8 +68,9 @@
# Templates used for headers and footers
'htmlhead' => 'html-head.html',
'htmltail' => 'html-tail.html',
- 'htmldir' => 'html-dir.html',
- 'htmlident' => 'html-ident.html',
+ 'htmldir' => 'html-dir.html',
+ 'htmlident' => 'html-ident.html',
+ 'htmlident_refs' => 'html-ident-refs.html',
'sourcehead' => 'html-head.html',
'sourcedirhead' => 'html-head.html',
|
|
From: Malcolm B. <mb...@us...> - 2002-03-04 15:11:30
|
Update of /cvsroot/lxr/lxr/tests In directory usw-pr-cvs1:/tmp/cvs-serv19986 Added Files: AllTests.pm ConfigTest.pm lxr.conf test-versions Log Message: Add automatic test framework and first tests to LXR. This depends on the Test::Unit suite from http://sf.net/projects/perlunit for the basic framework. Currently an "AllTests" module is defined that should run all the tests currently available, as well as a ConfigTest module that makes a start on testing the LXR::Config.pm module. Additional tests are planned and this should grow into a complete, easy to run and maintain test suite that lets us catch regressions. In future I plan to add a test to this suite for each bug reported, before fixing it. This (a) proves the bug exists and (b) makes it easy to see when it has been fixed. And it catches regressions when bugs come back. To use this, you will need to: 1) Install Class::Inner from CPAN 2) Install Error from CPAN 3) Download the latest CVS version of Test::Unit from the URL above 4) Build and install Test::Unit from the CVS sources --- NEW FILE: AllTests.pm --- package AllTests; use ConfigTest; use Test::Unit::TestRunner; use Test::Unit::TestSuite; sub new { my $class = shift; return bless {}, $class; } sub suite { my $class = shift; my $suite = Test::Unit::TestSuite->empty_new("LXR Tests"); $suite->add_test(Test::Unit::TestSuite->new("ConfigTest")); return $suite; } 1; --- NEW FILE: ConfigTest.pm --- # Test cases for the LXR::Config module # Uses the associated lxr.conf file package ConfigTest; use strict; use Test::Unit; use lib ".."; use lib "../lib"; use LXR::Config; use base qw(Test::Unit::TestCase); sub new { my $self = shift()->SUPER::new(@_); $self->{config} = 0; return $self; } # define tests # test that the config object was created successfully sub test_creation { my $self = shift; $self->assert(defined($self->{config}), "Config init failed"); } # Access some of the values to check what is found sub test_access { my $self = shift; $self->assert($self->{config}->swishindex eq '/test/lxr/bin/swish-e', "swishindex read failed"); $self->assert($self->{config}->baseurl eq 'http://test/lxr', "Config accessed wrong baseurl"); } # test access to the variables section sub test_variables { my $self = shift; $self->assert($self->{config}->variable('v') == '1.0.6', "Variable default not correct"); $self->assert(($self->{config}->varrange('v'))[1] =~ /hi hippy/, "Variable value missing"); } sub test_allvariables { my $self = shift; my @vars = $self->{config}->allvariables(); $self->assert(grep {$_ eq 'v'} @vars, "allvariables didn't return v"); $self->assert(grep {$_ eq 'a'} @vars, "allvariables didn't return a"); $self->assert($#vars == 2, "Too many variables returned"); } # set_up and tear_down are used to # prepare and release resources need for testing # Prepare a config object sub set_up { my $self = shift; $self->{config} = new LXR::Config("http://test/lxr", "./lxr.conf"); } sub tear_down { my $self = shift; $self->{config} = undef; } 1; --- NEW FILE: lxr.conf --- # -*- mode: perl -*- # Configuration file for Test suite # ( { # Global configuration # Path to glimpse executable. # Define this OR the swish-e variables depending which search engine you want to use. 'glimpsebin' => '/test/lxr/bin/glimpse', # Location of SWISH-E indexer binary 'swishindex' => '/test/lxr/bin/swish-e', # Location of SWISH-E search binary 'swishsearch' => '/test/lxr/bin/swish-e', # Path to Exuberant Ctags executable 'ectagsbin' => '/test/lxr/bin/ctags', # Place where lxr can write temporary files 'tmpdir' => '/tmp', # Location of the Generic.pm config file 'genericconf' => '../lib/LXR/Lang/generic.conf' }, { # Configuration for http://192.168.1.3/lxr. # baseurl is used to select configuration block. 'baseurl' => 'http://test/lxr', # Put your URL here 'virtroot' => '/lxr', # The bit after the / above 'variables' => { # Define typed variable "v". This is the list of versions to index. 'v' => {'name' => 'Version', # This can come from a file, a function or be explicitly # ennumerated. # From a file: 'range' => [ readfile('test-versions') ], # Explicitly: # 'range' => [qw(v1 v2 v3.1 v4 experimental)], # If files within a tree can have different versions, # e.g in a CVS tree, 'range' can be specified as a # function to call for each file: #'range' => sub { return # ($files->allreleases($LXR::Common::pathname), # $files->allrevisions($LXR::Common::pathname)) # }, # deferred function call. # The default version to display 'default' => '1.0.6'}, # Define typed variable "a". First value is default. 'a' => {'name' => 'Architecture', 'range' => [qw(i386 alpha arm m68k mips ppc sparc sparc64)]}, }, # These do funky things to paths in the system - you probably don't need them. 'maps' => { '/include/asm[^\/]*/' => '/include/asm-$a/', '/arch/[^\/]+/' => '/arch/$a/', }, # Templates used for headers and footers 'htmlhead' => 'html-head.html', 'htmltail' => 'html-tail.html', 'htmldir' => 'html-dir.html', 'htmlident' => 'html-ident.html', 'sourcehead' => 'html-head.html', 'sourcedirhead' => 'html-head.html', 'stylesheet' => 'lxr.css', # sourceroot - where to get the source files from # For ordinary directories, this specifies a directory which has each version as a # subdirectory e.g. # indexed-src/version1/... # indexed-src/version2/... # The names of the version directories must match the values for the Version # variable above. 'sourceroot' => '/home/malcolm/indexed-src', # Alternatively, this can specify a CVS repository by setting the value to "cvs:" # followed by the path to the repository. Note this must be file accessible - remote # server access does NOT work. # 'sourceroot' => 'cvs:/hom/karsk/a/CVSROOT/linux', # The name to display for this source tree 'sourcerootname' => 'Example', # The DBI identifier for the database to use # For mysql, the format is dbi:mysql:dbname=<name> # for Postgres, it is dbi:Pg:dbname=<name> # for Oracle, it is dbi:Oracle:host=localhost;sid=DEVMMS;port=1521 'dbname' => 'dbi:mysql:dbname=lxr', # If you need to specify the username or password for the database connection, # uncomment the following two lines # 'dbpass' => 'foo', # 'dbuser' => 'lxr', # For using glimpse, the directory to store the .glimpse files in is required 'glimpsedir' => '/path/to/glimpse/databases', # Location of swish-e index database files if using swish-e 'swishdir' => '/a/directory/here/', # where to look for include files inside the sourcetree. This is used to hyperlink # to included files. 'incprefix' => ['/include', '/include/linux'], # Which extensions to treat as images when browsing. If a file is an image, # it is displayed. 'graphicfile' => '(?i)\.(gif|jpg|jpeg|pjpg|pjpeg|xbm|png)$', #' # How to map files to languages # Note that the string for the key and the first entry in the # array MUST match 'filetype' => { # Format is # Language name, filepatten regexp, module to invoke, # (optional )tabwidth # Note that to have another language supported by Generic.pm, # you must ensure that: # a) exuberant ctags supports it # b) generic.conf is updated to specify information about the language # c) the name of the language given here matches the entry in generic.conf 'C' => ['C', '\.c$' #' , 'LXR::Lang::Generic', '8'], 'C++' => ['C++', '\.C$|((?i)\.c\+\+$|\.cc$|\.cpp$|\.cxx$|\.h$|\.hh$|\.hpp$|\.hxx$|\.h\+\+$)' #' , 'LXR::Lang::Generic', '8'], # Some languages are commented out until the relevant entries in generic.conf are made # The list here is the set supported by ctags 5.0.1 # ['Beta', '(?i)\.bet$' #' # , 'LXR::Lang::Generic'], # ['Cobol', '(?i)\.cob$' #' # , 'LXR::Lang::Generic'], # ['Eiffel', '(?i)\.e$' #' # , 'LXR::Lang::Generic'], # ['Fortran', '(?i)\.f$|\.for$|\.ftn$|\.f77$|\.f90$|\.f95$' #' # , 'LXR::Lang::Generic'], 'Java' => ['Java', '(?i)\.java$' #' , 'LXR::Lang::Java', '4'], # ['Lisp', '(?i)\.cl$|\.clisp$|\.el$|\.l$|\.lisp$|\.lsp$|\.ml$' #' # , 'LXR::Lang::Generic'], # No tabwidth specified here as an example 'Make' => ['Make', '(?i)\.mak$|makefile*' #' , 'LXR::Lang::Generic'], # ['Pascal', '(?i)\.p$|\.pas$' #' # , 'LXR::Lang::Generic'], 'Perl' => ['Perl', '(?i)\.pl$|\.pm$|\.perl$' #' , 'LXR::Lang::Generic', '4'], 'php' => ['php', '(?i)\.php$|\.php3$|\.phtml$' #' , 'LXR::Lang::Generic', '2'], 'Python' => ['Python', '(?i)\.py$|\.python$' #' , 'LXR::Lang::Generic', '4'], # ['rexx', '(?i)\.cmd$|\.rexx$|\.rx$' #' # , 'LXR::Lang::Generic'], # ['ruby', '(?i)\.rb$' #' # , 'LXR::Lang::Generic'], # ['scheme', '(?i)\.sch$|\.scheme$|\.scm$|\.sm$' #' # , 'LXR::Lang::Generic'], # ['shell', '(?i)\.sh$|\.bsh$|\.bash$|\.ksh$|\.zsh$' #' # , 'LXR::Lang::Generic'], # ['s-Lang', '(?i)\.sl$' #' # , 'LXR::Lang::Generic'], # ['tcl', '(?i)\.tcl$|\.wish$' #' # , 'LXR::Lang::Generic'], }, # Maps interpreter names to languages. The format is: # regexp => langname # regexp is matched against the part after #! on the first line of a file # langname must match one of the keys in filetype above. # # This mapping is only used if the filename doesn't match a pattern above, so # a shell script called shell.c will be recognised as a C file, not a shell file. 'interpreters' => { 'perl' => 'Perl', # 'bash' => 'shell', # 'csh' => 'shell', 'python' => 'Python', }, }) --- NEW FILE: test-versions --- 1.0.6 hi hippy wibble |
|
From: Malcolm B. <mb...@us...> - 2002-03-04 15:04:01
|
Update of /cvsroot/lxr/lxr/tests In directory usw-pr-cvs1:/tmp/cvs-serv18621/tests Log Message: Directory /cvsroot/lxr/lxr/tests added to the repository |
|
From: Malcolm B. <mb...@us...> - 2002-02-26 16:18:50
|
Update of /cvsroot/lxr/lxr/templates In directory usw-pr-cvs1:/tmp/cvs-serv31686/templates Modified Files: lxr.conf Log Message: New database backend for Oracle, from Jens Heimann. Index: lxr.conf =================================================================== RCS file: /cvsroot/lxr/lxr/templates/lxr.conf,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- lxr.conf 3 Feb 2002 05:31:33 -0000 1.9 +++ lxr.conf 26 Feb 2002 16:18:47 -0000 1.10 @@ -96,6 +96,7 @@ # The DBI identifier for the database to use # For mysql, the format is dbi:mysql:dbname=<name> # for Postgres, it is dbi:Pg:dbname=<name> + # for Oracle, it is dbi:Oracle:host=localhost;sid=DEVMMS;port=1521 'dbname' => 'dbi:mysql:dbname=lxr', # If you need to specify the username or password for the database connection, |
|
From: Malcolm B. <mb...@us...> - 2002-02-26 16:18:50
|
Update of /cvsroot/lxr/lxr/lib/LXR/Index
In directory usw-pr-cvs1:/tmp/cvs-serv31686/lib/LXR/Index
Modified Files:
DBI.pm
Added Files:
Oracle.pm
Log Message:
New database backend for Oracle, from Jens Heimann.
--- NEW FILE: Oracle.pm ---
# -*- tab-width: 4 -*- ###############################################
#
# $Id: Oracle.pm,v 1.1 2002/02/26 16:18:47 mbox Exp $
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
package LXR::Index::Oracle;
$CVSID = '$Id: Oracle.pm,v 1.1 2002/02/26 16:18:47 mbox Exp $ ';
use strict;
use DBI;
use LXR::Common;
use vars qw(%files %symcache @ISA);
@ISA = ("LXR::Index");
sub new {
my ($self, $dbname) = @_;
$self = bless({}, $self);
$self->{dbh} = DBI->connect($dbname, $config->{dbuser}, $config->{dbpass}, { RaiseError => 1, AutoCommit => 1 })
|| fatal "Can't open connection to database\n";
%files = ();
%symcache = ();
$self->{files_select} = $self->{dbh}->prepare
("select fileid from files where filename = ? and revision = ?");
$self->{files_insert} = $self->{dbh}->prepare
("insert into files values (?, ?, filenum.nextval)");
$self->{symbols_byname} = $self->{dbh}->prepare
("select symid from symbols where symname = ?");
$self->{symbols_byid} = $self->{dbh}->prepare
("select symname from symbols where symid = ?");
$self->{symbols_insert} = $self->{dbh}->prepare
("insert into symbols values ( ?, symnum.nextval)");
$self->{symbols_remove} = $self->{dbh}->prepare
("delete from symbols where symname = ?");
$self->{indexes_select} = $self->{dbh}->prepare
("select f.filename, i.line, i.type, i.relsym ".
"from symbols s, indexes i, files f, releases r ".
"where s.symid = i.symid and i.fileid = f.fileid ".
"and f.fileid = r.fileid ".
"and s.symname = ? and r.release = ? ");
$self->{indexes_insert} = $self->{dbh}->prepare
("insert into indexes values (?, ?, ?, ?, ?)");
$self->{releases_select} = $self->{dbh}->prepare
("select * from releases where fileid = ? and release = ?");
$self->{releases_insert} = $self->{dbh}->prepare
("insert into releases values (?, ?)");
$self->{status_get} = $self->{dbh}->prepare
("select status from status where fileid = ?");
$self->{status_insert} = $self->{dbh}->prepare
# ("insert into status select ?, 0 except select fileid, 0 from status");
("insert into status values (?, ?)");
$self->{status_update} = $self->{dbh}->prepare
("update status set status = ? where fileid = ? and status <= ?");
$self->{usage_insert} = $self->{dbh}->prepare
("insert into usage values (?, ?, ?)");
$self->{usage_select} = $self->{dbh}->prepare
("select f.filename, u.line ".
"from symbols s, files f, releases r, usage u ".
"where s.symid = u.symid ".
"and f.fileid = u.fileid ".
"and u.fileid = r.fileid and ".
"s.symname = ? and r.release = ? ".
"order by f.filename");
return $self;
}
sub index {
my ($self, $symname, $fileid, $line, $type, $relsym) = @_;
$self->{indexes_insert}->execute($self->symid($symname),
$fileid,
$line,
$type,
$relsym ? $self->symid($relsym) : undef);
}
sub reference {
my ($self, $symname, $fileid, $line) = @_;
$self->{usage_insert}->execute($fileid,
$line,
$self->symid($symname));
}
sub getindex { # Hinzugefügt von Variable @row, While-Schleife
my ($self, $symname, $release) = @_;
my ($rows, @ret, @row);
$rows = $self->{indexes_select}->execute("$symname", "$release");
while (@row = $self->{indexes_select}->fetchrow_array){
push (@ret,[@row]);
}
#while ($rows-- > 0) {
# push(@ret, [ $self->{indexes_select}->fetchrow_array ]);
#}
$self->{indexes_select}->finish();
map { $$_[3] &&= $self->symname($$_[3]) } @ret;
return @ret;
}
sub getreference {
my ($self, $symname, $release) = @_;
my ($rows, @ret, @row);
$rows = $self->{usage_select}->execute("$symname", "$release");
while (@row = $self->{usage_select}->fetchrow_array){
push (@ret,[@row]);
}
#while ($rows-- > 0) {
# push(@ret, [ $self->{usage_select}->fetchrow_array ]);
#}
$self->{usage_select}->finish();
return @ret;
}
sub fileid {
my ($self, $filename, $revision) = @_;
my ($fileid);
# CAUTION: $revision is not $release!
unless (defined($fileid = $files{"$filename\t$revision"})) {
$self->{files_select}->execute($filename, $revision);
($fileid) = $self->{files_select}->fetchrow_array();
unless ($fileid) {
$self->{files_insert}->execute($filename, $revision);
$self->{files_select}->execute($filename, $revision);
($fileid) = $self->{files_select}->fetchrow_array();
}
$files{"$filename\t$revision"} = $fileid;
$self->{files_select}->finish();
}
return $fileid;
}
# Indicate that this filerevision is part of this release
sub release {
my ($self, $fileid, $release) = @_;
my (@row);
my $rows = $self->{releases_select}->execute($fileid+0, $release);
while (@row = $self->{releases_select}->fetchrow_array){
$rows=1;
}
$self->{releases_select}->finish();
unless ($rows > 0) {
$self->{releases_insert}->execute($fileid+0, $release);
$self->{releases_insert}->finish();
}
}
sub symid {
my ($self, $symname) = @_;
my ($symid);
$symid = $symcache{$symname};
unless (defined($symid)) {
$self->{symbols_byname}->execute($symname);
($symid) = $self->{symbols_byname}->fetchrow_array();
$self->{symbols_byname}->finish();
unless ($symid) {
$self->{symbols_insert}->execute($symname);
# Get the id of the new symbol
$self->{symbols_byname}->execute($symname);
($symid) = $self->{symbols_byname}->fetchrow_array();
$self->{symbols_byname}->finish();
}
$symcache{$symname} = $symid;
}
return $symid;
}
sub symname {
my ($self, $symid) = @_;
my ($symname);
$self->{symbols_byid}->execute($symid+0);
($symname) = $self->{symbols_byid}->fetchrow_array();
$self->{symbols_byid}->finish();
return $symname;
}
sub issymbol {
my ($self, $symname) = @_;
my ($symid);
$symid = $symcache{$symname};
unless (defined($symid)) {
$self->{symbols_byname}->execute($symname);
($symid) = $self->{symbols_byname}->fetchrow_array();
$self->{symbols_byname}->finish();
$symcache{$symname} = $symid;
}
return $symid;
}
# If this file has not been indexed earlier, mark it as being indexed
# now and return true. Return false if already indexed.
sub toindex {
my ($self, $fileid) = @_;
my ($status);
$self->{status_get}->execute($fileid);
$status = $self->{status_get}->fetchrow_array();
$self->{status_get}->finish();
if(!defined($status)) {
$self->{status_insert}->execute($fileid+0, 0);
}
return $self->{status_update}->execute(1, $fileid, 0) > 0;
}
sub toreference {
my ($self, $fileid) = @_;
my ($rv);
return $self->{status_update}->execute(2, $fileid, 1) > 0;
}
# This function should be called before parsing each new file,
# if this is not done the too much memory will be used and
# tings will become very slow.
sub empty_cache {
%symcache = ();
}
sub DESTROY {
my ($self) = @_;
$self->{files_select} = undef;
$self->{files_insert} = undef;
$self->{symbols_byname} = undef;
$self->{symbols_byid} = undef;
$self->{symbols_insert} = undef;
$self->{indexes_insert} = undef;
$self->{releases_insert} = undef;
$self->{status_insert} = undef;
$self->{status_update} = undef;
$self->{usage_insert} = undef;
$self->{usage_select} = undef;
if($self->{dbh}) {
$self->{dbh}->disconnect();
$self->{dbh} = undef;
}
}
1;
Index: DBI.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/DBI.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- DBI.pm 15 Aug 2001 15:50:27 -0000 1.18
+++ DBI.pm 26 Feb 2002 16:18:46 -0000 1.19
@@ -26,15 +26,15 @@
my ($self, $dbname) = @_;
my ($index);
- if($dbname =~ /^dbi:mysql:/) {
- require LXR::Index::Mysql;
- $index = new LXR::Index::Mysql($dbname);
- } elsif($dbname =~ /^dbi:Pg:/) {
- require LXR::Index::Postgres;
- $index = new LXR::Index::Postgres($dbname);
- } elsif($dbname =~ /^dbi:sybase:/) {
- require LXR::Index::Sybase;
- $index = new LXR::Index::Sybase($dbname);
+ if($dbname =~ /^dbi:mysql:/i) {
+ require LXR::Index::Mysql;
+ $index = new LXR::Index::Mysql($dbname);
+ } elsif($dbname =~ /^dbi:Pg:/i) {
+ require LXR::Index::Postgres;
+ $index = new LXR::Index::Postgres($dbname);
+ } elsif($dbname =~ /^dbi:oracle:/i) {
+ require LXR::Index::Oracle;
+ $index = new LXR::Index::Oracle($dbname);
}
return $index;
}
|
|
From: Malcolm B. <mb...@us...> - 2002-02-26 16:18:49
|
Update of /cvsroot/lxr/lxr
In directory usw-pr-cvs1:/tmp/cvs-serv31686
Modified Files:
CREDITS.txt INSTALL
Added Files:
initdb-oracle.sql
Log Message:
New database backend for Oracle, from Jens Heimann.
--- NEW FILE: initdb-oracle.sql ---
drop sequence filenum;
drop sequence symnum;
drop table indexes;
drop table usage;
drop table symbols;
drop table releases;
drop table status;
drop table files;
commit;
create sequence filenum;
create sequence symnum;
commit;
create table files (
filename varchar2(250),
revision varchar2(250),
fileid number,
constraint pk_files primary key (fileid)
);
alter table files add unique (filename, revision);
create index i_files on files(filename);
commit;
create table symbols (
symname varchar2(250),
symid number,
constraint pk_symbols primary key (symid)
);
alter table symbols add unique(symname);
commit;
create table indexes (
symid number,
fileid number,
line number,
type varchar2(250),
relsym number,
constraint fk_indexes_fileid foreign key (fileid) references files(fileid),
constraint fk_indexes_symid foreign key (symid) references symbols(symid),
constraint fk_indexes_relsym foreign key (relsym) references symbols(symid)
);
create index i_indexes on indexes(symid);
commit;
create table releases (
fileid number,
release varchar2(250),
constraint pk_releases primary key (fileid,release),
constraint fk_releases_fileid foreign key (fileid) references files(fileid)
);
commit;
create table status (
fileid number,
status number,
constraint pk_status primary key (fileid),
constraint fk_status_fileid foreign key (fileid) references files(fileid)
);
commit;
create table usage (
fileid number,
line number,
symid number,
constraint fk_usage_fileid foreign key (fileid) references files(fileid),
constraint fk_usage_symid foreign key (symid) references symbols(symid)
);
create index i_usage on usage(symid);
commit;
Index: CREDITS.txt
===================================================================
RCS file: /cvsroot/lxr/lxr/CREDITS.txt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- CREDITS.txt 23 Jan 2002 15:14:07 -0000 1.4
+++ CREDITS.txt 26 Feb 2002 16:18:46 -0000 1.5
@@ -23,7 +23,8 @@
Jason Dorie Short <js...@de...> File re-org
Joseph Corral <jos...@hp...>
Kristoffer Gleditsch <to...@pi...> Postgres patches
-Guido Sohne Updated INSTALL document
+Guido Sohne Updated INSTALL document
+Jens Heimann <jen...@ma...> Oracle database support
Index: INSTALL
===================================================================
RCS file: /cvsroot/lxr/lxr/INSTALL,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- INSTALL 23 Jan 2002 15:52:51 -0000 1.6
+++ INSTALL 26 Feb 2002 16:18:46 -0000 1.7
@@ -5,8 +5,10 @@
1) A recent version of the exuberant ctags program. Available from
http://sf.net/projects/ctags
-2) A relational database - MySQL (http://www.mysql.com) and Postgresql
- (http://www.postgresql.org) are supported.
+2) A relational database - MySQL (http://www.mysql.com), Postgresql
+ (http://www.postgresql.org) and Oracle are supported.
+ You will also need the right Perl DBI drivers for your particular database,
+ usually available from CPAN.
3) Apache with mod_perl - http://www.apache.org
@@ -39,6 +41,13 @@
Run 'mysql' and then read in the initdb-mysql file using
'\. initdb-mysql'. This will create the database and a user called
lxr with access rights to the database.
+
+For Oracle
+
+Start script in sqlplus with:
+
+@/[pathTo]/initdb-oracle.sql;
+
Create lxr installation directory
---------------------------------
|
|
From: Malcolm B. <mb...@us...> - 2002-02-26 16:07:09
|
Update of /cvsroot/lxr/lxr/lib/LXR
In directory usw-pr-cvs1:/tmp/cvs-serv26990
Modified Files:
Common.pm
Log Message:
Index: Common.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- Common.pm 26 Feb 2002 15:59:32 -0000 1.38
+++ Common.pm 26 Feb 2002 16:07:06 -0000 1.39
@@ -67,7 +67,7 @@
my $c = join(", line ", (caller)[0,2]);
print(STDERR "[",scalar(localtime),"] fatal: $c: $_[0]\n");
print(STDERR '[@INC ', join(" ", @INC), ' $0 ', $0, "\n");
- print(STDERR '$config', join(" ", %$config), "\n");
+ print(STDERR '$config', join(" ", %$config), "\n") if ref($config) eq "HASH";
print("<h4 align=\"center\"><i>** Fatal: $_[0]</i></h4>\n") if $wwwdebug;
exit(1);
}
|
|
From: Malcolm B. <mb...@us...> - 2002-02-26 15:59:35
|
Update of /cvsroot/lxr/lxr/lib/LXR
In directory usw-pr-cvs1:/tmp/cvs-serv23323/lib/LXR
Modified Files:
Common.pm Config.pm
Log Message:
Check that a configuration has been found, die with error if not.
Add dump of current config to the error log when fatal() called
Index: Common.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- Common.pm 18 Nov 2001 03:31:34 -0000 1.37
+++ Common.pm 26 Feb 2002 15:59:32 -0000 1.38
@@ -67,6 +67,7 @@
my $c = join(", line ", (caller)[0,2]);
print(STDERR "[",scalar(localtime),"] fatal: $c: $_[0]\n");
print(STDERR '[@INC ', join(" ", @INC), ' $0 ', $0, "\n");
+ print(STDERR '$config', join(" ", %$config), "\n");
print("<h4 align=\"center\"><i>** Fatal: $_[0]</i></h4>\n") if $wwwdebug;
exit(1);
}
@@ -175,6 +176,7 @@
if(!defined($t)) {
return(undef);
}
+
$t =~ s/\+/ /g;
$t =~ s/\%([\da-f][\da-f])/pack("C", hex($1))/gie;
Index: Config.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Config.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Config.pm 15 Aug 2001 15:50:27 -0000 1.25
+++ Config.pm 26 Feb 2002 15:59:32 -0000 1.26
@@ -92,6 +92,8 @@
%$self = (%$self, %$config);
}
+
+ die "Can't find config for $url\n" if !defined $$self{baseurl};
}
|
|
From: Malcolm B. <mb...@us...> - 2002-02-26 15:57:58
|
Update of /cvsroot/lxr/lxr/lib/LXR/Files
In directory usw-pr-cvs1:/tmp/cvs-serv22319
Modified Files:
Plain.pm
Log Message:
Add mode specifications to all opens, to prevent filenames being interpreted as
modes
Index: Plain.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/Plain.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- Plain.pm 3 Feb 2002 08:22:08 -0000 1.18
+++ Plain.pm 26 Feb 2002 15:57:55 -0000 1.19
@@ -59,7 +59,7 @@
my ($buffer);
local ($/) = undef;
- open(FILE, $self->toreal($filename, $release)) || return undef;
+ open(FILE, "<", $self->toreal($filename, $release)) || return undef;
$buffer = <FILE>;
close(FILE);
return $buffer;
@@ -80,7 +80,7 @@
$tmp = $config->tmpdir.'/lxrtmp.'.time.'.'.$$.'.'.&LXR::Common::tmpcounter;
open(TMP, "> $tmp") || return undef;
- open(FILE, $self->toreal($filename, $release)) || return undef;
+ open(FILE, "<", $self->toreal($filename, $release)) || return undef;
print(TMP <FILE>);
close(FILE);
close(TMP);
@@ -147,7 +147,7 @@
my $indexname = $self->toreal($pathname, $release)."00-INDEX";
if (-f $indexname) {
- open(INDEX, $indexname) ||
+ open(INDEX, "<", $indexname) ||
warning("Existing $indexname could not be opened.");
local($/) = undef;
$index = <INDEX>;
|
|
From: Malcolm B. <mb...@us...> - 2002-02-26 15:56:26
|
Update of /cvsroot/lxr/lxr/lib/LXR/Lang
In directory usw-pr-cvs1:/tmp/cvs-serv21557
Modified Files:
Generic.pm generic.conf
Log Message:
Add Package type for Perl
Added version check for ctags
Index: Generic.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/Generic.pm,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Generic.pm 6 Dec 2001 14:36:43 -0000 1.10
+++ Generic.pm 26 Feb 2002 15:56:23 -0000 1.11
@@ -52,6 +52,9 @@
return $self;
}
+# This is only executed once, saving the overhead of processing the
+# config file each time. Because it is only done once, we also use
+# this to check the version of ctags.
sub read_config {
open (CONF, $config->genericconf) || die "Can't open ".$config->genericconf.", $!";
@@ -72,6 +75,13 @@
$typemap->{$type});
}
}
+
+ my $ctags = $config->ectagsbin;
+ my $version = `$ctags --version`;
+ $version=~ /Exuberant ctags +(\d+)/i;
+ if($1 < 5 ) {
+ die "Exuberant ctags version 5 or above required, found $version\n";
+ }
}
sub indexfile {
@@ -99,6 +109,10 @@
$line =~ s/;\"$//;
$ext =~ /language:(\w+)/;
$type = $typemap->{$type};
+ if(!defined $type) {
+ print "Warning: Unknown type ", (split(/\t/,$_))[3], "\n";
+ next;
+ }
# TODO: can we make it more generic in parsing the extension fields?
if (defined($ext) && $ext =~ /^(struct|union|class|enum):(.*)/) {
Index: generic.conf
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/generic.conf,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- generic.conf 19 Jan 2002 07:20:00 -0000 1.9
+++ generic.conf 26 Feb 2002 15:56:23 -0000 1.10
@@ -172,6 +172,7 @@
'string' => ("'", "'")],
'typemap' => {
's' => 'subroutine',
+ 'p' => 'package',
},
'langid' => '7',
|
|
From: Malcolm B. <mb...@us...> - 2002-02-05 10:34:46
|
Update of /cvsroot/lxr/lxr/lib/LXR
In directory usw-pr-cvs1:/tmp/cvs-serv16324/lib/LXR
Modified Files:
Lang.pm
Log Message:
Fix problem with Lang.pm and non-existent files by checking the return
from getfilehandle.
Index: Lang.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang.pm,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- Lang.pm 2002/01/23 14:59:21 1.27
+++ Lang.pm 2002/02/05 10:34:43 1.28
@@ -41,6 +41,7 @@
if (!defined $lang) {
# Try to see if it's a script
my $fh = $files->getfilehandle($pathname, $release);
+ return undef if !defined $fh;
$fh->getline =~ /^\#!\s*(\S+)/s;
my $shebang = $1;
|
|
From: Malcolm B. <mb...@us...> - 2002-02-03 11:29:12
|
Update of /cvsroot/lxr/lxr In directory usw-pr-cvs1:/tmp/cvs-serv29651 Removed Files: CHANGELOG Log Message: Remove Changelog as the cvs2cl.pl script can reconstruct it from CVS for release. --- CHANGELOG DELETED --- |
|
From: Malcolm B. <mb...@us...> - 2002-02-03 08:22:12
|
Update of /cvsroot/lxr/lxr/lib/LXR/Files
In directory usw-pr-cvs1:/tmp/cvs-serv1082/lib/LXR/Files
Modified Files:
CVS.pm Plain.pm
Log Message:
Fix tmpfile duplication a better way, make both file access methods honour
the setting of $config->tmpdir
Index: CVS.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/CVS.pm,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- CVS.pm 2001/08/15 15:50:27 1.16
+++ CVS.pm 2002/02/03 08:22:08 1.17
@@ -189,7 +189,7 @@
$buf = $self->getfile($filename, $release);
return undef unless defined($buf);
- $tmp = '/tmp/lxrtmp.'.time.'.'.$$.'.'.&LXR::Common::tmpcounter;
+ $tmp = $config->tmpdir.'/lxrtmp.'.time.'.'.$$.'.'.&LXR::Common::tmpcounter;
open(TMP, "> $tmp") || return undef;
print(TMP $buf);
close(TMP);
Index: Plain.pm
===================================================================
RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/Plain.pm,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- Plain.pm 2002/02/03 08:12:53 1.17
+++ Plain.pm 2002/02/03 08:22:08 1.18
@@ -78,12 +78,7 @@
my ($tmp, $tries);
local ($/) = undef;
- $tmp = $config->tmpdir.'/lxrtmp.'.time.'.'.$$;
- $tries=0;
- while ( -e $tmp.$tries) {
- $tries++;
- }
- $tmp.=$tries;
+ $tmp = $config->tmpdir.'/lxrtmp.'.time.'.'.$$.'.'.&LXR::Common::tmpcounter;
open(TMP, "> $tmp") || return undef;
open(FILE, $self->toreal($filename, $release)) || return undef;
print(TMP <FILE>);
|