File:  [Research Unix] / researchv10no / cmd / prefer / pref / libpath.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

/*
 * libpath - calculate path to prefer library
 *
 * Alan Hastings 4/13/87
 *
 * Added for EXPTOOLS support
 */

char *libpath(deflib)
char *deflib;
{
	register char *retval;
	char *malloc(), *getenv(), *strcpy(), *strcat();

	if ((retval = getenv("PHOME")) != (char *)0)
		return retval;

#ifdef EXPTOOLS
# define PREFLIB "/lib/prefer"
	if ((retval = getenv("TOOLS")) != (char *)0)
	{
		char *libuf;

		libuf = malloc((unsigned)(strlen(retval)+sizeof(PREFLIB)+1));
		(void) strcpy(libuf, retval);
		(void) strcat(libuf, PREFLIB);
		return libuf;
	}
#endif /* EXPTOOLS */

	return deflib;
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.