Lines Matching refs:flags
24 /* Set some control flags or file descript for the stream
30 int sfset(Sfio_t* f, int flags, int set)
32 int sfset(f,flags,set)
34 int flags;
43 if(flags == 0 && set == 0)
44 SFMTXRETURN(f, (f->flags&SF_FLAGS));
49 if(flags == 0)
50 SFMTXRETURN(f, (f->flags&SF_FLAGS));
55 oflags = f->flags;
56 if(!(f->bits&SF_BOTH) || (flags&SF_RDWR) == SF_RDWR )
57 flags &= ~SF_RDWR;
61 f->flags |= (flags&SF_SETS);
62 else f->flags &= ~(flags&SF_SETS);
65 if(!(f->flags&SF_RDWR))
66 f->flags |= (oflags&SF_RDWR);
69 f->flags &= ~SF_APPENDWR;
72 if((flags &= SF_RDWR) )
74 { if(flags == SF_READ)
75 flags = SF_WRITE;
76 else flags = SF_READ;
78 if((flags == SF_WRITE && !(f->mode&SF_WRITE)) ||
79 (flags == SF_READ && !(f->mode&(SF_READ|SF_SYNCED))) )
80 (void)_sfmode(f,flags,1);
84 if(!(f->flags&SF_SHARE) || f->extent < 0)
85 f->flags &= ~SF_PUBLIC;