/*
** vbcc-Amiga-PowerPC version of ftell.c
**
** v0.1 04.10.97 phx
*/

#include <stdio.h>
#include <powerup/gcclib/powerup_protos.h>

long ftell(FILE *f)
{
    long offset;
    offset=PPCSeek((BPTR)f->filehandle,0L,0L);
    if(f->flags&_READ) offset-=f->count;
    if(f->flags&_WRITE) offset+=f->bufsize-f->count;
    return(offset);
}

