(lookup): Rename lookup() to symbol_by_value(), make it public

and move it to nstr.c.
This commit is contained in:
Ron Koenderink 2005-11-22 22:57:06 +00:00
parent edaa05b8cb
commit d4f52f6ca2
3 changed files with 18 additions and 16 deletions

View file

@ -680,3 +680,15 @@ nstr_exec_val(struct valstr *val, natid cnum, void *ptr, nsc_type want)
val->val_type = valtype;
}
char *
symbol_by_value(int key, struct symbol *table)
{
int i;
for (i = 0; table[i].name; i++)
if (key == table[i].value)
return table[i].name;
return NULL;
}