lxr-commits Mailing List for LXR Cross Referencer (Page 22)
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: Dave B. <bro...@us...> - 2004-07-19 18:06:07
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14535 Modified Files: search Log Message: remove full prefix from filepath Index: search =================================================================== RCS file: /cvsroot/lxr/lxr/search,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- search 15 Jul 2004 15:29:35 -0000 1.20 +++ search 19 Jul 2004 18:05:56 -0000 1.21 @@ -82,7 +82,7 @@ if ($retval == 0) { my @ret; - my $sourceroot = $config->sourceroot; + my $sourceroot = $config->sourceroot . '/' . $release . '/'; my $i = 0; foreach my $glimpseline (@glimpselines) { last if ($i > $maxhits); |
From: Dave B. <bro...@us...> - 2004-07-19 18:05:22
|
Update of /cvsroot/lxr/lxr/lib/LXR/Lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14334/lib/LXR/Lang Modified Files: generic.conf Log Message: specify shell mapping Index: generic.conf =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/generic.conf,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- generic.conf 13 Jul 2004 13:35:48 -0000 1.13 +++ generic.conf 19 Jul 2004 18:05:11 -0000 1.14 @@ -12,6 +12,7 @@ 'C++' => 'c++', 'Python' => 'python', 'SQL' => 'SQL2', + 'Shell' => 'sh', }, |
From: Dave B. <bro...@us...> - 2004-07-19 17:56:52
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12810 Modified Files: INSTALL find genxref Log Message: fixes for glimpse Index: INSTALL =================================================================== RCS file: /cvsroot/lxr/lxr/INSTALL,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- INSTALL 15 Jul 2004 15:18:20 -0000 1.13 +++ INSTALL 19 Jul 2004 17:56:43 -0000 1.14 @@ -82,6 +82,7 @@ If you have glimpse installed, you should set 'glimpsebin' => '/path/to/your/glimpse/executable' + 'glimpseindex' => '/path/to/your/glimpseindex/executable' If you have swish-e installed, you should set @@ -152,34 +153,8 @@ Using Glimpse with LXR -------------------------------- -Create a directory in your LXR directory called glimpse - - mkdir /usr/local/lxr/glimpse - -If you are using CVS, checkout a copy of your project in the -LXR directory, for example - - cd /usr/local/lxr - cvs checkout my_project - -otherwise just use the path to your project instead in the -example below - - find /usr/local/lxr/my_project/ -name *.java | - glimpseindex -H /usr/local/lxr/glimpse -o -F - -Be sure that the glimpse indexes are readable by the user -that Apache is running as. You can do - - chmod a+x /usr/local/lxr/glimpse/.* - -Now edit lxr.conf again and add the following variable for -the URL section that you configured earlier - - 'strip' => '/usr/local/lxr/sikasem' - -This munges the output of glimpse so that you can go straight -to the file that contains a match for a search term. +Create a directory for the swish index files to go in, and put the +path of this directory in the 'glimpsedir' variable. Generate index. --------------- Index: find =================================================================== RCS file: /cvsroot/lxr/lxr/find,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- find 15 Jul 2004 15:29:35 -0000 1.19 +++ find 19 Jul 2004 17:56:43 -0000 1.20 @@ -64,7 +64,7 @@ my @ret; if ($searchtext ne "") { - my $sourceroot = $config->sourceroot; + my $sourceroot = $config->sourceroot . '/' . $release . '/'; while(my $file = <$FILELISTING>) { chomp $file; $file =~ s/^$sourceroot//; @@ -115,7 +115,7 @@ &warning("Version '$release' has not been indexed and is unavailable for searching<br>Could not open ".$config->swishdir."/$release.filenames."); return; } - } elsif ($config->glimpsedir and $config->glimpseindex) { + } elsif ($config->glimpsedir and $config->glimpsebin) { unless ($FILELISTING = new IO::File($config->glimpsedir."/".$release."/.glimpse_filenames")) { &warning("Version '$release' has not been indexed and is unavailable for searching<br>Could not open ".$config->glimpsedir."/$release/.glimpse_filenames."); return; Index: genxref =================================================================== RCS file: /cvsroot/lxr/lxr/genxref,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- genxref 15 Jul 2004 20:29:56 -0000 1.32 +++ genxref 19 Jul 2004 17:56:43 -0000 1.33 @@ -148,10 +148,11 @@ my ($release) = @_; my $string; - if ($config->glimpsebin and $config->glimpseindex) { + if ($config->glimpsedir and $config->glimpseindex) { # Make sure the directory that the glimpse results go into # already exists as glimpse won't work if the directory does # not exist + die $config->glimpsedir . " does not exist" unless -d $config->glimpsedir; $string = $config->glimpsedir."/".$release; mkdir $string; system("chmod 755 $string"); @@ -172,6 +173,7 @@ if ($config->swishdir and $config->swishindex) { my $swish = new IO::Handle; + die $config->swishdir . " does not exist" unless -d $config->swishdir; my $filelist = new IO::File $config->swishdir."/$release.filenames", "w" or die "can't open $release.filenames for writing"; # execute swish, as a pipe we can write to |
From: Dave B. <bro...@us...> - 2004-07-19 17:56:52
|
Update of /cvsroot/lxr/lxr/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12810/templates Modified Files: lxr.conf Log Message: fixes for glimpse Index: lxr.conf =================================================================== RCS file: /cvsroot/lxr/lxr/templates/lxr.conf,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- lxr.conf 14 Jul 2004 14:49:30 -0000 1.18 +++ lxr.conf 19 Jul 2004 17:56:44 -0000 1.19 @@ -5,9 +5,10 @@ { # Global configuration - # Path to glimpse executable. + # Path to glimpse executables. # Define this OR the swish-e variables depending which search engine you want to use. 'glimpsebin' => '/info/lxr/bin/glimpse', + 'glimpseindex' => '/info/lxr/bin/glimpseindex', # Where to store the glimpse index files 'glimpsedir' => 'somewhere', |
From: Dave B. <bro...@us...> - 2004-07-19 17:33:28
|
Update of /cvsroot/lxr/lxr/lib/LXR/Lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8931/lib/LXR/Lang Modified Files: Generic.pm Log Message: set a safe $PATH Index: Generic.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/Generic.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Generic.pm 15 Jul 2004 20:28:44 -0000 1.13 +++ Generic.pm 19 Jul 2004 17:33:17 -0000 1.14 @@ -79,6 +79,8 @@ } my $ctags = $config->ectagsbin; + + $ENV{'PATH'} = '/bin:/usr/local/bin:/usr/bin:/usr/sbin'; my $version = `$ctags --version`; $version=~ /Exuberant ctags +(\d+)/i; if($1 < 5 ) { |
From: Dave B. <bro...@us...> - 2004-07-19 13:55:45
|
Update of /cvsroot/lxr/lxr/lib/LXR/Index In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1223/lib/LXR/Index Modified Files: Postgres.pm Log Message: fix curly brace formatting Index: Postgres.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/Postgres.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Postgres.pm 15 Jul 2004 20:42:41 -0000 1.13 +++ Postgres.pm 19 Jul 2004 13:55:30 -0000 1.14 @@ -329,12 +329,12 @@ $delete_releases->execute($version); $delete_files->execute($version); commit_if_limit(); - } +} sub setindexed { my ($self, $fileid) = @_; $status_update->execute(1, $fileid, 0); - } +} sub setreferenced { my ($self, $fileid) = @_; $status_update->execute(2, $fileid, 1); |
From: Dave B. <bro...@us...> - 2004-07-15 20:42:50
|
Update of /cvsroot/lxr/lxr/lib/LXR/Index In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19976/lib/LXR/Index Modified Files: Mysql.pm Oracle.pm Postgres.pm Log Message: useage v. usage spelling difference; misc fixes for 'purge' statements Index: Mysql.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/Mysql.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Mysql.pm 15 Jul 2004 20:29:56 -0000 1.14 +++ Mysql.pm 15 Jul 2004 20:42:41 -0000 1.15 @@ -348,6 +348,11 @@ $self->{usage_select} = undef; $self->{decl_select} = undef; $self->{decl_insert} = undef; + $self->{delete_indexes} = undef; + $self->{delete_useage} = undef; + $self->{delete_status} = undef; + $self->{delete_releases} = undef; + $self->{delete_files} = undef; if($self->{dbh}) { $self->{dbh}->disconnect(); Index: Oracle.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/Oracle.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Oracle.pm 15 Jul 2004 20:29:56 -0000 1.3 +++ Oracle.pm 15 Jul 2004 20:42:41 -0000 1.4 @@ -93,8 +93,8 @@ ("delete from indexes ". "where fileid in ". " (select fileid from releases where release = ?)"); - $self->{delete_useage} = $self->{dbh}->prepare - ("delete from useage ". + $self->{delete_usage} = $self->{dbh}->prepare + ("delete from usage ". "where fileid in ". " (select fileid from releases where release = ?)"); $self->{delete_status} = $self->{dbh}->prepare @@ -292,7 +292,7 @@ # we don't delete symbols, because they might be used by other versions # so we can end up with unused symbols, but that doesn't cause any problems $self ->{delete_indexes}->execute($version); - $self ->{$delete_useage}->execute($version); + $self ->{$delete_usage}->execute($version); $self ->{$delete_status}->execute($version); $self ->{$delete_releases}->execute($version); $self ->{$delete_files}->execute($version); @@ -311,6 +311,11 @@ $self->{status_update} = undef; $self->{usage_insert} = undef; $self->{usage_select} = undef; + $self->{delete_indexes} = undef; + $self->{delete_useage} = undef; + $self->{delete_status} = undef; + $self->{delete_releases} = undef; + $self->{delete_files} = undef; if($self->{dbh}) { $self->{dbh}->disconnect(); Index: Postgres.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/Postgres.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Postgres.pm 15 Jul 2004 20:29:56 -0000 1.12 +++ Postgres.pm 15 Jul 2004 20:42:41 -0000 1.13 @@ -30,7 +30,8 @@ $symbols_remove $symbols_insert $indexes_select $indexes_insert $releases_select $releases_insert $status_insert $status_update $usage_insert $usage_select $decl_select - $declid_nextnum $decl_insert); + $declid_nextnum $decl_insert $delete_indexes $delete_usage + $delete_status $delete_releases $delete_files); sub new { @@ -109,13 +110,12 @@ $decl_insert = $dbh->prepare ("insert into declarations (declid, langid, declaration) values (?, ?, ?)"); - $delete_indexes = $dbh->prepare ("delete from indexes ". "where fileid in ". " (select fileid from releases where release = ?)"); - $delete_useage = $dbh->prepare - ("delete from useage ". + $delete_usage = $dbh->prepare + ("delete from usage ". "where fileid in ". " (select fileid from releases where release = ?)"); $delete_status = $dbh->prepare @@ -324,10 +324,11 @@ # we don't delete symbols, because they might be used by other versions # so we can end up with unused symbols, but that doesn't cause any problems $delete_indexes->execute($version); - $delete_useage->execute($version); + $delete_usage->execute($version); $delete_status->execute($version); $delete_releases->execute($version); $delete_files->execute($version); + commit_if_limit(); } sub setindexed { @@ -360,7 +361,12 @@ $decl_select = undef; $declid_nextnum= undef; $decl_insert = undef; - + $delete_indexes = undef; + $delete_usage = undef; + $delete_status = undef; + $delete_releases = undef; + $delete_files = undef; + $dbh->commit(); $dbh->disconnect(); $dbh = undef; |
From: Dave B. <bro...@us...> - 2004-07-15 20:40:22
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19549 Modified Files: initdb-oracle.sql Log Message: fix EOLs Index: initdb-oracle.sql =================================================================== RCS file: /cvsroot/lxr/lxr/initdb-oracle.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- initdb-oracle.sql 26 Feb 2002 16:18:46 -0000 1.1 +++ initdb-oracle.sql 15 Jul 2004 20:40:13 -0000 1.2 @@ -1,78 +1,78 @@ -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); - +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; \ No newline at end of file |
From: Dave B. <bro...@us...> - 2004-07-15 20:30:05
|
Update of /cvsroot/lxr/lxr/lib/LXR/Index In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17687/lib/LXR/Index Modified Files: Mysql.pm Oracle.pm Postgres.pm Log Message: add option to force full indexing Index: Mysql.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/Mysql.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Mysql.pm 21 Apr 2004 22:52:11 -0000 1.13 +++ Mysql.pm 15 Jul 2004 20:29:56 -0000 1.14 @@ -99,6 +99,30 @@ $self->{decl_insert} = $self->{dbh}->prepare ("insert into declarations (declid, langid, declaration) values (NULL, ?, ?)"); + $self->{delete_indexes} = $self->{dbh}->prepare + ("delete from indexes ". + "using indexes i, releases r ". + "where i.fileid = r.fileid ". + "and r.release = ?"); + $self->{delete_useage} = $self->{dbh}->prepare + ("delete from useage ". + "using useage u, releases r ". + "where u.fileid = r.fileid ". + "and r.release = ?"); + $self->{delete_status} = $self->{dbh}->prepare + ("delete from status ". + "using status s, releases r ". + "where s.fileid = r.fileid ". + "and r.release = ?"); + $self->{delete_releases} = $self->{dbh}->prepare + ("delete from releases ". + "where release = ?"); + $self->{delete_files} = $self->{dbh}->prepare + ("delete from files ". + "using files f, releases r ". + "where f.fileid = r.fileid ". + "and r.release = ?"); + return $self; } @@ -296,7 +320,18 @@ return $id; } - + +sub purge { + my ($self, $version) = @_; + # we don't delete symbols, because they might be used by other versions + # so we can end up with unused symbols, but that doesn't cause any problems + $self->{delete_indexes}->execute($version); + $self->{delete_useage}->execute($version); + $self->{delete_status}->execute($version); + $self->{delete_releases}->execute($version); + $self->{delete_files}->execute($version); + } + sub DESTROY { my ($self) = @_; Index: Oracle.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/Oracle.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Oracle.pm 14 Jul 2004 14:27:18 -0000 1.2 +++ Oracle.pm 15 Jul 2004 20:29:56 -0000 1.3 @@ -89,6 +89,26 @@ "s.symname = ? and r.release = ? ". "order by f.filename"); + $self->{delete_indexes} = $self->{dbh}->prepare + ("delete from indexes ". + "where fileid in ". + " (select fileid from releases where release = ?)"); + $self->{delete_useage} = $self->{dbh}->prepare + ("delete from useage ". + "where fileid in ". + " (select fileid from releases where release = ?)"); + $self->{delete_status} = $self->{dbh}->prepare + ("delete from status ". + "where fileid in ". + " (select fileid from releases where release = ?)"); + $self->{delete_releases} = $self->{dbh}->prepare + ("delete from releases ". + "where release = ?"); + $self->{delete_files} = $self->{dbh}->prepare + ("delete from files ". + "where fileid in ". + " (select fileid from releases where release = ?)"); + return $self; } @@ -267,6 +287,17 @@ %symcache = (); } +sub purge { + my ($self, $version) = @_; + # we don't delete symbols, because they might be used by other versions + # so we can end up with unused symbols, but that doesn't cause any problems + $self ->{delete_indexes}->execute($version); + $self ->{$delete_useage}->execute($version); + $self ->{$delete_status}->execute($version); + $self ->{$delete_releases}->execute($version); + $self ->{$delete_files}->execute($version); + } + sub DESTROY { my ($self) = @_; $self->{files_select} = undef; Index: Postgres.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/Postgres.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Postgres.pm 15 Jul 2004 20:16:03 -0000 1.11 +++ Postgres.pm 15 Jul 2004 20:29:56 -0000 1.12 @@ -109,6 +109,27 @@ $decl_insert = $dbh->prepare ("insert into declarations (declid, langid, declaration) values (?, ?, ?)"); + + $delete_indexes = $dbh->prepare + ("delete from indexes ". + "where fileid in ". + " (select fileid from releases where release = ?)"); + $delete_useage = $dbh->prepare + ("delete from useage ". + "where fileid in ". + " (select fileid from releases where release = ?)"); + $delete_status = $dbh->prepare + ("delete from status ". + "where fileid in ". + " (select fileid from releases where release = ?)"); + $delete_releases = $dbh->prepare + ("delete from releases ". + "where release = ?"); + $delete_files = $dbh->prepare + ("delete from files ". + "where fileid in ". + " (select fileid from releases where release = ?)"); + return $self; } @@ -298,6 +319,16 @@ return $id; } +sub purge { + my ($self, $version) = @_; + # we don't delete symbols, because they might be used by other versions + # so we can end up with unused symbols, but that doesn't cause any problems + $delete_indexes->execute($version); + $delete_useage->execute($version); + $delete_status->execute($version); + $delete_releases->execute($version); + $delete_files->execute($version); + } sub setindexed { my ($self, $fileid) = @_; |
From: Dave B. <bro...@us...> - 2004-07-15 20:30:04
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17687 Modified Files: genxref Log Message: add option to force full indexing Index: genxref =================================================================== RCS file: /cvsroot/lxr/lxr/genxref,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- genxref 14 Jul 2004 15:00:51 -0000 1.31 +++ genxref 15 Jul 2004 20:29:56 -0000 1.32 @@ -30,7 +30,7 @@ my %option; -GetOptions(\%option, "help!", "url=s", "version=s", "allurls!", "allversions!"); +GetOptions(\%option, "help!", "url=s", "version=s", "allurls!", "allversions!", "reindexall!"); if ($option{'help'}) { # this may not be the best way to implement this, but at least it's something @@ -50,6 +50,7 @@ --allurls Generate tokens for all URL configuration blocks. --version=VERSION Generate tokens for the given version of the code. --allversions Generate tokens for all versions of the code (default). + --reindexall Purges existing index data Report bugs at http://sourceforge.net/projects/lxr/. END_HELP exit 0; @@ -84,6 +85,7 @@ } foreach my $version (@versions) { + $index->purge($version) if $option{'reindexall'}; gensearch($version); genindex('/', $version); genrefs('/', $version); |
From: Dave B. <bro...@us...> - 2004-07-15 20:28:54
|
Update of /cvsroot/lxr/lxr/lib/LXR/Lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17432/lib/LXR/Lang Modified Files: Generic.pm Log Message: we need to do untainting here too Index: Generic.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/Generic.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Generic.pm 29 Jul 2002 00:58:42 -0000 1.12 +++ Generic.pm 15 Jul 2004 20:28:44 -0000 1.13 @@ -60,8 +60,10 @@ local($/) = undef; + my $config_contents = <CONF>; + $config_contents =~ /(.*)/s ; $config_contents = $1; #untaint it $generic_config = eval ("\n#line 1 \"generic.conf\"\n". - <CONF>); + $config_contents); die ($@) if $@; close CONF; |
From: Dave B. <bro...@us...> - 2004-07-15 20:25:37
|
Update of /cvsroot/lxr/lxr/lib/LXR/Lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16883/lib/LXR/Lang Modified Files: ectags.conf Added Files: ectags.conf.documentation Log Message: pull out comments into a seperate file so ctags doesn't display warnings --- NEW FILE: ectags.conf.documentation --- AFAIK, there's know way to embed comments into ectags.conf VB regexps modified from http://www.rutherfurd.net/weblog/2003/04/ The two variable lines are a bad hack to match array variables but not match functions/subs We define SQL2 with regexps because the built-in SQL parsing doesn't work right Unfortunately this indexes supposed identifiers in comments so we have to make the regexps as restrictive as possible. Often we get invalid field matches because comments include datatype keywords like 'date', so the field regexp has an ugly hack that you can't have any words between the beginning of a line and the identifier before the datatype Index: ectags.conf =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/ectags.conf,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ectags.conf 13 Jul 2004 13:35:48 -0000 1.3 +++ ectags.conf 15 Jul 2004 20:25:26 -0000 1.4 @@ -1,4 +1,3 @@ ---regex-comment= VB regexps modified from http://www.rutherfurd.net/weblog/2003/04/; the two variable lines are a bad hack to match array variables but not match functions/subs --langdef=VB --langmap=VB:.bas.cls.ctl.frm.vbs --regex-VB=/^[ \t]*(Public|Private|\b)[ \t]*Sub[ \t]+([a-zA-Z0-9_]+)/\2/s,subroutine/i @@ -11,7 +10,6 @@ --regex-VB=/^[ \t]*(Public|Private|\b)[ \t]*Enum[ \t]+([a-zA-Z0-9_]+)/\2/e,enum/i --regex-VB=/^([a-zA-Z_]+):/\1/l,label/i ---regex-comment= we define SQL2 with regexps because the built-in SQL parsing doesn't work right; unfortunately this indexes supposed identifiers in comments so we have to make the regexps as restrictive as possible. Often we get invalid field matches because comments include datatype keywords like 'date', so the field regexp has an ugly hack that you can't have any words between the beginning of a line and the identifier before the datatype --langdef=SQL2 --langmap=SQL2:.sql --regex-SQL2=/^[ \t]*CREATE[ \t]+([a-zA-Z0-9 \t]*)?TABLE[ \t]+([^.]+\.)?"?([a-zA-Z0-9_@.]+)/\3/t,table/i |
From: Dave B. <bro...@us...> - 2004-07-15 20:20:22
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16116/lib/LXR Modified Files: Config.pm Log Message: make stricter url check work properly for genxref Index: Config.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Config.pm,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- Config.pm 15 Jul 2004 14:55:00 -0000 1.29 +++ Config.pm 15 Jul 2004 20:20:12 -0000 1.30 @@ -64,6 +64,7 @@ } $url =~ s|^http://([^/]*):443/|https://$1/|; + $url .= '/' unless $url =~ m#/$#; # append / if necessary unless ($confpath) { ($confpath) = ($0 =~ /(.*?)[^\/]*$/); |
From: Dave B. <bro...@us...> - 2004-07-15 20:16:12
|
Update of /cvsroot/lxr/lxr/lib/LXR/Index In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15420/lib/LXR/Index Modified Files: Postgres.pm Log Message: add setindexed and setreferenced Index: Postgres.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/Postgres.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Postgres.pm 23 Jan 2002 15:48:52 -0000 1.10 +++ Postgres.pm 15 Jul 2004 20:16:03 -0000 1.11 @@ -299,6 +299,15 @@ } +sub setindexed { + my ($self, $fileid) = @_; + $status_update->execute(1, $fileid, 0); + } +sub setreferenced { + my ($self, $fileid) = @_; + $status_update->execute(2, $fileid, 1); +} + sub END { $files_select= undef; |
From: Dave B. <bro...@us...> - 2004-07-15 15:29:44
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25085 Modified Files: diff find ident search source Log Message: add -T switch for taint checking in CGI mode Index: diff =================================================================== RCS file: /cvsroot/lxr/lxr/diff,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- diff 15 Jul 2004 14:41:04 -0000 1.10 +++ diff 15 Jul 2004 15:29:35 -0000 1.11 @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -T # $Id$ # diff -- Display diff output with markup. Index: find =================================================================== RCS file: /cvsroot/lxr/lxr/find,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- find 15 Jul 2004 14:41:04 -0000 1.18 +++ find 15 Jul 2004 15:29:35 -0000 1.19 @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -T # $Id$ # find -- Find files Index: ident =================================================================== RCS file: /cvsroot/lxr/lxr/ident,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- ident 15 Jul 2004 14:41:04 -0000 1.17 +++ ident 15 Jul 2004 15:29:35 -0000 1.18 @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -T # $Id$ # ident -- Look up identifiers Index: search =================================================================== RCS file: /cvsroot/lxr/lxr/search,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- search 15 Jul 2004 14:41:04 -0000 1.19 +++ search 15 Jul 2004 15:29:35 -0000 1.20 @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -T # $Id$ # search -- Freetext search Index: source =================================================================== RCS file: /cvsroot/lxr/lxr/source,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- source 15 Jul 2004 15:00:07 -0000 1.40 +++ source 15 Jul 2004 15:29:35 -0000 1.41 @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -T # $Id$ # source -- Present sourcecode as html, complete with references |
From: Dave B. <bro...@us...> - 2004-07-15 15:18:33
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22990 Modified Files: INSTALL Log Message: full name of MMagic module Index: INSTALL =================================================================== RCS file: /cvsroot/lxr/lxr/INSTALL,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- INSTALL 15 Jul 2004 14:12:39 -0000 1.12 +++ INSTALL 15 Jul 2004 15:18:20 -0000 1.13 @@ -22,7 +22,7 @@ database you're using. If you don't already have these, they can be installed via CPAN. See http://dbi.perl.org/index.html for more info. -6) The Perl MMagic module, available from CPAN +6) The Perl File::MMagic module, available from CPAN 7) If using the CVS support, you will need rcs installed as well. |
From: Dave B. <bro...@us...> - 2004-07-15 15:08:13
|
Update of /cvsroot/lxr/lxr/lib/LXR/Files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20534/lib/LXR/Files Modified Files: Plain.pm Log Message: don't die on invalid dir; simply return empty so the user gets an error message Index: Plain.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/Plain.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- Plain.pm 29 Jun 2004 20:58:06 -0000 1.21 +++ Plain.pm 15 Jul 2004 15:08:04 -0000 1.22 @@ -101,7 +101,7 @@ my ($dir, $node, @dirs, @files); $dir = $self->toreal($pathname, $release); - opendir(DIR, $dir) || die ("Can't open $dir"); + opendir(DIR, $dir) || return (); FILE: while (defined($node = readdir(DIR))) { next if $node =~ /^\.|~$|\.orig$/; next if $node eq 'CVS'; |
From: Dave B. <bro...@us...> - 2004-07-15 15:00:16
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19094 Modified Files: source Log Message: show attic notice on dir not found, just like we do for file not found Index: source =================================================================== RCS file: /cvsroot/lxr/lxr/source,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- source 15 Jul 2004 14:41:04 -0000 1.39 +++ source 15 Jul 2004 15:00:07 -0000 1.40 @@ -145,6 +145,8 @@ print("<p align=\"center\">\n<i>The directory ". $files->toreal($dir, $release). " does not exist.</i>\n"); + print("\<p align=\"center\">\n<i>This directory might exist in other versions, try 'Show attic files' or select a different Version.</i>\n") + if $files->isa("LXR::Files::CVS") and !$HTTP->{'param'}->{'showattic'}; #FIXME what does this do? if ($files->toreal($dir, $release) =~ m#(.+[^/])[/]*$# ) { if (-e $1) { |
From: Dave B. <bro...@us...> - 2004-07-15 14:55:11
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17931/lib/LXR Modified Files: Config.pm Log Message: fix bug where substring match of url happens too early and wrong config is used Index: Config.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Config.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Config.pm 15 Jul 2004 14:41:04 -0000 1.28 +++ Config.pm 15 Jul 2004 14:55:00 -0000 1.29 @@ -61,8 +61,6 @@ unless ($url) { $url = 'http://'.$ENV{'SERVER_NAME'}.':'.$ENV{'SERVER_PORT'}; $url =~ s/:80$//; - - $url .= $ENV{'SCRIPT_NAME'}; } $url =~ s|^http://([^/]*):443/|https://$1/|; @@ -98,6 +96,7 @@ my $root = $config->{baseurl}; push @aliases, $root; foreach my $rt (@aliases) { + $rt .= '/' unless $rt =~ m#/$#; # append / if necessary my $r = quotemeta($rt); if ($url =~ /^$r/) { $config->{baseurl} = $rt; |
From: Dave B. <bro...@us...> - 2004-07-15 14:41:24
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15328 Modified Files: diff find ident search source Log Message: allow all special characters through http parms so we we can do rexeps. but using taint checking now and handle quotes properly in forms Index: diff =================================================================== RCS file: /cvsroot/lxr/lxr/diff,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- diff 18 Mar 2002 14:55:43 -0000 1.9 +++ diff 15 Jul 2004 14:41:04 -0000 1.10 @@ -26,7 +26,7 @@ $CVSID = '$Id$ '; use strict; -use lib do { $0 =~ m{(.*)/} ? "$1/lib" : "lib" }; +use lib '.'; use LXR::Common qw(:html); use Local; @@ -101,6 +101,7 @@ } fflush; + $ENV{'PATH'} = '/bin:/usr/local/bin:/usr/bin:/usr/sbin'; unless (open(DIFF, "-|")){ open(STDERR, ">&STDOUT"); exec('diff', '-U0', $origtemp, $difftemp); Index: find =================================================================== RCS file: /cvsroot/lxr/lxr/find,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- find 14 Jul 2004 14:43:38 -0000 1.17 +++ find 15 Jul 2004 14:41:04 -0000 1.18 @@ -26,8 +26,7 @@ $CVSID = '$Id$ '; use strict; -use lib do { $0 =~ m{(.*)/} ? "$1/lib" : "lib" }; - +use lib '.'; use LXR::Common qw(:html); use LXR::Config; @@ -133,6 +132,7 @@ (variables => sub { varinputs(@_) }, advancedchecked => sub { return $advanced ? "checked" : "" }, searchtext => sub { return $searchtext }, + searchtext_escaped => sub { $_ = $searchtext; s/\"/"/g; return $_;}, casesensitivechecked => sub { return $casesensitive ? "checked" : "" }, results => sub { printresults(@_, @results) }, resultcount => sub { return scalar @results }, Index: ident =================================================================== RCS file: /cvsroot/lxr/lxr/ident,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- ident 1 Jul 2004 14:24:16 -0000 1.16 +++ ident 15 Jul 2004 14:41:04 -0000 1.17 @@ -26,7 +26,7 @@ $CVSID = '$Id$ '; use strict; -use lib do { $0 =~ m{(.*)/} ? "$1/lib" : "lib" }; +use lib '.'; use LXR::Common qw(:html); use Local; @@ -144,6 +144,7 @@ print(expandtemplate($templ, (variables => \&varinputs, identifier => sub { return $identifier }, + identifier_escaped => sub { $_ = $identifier; s/\"/"/g; return $_;}, refs => sub { refexpand(@_) }, ))); print $declare_hits; Index: search =================================================================== RCS file: /cvsroot/lxr/lxr/search,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- search 14 Jul 2004 14:49:30 -0000 1.18 +++ search 15 Jul 2004 14:41:04 -0000 1.19 @@ -26,7 +26,7 @@ $CVSID = '$Id$ '; use strict; -use lib do { $0 =~ m{(.*)/} ? "$1/lib" : "lib" }; +use lib '.'; use LXR::Common qw(:html); use LXR::Config; @@ -53,6 +53,7 @@ sub glimpsesearch { my ($searchtext) = @_; + $ENV{'PATH'} = '/bin:/usr/local/bin:/usr/bin:/usr/sbin'; unless (open(GLIMPSE, "-|")) { open(STDERR, ">&STDOUT"); $!=''; @@ -121,11 +122,12 @@ return; } + $ENV{'PATH'} = '/bin:/usr/local/bin:/usr/bin:/usr/sbin'; unless (open(SWISH, "-|")) { open(STDERR, ">&STDOUT"); exec($config->swishsearch, "-f", $config->swishdir."/".$release.".index", - "-m", $maxhits, "-w", $searchtext); + "-m", $maxhits, "-w", "'" . $searchtext . "'"); print(STDERR "Couldn't exec ".$config->swishsearch.": $!\n"); kill(9, $$); @@ -217,6 +219,7 @@ print expandtemplate($templ, (variables => sub { varinputs(@_) }, searchtext => sub { return $searchtext }, + searchtext_escaped => sub { $_ = $searchtext; s/\"/"/g; return $_;}, maxhits_message => sub { return @results == $maxhits ? "<b>Too many hits, displaying first $maxhits</b><br>" : "" }, results => sub { printresults(@_, @results) }, Index: source =================================================================== RCS file: /cvsroot/lxr/lxr/source,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- source 13 Jul 2004 19:16:56 -0000 1.38 +++ source 15 Jul 2004 14:41:04 -0000 1.39 @@ -27,7 +27,7 @@ $CVSID = '$Id$ '; use strict; -use lib do { $0 =~ m{(.*)/} ? "$1/lib" : "lib" }; +use lib '.'; use LXR::Common qw(:html); use Local; |
From: Dave B. <bro...@us...> - 2004-07-15 14:41:23
|
Update of /cvsroot/lxr/lxr/lib/LXR/Files In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15328/lib/LXR/Files Modified Files: CVS.pm Log Message: allow all special characters through http parms so we we can do rexeps. but using taint checking now and handle quotes properly in forms Index: CVS.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Files/CVS.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- CVS.pm 1 Jul 2004 13:57:03 -0000 1.23 +++ CVS.pm 15 Jul 2004 14:41:04 -0000 1.24 @@ -158,11 +158,15 @@ return undef unless defined($self->toreal($filename, $release)); - open($fileh, "-|", "co -q -p$rev ". - $self->cleanstring($self->toreal($filename, $release))); + $rev =~ /([\d\.]*)/; $rev = $1; # untaint + my $clean_filename = $self->cleanstring($self->toreal($filename, $release)); + $clean_filename =~ /(.*)/; $clean_filename = $1; # technically untaint here (cleanstring did the real untainting) + + $ENV{'PATH'} = '/bin:/usr/local/bin:/usr/bin:/usr/sbin'; + open($fileh, "-|", "co -q -p$rev $clean_filename"); - die("Error executing \"co\"; rcs not installed?") unless $fileh; - return $fileh; + die("Error executing \"co\"; rcs not installed?") unless $fileh; + return $fileh; } sub getdiff { @@ -177,8 +181,13 @@ my $rev2 = $self->filerev($filename, $release2); return undef unless defined($rev2); - open($fileh, "-|", "rcsdiff -q -a -n -r$rev1 -r$rev2 ". - $self->cleanstring($self->toreal($filename, $release1))); + $rev1 =~ /([\d\.]*)/; $rev1 = $1; # untaint + $rev2 =~ /([\d\.]*)/; $rev2 = $1; # untaint + my $clean_filename = $self->cleanstring($self->toreal($filename, $release1)); + $clean_filename =~ /(.*)/; $clean_filename = $1; # technically untaint here (cleanstring did the real untainting) + + $ENV{'PATH'} = '/bin:/usr/local/bin:/usr/bin:/usr/sbin'; + open($fileh, "-|", "rcsdiff -q -a -n -r$rev1 -r$rev2 $clean_filename"); die("Error executing \"rcsdiff\"; rcs not installed?") unless $fileh; return $fileh->getlines; |
From: Dave B. <bro...@us...> - 2004-07-15 14:41:23
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15328/lib/LXR Modified Files: Common.pm Config.pm Log Message: allow all special characters through http parms so we we can do rexeps. but using taint checking now and handle quotes properly in forms Index: Common.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Common.pm,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- Common.pm 13 Jul 2004 13:39:44 -0000 1.46 +++ Common.pm 15 Jul 2004 14:41:04 -0000 1.47 @@ -55,7 +55,6 @@ $tmpcounter = 23; - sub warning { my $c = join(", line ", (caller)[0,2]); print(STDERR "[",scalar(localtime),"] warning: $c: $_[0]\n"); @@ -183,11 +182,6 @@ # Paranoia check. Regexp-searches in Glimpse won't work. # if ($t =~ tr/;<>*|\`&$!#()[]{}:\'\"//) { - # Should be sufficient to keep "open" from doing unexpected stuff. - if ($t =~ tr/<>|\"\'\`//) { - &abortall("Illegal characters in HTTP-parameters."); - } - return($t); } @@ -609,15 +603,15 @@ } elsif ($who eq 'ident') { my $i = $HTTP->{'param'}->{'i'}; - return $config->sourcerootname.' identfier search'.($i ? " \"$i\"" : ''); + return $config->sourcerootname.' identfier search'.($i ? ": $i" : ''); } elsif ($who eq 'search') { my $s = $HTTP->{'param'}->{'string'}; - return $config->sourcerootname.' freetext search'.($s ? " \"$s\"" : ''); + return $config->sourcerootname.' freetext search'.($s ? ": $s" : ''); } elsif ($who eq 'find') { my $s = $HTTP->{'param'}->{'string'}; - return $config->sourcerootname.' file search'.($s ? " \"$s\"" : ''); + return $config->sourcerootname.' file search'.($s ? ": $s" : ''); } } Index: Config.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Config.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Config.pm 5 Jun 2003 15:39:15 -0000 1.27 +++ Config.pm 15 Jul 2004 14:41:04 -0000 1.28 @@ -79,8 +79,10 @@ $$self{'confpath'} = $confpath; local($/) = undef; + my $config_contents = <CONFIG>; + $config_contents =~ /(.*)/s ; $config_contents = $1; #untaint it my @config = eval("\n#line 1 \"configuration file\"\n". - <CONFIG>); + $config_contents); die($@) if $@; my $config; |
From: Dave B. <bro...@us...> - 2004-07-15 14:41:23
|
Update of /cvsroot/lxr/lxr/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15328/templates Modified Files: html-find.html html-ident.html html-search-glimpse.html html-search-swish.html Log Message: allow all special characters through http parms so we we can do rexeps. but using taint checking now and handle quotes properly in forms Index: html-find.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html-find.html,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- html-find.html 8 Jul 2004 13:58:35 -0000 1.2 +++ html-find.html 15 Jul 2004 14:41:04 -0000 1.3 @@ -2,7 +2,7 @@ $variables{<input type="hidden" name="$variable" value="$value">} <b>Find file:</b> - <input type="text" name="string" value="$searchtext" size="50"> + <input type="text" name="string" value="$searchtext_escaped" size="50"> <input type="submit" value="search"> <br> <input type="checkbox" name="advanced" $advancedchecked value="1"/> Index: html-ident.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html-ident.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- html-ident.html 22 Mar 2003 01:16:09 -0000 1.4 +++ html-ident.html 15 Jul 2004 14:41:04 -0000 1.5 @@ -8,7 +8,7 @@ $variables <b>Identifier: </b> -<input type="text" name="i" value='$identifier' size="15"> +<input type="text" name="i" value="$identifier_escaped" size="15"> <input type="submit" value="Find"> </form> Index: html-search-glimpse.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html-search-glimpse.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- html-search-glimpse.html 14 Jul 2004 14:49:30 -0000 1.1 +++ html-search-glimpse.html 15 Jul 2004 14:41:04 -0000 1.2 @@ -2,7 +2,7 @@ <form method="get" action="search"> $variables{<input type="hidden" name="$variable" value="$value">} - <b>Search for: </b><input type="text" name="string" value="$searchtext" size="50"> + <b>Search for: </b><input type="text" name="string" value="$searchtext_escaped" size="50"> <input type="submit" value="search"> <br> Powered by glimpse. Index: html-search-swish.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html-search-swish.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- html-search-swish.html 14 Jul 2004 14:49:30 -0000 1.1 +++ html-search-swish.html 15 Jul 2004 14:41:04 -0000 1.2 @@ -2,7 +2,7 @@ <form method="get" action="search"> $variables{<input type="hidden" name="$variable" value="$value">} - <b>Search for: </b><input type="text" name="string" value="$searchtext" size="50"> + <b>Search for: </b><input type="text" name="string" value="$searchtext_escaped" size="50"> <input type="submit" value="search"> <br><br> Supported operators: AND, OR, NOT, ( ) boolean grouping, trailing *, " " phrase grouping<br> |
From: Dave B. <bro...@us...> - 2004-07-15 14:12:47
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9548 Modified Files: INSTALL Log Message: update, mostly for swish-e and cgi Index: INSTALL =================================================================== RCS file: /cvsroot/lxr/lxr/INSTALL,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- INSTALL 12 Jul 2004 13:15:22 -0000 1.11 +++ INSTALL 15 Jul 2004 14:12:39 -0000 1.12 @@ -10,11 +10,11 @@ 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 +3) A webserver - Apache httpd (http://httpd.apache.org/) with mod_perl + (http://perl.apache.org/) is recommended 4) For freetext searching, either Glimpse (http://glimpse.cs.arizona.edu) or - Swish-e (http://swish-e.org). You need the development version of - swish-e (i.e. 2.1.x or later). + Swish-e (http://swish-e.org) version 2.1 or later. Swish-e is fully GPL'ed, while Glimpse is only free for non-commercial use. @@ -24,7 +24,7 @@ 6) The Perl MMagic module, available from CPAN -7) If using the CVS support, you will need cvs and rcs installed as well. +7) If using the CVS support, you will need rcs installed as well. Installing the database ----------------------- @@ -82,12 +82,23 @@ If you have glimpse installed, you should set 'glimpsebin' => '/path/to/your/glimpse/executable' + +If you have swish-e installed, you should set -Now remember you copied the perl modules for Glimpse to a directory + 'swishindex' => '/path/to/your/swishe-e/executable' + 'swishsearch' => '/path/to/your/swishe-e/executable' + +Comment out the variables for the indexer you are not using. +Set 'htmlsearch' to either 'html-search-swish.html' or +'html-search-glimpse.html' depending on which indexer +you are using. + +Now remember you copied the perl modules to a directory in your perl module search path ? The example path I used was /usr/lib/perl5/site_perl which is also needed in lxr.conf 'genericconf' => '/usr/lib/perl5/site_perl/LXR/Lang/generic.conf' + 'ectagsconf' => '/usr/lib/perl5/site_perl/Lang/ectags.conf', Next set your base URL and virtual root for LXR by setting @@ -136,22 +147,10 @@ Using Swish-e with LXR ---------------------- -This is simple: - -1) Put the paths to swish-e and swish-search in the 'swishindex' and - 'swishsearch' variables in lxr.conf. If there is no swish-search - executable on your system, use the path to swish-e as the - 'swishsearch' value. - -2) Create a directory for the swish index files to go in, and put the - path of this directory in the 'swishdir' variable. - -3) Comment out the 'glimpsebin' variable - -Now re-run genxref and it should build the swish indexes for you and -you're done. +Create a directory for the swish index files to go in, and put the +path of this directory in the 'swishdir' variable. -Getting Glimpse to work with LXR +Using Glimpse with LXR -------------------------------- Create a directory in your LXR directory called glimpse @@ -195,9 +194,8 @@ configurations. Which config block to use is selected according to the url argument. -If you are setting up LXR to use files in a CVS repository, genxref -will most likely run without printing out any error messages. This is -*not* what you want. You have to explicitly state a version to use. +If you are setting up LXR to use files in a CVS repository, you +probably want to use the 'head' version (default). genxref --url=/path/to/lxr --version=head @@ -211,10 +209,8 @@ Set up webserver ---------------- -The browsing scripts currently supplied depend on mod_perl to execute -properly, although it should be easy to modify them to work as plain -CGI scripts. Since mod_perl is an Apache add-on, this means using -Apache at the moment. +The browsing scripts supplied can run with Apache mod_perl or as cgi +scripts. You may need to edit httpd.conf to point to the lxr files, for example if you have installed the lxr files in /usr/local/lxr and you want to |
From: Dave B. <bro...@us...> - 2004-07-14 15:01:14
|
Update of /cvsroot/lxr/lxr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16005 Modified Files: genxref Added Files: swish-e.conf Log Message: configure swish-e a little better --- NEW FILE: swish-e.conf --- MetaNames swishdocpath MaxWordLimit 255 # add _ to defaults from: http://cvs.sourceforge.net/viewcvs.py/*checkout*/swishe/swish-e/src/config.h WordCharacters _0123456789abcdefghijklmnopqrstuvwxyzªµºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ BeginCharacters _0123456789abcdefghijklmnopqrstuvwxyzªµºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ EndCharacters _0123456789abcdefghijklmnopqrstuvwxyzªµºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ # this could (I think) be used to effectively change a whole-file search to a line-search # BumpPositionCounterCharacters ; Index: genxref =================================================================== RCS file: /cvsroot/lxr/lxr/genxref,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- genxref 30 Jun 2004 20:55:27 -0000 1.30 +++ genxref 14 Jul 2004 15:00:51 -0000 1.31 @@ -174,7 +174,7 @@ # execute swish, as a pipe we can write to - open($swish, "| " . $config->swishindex . " -S prog -i stdin -v 1 -f " . $config->swishdir."/".$release.".index") + open($swish, "| " . $config->swishindex . " -S prog -i stdin -v 1 -c swish-e.conf -f " . $config->swishdir."/".$release.".index") or die "Couldn't exec ".$config->swishindex.": $!\n"; feedswish("/", $release, $swish, $filelist); |