FGETS(3) 1990 FGETS(3) NNAAMMEE fgets - get a line from a stream SSYYNNOOPPSSIISS ##iinncclluuddee <<ssttddiioo..hh>> cchhaarr **ffggeettss((ss,, nn,, ssttrreeaamm)) cchhaarr **ss;; iinntt nn;; FFIILLEE **ssttrreeaamm;; DDEESSCCRRIIPPTTIIOONN The _f_g_e_t_s function reads at most one less than the number of characters specified by _n from the stream pointed to by _s_t_r_e_a_m into the array pointed to by _s. No additional char- acters are read after a new-line character (which is retained) or after end-of-file. A null character is written immediately after the last character read into the array. The _f_g_e_t_s function returns _s if successful. If end-of-file is encountered and no characters have been read into the array, the contents of the array remain unchanged and a null pointer is returned. If a read error occurs during the operation, the array contents are indeterminate and a null pointer is returned. SSEEEE AALLSSOO getc(3), ferror(3) fread(3), scanf(3) SSTTAANNDDAARRDDSS The _f_g_e_t_s function is ANSI C compatible. Printed 7/27/90 June 1