blob: 8c6ebc6fcae2621838a25a755c1f0b3ec920c756 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
--- settatr.c.orig Mon Mar 26 14:59:01 2007
+++ settatr.c Mon Mar 26 15:00:41 2007
@@ -4,7 +4,7 @@
set_terminal_attributes()
{
-#ifdef BSD
+#if 0
struct sgttyb sg;
struct tchars tc;
struct ltchars lt;
@@ -33,20 +33,19 @@
lt.t_rprntc = '';
ioctl ( 0, TIOCSLTC, < );
#endif
-#ifdef SYSV
- struct termio t;
+#if 1
+ struct termios t;
- ioctl ( 0, TCGETA, &t );
+ tcgetattr(0, &t);
t.c_cc[VINTR] = '\003';
t.c_cc[VERASE] = '\b';
t.c_cc[VKILL] = '\025';
t.c_iflag = IGNBRK | IGNPAR | ICRNL | IXON ;
- t.c_oflag = OPOST | ONLCR ;
+ t.c_oflag = OPOST | ONLCR | OXTABS;
t.c_lflag = ISIG | ICANON | ECHO | ECHOE | ECHOK ;
- t.c_cflag |= TAB3;
- ioctl ( 0, TCSETA, &t );
+ tcsetattr(0, TCSANOW, &t);
#endif
}
set_resource_limits()
|