Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!pacbell!hoptoad!peora!rtmvax!tarpit!rd From: rd@tarpit.UUCP (Bob Thrush) Newsgroups: comp.unix.microport Subject: Re: term.c for rn on uport 286 Keywords: rn, term.c, V/AT(286) Message-ID: <322@tarpit.UUCP> Date: 24 Nov 88 16:48:24 GMT References: <102@swamps.UUCP> <405@zinn.MV.COM> <153@tree.UUCP> <2209@ddsw1.MCS.COM> Reply-To: rd@tarpit.UUCP (Bob Thrush) Organization: Automation Intelligence,Inc; Orlando,FL Lines: 76 In article <2209@ddsw1.MCS.COM> karl@ddsw1.MCS.COM(Karl Denninger) writes: >In article <153@tree.UUCP> stever@tree.UUCP (Steve Rudek) writes: >>In article <405@zinn.MV.COM>, mem@zinn.MV.COM (Mark E. Mallett) writes: >>> >>> When I upgraded to 2.4 of System V/AT, I got segmentation violations >>> out of term.c in rn. Because of the comments I'd read here about >>> the new curses being buggy, I simply went back to the curses >>> library from the previous release. Voila, no more segmentation >>> errors. >>Can anyone here second that curses is the source of the errors? > >I'd like some confirmation of that too.... or lack thereof. > Sounds very similar to the "tgetstr" problem with 2.2 and 2.3.1 curses is definitely a problem with the (same) large/libcurses.a that came with both Release 2.2 and 2.3.1(beta). "tgetstr" is broken in this library. In a previous posting <316@tarpit.UUCP>, I described the problem that I had with rn's "term.c" using the beta 2.3.1 release of V/AT. "tgetstr" should be used as: SYNOPSIS char * tgetstr(id, area) char *id, **area; However, tgetstr behaves as though area is defined as "char *area". My patch to "term.c" merely compensates for the error in tgetstr. Release 2.4 may have a correct "tgetstr" function. Has someone built rn successfully after installing 2.4? FYI, here are the details on the 2.[23] libcurses.a and tgetstr member from my system: ls -l /usr/lib/large/libcurses.a -r--r--r-- 1 root sys 207960 Apr 14 1988 /usr/lib/large/libcurses.a ar -tv /usr/lib/large/libcurses.a | fgrep tgetstr rw-rw-rw- 0/ 3 12370 Apr 13 20:15 1988 tgetstr.o And for good measure here is the previously mentioned patch to rn's term.c: ------------ snip here ----------- *** term.c Fri Nov 21 17:39:32 1986 --- term.c.uport Sat Nov 19 23:28:06 1988 *************** *** 33,39 **** --- 33,45 ---- /* guarantee capability pointer != Nullch */ /* (I believe terminfo will ignore the &tmpaddr argument.) */ + #define MICROPORT_286_CURSES_BUG + + #ifdef MICROPORT_286_CURSES_BUG + #define Tgetstr(key) ((tmpstr = tgetstr(key,tcarea)) ? tmpstr : nullstr) + #else #define Tgetstr(key) ((tmpstr = tgetstr(key,&tmpaddr)) ? tmpstr : nullstr) + #endif MICROPORT_286_CURSES_BUG #ifdef PUSHBACK struct keymap { ------------ and here ----------- >-- >Karl Denninger (karl@ddsw1.MCS.COM, ddsw1!karl) >Data: [+1 312 566-8912], Voice: [+1 312 566-8910] >Macro Computer Solutions, Inc. "Quality solutions at a fair price" BTW, did my previous postings <115@tarpit.UUCP> c. 11/4/88 and <316@tarpit.UUCP> c. 11/20/88 make it out to this newsgroup? (We had some problems earlier with an upstream feed). Please reply by email. Thanks. -- Bob Thrush UUCP: {rtmvax,ucf-cs}!tarpit!rd Automation Intelligence, 1200 W. Colonial Drive, Orlando, Florida 32804