vx32

Local 9vx git repository for patches.
git clone git://r-36.net/vx32
Log | Files | Refs

fseek.c (241B)


      1 #include <stdio.h>
      2 #include <unistd.h>
      3 
      4 int fseek(FILE *f, long offset, int whence)
      5 {
      6 	fflush(f);
      7 	long off = lseek(f->fd, offset, whence);
      8 	if (off < 0)
      9 		return -1;
     10 	f->ipos = 0;
     11 	f->ilim = 0;
     12 	f->ioffset = off;
     13 	f->opos = 0;
     14 	return 0;
     15 }