diff options
author | mycroft <mycroft@NetBSD.org> | 1995-04-29 00:44:03 +0000 |
---|---|---|
committer | mycroft <mycroft@NetBSD.org> | 1995-04-29 00:44:03 +0000 |
commit | 42430ba7d7a05f98105888cb19f79d9bd7cd22ad (patch) | |
tree | aa3516e56353d97671cf6c67335ebf60a1ca8b61 /backgammon/common_source/subs.c | |
parent | 567e3567cfbbfd9940e7ac02313f241710d726c7 (diff) | |
download | bsdgames-darwin-42430ba7d7a05f98105888cb19f79d9bd7cd22ad.tar.gz bsdgames-darwin-42430ba7d7a05f98105888cb19f79d9bd7cd22ad.tar.zst bsdgames-darwin-42430ba7d7a05f98105888cb19f79d9bd7cd22ad.zip |
Use POSIX tty semantics.
Diffstat (limited to 'backgammon/common_source/subs.c')
-rw-r--r-- | backgammon/common_source/subs.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/backgammon/common_source/subs.c b/backgammon/common_source/subs.c index f6ca2b58..9fb185fe 100644 --- a/backgammon/common_source/subs.c +++ b/backgammon/common_source/subs.c @@ -1,4 +1,4 @@ -/* $NetBSD: subs.c,v 1.4 1995/04/24 12:22:12 cgd Exp $ */ +/* $NetBSD: subs.c,v 1.5 1995/04/29 00:44:15 mycroft Exp $ */ /* * Copyright (c) 1980, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)subs.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: subs.c,v 1.4 1995/04/24 12:22:12 cgd Exp $"; +static char rcsid[] = "$NetBSD: subs.c,v 1.5 1995/04/29 00:44:15 mycroft Exp $"; #endif #endif /* not lint */ @@ -413,14 +413,13 @@ wrscore () { wrint (wscore); } -fixtty (mode) -int mode; +fixtty (t) +struct termios *t; { if (tflag) newpos(); buflush(); - tty.sg_flags = mode; - if (stty (0,&tty) < 0) + if (tcsetattr (0, TCSADRAIN, t) < 0) errexit("fixtty"); } @@ -433,7 +432,7 @@ getout () { writec ('\n'); /* fix terminal status */ - fixtty (old); + fixtty (&old); exit(0); } roll () { |