|
|
1.1 root 1: /*
2: * libpath - calculate path to prefer library
3: *
4: * Alan Hastings 4/13/87
5: *
6: * Added for EXPTOOLS support
7: */
8:
9: char *libpath(deflib)
10: char *deflib;
11: {
12: register char *retval;
13: char *malloc(), *getenv(), *strcpy(), *strcat();
14:
15: if ((retval = getenv("PHOME")) != (char *)0)
16: return retval;
17:
18: #ifdef EXPTOOLS
19: # define PREFLIB "/lib/prefer"
20: if ((retval = getenv("TOOLS")) != (char *)0)
21: {
22: char *libuf;
23:
24: libuf = malloc((unsigned)(strlen(retval)+sizeof(PREFLIB)+1));
25: (void) strcpy(libuf, retval);
26: (void) strcat(libuf, PREFLIB);
27: return libuf;
28: }
29: #endif /* EXPTOOLS */
30:
31: return deflib;
32: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.