embryo: handle filename given to #line command
SVN revision: 62382
This commit is contained in:
parent
c76a60b0a5
commit
ae4dd858bd
|
@ -942,6 +942,22 @@ command(void)
|
||||||
if (lex(&val, &str) != tNUMBER)
|
if (lex(&val, &str) != tNUMBER)
|
||||||
error(8); /* invalid/non-constant expression */
|
error(8); /* invalid/non-constant expression */
|
||||||
fline = (int)val;
|
fline = (int)val;
|
||||||
|
|
||||||
|
while (*lptr == ' ' && *lptr != '\0')
|
||||||
|
lptr++; /* skip whitespace */
|
||||||
|
if (*lptr == '"')
|
||||||
|
{
|
||||||
|
char pathname[PATH_MAX];
|
||||||
|
|
||||||
|
lptr = getstring(pathname, sizeof pathname);
|
||||||
|
if (pathname[0] != '\0')
|
||||||
|
{
|
||||||
|
free(inpfname);
|
||||||
|
inpfname = strdup(pathname);
|
||||||
|
if (!inpfname)
|
||||||
|
error(103); /* insufficient memory */
|
||||||
|
} /* if */
|
||||||
|
}
|
||||||
} /* if */
|
} /* if */
|
||||||
check_empty(lptr);
|
check_empty(lptr);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue