gigatron/rom/Archive/lcc/Libs/stdio/fputc.c
2025-01-28 19:17:01 +03:00

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
}