source: trunk/minix/man/man3/fread.3@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 1.3 KB
RevLine 
[9]1.\" Copyright (c) 1980 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\" @(#)fread.3s 6.1 (Berkeley) 5/15/85
6.\"
7.TH FREAD 3 "May 15, 1985"
8.UC 4
9.SH NAME
10fread, fwrite \- buffered binary input/output
11.SH SYNOPSIS
12.nf
13.ft B
14#include <sys/types.h>
15#include <stdio.h>
16
17size_t fread(void *\fIptr\fP, size_t \fIitemsize\fP, size_t \fInitems\fP, FILE *\fIstream\fP)
18size_t fwrite(void *\fIptr\fP, size_t \fIitemsize\fP, size_t \fInitems\fP, FILE *\fIstream\fP)
19.SH DESCRIPTION
20.B Fread
21reads, into a block beginning at
22.IR ptr ,
23.I nitems
24of data of the type of
25.I *ptr
26from the named input
27.IR stream .
28It returns the number of items actually read.
29.PP
30If
31.I stream
32is
33.B stdin
34and the standard output is line buffered, then any partial output line
35will be flushed before any call to
36.BR read (2)
37to satisfy the
38.BR fread .
39.PP
40.B Fwrite
41appends at most
42.I nitems
43of data of the type of
44.I *ptr
45beginning at
46.I ptr
47to the named output
48.IR stream .
49It returns the number of items actually written.
50.SH "SEE ALSO"
51.BR read (2),
52.BR write (2),
53.BR fopen (3),
54.BR getc (3),
55.BR putc (3),
56.BR gets (3),
57.BR puts (3),
58.BR printf (3),
59.BR scanf (3).
60.SH DIAGNOSTICS
61.B Fread
62and
63.B fwrite
64return
650
66upon end of file or error.
Note: See TracBrowser for help on using the repository browser.