summaryrefslogtreecommitdiff
path: root/games/bsdgames/files/patch-backgammon_backgammon_main.c
blob: 840d4ba48057ecfe80cdbce8d99f818513461e24 (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
Index: backgammon/backgammon/main.c
@@ -113,13 +111,13 @@
 	signal (SIGINT,getout);				/* trap interrupts */
 	if (gtty (0,&tty) == -1)			/* get old tty mode */
 		errexit ("backgammon(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 */
 
 							/* get terminal
 							 * capabilities, and
@@ -135,8 +133,8 @@
 	getarg (argc, argv);
 	args[acnt] = NULL;
 	if (tflag)  {					/* clear screen */
-		noech &= ~(CRMOD|XTABS);
-		raw &= ~(CRMOD|XTABS);
+		noech &= ~(ICRNL|OXTABS);
+		raw &= ~(ICRNL|OXTABS);
 		clear();
 	}
 	fixtty (raw);					/* go into raw mode */