X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/94b5353c71e7246077d468afe68d51ce85fc213d..b4bb83fd34ab5386afa1b8af8e0956ff7953d0e0:/hack/hack.termcap.c diff --git a/hack/hack.termcap.c b/hack/hack.termcap.c index 939514b7..f1314a0e 100644 --- a/hack/hack.termcap.c +++ b/hack/hack.termcap.c @@ -3,10 +3,12 @@ */ #ifndef lint -static char rcsid[] = "$NetBSD: hack.termcap.c,v 1.3 1995/03/23 08:31:36 cgd Exp $"; +static char rcsid[] = "$NetBSD: hack.termcap.c,v 1.6 1995/04/29 01:20:00 mycroft Exp $"; #endif /* not lint */ #include +#include +#include #include "config.h" /* for ROWNO and COLNO */ #include "def.flag.h" /* for flags.nonull */ extern char *tgetstr(), *tgoto(), *getenv(); @@ -15,7 +17,7 @@ extern long *alloc(); #ifndef lint extern /* it is defined in libtermlib (libtermcap) */ #endif lint - short ospeed; /* terminal baudrate; used by tputs */ + speed_t ospeed; /* terminal baudrate; used by tputs */ static char tbuf[512]; static char *HO, *CL, *CE, *UP, *CM, *ND, *XD, *BC, *SO, *SE, *TI, *TE; static char *VS, *VE; @@ -235,10 +237,6 @@ bell() (void) fflush(stdout); } -static short tmspc10[] = { /* from termcap */ - 0, 2000, 1333, 909, 743, 666, 500, 333, 166, 83, 55, 41, 20, 10, 5 -}; - delay_output() { /* delay 50 ms - could also use a 'nap'-system call */ /* BUG: if the padding character is visible, as it is on the 5620 @@ -250,14 +248,13 @@ delay_output() { /* is this terminfo, or what? */ /* tputs("$<50>", 1, xputc); */ - else if(ospeed > 0 || ospeed < SIZE(tmspc10)) if(CM) { + else if(ospeed > 0) if(CM) { /* delay by sending cm(here) an appropriate number of times */ register int cmlen = strlen(tgoto(CM, curx-1, cury-1)); - register int i = 500 + tmspc10[ospeed]/2; + register int i = (ospeed + (100 * cmlen)) / (200 * cmlen); while(i > 0) { cmov(curx, cury); - i -= cmlen*tmspc10[ospeed]; } } }