|
|
1.1 ! root 1: .TH FREAD 3S ! 2: .CT 2 file_io ! 3: .SH NAME ! 4: fread, fwrite \(mi buffered binary input/output ! 5: .SH SYNOPSIS ! 6: .B #include <stdio.h> ! 7: .PP ! 8: .B int fread(ptr, sizeof(*ptr), nitems, stream) ! 9: .br ! 10: .SM ! 11: .B FILE ! 12: .B *stream; ! 13: .PP ! 14: .B int fwrite(ptr, sizeof(*ptr), nitems, stream) ! 15: .br ! 16: .SM ! 17: .B FILE ! 18: .B *stream; ! 19: .SH DESCRIPTION ! 20: .I Fread ! 21: reads from the named input ! 22: .IR stream ! 23: at most ! 24: .I nitems ! 25: of data of the type of ! 26: .I *ptr ! 27: into a block beginning at ! 28: .I ptr. ! 29: It returns the number of items actually read. ! 30: .PP ! 31: .I Fwrite ! 32: appends to the named output ! 33: .I stream ! 34: at most ! 35: .I nitems ! 36: of data of the type of ! 37: .I *ptr ! 38: from a block beginning at ! 39: .I ptr. ! 40: It returns the number of items actually written. ! 41: .SH "SEE ALSO" ! 42: .IR read (2), ! 43: .IR stdio (3) ! 44: .SH DIAGNOSTICS ! 45: .I Fread ! 46: and ! 47: .I fwrite ! 48: return 0 ! 49: upon end of file or error. ! 50: .SH BUGS ! 51: Write errors of the data for any ! 52: .I fwrite ! 53: call may occur a long time after that call. ! 54: .br ! 55: These routines are much slower than you might imagine.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.