#include <wchar.h>
Go to the source code of this file.
Defines | |
| #define | INPUT_COMMON_RESERVED 0xe000 |
| Use unencoded private-use keycodes for internal characters. | |
Enumerations | |
| enum | { R_NULL = INPUT_COMMON_RESERVED, R_EOF } |
Functions | |
| void | input_common_init (int(*ih)()) |
| Init the library. | |
| void | input_common_destroy () |
| Free memory used by the library. | |
| wchar_t | input_common_readch (int timed) |
| Function used by input_readch to read bytes from stdin until enough bytes have been read to convert them to a wchar_t. | |
| void | input_common_unreadch (wint_t ch) |
| Push a character or a readline function onto the stack of unread characters that input_readch will return before actually reading from fd 0. | |
| anonymous enum |
| wchar_t input_common_readch | ( | int | timed | ) |
Function used by input_readch to read bytes from stdin until enough bytes have been read to convert them to a wchar_t.
Conversion is done using mbrtowc. If a character has previously been read and then 'unread' using input_common_unreadch, that character is returned. If timed is true, readch2 will wait at most WAIT_ON_ESCAPE milliseconds for a character to be available for reading before returning with the value WEOF.
References debug(), input_common_readch(), lookahead_arr, lookahead_count, R_NULL, readb(), and WAIT_ON_ESCAPE.
Referenced by input_common_readch(), input_readch(), and input_try_mapping().
1.5.6