initial check-in, version 0.5.0
[musl] / src / stdio / fputc.c
1 #include "stdio_impl.h"
2
3 int fputc(int c, FILE *f)
4 {
5         FLOCK(f);
6         if (c != f->lbf && f->wpos + 1 < f->wend) *f->wpos++ = c;
7         else c = __overflow(f, c);
8         FUNLOCK(f);
9         return c;
10 }