[net.sources.bugs] Public Domain Terminfo Stuff

urban@spp2.UUCP (01/10/85)

Attempting to port the public domain curses/terminfo stuff to
the Pyramid 90x, I encountered the following problems:

The sense of the comparison in read_entry for
	if (must_swap())
		read(fd, ptr->Numbers, min(NUMCOUNT, header.num_count*2));
	etc.
appears to be backwards.  This is a real bug that should
be fixed in everyone's copy, since it will speed up the
read_entry routine on machines that don't swap.

In the same routine, the Pyramid C compiler seems to allocate
4-byte entries for the offset_buf array. I changed the
declaration to an array of "short"s and used the "swap"
definition in the relevant loop instead, which simplifies the
appearance of the code anyway.

The routines in lib_printw that attempt to pass a variable
number of arguments have to be modified for the Pyramid so as
to use the facilities in <varargs.h>

Now "mille" seems to be able to function almost right, but
something still seems to be wrong somewhere.  The cursor is
being left in the wrong place after the first ">>>Move:" prompt
is initially drawn and after a screen refresh.  The result is
that the command that first gets typed somehow stays on the
screen in that wrong place (about two spaces to the right of
where it should have been).  Can anyone enlighten me?

	Mike