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