ack/util/ncgg/strlookup.c

21 lines
353 B
C
Raw Normal View History

1985-01-08 09:59:28 +00:00
#ifndef NORCSID
static char rcsid[]= "$Header$";
#endif
#include "param.h"
int nstrings=0;
char *l_strings[MAXSTRINGS];
strlookup(str) char *str; {
register i;
extern char *mystrcpy();
for(i=0;i<nstrings;i++)
if (strcmp(str,l_strings[i])==0)
return(i);
NEXT(nstrings,MAXSTRINGS,"String table");
l_strings[i] = mystrcpy(str);
return(i);
}