lxr-commits Mailing List for LXR Cross Referencer (Page 3)
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: Andre-Littoz <ajl...@us...> - 2013-12-03 09:49:21
|
Update of /cvsroot/lxr/html/en In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1729/en Modified Files: index.shtml Log Message: */index.shtml: create link to POD-extracted documentation Index: index.shtml =================================================================== RCS file: /cvsroot/lxr/html/en/index.shtml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- index.shtml 7 Nov 2013 16:17:52 -0000 1.10 +++ index.shtml 3 Dec 2013 09:49:18 -0000 1.11 @@ -102,10 +102,12 @@ </p> </li> <li> - <a href="usermanual.shtml">Online user manual</a> + <a href="/lxr_inline_doc">Technical information</a> <p class="normal"> -<span class="caution">Not yet "online"</span>, -this link leads you to a nice Error-404 page instead! +This documentation is automatically extracted from the code. +It gives summary information about the LXR browsing components. +Full technical information will soon be available in the +<em>Developer's Manual</em>. </p> </li> <li>PDF version of the |
From: Andre-Littoz <ajl...@us...> - 2013-12-02 17:00:52
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25302/lib/LXR Modified Files: Template.pm Log Message: Templates.pm, lxr.css, html-head-*.html: make sure the Attic link is hidden when view is not on a directory and tree is not stored in CVS Index: Template.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Template.pm,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Template.pm 17 Nov 2013 09:08:51 -0000 1.28 +++ Template.pm 2 Dec 2013 17:00:48 -0000 1.29 @@ -1512,10 +1512,10 @@ # and the current page is related to some file activity # (i.e. displaying a directory or a source file) return ' ' if !$files->isa('LXR::Files::CVS'); - return ' ' if substr($who, 0, 6) ne 'source'; + return ' ' if $who ne 'sourcedir'; # Now build the opposite of the current state if ($HTTP->{'param'}->{'_showattic'}) { - return ( '<a class="modes" href="' + return ( '<div class="cvsattic"><a class="modes" href="' . $config->{'virtroot'} . 'source' . ( exists($config->{'treename'}) @@ -1524,10 +1524,10 @@ ) . $pathname . &urlargs("_showattic=0") - . '">Hide attic files</a>' + . '">Hide attic files</a></div>' ); } else { - return ( '<a class="modes" href="' + return ( '<div class="cvsattic"><a class="modes" href="' . $config->{'virtroot'} . 'source' . ( exists($config->{'treename'}) @@ -1536,7 +1536,7 @@ ) . $pathname . &urlargs('_showattic=1') - . '">Show attic files</a>' + . '">Show attic files</a></div>' ); } } |
From: Andre-Littoz <ajl...@us...> - 2013-12-02 17:00:51
|
Update of /cvsroot/lxr/lxr/templates In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25302/templates Modified Files: lxr.css Log Message: Templates.pm, lxr.css, html-head-*.html: make sure the Attic link is hidden when view is not on a directory and tree is not stored in CVS Index: lxr.css =================================================================== RCS file: /cvsroot/lxr/lxr/templates/lxr.css,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- lxr.css 2 Dec 2013 10:54:09 -0000 1.19 +++ lxr.css 2 Dec 2013 17:00:48 -0000 1.20 @@ -32,8 +32,8 @@ , .tree-sel , .lxrdesc , SELECT -, A.cvsweb -, A.cvsattic +, .cvsweb +, .cvsattic , TD.identline , TD.searchline { font-family: "Gill Sans", Helvetica, Arial, sans @@ -157,7 +157,7 @@ } /* Attic view switch */ - TD.cvsattic + .cvsattic /* definition similar to cvsweb */ { border-width: medium ; border-style: outset |
From: Andre-Littoz <ajl...@us...> - 2013-12-02 10:54:13
|
Update of /cvsroot/lxr/lxr/templates/html In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1606/templates/html Modified Files: html-head-btn-smaller.html html-head-btn.html html-head-smaller.html html-head.html Log Message: lxr.css, html-head-*.html: new CSS style attic Give a button appearance to the "Attic" link Index: html-head-btn-smaller.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html/html-head-btn-smaller.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- html-head-btn-smaller.html 4 Sep 2013 15:22:41 -0000 1.7 +++ html-head-btn-smaller.html 2 Dec 2013 10:54:09 -0000 1.8 @@ -72,7 +72,7 @@ } </td> </tr> <tr> - <td colspan='1'>$atticlink</td> + <td colspan='1' class="cvsattic">$atticlink</td> <td colspan='3' class="rightmost"> <form method="get" class="vars" Index: html-head-btn.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html/html-head-btn.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- html-head-btn.html 4 Sep 2013 15:22:41 -0000 1.9 +++ html-head-btn.html 2 Dec 2013 10:54:09 -0000 1.10 @@ -85,7 +85,7 @@ </tr> <tr><td colspan='3'> </td></tr> <tr> - <td>$atticlink</td> + <td class="cvsattic">$atticlink</td> <td colspan='2' class="rightmost"> <form method="get" class="vars" Index: html-head-smaller.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html/html-head-smaller.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- html-head-smaller.html 4 Sep 2013 15:22:42 -0000 1.5 +++ html-head-smaller.html 2 Dec 2013 10:54:09 -0000 1.6 @@ -69,7 +69,7 @@ </td> </tr> <tr> - <td colspan=2>$atticlink</td> + <td colspan=2 class="cvsattic">$atticlink</td> <td colspan=2> <table class="header"> $variables{ <tr> Index: html-head.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html/html-head.html,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- html-head.html 4 Sep 2013 15:22:42 -0000 1.7 +++ html-head.html 2 Dec 2013 10:54:09 -0000 1.8 @@ -80,7 +80,7 @@ </tr> <tr><td colspan='3'> </td></tr> <tr> - <td>$atticlink</td> + <td class="cvsattic">$atticlink</td> <td colspan='2'> <table class="header"> $variables{ <tr> |
From: Andre-Littoz <ajl...@us...> - 2013-12-02 10:54:12
|
Update of /cvsroot/lxr/lxr/templates In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1606/templates Modified Files: lxr.css Log Message: lxr.css, html-head-*.html: new CSS style attic Give a button appearance to the "Attic" link Index: lxr.css =================================================================== RCS file: /cvsroot/lxr/lxr/templates/lxr.css,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- lxr.css 29 Nov 2013 15:44:56 -0000 1.18 +++ lxr.css 2 Dec 2013 10:54:09 -0000 1.19 @@ -33,6 +33,7 @@ , .lxrdesc , SELECT , A.cvsweb +, A.cvsattic , TD.identline , TD.searchline { font-family: "Gill Sans", Helvetica, Arial, sans @@ -155,6 +156,15 @@ ; text-align: center } +/* Attic view switch */ + TD.cvsattic + /* definition similar to cvsweb */ +{ border-width: medium +; border-style: outset +; border-color: #aaaaaa +; background-color: #eeeeee +} + .footer P , .footer ADDRESS { padding: 0 @@ -422,10 +432,11 @@ /* link to cvslog */ A.cvsweb { border-width: medium -; border-style: ridge +; border-style: outset +; border-color: #aaaaaa ; background-color: #eeeeee ; padding: 0 0.54cm 0 0.54cm -; color: black +; color: blue } /* most recent addition to file */ |
From: Andre-Littoz <ajl...@us...> - 2013-11-29 16:01:08
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14033/lib/LXR Modified Files: Config.pm Log Message: Config.pm: avoid testing for free-text search engines with VCSes In multiple-trees context, lxr.conf may describe plain files and VCS-stored trees simultaneously.. One free-text search engine is present but there is no auxiliary directory (for engine internal data) associated with the VCS-tree. This leads to an error in Config.pm _initialize sub. The text for free-text engine (and its environment) is skipped for any VCS-stored tree. Index: Config.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Config.pm,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- Config.pm 8 Nov 2013 14:22:25 -0000 1.59 +++ Config.pm 29 Nov 2013 16:01:05 -0000 1.60 @@ -511,43 +511,44 @@ # Set-up various directories as necessary _ensuredirexists($self->{'tmpdir'}); + if ($self->{'sourceroot'} !~ m/^\w+:/) { # See if there is ambiguity on the free-text search engine - if (exists $self->{'glimpsebin'} && exists $self->{'swishbin'}) { - die "Both Glimpse and Swish have been specified in $confpath.\n" - ."Please choose one of them by commenting out either glimpsebin or swishbin.\n"; - - } elsif (exists $self->{'glimpsebin'}) { - if (!exists($self->{'glimpsedir'})) { - die "Please specify 'glimpsedirbase' or 'glimpsedir' in $confpath\n" - unless exists($self->{'glimpsedirbase'}); - $self->{'glimpsedir'} = $self->{'glimpsedirbase'} +# only when tree is stored in plain files +# since free-text search is not operational with VCSes, + if (exists $self->{'glimpsebin'} && exists $self->{'swishbin'}) { + die "Both Glimpse and Swish have been specified in $confpath.\n" + ."Please choose one of them by commenting out either glimpsebin or swishbin.\n"; + + } elsif (exists $self->{'glimpsebin'}) { + if (!exists($self->{'glimpsedir'})) { + die "Please specify 'glimpsedirbase' or 'glimpsedir' in $confpath\n" + unless exists($self->{'glimpsedirbase'}); + $self->{'glimpsedir'} = $self->{'glimpsedirbase'} + . $self->{'virtroot'} + . ('argument' eq $routing + ? $self->{'treename'} + : '' + ) + ; + } + _ensuredirexists($self->{'glimpsedir'}); + } elsif (exists $self->{'swishbin'}) { + if (!exists($self->{'swishdir'})) { + die "Please specify 'swishdirbase' or 'swishdir' in $confpath\n" + unless exists($self->{'swishdirbase'}); + $self->{'swishdir'} = $self->{'swishdirbase'} . $self->{'virtroot'} . ('argument' eq $routing - ? $self->{'treename'} - : '' - ) + ? $self->{'treename'} + : '' + ) ; + } + _ensuredirexists($self->{'swishdir'}); + } else { + die "Neither Glimpse nor Swish have been specified in $confpath.\n" + ."Please choose one of them by specifing a value for either glimpsebin or swishbin.\n"; } - _ensuredirexists($self->{'glimpsedir'}); - } elsif (exists $self->{'swishbin'}) { - if (!exists($self->{'swishdir'})) { - die "Please specify 'swishdirbase' or 'swishdir' in $confpath\n" - unless exists($self->{'swishdirbase'}); - $self->{'swishdir'} = $self->{'swishdirbase'} - . $self->{'virtroot'} - . ('argument' eq $routing - ? $self->{'treename'} - : '' - ) - ; - } - _ensuredirexists($self->{'swishdir'}); - } else { - # Since free-text search is not operational with VCSes, - # don't complain if not configured. - die "Neither Glimpse nor Swish have been specified in $confpath.\n" - ."Please choose one of them by specifing a value for either glimpsebin or swishbin.\n" - unless $self->{'sourceroot'} =~ m!^[^/]+:! ; } return 1; } |
From: Andre-Littoz <ajl...@us...> - 2013-11-29 15:44:59
|
Update of /cvsroot/lxr/lxr In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv12861 Modified Files: source Log Message: source, lxr.css: add cvsweb CSS/HTML class This class is used to tag an <A> link to a CVS log so that it can be given the look of a button. Index: source =================================================================== RCS file: /cvsroot/lxr/lxr/source,v retrieving revision 1.67 retrieving revision 1.68 diff -u -d -r1.67 -r1.68 --- source 8 Nov 2013 12:32:37 -0000 1.67 +++ source 29 Nov 2013 15:44:55 -0000 1.68 @@ -881,7 +881,7 @@ if (exists($config->{'cvswebprefix'})) { my $revtarget = ''; $revtarget = "#rev$releaseid" if lc($releaseid) ne 'head'; - print '<a href="' + print '<a class="cvsweb" href="' . $config->{'cvswebprefix'} . $pathname . $config->{'cvswebpostfix'} |
From: Andre-Littoz <ajl...@us...> - 2013-11-26 08:49:17
|
Update of /cvsroot/lxr/lxr/templates In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23172/templates Modified Files: global.conf.part Log Message: templates/global.conf.part: 'htmlfatal' was not an OS-absolute file path Add %LXRroot%/ at head of path Index: global.conf.part =================================================================== RCS file: /cvsroot/lxr/lxr/templates/global.conf.part,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- global.conf.part 3 Sep 2013 08:45:11 -0000 1.5 +++ global.conf.part 26 Nov 2013 08:49:14 -0000 1.6 @@ -100,7 +100,7 @@ # All paths in this subsection are relative to LXR root directory # Templates used for headers and footers - , 'htmlfatal' => 'templates/html/html-fatal.html' + , 'htmlfatal' => '%LXRroot%/templates/html/html-fatal.html' #@MSG 'Buttons-and-menus' interface is recommended for the kernel #@MSG to avoid screen cluttering. #@ASK --- Use 'buttons-and-menus' instead of 'link' interface?; 1;yes, no; Y, N |
From: Andre-Littoz <ajl...@us...> - 2013-11-20 14:58:21
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31815/lib/LXR Modified Files: Index.pm Log Message: Index.pm: fix faulty argument passing in unique counters management functions Index: Index.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Index.pm 17 Nov 2013 08:57:26 -0000 1.27 +++ Index.pm 20 Nov 2013 14:58:18 -0000 1.28 @@ -1677,7 +1677,7 @@ =cut sub uniquecountersreset { - my ($force) = @_; + my ($self, $force) = @_; $filenum = 0; $symnum = 0; $typenum = 0; @@ -1694,10 +1694,7 @@ =cut sub uniquecounterssave { - my ($self - , $filenum, $symnum, $typenum - , $fileini, $symini, $typeini - ) = @_; + my ($self) = @_; $self->{dbh}{'AutoCommit'} = 0; my $prefix = $self->{'config'}{'dbprefix'}; |
From: Andre-Littoz <ajl...@us...> - 2013-11-20 14:57:22
|
Update of /cvsroot/lxr/lxr/lib/LXR/Index In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv31758/lib/LXR/Index Modified Files: Mysql.pm Log Message: Index/Mysql.pm: needs a specific purgeall() function Index: Mysql.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Index/Mysql.pm,v retrieving revision 1.38 retrieving revision 1.39 diff -u -d -r1.38 -r1.39 --- Mysql.pm 17 Nov 2013 08:57:26 -0000 1.38 +++ Mysql.pm 20 Nov 2013 14:57:19 -0000 1.39 @@ -92,7 +92,7 @@ # End of variants $self->{'purge_all'} = $self->{dbh}->prepare - ( "call ${prefix}purgeall()" + ( "call ${prefix}PurgeAll()" ); # Variant U @@ -179,6 +179,15 @@ # return $declid; # } +sub purgeall { + my ($self) = @_; + + $self->{'purge_all'}->execute(); + # Variant U + $self->uniquecountersreset(0); + # End of variants +} + sub final_cleanup { my ($self) = @_; |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 17:51:03
|
Update of /cvsroot/lxr/lxr/templates In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17480/templates Modified Files: lxr.css Log Message: templates/lxr.css: styles for the new feature for category prefix Index: lxr.css =================================================================== RCS file: /cvsroot/lxr/lxr/templates/lxr.css,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- lxr.css 24 Sep 2013 09:05:52 -0000 1.16 +++ lxr.css 17 Nov 2013 17:51:00 -0000 1.17 @@ -79,6 +79,35 @@ ; margin: 0 } + .fatal +{ color: red +; margin: 2.5cm +; margin-top: 4cm +; padding: 1cm +; border-width: thick +; border-style: solid +; border-color: red +; background-color: #FFFFDD +} + + .warning +{ color: maroon +; margin: 0.5cm +; padding: 0.5cm +; border-width: medium +; border-style: solid +; border-color: orange +; background-color: #FFEEEE +} + + .fatal .headline +, .warning .headline +{ text-align: center +; text-transform: uppercase +; padding-bottom: 0.3cm +; margin: 0 +} + /***********************/ /* headers and footers */ /***********************/ @@ -432,19 +461,34 @@ /* Syntactic highlighting*/ /* comments */ - .comment + [class|=comment] { color: #808080 ; font-style: italic } +/* plain ol'doc (in Perl) */ + .comment-d +{ + font-style: normal +} /* strings */ - .string + [class|=string] { color: #BB0000 } +/* OS command (in Perl) */ + .string-x +{ + color: #BB5500 +} /* reserved words */ .reserved { color: green ; font-weight: bold } +/* extras */ + [class|=extra] +{ color: purple +; font-style: italic +} /*************************/ /* ident. search results */ |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 16:26:49
|
Update of /cvsroot/lxr/lxr/templates In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11819/templates Modified Files: filetype.conf Log Message: templates/filetype.conf: tune file extensions Index: filetype.conf =================================================================== RCS file: /cvsroot/lxr/lxr/templates/filetype.conf,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- filetype.conf 2 Sep 2013 17:21:32 -0000 1.7 +++ filetype.conf 17 Nov 2013 16:26:46 -0000 1.8 @@ -72,7 +72,7 @@ , 'C++' => [ 'C++' - , '\.C$|((?i)\.c\+\+$|\.cc$|\.cpp$|\.cxx$|\.h$|\.hh$|\.hpp?$|\.hxx$|\.h\+\+$)' #' + , '\.C$|((?i)\.c\+\+$|\.cc$|\.cpp$|\.cxx$|\.h$|\.hh$|\.hpp?$|\.hxx$|\.h\+\+$)' , 'LXR::Lang::C' , 4 ] @@ -163,7 +163,7 @@ # No tabwidth specified here as an example 'Make' => [ 'Make' - , '(?i)\.mak$|(?i)\.mk$|[Mm]akefile*' + , '(?i)\.ma?k$|Makefile.*' , 'LXR::Lang::Make' ] , @@ -195,7 +195,7 @@ , 'php' => [ 'PHP' - , '(?i)\.php$|\.php3$|\.phtml$' + , '(?i)\.php3?$|\.phtml$' , 'LXR::Lang::Generic' , 2 ] @@ -224,7 +224,7 @@ # , 'shell' => [ 'shell' - , '(?i)\.sh$|\.bsh$|\.bash$|\.ksh$|\.zsh$|\.m4$' + , '(?i)\.sh$|\.ba?sh$|\.ksh$|\.zsh$|\.m4$' # .m4 added above though it is not properly a shell , 'LXR::Lang::Generic' ] @@ -239,7 +239,7 @@ # , 'SQL' => [ 'SQL' - , '(?i)\.sql$|\.pks$|\.pkb$' + , '(?i)\.sql$|\.pk[bs]$' , 'LXR::Lang::Generic' ] , |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 16:24:49
|
Update of /cvsroot/lxr/lxr/lib/LXR/Lang In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv11702/lib/LXR/Lang Modified Files: generic.conf Log Message: Lang/generic.conf: upgrade language descriptions to generic parser new algorithm Mostly, use new definitions for start and enf of line anchors; add a few reserved words Index: generic.conf =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/generic.conf,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- generic.conf 24 Sep 2013 10:10:10 -0000 1.40 +++ generic.conf 17 Nov 2013 16:24:46 -0000 1.41 @@ -107,11 +107,11 @@ .warning .weak .weakref .word ) ] , 'spec' => - [ { 'comment' => [ '/\*', '\*/'] } + [ { 'comment' => [ '/\\*', '\\*/'] } # Does not address "line comment" since syntax is target-specific , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'\\\\?.'" ] } - , { 'include' => [ '#\s*include\b', '$' ] } + , { 'include' => [ '#\s*include\b', '\n' ] } ] , 'typemap' => { 'd' => 'define' @@ -172,11 +172,11 @@ # bindtextdomain dcgettext dcngettext # --- End of built-in list --- , 'spec' => - [ { 'comment' => [ '#', '$' ] } + [ { 'comment' => [ '#', '\n' ] } , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ '/', '/', '\\\\.' ] } # for regexps in fact - , { 'include' => [ '@include\b', '$' ] } + , { 'include' => [ '@include\b', '\n' ] } ] , 'include' => { 'directive' => '(@include)(\s+)(")((?:\\\\.|.)+)(")' @@ -212,7 +212,7 @@ # } , 'C' => - { 'identdef' => '([_a-zA-Z~]|#\s*)[\w]*' + { 'identdef' => '([_a-zA-Z~]|#\s*)\w*' , 'reserved' => [ qw( auto break @@ -230,15 +230,15 @@ while #include #define #ifdef #else #elif #ifndef #endif #if #undef #error - #pragma + #pragma #warning defined ) ] , 'spec' => - [ { 'comment' => [ '/\*', '\*/'] } - , { 'comment' => [ '//', '$' ] } + [ { 'comment' => [ '/\\*', '\\*/'] } + , { 'comment' => [ '//', '\n' ] } , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'", "'", "\\\\." ] } - , { 'include' => [ '#\s*include\b', '$' ] } + , { 'include' => [ '#\s*include\b', '\n' ] } ] , 'typemap' => { 'c' => 'class' @@ -288,15 +288,15 @@ xor xor_eq #include #define #ifdef #else #elif #ifndef #endif #if #undef #error - #pragma + #pragma #warning defined ) ] , 'spec' => - [ { 'comment' => [ '/\*', '\*/'] } - , { 'comment' => [ '//', '$' ] } + [ { 'comment' => [ '/\\*', '\\*/'] } + , { 'comment' => [ '//', '\n' ] } , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'", "'", "\\\\." ] } - , { 'include' => [ '#\s*include\b', '$' ] } + , { 'include' => [ '#\s*include\b', '\n' ] } ] , 'typemap' => { 'c' => 'class' @@ -339,7 +339,7 @@ # } , 'Cobol' => - { 'identdef' => '[\w]+' + { 'identdef' => '[a-zA-Z]\w+' , 'flags' => [ 'case_insensitive' ] # First line is extended keywords, others are ANSI keywords , 'reserved' => [ qw( @@ -471,7 +471,7 @@ ZERO ZEROES ZEROS ) ] , 'spec' => - [ { 'comment' => [ '^[\d ]*\\*', '$' ] } + [ { 'comment' => [ '\xFF[\d ]*\\*', '\n' ] } , { 'string' => [ '"', '"' ] } ] , 'typemap' => @@ -567,7 +567,7 @@ .EQ. .NE. .GT. .GE. .LE. .LT. ) ] , 'spec' => - [ { 'comment' => [ '^[Cc*]', '$' ] } + [ { 'comment' => [ '\xFF[Cc*]', '\n' ] } , { 'string' => [ "'", "'" ] } # Can't capture Hollerith string with a pattern # Need a specific parser for that @@ -592,7 +592,7 @@ } , 'HTML' => # HTML 4.01 only - { 'identdef' => '[a-zA-Z]\w*' + { 'identdef' => '(?:(?<=</)[a-zA-Z]\w*|(?<=<)[a-zA-Z]\w*)' , 'flags' => [ 'case_insensitive' ] , 'reserved' => [ qw( a abbr acronym address applet @@ -642,7 +642,7 @@ } , 'Java' => - { 'identdef' => '[\w]+' + { 'identdef' => '[a-zA-Z]\w+' # List collected from # http://en.wikibooks.org/wiki/Java_Programming/Keywords , 'reserved' => [ qw( @@ -668,8 +668,8 @@ while )] , 'spec' => - [ { 'comment' => [ '/\*', '\*/'] } - , { 'comment' => [ '//', '$' ] } + [ { 'comment' => [ '/\\*', '\\*/'] } + , { 'comment' => [ '//', '\n' ] } , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'", "'", "\\\\." ] } , { 'include' => [ '\bimport\b', ';' ] } @@ -720,8 +720,8 @@ yield ) ] , 'spec' => - [ { 'comment' => [ '/\*', '\*/'] } - , { 'comment' => [ '//', '$' ] } + [ { 'comment' => [ '/\\*', '\\*/'] } + , { 'comment' => [ '//', '\n' ] } , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'", "'", "\\\\." ] } ] @@ -777,10 +777,10 @@ call eval value ) ] , 'spec' => - [ { 'comment' => [ '#', '$'] } + [ { 'comment' => [ '#', '\n'] } , { 'string' => [ '"', '"' ] } , { 'string' => [ "'", "'" ] } - , { 'include' => [ '(\bs|-)?include\s', '$'] } + , { 'include' => [ '(\bs|-)?include\s', '\n'] } ] # Multiple inclusion is handled in the specific parser. , 'typemap' => { 'm' => 'macro' } @@ -811,7 +811,7 @@ # } , 'Pascal' => - { 'identdef' => '[a-zA-z][\w]+' + { 'identdef' => '[a-zA-z]\w+' , 'flags' => [ 'case_insensitive' ] , 'reserved' => [ qw( and array @@ -838,7 +838,7 @@ , 'spec' => [ { 'comment' => [ '{', '}'] } , { 'comment' => [ '\\(\\*', '\\*\\)' ] } - , { 'comment' => [ '//', '$' ] } + , { 'comment' => [ '//', '\n' ] } , { 'string' => [ "'", "'" ] } , { 'include' => [ '\buses\b', ';' ] } ] @@ -850,7 +850,7 @@ } , 'Perl' => - { 'identdef' => '[-_a-zA-Z][\w]*' + { 'identdef' => '[-_a-zA-Z]\w*' # The following have been derived from the perlfunc and perlsyn documentation # for perl v5.10.0 # AUTOLOAD and DESTROY omitted so that they are tagged @@ -938,22 +938,18 @@ -z ) ] , 'spec' => - [ { 'atom' => '(?:\$#?\w+' - .'|\\\\.' - .'|\b(s|tr|y)\b\s*' + [ { 'atom' => '(?:\\$#?\\w+' +# .'|\\\\.' + .'|\b(?:s|tr|y)(?:\s*' .'(?:(?:\\{(?:\\\\.|.)*?\\}){2}' - .'| (?:\\[(?:\\\\.|.)*?\\]}){2}' - .'| (?:\\((?:\\\\.|.)*?\\)){2}' - .'| (?:\\<(?:\\\\.|.)*?\\>){2}' - .'|(.)(?:(?:\\\\.|.)*?\g{-1}){2}' - .')' - .'|\b(q[qrwx]?|m)\b\s*' - .'(?:\\{(?:\\\\.|.)*?\\}' - .'| \\[(?:\\\\.|.)*?\\]' - .'| \\((?:\\\\.|.)*?\\)' - .'| \\<(?:\\\\.|.)*?\\>' - .'|(.)(?:\\\\.|.)*?\\g{-1}' + .'|(?:\\[(?:\\\\.|.)*?\\]}){2}' + .'|(?:\\((?:\\\\.|.)*?\\)){2}' + .'|(?:\\<(?:\\\\.|.)*?\\>){2}' + .'|([^a-zA-Z0-9])(?:(?:\\\\.|.)*?\g{-1}){2}' .')' + .'|\s+' + .'([a-zA-Z0-9])(?:(?:\\\\.|.)*?\g{-1}){2}' + .')' .')' } # NOTE: This complicated 'atom' is an attempt not to lose control # through quote and regexp operators. It is not 100% @@ -964,10 +960,18 @@ , { 'include' => ['\buse\s+', ';'] } , { 'include' => ['\brequire\s+', ';'] } , { 'string' => ['"', '"', '\\\\.'] } - , { 'string' => ["'", "'", "\\\\."] } - , { 'string' => ['\\`', '\\`', '\\\\.'] } - , { 'comment' => ['#', '$'] } - , { 'comment' => ['^=\w+', '^=cut'] } + , { 'string' => ["'", "'", '\\\\.'] } + , { 'stringx' => ['\\`', '\\`', '\\\\.'] } + , { 'comment' => ['#', '\n'] } + , { 'comment-d' => ['\xFF=\w+', '\xFF=cut\b.*?\n'] } + , { 'extra' => [ '\b(q[qrwx]?|m)\b\s*.' + , sub { 'my $c = substr($frag, -1);' + . '$c = quotemeta($c);' + . '$c =~ tr/(<[{/)>]}/;' + . '$c.\'[a-z]*\'' + } + , '\\\\.' + ] } ] # The following include rules are more efficiently implemented # in the Perl.pm module. They are shown as an example of @@ -990,7 +994,7 @@ } , 'PHP' => - { 'identdef' => '[\w]+' + { 'identdef' => '[a-zA-Z]\w+' # List collected from http://www.php.net , 'reserved' => [ qw( __halt_compiler @@ -1047,20 +1051,20 @@ self parent ) ] , 'spec' => - [ { 'comment' => [ '/\*', '\*/' ] } - , { 'comment' => [ '//', '$' ] } - , { 'comment' => [ '#', '$' ] } + [ { 'comment' => [ '/\\*', '\\*/' ] } + , { 'comment' => [ '//', '\n' ] } + , { 'comment' => [ '#', '\n' ] } # TODO: Heredoc and Nowdoc if it makes sense # to consider them comments , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'", "'", '\\\\.' ] } - , { 'include' => [ '\brequire\b', '$' ] } - , { 'include' => [ '\binclude\b', '$' ] } - , { 'include' => [ '\brequire_once\b', '$' ] } - , { 'include' => [ '\binclude_once\b', '$' ] } + , { 'include' => [ '\brequire\b', '\n' ] } + , { 'include' => [ '\binclude\b', '\n' ] } + , { 'include' => [ '\brequire_once\b', '\n' ] } + , { 'include' => [ '\binclude_once\b', '\n' ] } ], , 'include' => - { 'directive' => '([\w]+)(\s*)(\\(\\s*[\'"])([^\'"]+)("\\s*\\))' + { 'directive' => '(\w+)(\s*)(\\(\\s*[\'"])([^\'"]+)("\\s*\\))' } , 'typemap' => { 'c' => 'class' @@ -1074,7 +1078,7 @@ } , 'Python' => - { 'identdef' => '[\w]+' + { 'identdef' => '[a-zA-Z]\w+' , 'reserved' => [ qw( and as assert break @@ -1095,13 +1099,13 @@ yield ) ] , 'spec' => - [ { 'comment' => [ '#', '$' ] } + [ { 'comment' => [ '#', '\n' ] } , { 'string' => [ '"""', '"""', '\\\\.' ] } , { 'string' => [ "'''", "'''", "\\\\." ] } , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'", "'", "\\\\." ] } - , { 'include' => [ '\bimport\b', '$' ] } - , { 'include' => [ '\bfrom\b', '$' ] } + , { 'include' => [ '\bimport\b', '\n' ] } + , { 'include' => [ '\bfrom\b', '\n' ] } ] # Include rules implemented in Python.pm to cope with an # endlessly looping case under 'include' patterns. @@ -1124,7 +1128,7 @@ # } , 'Ruby' => - { 'identdef' => '[@$]?[a-zA-Z_][\w]*[?!=]?' + { 'identdef' => '[@$]?[a-zA-Z_]\w*[?!=]?' # List collected from # http://en.wikibooks.org/wiki/Ruby_Programming , 'reserved' => [ qw( @@ -1147,8 +1151,8 @@ __FILE__ __LINE__ ) ] , 'spec' => - [ { 'comment' => [ '^=begin\b', '^=end\b'] } - , { 'comment' => [ '#', '$'] } + [ { 'comment' => [ '\xFF=begin\b', '\xFF=end\b'] } + , { 'comment' => [ '#', '\n'] } , { 'string' => [ '"', '"' , '\\\\(?:(?:[CM]-|c)[^\\\\]?|\$|.)' ] } , { 'string' => [ "'", "'" @@ -1164,8 +1168,8 @@ . '([\W]).*?\g{-1}' ] } # , { 'string' => [ "(?<!:):(?:[!%^&*/|+-]|[@$]?[A-Za-z_]+?)", '[A-Za-z_0-9!?=]*(?![A-Za-z_0-9!?=])' ] } - , { 'include' => [ '\brequire\b', '$' ] } - , { 'include' => [ '\bload\b', '$' ] } + , { 'include' => [ '\brequire\b', '\n' ] } + , { 'include' => [ '\bload\b', '\n' ] } ] , 'typemap' => { 'c' => 'class' @@ -1193,7 +1197,7 @@ # } , 'shell' => - { 'identdef' => '[\w]+' + { 'identdef' => '[a-zA-Z]\w+' , 'reserved' => [ qw( break case continue cp @@ -1210,9 +1214,11 @@ while ) ] , 'spec' => - [ { 'comment' => [ '#', '$' ] } - , { 'string' => [ '"', '"' ] } - , { 'string' => [ "'", "'" ] } + [ { 'comment' => [ '#', '\n' ] } + , { 'string' => [ '"', '"', '\\\\.' ] } + , { 'string' => [ "'", "'", '\\\\.' ] } + , { 'extra' => [ 'dnl', '\n' ] } # for .m4 + , { 'atom' => '\\\\.' } ] , 'typemap' => { 'f' => 'function' } , 'langid' => 31 @@ -1242,7 +1248,7 @@ # } , 'SQL' => - { 'identdef' => '[\w]+' + { 'identdef' => '[a-zA-Z]\w+' , 'flags' => [ 'case_insensitive' ] # First line contains some Oracle reserved words. # Following lines contain SQL 89, 92 and 99 keywords @@ -1365,9 +1371,9 @@ ZONE ) ] , 'spec' => - [ { 'comment' => [ '/\*', '\*/' ] } - , { 'comment' => [ '//', '$' ] } - , { 'comment' => [ '--', '$' ] } + [ { 'comment' => [ '/\\*', '\\*/' ] } + , { 'comment' => [ '//', '\n' ] } + , { 'comment' => [ '--', '\n' ] } , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'", "'", "\\\\." ] } ] @@ -1514,7 +1520,7 @@ # VB contributed by Dave Brondsema (2004) 'VB' => - { 'identdef' => '[\w]+' + { 'identdef' => '[a-zA-Z]\w+' , 'reserved' => [ 'AddHandler', 'AddressOf', 'Alias', 'And' , 'AndAlso', 'Ansi', 'As', 'Assembly' @@ -1553,8 +1559,8 @@ , 'Xor' ] , 'spec' => - [ { 'comment' => [ '\brem\b', '$' ] } - , { 'comment' => [ "'", "\$" ] } + [ { 'comment' => [ '\brem\b', '\n' ] } + , { 'comment' => [ "'", '\n' ] } , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'", "'", "\\\\." ] } ] @@ -1626,7 +1632,7 @@ z-index ) ] , 'spec' => - [ { 'comment' => [ '/\*', '\*/'] } + [ { 'comment' => [ '/\\*', '\\*/'] } , { 'string' => [ '"', '"', '\\\\.' ] } , { 'string' => [ "'", "'", "\\\\." ] } ] |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 15:57:46
|
Update of /cvsroot/lxr/lxr/scripts In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv10262/scripts Modified Files: Tagger.pm Log Message: genxref, scripts/Tagger.pm: optimise indexing step for speed (notably decreasing number of COMMITs); keep both components in sync Index: Tagger.pm =================================================================== RCS file: /cvsroot/lxr/lxr/scripts/Tagger.pm,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Tagger.pm 24 Sep 2013 15:35:38 -0000 1.2 +++ Tagger.pm 17 Nov 2013 15:57:42 -0000 1.3 @@ -41,18 +41,27 @@ if ($index) { my $fileid = $index->fileid($pathname, $revision); - $index->setfilerelease($fileid, $releaseid); if (!$index->fileindexed($fileid)) { # $index->emptycache(); - print(STDERR " ${VTgreen}$fileid${VTnorm}\n"); + print(STDERR " ${VTgreen}$fileid${VTnorm}"); my $path = $files->realfilename($pathname, $releaseid); - $lang->indexfile($pathname, $path, $fileid, $index, $config); - $index->setfileindexed($fileid); - $index->flushcache(); - $index->commit; + if (defined($path)) { + my $ns = $lang->indexfile($pathname, $path, $fileid, $index, $config); + print(STDERR ' :: ', $ns, "\n"); + $index->flushcache(0); + $index->setfileindexed($fileid); +### The following line is commented out to improve performance. +### The consequence is a higher load on memory since DB updates +### are kept in memory until commit time (at least on directory +### exit). +# $index->commit(); +### This line is ABSOLUTELY mandatory in case multi-thread is publicly released + } else { + print(STDERR " ${VTred}FAILED${VTnorm}\n"); + } $files->releaserealfilename($path); } else { print(STDERR " ${VTyellow}already indexed${VTnorm}\n"); @@ -81,25 +90,34 @@ my $fileid = $index->fileid($pathname, $revision); if (!$index->filereferenced($fileid)) { -# $index->emptycache(); print(STDERR " ${VTgreen}$fileid${VTnorm} "); my $path = $files->realfilename($pathname, $releaseid); - - print ( STDERR - '+++ ' - , $lang->referencefile - ( $pathname - , $path - , $fileid - , $index - , $config - ) - , "\n" - ); - $index->setfilereferenced($fileid); - $index->flushcache(); - $index->commit; + if (defined($path)) { + my ($ln, $ns) = $lang->referencefile + ( $pathname + , $path + , $fileid + , $index + , $config + ); + if (0 > $ln) { + # This happens sometimes in CVS + print(STDERR " ${VTred}### FAILED${VTnorm}\n"); + } else { + print(STDERR "+++ $ln/$ns\n"); + } + $index->flushcache(0); + $index->setfilereferenced($fileid); +### The following line is commented out to improve performance. +### The consequence is a higher load on memory since DB updates +### are kept in memory until commit time (at least on directory +### exit). +# $index->commit(); +### This line is ABSOLUTELY mandatory in case multi-thread is publicly released + } else { + print(STDERR " ${VTred}FAILED${VTnorm}\n"); + } $files->releaserealfilename($path); } else { print(STDERR " ${VTyellow}already referenced${VTnorm}\n"); |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 15:50:24
|
Update of /cvsroot/lxr/lxr/scripts In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9872/scripts Modified Files: recreatedb.pl Log Message: scripts/recreatedb.pl: fix various bugs Fix erroneous extension of output script Insert missing symbols into global dictionary Output in a fresh file (not adding at end) Make possible a customised DB engine per tree Index: recreatedb.pl =================================================================== RCS file: /cvsroot/lxr/lxr/scripts/recreatedb.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- recreatedb.pl 2 Sep 2013 17:07:51 -0000 1.8 +++ recreatedb.pl 17 Nov 2013 15:50:21 -0000 1.9 @@ -192,10 +192,13 @@ # If lxr-ctx not given, use default companion filename if (! $lxrctx) { $lxrctx = $lxrconf; - $lxrctx =~ s/\.[^.]*$//; # Remove extension - $lxrctxdft =~ s/^[^.]*//; # Context file extension - $lxrctx =~ s/$/$lxrctxdft/; # Insert correct extension - if ($lxrctx !~ m!/!) { + my $extpos = rindex($lxrctx, '.'); + if (0 <= $extpos) { # Remove the extension + $lxrctx = substr($lxrctx, 0, $extpos); + } + $extpos = rindex($lxrctxdft, '.'); # Default extension + $lxrctx .= substr($lxrctxdft, $extpos); # Insert correct extension + if (0 >= index($lxrctx, '/')) { $lxrctx = $confdir . '/' . $lxrctx; } } @@ -375,10 +378,15 @@ , '%_nodbuser%' => $nodbuser , '%_nodbprefix%' => $nodbprefix , '%_shell%' => 1 - ); -my $sample; -$markers{'%LXRroot%'} = $rootdir; + # Global parameters: directories, server URL + # (may be overwritten, but not recommended!) + , '%LXRconfUser%' => getlogin # OS-user running configuration + , '%LXRroot%' => $rootdir + , '%LXRtmpldir%' => $tmpldir + , '%LXRovrdir%' => $ovrdir + , '%LXRconfdir%' => $confdir + ); $markers{'%DB_name%'} = $dbname if $dbname; $markers{'%DB_user%'} = $dbuser if $dbuser; @@ -394,8 +402,9 @@ ############################################################## unlink "${confdir}/${scriptout}"; -open(DEST, '>>', "${confdir}/${scriptout}") +open(DEST, '>', "${confdir}/${scriptout}") or die("${VTred}ERROR:${VTnorm} couldn't open output file \"${confdir}/$scriptout\"\n"); +print DEST "#!/bin/sh\n"; if ($verbose) { print "\n"; @@ -451,9 +460,9 @@ $dbengine_seen{$treedbengine} = 1; } - my $input = $ovrdir . "/initdb/initdb-${dbengine}-template.sql"; + my $input = $ovrdir . "/initdb/initdb-${treedbengine}-template.sql"; if (! -e $input) { - $input = $tmpldir . "/initdb/initdb-${dbengine}-template.sql"; + $input = $tmpldir . "/initdb/initdb-${treedbengine}-template.sql"; } open(SOURCE, '<', $input) or die("${VTred}ERROR:${VTnorm} couldn't open script template file \"${input}\"\n"); |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 15:43:22
|
Update of /cvsroot/lxr/lxr/templates/lighttpd In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv9306/templates/lighttpd Modified Files: lighttpd-lxrserver.conf Log Message: templates/lighttpd/lighttpd-lxrserver.conf: improve LCL readability Index: lighttpd-lxrserver.conf =================================================================== RCS file: /cvsroot/lxr/lxr/templates/lighttpd/lighttpd-lxrserver.conf,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- lighttpd-lxrserver.conf 24 Sep 2013 09:56:15 -0000 1.11 +++ lighttpd-lxrserver.conf 17 Nov 2013 15:43:19 -0000 1.12 @@ -560,7 +560,12 @@ ## for all 'virtroot' to be served by the same LXR server ## located in the root directory. #@ENDIF -#@IF %_shared% &&('N' eq "%_routing%" || 'A' eq "%_routing%" ||('H' eq "%_routing%" || 'P' eq "%_routing%") && %_commonvirtroot%) +#@IF %_shared% \ + #@ && ( 'N' eq "%_routing%" \ + #@ || 'A' eq "%_routing%" \ + #@ || ('H' eq "%_routing%" || 'P' eq "%_routing%") \ + #@ && %_commonvirtroot% \ + #@ ) alias.url += ("%virtrootbase%/" => "%LXRroot%/") #@ENDIF #@PASS2 here_alias |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 15:33:58
|
Update of /cvsroot/lxr/lxr/templates/initdb In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8585/templates/initdb Modified Files: initdb-m-template.sql initdb-p-template.sql initdb-s-template.sql Added Files: unique-user-sequences.sql Log Message: templates/initdb/initdb-*-template.sql, unique-user-sequences.sql: implement manually managed unique record ids in tables New template unique-server-sequences.sql contain storage description for the counters. --- NEW FILE: unique-user-sequences.sql --- /*- -*- tab-width: 4 -*- */ /* * SQL template for user management of unique record numbers * (C) 2013-2013 A. Littoz * $Id: unique-user-sequences.sql,v 1.1 2013/11/17 15:33:55 ajlittoz Exp $ * * This template is intended to be included in other SQL templates * and further customised by Perl script initdb-config.pl. * It creates the tables for replacement of built-in auto increment * fields as experiments showed a substantial performance boost. * Explanation: * LXR writes into the database only at genxref time and * does this with massive insertion in a short period and * nobody else than genxref ever writes to the DB (*). * Consequently, playing with COMMIT frequency results in * fewer I/O and higher processing speed. * (*) If somebody fancies to try to write while genxref is active, * this assertion is broken and the DB will become an unusable * mess. * * This strategy is incompatible with multi-threading if it is * ever reconsidered. * * The specific DB managers in Index/ must be adapted to the * presence of these extra tables. */ /* ************************************************************** * 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, see <http://www.gnu.org/licences/>. * ************************************************************** -*/ /*--*/ /*--*/ drop table if exists %DB_tbl_prefix%filenum; drop table if exists %DB_tbl_prefix%symnum; drop table if exists %DB_tbl_prefix%typenum; create table %DB_tbl_prefix%filenum ( rcd int primary key , fid int ); insert into %DB_tbl_prefix%filenum (rcd, fid) VALUES (0, 0); create table %DB_tbl_prefix%symnum ( rcd int primary key , sid int ); insert into %DB_tbl_prefix%symnum (rcd, sid) VALUES (0, 0); create table %DB_tbl_prefix%typenum ( rcd int primary key , tid int ); insert into %DB_tbl_prefix%typenum (rcd, tid) VALUES (0, 0); Index: initdb-m-template.sql =================================================================== RCS file: /cvsroot/lxr/lxr/templates/initdb/initdb-m-template.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- initdb-m-template.sql 17 Nov 2013 09:28:36 -0000 1.5 +++ initdb-m-template.sql 17 Nov 2013 15:33:55 -0000 1.6 @@ -1,7 +1,7 @@ /*- -*- tab-width: 4 -*- */ /*- * SQL template for creating MySQL tables - * (C) 2012 A. Littoz + * (C) 2012-2013 A. Littoz * $Id$ * * This template is intended to be customised by Perl script @@ -126,12 +126,27 @@ /*--*/ use %DB_name%; +/*@IF 0 */ +/*@ DEFINE autoinc='auto_increment'*/ +/*@ELSE*/ +/*- Unique record id user management (initially developed for SQLite) -*/ +/*@ DEFINE autoinc=' '*/ +/*@ADD initdb/unique-user-sequences.sql*/ +alter table %DB_tbl_prefix%filenum + engine = MyISAM; +alter table %DB_tbl_prefix%symnum + engine = MyISAM; +alter table %DB_tbl_prefix%typenum + engine = MyISAM; + +/*@ENDIF*/ + /* Base version of files */ /* revision: a VCS generated unique id for this version of the file */ create table %DB_tbl_prefix%files - ( fileid int auto_increment not null primary key + ( fileid int %autoinc% not null primary key , filename varbinary(255) not null , revision varbinary(255) not null , constraint %DB_tbl_prefix%uk_files @@ -223,7 +238,7 @@ /* declaration: provided by generic.conf */ create table %DB_tbl_prefix%langtypes - ( typeid smallint not null auto_increment + ( typeid smallint not null %autoinc% , langid tinyint unsigned not null , declaration varchar(255) not null , constraint %DB_tbl_prefix%pk_langtypes @@ -237,7 +252,7 @@ * symname: symbol name */ create table %DB_tbl_prefix%symbols - ( symid int not null auto_increment primary key + ( symid int not null %autoinc% primary key , symcount int , symname varbinary(255) not null unique ) @@ -332,6 +347,19 @@ begin set @old_check = @@session.foreign_key_checks; set session foreign_key_checks = OFF; +/*@IF 0 */ +/*@ELSE*/ +/*- Unique record id user management -*/ + truncate table %DB_tbl_prefix%filenum; + truncate table %DB_tbl_prefix%symnum; + truncate table %DB_tbl_prefix%typenum; + insert into %DB_tbl_prefix%filenum + (rcd, fid) VALUES (0, 0); + insert into %DB_tbl_prefix%symnum + (rcd, sid) VALUES (0, 0); + insert into %DB_tbl_prefix%typenum + (rcd, tid) VALUES (0, 0); +/*@ENDIF*/ truncate table %DB_tbl_prefix%definitions; truncate table %DB_tbl_prefix%usages; truncate table %DB_tbl_prefix%langtypes; Index: initdb-p-template.sql =================================================================== RCS file: /cvsroot/lxr/lxr/templates/initdb/initdb-p-template.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- initdb-p-template.sql 17 Nov 2013 15:17:24 -0000 1.5 +++ initdb-p-template.sql 17 Nov 2013 15:33:55 -0000 1.6 @@ -140,9 +140,30 @@ -*//*- to activate place "- * /" at end of line (without spaces) /*@XQT psql -q -U postgres %DB_name% <<END_OF_TABLES*/ /*- end of disable/enable comment -*/ +/*- NOTE: a substantial performance gain resulted in + - not using SERIAL autoincrementing fields, numbering + - them with unique ids obtained from SEQUENCEs. + - A further marginal gain was possible replacing the + - sequences with user managed numbering. + - The reasons was in the drastic decrease in COMMIT statements. + - CAUTION! Since sequence number update is committed to the DB with + - low frequency, this optimisation is not compatible with + - multiple DB writes, i.e. multi-threading or concurrent + - table loading. + -*/ +/*@IF 0 */ +/*- Built-in unique record id management -*/ drop sequence if exists %DB_tbl_prefix%filenum; drop sequence if exists %DB_tbl_prefix%symnum; drop sequence if exists %DB_tbl_prefix%typenum; +create sequence %DB_tbl_prefix%filenum; +create sequence %DB_tbl_prefix%symnum; +create sequence %DB_tbl_prefix%typenum; +/*@ELSE*/ +/*- The following is a replacement (initially developed for SQLite) -*/ +/*@ADD initdb/unique-user-sequences.sql*/ +/*@ENDIF*/ + drop table if exists %DB_tbl_prefix%files cascade; drop table if exists %DB_tbl_prefix%symbols cascade; drop table if exists %DB_tbl_prefix%definitions cascade; @@ -151,10 +172,6 @@ drop table if exists %DB_tbl_prefix%status cascade; drop table if exists %DB_tbl_prefix%langtypes cascade; -create sequence %DB_tbl_prefix%filenum cache 500; -create sequence %DB_tbl_prefix%symnum cache 500; -create sequence %DB_tbl_prefix%typenum cache 10; - /* Base version of files */ /* revision: a VCS generated unique id for this version @@ -233,7 +250,7 @@ ( fileid int not null , releaseid bytea not null , constraint %DB_tbl_prefix%pk_releases - primary key (fileid,releaseid) + primary key (fileid, releaseid) , constraint %DB_tbl_prefix%fk_rls_fileid foreign key (fileid) references %DB_tbl_prefix%files(fileid) @@ -502,6 +519,9 @@ for each row execute procedure %DB_tbl_prefix%decusage(); +/* + * + */ grant select on %DB_tbl_prefix%files to public; grant select on %DB_tbl_prefix%symbols to public; grant select on %DB_tbl_prefix%definitions to public; Index: initdb-s-template.sql =================================================================== RCS file: /cvsroot/lxr/lxr/templates/initdb/initdb-s-template.sql,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- initdb-s-template.sql 17 Nov 2013 11:12:07 -0000 1.4 +++ initdb-s-template.sql 17 Nov 2013 15:33:55 -0000 1.5 @@ -30,9 +30,6 @@ /*--*/ /*@XQT echo "*** SQLite - Configuring tables %DB_tbl_prefix% in database %DB_name%"*/ /*@XQT sqlite3 %DB_name% <<END_OF_TABLES*/ -drop table if exists %DB_tbl_prefix%filenum; -drop table if exists %DB_tbl_prefix%symnum; -drop table if exists %DB_tbl_prefix%typenum; drop table if exists %DB_tbl_prefix%files; drop table if exists %DB_tbl_prefix%symbols; drop table if exists %DB_tbl_prefix%definitions; @@ -41,26 +38,8 @@ drop table if exists %DB_tbl_prefix%status; drop table if exists %DB_tbl_prefix%langtypes; -create table %DB_tbl_prefix%filenum - ( rcd int primary key - , fid int - ); -insert into %DB_tbl_prefix%filenum - (rcd, fid) VALUES (0, 0); - -create table %DB_tbl_prefix%symnum - ( rcd int primary key - , sid int - ); -insert into %DB_tbl_prefix%symnum - (rcd, sid) VALUES (0, 0); - -create table %DB_tbl_prefix%typenum - ( rcd int primary key - , tid int - ); -insert into %DB_tbl_prefix%typenum - (rcd, tid) VALUES (0, 0); +/*- Tables for unique ids management -*/ +/*@ADD initdb/unique-user-sequences.sql*/ /* Base version of files */ /* revision: a VCS generated unique id for this version |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 15:17:27
|
Update of /cvsroot/lxr/lxr/templates/initdb In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7723/templates/initdb Modified Files: initdb-p-template.sql Log Message: templates/html/initdb-p-template.sql: fix for PostgreSQL releases prior to 9.0 In these older releases, plpgsql language manager is not loaded by default. Insert commands in script output to fix the issue. Index: initdb-p-template.sql =================================================================== RCS file: /cvsroot/lxr/lxr/templates/initdb/initdb-p-template.sql,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- initdb-p-template.sql 17 Nov 2013 11:12:07 -0000 1.4 +++ initdb-p-template.sql 17 Nov 2013 15:17:24 -0000 1.5 @@ -52,19 +52,28 @@ /*--*/ /*--*/ +/*- ------------------------------------------------------------- + *- Note about createlang below + *- Prior to PostgreSQL release 9.0, the SQL driver is not loaded + *- by default. It is therefore necessary to run command createlang. + *- This is superfluous with releases >= 9.0 and results in an + *- harmless warning which can be ignored + *- -----------------------------------------------------------*/ /*- Create databases under LXR user but it prevents from deleting user if databases exist -*//*- to activate place "- * /" at end of line (without spaces) -*/ /*@IF %_createglobals% && %_globaldb% */ /*@XQT echo "*** PostgreSQL - Creating global database %DB_name%"*/ -/*@XQT dropdb -U %DB_user% %DB_name%*/ -/*@XQT createdb -U %DB_user% %DB_name%*/ +/*@XQT dropdb -U %DB_user% %DB_name%*/ +/*@XQT createdb -U %DB_user% %DB_name%*/ +/*@XQT createlang -U %DB_user% -d %DB_name% plpgsql*/ /*@ENDIF*/ /*@IF !%_globaldb% */ /*@IF %_dbuseroverride% */ /*@XQT echo "*** PostgreSQL - Creating tree database %DB_name%"*/ -/*@XQT dropdb -U %DB_tree_user% %DB_name%*/ -/*@XQT createdb -U %DB_tree_user% %DB_name%*/ +/*@XQT dropdb -U %DB_tree_user% %DB_name%*/ +/*@XQT createdb -U %DB_tree_user% %DB_name%*/ +/*@XQT createlang -U %DB_tree_user% -d %DB_name% plpgsql*/ /*@ELSE*/ /*- When an overriding username is already known, %_dbuseroverride% is left * equal to zero to prevent generating a duplicate user. We must however @@ -72,11 +81,13 @@ * DB owner. -*/ /*@XQT echo "*** PostgreSQL - Creating tree database %DB_name%"*/ /*@IF %DB_tree_user% */ -/*@XQT dropdb -U %DB_tree_user% %DB_name%*/ -/*@XQT createdb -U %DB_tree_user% %DB_name%*/ +/*@XQT dropdb -U %DB_tree_user% %DB_name%*/ +/*@XQT createdb -U %DB_tree_user% %DB_name%*/ +/*@XQT createlang -U %DB_tree_user% -d %DB_name% plpgsql*/ /*@ELSE*/ -/*@XQT dropdb -U %DB_user% %DB_name%*/ -/*@XQT createdb -U %DB_user% %DB_name%*/ +/*@XQT dropdb -U %DB_user% %DB_name%*/ +/*@XQT createdb -U %DB_user% %DB_name%*/ +/*@XQT createlang -U %DB_user% -d %DB_name% plpgsql*/ /*@ENDIF %DB_tree_user% */ /*@ENDIF %_dbuseroverride% */ /*@ENDIF !%_globaldb% */ @@ -88,13 +99,15 @@ -*//*- to activate place "- * /" at end of line (without spaces) /*@IF %_createglobals% && %_globaldb% */ /*@XQT echo "*** PostgreSQL - Creating global database %DB_name%"*/ -/*@XQT dropdb -U postgres %DB_name%*/ -/*@XQT createdb -U postgres %DB_name%*/ +/*@XQT dropdb -U postgres %DB_name%*/ +/*@XQT createdb -U postgres %DB_name%*/ +/*@XQT createlang -U postgres -d %DB_name% plpgsql*/ /*@ENDIF*/ /*@IF !%_globaldb% */ /*@XQT echo "*** PostgreSQL - Creating tree database %DB_name%"*/ -/*@XQT dropdb -U postgres %DB_name%*/ -/*@XQT createdb -U postgres %DB_name%*/ +/*@XQT dropdb -U postgres %DB_name%*/ +/*@XQT createdb -U postgres %DB_name%*/ +/*@XQT createlang -U postgres -d %DB_name% plpgsql*/ /*@ENDIF !%_globaldb% */ /*- end of disable/enable comment -*/ /*--*/ |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 11:12:11
|
Update of /cvsroot/lxr/lxr/templates/initdb In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv23311/templates/initdb Modified Files: initdb-o-template.sql initdb-p-template.sql initdb-s-template.sql Log Message: templates/initdb/initdb-o-template.sql, initdb-p-template.sql, initdb-s-template.sql: manage "relation" reference count directly from SQL trigger instead of from Perl programming Index: initdb-o-template.sql =================================================================== RCS file: /cvsroot/lxr/lxr/templates/initdb/initdb-o-template.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- initdb-o-template.sql 11 Jan 2013 12:08:48 -0000 1.3 +++ initdb-o-template.sql 17 Nov 2013 11:12:07 -0000 1.4 @@ -1,7 +1,7 @@ /*- -*- tab-width: 4 -*- -*/ /*- * SQL template for creating Oracle tables - * (C) 2012 A. Littoz + * (C) 2012-2013 A. Littoz * $Id$ * * This template is intended to be customised by Perl script @@ -222,10 +222,33 @@ unique (symnane) ); +create index %DB_tbl_prefix%symlookup + on %DB_tbl_prefix%files(symname); + /* The following function decrements the symbol reference count + * for a definition * (to be used in triggers). */ -create or replace procedure %DB_tbl_prefix%decsym() +create or replace procedure %DB_tbl_prefix%decdecl() +as +begin + update %DB_tbl_prefix%symbols + set symcount = symcount - 1 + where symid = old.symid + and symcount > 0; + if old.relid is not null + then update %DB_tbl_prefix%symbols + set symcount = symcount - 1 + where symid = old.relid + and symcount > 0; + end if; +end; + +/* The following function decrements the symbol reference count + * for a usage + * (to be used in triggers). + */ +create or replace procedure %DB_tbl_prefix%decusage() as begin update %DB_tbl_prefix%symbols @@ -233,7 +256,6 @@ where symid = old.symid and symcount > 0; end; -/ commit; @@ -275,7 +297,7 @@ create or replace trigger %DB_tbl_prefix%remove_definition after delete on %DB_tbl_prefix%definitions for each row - execute procedure %DB_tbl_prefix%decsym(); + execute procedure %DB_tbl_prefix%decdecl(); commit; @@ -301,7 +323,7 @@ create or replace trigger %DB_tbl_prefix%remove_usage after delete on %DB_tbl_prefix%usages for each row - execute procedure %DB_tbl_prefix%decsym(); + execute procedure %DB_tbl_prefix%decusage(); commit; Index: initdb-p-template.sql =================================================================== RCS file: /cvsroot/lxr/lxr/templates/initdb/initdb-p-template.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- initdb-p-template.sql 11 Jan 2013 12:08:48 -0000 1.3 +++ initdb-p-template.sql 17 Nov 2013 11:12:07 -0000 1.4 @@ -1,7 +1,7 @@ /*- -*- tab-width: 4 -*- -*/ /*- * SQL template for creating PostgreSQL tables - * (C) 2012 A. Littoz + * (C) 2012-2013 A. Littoz * $Id$ * * This template is intended to be customised by Perl script @@ -321,12 +321,16 @@ , constraint %DB_tbl_prefix%uk_symbols unique (symname) ); +-- create index %DB_tbl_prefix%symlookup +-- on %DB_tbl_prefix%symbols +-- using btree (symname); /* The following function decrements the symbol reference count + * for a definition * (to be used in triggers). */ -drop function if exists %DB_tbl_prefix%decsym(); -create function %DB_tbl_prefix%decsym() +drop function if exists %DB_tbl_prefix%decdecl(); +create function %DB_tbl_prefix%decdecl() returns trigger language PLpgSQL /*@IF %_shell% */ @@ -339,7 +343,39 @@ set symcount = symcount - 1 where symid = old.symid and symcount > 0; - return old; + if old.relid is not null + then update %DB_tbl_prefix%symbols + set symcount = symcount - 1 + where symid = old.relid + and symcount > 0; + end if; + return new; + end; +/*@IF %_shell% */ + \$\$; +/*@ELSE*/ + $$; +/*@ENDIF %_shell% */ + +/* The following function decrements the symbol reference count + * for a usage + * (to be used in triggers). + */ +drop function if exists %DB_tbl_prefix%decusage(); +create function %DB_tbl_prefix%decusage() + returns trigger + language PLpgSQL +/*@IF %_shell% */ + as \$\$ +/*@ELSE*/ + as $$ +/*@ENDIF %_shell% */ + begin + update %DB_tbl_prefix%symbols + set symcount = symcount - 1 + where symid = old.symid + and symcount > 0; + return new; end; /*@IF %_shell% */ \$\$; @@ -383,12 +419,32 @@ /* The following trigger maintains correct symbol reference count * after definition deletion. */ +-- drop function if exists %DB_tbl_prefix%proxy_rem_def(); +-- create function %DB_tbl_prefix%proxy_rem_def() +-- returns trigger +-- language PLpgSQL +-- /*@IF %_shell% */ +-- as \$\$ +-- /*@ELSE*/ +-- as $$ +-- /*@ENDIF %_shell% */ +-- begin +-- perform %DB_tbl_prefix%decsym(old.symid); +-- if old.relid is not null +-- then perform %DB_tbl_prefix%decsym(old.relid); +-- end if; +-- end; +-- /*@IF %_shell% */ +-- \$\$; +-- /*@ELSE*/ +-- $$; +-- /*@ENDIF %_shell% */ drop trigger if exists %DB_tbl_prefix%remove_definition on %DB_tbl_prefix%definitions; create trigger %DB_tbl_prefix%remove_definition after delete on %DB_tbl_prefix%definitions for each row - execute procedure %DB_tbl_prefix%decsym(); + execute procedure %DB_tbl_prefix%decdecl(); /* Usages */ create table %DB_tbl_prefix%usages @@ -409,12 +465,29 @@ /* The following trigger maintains correct symbol reference count * after usage deletion. */ +-- drop function if exists %DB_tbl_prefix%proxy_rem_usg(); +-- create function %DB_tbl_prefix%proxy_rem_usg() +-- returns trigger +-- language PLpgSQL +-- /*@IF %_shell% */ +-- as \$\$ +-- /*@ELSE*/ +-- as $$ +-- /*@ENDIF %_shell% */ +-- begin +-- perform %DB_tbl_prefix%decsym(old.symid); +-- end; +-- /*@IF %_shell% */ +-- \$\$; +-- /*@ELSE*/ +-- $$; +-- /*@ENDIF %_shell% */ drop trigger if exists %DB_tbl_prefix%remove_usage on %DB_tbl_prefix%usages; create trigger %DB_tbl_prefix%remove_usage after delete on %DB_tbl_prefix%usages for each row - execute procedure %DB_tbl_prefix%decsym(); + execute procedure %DB_tbl_prefix%decusage(); grant select on %DB_tbl_prefix%files to public; grant select on %DB_tbl_prefix%symbols to public; Index: initdb-s-template.sql =================================================================== RCS file: /cvsroot/lxr/lxr/templates/initdb/initdb-s-template.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- initdb-s-template.sql 11 Jan 2013 12:08:48 -0000 1.3 +++ initdb-s-template.sql 17 Nov 2013 11:12:07 -0000 1.4 @@ -1,7 +1,7 @@ /*- -*- tab-width: 4 -*- */ /* * SQL template for creating MySQL tables - * (C) 2012 A. Littoz + * (C) 2012-2013 A. Littoz * $Id$ * * This template is intended to be customised by Perl script @@ -181,6 +181,8 @@ , symcount int , symname varchar(255) not null unique ); +create index %DB_tbl_prefix%symlookup + on %DB_tbl_prefix%symbols(symname); /* Definitions */ /* symid, fileid and line define the location of the declaration @@ -226,6 +228,11 @@ set symcount = symcount - 1 where symid = old.symid and symcount > 0; + update %DB_tbl_prefix%symbols + set symcount = symcount - 1 + where symid = old.relid + and symcount > 0 + and old.relid is not null; end; /* Usages */ |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 09:28:40
|
Update of /cvsroot/lxr/lxr/templates/initdb In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16021/templates/initdb Modified Files: initdb-m-template.sql Log Message: templates/initdb/initdb-m-template.sql: manage "relation" reference count directly from SQL trigger instead of from Perl programming; remove an unnecessary index Index: initdb-m-template.sql =================================================================== RCS file: /cvsroot/lxr/lxr/templates/initdb/initdb-m-template.sql,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- initdb-m-template.sql 21 Jan 2013 16:35:04 -0000 1.4 +++ initdb-m-template.sql 17 Nov 2013 09:28:36 -0000 1.5 @@ -278,7 +278,6 @@ , constraint %DB_tbl_prefix%fk_defn_fileid foreign key (fileid) references %DB_tbl_prefix%files(fileid) - , index (typeid, langid) , constraint %DB_tbl_prefix%fk_defn_type foreign key (typeid, langid) references %DB_tbl_prefix%langtypes(typeid, langid) @@ -291,11 +290,18 @@ /* The following trigger maintains correct symbol reference count * after definition deletion. */ +delimiter // drop trigger if exists %DB_tbl_prefix%remove_definition; create trigger %DB_tbl_prefix%remove_definition after delete on %DB_tbl_prefix%definitions for each row - call %DB_tbl_prefix%decsym(old.symid); + begin + call %DB_tbl_prefix%decsym(old.symid); + if old.relid is not null + then call %DB_tbl_prefix%decsym(old.relid); + end if; + end// +delimiter ; /* Usages */ create table %DB_tbl_prefix%usages |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 09:21:22
|
Update of /cvsroot/lxr/lxr/templates/html In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15527/templates/html Modified Files: html-fatal.html html-tail.html Log Message: templates/html/html-fatal.html, html-tail.html: use full SourceForge URLs in links instead of abbreviated form Index: html-fatal.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html/html-fatal.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- html-fatal.html 24 Sep 2013 09:52:49 -0000 1.4 +++ html-fatal.html 17 Nov 2013 09:21:18 -0000 1.5 @@ -71,10 +71,10 @@ <td class="leftmost"> <p> This page was automatically generated by the $LXRversion - <a href="http://lxr.sf.net/">LXR engine</a>. + <a href="http://lxr.sourceforge.net/">LXR engine</a>. </p> <address> - <a href="mailto:lxr...@li...">The LXR team</a> + <a href="mailto:lxr...@li...">The LXR team</a> </address> </td> <td class="rightmost"> Index: html-tail.html =================================================================== RCS file: /cvsroot/lxr/lxr/templates/html/html-tail.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- html-tail.html 14 Nov 2012 11:28:13 -0000 1.5 +++ html-tail.html 17 Nov 2013 09:21:18 -0000 1.6 @@ -33,10 +33,10 @@ <td class="leftmost"> <p> This page was automatically generated by the $LXRversion - <a href="http://lxr.sf.net/">LXR engine</a>. + <a href="http://lxr.sourceforge.net/">LXR engine</a>. </p> <address> - <a href="mailto:lxr...@li...">The LXR team</a> + <a href="mailto:lxr...@li...">The LXR team</a> </address> </td> <td class="rightmost"> |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 09:15:59
|
Update of /cvsroot/lxr/lxr/templates/Apache In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15179/templates/Apache Modified Files: apache-lxrserver.conf htaccess-generic Log Message: templates/Apache/*: improve LCL readability Index: apache-lxrserver.conf =================================================================== RCS file: /cvsroot/lxr/lxr/templates/Apache/apache-lxrserver.conf,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- apache-lxrserver.conf 3 Sep 2013 08:56:16 -0000 1.7 +++ apache-lxrserver.conf 17 Nov 2013 09:15:55 -0000 1.8 @@ -8,7 +8,8 @@ # directive syntax and semantics changed between releases. # When updating 2.2 -> 2.4, uncomment 2.4 specific lines #@IF !%Apache24% -#@ ASK,Apache24 Is your Apache version 2.4 or higher?; 1; yes, no; y, n +#@ ASK,Apache24 Is your Apache version 2.4 or higher?\ + #@ ; 1; yes, no; y, n #@ENDIF # ================================================= @@ -133,7 +134,12 @@ # ------- URL mapping to LXR directory ------ # #@ ENDIF -#@ IF %_shared% &&('N' eq "%_routing%" || 'A' eq "%_routing%" ||('H' eq "%_routing%" || 'P' eq "%_routing%") && %_commonvirtroot%) +#@ IF %_shared% \ + #@ && ( 'N' eq "%_routing%" \ + #@ || 'A' eq "%_routing%" \ + #@ || ('H' eq "%_routing%" || 'P' eq "%_routing%") \ + #@ && %_commonvirtroot% \ + #@ ) Alias %virtrootbase% "%LXRroot%" #@ ENDIF #@ENDIF Index: htaccess-generic =================================================================== RCS file: /cvsroot/lxr/lxr/templates/Apache/htaccess-generic,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- htaccess-generic 3 Sep 2013 08:56:16 -0000 1.7 +++ htaccess-generic 17 Nov 2013 09:15:55 -0000 1.8 @@ -13,7 +13,8 @@ # directive syntax and semantics changed between releases. # When updating 2.2 -> 2.4, uncomment 2.4 specific lines #@IF !%Apache24% -#@ ASK,Apache24 Is your Apache version 2.4 or higher?; 1; yes, no; y, n +#@ ASK,Apache24 Is your Apache version 2.4 or higher?\ + #@ ; 1; yes, no; y, n #@ENDIF |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 09:13:24
|
Update of /cvsroot/lxr/lxr/templates In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14984/templates Modified Files: datastorage.conf.part lxr.conf lxrkernel.conf tree-server1.conf.part Log Message: templates/lxr.conf, lxrkernel.conf & others: fix syntax errors in LCL Index: datastorage.conf.part =================================================================== RCS file: /cvsroot/lxr/lxr/templates/datastorage.conf.part,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- datastorage.conf.part 7 Nov 2013 17:45:41 -0000 1.3 +++ datastorage.conf.part 17 Nov 2013 09:13:21 -0000 1.4 @@ -43,7 +43,7 @@ #@s: #@ IF !%_globaldb% #@ ASK,DB_name --- Database file? (e.g. /home/myself/storage.db); -2\ - #@ ; ^/,absolute file path required + #@ ; ^/,absolute file path required\ #@ , [^/]$,must be a file #@ CANONR,DB_name ',\' #@ ENDIF Index: lxr.conf =================================================================== RCS file: /cvsroot/lxr/lxr/templates/lxr.conf,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- lxr.conf 7 Nov 2013 17:45:41 -0000 1.59 +++ lxr.conf 17 Nov 2013 09:13:21 -0000 1.60 @@ -21,7 +21,7 @@ #- updated for change in LCL statements-- ajl 2013/04/28 #- updated for more common factoring -- ajl 2013/05/13 #- updated for new parameters -- ajl 2013/09/28 -#- added answer validition criteria -- ajl 2013/11/06 +#- added answer validation criteria -- ajl 2013/11/06 ( ################################ @@ -226,8 +226,7 @@ #@MSG Versions can be explicitly enumerated, be read from a file or computed #@MSG by a function. The latter case is recommended for VCS-stored trees. #@ASK,V Version enumeration method?; 1; list, file, function; L,R,F - #- This can come from a file, a function or be explicitly - #- ennumerated. +#- #@CASE %V% #- #- - Case No. 1: versions stored in a file Index: lxrkernel.conf =================================================================== RCS file: /cvsroot/lxr/lxr/templates/lxrkernel.conf,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- lxrkernel.conf 7 Nov 2013 17:45:41 -0000 1.11 +++ lxrkernel.conf 17 Nov 2013 09:13:21 -0000 1.12 @@ -60,7 +60,7 @@ #- updated to use LCL statements -- ajl 2012/11/30 #- updated for web server config. -- ajl 2013/01/20 #- updated for more common factoring -- ajl 2013/05/13 -#- added answer validition criteria -- ajl 2013/11/06 +#- added answer validation criteria -- ajl 2013/11/06 ( ################################ Index: tree-server1.conf.part =================================================================== RCS file: /cvsroot/lxr/lxr/templates/tree-server1.conf.part,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tree-server1.conf.part 7 Nov 2013 17:45:41 -0000 1.2 +++ tree-server1.conf.part 17 Nov 2013 09:13:21 -0000 1.3 @@ -38,11 +38,10 @@ #- [ 'http://localhost/lxr' #- , 'http://mydomain/lxr' #- ] +#- , #- ---- ---- # #- ---- End of deprecated parameters ---- # - #- ---- If you use them, uncomment the comma below ---- # #- -------------------------------------------------------- # -#- , #@DEFINE treeid='' #- @@ -54,7 +53,7 @@ #@ , //[\w-]+(?:\.[\w-]+)*(?::\d+)?/?$,invalid characters in URL #- The trailing comma below is not an error, it defines an empty string # CANON,hostname /$, - , 'host_names' => [ '%hostname%' + 'host_names' => [ '%hostname%' #@ KEEPON --- Alias name ? (hit return to stop):; -3\ #@ ; ^(?i:https??:)?//,not an HTTP URL\ #@ , //[\w-]+(?:\.[\w-]+)*(?::\d+)?/?$,invalid characters in URL @@ -121,8 +120,8 @@ #@ REMIND tree designation (in an order compatible with the URL magic #@ REMIND in the server configuration files). #@ ASK,virtroot --- Full virtual root? (e.g. %virtrootbase%/something); -2\ -#@ CANON,virtroot /+$,,^/*,/ #@ ; ^[^']+$,quotes not allowed +#@ CANON,virtroot /+$,,^/*,/ #@ ELSE #@ ERROR Unknown multiple trees management choice! #@ ERROR If you did not tamper with context file, |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 09:08:54
|
Update of /cvsroot/lxr/lxr/lib/LXR In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14644/lib/LXR Modified Files: Template.pm Log Message: Template.pm: fix typo in a comment Index: Template.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Template.pm,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- Template.pm 8 Nov 2013 14:22:25 -0000 1.27 +++ Template.pm 17 Nov 2013 09:08:51 -0000 1.28 @@ -247,7 +247,7 @@ The opening delimiter (C< E<lt>!-- >) MUST be followed by a spacer, i.e. a space, tab or newline. -The closing delimiter (C< --E<gt> >) should also be preceded by a spacer +The closing delimiter (C< --E<gt> >) should also be preceded by a spacer. These comments will be removed. =item 1 Sticky comments |
From: Andre-Littoz <ajl...@us...> - 2013-11-17 09:05:34
|
Update of /cvsroot/lxr/lxr/lib/LXR/Lang In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14339/lib/LXR/Lang Modified Files: Generic.pm Log Message: Generic.pm: speed improvement and new feature Speed improvement during indexing: cache frequently used flags in memory, dereference various hash accesses, avoid overflooding memory New feature: category names are identified on their prefix only, allowing user to define variants (with different CSS decoration) Index: Generic.pm =================================================================== RCS file: /cvsroot/lxr/lxr/lib/LXR/Lang/Generic.pm,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- Generic.pm 9 Nov 2013 10:07:37 -0000 1.48 +++ Generic.pm 17 Nov 2013 09:05:31 -0000 1.49 @@ -101,6 +101,15 @@ $$self{'langid'} = $self->langinfo('langid'); die "No langid for language $lang" unless defined $self->{'langid'}; + # Cache flag to boost performance + $$self{'case_insensitive'} = $self->flagged('case_insensitive'); + # Cache keywords to boost performance + if (exists($self->{'langmap'}{$lang}{'reserved'})) { + $self->{'reserved'} = \%{$self->{'langmap'}{$lang}{'reserved'}}; + } else { + $self->{'reserved'} = undef; + } + # Make sure that at least a default identifier definition exists # default must also cover C and C++ reserved words and Perl -variables $$self{'langmap'}{$lang}{'identdef'} = '[-\w~\#][\w]*' @@ -194,6 +203,12 @@ $langdesc->{'typeid'}{$type} = $index->decid($langid, $tdescr); } } +### The following line is commented out to improve performance. +### The consequence is a higher load of memory since DB updates +### are kept in memory until commit time (at least on directory +### exit). +# $index->commit(); +### This line is ABSOLUTELY mandatory in case multi-thread is publicly released } @@ -236,9 +251,10 @@ sub indexfile { my ($self, $name, $path, $fileid, $index, $config) = @_; + my $nsym = 0; - my $typemap = $self->langinfo('typemap'); - my $insensitive = $self->flagged('case_insensitive'); + my $typeid = $self->langinfo('typeid'); + my $insensitive = $self->{'case_insensitive'}; my $langforce = ${ $self->{'eclangnamemapping'} }{ $self->language }; if (!defined $langforce) { @@ -262,22 +278,25 @@ or die "Can't run ectags, $!"; # Parse the results - while (<CTAGS>) { + my @decls = <CTAGS>; + close(CTAGS); + $nsym = scalar(@decls); + while ($_ = shift(@decls)) { chomp; - my ($sym, $file, $line, $type, $ext) = split(/\t/, $_); - $line =~ s/;\"$//; #" fix fontification - $ext =~ m/language:(\w+)/; - $type = $typemap->{$type}; + my ($sym, $file, $line, $type, $ext) = split(/\t/o, $_); + $line =~ s/;\"$//o; #" fix fontification + $ext =~ m/language:(\w+)/o; + $type = $typeid->{$type}; if (!defined $type) { - print 'Warning: Unknown type ', (split(/\t/, $_))[3], "\n"; + print 'Warning: Unknown type ', (split(/\t/o, $_))[3], "\n"; next; } # TODO: can we make it more generic in parsing the extension fields? - if (defined($ext) && $ext =~ m/^(struct|union|class|enum):(.*)/) { + if (defined($ext) && $ext =~ m/^(struct|union|class|enum):(.*)/o) { $ext = $2; - $ext =~ s/::<anonymous>//g; + $ext =~ s/::<anonymous>//go; $ext = uc($ext) if $insensitive; } else { $ext = undef; @@ -286,9 +305,122 @@ $sym = uc($sym) if $insensitive; $index->setsymdeclaration($sym, $fileid, $line, $self->{'langid'}, $type, $ext); } - close(CTAGS); +### The following line is commented out to improve performance. +### The consequence is a higher load of memory since DB updates +### are kept in memory until commit time (at least on directory +### exit). +# $index->commit(); +### This line is ABSOLUTELY mandatory in case multi-thread is publicly released + } + return $nsym; +} + + +=head2 C<referencefile ($name, $path, $fileid, $index, $config)> + +Method C<referencefile> is invoked during I<genxref> to parse and collect +the references in a file. + +=over + +=item 1 C<$name> + +a I<string> containing the LXR file name + +=item 1 C<$path> + +a I<string> containing the OS file name + +When files are stored in VCSes, C<$path> is the name of a temporary file. + +=item 1 C<$fileid> + +an I<integer> containing the internal DB id for the file/revision + +=item 1 C<$index> + +a I<reference> to the index (DB) object + +=item 1 C<$config> + +a I<reference> to the configuration objet + +=back + +Using I<SimpleParse>'s C<nextfrag>, it focuses on "untyped" +fragments (aka. code fragments) from which symbols are extracted. +User symbols, if already declared, are entered in the reference +data base. + +=cut + +sub referencefile { + my ($self, $name, $path, $fileid, $index, $config) = @_; + my @refs; + + require LXR::SimpleParse; + + # Use dummy tabwidth here since it doesn't matter for referencing + my $fh = FileHandle->new($path); + if (!defined($fh)) { + return (-1, 0); + } + &LXR::SimpleParse::init ( $fh # FileHandle->new($path) + , 1 + , $self->parsespec + ); + $LXR::SimpleParse::dountab = 0; # Does not matter for references + + my $linenum = 1; + my ($btype, $frag) = &LXR::SimpleParse::nextfrag; + my @lines; + my $string; + my $l; + my $identdef = $self->langinfo('identdef'); + my $insensitive = $self->{'case_insensitive'}; + while (defined($frag)) { + + if (defined($btype)) { + if ( 'comment' eq substr($btype, 0, 7) + || 'string' eq substr($btype, 0, 6) + || 'include' eq $btype + || 'extra' eq substr($btype, 0, 5) + ) { + $linenum += () = $frag =~ m/\n/gs; + } else { + print "BTYPE was: $btype\n"; + } + } else { + @lines = split(/\n/o, $frag, -1); + foreach $l (@lines) { + foreach $string ($l =~ m/($identdef)\b/og) { + # print "considering $string\n"; + $string = uc($string) if $insensitive; + if (!$self->isreserved($string)) { + # setsymreference decides by itself to record the + # the symbol as a reference or not, based on the + # DB dictionary (stated otherwise: it does not add + # new symbols to the existing dictionary. + # print "adding $string to references\n"; +# $index->setsymreference($string, $fileid, $linenum); + push @refs, [$string, $linenum]; + } + } + $linenum++; + } + $linenum--; + } + ($btype, $frag) = &LXR::SimpleParse::nextfrag; } + my $nsym = scalar(@refs); + if ($nsym > 0) { + for my $ref (@refs) { # Symbols found, enter then into DB + my ($string, $line) = @$ref; + $index->setsymreference($string, $fileid, $line); + } + } + return ($linenum, $nsym); } @@ -563,10 +695,12 @@ my ($self, $code) = @_; my ($start, $id); - my $source = $$code; my $answer = ''; my $identdef = $self->langinfo('identdef'); - my $insensitive = $self->flagged('case_insensitive'); + my $insensitive = $self->{'case_insensitive'}; + my $prefix; # Unparsed bit before symbol + my $symbol; # Parsed symbol + my $dictsymbol; # Transformed symbol for dictionary lookup # Repeatedly remove what looks like an identifier from the head of # the source line and mark it if it is a reserved word or known @@ -578,21 +712,24 @@ # markings simultaneously to avoid interferences; # second reason, $2 is not a reference - while ( $source =~ s/^(.*?)($identdef)//s) + while ( $$code =~ s/^(.*?)($identdef)//s) { - my $dictsymbol = $2; + $prefix = $1; + $symbol = $2; + $dictsymbol = $2; + $dictsymbol =~ s/\s+//; # for C #directives $dictsymbol = uc($dictsymbol) if $insensitive; - $answer .= $1 - . ( $self->isreserved($2) - ? "<span class='reserved'>$2</span>" + $answer .= $prefix + . ( $self->isreserved($dictsymbol) + ? "<span class='reserved'>$symbol</span>" : ( $index->issymbol($dictsymbol, $$self{'releaseid'}) - ? join($2, @{$$self{'itag'}}) - : $2 + ? join($symbol, @{$$self{'itag'}}) + : $symbol ) ); } # don't forget the last chunk of the line containing no target - $$code = $answer . $source; + $$code = $answer . $$code; } @@ -617,116 +754,9 @@ sub isreserved { my ($self, $frag) = @_; - $frag =~ s/\s//g ; # for those who write # include - if ($self->flagged('case_insensitive')) { - $frag = uc($frag); - foreach my $word (@{$self->langinfo('reserved')}) { - $word = uc($word); - return 1 if $frag eq $word; - } - } else { - foreach my $word (@{$self->langinfo('reserved')}) { - return 1 if $frag eq $word; - } - } - return 0; -} - - -=head2 C<referencefile ($name, $path, $fileid, $index, $config)> - -Method C<referencefile> is invoked during I<genxref> to parse and collect -the references in a file. - -=over - -=item 1 C<$name> - -a I<string> containing the LXR file name - -=item 1 C<$path> - -a I<string> containing the OS file name - -When files are stored in VCSes, C<$path> is the name of a temporary file. - -=item 1 C<$fileid> - -an I<integer> containing the internal DB id for the file/revision - -=item 1 C<$index> - -a I<reference> to the index (DB) object - -=item 1 C<$config> - -a I<reference> to the configuration objet - -=back - -Using I<SimpleParse>'s C<nextfrag>, it focuses on "untyped" -fragments (aka. code fragments) from which symbols are extracted. -User symbols, if already declared, are entered in the reference -data base. - -=cut - -sub referencefile { - my ($self, $name, $path, $fileid, $index, $config) = @_; - - require LXR::SimpleParse; - - # Use dummy tabwidth here since it doesn't matter for referencing - &LXR::SimpleParse::init ( FileHandle->new($path) - , 1 - , $self->parsespec - ); - - my $linenum = 1; - my ($btype, $frag) = &LXR::SimpleParse::nextfrag; - my @lines; - my $ls; - my $identdef = $self->langinfo('identdef'); - my $insensitive = $self->flagged('case_insensitive'); - - while (defined($frag)) { - @lines = ($frag =~ m/(.*?\n)/g, $frag =~ m/([^\n]*)$/); - - if (defined($btype)) { - if ( $btype eq 'comment' - || $btype eq 'string' - || $btype eq 'include' - ) { - $linenum += @lines - 1; - } else { - print "BTYPE was: $btype\n"; - } - } else { - my $l; - my $string; - foreach $l (@lines) { - - foreach ($l =~ m/($identdef)\b/og) { - $string = $_; - - # print "considering $string\n"; - if (!$self->isreserved($string)) { - # setsymreference decides by itself to record the - # the symbol as a reference or not, based on the - # DB dictionary (stated otherwise: it does not add - # new symbols to the existing dictionary. - # print "adding $string to references\n"; - $string = uc($string) if $insensitive; - $index->setsymreference($string, $fileid, $linenum); - } - } - $linenum++; - } - $linenum--; - } - ($btype, $frag) = &LXR::SimpleParse::nextfrag; - } - return $linenum; + my $kw = $self->{'reserved'}; + return 0 if !defined($kw); + return exists($$kw{$frag}); } @@ -774,6 +804,9 @@ if (ref($$val{$item}) eq 'ARRAY') { return wantarray ? @{ $$val{$item} } : $$val{$item}; } + if (ref($$val{$item}) eq 'HASH') { + return wantarray ? %{ $$val{$item} } : $$val{$item}; + } return $$val{$item}; } else { return undef; |