BSD 4_2 development
authorCSRG <csrg@ucbvax.Berkeley.EDU>
Fri, 1 Apr 1983 07:48:48 +0000 (23:48 -0800)
committerCSRG <csrg@ucbvax.Berkeley.EDU>
Fri, 1 Apr 1983 07:48:48 +0000 (23:48 -0800)
Work on file usr/man/man3/fread.3s

Synthesized-from: CSRG/cd1/4.2

usr/man/man3/fread.3s [new file with mode: 0644]

diff --git a/usr/man/man3/fread.3s b/usr/man/man3/fread.3s
new file mode 100644 (file)
index 0000000..e50230b
--- /dev/null
@@ -0,0 +1,66 @@
+.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.