X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=index%2Fzinfo.c;h=0565a0069e9dd5117bb34d17cc72213ec5dbe4ed;hb=77686142af94172d1887190ebd47aeb53f704057;hp=daf64f9a70379f4b7d93f034cc3cd2246729f375;hpb=f4e5e779697a3a44134b7af483817e83ce8cfcb0;p=idzebra-moved-to-github.git diff --git a/index/zinfo.c b/index/zinfo.c index daf64f9..0565a00 100644 --- a/index/zinfo.c +++ b/index/zinfo.c @@ -1,10 +1,16 @@ /* - * Copyright (C) 1994-1999, Index Data + * Copyright (C) 1994-2000, Index Data * All rights reserved. * Sebastian Hammer, Adam Dickmeiss * * $Log: zinfo.c,v $ - * Revision 1.20 2000-11-29 14:24:01 adam + * Revision 1.22 2001-10-15 19:53:43 adam + * POSIX thread updates. First work on term sets. + * + * Revision 1.21 2000/12/05 10:01:44 adam + * Fixed bug regarding user-defined attribute sets. + * + * Revision 1.20 2000/11/29 14:24:01 adam * Script configure uses yaz pthreads options. Added locking for * zebra_register_{lock,unlock}. * @@ -762,7 +768,7 @@ static void zebraExplain_readDatabase (ZebraExplainInfo zei, { zdi->recordCount = atoi_n (np->child->u.data.data, np->child->u.data.len); - } + } zdi->readFlag = 0; rec_rm (&rec); } @@ -1369,6 +1375,25 @@ int zebraExplain_lookupSU (ZebraExplainInfo zei, int set, int use) return -1; } +int zebraExplain_lookup_ord (ZebraExplainInfo zei, int ord, + const char **db, int *set, int *use) +{ + struct zebDatabaseInfoB *zdb; + for (zdb = zei->databaseInfo; zdb; zdb = zdb->next) + { + struct zebSUInfoB *zsui = zdb->attributeDetails->SUInfo; + for ( ;zsui; zsui = zsui->next) + if (zsui->info.ordinal == ord) + { + *db = zdb->databaseName; + *set = zsui->info.set; + *use = zsui->info.use; + return 0; + } + } + return -1; +} + zebAccessObject zebraExplain_announceOid (ZebraExplainInfo zei, zebAccessObject *op, Odr_oid *oid)