added index

This commit is contained in:
ceriel 1987-03-26 15:28:08 +00:00
parent 32d12a9c7a
commit 044587ec57

View file

@ -141,6 +141,8 @@ Key keywords [] ={
0, 0, 0, 0
};
char *index();
/* Keyword index table */
int kex[27];
@ -470,3 +472,13 @@ yylex()
}
return(*cptr++);
}
char *
index(s, c)
register char *s, c;
{
while (*s)
if (*s++ == c)
return --s;
return (char *)0;
}