Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bionet!ames!ncar!gatech!udel!rochester!rit!tropix!moscom!ur-valhalla!uhura.cc.rochester.edu!sunybcs!rutgers!cs.utexas.edu!uunet!mcvax!kth!sunic!ifi!naggum!is.uu.no!ra From: ra@is.uu.no (Robert Andersson) Newsgroups: comp.unix.xenix Subject: Problem with 286 large model libcurses.a in 2.3 Keywords: 286, libcurses, 2.3, tgetstr Message-ID: <329@isncr.is.uu.no> Date: 22 Jul 89 20:36:25 GMT Organization: International Systems, Oslo, Norway Lines: 34 Environment: 386 PC XENIX/386 2.3.2 Op.sys., 2.3.0 Dev.sys. The following program fails with a core dump inside tgetstr(). There seems to be a bug in the termcap emulation in terminfo. It crashes whenever tgetstr() is handed a string which is known by the termcap emulation and not defined in the terminfo entry. It only happens when compiling with the 286 libcurses, no problems whatsoever with the 386 library. We need the 286 crosscompilation in order to support customers still running on that platform. Yes, we know we can use libtermcap instead, but would prefer using terminfo, not termcap. Any suggestions? Compile this program with: cc -M2l -F 2000 -o bug bugs.c -lcurses char *getenv(), *malloc(), *tgetstr(); main() { char *termptr, *buff, *tcptr, *ptr, tcbuff[512]; termptr = getenv("TERM"); buff = malloc(1024); tgetent(buff, termptr); tcptr = tcbuff; ptr = tgetstr("ti", &tcptr); } Run the program with TERM set to a terminal type that do not have smcup defined in the terminfo entry. -- Robert Andersson, International Systems, Oslo, Norway Internet: ra@is.uu.no UUCP: ...!{uunet,mcvax,ifi}!is.uu.no!ra