#ifndef lint
-static char sccsid[] = "@(#)lookup.c 2.5 6/10/85";
+static char sccsid[] = "@(#)lookup.c 2.6 5/27/93";
#endif not lint
# include "stdio.h"
# include "streams.h"
int fflag = 0; /* print out file names */
int Aflag = 0; /* print hits from All indexes */
int max_klen = 6; /* max length of keys */
-char *common = /* name of file of common words */
- COMFILE;
char INDEX[maxstr] = /* name of index file */
INDXFILE;
char one_index[maxstr];
int found;
- strcpy(BMACLIB, N_BMACLIB);
- strcpy(COMFILE, N_COMFILE);
- strcpy(DEFSTYLE, N_DEFSTYLE);
+ InitDirectory(BMACLIB,N_BMACLIB);
+ InitDirectory(COMFILE,N_COMFILE);
argc= argcount-1;
argv= arglist+1;
for (p = one_index, q = INDEX; *q != 0 ; q++)
if (*q == ',' )
{ *p = 0;
- refs = locate(keys, one_index, max_klen, common);
+ refs = locate(keys, one_index, max_klen, COMFILE);
if( refs==NULL )
- { fprintf(stderr,
- "%s removed from index list.\n", one_index);
+ { fprintf(stderr,"%s removed from index list.\n", one_index);
/* delete this file name (shift remainder on top) */
strcpy(q-strlen(one_index),q+1);
q = q-strlen(one_index)-1;
break;
case 'f': fflag++;
break;
- case 'c': common= operand;
+ case 'c': strcpy(COMFILE, operand);
break;
case 'A': Aflag++;
break;