File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / usr / src / man / man3 / fread.3s
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

.TH FREAD 3S  "19 January 1983"
.UC 4
.SH NAME
fread, fwrite \- buffered binary input/output
.SH SYNOPSIS
.B #include <stdio.h>
.PP
.B fread(ptr, sizeof(*ptr), nitems, stream)
.br
.SM
.B FILE
.B *stream;
.PP
.B fwrite(ptr, sizeof(*ptr), nitems, stream)
.br
.SM
.B FILE
.B *stream;
.SH DESCRIPTION
.I Fread
reads, into a block beginning at
.IR ptr ,
.I nitems
of data of the type of
.I *ptr
from the named input
.IR stream .
It returns the number of items actually read.
.PP
If
.I stream
is
.B stdin
and the standard output is line buffered, then any partial output line
will be flushed before any call to
.IR read (2)
to satisfy the
.IR fread .
.PP
.I Fwrite
appends at most
.I nitems
of data of the type of
.I *ptr
beginning at
.I ptr
to the named output
.IR stream .
It returns the number of items actually written.
.SH "SEE ALSO"
read(2),
write(2),
fopen(3S),
getc(3S),
putc(3S),
gets(3S),
puts(3S),
printf(3S),
scanf(3S)
.SH DIAGNOSTICS
.I Fread
and
.I fwrite
return
0
upon end of file or error.

unix.superglobalmegacorp.com

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