home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / vbcc / machines / amiga68k / libsrc / stdio / ftell.c < prev    next >
Encoding:
C/C++ Source or Header  |  1998-06-24  |  244 b   |  14 lines

  1. #include <stdio.h>
  2.  
  3. #include <proto/dos.h>
  4.  
  5. long ftell(FILE *f)
  6. {
  7.     long offset;
  8.     offset=Seek((BPTR)f->filehandle,0L,0L);
  9.     if(f->flags&_READ) offset-=f->count;
  10.     if(f->flags&_WRITE) offset+=f->bufsize-f->count;
  11.     return(offset);
  12. }
  13.  
  14.