home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- 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
- From: paulk@garfield.cs.mun.ca (Paul E. King)
- Subject: Getting input from the keyboard
- Message-ID: <1992Dec14.212611.12032@cs.mun.ca>
- Sender: usenet@cs.mun.ca (NNTP server account)
- Organization: CS Dept., Memorial University of Newfoundland
- Date: Mon, 14 Dec 1992 21:26:11 GMT
- Lines: 26
-
- I am beginner in the C language, and was wondering if anyone is willing to
- help me on what seems to be an unsolvable problem(so far).
-
- I am familiar with PASCAL, FORTRAN, and many versions of BASIC,
- including QuickBASIC.
-
- I want to know how C can obtain input from the keyboard directly, without
- my having to type a carriage return. I know that the vi editor works on this
- principle (that is what I am using now).
-
- In QuickBASIC, I understand that both INKEY$ and INPUT$(1) do not need a
- carriage return to obtain input from the keyboard and run statements resulting
- from such input. I have used them in several programs already. Is there
-
- I am told by one of the profs that what I seem to be asking is how to enter
- CBREAK mode. Apparently this seems to have something to do with a
- function called ioctl(), and "orring" one hex constant into another.
- However, I am told that there are less complicated ways of doing this, but
- nobody could think of what it was. Can anybody here suggest anything?
- I am using a UNIX-based System V Berekley C compiler. Some of the compilers
- on campus also use AT&T System V as well. For what it's worth, I have access
- to the Sparc stations as well as Atari-ST, XL87, vt100 terminals, if that
- is an issue (I don't know). Thanks in advance.
-
- paulk@odie.cs.mun.ca
-
-