summaryrefslogtreecommitdiffstats
path: root/man3/fgetc.3
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--man3/fgetc.325
1 files changed, 12 insertions, 13 deletions
diff --git a/man3/fgetc.3 b/man3/fgetc.3
index 1b13d61..1f820f8 100644
--- a/man3/fgetc.3
+++ b/man3/fgetc.3
@@ -5,7 +5,7 @@
.\"
.\" Modified Wed Jul 28 11:12:07 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Fri Sep 8 15:48:13 1995 by Andries Brouwer (aeb@cwi.nl)
-.TH fgetc 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH fgetc 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
fgetc, fgets, getc, getchar, ungetc \- input of characters and strings
.SH LIBRARY
@@ -14,14 +14,14 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <stdio.h>
-.PP
+.P
.BI "int fgetc(FILE *" stream );
.BI "int getc(FILE *" stream );
.B "int getchar(void);"
-.PP
+.P
.BI "char *fgets(char " s "[restrict ." size "], int " size ", \
FILE *restrict " stream );
-.PP
+.P
.BI "int ungetc(int " c ", FILE *" stream );
.fi
.SH DESCRIPTION
@@ -35,18 +35,18 @@ cast to an
or
.B EOF
on end of file or error.
-.PP
+.P
.BR getc ()
is equivalent to
.BR fgetc ()
except that it may be implemented as a macro which evaluates
.I stream
more than once.
-.PP
+.P
.BR getchar ()
is equivalent to
.BI "getc(" stdin ) \fR.
-.PP
+.P
.BR fgets ()
reads in at most one less than
.I size
@@ -60,7 +60,7 @@ or a newline.
If a newline is read, it is stored into the buffer.
A terminating null byte (\[aq]\e0\[aq])
is stored after the last character in the buffer.
-.PP
+.P
.BR ungetc ()
pushes
.I c
@@ -71,12 +71,12 @@ cast to
where it is available for subsequent read operations.
Pushed-back characters
will be returned in reverse order; only one pushback is guaranteed.
-.PP
+.P
Calls to the functions described here can be mixed with each other and with
calls to other input functions from the
.I stdio
library for the same input stream.
-.PP
+.P
For nonlocking counterparts, see
.BR unlocked_stdio (3).
.SH RETURN VALUE
@@ -91,13 +91,13 @@ cast to an
or
.B EOF
on end of file or error.
-.PP
+.P
.BR fgets ()
returns
.I s
on success, and NULL
on error or when end of file occurs while no characters have been read.
-.PP
+.P
.BR ungetc ()
returns
.I c
@@ -122,7 +122,6 @@ T{
.BR ungetc ()
T} Thread safety MT-Safe
.TE
-.sp 1
.SH STANDARDS
C11, POSIX.1-2008.
.SH HISTORY