12#ifndef IO_STREAMCOUNT_H
13#define IO_STREAMCOUNT_H
33 size_t my_fwrite(
const void *ptr,
size_t size,
size_t nmemb, FILE *stream)
42 if((nwritten = fwrite(ptr, size, nmemb, stream)) != nmemb)
44 Terminate(
"I/O error (fwrite) has occured: %s\n", strerror(errno));
66 size_t my_fread(
void *ptr,
size_t size,
size_t nmemb, FILE *stream)
75 if((nread = fread(ptr, size, nmemb, stream)) != nmemb)
79 Terminate(
"I/O error (fread) has occured: end of file\n");
82 Terminate(
"I/O error (fread) has occured: %s\n", strerror(errno));
size_t my_fread(void *ptr, size_t size, size_t nmemb, FILE *stream)
A wrapper for the fread() function.
void reset_io_byte_count(void)
long long get_io_byte_count(void)
size_t my_fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream)
A wrapper for the fwrite() function.