History

Improved '\ n' output effect (# pragma pack (push, 8), # pragma pack (pop))

jiang committed 12 years ago

Commit a94ed431 parent 196c9991 file · +3 −3Browse files

Unified · Split

tccpp.c+3−3
@@ -61,6 +61,7 @@ static TokenSym *hash_ident[TOK_HASH_SIZE]; · 60 unmodified lines
6161 static char token_buf[STRING_MAX_SIZE + 1];
6262 /* true if isid(c) || isnum(c) */
6363 static unsigned char isidnum_table[256-CH_EOF];
64+static int token_seen;
6465
6566 static const char tcc_keywords[] =
6667 #define DEF(id, str) str "\0"
@@ -1758,7 +1759,7 @@ pack_error: · 1691 unmodified lines
17581759 fputs(get_tok_str(tok, &tokc), s1->ppfp);
17591760 next();
17601761 }
1761− fputs("\n", s1->ppfp);
1762+ token_seen = 0;//printf '\n'
17621763 goto the_end;
17631764 }
17641765 break;
@@ -3229,7 +3230,7 @@ ST_FUNC int tcc_preprocess(TCCState *s1) · 1464 unmodified lines
32293230 Sym *define_start;
32303231
32313232 BufferedFile *file_ref, **iptr, **iptr_new;
3232− int token_seen, line_ref, d;
3233+ int line_ref, d;
32333234 const char *s;
32343235
32353236 preprocess_init(s1);
@@ -3238,7 +3239,6 @@ ST_FUNC int tcc_preprocess(TCCState *s1) · 2 unmodified lines
32383239 tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF;
32393240 parse_flags = PARSE_FLAG_ASM_COMMENTS | PARSE_FLAG_PREPROCESS |
32403241 PARSE_FLAG_LINEFEED | PARSE_FLAG_SPACES;
3241− token_seen = 0;
32423242 line_ref = 0;
32433243 file_ref = NULL;
32443244 iptr = s1->include_stack_ptr;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t