TOK_INCLUDE: streamline
goto removed
This commit is contained in:
17
tccpp.c
17
tccpp.c
@ -1570,14 +1570,13 @@ ST_FUNC void preprocess(int is_bof)
|
|||||||
case TOK_INCLUDE:
|
case TOK_INCLUDE:
|
||||||
case TOK_INCLUDE_NEXT:
|
case TOK_INCLUDE_NEXT:
|
||||||
ch = file->buf_ptr[0];
|
ch = file->buf_ptr[0];
|
||||||
/* XXX: incorrect if comments : use next_nomacro with a special mode */
|
skip_spaces(); /* XXX: incorrect if comments : use next_nomacro with a special mode */
|
||||||
skip_spaces();
|
c = 0;
|
||||||
if (ch == '<') {
|
if (ch == '<')
|
||||||
c = '>';
|
c = '>';
|
||||||
goto read_name;
|
if (ch == '\"')
|
||||||
} else if (ch == '\"') {
|
|
||||||
c = ch;
|
c = ch;
|
||||||
read_name:
|
if (c) {
|
||||||
inp();
|
inp();
|
||||||
q = buf;
|
q = buf;
|
||||||
while (ch != c && ch != '\n' && ch != CH_EOF) {
|
while (ch != c && ch != '\n' && ch != CH_EOF) {
|
||||||
@ -1591,12 +1590,6 @@ ST_FUNC void preprocess(int is_bof)
|
|||||||
}
|
}
|
||||||
*q = '\0';
|
*q = '\0';
|
||||||
minp();
|
minp();
|
||||||
#if 0
|
|
||||||
/* eat all spaces and comments after include */
|
|
||||||
/* XXX: slightly incorrect */
|
|
||||||
while (ch1 != '\n' && ch1 != CH_EOF)
|
|
||||||
inp();
|
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
/* computed #include : either we have only strings or
|
/* computed #include : either we have only strings or
|
||||||
we have anything enclosed in '<>' */
|
we have anything enclosed in '<>' */
|
||||||
|
|||||||
Reference in New Issue
Block a user