aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
authorgrischka <grischka>2009-07-18 22:07:42 +0200
committergrischka <grischka>2009-07-18 22:07:42 +0200
commitc998985c744549292ba4abe077aee3950548b083 (patch)
tree671d8f2e10ae9c691d3301a76a29b306e6b4020a /tccpp.c
parent94ae3984b0d4d3d78975d3bd48810cd5b6381618 (diff)
downloadtinycc-c998985c744549292ba4abe077aee3950548b083.tar.gz
tinycc-c998985c744549292ba4abe077aee3950548b083.tar.bz2
cleanup: constify some global data
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tccpp.c b/tccpp.c
index 25b6cbb..0d00cbc 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -26,7 +26,9 @@ static const char tcc_keywords[] =
;
/* WARNING: the content of this string encodes token numbers */
-static char tok_two_chars[] = "<=\236>=\235!=\225&&\240||\241++\244--\242==\224<<\1>>\2+=\253-=\255*=\252/=\257%=\245&=\246^=\336|=\374->\313..\250##\266";
+static const unsigned char tok_two_chars[] =
+ "<=\236>=\235!=\225&&\240||\241++\244--\242==\224<<\1>>\2+=\253"
+ "-=\255*=\252/=\257%=\245&=\246^=\336|=\374->\313..\250##\266";
/* true if isid(c) || isnum(c) */
static unsigned char isidnum_table[256-CH_EOF];
@@ -110,7 +112,6 @@ char *get_tok_str(int v, CValue *cv)
static char buf[STRING_MAX_SIZE + 1];
static CString cstr_buf;
CString *cstr;
- unsigned char *q;
char *p;
int i, len;
@@ -182,7 +183,7 @@ char *get_tok_str(int v, CValue *cv)
default:
if (v < TOK_IDENT) {
/* search in two bytes table */
- q = tok_two_chars;
+ const unsigned char *q = tok_two_chars;
while (*q) {
if (q[2] == v) {
*p++ = q[0];