mirror of
https://github.com/ZDoom/Raze.git
synced 2025-06-04 03:00:58 +00:00
- moved getatoken to scriptfile.cpp so common.cpp could be removed.
This commit is contained in:
parent
f9c03760a3
commit
2f3d405f8b
3 changed files with 18 additions and 35 deletions
|
@ -438,3 +438,21 @@ void scriptfile_clearsymbols(void)
|
|||
symbtablength = 0;
|
||||
symbtaballoclength = 0;
|
||||
}
|
||||
|
||||
int32_t getatoken(scriptfile *sf, const tokenlist *tl, int32_t ntokens)
|
||||
{
|
||||
char *tok;
|
||||
int32_t i;
|
||||
|
||||
if (!sf) return T_ERROR;
|
||||
tok = scriptfile_gettoken(sf);
|
||||
if (!tok) return T_EOF;
|
||||
|
||||
for (i=ntokens-1; i>=0; i--)
|
||||
{
|
||||
if (!Bstrcasecmp(tok, tl[i].text))
|
||||
return tl[i].tokenid;
|
||||
}
|
||||
return T_ERROR;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue