[comp.sys.ibm.pc.programmer] How do I unbuffer console IO under QuickC and DOS?

drezac@dcsc.dla.mil (Duane L. Rezac) (05/17/91)

From article <1991May15.181314.16216@cs.dal.ca>, by dinn@ug.cs.dal.ca (Michael 'Moose' Dinn):
> 
> I need to unbuffer my console IO under DOS and QuickC (or any variant of C).
> How do I do this?
> 
>  i.e. if there's a character waiting for me, getchar() will return it with
> no waiting for a return or anything else...
> 
> Thanks...
> --
>  Michael Dinn, Sysop of the Moose's Swamp - Nova Scotia's largest Amiga BBS

for unbuffered IO in QuickC use getch() - It has worked well for me. 

( my most recent use was to flush the key buffer after detecting a
key hit.   to flush the buffer , I used :   while(kbhit()) getch();




--
Verse of the Hour:
For they that are such serve not our Lord Jesus Christ, but their own
belly; and by good words and fair speeches deceive the hearts of the 
simple.
    Rom. 16:17
-- 
+-----------------------+---------------------------------------------------+
| Duane L. Rezac |These views are my own, and NOT representitive of my place|
| dsacg1!dcscg1!drezac    drezac@dcscg1.dcsc.dla.mil      of Employment.    |
+-----------------------+---------------------------------------------------+