Re: Linux: Unbuffered reading from stdin
- From: Ian Malone <ibm21@xxxxxxxxx>
- Date: Mon, 22 Oct 2007 12:38:47 +0100
Markus Mayer wrote:
Hi folks.
I'm somewhat new to *nix programming and just ran into a problem. I have
to take user input from the terminal but like to constrain that to some
rules given, i.e. "numbers only" or "alphanumeric only" etc.
scanf would do, but I don't like the fact that wrong ('disallowed')
characters are visible and all that stuff. For that I need unbuffered
input.
However things become nasty when the user presses an key that sends an
escape sequence.
Any ideas? Or am I reinventing the wheel?
This is really a comp.unix.programming question, but it
sounds like ncurses is what you want.
--
imalone
.
- Follow-Ups:
- Re: Linux: Unbuffered reading from stdin
- From: CBFalconer
- Re: Linux: Unbuffered reading from stdin
- From: Markus Mayer
- Re: Linux: Unbuffered reading from stdin
- References:
- Linux: Unbuffered reading from stdin
- From: Markus Mayer
- Linux: Unbuffered reading from stdin
- Prev by Date: Re: Print a short instead of an int... ? What's up with "%hd"?
- Next by Date: Re: lcc-win32 and GNU
- Previous by thread: Linux: Unbuffered reading from stdin
- Next by thread: Re: Linux: Unbuffered reading from stdin
- Index(es):