


     FFFFGGGGEEEETTTTLLLLIIIINNNNEEEE((((3333))))		 XXXXEEEENNNNIIIIXXXX 3333....0000		   FFFFGGGGEEEETTTTLLLLIIIINNNNEEEE((((3333))))



     NNNNAAAAMMMMEEEE
	  fgetline - get a line from a stream

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
	  ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
	  cccchhhhaaaarrrr ****
	  ffffggggeeeettttlllliiiinnnneeee((((FFFFIIIILLLLEEEE	****ssssttttrrrreeeeaaaammmm,,,, ssssiiiizzzzeeee____tttt	****lllleeeennnn))))

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
	  The _f_g_e_t_l_i_n_e function	returns	a pointer to the next line
	  from the stream referenced by	_s_t_r_e_a_m.	 The newline character
	  at the end of	the line is replaced by	a _N_U_L.	If _l_e_n is
	  non-NULL, the	length of the line, not	counting the
	  terminating _N_U_L, is stored in	the memory location it
	  references.

     RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEESSSS
	  Upon successful completion a pointer is returned; this
	  pointer becomes invalid after	the next _I/_O operation on
	  _s_t_r_e_a_m (whether successful or	not) or	as soon	as the stream
	  is closed.  Otherwise, _N_U_L_L is returned.  The	_f_g_e_t_l_i_n_e
	  function does	not distinguish	between	end-of-file and	error;
	  the routines _f_e_o_f(3) and _f_e_r_r_o_r(3) must be used to determine
	  which	occurred.  If an error occurrs,	the global variable
	  _e_r_r_n_o	is set to indicate the error.  The end-of-file
	  condition is remembered, even	on a terminal, and all
	  subsequent attempts to read will return _N_U_L_L until the
	  condition is cleared with _c_l_e_a_r_e_r_r(3).

	  The text to which the	returned pointer points	may be
	  modified, provided that no changes are made beyond the
	  terminating _N_U_L.  These changes are lost as soon as the
	  pointer becomes invalid.

     EEEERRRRRRRROOOORRRRSSSS
	  [EBADF]
	       The argument _s_t_r_e_a_m is not a stream open	for reading.

	  The _f_g_e_t_l_i_n_e function	may also fail and set _e_r_r_n_o for	any of
	  the errors specified for the routines	_f_f_l_u_s_h(3), _m_a_l_l_o_c(3),
	  _r_e_a_d(2), _s_t_a_t(2), or _r_e_a_l_l_o_c(3).

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
	  _f_e_r_r_o_r(3), _f_g_e_t_s(3), _f_o_p_e_n(3), _p_u_t_c(3)

     HHHHIIIISSSSTTTTOOOORRRRYYYY
	  The _f_g_e_t_l_i_n_e function	is new.

     BBBBUUUUGGGGSSSS
	  It is	not possible to	tell whether the final line of an
	  input	file was terminated with a newline.




     Page 1					      (printed 8/2/94)



