head 1.1; branch 1.1.1; access; symbols SFIO_1999:1.1.1.2 SFIO_1998:1.1.1.1 SFIO_1997:1.1.1.1 ATT:1.1.1; locks; strict; comment @ * @; 1.1 date 96.11.28.00.50.32; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 96.11.28.00.50.32; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 99.07.27.18.14.08; author rse; state Exp; branches; next ; desc @@ 1.1 log @Initial revision @ text @#include "sfstdio.h" /* Reposition stream IO pointer ** Written by Kiem-Phong Vo */ #if __STD_C int fseek(reg FILE* fp, long offset, int whence) #else int fseek(fp,offset,whence) reg FILE* fp; reg long offset; reg int whence; #endif { reg Sfio_t* sp; if(!(sp = _sfstream(fp))) return -1; _stdclrerr(fp,sp); /* ready for either read or write */ #if _FILE_cnt fp->std_cnt = 0; #endif #if _FILE_r fp->std_r = 0; #endif #if _FILE_w fp->std_w = 0; #endif #if _FILE_readptr fp->std_readptr = fp->std_readend = NIL(uchar*); #endif #if _FILE_writeptr fp->std_writeptr = fp->std_writeend = NIL(uchar*); #endif return sfseek(sp,(Sfoff_t)offset,whence) < 0L ? -1 : 0; } @ 1.1.1.1 log @Import of Sfio1997 @ text @@ 1.1.1.2 log @Import of Sfio1999 @ text @d40 1 a40 5 #if _xopen_stdio return sfseek(sp, (Sfoff_t)offset, whence|SF_SHARE) < (Sfoff_t)0 ? -1 : 0; #else return sfseek(sp, (Sfoff_t)offset, whence) < (Sfoff_t)0 ? -1 : 0; #endif @