# include "refer..c" static int *coord 0; int hh[50]; extern int *hfreq, hfrflg, hcomp(), hexch(); extern int prfreqs; doquery(hpt, nhash, fb, nitem, qitem, master) union ptr {unsigned *a; long *b;} master; long *hpt; FILE *fb; char *qitem[]; { long k; union ptr prevdrop; int nf 0, best 0, nterm 0, i, g, j; int *prevcoord; long lp; extern int lmaster, colevel, reached; long getl(); unsigned getw(); extern int iflong; # if D1 fprintf(stderr, "entering doquery nitem %d\n",nitem); fprintf(stderr, "first few hashes are %ld %ld %ld %ld %ld\n", hpt[0],hpt[1],hpt[2],hpt[3],hpt[4]); fprintf(stderr, "and frequencies are %d %d %d %d %d\n",hfreq[0],hfreq[1],hfreq[2],hfreq[3],hfreq[4]); # endif _assert (lmaster>0); if (coord==0) coord = zalloc(lmaster, sizeof(lmaster)); if (colevel>0) { prevdrop.a=zalloc(lmaster,iflong?4:2); prevcoord = zalloc(lmaster, sizeof(lmaster)); } else { prevdrop.a=master.a; prevcoord=coord; } # if D1 fprintf(stderr, "nitem %d\n",nitem); # endif for(i=0; i0) { for(j=0; j=nf) break; if (j= nterm) { if (iflong) master.b[g]=k; else master.a[g]=k; coord[g++] = 1; } } # if D1 fprintf(stderr,"now have %d items\n",g); # endif if (colevel>0) for ( ; j nterm) { _assert(g0) { best=0; for(j=0; jbest) best = coord[j]; # if D1 fprintf(stderr, "colevel %d best %d\n", colevel, best); # endif reached = best; for(g=j=0; j