|
|
1.1 ! root 1: /* (-lgl ! 2: * COHERENT Version 3.0 ! 3: * Copyright (c) 1982, 1993 by Mark Williams Company. ! 4: * All rights reserved. May not be copied without permission. ! 5: -lgl) */ ! 6: /* ! 7: * Path lookup. ! 8: * ! 9: * Path takes a path search list, a file name, and an access mode, ! 10: * and searches each directory in the path list ! 11: * for a file with the given name and access mode. ! 12: * The constructed pathname, which is kept in a static buffer, ! 13: * is returned on success. ! 14: * NULL is returned if either pointer argument is NULL, ! 15: * or if the search failed. ! 16: */ ! 17: #ifndef __PATH_H__ ! 18: #define __PATH_H__ ! 19: ! 20: #include <common/feature.h> ! 21: #include <unistd.h> ! 22: ! 23: #if __COHERENT__ ! 24: #define PATHSEP '/' /* Path name component separator */ ! 25: #define PATHSEPSTRING "/" ! 26: #define LISTSEP ':' /* Search list component separator */ ! 27: #define DEFPATH ":/bin:/usr/bin" ! 28: #define DEFLIBPATH "/lib:/usr/lib" ! 29: #define DEFSHELL "sh" ! 30: #endif ! 31: #if GEMDOS ! 32: #define PATHSEP '\\' ! 33: #define PATHSEPSTRING "\\" ! 34: #define LISTSEP ',' ! 35: #define DEFPATH ",\\bin,\\usr\\bin" ! 36: #define DEFLIBPATH "\\lib,,\\usr\\lib" ! 37: #define DEFSHELL "msh.prg" ! 38: #endif ! 39: #if MSDOS ! 40: #define PATHSEP '\\' ! 41: #define PATHSEPSTRING "\\" ! 42: #define LISTSEP ';' ! 43: #define DEFPATH ";\\bin;\\usr\\bin" ! 44: #define DEFLIBPATH "\\lib;\\usr\\lib" ! 45: #define DEFSHELL "steve where are you" ! 46: #endif ! 47: #define MAXPATH 128 /* Size of static pathname buffer */ ! 48: extern char *path(); /* (char *path, *file; int mode) */ ! 49: ! 50: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.