home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EuroCD 3
/
EuroCD 3.iso
/
Programming
/
vbcc
/
machines
/
amiga68k
/
libsrc
/
stdio
/
ftell.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1998-06-24
|
244 b
|
14 lines
#include <stdio.h>
#include <proto/dos.h>
long ftell(FILE *f)
{
long offset;
offset=Seek((BPTR)f->filehandle,0L,0L);
if(f->flags&_READ) offset-=f->count;
if(f->flags&_WRITE) offset+=f->bufsize-f->count;
return(offset);
}