*/
#ifndef lint
-static char rcsid[] = "$NetBSD: hack.termcap.c,v 1.4 1995/04/24 12:23:34 cgd Exp $";
+static char rcsid[] = "$NetBSD: hack.termcap.c,v 1.5 1995/04/29 01:08:51 mycroft Exp $";
#endif /* not lint */
#include <stdio.h>
#include <string.h>
+#include <termios.h>
#include "config.h" /* for ROWNO and COLNO */
#include "def.flag.h" /* for flags.nonull */
extern char *tgetstr(), *tgoto(), *getenv();
#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;
(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
/* 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 + (10 * cmlen)) / (20 * cmlen);
while(i > 0) {
cmov(curx, cury);
- i -= cmlen*tmspc10[ospeed];
}
}
}
#if 0
static char sccsid[] = "@(#)hack.tty.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: hack.tty.c,v 1.4 1995/04/28 23:01:47 mycroft Exp $";
+static char rcsid[] = "$NetBSD: hack.tty.c,v 1.5 1995/04/29 01:08:54 mycroft Exp $";
#endif
#endif /* not lint */
#define NR_OF_EOFS 20
#endif BSD
-extern short ospeed;
+extern speed_t ospeed;
static char erase_char, kill_char;
static boolean settty_needed = FALSE;
struct termios inittyb, curttyb;