shgetc.h 311 B

123456789
  1. #include "stdio_impl.h"
  2. void __shlim(FILE *, off_t);
  3. int __shgetc(FILE *);
  4. #define shcnt(f) ((f)->shcnt + ((f)->rpos - (f)->rend))
  5. #define shlim(f, lim) __shlim((f), (lim))
  6. #define shgetc(f) (((f)->rpos < (f)->shend) ? *(f)->rpos++ : __shgetc(f))
  7. #define shunget(f) ((f)->shend ? (void)(f)->rpos-- : (void)0)