X-Git-Url: http://sru.miketaylor.org.uk/?a=blobdiff_plain;f=dict%2Flookgrep.c;h=f4ba71aec74358101fef670731f49258cb91e5a0;hb=a57bdec6c84c3dcd2b657f2e2fd14b67be1b5881;hp=b464e9503cd531e3c85ecdf11ee5e03398baa9b2;hpb=a15e6ea036010b9e0f9be59e81461c8a4e894db4;p=idzebra-moved-to-github.git diff --git a/dict/lookgrep.c b/dict/lookgrep.c index b464e95..f4ba71a 100644 --- a/dict/lookgrep.c +++ b/dict/lookgrep.c @@ -4,7 +4,10 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: lookgrep.c,v $ - * Revision 1.2 1994-10-04 12:08:07 adam + * Revision 1.3 1994-10-05 12:16:50 adam + * Pagesize is a resource now. + * + * Revision 1.2 1994/10/04 12:08:07 adam * Some bug fixes and some optimizations. * * Revision 1.1 1994/10/03 17:23:04 adam @@ -233,7 +236,7 @@ static int dict_grep (Dict dict, Dict_ptr ptr, MatchContext *mc, dict_bf_readp (dict->dbf, ptr, &p); lo = 0; hi = DICT_nodir(p)-1; - indxp = (short*) ((char*) p+DICT_PAGESIZE-sizeof(short)); + indxp = (short*) ((char*) p+DICT_pagesize(dict)-sizeof(short)); while (lo <= hi) { @@ -313,7 +316,8 @@ static int dict_grep (Dict dict, Dict_ptr ptr, MatchContext *mc, dict_grep (dict, subptr, mc, Rj1, pos+1, userfunc, prefix, dfas); dict_bf_readp (dict->dbf, ptr, &p); - indxp = (short*) ((char*) p+DICT_PAGESIZE-sizeof(short)); + indxp = (short*) ((char*) p+DICT_pagesize(dict) + -sizeof(short)); } } }