Re: Flushing keyboard buffer
Posted in 1994
>From: elfers@nanette.pdb.sni.de (Elfers,Peter,70252,E,940323,000000,) >Subject: Re: Flushing keyboard buffer >Date: 7 Sep 1994 11:30:29 +0200 >X-Informix-List-Id: <news.8528> >In <34hd7vINNp5r@cardamom.compnews.co.uk> ianm@compnews.co.uk (Ian Morris) writes: >>Is there a method in 4gl to enable the keyboard buffer to be flushed. I >>want to be able to stop users typing ahead in a certain application. If >>it is not possible in 4gl how about a solution in C. >I know about a command in C using curses.h: >flushinp() removes all typeahead information (UNIX) The flushinp() function may or may not be part of standard curses -- it is documented in "Unix Curses Explained" by B Goodheart (Prentice Hall, 0-13-931957-3), so I guess it is standard enough. However, Informix does not use standard Curses libraries, and it is not part of the Informix Curses library, so it cannot be used sensibly. Why doesn't Informix uses standard Curses libraries? Because when our products were first produced, the curses implementations available were flaky and inconsistent, and it was better to use a known, not-so-flaky version that we could guarantee than to try using the system version with unknown defects. To some extent, that still applies, but not so clearly. We also need to ensure that we had 8-bit transparency and the ability to handle colour. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>