Lines Matching refs:mode

444 				int mode = ((struct checkpt*)sh.jmplist)->mode;
447 ((struct checkpt*)sh.jmplist)->mode = 0;
453 ((struct checkpt*)sh.jmplist)->mode = mode;
552 ((struct checkpt*)shp->jmplist)->mode = SH_JMPERREXIT;
669 mode_t mode;
673 mode = (flags & O_CREAT) ? va_arg(ap, int) : 0;
737 if((mode=sh_iocheckfd(shp,fd))==IOCLOSE)
740 if(!(mode&IOWRITE) && ((flags==O_WRONLY) || (flags==O_RDWR)))
742 if(!(mode&IOREAD) && ((flags==O_RDONLY) || (flags==O_RDWR)))
757 while((fd = open(path, flags, mode)) < 0)
764 mode = IOWRITE;
766 mode = (IOREAD|IOWRITE);
768 mode = IOREAD;
769 sh.fdstatus[fd] = mode;
911 static char *io_usename(char *name, int *perm, int mode)
916 if(mode==0)
941 switch(mode)
966 int o_mode; /* mode flag for open */
1469 ((struct checkpt*)shp->jmplist)->mode = SH_JMPERREXIT;
1585 * <mode> is the same as for access()
1587 int sh_ioaccess(int fd,register int mode)
1591 if(mode==X_OK)
1595 if(mode==F_OK)
1597 if(mode==R_OK && (flags&IOREAD))
1599 if(mode==W_OK && (flags&IOWRITE))
1673 ((struct checkpt*)sh.jmplist)->mode = SH_JMPEXIT;
1886 * disabled it. Not needed with edit mode
1888 int mode = LFLUSHO;
1889 ioctl(sffileno(sfstderr),TIOCLBIC,&mode);
1933 static int pipeexcept(Sfio_t* iop, int mode, void *data, Sfdisc_t* handle)
1936 if(mode==SF_DPOP || mode==SF_FINAL)
1938 else if(mode==SF_WRITE && errno==EINTR && sh.lastsig==SIGPIPE)
1951 register int mode;
1979 mode = sfset(sp,0,0);
1992 flag = (mode&SF_WRITE)?IOWRITE:0;
1993 if(mode&SF_READ)
1998 if((pp=(struct checkpt*)shp->jmplist) && pp->mode==SH_JMPCMD)
2146 static int subexcept(Sfio_t* sp,register int mode, void *data, Sfdisc_t* handle)
2149 if(mode==SF_CLOSING)
2154 else if(disp && (mode==SF_DPOP || mode==SF_FINAL))
2160 else if (mode==SF_ATEXIT)
2166 else if(mode==SF_READ)
2321 * give file descriptor <fd> and <mode>, return an iostream pointer
2322 * <mode> must be SF_READ or SF_WRITE
2327 Sfio_t *sh_iogetiop(int fd, int mode)
2332 if(mode!=SF_READ && mode!=SF_WRITE)
2345 if(mode==SF_WRITE)
2361 if(mode==SF_WRITE && !(n&IOWRITE))
2363 if(mode==SF_READ && !(n&IOREAD))