home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / c / 18443 < prev    next >
Encoding:
Text File  |  1992-12-15  |  1.7 KB  |  37 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!yale.edu!qt.cs.utexas.edu!cs.utexas.edu!torn!csd.unb.ca!news.ucs.mun.ca!cs.mun.ca!garfield.cs.mun.ca!paulk
  3. From: paulk@garfield.cs.mun.ca (Paul E. King)
  4. Subject: Getting input from the keyboard
  5. Message-ID: <1992Dec14.212611.12032@cs.mun.ca>
  6. Sender: usenet@cs.mun.ca (NNTP server account)
  7. Organization: CS Dept., Memorial University of Newfoundland
  8. Date: Mon, 14 Dec 1992 21:26:11 GMT
  9. Lines: 26
  10.  
  11. I am beginner in the C language, and was wondering if anyone is willing to
  12. help me on what seems to be an unsolvable problem(so far).
  13.  
  14. I am familiar with PASCAL, FORTRAN, and many versions of BASIC, 
  15. including QuickBASIC.
  16.  
  17. I want to know how C  can obtain input from the keyboard directly, without
  18. my having to type a carriage return. I know that the vi editor works on this
  19. principle (that is what I am using now). 
  20.  
  21. In QuickBASIC, I understand that both INKEY$ and INPUT$(1) do not need a 
  22. carriage return to obtain input from the keyboard and run statements resulting
  23. from such input. I have used them in several programs already. Is there
  24.  
  25. I am told by one of the profs that what I seem to be asking is how to enter
  26. CBREAK mode. Apparently this seems to have something to do  with a 
  27. function called ioctl(), and "orring" one hex constant into another.
  28. However, I am told that there are less complicated ways of doing this, but
  29. nobody could think of what it  was. Can anybody here suggest anything?
  30. I am using a UNIX-based System V Berekley C compiler.  Some of the compilers 
  31. on campus also use AT&T System V as well. For what it's worth, I have access
  32. to the Sparc stations as well as Atari-ST, XL87, vt100 terminals, if  that
  33. is an issue (I don't know). Thanks in advance.
  34.  
  35. paulk@odie.cs.mun.ca
  36.  
  37.