[Lxr-commits] CVS: lxr ident,1.11,1.12 initdb-mysql,1.6,1.7 initdb-postgres,1.3,1.4
Brought to you by:
ajlittoz
|
From: Malcolm B. <mb...@us...> - 2001-11-18 03:31:37
|
Update of /cvsroot/lxr/lxr
In directory usw-pr-cvs1:/tmp/cvs-serv15958
Modified Files:
ident initdb-mysql initdb-postgres
Log Message:
Fix bug 476695 - Java interfaces display as docs.
Changes the type field in the indexes table to be a (langid, typeid) tuple,
and adds another table to look up the (langid, typeid) -> string mapping.
This means that each language module can manage its own string table and the
right identifier type can easily be displayed.
This also means that each identifier is tagged with the language it occurs in,
which could be used for filtering displayed results when browsing. This has
not been implemented.
This change is database incompatible - you will need to drop and recreate the
lxr database. MySQL has been tested, Postgres has not though the changes have
been made.
Also add some limited support for Makefile in generic.conf.
Index: ident
===================================================================
RCS file: /cvsroot/lxr/lxr/ident,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- ident 2001/10/16 20:38:37 1.11
+++ ident 2001/11/18 03:31:33 1.12
@@ -52,12 +52,11 @@
my $def;
foreach my $def (@refs) {
my ($file, $line, $type, $rel) = @$def;
-
$rel &&= "(member of ".idref($rel, "search-member", $rel).")";
$ret .= expandtemplate($templ,
(file => sub { $file },
line => sub { $line },
- type => sub { $type_names{$type} },
+ type => sub { $type },
rel => sub { $rel },
fileref => sub {
fileref("$file, line $line",
Index: initdb-mysql
===================================================================
RCS file: /cvsroot/lxr/lxr/initdb-mysql,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- initdb-mysql 2001/09/26 14:47:56 1.6
+++ initdb-mysql 2001/11/18 03:31:33 1.7
@@ -27,7 +27,8 @@
symid int not null references symbols,
fileid int not null references files,
line int not null,
- type char(1) binary,
+ langid tinyint not null references declarations,
+ type smallint not null references declarations,
relsym int references symbols
);
@@ -47,6 +48,13 @@
(fileid int not null references files,
status tinyint not null,
primary key (fileid)
+);
+
+create table declarations
+ (declid smallint not null auto_increment,
+ langid tinyint not null,
+ declaration char(255) not null,
+ primary key (declid, langid)
);
Index: initdb-postgres
===================================================================
RCS file: /cvsroot/lxr/lxr/initdb-postgres,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- initdb-postgres 2001/09/26 14:47:56 1.3
+++ initdb-postgres 2001/11/18 03:31:33 1.4
@@ -9,6 +9,7 @@
create sequence filenum cache 50;
create sequence symnum cache 50;
+create sequence declnum cache 10;
create table files (
filename varchar,
@@ -31,7 +32,8 @@
symid int references symbols,
fileid int references files,
line int,
- type varchar,
+ langid tinyint not null references declarations,
+ type smallint not null references declarations,
relsym int references symbols
);
@@ -49,9 +51,15 @@
create table status
(fileid int references files,
- status int,
+ status smallint,
primary key (fileid)
);
+create table declarations
+ (declid smallint not null,
+ langid tinyint not null,
+ declaration char(255) not null,
+ primary key (declid, langid)
+);
create index indexindex on indexes using btree (symid);
create index symbolindex on symbols using btree (symname);
|