diff options
author | sinanmohd <sinan@firemail.cc> | 2023-04-23 17:42:57 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-04-23 22:32:36 +0530 |
commit | 07a42d77a1c26e226fec3be7645ba37e8ceafe6e (patch) | |
tree | ec6482bcf0f9e28dc5b9b5b66c700ac3a495f66b /5.20/token.c | |
parent | 2f3d854c1226108907651a8fcf9228767eee9742 (diff) |
5.20: v2, get rid of unnecessary recursion
Diffstat (limited to '5.20/token.c')
-rw-r--r-- | 5.20/token.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/5.20/token.c b/5.20/token.c index 0a69b09..b04acef 100644 --- a/5.20/token.c +++ b/5.20/token.c @@ -22,7 +22,7 @@ char *storspec[] = { "static" }; -char *datatyp[] = { +char *typespec[] = { "char", "int", "long", @@ -36,8 +36,6 @@ char *datatyp[] = { int gettoken(void) { char c, *p = token; - char getch(void); - void ungetch(char); if (prevtoken == YES) { prevtoken = NO; @@ -97,7 +95,7 @@ int peaktoken() return type; } -int isdatatyp(void) +int isdtspec(void) { int i, len; @@ -109,8 +107,8 @@ int isdatatyp(void) if(!strcmp(token, storspec[i])) return 1; - for (i = 0, len = ARR_SIZE(datatyp); i < len; ++i) - if(!strcmp(token, datatyp[i])) + for (i = 0, len = ARR_SIZE(typespec); i < len; ++i) + if(!strcmp(token, typespec[i])) return 1; return 0; |