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))
|
||||
putc(*p, stderr);
|
||||
fprintf(stderr, " >>> ");
|
||||
for (; p < q; p++)
|
||||
for (; p < ep; p++)
|
||||
if (isprint((uchar)*p))
|
||||
putc(*p, stderr);
|
||||
fprintf(stderr, " <<< ");
|
||||
|
|
|
|||
|
|
@ -23,8 +23,9 @@ void print(void) /* arrange final output */
|
|||
int c;
|
||||
double dx, dy, xfac, yfac;
|
||||
|
||||
if (tfd != NULL) {
|
||||
fclose(tfd); /* end the temp file */
|
||||
if (tfd != stdout) {
|
||||
if (tfd)
|
||||
fclose(tfd); /* end the temp file */
|
||||
tfd = stdout;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue