LXR Cross Referencer Git repo
Brought to you by:
ajlittoz
#!/usr/bin/perl # $Id: ident,v 1.3 1999/05/25 19:33:47 argggh Exp $ # ident -- Look up identifiers # # Arne Georg Gleditsch <argggh@ifi.uio.no> # Per Kristian Gjermshus <pergj@ifi.uio.no> # # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ###################################################################### $CVSID = '$Id: ident,v 1.3 1999/05/25 19:33:47 argggh Exp $ '; use strict; use lib 'lib'; use LXR::Common qw(:html); use Local; sub ident { print("<p align=center>\n", "Type the full name of an identifier to summarize", "<br>(a function name, variable name, typedef, etc.)\n", "<br>Matches are case-sensitive.\n"); print("<form method=get action=\"ident\">\n"); foreach ($config->allvariables) { if ($config->variable($_) ne $config->vardefault($_)) { print("<input type=hidden name=\"",$_, "\" ", "value=\"", $config->variable($_), "\">\n"); } } print("<b>Identifier: </b><input type=text name=\"i\" ", "value=\"",$identifier,"\" size=50>\n", "<input type=submit value=\"Find\">\n", "</form>\n"); if ($identifier) { my @refs = $index->getindex($identifier, $release); use Data::Dumper; print(STDERR Dumper(\@refs), "\n"); print("<h1>$identifier</h1>\n"); if (@refs) { my $def; while ($def = shift(@refs)) { my ($file, $line, $type) = @$def; print("Defined as a $type_names{$type} in: ". fileref("$file, line $line", $file, $line). "<br>\n"); } } else { print("<br><b>Not used</b>"); } } } httpinit; makeheader('ident'); ident; makefooter('ident');