fgetc.c 171 B

1234567891011
  1. #include "stdio_impl.h"
  2. int fgetc(FILE *f)
  3. {
  4. int c;
  5. if (f->lock < 0 || !__lockfile(f))
  6. return getc_unlocked(f);
  7. c = getc_unlocked(f);
  8. __unlockfile(f);
  9. return c;
  10. }