]> git.saurik.com Git - apple/libc.git/blob - stdio/FreeBSD/fread.3.patch
Libc-763.12.tar.gz
[apple/libc.git] / stdio / FreeBSD / fread.3.patch
1 --- fread.3.bsdnew 2009-11-11 13:33:08.000000000 -0800
2 +++ fread.3 2009-11-11 13:33:09.000000000 -0800
3 @@ -44,14 +44,16 @@
4 .Sh SYNOPSIS
5 .In stdio.h
6 .Ft size_t
7 -.Fn fread "void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream"
8 +.Fn fread "void *restrict ptr" "size_t size" "size_t nitems" \
9 + "FILE *restrict stream"
10 .Ft size_t
11 -.Fn fwrite "const void * restrict ptr" "size_t size" "size_t nmemb" "FILE * restrict stream"
12 +.Fn fwrite "const void *restrict ptr" "size_t size" "size_t nitems" \
13 + "FILE *restrict stream"
14 .Sh DESCRIPTION
15 The function
16 .Fn fread
17 reads
18 -.Fa nmemb
19 +.Fa nitems
20 objects, each
21 .Fa size
22 bytes long, from the stream pointed to by
23 @@ -62,7 +64,7 @@ storing them at the location given by
24 The function
25 .Fn fwrite
26 writes
27 -.Fa nmemb
28 +.Fa nitems
29 objects, each
30 .Fa size
31 bytes long, to the stream pointed to by
32 @@ -82,7 +84,7 @@ the return value is a short object count
33 .Pp
34 The function
35 .Fn fread
36 -does not distinguish between end-of-file and error, and callers
37 +does not distinguish between end-of-file and error; callers
38 must use
39 .Xr feof 3
40 and
41 @@ -91,7 +93,7 @@ to determine which occurred.
42 The function
43 .Fn fwrite
44 returns a value less than
45 -.Fa nmemb
46 +.Fa nitems
47 only if a write error has occurred.
48 .Sh SEE ALSO
49 .Xr read 2 ,