Annotation of 43BSDReno/lib/libc/stdio/fread.3, revision 1.1.1.1

1.1       root        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.3     6.2 (Berkeley) 4/1/89
                      6: .\"
                      7: .TH FREAD 3  "April 1, 1989"
                      8: .UC 4
                      9: .SH NAME
                     10: fread, fwrite \- buffered binary input/output
                     11: .SH SYNOPSIS
                     12: .B #include <stdio.h>
                     13: .PP
                     14: .B fread(ptr, sizeof(*ptr), nitems, stream)
                     15: .br
                     16: .SM
                     17: .B FILE
                     18: .B *stream;
                     19: .PP
                     20: .B fwrite(ptr, sizeof(*ptr), nitems, stream)
                     21: .br
                     22: .SM
                     23: .B FILE
                     24: .B *stream;
                     25: .SH DESCRIPTION
                     26: .I Fread
                     27: reads, into a block beginning at
                     28: .IR ptr ,
                     29: .I nitems
                     30: of data of the type of
                     31: .I *ptr
                     32: from the named input
                     33: .IR stream .
                     34: It returns the number of items actually read.
                     35: .PP
                     36: If
                     37: .I stream
                     38: is
                     39: .B stdin
                     40: and the standard output is line buffered, then any partial output line
                     41: will be flushed before any call to
                     42: .IR read (2)
                     43: to satisfy the
                     44: .IR fread .
                     45: .PP
                     46: .I Fwrite
                     47: appends at most
                     48: .I nitems
                     49: of data of the type of
                     50: .I *ptr
                     51: beginning at
                     52: .I ptr
                     53: to the named output
                     54: .IR stream .
                     55: It returns the number of items actually written.
                     56: .SH "SEE ALSO"
                     57: read(2),
                     58: write(2),
                     59: fopen(3),
                     60: getc(3),
                     61: putc(3),
                     62: gets(3),
                     63: puts(3),
                     64: printf(3),
                     65: scanf(3)
                     66: .SH DIAGNOSTICS
                     67: .I Fread
                     68: and
                     69: .I fwrite
                     70: return
                     71: 0
                     72: 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.