19 lines
339 B
C
19 lines
339 B
C
#include <stdio.h>
|
|
|
|
/*
|
|
* Return the character written, or EOF if an error occurs
|
|
*/
|
|
int fputc(int c, FILE *stream)
|
|
{
|
|
#if 0
|
|
// Issue #73
|
|
return --stream->_n ? (*stream->_ptr++ = c) : stream->_flush(c, stream);
|
|
#else
|
|
if (--stream->_n) {
|
|
*stream->_ptr++ = c;
|
|
return c;
|
|
} else
|
|
return stream->_flush(c, stream);
|
|
#endif
|
|
}
|