+and
+.I gets
+return
+.IR s .
+If end-of-file or an error occurs before any characters are read,
+they return NULL.
+Callers must use
+.I feof
+and
+.I ferror
+to determine which occurred.
+.SH ERRORS
+.TP 15
+[EBADF]
+.I Stream
+is not a readable stream.
+.PP
+.I Fgets
+may also fail and set
+.I errno
+for any of the errors specified for the routines
+.IR fflush (3),
+.IR fstat (2),
+.IR read (2),
+or
+.IR malloc (3).
+.PP
+.I Gets
+may also fail and set
+.I errno
+for any of the errors specified for the routine
+.IR getchar (3).
+.SH BUGS
+Since it is usually impossible to ensure that the next input line
+is less than some arbitrary length, and because overflowing the
+input buffer is almost invariably a security violation, programs
+should
+.B NEVER
+use
+.IR gets .
+.I Gets
+exists purely to conform to ANSI X3.159-1989.
+.SH STANDARDS
+.I Fgets
+and
+.I gets
+conform to ANSI X3.159-1989 (``ANSI C'').