MCPcopy Create free account
hub / github.com/ading2210/linuxpdf / term_init

Function term_init

tinyemu/temu.c:74–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74static void term_init(BOOL allow_ctrlc)
75{
76 struct termios tty;
77
78 memset(&tty, 0, sizeof(tty));
79 tcgetattr (0, &tty);
80 oldtty = tty;
81 old_fd0_flags = fcntl(0, F_GETFL);
82
83 tty.c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
84 |INLCR|IGNCR|ICRNL|IXON);
85 tty.c_oflag |= OPOST;
86 tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN);
87 if (!allow_ctrlc)
88 tty.c_lflag &= ~ISIG;
89 tty.c_cflag &= ~(CSIZE|PARENB);
90 tty.c_cflag |= CS8;
91 tty.c_cc[VMIN] = 1;
92 tty.c_cc[VTIME] = 0;
93
94 tcsetattr (0, TCSANOW, &tty);
95
96 atexit(term_exit);
97}
98
99static void console_write(void *opaque, const uint8_t *buf, int len)
100{

Callers 1

console_initFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected