newer version, safety commit

This commit is contained in:
ceriel
1986-03-26 17:53:13 +00:00
parent 7c5b41eec7
commit bee901746d
13 changed files with 163 additions and 27 deletions

View File

@@ -170,6 +170,9 @@ _error(class, expr, fmt, argv)
case LEXERROR:
case CRASH:
case FATAL:
#ifdef DEBUG
case VDEBUG:
#endif DEBUG
ln = LineNumber;
break;
}
@@ -180,8 +183,7 @@ _error(class, expr, fmt, argv)
if (ln == last_ln) {
/* we've seen this place before */
e_seen++;
if (e_seen == MAXERR_LINE)
fmt = "etc ...";
if (e_seen == MAXERR_LINE) fmt = "etc ...";
else
if (e_seen > MAXERR_LINE)
/* and too often, I'd say ! */
@@ -192,14 +194,14 @@ _error(class, expr, fmt, argv)
last_ln = ln;
e_seen = 0;
}
if (FileName)
fprintf(ERROUT, "\"%s\", line %u: ", FileName, ln);
if (remark)
fprintf(ERROUT, "%s ", remark);
#ifdef DEBUG
}
#endif
#endif DEBUG
if (FileName) fprintf(ERROUT, "\"%s\", line %u: ", FileName, ln);
if (remark) fprintf(ERROUT, "%s ", remark);
doprnt(ERROUT, fmt, argv); /* contents of error */
fprintf(ERROUT, "\n");
}