SCCS-vsn: lib/libc/stdio/fgetln.3 5.2
SCCS-vsn: lib/libc/stdio/fgets.3 6.6
.\"
.\" %sccs.include.redist.man%
.\"
.\"
.\" %sccs.include.redist.man%
.\"
-.\" @(#)fgetln.3 5.1 (Berkeley) %G%
+.\" @(#)fgetln.3 5.2 (Berkeley) %G%
.\"
.TH FGETLINE 3 ""
.UC 7
.\"
.TH FGETLINE 3 ""
.UC 7
.I Fgetline
returns a pointer to the next line from the stream pointed to by
.IR stream .
.I Fgetline
returns a pointer to the next line from the stream pointed to by
.IR stream .
-The newline character at the end of the line is replaced by a '\e0'
-character.
+The newline character at the end of the line is replaced by a NUL.
.PP
If
.I len
is non-NULL, the length of the line, not counting the terminating
NUL, is stored in the memory location it references.
.PP
If
.I len
is non-NULL, the length of the line, not counting the terminating
NUL, is stored in the memory location it references.
-.SH "SEE ALSO"
-ferror(3), fgets(3), fopen(3), putc(3)
.SH "RETURN VALUE"
Upon successful completion a pointer is returned;
this pointer becomes invalid after the next I/O operation on
.SH "RETURN VALUE"
Upon successful completion a pointer is returned;
this pointer becomes invalid after the next I/O operation on
cleared with
.IR clearerr .
.PP
cleared with
.IR clearerr .
.PP
-It is not possible to tell whether the final line of an input file
-was terminated with a newline.
-.PP
The text to which the returned pointer points may be modified,
provided that no changes are made beyond the terminating NUL.
These changes are lost as soon as the pointer becomes invalid.
The text to which the returned pointer points may be modified,
provided that no changes are made beyond the terminating NUL.
These changes are lost as soon as the pointer becomes invalid.
.IR stat (2),
or
.IR realloc (3).
.IR stat (2),
or
.IR realloc (3).
+.SH "SEE ALSO"
+ferror(3), fgets(3), fopen(3), putc(3)
+.SH BUGS
+It is not possible to tell whether the final line of an input file
+was terminated with a newline.
.\"
.\" %sccs.include.redist.man%
.\"
.\"
.\" %sccs.include.redist.man%
.\"
-.\" @(#)fgets.3 6.5 (Berkeley) %G%
+.\" @(#)fgets.3 6.6 (Berkeley) %G%
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.
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.
-.SH "SEE ALSO"
-feof(3), ferror(3), fgetline(3)
.SH "RETURN VALUE"
.PP
Upon successful completion,
.SH "RETURN VALUE"
.PP
Upon successful completion,
.I errno
for any of the errors specified for the routine
.IR getchar (3).
.I errno
for any of the errors specified for the routine
.IR getchar (3).
+.SH "SEE ALSO"
+feof(3), ferror(3), fgetline(3)
+.SH STANDARDS
+.I Fgets
+and
+.I gets
+conform to ANSI X3.159-1989 (``ANSI C'').
.SH BUGS
Since it is usually impossible to ensure that the next input line
is less than some arbitrary length, and because overflowing the
.SH BUGS
Since it is usually impossible to ensure that the next input line
is less than some arbitrary length, and because overflowing the
.IR gets .
.I Gets
exists purely to conform to ANSI X3.159-1989.
.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'').