diff options
-rw-r--r-- | trek/Makefile | 6 | ||||
-rw-r--r-- | trek/main.c | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/trek/Makefile b/trek/Makefile index 58596f9d..c4dc9e6c 100644 --- a/trek/Makefile +++ b/trek/Makefile @@ -1,5 +1,5 @@ # from: @(#)Makefile 5.8 (Berkeley) 5/11/90 -# $Id: Makefile,v 1.4 1994/05/23 05:37:24 cgd Exp $ +# $Id: Makefile,v 1.5 1994/05/24 23:54:16 jtc Exp $ PROG= trek SRCS= abandon.c attack.c autover.c capture.c check_out.c checkcond.c \ @@ -11,8 +11,8 @@ SRCS= abandon.c attack.c autover.c capture.c check_out.c checkcond.c \ shield.c snova.c srscan.c systemname.c torped.c utility.c \ visual.c warp.c win.c cgetc.c MAN6= trek.0 -DPADD= ${LIBM} ${LIBCOMPAT} -LDADD= -lm -lcompat +DPADD= ${LIBM} +LDADD= -lm HIDEGAME=hidegame .include <bsd.prog.mk> 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]) |