home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / next / programm / 5867 < prev    next >
Encoding:
Internet Message Format  |  1992-08-30  |  1.4 KB

  1. Xref: sparky comp.sys.next.programmer:5867 comp.unix.programmer:4492
  2. Newsgroups: comp.sys.next.programmer,comp.unix.programmer
  3. Path: 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
  4. From: coil@sneezy.eng.ohio-state.edu (Stacy D. Coil)
  5. Subject: Setting FNDELAY with fcntl for curses
  6. Message-ID: <1992Aug30.212427.5815@ee.eng.ohio-state.edu>
  7. Sender: news@ee.eng.ohio-state.edu
  8. Organization: The Ohio State University Dept of Electrical Engineering
  9. Date: Sun, 30 Aug 1992 21:24:27 GMT
  10. Lines: 24
  11.  
  12.  
  13. I am trying to emulate the nodelay function in the System V
  14. implementation of curses, but I am having no luck.  I assume that I
  15. need to set a flag to make non-blocking reads with stdin.  I have
  16. tried using fcntl() with no avail.  This is what I think should work -
  17.  
  18.     fok = fcntl(stdin, F_SETFL, FNDELAY);
  19.  
  20. I know that this is wrong, but I cannot come up with the correct call.
  21.  
  22. Could someone please explain what I am doing wrong and show me the
  23. correct code?
  24.  
  25.  
  26. Thank you
  27.  
  28. Stacy
  29.  
  30. -------------------------------------------------------------------------------
  31. Stacy D. Coil                     The Ohio State University
  32. Student Programmer        Electrical Engineering Computer Facilities
  33. coil@ee.eng.ohio-state.edu              Columbus, Ohio
  34. coil@cis.ohio-state.edu                  (614) 292-1416
  35. -------------------------------------------------------------------------------
  36.