Searched refs:mode (Results 1 - 25 of 283) sorted by relevance

1234567891011>>

/ast/src/lib/libast/stdio/
H A D_stdopen.c29 _stdopen(int fd, const char* mode) argument
31 return fdopen(fd, mode);
H A Dfopen.c27 fopen(const char* path, const char* mode) argument
29 return sfopen(NiL, path, mode);
H A Dpopen.c27 popen(const char* cmd, const char* mode) argument
29 return sfpopen((Sfio_t*)(-1), cmd, mode);
H A Dfreopen.c27 freopen(const char* path, const char* mode, Sfio_t* f) argument
29 STDIO_PTR(f, "freopen", Sfio_t*, (const char*, const char*, Sfio_t*), (path, mode, f))
31 return sfopen(f, path, mode);
H A Dfdopen.c27 fdopen(int fd, const char* mode) argument
31 if (fd < 0 || !(flags = _sftype(mode, NiL, NiL, NiL)))
H A Dfwide.c27 fwide(Sfio_t* f, int mode) argument
29 STDIO_INT(f, "fwide", int, (Sfio_t*, int), (f, mode))
31 if (mode > 0)
36 else if (mode < 0)
H A Dfmemopen.c27 fmemopen(void* buf, size_t size, const char* mode) argument
29 STDIO_PTR(0, "fmemopen", Sfio_t*, (void*, size_t, const char*), (buf, size, mode))
31 return sfnew(NiL, buf, size, -1, SF_STRING|_sftype(mode, NiL, NiL, NiL));
/ast/src/cmd/3d/
H A Dcreat3d.c27 creat3d(const char* path, mode_t mode) argument
29 return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
H A Daccess3d.c27 access3d(const char* path, int mode) argument
48 switch (mode)
68 return(ACCESS(sp, mode));
75 if (mode & (R_OK|W_OK|X_OK))
80 if (mode & R_OK) test |= S_IRUSR;
81 if (mode & W_OK) test |= S_IWUSR;
82 if (mode & X_OK) test |= S_IXUSR;
86 if (mode & R_OK) test |= S_IRGRP;
87 if (mode & W_OK) test |= S_IWGRP;
88 if (mode
[all...]
H A Dfchmod3d.c29 fchmod3d(int fd, mode_t mode) argument
34 if (!fscall(NiL, MSG_fchmod, 0, fd, mode))
38 if (FCHMOD(fd, mode))
42 fscall(mp, MSG_fchmod, 0, fd, mode);
45 fscall(mp, MSG_fchmod, 0, fd, mode);
/ast/src/cmd/INIT/
H A Dmkdir.sh24 mode=
29 1) echo "mkdir: -m: mode argument expected" >&2
34 mode=$1
36 -m*) mode=`echo X$1 | sed 's/X-m//'`
58 if test "" != "$mode"
59 then $CHMOD "$mode" "$dir" || exit 1
66 if test "" != "$mode"
67 then $CHMOD "$mode" "$dir" || exit 1
74 if test "" != "$mode"
76 do $CHMOD "$mode" "
[all...]
/ast/src/lib/libast/sfio/
H A Dsfopen.c31 Sfio_t* sfopen(Sfio_t* f, const char* file, const char* mode) argument
33 Sfio_t* sfopen(f,file,mode)
36 reg char* mode; /* mode of the stream */
39 return _sfopen(f, file, mode);
H A Dsftell.c36 reg int mode; local
42 /* set the stream to the right mode */
43 if((mode = f->mode&SF_RDWR) != (int)f->mode && _sfmode(f,mode,0) < 0)
56 else p = f->here + ((f->mode&SF_WRITE) ? f->next-f->data : f->next-f->endb);
H A Dsfwalk.c43 if(sfstdin->mode & SF_INIT)
44 _sfmode(sfstdin, (sfstdin->mode & SF_RDWR), 0);
45 if(sfstdout->mode & SF_INIT)
46 _sfmode(sfstdout, (sfstdout->mode & SF_RDWR), 0);
47 if(sfstderr->mode & SF_INIT)
48 _sfmode(sfstderr, (sfstderr->mode & SF_RDWR), 0);
H A Dsfclrlock.c41 if(f && (f->mode&SF_AVAIL))
50 if(f->mode&SF_PKRD)
58 f->mode &= (SF_RDWR|SF_INIT|SF_POOL|SF_PUSH|SF_SYNCED|SF_STDIO);
60 rv = (f->mode&SF_PUSH) ? 0 : (f->flags&SF_FLAGS);
H A Dsfpeek.c43 reg int mode; local
47 { if(f->mode&SF_INIT)
65 if(!(mode = f->flags&SF_READ) )
66 mode = SF_WRITE;
67 if((int)f->mode != mode && _sfmode(f,mode,0) < 0)
78 { f->mode |= SF_PEEK;
/ast/src/lib/libast/vmalloc/
H A Dvmset.c44 int mode; local
48 return vd->mode;
52 mode = vd->mode;
54 vd->mode |= (flags&VM_FLAGS);
55 else vd->mode &= ~(flags&VM_FLAGS);
59 return mode;
/ast/src/lib/libast/comp/
H A Dmknod.c40 mknod(const char* path, mode_t mode, dev_t dev)
42 if (S_ISFIFO(mode))
43 return mkfifo(path, mode);
44 if (S_ISDIR(mode))
45 return mkdir(path, mode);
H A Dcreat64.c33 creat64(const char* path, mode_t mode)
35 return open64(path, O_WRONLY|O_CREAT|O_TRUNC, mode);
H A Deaccess.c52 register int mode;
73 mode = 0;
83 mode |= S_IRUSR;
85 mode |= S_IWUSR;
87 mode |= S_IXUSR;
95 mode |= S_IRGRP;
97 mode |= S_IWGRP;
99 mode |= S_IXGRP;
124 mode |= S_IROTH;
126 mode |
[all...]
H A Dmkfifo.c40 mkfifo(const char* path, mode_t mode)
43 return mknod(path, S_IFIFO|(mode & ~S_IFMT), 0);
/ast/src/lib/libast/string/
H A Dfmtmode.c27 * return ls -l style file mode string given file mode bits
28 * if external!=0 then mode is modex canonical
34 fmtmode(register int mode, int external) argument
41 mode = modex(mode);
44 *s++ = p->name[((mode & p->mask1) >> p->shift1) | ((mode & p->mask2) >> p->shift2)];
H A Dstrmode.c27 * return modex canonical representation of file mode bits
28 * given ls -l style file mode string
39 int mode; local
41 mode = 0;
47 mode |= (p->mask1 & (c << p->shift1)) | (p->mask2 & (c << p->shift2));
50 return(mode);
/ast/src/lib/libcmd/
H A Dwc.c74 static void printout(register Wc_t *wp, register char *name,register int mode) argument
76 if (mode&WC_LINES)
78 if (mode&WC_WORDS)
80 if (mode&WC_CHARS)
82 if (mode&WC_LONGEST)
93 register int mode=0, n; local
105 mode |= WC_CHARS;
108 mode |= WC_LINES;
111 mode |= WC_LONGEST;
115 mode |
[all...]
/ast/src/lib/libast/preroot/
H A Drealopen.c34 realopen(const char* path, int mode, int perm) argument
40 return(open(buf, mode, perm));

Completed in 67 milliseconds

1234567891011>>