aboutsummaryrefslogtreecommitdiff
path: root/games/bsdgames/files/patch-backgammon_teachgammon_teach.c
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2007-03-23 23:02:33 +0000
committerJuergen Lock <nox@FreeBSD.org>2007-03-23 23:02:33 +0000
commit805f53212b166733a8af59ed5501fc22efded809 (patch)
tree0d74e8d7b34041f204caf0250ffdee789f79e988 /games/bsdgames/files/patch-backgammon_teachgammon_teach.c
parentbb3f53a51d553edf02fd17ff982dd59ae7f37422 (diff)
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)
Notes
Notes: svn path=/head/; revision=188142
Diffstat (limited to 'games/bsdgames/files/patch-backgammon_teachgammon_teach.c')
-rw-r--r--games/bsdgames/files/patch-backgammon_teachgammon_teach.c36
1 files changed, 25 insertions, 11 deletions
diff --git a/games/bsdgames/files/patch-backgammon_teachgammon_teach.c b/games/bsdgames/files/patch-backgammon_teachgammon_teach.c
index cc5ee8c2ff46..8b1ae587e9e8 100644
--- a/games/bsdgames/files/patch-backgammon_teachgammon_teach.c
+++ b/games/bsdgames/files/patch-backgammon_teachgammon_teach.c
@@ -1,11 +1,25 @@
---- backgammon/teachgammon/teach.c.orig Sat Feb 2 20:37:20 2002
-+++ backgammon/teachgammon/teach.c Sun Apr 16 21:22:11 2006
-@@ -52,6 +52,8 @@
- #include <signal.h>
- #include "back.h"
-
-+#define gtty(_a,_b) ioctl(_a,TIOCGETP,_b)
-+
- extern char *hello[];
- extern char *list[];
- extern char *intro1[];
+Index: backgammon/teachgammon/teach.c
+@@ -94,18 +92,18 @@
+ signal (SIGINT,getout);
+ if (gtty (0,&tty) == -1) /* get old tty mode */
+ errexit ("teachgammon(gtty)");
+- old = tty.sg_flags;
++ old = tty.c_lflag;
+ #ifdef V7
+- raw = ((noech = old & ~ECHO) | CBREAK); /* set up modes */
++ raw = ((noech = old & ~ECHO) & ~ICANON); /* set up modes */
+ #else
+ raw = ((noech = old & ~ECHO) | RAW); /* set up modes */
+ #endif
+- ospeed = tty.sg_ospeed; /* for termlib */
++ ospeed = cfgetospeed(&tty); /* for termlib */
+ tflag = getcaps (getenv ("TERM"));
+ getarg (argc, argv);
+ if (tflag) {
+- noech &= ~(CRMOD|XTABS);
+- raw &= ~(CRMOD|XTABS);
++ noech &= ~(ICRNL|OXTABS);
++ raw &= ~(ICRNL|OXTABS);
+ clear();
+ }
+ text (hello);