.\" Copyright (c) 1990 The Regents of the University of California.
.\" This code is derived from software contributed to Berkeley by
.\" %sccs.include.redist.man%
.\" @(#)fgets.3 6.5 (Berkeley) %G%
fgets, gets \- get a line from a stream
fgets(char *str, size_t size, FILE *stream);
reads at most one less than the number of characters specified by
Reading stops when a newline character is found,
The newline, if any, is retained.
In any case a '\e0' character is appended to end the string.
except that the newline character (if any) is not stored in the string.
It is the caller's responsibility to ensure that the input line,
if any, is sufficiently short to fit in the string.
feof(3), ferror(3), fgetline(3)
Upon successful completion,
If end-of-file or an error occurs before any characters are read,
to determine which occurred.
is not a readable stream.
for any of the errors specified for the routines
for any of the errors specified for the routine
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
exists purely to conform to ANSI X3.159-1989.
conform to ANSI X3.159-1989 (``ANSI C'').