Research V4 release
[unix-history] / man / man3 / putchr.3
CommitLineData
de57e81e
KT
1.th PUTCHAR III 5/10/73
2.sh NAME
3putchar \*- write character
4.sh SYNOPSIS
5.ft B
6putchar(ch)
7.s3
8flush( )
9.ft R
10.sh DESCRIPTION
11.it Putchar
12writes out its argument and returns it unchanged.
13The low-order byte of the
14argument is always written;
15the high-order byte is written only if it is
16non-null.
17Unless other arrangements have been made,
18.it putchar
19writes in
20unbuffered fashion on the standard output file.
21.s3
22Associated with this routine is an external variable
23.it fout
24which has the
25structure of a buffer discussed under putc (III).
26If the file descriptor part of this structure (first word)
27is not 1, output via
28.it putchar
29is buffered.
30To achieve buffered output one may say, for example,
31.s3
32.nf
33 fout = dup(1); or
34 fout = fcreat(...);
35.s3
36.fi
37In such a case
38.it flush
39must be called
40before the program terminates in order to flush out
41the buffered output.
42.it Flush
43may be called at any time.
44.sh "SEE ALSO"
45putc(III)
46.sh BUGS
47The
48.it fout
49notion is kludgy.