home *** CD-ROM | disk | FTP | other *** search
-
-
-
- GGGGEEEETTTTCCCC((((3333SSSS)))) GGGGEEEETTTTCCCC((((3333SSSS))))
-
-
-
- NNNNAAAAMMMMEEEE
- getc, getchar, fgetc, getw, getc_unlocked, getchar_unlocked - get
- character or word from a stream
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
-
- iiiinnnntttt ggggeeeettttcccc ((((FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
-
- iiiinnnntttt ggggeeeettttcccchhhhaaaarrrr ((((vvvvooooiiiidddd))));;;;
-
- iiiinnnntttt ffffggggeeeettttcccc ((((FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
-
- iiiinnnntttt ggggeeeettttwwww ((((FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
-
- iiiinnnntttt ggggeeeettttcccc____uuuunnnnlllloooocccckkkkeeeedddd ((((FFFFIIIILLLLEEEE ****ssssttttrrrreeeeaaaammmm))));;;;
-
- iiiinnnntttt ggggeeeettttcccchhhhaaaarrrr____uuuunnnnlllloooocccckkkkeeeedddd ((((vvvvooooiiiidddd))));;;;
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- _F_g_e_t_c and _g_e_t_c return the next character (if it exists) from the named
- input _s_t_r_e_a_m, as an unsigned character converted to an integer. It also
- moves the file pointer, if defined, ahead one character in _s_t_r_e_a_m.
- _g_e_t_c_h_a_r is defined as _g_e_t_c(_s_t_d_i_n). Each of _g_e_t_c,_g_e_t_c_h_a_r and _f_g_e_t_c exist
- as functions in the C library. _G_e_t_c and _g_e_t_c_h_a_r are also available as
- macros in <_s_t_d_i_o._h> (see below under CAVEATS for important details on the
- implementation of these macros.)
-
- _G_e_t_w returns the next word (i.e., integer) from the named input _s_t_r_e_a_m.
- _G_e_t_w increments the associated file pointer, if defined, to point to the
- next integer-sized word. _G_e_t_w assumes no special alignment in the file.
-
- The _g_e_t_c__u_n_l_o_c_k_e_d and _g_e_t_c_h_a_r__u_n_l_o_c_k_e_d functions are equivalent to the
- _g_e_t_c and _g_e_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), gets(3S), putc(3S),
- scanf(3S), stdio(3S), ungetc(3S).
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- These functions return the constant EEEEOOOOFFFF at end-of-file or upon an error.
- Because EEEEOOOOFFFF is a valid integer, it is not sufficient to detect _g_e_t_w
- errors. _f_e_r_r_o_r(3S) must be used as well.
-
- WWWWAAAARRRRNNNNIIIINNNNGGGG
- If the integer value returned by _g_e_t_c, _g_e_t_c_h_a_r, or _f_g_e_t_c is stored into a
- character variable and then compared against the integer constant EEEEOOOOFFFF,
- the comparison may never succeed, because sign-extension of a character
- on widening to integer is machine-dependent.
-
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- GGGGEEEETTTTCCCC((((3333SSSS)))) GGGGEEEETTTTCCCC((((3333SSSS))))
-
-
-
- CCCCAAAAVVVVEEEEAAAATTTTSSSS
- When using the macro versions of _g_e_t_c and _g_e_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, ggggeeeettttcccc((((****ffff++++++++)))) does not work sensibly. In
- these situations, the macro must either be ####uuuunnnnddddeeeeffff'd, or _f_g_e_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 _g_e_t_c and _g_e_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
-
-
-
-