head 1.1; branch 1.1.1; access; symbols SFIO_1999:1.1.1.2 SFIO_1998:1.1.1.2 SFIO_1997:1.1.1.1 ATT:1.1.1; locks; strict; comment @ * @; 1.1 date 96.11.02.13.31.02; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 96.11.02.13.31.02; author rse; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 97.07.16.12.55.21; author rse; state Exp; branches; next ; desc @@ 1.1 log @Initial revision @ text @#include "sfhdr.h" #include "stdio.h" /* Stdio function setvbuf() ** ** Written by Kiem-Phong Vo (12/10/90) */ #if __STD_C int _stdsetvbuf(Sfio_t* f, char* buf, int type, size_t size) #else int _stdsetvbuf(f,buf,type,size) Sfio_t* f; char* buf; int type; size_t size; #endif { if(type == _IOLBF) sfset(f,SF_LINE,1); else if((f->flags&SF_STRING)) return -1; else if(type == _IONBF) { sfsync(f); sfsetbuf(f,NIL(Void_t*),0); } else if(type == _IOFBF) { if(size == 0) size = SF_BUFSIZE; sfsync(f); sfsetbuf(f,(Void_t*)buf,size); } return 0; } @ 1.1.1.1 log @Import of Sfio1997 @ text @@ 1.1.1.2 log @Import of Sfio1998 @ text @a25 1 sfset(f,SF_LINE,0); a31 1 sfset(f,SF_LINE,0); @