]> pd.if.org Git - pdclib/blob - functions/stdio/fread.c
Yet closer to functional output.
[pdclib] / functions / stdio / fread.c
1 /* $Id$ */
2
3 /* fread( void *, size_t, size_t, FILE * )
4
5    This file is part of the Public Domain C Library (PDCLib).
6    Permission is granted to use, modify, and / or redistribute at will.
7 */
8
9 #include <stdio.h>
10 #include <_PDCLIB_glue.h>
11
12 #ifndef REGTEST
13
14 size_t fread( void * _PDCLIB_restrict ptr, size_t size, size_t nmemb, struct _PDCLIB_file_t * _PDCLIB_restrict stream )
15 {
16     return _PDCLIB_read( stream->handle, ptr, size * nmemb );
17 }
18
19 #endif
20
21 #ifdef TEST
22 #include <_PDCLIB_test.h>
23
24 int main( void )
25 {
26     /* Testing handled by fwrite(). */
27     return TEST_RESULTS;
28 }
29
30 #endif