/ast/src/lib/libast/comp/ |
H A D | getwd.c | 32 getwd(char* path) argument 34 if (getcwd(path, PATH_MAX)) return(path); 35 strcpy(path, "getwd: error in . or ..");
|
H A D | realpath.c | 45 realpath(const char* file, char* path) argument 47 return resolvepath(file, path, PATH_MAX) > 0 ? path : (char*)0;
|
H A D | ftw.c | 41 return (*ftw_userf)(ftw->path, &ftw->statb, n); 45 ftw(const char* path, int(*userf)(const char*, const struct stat*, int), int depth) argument 49 return ftwalk(path, ftw_user, FTW_DOT, NiL);
|
H A D | gross.c | 44 extern int lstat(const char* path, struct stat* st) argument 47 return __lxstat(_STAT_VER, path, st); 49 return _lxstat(_STAT_VER, path, st); 53 extern int stat(const char* path, struct stat* st) argument 56 return __xstat(_STAT_VER, path, st); 58 return _xstat(_STAT_VER, path, st); 75 extern int lstat64(const char* path, struct stat64* st) argument 78 return __lxstat64(_STAT_VER, path, st); 80 return _lxstat64(_STAT_VER, path, st); 84 extern int stat64(const char* path, struc argument [all...] |
H A D | resolvepath.c | 44 resolvepath(const char* file, char* path, size_t size) argument 62 s = path; 63 else if (!getcwd(path, size - n)) 67 s = path + strlen(path); 70 strlcpy(s, file, size - (s - path)); 71 return (s = pathcanon(path, size, PATH_PHYSICAL|PATH_DOTDOT|PATH_EXISTS)) ? (s - path) : -1;
|
/ast/src/lib/libast/path/ |
H A D | pathstat.c | 33 pathstat(const char* path, struct stat* st) argument 39 if (!stat(path, st)) return(0); 41 return(lstat(path, st)); 43 return(stat(path, st));
|
H A D | pathnative.c | 27 * convert path to native fs representation in <buf,siz> 28 * length of converted path returned 41 pathnative(const char* path, char* buf, size_t siz) argument 43 return uwin_path(path, buf, siz); 53 pathnative(const char* path, char* buf, size_t siz) argument 61 cygwin_conv_to_win32_path(path, tmp); 66 cygwin_conv_to_win32_path(path, buf); 75 pathnative(const char* path, char* buf, size_t siz) argument 80 if (!_fullpath(buf, path, siz)) 86 else if ((n = strlen(path)) < si 98 pathnative(const char* path, char* buf, size_t siz) argument 111 pathnative(const char* path, char* buf, size_t siz) argument [all...] |
H A D | pathposix.c | 27 * convert native path to posix fs representation in <buf,siz> 28 * length of converted path returned 41 pathposix(const char* path, char* buf, size_t siz) argument 43 return uwin_unpath(path, buf, siz); 53 pathposix(const char* path, char* buf, size_t siz) argument 61 cygwin_conv_to_posix_path(path, tmp); 66 cygwin_conv_to_posix_path(path, buf); 75 pathposix(const char* path, char* buf, size_t siz) argument 80 if (!_posixpath(buf, path, siz)) 86 else if ((n = strlen(path)) < si 98 pathposix(const char* path, char *buf, size_t siz) argument 113 pathposix(const char* path, char* buf, size_t siz) argument [all...] |
/ast/src/lib/libast/stdio/ |
H A D | fopen.c | 27 fopen(const char* path, const char* mode) argument 29 return sfopen(NiL, path, mode);
|
H A D | freopen.c | 27 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);
|
/ast/src/cmd/3d/ |
H A D | chdir3d.c | 27 chdir3d(const char* path) argument 33 if (!fscall(NiL, MSG_stat, 0, path, &state.path.st)) 37 if (!S_ISDIR(state.path.st.st_mode)) 51 if (!(sp = pathreal(path, P_SAFE, NiL))) 59 * save absolute path in state.pwd 62 if (*path != '/') 70 strcpy(sp, path); 72 state.path.level = 0; 78 state.level = state.path [all...] |
H A D | creat3d.c | 27 creat3d(const char* path, mode_t mode) argument 29 return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
|
H A D | execv.c | 27 execv(const char* path, char* const argv[]) argument 29 return(execve(path, argv, environ));
|
H A D | statvfs3d.c | 29 statvfs3d(const char* path, struct statvfs* fs) argument 35 if (!fscall(NiL, MSG_statfs, 0, path, fs)) 39 if (!(sp = pathreal(path, 0, NiL))) 45 fscall(mp, MSG_statfs, 0, state.path.name, fs); 48 fscall(mp, MSG_statfs, 0, state.path.name, fs);
|
H A D | access3d.c | 27 access3d(const char* path, int mode) argument 34 if (!fscall(NiL, MSG_stat, 0, path, &st)) 41 if (!(sp = pathreal(path, 0, &st))) 57 if (state.path.level && (st.st_mode&(S_IWUSR|S_IWGRP|S_IWOTH)) && !ACCESS(sp, R_OK))
|
H A D | chown3d.c | 29 chown3d(const char* path, uid_t uid, gid_t gid) argument 37 if (!fscall(NiL, MSG_chown, 0, path, uid, gid)) 41 if (!(sp = pathreal(path, P_SAFE|P_TOP, NiL))) 48 fscall(mp, MSG_chown, 0, path, uid, gid); 51 fscall(mp, MSG_chown, 0, path, uid, gid);
|
H A D | pathconf3d.c | 29 pathconf3d(const char* path, int op) argument 37 if (!fscall(NiL, MSG_pathconf, 0, path, op)) 41 if (!(sp = pathreal(path, 0, NiL)))
|
H A D | readlink3d.c | 27 readlink3d(const char* path, char* buf, register size_t size) argument 35 return(READLINK(path, buf, size)); 37 if (!fscall(NiL, MSG_readlink, 0, path, buf, size)) 41 if (!pathreal(path, P_READLINK, NiL)) 48 if (r = state.path.linksize) 50 if (r > state.path.linksize) 51 r = state.path.linksize; 52 memcpy(buf, state.path.linkname, r); 54 if (mp) fscall(mp, MSG_readlink, r, path, buf, size); 57 fscall(mp, MSG_readlink, r, path, bu [all...] |
H A D | unlink3d.c | 27 unlink3d(register const char* path) argument 34 if (!fscall(NiL, MSG_remove, 0, path)) 38 if (!(sp = pathreal(path, P_PATHONLY|P_SAFE, NiL))) 40 if (state.path.level) 42 if (!(r = LSTAT(sp, &state.path.st))) 44 if (S_ISLNK(state.path.st.st_mode) && !checklink(sp, &state.path.st, P_PATHONLY|P_LSTAT) && state.path.linksize > 0) 60 fscall(mp, MSG_remove, 0, path); 63 fscall(mp, MSG_remove, 0, path); 74 remove(const char* path) argument [all...] |
/ast/src/lib/libast/misc/ |
H A D | procrun.c | 37 procrun(const char* path, char** argv, int flags) argument 46 return pathpath(path, NiL, PATH_REGULAR|PATH_EXECUTE, buf, sizeof(buf)) ? 0 : -1; 48 return procclose(procopen(path, argv, NiL, NiL, flags|PROC_FOREGROUND|PROC_GID|PROC_UID));
|
/ast/src/lib/libast/preroot/ |
H A D | realopen.c | 25 * disable preroot and open path relative to the real root 34 realopen(const char* path, int mode, int perm) argument 38 if (*path != '/' || !ispreroot(NiL)) return(-1); 39 strcopy(strcopy(buf, PR_REAL), path);
|
/ast/src/lib/librecsort/ |
H A D | rsfile.c | 24 * announce sp open for write on path 28 int rsfilewrite(Rs_t* rs, Sfio_t* sp, const char* path) argument 30 int rsfilewrite(rs, sp, path) 33 char* path; 36 if ((rs->events & RS_FILE_WRITE) && rsnotify(rs, RS_FILE_WRITE, sp, (Void_t*)path, rs->disc) < 0) 42 * announce sp open for read on path 46 int rsfileread(Rs_t* rs, Sfio_t* sp, const char* path) argument 48 int rsfileread(rs, sp, path) 51 char* path; 54 if ((rs->events & RS_FILE_READ) && rsnotify(rs, RS_FILE_READ, sp, (Void_t*)path, r [all...] |
/ast/src/lib/libast/port/ |
H A D | touch.c | 46 touch(const char* path, time_t at, time_t mt, int flags) argument 73 return tvtouch(path, ap, mp, NiL, flags & 1);
|
/ast/src/lib/libcoshell/ |
H A D | procrun.c | 33 coprocrun(const char* path, char** argv, int flags) argument 41 return procclose(procopen(path, a, NiL, NiL, PROC_FOREGROUND|PROC_GID|PROC_UID|flags)); 44 sfputr(tmp, path ? path : "sh", -1);
|
/ast/src/lib/libdll/ |
H A D | dllcheck.c | 31 * path!=0 enables library level diagnostics 35 dllversion(void* dll, const char* path) argument 41 if (path) 45 errorf("dll", NiL, 1, "dllversion: %s: %s", path, state.errorbuf); 51 * check if dll on path has plugin version >= ver 53 * path!=0 enables library level diagnostics 58 dllcheck(void* dll, const char* path, unsigned long ver, unsigned long* cur) argument 65 v = dllversion(dll, path); 75 if (path) 79 errorf("dll", NiL, 1, "dllcheck: %s: %s", path, stat [all...] |