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

This commit is contained in:
jiang 2014-05-17 12:06:18 +08:00
parent 196c999515
commit a94ed43094

View File

@ -61,6 +61,7 @@ static TokenSym *hash_ident[TOK_HASH_SIZE];
static char token_buf[STRING_MAX_SIZE + 1]; static char token_buf[STRING_MAX_SIZE + 1];
/* true if isid(c) || isnum(c) */ /* true if isid(c) || isnum(c) */
static unsigned char isidnum_table[256-CH_EOF]; static unsigned char isidnum_table[256-CH_EOF];
static int token_seen;
static const char tcc_keywords[] = static const char tcc_keywords[] =
#define DEF(id, str) str "\0" #define DEF(id, str) str "\0"
@ -1758,7 +1759,7 @@ pack_error:
fputs(get_tok_str(tok, &tokc), s1->ppfp); fputs(get_tok_str(tok, &tokc), s1->ppfp);
next(); next();
} }
fputs("\n", s1->ppfp); token_seen = 0;//printf '\n'
goto the_end; goto the_end;
} }
break; break;
@ -3229,7 +3230,7 @@ ST_FUNC int tcc_preprocess(TCCState *s1)
Sym *define_start; Sym *define_start;
BufferedFile *file_ref, **iptr, **iptr_new; BufferedFile *file_ref, **iptr, **iptr_new;
int token_seen, line_ref, d; int line_ref, d;
const char *s; const char *s;
preprocess_init(s1); preprocess_init(s1);
@ -3238,7 +3239,6 @@ ST_FUNC int tcc_preprocess(TCCState *s1)
tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF; tok_flags = TOK_FLAG_BOL | TOK_FLAG_BOF;
parse_flags = PARSE_FLAG_ASM_COMMENTS | PARSE_FLAG_PREPROCESS | parse_flags = PARSE_FLAG_ASM_COMMENTS | PARSE_FLAG_PREPROCESS |
PARSE_FLAG_LINEFEED | PARSE_FLAG_SPACES; PARSE_FLAG_LINEFEED | PARSE_FLAG_SPACES;
token_seen = 0;
line_ref = 0; line_ref = 0;
file_ref = NULL; file_ref = NULL;
iptr = s1->include_stack_ptr; iptr = s1->include_stack_ptr;