File:  [Research Unix] / researchv10dc / dist / man / v4 / man3 / putchr.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.th PUTCHAR III 5/10/73
.sh NAME
putchar \*- write character
.sh SYNOPSIS
.ft B
putchar(ch)
.s3
flush( )
.ft R
.sh DESCRIPTION
.it Putchar
writes out its argument and returns it unchanged.
The low-order byte of the
argument is always written;
the high-order byte is written only if it is
non-null.
Unless other arrangements have been made,
.it putchar
writes in
unbuffered fashion on the standard output file.
.s3
Associated with this routine is an external variable
.it fout
which has the
structure of a buffer discussed under putc (III).
If the file descriptor part of this structure (first word)
is not 1, output via
.it putchar
is buffered.
To achieve buffered output one may say, for example,
.s3
.nf
	fout = dup(1);		or
	fout = fcreat(...);
.s3
.fi
In such a case
.it flush
must be called
before the program terminates in order to flush out
the buffered output.
.it Flush
may be called at any time.
.sh "SEE ALSO"
putc(III)
.sh BUGS
The
.it fout
notion is kludgy.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.