|
|
1.1 root 1: /* (-lgl
2: * COHERENT Version 3.0
3: * Copyright (c) 1982, 1990 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: #include <access.h>
18: #if COHERENT
19: #define PATHSEP '/' /* Path name component separator */
20: #define PATHSEPSTRING "/"
21: #define LISTSEP ':' /* Search list component separator */
22: #define DEFPATH ":/bin:/usr/bin"
23: #define DEFLIBPATH "/lib:/usr/lib"
24: #define DEFSHELL "sh"
25: #endif
26: #if GEMDOS
27: #define PATHSEP '\\'
28: #define PATHSEPSTRING "\\"
29: #define LISTSEP ','
30: #define DEFPATH ",\\bin,\\usr\\bin"
31: #define DEFLIBPATH "\\lib,,\\usr\\lib"
32: #define DEFSHELL "msh.prg"
33: #endif
34: #if MSDOS
35: #define PATHSEP '\\'
36: #define PATHSEPSTRING "\\"
37: #define LISTSEP ';'
38: #define DEFPATH ";\\bin;\\usr\\bin"
39: #define DEFLIBPATH "\\lib;\\usr\\lib"
40: #define DEFSHELL "steve where are you"
41: #endif
42: #define MAXPATH 128 /* Size of static pathname buffer */
43: extern char *path(); /* (char *path, *file; int mode) */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.