From b5dc64f7790c2f60a0ed2f01234a14af24a8ab81 Mon Sep 17 00:00:00 2001 From: jtc Date: Tue, 24 May 1994 23:54:16 +0000 Subject: Converted from sgtty to termios api, no longer needs libcompat. --- trek/main.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'trek/main.c') 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 -# include # include +# include # 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]) -- cgit v1.2.3