# HG changeset patch # User Richard M. Stallman # Date 1015186280 0 # Node ID 53deca397c95d512f55cdfb4aba816bb0e6d69c5 # Parent 37eeb8f1f6f297c64e279e4a711304771fdd6024 [!emacs]: Replace ospeed for building standalone libtermcap, for binary compatibility. diff -r 37eeb8f1f6f2 -r 53deca397c95 src/termcap.c --- a/src/termcap.c Sun Mar 03 20:09:47 2002 +0000 +++ b/src/termcap.c Sun Mar 03 20:11:20 2002 +0000 @@ -289,12 +289,14 @@ /* 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 @@ #endif /* not VMS */ }; -#endif /* 0 */ +#endif /* not emacs */ void tputs (str, nlines, outfun) @@ -320,12 +322,19 @@ 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;