home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!news.mentorg.com!sun_hybrid!stuartj
- From: stuartj@esg.mentor.com (Stuart John)
- Subject: Re: Getting input from the keyboard
- Sender: news@news.mentorg.com (News User)
- Message-ID: <1992Dec16.112620.19555@news.mentorg.com>
- Date: Wed, 16 Dec 1992 11:26:20 GMT
- Reply-To: stuartj@esg.mentor.com
- References: <1992Dec14.212611.12032@cs.mun.ca> <pal.724501355@regent.e-technik.tu-muenchen.de>
- Nntp-Posting-Host: sun_hybrid.mentorg.com
- Organization: Mentor Graphics Corporation
- Keywords:
- Followup-To:
- Lines: 38
-
- In article <pal.724501355@regent.e-technik.tu-muenchen.de>, pal@regent.e-technik.tu-muenchen.dbp.de (Peter Loibl) writes:
- |> paulk@garfield.cs.mun.ca (Paul E. King) writes:
- |>
- |> [stuff deleted]
- |>
- |> >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).
- |>
- |> [stuff deleted]
- |>
- |> >I am using a UNIX-based System V Berekley C compiler.
- |>
- |> [stuff deleted]
- |>
- |> Hi!
- |>
- |> getc(FILE *stream) reads one single character from a certain stream.
- |> Streams are: open files, stdin and stderr (stdout is also one, but
- |> this makes little sense here).
- |>
- |> You should try getc(stdin).
- |>
- |> More details are on the manual pages.
- |>
- |> Peter Loibl
- |> pal@regent.e-technik.tu-muenchen.de
-
- I was trying to do this at uni last year, and in the end i had to use
- a couple of curses structures to turn 'cooked' mode into 'raw' mode
- on the terminal, so it didn't buffer input lines.
- --
- _
- ( `/_
- (_)(_(/ stuartj@esg.mentor.com
- Mentor Graphics Corporation, BRACKNELL, England
-
- #include<std.disclaimer>
-