[0m


GETC(3S)	    UNIX Programmer's Manual		 GETC(3S)



[1mNAME
     [0mgetc, getchar, fgetc, getw - get character or word from
     stream

[1mSYNOPSIS
     #include <stdio.h>

     int getc(stream)
     FILE *stream;

     int getchar()

     int fgetc(stream)
     FILE *stream;

     int getw(stream)
     FILE *stream;

DESCRIPTION
     [0m_G_e_t_c returns the next character from the named input _s_t_r_e_a_m.

     _G_e_t_c_h_a_r() is identical to _g_e_t_c(_s_t_d_i_n).

     _F_g_e_t_c is identical to _g_e_t_c,

     _G_e_t_w returns the next [1mint [0m(a 32-bit integer on an ARM) from
     the named input _s_t_r_e_a_m.  It returns the constant [1mEOF [0mupon
     end of file or error, but since that is a good integer
     value, _f_e_o_f and _f_e_r_r_o_r(3S) should be used to check the suc-
     cess of _g_e_t_w.  _G_e_t_w assumes no special alignment in the
     file.

[1mSEE ALSO
     [0mclearerr(3S), fopen(3S), putc(3S), gets(3S), scanf(3S),
     fread(3S), ungetc(3S)

[1mDIAGNOSTICS
     [0mThese functions return the integer constant [1mEOF [0mat end of
     file, upon read error, or if an attempt is made to read a
     file not opened by _f_o_p_e_n.	The end-of-file condition is
     remembered, even on a terminal, and all subsequent attempts
     to read will return [1mEOF [0muntil the condition is cleared with
     _c_l_e_a_r_e_r_r(3S).

[1mBUGS
     [0mBecause it is implemented as a macro, _g_e_t_c treats a _s_t_r_e_a_m
     argument with side effects incorrectly.  In particular,
     `getc(*f++);' doesn't work sensibly.







Printed 11/2/94     Revision 1.4 of 29/11/88			1



[0m