diff options
| author | seyko <seyko2@gmail.com> | 2015-11-06 02:40:14 +0300 |
|---|---|---|
| committer | seyko <seyko2@gmail.com> | 2015-11-06 02:40:14 +0300 |
| commit | 7cb921a44b979ae3fa280a1b0f567300667af903 (patch) | |
| tree | ea155092535ec327d13ea8c8209cfc4051effde0 | |
| parent | eb00777309f1d1ab3993720b52d8c33bee92b5d0 (diff) | |
| download | tinycc-7cb921a44b979ae3fa280a1b0f567300667af903.tar.gz tinycc-7cb921a44b979ae3fa280a1b0f567300667af903.tar.bz2 | |
TOK_INCLUDE: streamline
goto removed
| -rw-r--r-- | tccpp.c | 17 |
1 files changed, 5 insertions, 12 deletions
@@ -1570,14 +1570,13 @@ ST_FUNC void preprocess(int is_bof) case TOK_INCLUDE: case TOK_INCLUDE_NEXT: ch = file->buf_ptr[0]; - /* XXX: incorrect if comments : use next_nomacro with a special mode */ - skip_spaces(); - if (ch == '<') { + skip_spaces(); /* XXX: incorrect if comments : use next_nomacro with a special mode */ + c = 0; + if (ch == '<') c = '>'; - goto read_name; - } else if (ch == '\"') { + if (ch == '\"') c = ch; - read_name: + if (c) { inp(); q = buf; while (ch != c && ch != '\n' && ch != CH_EOF) { @@ -1591,12 +1590,6 @@ ST_FUNC void preprocess(int is_bof) } *q = '\0'; minp(); -#if 0 - /* eat all spaces and comments after include */ - /* XXX: slightly incorrect */ - while (ch1 != '\n' && ch1 != CH_EOF) - inp(); -#endif } else { /* computed #include : either we have only strings or we have anything enclosed in '<>' */ |
