File:  [Research Unix] / researchv10dc / man / adm / man3 / fread.3
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:34 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Dan Cross

.TH FREAD 3S
.CT 2 file_io
.SH NAME
fread, fwrite \(mi buffered binary input/output
.SH SYNOPSIS
.B #include <stdio.h>
.PP
.B int fread(ptr, sizeof(*ptr), nitems, stream)
.br
.SM
.B FILE
.B *stream;
.PP
.B int fwrite(ptr, sizeof(*ptr), nitems, stream)
.br
.SM
.B FILE
.B *stream;
.SH DESCRIPTION
.I Fread
reads from the named input
.IR stream 
at most
.I nitems
of data of the type of
.I *ptr
into a block beginning at
.I ptr.
It returns the number of items actually read.
.PP
.I Fwrite
appends to the named output
.I stream
at most
.I nitems
of data of the type of
.I *ptr
from a block beginning at
.I ptr.
It returns the number of items actually written.
.SH "SEE ALSO"
.IR read (2), 
.IR stdio (3)
.SH DIAGNOSTICS
.I Fread
and
.I fwrite
return 0
upon end of file or error.
.SH BUGS
Write errors of the data for any
.I fwrite
call may occur a long time after that call.
.br
These routines are much slower than you might imagine.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.