~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to innobase/os/os0trash.c

  • Committer: monty at mysql
  • Date: 2001-02-17 12:19:19 UTC
  • mto: (554.1.1)
  • mto: This revision was merged to the branch mainline in revision 556.
  • Revision ID: sp1r-monty@donna.mysql.com-20010217121919-07904
Added Innobase to source distribution

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Stores the old console mode when echo is turned off */
 
2
ulint   os_old_console_mode;
 
3
 
 
4
/********************************************************************
 
5
Turns off echo from console input. */
 
6
 
 
7
void
 
8
os_console_echo_off(void)
 
9
/*=====================*/
 
10
{
 
11
        GetConsoleMode(stdio, &os_old_console_mode);
 
12
        SetConsoleMode(stdio, ENABLE_PROCESSED_INPUT);
 
13
}
 
14
 
 
15
/********************************************************************
 
16
Turns on echo in console input. */
 
17
 
 
18
void
 
19
os_console_echo_on(void)
 
20
/*====================*/
 
21
{
 
22
        SetConsoleMode(stdio, &os_old_console_mode);
 
23
}
 
24
 
 
25
/********************************************************************
 
26
Reads a character from the console. */
 
27
 
 
28
char
 
29
os_read_console(void)
 
30
/*=================*/
 
31
{
 
32
        char    input_char;
 
33
        ulint   n_chars;
 
34
 
 
35
        n_chars = 0;
 
36
 
 
37
        while (n_chars == 0) {
 
38
                ReadConsole(stdio, &input_char, 1, &n_chars, NULL);
 
39
        }
 
40
 
 
41
        return(input_char);
 
42
}
 
43