mirror of
https://github.com/siemens-mobile-hacks/dc166-patch.git
synced 2026-11-25 19:37:24 +00:00
16 lines
401 B
C
16 lines
401 B
C
#include "dc166_stdio.h"
|
|
|
|
size_t fwrite(const void *buffer, size_t size, size_t count, FILE *stream)
|
|
{
|
|
const unsigned char *next = (const unsigned char *)buffer;
|
|
size_t item;
|
|
size_t offset;
|
|
|
|
for (item = 0U; item < count; ++item) {
|
|
for (offset = 0U; offset < size; ++offset)
|
|
fputc((int)*next++, stream);
|
|
if ((stream->_flag & _IOERR) != 0U)
|
|
return item;
|
|
}
|
|
return item;
|
|
}
|