Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdcsvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!houxm!houxz!vax135!cornell!uw-beaver!tektronix!hplabs!sdcrdcf!sdcsvax!laman From: laman@sdcsvax.UUCP (Mike Laman) Newsgroups: net.bugs.usg Subject: System V.2 Curses #4 Message-ID: <1115@sdcsvax.UUCP> Date: Fri, 10-Aug-84 19:45:49 EDT Article-I.D.: sdcsvax.1115 Posted: Fri Aug 10 19:45:49 1984 Date-Received: Mon, 13-Aug-84 00:16:51 EDT Organization: EECS Dept. U.C. San Diego Lines: 33 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; jstd_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