289 |
|
|
290 |
/* Outputting a string with padding. */ |
/* Outputting a string with padding. */ |
291 |
|
|
292 |
|
#ifndef emacs |
293 |
|
short ospeed; |
294 |
/* If OSPEED is 0, we use this as the actual baud rate. */ |
/* If OSPEED is 0, we use this as the actual baud rate. */ |
295 |
int tputs_baud_rate; |
int tputs_baud_rate; |
296 |
|
#endif |
297 |
char PC; |
char PC; |
298 |
|
|
299 |
#if 0 /* Doesn't seem to be used anymore. */ |
#ifndef emacs |
|
|
|
300 |
/* Actual baud rate if positive; |
/* Actual baud rate if positive; |
301 |
- baud rate / 100 if negative. */ |
- baud rate / 100 if negative. */ |
302 |
|
|
311 |
#endif /* not VMS */ |
#endif /* not VMS */ |
312 |
}; |
}; |
313 |
|
|
314 |
#endif /* 0 */ |
#endif /* not emacs */ |
315 |
|
|
316 |
void |
void |
317 |
tputs (str, nlines, outfun) |
tputs (str, nlines, outfun) |
322 |
register int padcount = 0; |
register int padcount = 0; |
323 |
register int speed; |
register int speed; |
324 |
|
|
325 |
|
#ifdef emacs |
326 |
extern int baud_rate; |
extern int baud_rate; |
327 |
speed = baud_rate; |
speed = baud_rate; |
328 |
/* For quite high speeds, convert to the smaller |
/* For quite high speeds, convert to the smaller |
329 |
units to avoid overflow. */ |
units to avoid overflow. */ |
330 |
if (speed > 10000) |
if (speed > 10000) |
331 |
speed = - speed / 100; |
speed = - speed / 100; |
332 |
|
#else |
333 |
|
if (ospeed == 0) |
334 |
|
speed = tputs_baud_rate; |
335 |
|
else |
336 |
|
speed = speeds[ospeed]; |
337 |
|
#endif |
338 |
|
|
339 |
if (!str) |
if (!str) |
340 |
return; |
return; |