Problem with 286 large model libcurses.a in 2.3

Robert Andersson ra at is.uu.no
Sun Jul 23 06:36:25 AEST 1989


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 at is.uu.no
UUCP:             ...!{uunet,mcvax,ifi}!is.uu.no!ra



More information about the Comp.unix.xenix mailing list