*** empty log message ***
[bpt/emacs.git] / src / termcap.c
index c9bf1a4..b87fee4 100644 (file)
@@ -1,5 +1,6 @@
 /* Work-alike for termcap, plus extra features.
-   Copyright (C) 1985, 86, 93, 94, 95, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1985, 86, 93, 94, 95, 2000, 2001
+   Free Software Foundation, Inc.
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -288,10 +289,14 @@ tgetst1 (ptr, area)
 \f
 /* 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;
 
+#ifndef emacs
 /* Actual baud rate if positive;
    - baud rate / 100 if negative.  */
 
@@ -306,6 +311,8 @@ static int speeds[] =
 #endif /* not VMS */
   };
 
+#endif /* not emacs */
+
 void
 tputs (str, nlines, outfun)
      register char *str;
@@ -315,12 +322,19 @@ tputs (str, nlines, outfun)
   register int padcount = 0;
   register int speed;
 
-  extern int baud_rate;
+#ifdef emacs
+  extern EMACS_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;