Lines Matching full:console
2156 /***** Console Window Terminal Emulation *****/
2161 // This reads input from a Win32 console window and translates it into Unix
2171 // console windows on Windows, but to be better than the original code which
2176 // This implementation reconfigures the console with SetConsoleMode(), then
2183 // * stdin_raw_init() and stdin_raw_restore() reconfigure the console.
2184 // * unix_read() detects console windows (as opposed to pipes, files, etc.).
2188 // Read an input record from the console; one that should be processed.
2189 static bool _get_interesting_input_record_uncached(const HANDLE console,
2194 if (!ReadConsoleInputA(console, input_record, 1, &read_count)) {
2228 static KEY_EVENT_RECORD* _get_key_event_record(const HANDLE console) {
2229 // If nothing cached, read directly from the console until we get an
2232 if (!_get_interesting_input_record_uncached(console,
2591 static int _console_read(const HANDLE console, void* buf, size_t len) {
2593 KEY_EVENT_RECORD* const key_event = _get_key_event_record(console);
2982 static HANDLE _console_handle; // when set, console mode should be restored
2997 // If GetConsoleMode() fails, stdin is probably is not a console.
3015 // reading from and that the old console mode should be restored later.
3020 // read from the console.
3043 // called, and it successfully configured the console, then read from
3044 // the console using Win32 console APIs and partially emulate a unix