Re: stuffing the read buffer
Posted in 1992
mukesh@elsouth.wsnc.org (Mukesh Rathor) writes: >>Under DOS, a character can be placed in the front of the keyboard >>buffer using the BIOS interrupt 16h, service 05h. This character ... > > or under Sys V 3.2.x. I wrote a 4GL simulating sperform 2-screens > interface. Upon pressing escape on one screen, I wanted to "stuff > the buffer with an escape" so that when the next screen is > displayed, it will get terminated and after input will do the > checking. I tried, and tried .... and finally resorted to > asking the user to press the esc key again. It would be very > useful if the above was possible... > Mukesh > (mukesh@elsouth.wsnc.org) Mukesh, The method I use to determine whether to go on to the next screen or not is to set a global flag on exit of the last field of the first form. Set your flag to FALSE before input from the first screen. Check the value on exit from input. If the value is TRUE then you know you should probably pull up the next screen. If it's FALSE, then you know the user pressed control- C instead. ---------------------------------------------------------------------------- Jeff Cauhape cauhape@TWG.COM 415/962-7147 Room 224 (SneakerNet) "I haven't lost my mind. It's backed up on tape somewhere." ----------------------------------------------------------------------------