ftell.c 156 B

1234567
  1. #include <stdio.h>
  2. __ATTR_LIB_C__ long ftell(const FILE *f)
  3. {
  4. if(f->flags&_F_ERR) return EOF;
  5. return f->fpos-(char*)f->base-((f->flags&_F_BIN)?2:5);
  6. }