Unified · Split
| @@ -398,7 +398,7 @@ static SValue vstack[VSTACK_SIZE], *vtop; · 397 unmodified lines | |||
| 398 | /* some predefined types */ | 398 | /* some predefined types */ |
| 399 | static CType char_pointer_type, func_old_type, int_type; | 399 | static CType char_pointer_type, func_old_type, int_type; |
| 400 | /* true if isid(c) || isnum(c) */ | 400 | /* true if isid(c) || isnum(c) */ |
| 401 | static unsigned char isidnum_table[256]; | 401 | static unsigned char isidnum_table[256-CH_EOF]; |
| 402 | 402 | ||
| 403 | /* display some information during compilation */ | 403 | /* display some information during compilation */ |
| 404 | static int verbose = 0; | 404 | static int verbose = 0; |
| @@ -3772,7 +3772,7 @@ static inline void next_nomacro1(void) · 3367 unmodified lines | |||
| 3772 | p++; | 3772 | p++; |
| 3773 | for(;;) { | 3773 | for(;;) { |
| 3774 | c = *p; | 3774 | c = *p; |
| 3775 | if (!isidnum_table[c]) | 3775 | if (!isidnum_table[c-CH_EOF]) |
| 3776 | break; | 3776 | break; |
| 3777 | h = TOK_HASH_FUNC(h, c); | 3777 | h = TOK_HASH_FUNC(h, c); |
| 3778 | p++; | 3778 | p++; |
| @@ -3807,7 +3807,7 @@ static inline void next_nomacro1(void) · 28 unmodified lines | |||
| 3807 | p--; | 3807 | p--; |
| 3808 | PEEKC(c, p); | 3808 | PEEKC(c, p); |
| 3809 | parse_ident_slow: | 3809 | parse_ident_slow: |
| 3810 | while (isidnum_table[c]) { | 3810 | while (isidnum_table[c-CH_EOF]) { |
| 3811 | cstr_ccat(&tokcstr, c); | 3811 | cstr_ccat(&tokcstr, c); |
| 3812 | PEEKC(c, p); | 3812 | PEEKC(c, p); |
| 3813 | } | 3813 | } |
| @@ -10114,8 +10114,8 @@ TCCState *tcc_new(void) · 6300 unmodified lines | |||
| 10114 | s->output_type = TCC_OUTPUT_MEMORY; | 10114 | s->output_type = TCC_OUTPUT_MEMORY; |
| 10115 | 10115 | ||
| 10116 | /* init isid table */ | 10116 | /* init isid table */ |
| 10117 | for(i=0;i<256;i++) | 10117 | for(i=CH_EOF;i<256;i++) |
| 10118 | isidnum_table[i] = isid(i) || isnum(i); | 10118 | isidnum_table[i-CH_EOF] = isid(i) || isnum(i); |
| 10119 | 10119 | ||
| 10120 | /* add all tokens */ | 10120 | /* add all tokens */ |
| 10121 | table_ident = NULL; | 10121 | table_ident = NULL; |