[comp.lang.c] Solution to terminfo curses problem; doesn't hang anymore

karl@ddsw1.UUCP (Karl Denninger) (09/19/88)

%In my article <1715@ddsw1.UUCP> I wrote....
%> Why is it that in a terminfo based implementation that the screen does not
%> redraw on a "refresh()" call if there are characters stacked by type-ahead?
%> 
%> [...]
%> 
%> Is there a work-around for this problem, or a way (other than flushing the
%> input) to get the output to appear _now_ when I call refresh()?  I haven't
%> been able to find it.
%
%Steve Fridel wrote me, and quoted:
%
%     My copy of TFM for curses on the 3B2 running System V
%Release 3.1 says:
%
%	typeahead(fildes)
%
%	     Curses does "line-breakout optimization" by looking for
%	     typeahead periodically while updating the screen........
%	     To disable typeahead checking, specify -1 for fildes.

For the record: I'm running SCO V/386 2.2.1, which seems to be quite SV'ish 
		from the programmers' point of view.

It seems that SCO didn't document this one.  I looked in the library,
and sure enough there was a 'typeahead' entry point.  Crossing fingers, I
inserted the call, and lo and behold -- correct and prompt output!

Rechecking, I was _unable_ to locate this call anywhere in SCO's
documentation, including the on-line manual pages.

It would appear that SCO's terminfo implementation does indeed contain all
the goodies, but SCO failed to document them.  It further appears (on close
examination) that the docs I have here are for the TERMCAP version of curses
only!  Not nice at all!

At least both versions are included, and do appear complete in implementation.

Thanks Steve......

--
Karl Denninger (ddsw1!karl) Data: (312) 566-8912, Voice: (312) 566-8910
Macro Computer Solutions, Inc.    "Quality solutions at a fair price"