Commit 39482c36 authored by rswindell's avatar rswindell
Browse files

Quicksilver's mod: prototype for _termios_reset(), adds _echo_on() and

_echo_off() functions.
parent 0363a3ef
......@@ -107,6 +107,19 @@ void _termios_setup(void)
signal(SIGCONT, _sighandler_cont);
}
void _echo_on(void)
{
tcgetattr(STDIN_FILENO, &current);
current.c_lflag |= ECHO; /* turn on echoing */
tcsetattr(STDIN_FILENO, TCSANOW, &current);
}
void _echo_off(void)
{
tcgetattr(STDIN_FILENO, &current);
current.c_lflag &= ~ECHO; /* turn off echoing */
tcsetattr(STDIN_FILENO, TCSANOW, &current);
}
int kbhit(void)
{
......
......@@ -40,8 +40,11 @@
#if defined(__unix__)
int kbhit(void);
int getch(void);
void _termios_reset(void);
void _echo_on(void);
void _echo_off(void);
int kbhit(void);
int getch(void);
#else /* DOS-Based */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment