On 18:06 06 Apr 2002, Brian <[EMAIL PROTECTED]> wrote: | Use scanf fuction it works better..
Well, only in a simplistic sense. The original user wanted character at at time input from the looks of it. Normally ttys are in "cooked" mode with typed data being dispatched in chunks on newline. So you get line at a time, and scanf("%c",...) or whatever does nothing to affect that. The original respondent was quite right - you _do_ need to muck about with terminal modes first before expecting char-at-a-time input - the usual method is either termios functions or via some higher level library like the curses library (which has handy mode functions - you can skip the screen update stuff altogether if you just was to turn on cbreak mode). -- Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/ This is not a bug. It's just the way it works, and makes perfect sense. - Tom Christiansen <[EMAIL PROTECTED]> I like that line. I hope my boss falls for it. - Chaim Frenkel <[EMAIL PROTECTED]> _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list