home *** CD-ROM | disk | FTP | other *** search
-
-
-
- PPPPUUUUTTTTCCCC((((3333SSSS)))) PPPPUUUUTTTTCCCC((((3333SSSS))))
-
-
-
- NNNNAAAAMMMMEEEE
- putc, putchar, fputc, putw, putc_unlocked, putchar_unlocked - put
- character or word on a stream
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
-
- iiiinnnntttt ppppuuuuttttcccc ((((iiiinnnntttt cccc,,,, FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
-
- iiiinnnntttt ppppuuuuttttcccchhhhaaaarrrr ((((iiiinnnntttt cccc))));;;;
-
- iiiinnnntttt ffffppppuuuuttttcccc ((((iiiinnnntttt cccc,,,, FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
-
- iiiinnnntttt ppppuuuuttttwwww ((((iiiinnnntttt wwww,,,, FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
-
- iiiinnnntttt ppppuuuuttttcccc____uuuunnnnlllloooocccckkkkeeeedddd ((((iiiinnnntttt cccc,,,, FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
-
- iiiinnnntttt ppppuuuuttttcccchhhhaaaarrrr____uuuunnnnlllloooocccckkkkeeeedddd ((((iiiinnnntttt cccc))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _F_p_u_t_c _a_n_d _p_u_t_c write the character _c onto the output stream indicated
- by _s_t_r_e_a_m at the position indicated by the associated file pointer (if
- defined), advancing this pointer to the next character position. For
- files which cannot be positioned, or which have been opened in append
- mode (see _f_o_p_e_n(3s)), the character is appended to the output stream.
- _p_u_t_c_h_a_r(_c) is defined as _p_u_t_c(_c, _s_t_d_o_u_t). Each of these functions is
- available in the C library. In addition, _p_u_t_c and _p_u_t_c_h_a_r are macros
- defined in <_s_t_d_i_o._h>. (see below under CAVEATS for important details on
- the implementation of these macros.)
-
- The function versions of _p_u_t_c and _p_u_t_c_h_a_r, as well as _f_p_u_t_c runs more
- slowly than the corresponding macros, but they take less space per
- invocation and the function name can be passed as an argument to another
- function.
-
- _p_u_t_w writes the word (i.e. integer) _w to the output _s_t_r_e_a_m (at the
- position at which the file pointer, if defined, is pointing). The size
- of a word is the size of an integer and varies from machine to machine.
- _p_u_t_w neither assumes nor causes special alignment in the file.
-
- The _p_u_t_c__u_n_l_o_c_k_e_d and _p_u_t_c_h_a_r__u_n_l_o_c_k_e_d functions are equivalent to the
- _p_u_t_c and _p_u_t_c_h_a_r functions, respectively. However, these functions are
- not thread-safe and thus must only be called under the protection of the
- _f_l_o_c_k_f_i_l_e (or _f_t_r_y_l_o_c_k_f_i_l_e) and _f_u_n_l_o_c_k_f_i_l_e functions.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fclose(3S), ferror(3S), fopen(3S), fread(3S), printf(3S), puts(3S),
- setbuf(3S), stdio(3S).
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- PPPPUUUUTTTTCCCC((((3333SSSS)))) PPPPUUUUTTTTCCCC((((3333SSSS))))
-
-
-
- DIAGNOSTICS
- On success, _p_u_t_c, _p_u_t_c_h_a_r, and _f_p_u_t_c each return the value they have
- written. On failure, they return the constant EEEEOOOOFFFF. This will occur if
- the _s_t_r_e_a_m cannot be written for some reason, such as it is not open for
- writing or if the output file cannot be extended.
-
- _P_u_t_w returns the value of _f_e_r_r_o_r(_s_t_r_e_a_m), which is non-zero if an error
- occurred on _s_t_r_e_a_m.
-
- CCCCAAAAVVVVEEEEAAAATTTTSSSS
- When using the macro versions of _p_u_t_c and _p_u_t_c_h_a_r, the _s_t_r_e_a_m argument
- may be evaluated more than once. Thus, it must not be an expression with
- side-effects. In particular, ppppuuuuttttcccc((((cccc,,,,****ffff++++++++)))) does not work sensibly. In
- these situations, the macro must either be ####uuuunnnnddddeeeeffff'd, or _f_p_u_t_c should be
- used instead.
-
- Because of possible differences in word length and byte ordering, files
- written using _p_u_t_w are machine-dependent, and may not be read using _g_e_t_w
- on a different processor.
-
- BBBBUUUUGGGGSSSS
- When using the macros for _p_u_t_c and _p_u_t_c_h_a_r, hidden external names may be
- referenced. Although these names are prefixed with an underscore, they
- may conflict with names which the ANSI C Standard reserves for the user
- when appearing in a local context. It is thus recommended that users of
- these macros reserve all names which begin with an underscore for the
- implementation, and avoid defining such names, even in a local context.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-