oops, the indexing code did much too much work

This commit is contained in:
leitner
2002-03-25 23:56:34 +00:00
parent ec55f05ca0
commit c76ee598c0
2 changed files with 5 additions and 7 deletions

View File

@@ -55,7 +55,7 @@ tinyldap_debug: tinyldap.c
clean:
rm -f t t[1-9] *.[ao] bindrequest tinyldap ldapclient data \
parse tinyldap_standalone tinyldap_debug ldapclient_str addindex \
dumpidx
dumpidx *.da *.bbg *.bb *.gcov gmon.out
tar: clean
cd ..; tar cvvf ldap.tar.bz2 ldap --use=bzip2 --exclude CVS --exclude exp.ldif --exclude polyp* --exclude rfc*

View File

@@ -176,15 +176,17 @@ static void tagmatches(uint32* index,unsigned int elements,struct string* s,unsi
* Look before and after mid, too */
for (oldk=k; k>0; ) {
k-=4;
if ((l=matchstring(s,map+k))==0)
if ((l=matchstring(s,map+k))==0) {
if ((rec=findrec(k)))
setbit(bitfield,rec);
} else break;
}
for (k=oldk; k<elements; ++k) {
k+=4;
if ((l=matchstring(s,map+k))==0)
if ((l=matchstring(s,map+k))==0) {
if ((rec=findrec(k)))
setbit(bitfield,rec);
} else break;
}
return;
}
@@ -557,10 +559,6 @@ again:
#ifdef DEBUG
handle(asock,asock);
close(asock);
{
static int count=0;
if (++count==500) return 0;
}
goto again;
// exit(0);
#else