grap: fclose, error context bug fixes (Doug Gwyn)
This commit is contained in:
parent
151b86a037
commit
c5a183de10
2 changed files with 4 additions and 3 deletions
|
|
@ -460,7 +460,7 @@ void eprint(void) /* try to print context around error */
|
||||||
if (isprint((uchar)*p))
|
if (isprint((uchar)*p))
|
||||||
putc(*p, stderr);
|
putc(*p, stderr);
|
||||||
fprintf(stderr, " >>> ");
|
fprintf(stderr, " >>> ");
|
||||||
for (; p < q; p++)
|
for (; p < ep; p++)
|
||||||
if (isprint((uchar)*p))
|
if (isprint((uchar)*p))
|
||||||
putc(*p, stderr);
|
putc(*p, stderr);
|
||||||
fprintf(stderr, " <<< ");
|
fprintf(stderr, " <<< ");
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,8 @@ void print(void) /* arrange final output */
|
||||||
int c;
|
int c;
|
||||||
double dx, dy, xfac, yfac;
|
double dx, dy, xfac, yfac;
|
||||||
|
|
||||||
if (tfd != NULL) {
|
if (tfd != stdout) {
|
||||||
|
if (tfd)
|
||||||
fclose(tfd); /* end the temp file */
|
fclose(tfd); /* end the temp file */
|
||||||
tfd = stdout;
|
tfd = stdout;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue