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 '<>' */