home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 4
/
DATAFILE_PDCD4.iso
/
unix
/
unixlib36d
/
src
/
stdio
/
c
/
frdwr
< prev
next >
Wrap
Text File
|
1994-03-08
|
571b
|
28 lines
static char sccs_id[] = "@(#) frdwr.c 1.1 " __DATE__ " HJR";
/* frdwr.c (c) Copyright 1990 H.Rogers */
#include <stdio.h>
__STDIOLIB__
size_t fread (register void *buf, size_t size, size_t nmemb, register FILE * f)
{
register int n;
n = (int) (size * nmemb);
return (((n = __fread (f, (char *) buf, n)) < 0) ? 0 : (size_t) (n / size));
}
size_t
fwrite (register const void *buf, size_t size, size_t nmemb,
register FILE * f)
{
register int n;
n = (int) (size * nmemb);
return (((n = __fwrite (f, (char *) buf, n)) < 0) ? 0 : (size_t) (n / size));
}