.\" Modified Thu Apr 20 20:43:53 1995 by Jim Van Zandt <jrv@vanzandt.mv.com>
.\" Modified Fri May 17 10:21:51 1996 by Martin Schulze <joey@infodrom.north.de>
.\"
-.TH FREAD 3 2012-03-30 "GNU" "Linux Programmer's Manual"
+.TH FREAD 3 2015-07-23 "GNU" "Linux Programmer's Manual"
.SH NAME
fread, fwrite \- binary stream input/output
.SH SYNOPSIS
.nf
.B #include <stdio.h>
-.sp
+.PP
.BI "size_t fread(void *" ptr ", size_t " size ", size_t " nmemb \
", FILE *" stream );
-.sp
+.PP
.BI "size_t fwrite(const void *" ptr ", size_t " size ", size_t " nmemb ,
.BI " FILE *" stream );
.fi
.BR fread ()
reads
.I nmemb
-elements of data, each
+items of data, each
.I size
bytes long, from the stream pointed to by
.IR stream ,
.BR fwrite ()
writes
.I nmemb
-elements of data, each
+items of data, each
.I size
bytes long, to the stream pointed to by
.IR stream ,
.BR fread ()
and
.BR fwrite ()
-return the number of
-.I items
-read or written.
+return the number of items read or written.
This number equals the number of bytes transferred only when
.I size
is 1.
and
.BR ferror (3)
to determine which occurred.
+.SH ATTRIBUTES
+For an explanation of the terms used in this section, see
+.BR attributes (7).
+.TS
+allbox;
+lbw17 lb lb
+l l l.
+Interface Attribute Value
+T{
+.BR fread (),
+.BR fwrite ()
+T} Thread safety MT-Safe
+.TE
.SH CONFORMING TO
-C89, POSIX.1-2001.
+POSIX.1-2001, POSIX.1-2008, C89.
.SH SEE ALSO
.BR read (2),
.BR write (2),