FREAD(3) NEWLIB FREAD(3)NAME
4.24 `fread'--read array elements from a file
SYNOPSIS
#include <stdio.h>
size_t fread(void *BUF, size_t SIZE, size_t COUNT,
FILE *FP);
#include <stdio.h>
size_t _fread_r(struct _reent *PTR, void *BUF,
size_t SIZE, size_t COUNT, FILE *FP);
DESCRIPTION
`fread' attempts to copy, from the file or stream identified by FP,
COUNT elements (each of size SIZE) into memory, starting at BUF.
`fread' may copy fewer elements than COUNT if an error, or end of file,
intervenes.
`fread' also advances the file position indicator (if any) for FP by
the number of _characters_ actually read.
`_fread_r' is simply the reentrant version of `fread' that takes an
additional reentrant structure pointer argument: PTR.
RETURNS
The result of `fread' is the number of elements it succeeded in read‐
ing.
PORTABILITY
ANSI C requires `fread'.
Supporting OS subroutines required: `close', `fstat', `isatty',
`lseek', `read', `sbrk', `write'.
SEE ALSOfread is part of the library. The full documentation for is maintained
as a Texinfo manual. If info and are properly installed at your site,
the command
info
will give you access to the complete manual.
NEWLIB April 2010 FREAD(3)