diff options
| author | Richard M. Stallman | 2002-03-03 20:11:20 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-03-03 20:11:20 +0000 |
| commit | d8eb23bd4017f3b35844ed814c8e4788f9f31b24 (patch) | |
| tree | c8f8b87276598b2de13a7fbf745de825dd71efd5 /src | |
| parent | aa7e46604a9d49dea9d11baed9cabab61751b737 (diff) | |
| download | emacs-d8eb23bd4017f3b35844ed814c8e4788f9f31b24.tar.gz emacs-d8eb23bd4017f3b35844ed814c8e4788f9f31b24.zip | |
[!emacs]: Replace ospeed for building standalone
libtermcap, for binary compatibility.
Diffstat (limited to 'src')
| -rw-r--r-- | src/termcap.c | 15 |
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) | |||
| 289 | 289 | ||
| 290 | /* Outputting a string with padding. */ | 290 | /* Outputting a string with padding. */ |
| 291 | 291 | ||
| 292 | #ifndef emacs | ||
| 293 | short ospeed; | ||
| 292 | /* If OSPEED is 0, we use this as the actual baud rate. */ | 294 | /* If OSPEED is 0, we use this as the actual baud rate. */ |
| 293 | int tputs_baud_rate; | 295 | int tputs_baud_rate; |
| 296 | #endif | ||
| 294 | char PC; | 297 | char PC; |
| 295 | 298 | ||
| 296 | #if 0 /* Doesn't seem to be used anymore. */ | 299 | #ifndef emacs |
| 297 | |||
| 298 | /* Actual baud rate if positive; | 300 | /* Actual baud rate if positive; |
| 299 | - baud rate / 100 if negative. */ | 301 | - baud rate / 100 if negative. */ |
| 300 | 302 | ||
| @@ -309,7 +311,7 @@ static int speeds[] = | |||
| 309 | #endif /* not VMS */ | 311 | #endif /* not VMS */ |
| 310 | }; | 312 | }; |
| 311 | 313 | ||
| 312 | #endif /* 0 */ | 314 | #endif /* not emacs */ |
| 313 | 315 | ||
| 314 | void | 316 | void |
| 315 | tputs (str, nlines, outfun) | 317 | tputs (str, nlines, outfun) |
| @@ -320,12 +322,19 @@ tputs (str, nlines, outfun) | |||
| 320 | register int padcount = 0; | 322 | register int padcount = 0; |
| 321 | register int speed; | 323 | register int speed; |
| 322 | 324 | ||
| 325 | #ifdef emacs | ||
| 323 | extern int baud_rate; | 326 | extern int baud_rate; |
| 324 | speed = baud_rate; | 327 | speed = baud_rate; |
| 325 | /* For quite high speeds, convert to the smaller | 328 | /* For quite high speeds, convert to the smaller |
| 326 | units to avoid overflow. */ | 329 | units to avoid overflow. */ |
| 327 | if (speed > 10000) | 330 | if (speed > 10000) |
| 328 | speed = - speed / 100; | 331 | speed = - speed / 100; |
| 332 | #else | ||
| 333 | if (ospeed == 0) | ||
| 334 | speed = tputs_baud_rate; | ||
| 335 | else | ||
| 336 | speed = speeds[ospeed]; | ||
| 337 | #endif | ||
| 329 | 338 | ||
| 330 | if (!str) | 339 | if (!str) |
| 331 | return; | 340 | return; |