1987-03-09 19:15:41 +00:00
|
|
|
/*
|
|
|
|
* (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
|
|
|
|
* See the copyright notice in the ACK home directory, in the file "Copyright".
|
|
|
|
*/
|
1985-01-08 09:59:28 +00:00
|
|
|
#ifndef NORCSID
|
2019-05-10 17:17:24 +00:00
|
|
|
static char rcsid[] = "$Id$";
|
1985-01-08 09:59:28 +00:00
|
|
|
#endif
|
|
|
|
|
2017-11-14 22:04:01 +00:00
|
|
|
#include <string.h>
|
1985-01-08 09:59:28 +00:00
|
|
|
#include "param.h"
|
2019-05-10 17:17:24 +00:00
|
|
|
#include "subr.h"
|
2013-05-10 11:04:21 +00:00
|
|
|
#include "extern.h"
|
1985-01-08 09:59:28 +00:00
|
|
|
|
2019-05-10 17:17:24 +00:00
|
|
|
int nstrings = 0;
|
1985-01-08 09:59:28 +00:00
|
|
|
char *l_strings[MAXSTRINGS];
|
|
|
|
|
2019-05-10 17:17:24 +00:00
|
|
|
int strlookup(char *str)
|
|
|
|
{
|
|
|
|
register int i;
|
1985-01-08 09:59:28 +00:00
|
|
|
|
2019-05-10 17:17:24 +00:00
|
|
|
for (i = 0; i < nstrings; i++)
|
|
|
|
if (strcmp(str, l_strings[i]) == 0)
|
|
|
|
return (i);
|
|
|
|
NEXT(nstrings, MAXSTRINGS, "String table");
|
1985-01-08 09:59:28 +00:00
|
|
|
l_strings[i] = mystrcpy(str);
|
2019-05-10 17:17:24 +00:00
|
|
|
return (i);
|
1985-01-08 09:59:28 +00:00
|
|
|
}
|