Lines 1-9
Link Here
|
1 |
--- screen.c.orig Mon Feb 24 12:45:41 1992 |
1 |
--- screen.c.orig Mon Feb 24 12:45:41 1992 |
2 |
+++ screen.c Sat May 20 01:40:56 2000 |
2 |
+++ screen.c Sat May 20 01:40:56 2000 |
3 |
@@ -481,5 +481,5 @@ |
3 |
@@ -12,7 +12,7 @@ |
|
|
4 |
#endif |
5 |
|
6 |
#if TERMIO |
7 |
-#include <termio.h> |
8 |
+#include <termios.h> |
9 |
#else |
10 |
#include <sgtty.h> |
11 |
#endif |
12 |
@@ -92,21 +92,21 @@ |
13 |
int on; |
14 |
{ |
15 |
#if TERMIO |
16 |
- struct termio s; |
17 |
- static struct termio save_term; |
18 |
+ struct termios s; |
19 |
+ static struct termios save_term; |
20 |
|
21 |
if (on) |
22 |
{ |
23 |
/* |
24 |
* Get terminal modes. |
25 |
*/ |
26 |
- ioctl(2, TCGETA, &s); |
27 |
+ tcgetattr(2, &s); |
28 |
|
29 |
/* |
30 |
* Save modes and set certain variables dependent on modes. |
31 |
*/ |
32 |
save_term = s; |
33 |
- ospeed = s.c_cflag & CBAUD; |
34 |
+ ospeed = cfgetospeed(&s); |
35 |
erase_char = s.c_cc[VERASE]; |
36 |
kill_char = s.c_cc[VKILL]; |
37 |
|
38 |
@@ -114,7 +114,7 @@ |
39 |
* Set the modes to the way we want them. |
40 |
*/ |
41 |
s.c_lflag &= ~(ICANON|ECHO|ECHOE|ECHOK|ECHONL); |
42 |
- s.c_oflag |= (OPOST|ONLCR|TAB3); |
43 |
+ s.c_oflag |= (OPOST|ONLCR|OXTABS); |
44 |
s.c_oflag &= ~(OCRNL|ONOCR|ONLRET); |
45 |
s.c_cc[VMIN] = 1; |
46 |
s.c_cc[VTIME] = 0; |
47 |
@@ -125,7 +125,7 @@ |
48 |
*/ |
49 |
s = save_term; |
50 |
} |
51 |
- ioctl(2, TCSETAW, &s); |
52 |
+ tcsetattr(2, TCSANOW, &s); |
53 |
#else |
54 |
struct sgttyb s; |
55 |
static struct sgttyb save_term; |
56 |
@@ -480,7 +480,7 @@ |
57 |
* Clear the screen. |
4 |
*/ |
58 |
*/ |
5 |
public void |
59 |
public void |
6 |
-clear() |
60 |
-clear() |
7 |
+clearscr() |
61 |
+clearscr() |
8 |
{ |
62 |
{ |
9 |
tputs(sc_clear, sc_height, putchr); |
63 |
tputs(sc_clear, sc_height, putchr); |
|
|
64 |
} |