musl/src/stdio/fputc.c

11 lines
177 B
C
Raw Normal View History

2011-02-12 00:22:29 -05:00
#include "stdio_impl.h"
int fputc(int c, FILE *f)
{
FLOCK(f);
if (c != f->lbf && f->wpos + 1 < f->wend) *f->wpos++ = c;
else c = __overflow(f, c);
FUNLOCK(f);
return c;
}