fgetpos.c 188 B

1234567891011121314
  1. /*
  2. * fgetpos.c - get the position in the file
  3. */
  4. /* $Id$ */
  5. #include <stdio.h>
  6. int
  7. fgetpos(FILE *stream, fpos_t *pos)
  8. {
  9. *pos = ftell(stream);
  10. if (*pos == -1) return -1;
  11. return 0;
  12. }