head 1.1; branch 1.1.1; access; symbols SFIO_1999:1.1.1.1 SFIO_1998:1.1.1.1 SFIO_1997:1.1.1.1 ATT:1.1.1; locks; strict; comment @ * @; 1.1 date 96.11.21.20.58.03; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 96.11.21.20.58.03; author rse; state Exp; branches; next ; desc @@ 1.1 log @Initial revision @ text @#define _in_flsbuf 1 #include "sfstdio.h" /* Flush output buffer. ** Written by Kiem-Phong Vo */ FLSBUF(c,f) { reg Sfio_t* sf; if(!(sf = _sfstream(f))) return -1; _stdclrerr(f,sf); if(sfputc(sf,c) < 0) { _stderr(f); return -1; } if(!(sf->flags&SF_LINE)) { /* fast access to buffer for putc benefit */ #if _FILE_writeptr f->std_writeptr = sf->next; f->std_writeend = sf->endb; #endif #if _FILE_readptr f->std_readptr = f->std_readend = NIL(uchar*); #endif #if _FILE_ptr || _FILE_p f->std_ptr = sf->next; #endif #if _FILE_cnt f->std_cnt = sf->endb - sf->next; #endif #if _FILE_w f->std_w = sf->endb - sf->next; #endif #if _FILE_r f->std_r = 0; #endif #if _FILE_writeptr || _FILE_cnt || _FILE_w /* internal protection against mixing of sfio/stdio */ _Sfstdio = _sfstdio; sf->mode |= SF_STDIO; sf->endr = sf->endw = sf->data; #endif } return c; } @ 1.1.1.1 log @Import of Sfio1997 @ text @@