|
From: Phillip S. <ps...@cf...> - 2002-05-01 23:55:19
|
getc() and getchar() both do NOT set the terminal to raw mode, at least not on win2k with microsoft's msvcrt.dll. The non standard function getch() however, does, which also means that it returns special codes for non ascii keys, such as the arrow keys and function keys. None of the C standard IO functions will do this. At 02:21 AM 5/2/2002 +0300, you wrote: >On Wed, 1 May 2002, Hartmut Birr wrote: > > > I think, getchar can not use getc for getting one character. Getchar must > > set the console to non line buffered mode, wait for one character and read > > it, and restore the old console mode. > > > > - Hartmut > >getchar(); should be equivalent to getc(stdin); It is getc() that has to >behave this way if its parameter is stdin and is redirected to the >keyboard. > > > Emil |