summaryrefslogtreecommitdiff
path: root/games/bsdgames/files/patch-snake_snake_snake.h
blob: a89166ac21f361962f52cc30ad8a7a73e362b9d8 (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
Index: snake/snake/snake.h
@@ -38,10 +38,13 @@
 # include <stdio.h>
 # include <assert.h>
 # include <sys/types.h>
-# include <sgtty.h>
+# include <termios.h>
 # include <signal.h>
 # include <math.h>
 
+#define gtty(_a,_b) tcgetattr(_a,_b)
+#define stty(_a,_b) tcsetattr(_a,TCSANOW,_b)
+
 #define ESC	'\033'
 
 struct tbuffer {
@@ -72,7 +75,7 @@
 	int col, line;
 };
 struct point cursor;
-struct sgttyb orig, new;
+struct termios orig, new;
 #ifdef TIOCLGET
 struct ltchars olttyc, nlttyc;
 #endif