summaryrefslogtreecommitdiff
path: root/lib/libterm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libterm')
-rw-r--r--lib/libterm/Makefile4
-rw-r--r--lib/libterm/tputs.c14
2 files changed, 12 insertions, 6 deletions
diff --git a/lib/libterm/Makefile b/lib/libterm/Makefile
index c0ee1c1c90d7..a1cec58935c4 100644
--- a/lib/libterm/Makefile
+++ b/lib/libterm/Makefile
@@ -1,5 +1,5 @@
# from: @(#)Makefile 5.10 (Berkeley) 6/1/90
-# $Id: Makefile,v 1.6 1994/02/05 13:19:00 rgrimes Exp $
+# $Id: Makefile,v 1.7 1994/06/23 22:22:54 jkh Exp $
LIB= termcap
CFLAGS+=-DCM_N -DCM_GT -DCM_B -DCM_D
@@ -8,7 +8,7 @@ SRCS= termcap.c tgoto.c tputs.c
MAN3= termcap.3
MLINKS= termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \
termcap.3 tgetstr.3 termcap.3 tgoto.3 termcap.3 tputs.3
-LINKS= ${LIBDIR}/libtermcap.a ${LIBDIR}/libtermlib.a \
+LINKS= ${LIBDIR}/libtermcap.a ${LIBDIR}/libtermlib.a
.if !defined(NOPROFILE)
LINKS+= ${LIBDIR}/libtermcap_p.a ${LIBDIR}/libtermlib_p.a
diff --git a/lib/libterm/tputs.c b/lib/libterm/tputs.c
index 89da56483331..58309ed4b181 100644
--- a/lib/libterm/tputs.c
+++ b/lib/libterm/tputs.c
@@ -44,8 +44,9 @@ static char sccsid[] = "@(#)tputs.c 5.3 (Berkeley) 6/1/90";
* baud returns a 7, there are 33.3 milliseconds per char at 300 baud.
*/
static
-short tmspc10[] = {
- 0, 2000, 1333, 909, 743, 666, 500, 333, 166, 83, 55, 41, 20, 10, 5
+short tmspc10[] = {
+ 0, 2000, 1333, 909, 743, 666, 500, 333, 166, 83, 55, 41, 20, 10, 5,
+ 3, 2, 1
};
short ospeed;
@@ -63,6 +64,7 @@ tputs(cp, affcnt, outc)
{
register int i = 0;
register int mspc10;
+ int speed;
if (cp == 0)
return;
@@ -106,8 +108,12 @@ tputs(cp, affcnt, outc)
*/
if (i == 0)
return;
- if (ospeed <= 0 || ospeed >= (sizeof tmspc10 / sizeof tmspc10[0]))
+ if (ospeed <= 0)
return;
+ if (ospeed >= (sizeof tmspc10 / sizeof tmspc10[0]))
+ speed = (sizeof tmspc10 / sizeof tmspc10[0]) - 1;
+ else
+ speed = ospeed;
/*
* Round up by a half a character frame,
@@ -116,7 +122,7 @@ tputs(cp, affcnt, outc)
* Transmitting pad characters slows many
* terminals down and also loads the system.
*/
- mspc10 = tmspc10[ospeed];
+ mspc10 = tmspc10[speed];
i += mspc10 / 2;
for (i /= mspc10; i > 0; i--)
(*outc)(PC);