1 /* Copyright (c) 1985 Ceriel J.H. Jacobs */
4 * Handle output to screen
8 static char rcsid
[] = "$Header$";
17 # define OBUFSIZ 64*128
19 static char _outbuf
[OBUFSIZ
];
22 flush() { /* Flush output buffer, by writing it */
23 register char *p
= _outbuf
;
26 if (_optr
) (VOID
) write(1, p
, _optr
- p
);
31 nflush() { /* Flush output buffer, ignoring it */
38 fputch(ch
) char ch
; { /* print a character */
43 putline(s
) register char *s
; { /* Print string s */
52 * A safe version of putline. All control characters are echoed as ^X
56 cputline(s
) char *s
; {
60 if ((unsigned) c
> 0177) c
&= 0177;
61 if (c
< ' ' || c
== 0177) {
70 * Simple minded routine to print a number
85 p
= fillnum(n
/ 10, p
);
87 *p
++ = (int) (n
% 10) + '0';