DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (495129e490bc)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
#!/usr/bin/perl
use lib 'lib';
use LXR::Common;
use LXR::Config;

($Conf, undef, $Path, $head) = &init($0);
print "$head
";

unless (defined $Conf->{'trees'} &&
        $Conf->baseurl eq $Conf->realbaseurl) {
# this is the root of an individual tree
# or the root of the only tree
open INDEX, "<index.html";
} else {
# this is a list of published trees
open INDEX, "<root/index.html";
}

{
local $/ = undef;
my $template = <INDEX>;
print &expandtemplate($template,
                      ('rootname', sub { return $Conf->{'sourceprefix'}; }),
                      ('treename', sub { return $Conf->{'treename'}; }),
                     );
}
close INDEX;