FREAD.3
资源名称:os_source.zip [点击查看]
上传用户:datang2001
上传日期:2007-02-01
资源大小:53269k
文件大小:1k
源码类别:
操作系统开发
开发平台:
C/C++
- ." Copyright (c) 1980 Regents of the University of California.
- ." All rights reserved. The Berkeley software License Agreement
- ." specifies the terms and conditions for redistribution.
- ."
- ." @(#)fread.3s 6.1 (Berkeley) 5/15/85
- ."
- .TH FREAD 3 "May 15, 1985"
- .UC 4
- .SH NAME
- fread, fwrite - buffered binary input/output
- .SH SYNOPSIS
- .nf
- .ft B
- #include <sys/types.h>
- #include <stdio.h>
- size_t fread(void *fIptrfP, size_t fIitemsizefP, size_t fInitemsfP, FILE *fIstreamfP)
- size_t fwrite(void *fIptrfP, size_t fIitemsizefP, size_t fInitemsfP, FILE *fIstreamfP)
- .SH DESCRIPTION
- .B 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
- .BR read (2)
- to satisfy the
- .BR fread .
- .PP
- .B 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"
- .BR read (2),
- .BR write (2),
- .BR fopen (3),
- .BR getc (3),
- .BR putc (3),
- .BR gets (3),
- .BR puts (3),
- .BR printf (3),
- .BR scanf (3).
- .SH DIAGNOSTICS
- .B Fread
- and
- .B fwrite
- return
- 0
- upon end of file or error.