BSD 4_4 development
[unix-history] / usr / share / man / cat3 / putw.0
PUTC(3) BSD Programmer's Manual PUTC(3)
N\bNA\bAM\bME\bE
f\bfp\bpu\but\btc\bc, p\bpu\but\btc\bc, p\bpu\but\btc\bch\bha\bar\br, p\bpu\but\btw\bw - output a character or word to a stream
S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS
#\b#i\bin\bnc\bcl\blu\bud\bde\be <\b<s\bst\btd\bdi\bio\bo.\b.h\bh>\b>
_\bi_\bn_\bt
f\bfp\bpu\but\btc\bc(_\bi_\bn_\bt _\bc, _\bF_\bI_\bL_\bE _\b*_\bs_\bt_\br_\be_\ba_\bm);
_\bi_\bn_\bt
p\bpu\but\btc\bc(_\bi_\bn_\bt _\bc, _\bF_\bI_\bL_\bE _\b*_\bs_\bt_\br_\be_\ba_\bm);
_\bi_\bn_\bt
p\bpu\but\btc\bch\bha\bar\br(_\bi_\bn_\bt _\bc);
_\bi_\bn_\bt
p\bpu\but\btw\bw(_\bi_\bn_\bt _\bw, _\bF_\bI_\bL_\bE _\b*_\bs_\bt_\br_\be_\ba_\bm);
D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
The f\bfp\bpu\but\btc\bc() function writes the character _\bc (converted to an ``unsigned
char'') to the output stream pointed to by _\bs_\bt_\br_\be_\ba_\bm.
P\bPu\but\btc\bc() acts essentially identically to f\bfp\bpu\but\btc\bc(), but is a macro that ex-
pands in-line. It may evaluate _\bs_\bt_\br_\be_\ba_\bm more than once, so arguments given
to p\bpu\but\btc\bc() should not be expressions with potential side effects.
P\bPu\but\btc\bch\bha\bar\br() is identical to p\bpu\but\btc\bc() with an output stream of _\bs_\bt_\bd_\bo_\bu_\bt.
The p\bpu\but\btw\bw() function writes the specified _\bi_\bn_\bt to the named output _\bs_\bt_\br_\be_\ba_\bm.
R\bRE\bET\bTU\bUR\bRN\bN V\bVA\bAL\bLU\bUE\bES\bS
The functions, f\bfp\bpu\but\btc\bc(), p\bpu\but\btc\bc() and p\bpu\but\btc\bch\bha\bar\br() return the character writ-
ten. If an error occurs, the value EOF is returned. The p\bpu\but\btw\bw() function
returns 0 on success; EOF is returned if a write error occurs, or if an
attempt is made to write a read-only stream.
S\bSE\bEE\bE A\bAL\bLS\bSO\bO
ferror(3), fopen(3), getc(3), stdio(3)
S\bST\bTA\bAN\bND\bDA\bAR\bRD\bDS\bS
The functions f\bfp\bpu\but\btc\bc(), p\bpu\but\btc\bc(), and p\bpu\but\btc\bch\bha\bar\br(), conform to ANSI C
X3.159-1989 (``ANSI C ''). A function p\bpu\but\btw\bw() function appeared in Version
6 AT&T UNIX.
B\bBU\bUG\bGS\bS
The size and byte order of an _\bi_\bn_\bt varies from one machine to another, and
p\bpu\but\btw\bw() is not recommended for portable applications.
4.4BSD June 4, 1993 1