22 HANDLE hStdin = GetStdHandle(STD_INPUT_HANDLE);
24 GetConsoleMode(hStdin, &mode);
26 mode &= ~ENABLE_ECHO_INPUT;
28 mode |= ENABLE_ECHO_INPUT;
30 SetConsoleMode(hStdin, mode);
33 tcgetattr(STDIN_FILENO, &tty);
39 (void)tcsetattr(STDIN_FILENO, TCSANOW, &tty);
46 return _isatty(_fileno(stdin));
48 return isatty(fileno(stdin));
61 fds.fd = STDIN_FILENO;
63 return poll(&fds, 1, 0) == 1;
void SetStdinEcho(bool enable)