Penguin
Annotated edit history of fread(3) version 1, including all changes. View license author blame.
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
20 __size_t fread( void *__''ptr''__, size_t__
21 ''size''__, size_t__ ''nmemb''__, FILE
22 *__''stream''__);__
23
24
25 __size_t fwrite( const void *__''ptr''__, size_t__
26 ''size''__, size_t__ ''nmemb''__, FILE
27 *__''stream''__);__
28 !!DESCRIPTION
29
30
31 The function __fread__ reads ''nmemb'' elements of
32 data, each ''size'' bytes long, from the stream pointed
33 to by ''stream'', storing them at the location given by
34 ''ptr''.
35
36
37 The function __fwrite__ writes ''nmemb'' elements of
38 data, each ''size'' bytes long, to the stream pointed to
39 by ''stream'', obtaining them from the location given by
40 ''ptr''.
41 !!RETURN VALUE
42
43
44 __fread__ and __fwrite__ return the number of items
45 successfully read or written (i.e., not the number of
46 characters). If an error occurs, or the end-of-file is
47 reached, the return value is a short item count (or
48 zero).
49
50
51 __fread__ does not distinguish between end-of-file and
52 error, and callers must use feof(3) and
53 ferror(3) to determine which occurred.
54 !!CONFORMING TO
55
56
57 The functions __fread__ and __fwrite__ conform to ANSI
58 X3.159-1989 (``ANSI C'').
59 !!SEE ALSO
60
61
62 feof(3), ferror(3), read(2),
63 write(2)
64 ----
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.