/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980 Regents of the University of California.
* All rights reserved. The Berkeley software License Agreement
* specifies the terms and conditions for redistribution.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include "refer..c"
static int *coord = 0;
extern int prfreqs;
union ptr {
unsigned *a;
long *b;
};
extern int hash();
extern void shell();
extern void *zalloc();
static int hcomp(int, int);
static void hexch(int, int);
int
{
long k;
int *prevcoord;
long lp;
extern int iflong;
if (iflong) {
} else {
}
#if D1
#endif
if (coord == 0)
if (colevel > 0) {
if (iflong)
else
} else {
}
#if D1
#endif
for (i = 0; i < nitem; i++) {
#if D1
#endif
}
#if D1
#endif
if (prfreqs)
for (i = 0; i < nitem; i++)
/* if possible, sort query into decreasing frequency of hashes */
if (hfrflg)
#if D1
for (i = 0; i < nitem; i++)
#endif
#if D1
#endif
for (i = 0; i < lmaster; i++) {
if (iflong)
else
coord[i] = 1;
#if D2
if (iflong)
else
#endif
if (iflong) {
if (master.b[i] == -1L) break;
} else {
if (master.a[i] == -1) break;
}
}
nf = i;
#ifdef D1
#endif
if (colevel > 0) {
for (j = 0; j < nf; j++) {
if (iflong)
else
}
}
#if D1
#endif
g = j = 0;
while (1) {
if (iflong)
else
if (k == -1) break;
#if D2
#endif
#if D3
if (iflong)
"bfwh j %d nf %d master %ld k %ld\n",
else
"bfwh j %d nf %d master %ld k %ld\n",
#endif
while (j < nf &&
#if D3
if (iflong)
"%ld prevcoord %d colevel %d nterm "
(long)(k));
else
"%ld prevcoord %d colevel %d nterm "
(long)(k));
#endif
j++;
else {
if (iflong)
else
#if D1
if (iflong)
"%d doc %d coord %d note "
else
"%d doc %ld coord %d nterm "
#endif
continue;
}
}
if (j < nf &&
if (iflong)
master.b[g] = k;
else
master.a[g] = k;
#if D1
if (iflong)
"coord %d note %ld\n", g,
master.b[j-1]);
else
"coord %d note %d\n", g,
master.a[j-1]);
#endif
} else
if (iflong)
master.b[g] = k;
else
master.a[g] = k;
coord[g++] = 1;
}
}
#if D1
#endif
if (colevel > 0)
for (; j < nf; j++)
if (iflong)
else
#if D3
if (iflong)
"%ld coord %d\n",
else
"%d coord %d\n",
#endif
}
nf = g;
}
if (colevel > 0) {
best = 0;
for (j = 0; j < nf; j++)
#if D1
#endif
for (g = j = 0; j < nf; j++)
if (iflong)
else
}
nf = g;
#if D1
#endif
}
#ifdef D1
#endif
if (colevel) {
}
#if D3
for (g = 0; g < nf; g++)
if (iflong)
else
#endif
return (nf);
}
static long
{
}
static int
{
}
static void
{
int t;
}