🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #6693

Re: How do I unbuffer console IO under QuickC and DOS?

#6693
From: Duane L. Rezac
Date: Fri, 17 May 1991 11:24
31 lines
1728 bytes
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.    |
+-----------------------+---------------------------------------------------+
Technical Details
Message-ID: <1119@dcsc.dla.mil>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!dsac.dla.mil!dsacg3.dsac.dla.mil!dcsc.dla.mil!drezac
References: <1991May15.181314.16216@cs.dal.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!dsac.dla.mil!dsacg3.dsac.dla.mil!dcsc.dla.mil!drezac
From: drezac@dcsc.dla.mil (Duane L. Rezac)
Newsgroups: comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
Subject: Re: How do I unbuffer console IO under QuickC and DOS?
Message-ID: <1119@dcsc.dla.mil>
Date: 17 May 91 11:24:14 GMT
References: <1991May15.181314.16216@cs.dal.ca>
Followup-To: comp.os.msdos.programmer
Distribution: na
Organization: Defense Construction Supply Center, Columbus
Lines: 31