mariadb/innobase/os/os0trash.c
2001-02-17 14:19:19 +02:00

43 lines
880 B
C

/* Stores the old console mode when echo is turned off */
ulint os_old_console_mode;
/********************************************************************
Turns off echo from console input. */
void
os_console_echo_off(void)
/*=====================*/
{
GetConsoleMode(stdio, &os_old_console_mode);
SetConsoleMode(stdio, ENABLE_PROCESSED_INPUT);
}
/********************************************************************
Turns on echo in console input. */
void
os_console_echo_on(void)
/*====================*/
{
SetConsoleMode(stdio, &os_old_console_mode);
}
/********************************************************************
Reads a character from the console. */
char
os_read_console(void)
/*=================*/
{
char input_char;
ulint n_chars;
n_chars = 0;
while (n_chars == 0) {
ReadConsole(stdio, &input_char, 1, &n_chars, NULL);
}
return(input_char);
}