See note above. xputc() is a special function for overlays. */
| 614 | |
| 615 | /* See note above. xputc() is a special function for overlays. */ |
| 616 | int |
| 617 | xputc(int c) /* actually char, but explicitly specify its widened type */ |
| 618 | { |
| 619 | /* |
| 620 | * Note: xputc() as a direct all to putchar() doesn't make any |
| 621 | * sense _if_ putchar() is a function. But if it is a macro, an |
| 622 | * overlay configuration would want to avoid hidden code bloat |
| 623 | * from multiple putchar() expansions. And it gets passed as an |
| 624 | * argument to tputs() so we have to guarantee an actual function |
| 625 | * (while possibly lacking ANSI's (func) syntax to override macro). |
| 626 | * |
| 627 | * xputc() used to be declared as 'void xputc(c) char c; {}' but |
| 628 | * avoiding the proper type 'int' just to avoid (void) casts when |
| 629 | * ignoring the result can't have been sufficient reason to add it. |
| 630 | * It also had '#if apollo' conditional to have the arg be int. |
| 631 | * Matching putchar()'s declaration and using explicit casts where |
| 632 | * warranted is more robust, so we're just a jacket around that. |
| 633 | */ |
| 634 | return putchar(c); |
| 635 | } |
| 636 | |
| 637 | void |
| 638 | xputs(const char *s) |