STDIO(3S) UNIX Programmer's Manual STDIO(3S) NAME stdio - standard buffered input/output stream file package SYNOPSIS #include HP-UX COMPATIBILITY Level: HP-UX/RUN ONLY Origin: System V DESCRIPTION The functions described in the entries of sub-class 3S of this manual constitute an efficient, user-level I/O buffer- ing scheme. The in-line macros _g_e_t_c(3S) and _p_u_t_c(3S) handle characters quickly. The macros _g_e_t_c_h_a_r, _p_u_t_c_h_a_r, and the higher-level routines _f_g_e_t_c, _f_g_e_t_s, _f_p_r_i_n_t_f, _f_p_u_t_c, _f_p_u_t_s, _f_r_e_a_d, _f_s_c_a_n_f, _f_w_r_i_t_e, _g_e_t_s, _g_e_t_w, _p_r_i_n_t_f, _p_u_t_s, _p_u_t_w, and _s_c_a_n_f all use _g_e_t_c and _p_u_t_c; they can be freely intermixed. A file with associated buffering is called a _s_t_r_e_a_m and is declared to be a pointer to a defined type FILE. _F_o_p_e_n(3S) creates certain descriptive data for a stream and returns a pointer to designate the stream in all further transactions. Normally, there are 3 open streams with constant pointers declared in the "include" file and associated with the stan- dard open files: stdin standard input file stdout standard output file stderr standard error file. A constant "pointer" NULL (0) designates the null stream. An integer constant EOF (-1) is returned upon end-of-file or error by most integer functions that deal with streams (see the individual descriptions for details). Any program that uses this package must include the header file of pertinent macro definitions, as follows: #include The functions and constants mentioned in the entries of sub-class 3S of this manual are declared in that "include" file and need no further declaration. The constants and the following "functions" are implemented as macros (redeclara- tion of these names is perilous): _g_e_t_c, _g_e_t_c_h_a_r, _p_u_t_c, _p_u_t_c_h_a_r, _f_e_o_f, _f_e_r_r_o_r, and _f_i_l_e_n_o.