blob: da5fe128682aaf72a7b1595fef5209433bda82f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#include <termios.h>
#include "utils.h"
static struct termios original_term;
void disable_term_echo()
{
struct termios new_setting;
tcgetattr(0, &original_term);
new_setting = original_term;
new_setting.c_lflag &= ~ECHO;
tcsetattr(0, TCSANOW, &new_setting);
}
void enable_term_echo()
{
tcsetattr(0, TCSANOW, &original_term);
}
|