freebsd-ports/games/bsdgames/files/patch-snake_snake_snake.h
Juergen Lock 805f53212b Convert freebsd-games to use termios.h instead of sgtty.h
PR:		ports/110731
Submitted by:	Alex Kozlov <spam@rm-rf.kiev.ua>
Approved by:	miwi (mentor)
2007-03-23 23:02:33 +00:00

25 lines
500 B
C

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