aboutsummaryrefslogtreecommitdiff
path: root/tccpp.c
diff options
context:
space:
mode:
authorseyko <seyko2@gmail.com>2015-11-06 02:40:14 +0300
committerseyko <seyko2@gmail.com>2015-11-06 02:40:14 +0300
commit7cb921a44b979ae3fa280a1b0f567300667af903 (patch)
treeea155092535ec327d13ea8c8209cfc4051effde0 /tccpp.c
parenteb00777309f1d1ab3993720b52d8c33bee92b5d0 (diff)
downloadtinycc-7cb921a44b979ae3fa280a1b0f567300667af903.tar.gz
tinycc-7cb921a44b979ae3fa280a1b0f567300667af903.tar.bz2
TOK_INCLUDE: streamline
goto removed
Diffstat (limited to 'tccpp.c')
-rw-r--r--tccpp.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/tccpp.c b/tccpp.c
index 9597ec2..900781d 100644
--- a/tccpp.c
+++ b/tccpp.c
@@ -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 '<>' */