Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!rutgers!ucla-cs!sdcrdcf!hplabs!decwrl!decvax!tektronix!reed!nscpdc!rgb From: rgb@nscpdc.UUCP Newsgroups: comp.sources.d Subject: Sc 3.1 and curses Message-ID: <824@nscpdc.NSC.COM> Date: Wed, 28-Jan-87 14:51:44 EST Article-I.D.: nscpdc.824 Posted: Wed Jan 28 14:51:44 1987 Date-Received: Sat, 31-Jan-87 04:43:18 EST Reply-To: rgb@nscpdc.UUCP (Robert Bond) Organization: NSC Portland, Oregon Lines: 50 I got the following letter from Eric Goldman and appreciate with his comments. Using curses is like wearing a "KICK ME" sign. No two versions are the same. This will NOT go into my normal distribution because folks should be encouraged to fix sc compiled and ran fine on a VAX running 4.3 BSD at my site. However, it compiled, but screwed up the nl()/nonl() stuff, when run on my MicroVAX II running Ultrix 1.2; the same problem occurred on a VAX running vanilla 4.2 BSD. I traced it to a bug in the nl()/nonl() definitions in /usr/include/curses.h that appears to exist only in the 4.2 BSD and Ultrix 1.X versions of that file. I suspect that someone had fixed those definitions on the 4.2 BSD system you tested it on. (In fact, on a Sun 2 at my site running Sun UNIX 3.0 [basically 4.2 BSD with Sun enhancements], the nl()/nonl() stuff in /usr/include/curses.h has been fixed [by Sun]. I haven't tried compiling sc on it yet, however.) The following patch to sc.c is necessary for vanilla 4.2 BSD machines and Ultrix 1.2 (and presumably Ultrix 1.0 and 1.1) machines: *** sc.c Tue Jan 27 15:54:31 1987 --- sc.c.new Tue Jan 27 15:55:06 1987 *************** *** 14,19 **** --- 14,26 ---- #include + #ifdef BSD42 + #undef nl + #undef nonl + #define nl() (_tty.sg_flags |= CRMOD,_pfast = _rawmode,stty(_tty_ch, &_tty)) + #define nonl() (_tty.sg_flags &= ~CRMOD, _pfast = TRUE, stty(_tty_ch, &_tty)) + #endif + #ifdef BSD42 #include #else #ifndef SYSIII Perhaps you should post it to comp.sources.d. Thanks. --Eric ------------------------------------------- Eric S. Goldman, M.D. UCSF School of Medicine INET: goldman@cope.ucsf.edu UUCP: ...ucbvax!ucsfcgl!cope.ucsf!goldman BITNET: GOLDMAN@UCSFCOPE.BITNET -- Robert Bond ihnp4!nsc!nscpdc!rgb National Semiconductor tektronix!nscpdc!rgb