/*
* 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 <locale.h>
#include <stdio.h>
#include <assert.h>
extern char refdir[];
extern int keepold;
extern char *fgnames[];
extern char **fgnamp;
int colevel = 0;
int measure = 0;
int reached = 0;
int iflong = 0;
int prfreqs = 0;
char *calloc();
char *todir();
static int tags = 0;
extern int baddrop();
extern int doquery();
extern void err();
extern long findline();
extern int getq();
extern void grepcall();
extern int makefgrep();
extern void result();
extern void tick();
extern void tock();
static int setfrom(char);
int
{
/* read query from stdin, expect name of indexes in argv[1] */
static int was = 0;
/* these pointers are unions of pointer to int and pointer to long */
long *hpt;
unsigned *master = 0;
/* special wart for refpart: default is tags only */
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
falseflg = 0;
case 'a': /* all output, incl. false drops */
falseflg = 1;
break;
case 'r':
argc--;
argv++;
break;
case 'F': /* put out full text */
break;
case 'T': /* put out tags */
break;
case 'i': /* input in argument string */
argc--;
argv++;
break;
case 's': /* text output to string */
case 'o':
argc--;
argv++;
argc--;
argv++;
}
break;
case 't': /* tag output to string */
argc--;
argv++;
break;
case 'l': /* length of internal lists */
argc--;
argv++;
break;
case 'g': /* suppress fgrep search on old files */
keepold = 0;
break;
case 'C': /* coordination level */
#if D1
#endif
break;
case 'P': /* print term freqs */
prfreqs = 1;
break;
case 'm':
measure = 1;
break;
}
argc--;
argv++;
}
if (argc < 2)
exit(1);
if (was) {
}
oldname);
goto search;
}
was = 1;
exit(1);
}
}
if (master == 0)
sizeof (long) : sizeof (unsigned));
#if D1
#endif
#if D1
#endif
while (1) {
if (nitem == 0) continue;
if (nitem < 0) break;
#if D1
#endif
if (falseflg == 0)
#if D1
#endif
}
int k;
#if D1
#endif
grepquery[0] = 0;
for (k = 0; k < nitem; k++) {
}
#if D1
#endif
#if D1
#endif
#if D1
#endif
if (tagout == 0)
#if D1
#endif
if (full) {
int nout;
char *bout;
char *tagp;
char *oldtagp;
while (*tagp) {
while (*tagp &&
(*tagp != '\n'))
tagp++;
if (*tagp)
tagp++;
1000, 0L);
if (nout > 0) {
}
}
}
}
}
if (tags)
}
return (0);
}
char *
todir(char *t)
{
char *s;
s = t;
while (*s) s++;
while (s >= t && *s != '/') s--;
if (s < t)
return (t);
*s++ = 0;
t = (*t ? t : "/");
chdir(t);
return (s);
}
static int
setfrom(char c)
{
switch (c) {
case 'y':
case '\0':
default:
return (1000);
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
return (c-'0');
case 'n':
case '0':
return (0);
}
}