Loading...
--- Libc/Libc-763.13/stdio/fread.3
+++ Libc/Libc-262.3.2/stdio/fread.3
@@ -13,6 +13,10 @@
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
+.\" 3. All advertising materials mentioning features or use of this software
+.\" must display the following acknowledgement:
+.\" This product includes software developed by the University of
+.\" California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\" may be used to endorse or promote products derived from this software
.\" without specific prior written permission.
@@ -30,7 +34,7 @@
.\" SUCH DAMAGE.
.\"
.\" @(#)fread.3 8.2 (Berkeley) 3/8/94
-.\" $FreeBSD: src/lib/libc/stdio/fread.3,v 1.10 2007/01/09 00:28:06 imp Exp $
+.\" $FreeBSD: src/lib/libc/stdio/fread.3,v 1.8 2001/10/01 16:08:59 ru Exp $
.\"
.Dd March 8, 1994
.Dt FREAD 3
@@ -44,16 +48,14 @@
.Sh SYNOPSIS
.In stdio.h
.Ft size_t
-.Fn fread "void *restrict ptr" "size_t size" "size_t nitems" \
- "FILE *restrict stream"
+.Fn fread "void *ptr" "size_t size" "size_t nmemb" "FILE *stream"
.Ft size_t
-.Fn fwrite "const void *restrict ptr" "size_t size" "size_t nitems" \
- "FILE *restrict stream"
+.Fn fwrite "const void *ptr" "size_t size" "size_t nmemb" "FILE *stream"
.Sh DESCRIPTION
The function
.Fn fread
reads
-.Fa nitems
+.Fa nmemb
objects, each
.Fa size
bytes long, from the stream pointed to by
@@ -64,7 +66,7 @@
The function
.Fn fwrite
writes
-.Fa nitems
+.Fa nmemb
objects, each
.Fa size
bytes long, to the stream pointed to by
@@ -84,7 +86,7 @@
.Pp
The function
.Fn fread
-does not distinguish between end-of-file and error; callers
+does not distinguish between end-of-file and error, and callers
must use
.Xr feof 3
and
@@ -93,7 +95,7 @@
The function
.Fn fwrite
returns a value less than
-.Fa nitems
+.Fa nmemb
only if a write error has occurred.
.Sh SEE ALSO
.Xr read 2 ,