[comp.sys.apollo] Bug in TrmAPOLLO.c

lnz@babel.UUCP (Leonard Zubkoff) (05/07/87)

There is a bug in the TrmAPOLLO.c file I distributed which can cause EMACS to
die if you type quickly immediately after POPing the window.  To fix the
problem, in the routine gpr_io_$get, replace the lines:

	unsigned char EventData[1];
	gpr_$position_t EventPosition;
	status_$t Status;

with
	unsigned char EventData[1];
	gpr_$position_t EventPosition;
	status_$t Status;
	short AcquireCount;

and the lines

	bcopy(InputBuffer,BufferP,InputBufferLength);
	if (InputBufferLength > 0) then
	    pad_$pop_push_window(ios_$stdout,1,true,Status);

with

	bcopy(InputBuffer,BufferP,InputBufferLength);
	if (InputBufferLength > 0) then
	    begin
		gpr_$force_release(AcquireCount,Status);
		pad_$pop_push_window(ios_$stdout,1,true,Status);
		while (--AcquireCount >= 0) do
		    ScreenUnobscured = gpr_$acquire_display(Status);
	    end;