🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

How can I unbuffer stdin?

#4050
From: Mike Hovan
Date: Thu, 27 Dec 1990 23:35
18 lines
1232 bytes
I am attempting to read a character at a time from stdin using getch.
Unfortunately, it buffers my input until enter is pressed.  I tried
unbuffering stdin using something like:

		setvbuf(stdin,NULL,_IONBF,0);

but it doesn't seem to help.  I don't want to use the conio functions
because the input is going to be redirected using ctty.  Does anybody
have a fix?  Does anybody know what I am talking about?  Does anybody
care?  Does anybody really know what time it is?

		Mike

-- 
  |X|X|"Pay no mind to what they say,           Michael Andrew Hovan III |X|X|
  |X|   Doesn't matter anyway hey hey hey,      mhovan@gmuvax2.gmu.edu     |X|
  |X|   Our lips are sealed."                   George Mason University    |X|
  |X|X|                       --The Go-Go's     Fairfax, Virginia, USA   |X|X|
Technical Details
Message-ID: <3169@gmuvax2.gmu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!rex!uflorida!gatech!udel!haven!umbc3!gmuvax2!mhovan

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!wuarchive!rex!uflorida!gatech!udel!haven!umbc3!gmuvax2!mhovan
From: mhovan@gmuvax2.gmu.edu (Mike Hovan)
Newsgroups: comp.os.msdos.programmer
Subject: How can I unbuffer stdin?
Keywords: stdin buffered unbuffer
Message-ID: <3169@gmuvax2.gmu.edu>
Date: 27 Dec 90 23:35:08 GMT
Organization: George Mason Univ., Fairfax, Va.
Lines: 18