laman@sdcsvax.UUCP (Mike Laman) (08/11/84)
The "FILE" type variable "outf" is used throughout the curses library for debugging output. There are several causes where it is assumed to NOT be zero; i.e. the value is not checked before using it. It is possible that "outf" is zero, and since the library is very careful to "always" check it, I feel the following are oversights that should be fixed. The following routines do not properly check "outf" before using it: 1. "draino()" (screen/draino.c) should have an "if (outf)" just before the "fprintf()" that is approximately in the middle of the for loop. [ Sorry, I don't have the sources on this system so I can't give you any diffs. ] 2. "mvcur()" (screen/mvcur.c) should have an "if (outf)" just before the first "fprintf()" call in "_loc_right()". 3. "_ll_refresh()" (screen/ll_refresh.c) should have an "if (outf)" just before each "putc('\'', outf);" around line #118 and #142. I made the following sample change, since it is the simplest and to minimize the changes to the source (shorter diffs!). for (j=0; j<SP->std_body[i]->length; j++) { n = SP->std_body[i]->body[j]; if (n & A_ATTRIBUTES) { if (outf) /* Add this line <------------- */ putc('\'', outf); } : : } Mike Laman, NCR @ Torrey Pines UUCP: {ucbvax,philabs,sdcsla}!sdcsvax!laman