Mail Archives: djgpp/1999/06/22/08:45:52
Bart Alewijnse writes:
> How can you determine where in a file you are (declared by eg.
> FILE *infile;)
See "info libc alpha ftell".
> but I can't find the definition of FILE, nor the code for fseek().
This is where a search program comes in handy. Eg:
e:\djgpp\src\libc> grep fseek .../*.c
gives the results:
ansi/stdio/filbuf.c: we read here, and reset it to 512 ...
ansi/stdio/fseek.c:fseek(FILE *f, long offset, int ptrname)
ansi/stdio/fsetpos.c: fseek(stream, (long)(*pos), SEEK_SET);
For the FILE structure, check the headers in the include directory
(it is in stdio.h).
Shawn Hargreaves.
- Raw text -