1987-03-31 10:45:53 +00:00
|
|
|
/* $Header$ */
|
1987-01-27 15:57:55 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
fwrite(ptr, size, count, file)
|
|
|
|
unsigned size, count;
|
|
|
|
register char *ptr;
|
|
|
|
register FILE *file;
|
|
|
|
{
|
|
|
|
unsigned s;
|
|
|
|
unsigned ndone = 0;
|
|
|
|
|
|
|
|
if (size)
|
|
|
|
while ( ndone < count ) {
|
|
|
|
s = size;
|
|
|
|
do {
|
|
|
|
putc(*ptr++, file);
|
|
|
|
if (ferror(file))
|
|
|
|
return(ndone);
|
|
|
|
}
|
|
|
|
while (--s);
|
|
|
|
ndone++;
|
|
|
|
}
|
|
|
|
return(ndone);
|
|
|
|
}
|