|
|
|
@ -28,7 +28,7 @@ static int fwrite_all(const void* _buf, size_t sz, size_t num, FILE* out)
|
|
|
|
|
{
|
|
|
|
|
register size_t w, done=0;
|
|
|
|
|
register const unsigned char* buf = _buf;
|
|
|
|
|
while( (w = fwrite(buf+done, sz, num-done, out)) > 0 && done < num) done+=w;
|
|
|
|
|
while( (w = fwrite(buf+(sz*done), sz, num-done, out)) > 0 && done < num) done+=w;
|
|
|
|
|
if (done!=num) return 0;
|
|
|
|
|
else return 1;
|
|
|
|
|
}
|
|
|
|
|