🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #901

Setting FNDELAY with fcntl for curses

#901
From: Stacy D. Coil
Date: Sun, 30 Aug 1992 21:24
24 lines
1396 bytes
I am trying to emulate the nodelay function in the System V
implementation of curses, but I am having no luck.  I assume that I
need to set a flag to make non-blocking reads with stdin.  I have
tried using fcntl() with no avail.  This is what I think should work -

	fok = fcntl(stdin, F_SETFL, FNDELAY);

I know that this is wrong, but I cannot come up with the correct call.

Could someone please explain what I am doing wrong and show me the
correct code?


Thank you

Stacy

-------------------------------------------------------------------------------
Stacy D. Coil			         The Ohio State University
Student Programmer		Electrical Engineering Computer Facilities
coil@ee.eng.ohio-state.edu		      Columbus, Ohio
coil@cis.ohio-state.edu			      (614) 292-1416
-------------------------------------------------------------------------------
Technical Details
Message-ID: <1992Aug30.212427.5815@ee.eng.ohio-state.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!att!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sample.eng.ohio-state.edu!sneezy!coil

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer,comp.unix.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!att!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!sample.eng.ohio-state.edu!sneezy!coil
From: coil@sneezy.eng.ohio-state.edu (Stacy D. Coil)
Subject: Setting FNDELAY with fcntl for curses
Message-ID: <1992Aug30.212427.5815@ee.eng.ohio-state.edu>
Sender: news@ee.eng.ohio-state.edu
Organization: The Ohio State University Dept of Electrical Engineering
Date: Sun, 30 Aug 1992 21:24:27 GMT
Lines: 24