term.c for rn on uport 286

Bob Thrush rd at tarpit.UUCP
Fri Nov 25 02:48:24 AEST 1988


In article <2209 at ddsw1.MCS.COM> karl at ddsw1.MCS.COM(Karl Denninger) writes:
>In article <153 at tree.UUCP> stever at tree.UUCP (Steve Rudek) writes:
>>In article <405 at zinn.MV.COM>, mem at 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 at 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 at 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 at tarpit.UUCP> c. 11/4/88 and 
<316 at 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



More information about the Comp.unix.microport mailing list