1
0
mirror of https://github.com/RevCurtisP/C02.git synced 2024-11-22 01:31:33 +00:00

Added flush of stdout and stderr when exiting with an error

This commit is contained in:
Curtis F Kaylor 2020-02-23 14:23:35 -05:00
parent 4bc038a56d
commit 910a807fbc

View File

@ -12,6 +12,7 @@
/* Error - Print Input File name & position and exit */ /* Error - Print Input File name & position and exit */
void exterr(int errnum) { void exterr(int errnum) {
fprintf(stderr, "Line %d Column %d of File %s\n", curlin, curcol, inpnam); fprintf(stderr, "Line %d Column %d of File %s\n", curlin, curcol, inpnam);
fflush(stdout); fflush(stderr);
exit(errnum); exit(errnum);
} }