Lines Matching refs:oflags
46 int fd, oldfd, oflags, sflags;
50 if((sflags = _sftype(mode,&oflags,NIL(int*))) == 0)
77 if(f->file >= 0 && (oflags &= (O_TEXT|O_BINARY|O_APPEND)) != 0 )
80 ctl = (ctl & ~(O_TEXT|O_BINARY|O_APPEND)) | oflags;
97 while((fd = sysopenf((char*)file,oflags,SF_CREATMODE)) < 0 && errno == EINTR)
100 while((fd = sysopenf(file,oflags&O_ACCMODE)) < 0 && errno == EINTR)
103 { if((oflags&(O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL) )
107 if(oflags&O_TRUNC ) /* truncate file */
115 else if(oflags&O_CREAT)
118 if((oflags&O_ACCMODE) != O_WRONLY)
121 while((fd = sysopenf(file,oflags&O_ACCMODE)) < 0 &&
148 reg int sflags, oflags, uflag;
154 sflags = oflags = uflag = 0;
159 oflags |= O_WRONLY | O_APPEND | O_CREAT;
162 oflags |= O_BINARY;
170 oflags |= O_RDONLY;
176 oflags |= O_TEXT;
184 oflags |= O_WRONLY | O_CREAT;
186 oflags |= O_TRUNC;
189 oflags |= O_EXCL;
203 if(!(oflags&O_CREAT) )
204 oflags &= ~O_EXCL;
206 if(!(oflags&(O_BINARY|O_TEXT)))
207 oflags |= O_BINARY;
210 oflags = (oflags&~O_ACCMODE)|O_RDWR;
212 *oflagsp = oflags;