tgetent core dump on sco xenix

The Super User root at libove.UUCP
Wed Jun 29 12:31:19 AEST 1988


A game was posted some time back called "puzzle". It doesn't work
under SCO Xenix development system 2.1.4g because if compiled with
small model, the single 64K segment isn't sufficient for all its
data, and if compiled under large model it core dumps along the lines
of the much simplified example that follows.

Can anyone explain this?

[root]/tmp:(1 ) % cat argle.c
#include <stdio.h>
#include <sgtty.h>

main()
	{
	char	buffer[1024];

	printf("%d\n",tgetent(buffer,getenv("TERM")));
	};
[root]/tmp:(2 ) % cc -Ml2e -o argle argle.c -ltermcap
argle.c
[root]/tmp:(3 ) % ./argle
./argle: Segmentation violation -- Core dumped
[root]/tmp:(4 ) % adb argle core
* $c
  tnamatch1d82efe8(5436., 0.)	from   tget1ent1d82efe8+320.
  tget1ent1d82efe8(4280., 71., 5436., 0.)	from _tgetent+29.
_tgetent(4280.,	71., 5436.)	from _main+38.
_main(1., 5338., 71., 5346., 71.)	from __start+94.
__start()	from start0+7.
* 
[root]/tmp:(5 ) % cc -o argle argle.c -ltermcap
argle.c
[root]/tmp:(6 ) % ./argle
1
[root]/tmp:(7 ) % 

This is an a PCs Limited AT (IBM PC/AT clone, 8 Mhz) with SCO Xenix 2.2.1
(modified with Ptydriver) and 2.1.4g development system.

Jay Libove               Internet: libove at cs.cmu.edu libove at andrew.cmu.edu
5313 Ellsworth Avenue              formtek!ditka!libove!libove at pt.cs.cmu.edu
Pittsburgh, PA 15232         UUCP: cmucspt!formtek!ditka!libove!libove
(412) 621-9649                     cadre!pitt!darth!libove!libove



More information about the Comp.unix.xenix mailing list