Annotated edit history of
fwrite(3) version 3 showing authors affecting page license.
View with all changes included.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
FREAD |
|
|
2 |
!!!FREAD |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
RETURN VALUE |
|
|
7 |
CONFORMING TO |
|
|
8 |
SEE ALSO |
|
|
9 |
---- |
|
|
10 |
!!NAME |
|
|
11 |
|
|
|
12 |
|
|
|
13 |
fread, fwrite - binary stream input/output |
|
|
14 |
!!SYNOPSIS |
|
|
15 |
|
|
|
16 |
|
|
|
17 |
__#include __ |
|
|
18 |
|
|
|
19 |
|
2 |
JimSmith |
20 |
__size_t fread( void *__''ptr''__, size_t__ ''size''__, size_t__ ''nmemb''__, FILE *__''stream''__);__%%% |
|
|
21 |
__size_t fwrite( const void *__''ptr''__, size_t__ ''size''__, size_t__ ''nmemb''__, FILE *__''stream''__);__ |
1 |
perry |
22 |
!!DESCRIPTION |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
The function __fread__ reads ''nmemb'' elements of |
|
|
26 |
data, each ''size'' bytes long, from the stream pointed |
|
|
27 |
to by ''stream'', storing them at the location given by |
|
|
28 |
''ptr''. |
|
|
29 |
|
|
|
30 |
|
|
|
31 |
The function __fwrite__ writes ''nmemb'' elements of |
|
|
32 |
data, each ''size'' bytes long, to the stream pointed to |
|
|
33 |
by ''stream'', obtaining them from the location given by |
|
|
34 |
''ptr''. |
|
|
35 |
!!RETURN VALUE |
|
|
36 |
|
|
|
37 |
|
|
|
38 |
__fread__ and __fwrite__ return the number of items |
|
|
39 |
successfully read or written (i.e., not the number of |
|
|
40 |
characters). If an error occurs, or the end-of-file is |
|
|
41 |
reached, the return value is a short item count (or |
|
|
42 |
zero). |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
__fread__ does not distinguish between end-of-file and |
|
|
46 |
error, and callers must use feof(3) and |
|
|
47 |
ferror(3) to determine which occurred. |
|
|
48 |
!!CONFORMING TO |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
The functions __fread__ and __fwrite__ conform to ANSI |
|
|
52 |
X3.159-1989 (``ANSI C''). |
|
|
53 |
!!SEE ALSO |
|
|
54 |
|
|
|
55 |
|
|
|
56 |
feof(3), ferror(3), read(2), |
|
|
57 |
write(2) |
|
|
58 |
---- |
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.