summaryrefslogtreecommitdiffstats
path: root/trek/main.c
diff options
context:
space:
mode:
authorjtc <jtc@NetBSD.org>1994-05-24 23:54:16 +0000
committerjtc <jtc@NetBSD.org>1994-05-24 23:54:16 +0000
commitb5dc64f7790c2f60a0ed2f01234a14af24a8ab81 (patch)
treefad14fdc66eef9fe0072fde9f2985848a231e4bd /trek/main.c
parent9767d7d03c4e280b63b5bdf987c18d26bd75b3f9 (diff)
downloadbsdgames-darwin-b5dc64f7790c2f60a0ed2f01234a14af24a8ab81.tar.gz
bsdgames-darwin-b5dc64f7790c2f60a0ed2f01234a14af24a8ab81.tar.zst
bsdgames-darwin-b5dc64f7790c2f60a0ed2f01234a14af24a8ab81.zip
Converted from sgtty to termios api, no longer needs libcompat.
Diffstat (limited to 'trek/main.c')
-rw-r--r--trek/main.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/trek/main.c b/trek/main.c
index cb3029de..ff7c38e8 100644
--- a/trek/main.c
+++ b/trek/main.c
@@ -39,13 +39,13 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)main.c 5.7 (Berkeley) 2/28/91";*/
-static char rcsid[] = "$Id: main.c,v 1.2 1993/08/01 18:50:18 mycroft Exp $";
+static char rcsid[] = "$Id: main.c,v 1.3 1994/05/24 23:54:17 jtc Exp $";
#endif /* not lint */
# include "trek.h"
# include <stdio.h>
-# include <sgtty.h>
# include <setjmp.h>
+# include <termios.h>
# define PRIO 00 /* default priority */
@@ -160,7 +160,7 @@ char **argv;
int prio;
register int ac;
register char **av;
- struct sgttyb argp;
+ struct termios argp;
av = argv;
ac = argc;
@@ -169,11 +169,13 @@ char **argv;
srand(vect);
opencode = 'w';
prio = PRIO;
- if (gtty(1, &argp) == 0)
+
+ if (tcgetattr(1, &argp) == 0)
{
- if ((argp.sg_ispeed ) < B1200)
+ if (cfgetispeed(&argp) < B1200)
Etc.fast++;
}
+
while (ac > 1 && av[0][0] == '-')
{
switch (av[0][1])