Corrected #error and #define
This commit is contained in:
parent
49c5c36362
commit
2552813eaa
|
@ -476,15 +476,13 @@ do_undef(argidf)
|
|||
|
||||
do_error()
|
||||
{
|
||||
static char errbuf[512];
|
||||
register char *bp = errbuf;
|
||||
register int ch;
|
||||
int len;
|
||||
char *get_text();
|
||||
char *bp = get_text((char **) 0, &len);
|
||||
|
||||
while ((ch = GetChar()) != '\n')
|
||||
*bp++ = ch;
|
||||
*bp = '\0';
|
||||
UnGetChar();
|
||||
lexerror("user error: %s", errbuf);
|
||||
lexerror("user error: %s", bp);
|
||||
free(bp);
|
||||
LineNumber++;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -652,6 +650,10 @@ get_text(formals, length)
|
|||
if (c == '\\') add2repl(repl, GetChar());
|
||||
c = GetChar();
|
||||
} while (c != delim && c != EOI && class(c) != STNL);
|
||||
if (c == EOI || class(c) == STNL) {
|
||||
lexstrict("unclosed opening %c", delim);
|
||||
break;
|
||||
}
|
||||
add2repl(repl, c);
|
||||
c = GetChar();
|
||||
} else if (c == '/') {
|
||||
|
|
|
@ -487,15 +487,13 @@ do_undef(argstr)
|
|||
|
||||
do_error()
|
||||
{
|
||||
static char errbuf[512];
|
||||
register char *bp = errbuf;
|
||||
register int ch;
|
||||
int len;
|
||||
char *get_text();
|
||||
char *bp = get_text((char **) 0, &len);
|
||||
|
||||
while ((ch = GetChar()) != '\n')
|
||||
*bp++ = ch;
|
||||
*bp = '\0';
|
||||
UnGetChar();
|
||||
error("user error: %s", errbuf);
|
||||
error("user error: %s", bp);
|
||||
free(bp);
|
||||
LineNumber++;
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -678,6 +676,10 @@ get_text(formals, length)
|
|||
if (c == '\\') add2repl(repl, GetChar());
|
||||
c = GetChar();
|
||||
} while (c != delim && c != EOI && class(c) != STNL);
|
||||
if (c != delim) {
|
||||
strict("unclosed opening %c", delim);
|
||||
break;
|
||||
}
|
||||
add2repl(repl, c);
|
||||
c = GetChar();
|
||||
} else if (c == '/') {
|
||||
|
|
Loading…
Reference in a new issue