Lines Matching defs:mode

487 				int mode = ((struct checkpt*)shp->jmplist)->mode;
490 ((struct checkpt*)shp->jmplist)->mode = 0;
496 ((struct checkpt*)shp->jmplist)->mode = mode;
599 ((struct checkpt*)shp->jmplist)->mode = SH_JMPERREXIT;
737 mode_t mode;
741 mode = (flags & O_CREAT) ? va_arg(ap, int) : 0;
816 if((mode=sh_iocheckfd(shp,fd))==IOCLOSE)
819 if(!(mode&IOWRITE) && ((flags==O_WRONLY) || (flags==O_RDWR)))
821 if(!(mode&IOREAD) && ((flags==O_RDONLY) || (flags==O_RDWR)))
836 while((fd = open(path, flags, mode)) < 0)
843 mode = IOWRITE;
845 mode = (IOREAD|IOWRITE);
847 mode = IOREAD;
851 shp->fdstatus[fd] = mode;
1069 static char *io_usename(char *name, int *perm, int mode)
1074 if(mode==0)
1106 switch(mode)
1131 int o_mode; /* mode flag for open */
1656 ((struct checkpt*)shp->jmplist)->mode = SH_JMPERREXIT;
1790 * <mode> is the same as for access()
1792 int sh_ioaccess(int fd,register int mode)
1796 if(mode==X_OK)
1800 if(mode==F_OK)
1802 if(mode==R_OK && (flags&IOREAD))
1804 if(mode==W_OK && (flags&IOWRITE))
1884 ((struct checkpt*)shp->jmplist)->mode = SH_JMPEXIT;
2111 * disabled it. Not needed with edit mode
2113 int mode = LFLUSHO;
2114 ioctl(sffileno(sfstderr),TIOCLBIC,&mode);
2158 static int pipeexcept(Sfio_t* iop, int mode, void *data, Sfdisc_t* handle)
2160 if(mode==SF_DPOP || mode==SF_FINAL)
2162 else if(mode==SF_WRITE && errno==EPIPE)
2178 register int mode;
2206 mode = sfset(sp,0,0);
2219 flag = (mode&SF_WRITE)?IOWRITE:0;
2220 if(mode&SF_READ)
2225 if((pp=(struct checkpt*)shp->jmplist) && pp->mode==SH_JMPCMD)
2378 static int subexcept(Sfio_t* sp,register int mode, void *data, Sfdisc_t* handle)
2381 if(mode==SF_CLOSING)
2386 else if(disp && (mode==SF_DPOP || mode==SF_FINAL))
2392 else if (mode==SF_ATEXIT)
2398 else if(mode==SF_READ)
2572 * give file descriptor <fd> and <mode>, return an iostream pointer
2573 * <mode> must be SF_READ or SF_WRITE
2578 Sfio_t *sh_iogetiop(int fd, int mode)
2583 if(mode!=SF_READ && mode!=SF_WRITE)
2596 if(mode==SF_WRITE)
2612 if(mode==SF_WRITE && !(n&IOWRITE))
2614 if(mode==SF_READ && !(n&IOREAD))