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.20.01.33.58; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 96.11.20.01.33.58; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 99.07.27.18.14.00; author rse; state Exp; branches; next ; desc @@ 1.1 log @Initial revision @ text @#include "sfstdio.h" /* Flushing buffered output data. ** This has been modified to work with both input&output streams. ** Written by Kiem-Phong Vo. */ #if __STD_C int fflush(reg FILE* fp) #else int fflush(fp) reg FILE* fp; #endif { reg Sfio_t* sp; if(!fp) return sfsync(NIL(Sfio_t*)); if(!(sp = _sfstream(fp))) return -1; _stdclrerr(fp,sp); return sfsync(sp); } @ 1.1.1.1 log @Import of Sfio1997 @ text @@ 1.1.1.2 log @Import of Sfio1999 @ text @d22 1 a22 10 #if _xopen_stdio (void)sfseek(sp, (Sfoff_t)0, SEEK_CUR|SF_PUBLIC); #else (void)sfseek(sp, (Sfoff_t)0, SEEK_CUR); #endif if(sfsync(sp) < 0 || sfpurge(sp) < 0) return -1; else return 0; @