summaryrefslogtreecommitdiff
path: root/src/termcap.c
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2002-03-03 20:11:20 +0000
committerRichard M. Stallman <rms@gnu.org>2002-03-03 20:11:20 +0000
commitd8eb23bd4017f3b35844ed814c8e4788f9f31b24 (patch)
treec8f8b87276598b2de13a7fbf745de825dd71efd5 /src/termcap.c
parentaa7e46604a9d49dea9d11baed9cabab61751b737 (diff)
downloademacs-d8eb23bd4017f3b35844ed814c8e4788f9f31b24.tar.gz
[!emacs]: Replace ospeed for building standalone
libtermcap, for binary compatibility.
Diffstat (limited to 'src/termcap.c')
-rw-r--r--src/termcap.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/termcap.c b/src/termcap.c
index b99ae473315..b8cf67cc2fe 100644
--- a/src/termcap.c
+++ b/src/termcap.c
@@ -289,12 +289,14 @@ tgetst1 (ptr, area)
/* Outputting a string with padding. */
+#ifndef emacs
+short ospeed;
/* If OSPEED is 0, we use this as the actual baud rate. */
int tputs_baud_rate;
+#endif
char PC;
-#if 0 /* Doesn't seem to be used anymore. */
-
+#ifndef emacs
/* Actual baud rate if positive;
- baud rate / 100 if negative. */
@@ -309,7 +311,7 @@ static int speeds[] =
#endif /* not VMS */
};
-#endif /* 0 */
+#endif /* not emacs */
void
tputs (str, nlines, outfun)
@@ -320,12 +322,19 @@ tputs (str, nlines, outfun)
register int padcount = 0;
register int speed;
+#ifdef emacs
extern int baud_rate;
speed = baud_rate;
/* For quite high speeds, convert to the smaller
units to avoid overflow. */
if (speed > 10000)
speed = - speed / 100;
+#else
+ if (ospeed == 0)
+ speed = tputs_baud_rate;
+ else
+ speed = speeds[ospeed];
+#endif
if (!str)
return;