pathpath.c revision 1
1N/A/*********************************************************************** 1N/A* This software is part of the ast package * 1N/A* Copyright (c) 1985-2011 AT&T Intellectual Property * 1N/A* and is licensed under the * 1N/A* Common Public License, Version 1.0 * 1N/A* by AT&T Intellectual Property * 1N/A* A copy of the License is available at * 1N/A* (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) * 1N/A* Information and Software Systems Research * 1N/A* Glenn Fowler <gsf@research.att.com> * 1N/A* David Korn <dgk@research.att.com> * 1N/A* Phong Vo <kpv@research.att.com> * 1N/A***********************************************************************/ 1N/A * return full path to p with mode access using $PATH 1N/A * a!=0 enables related root search 1N/A * a!=0 && a!="" searches a dir first 1N/A * the related root must have a bin subdir 1N/A * p==0 sets the cached relative dir to a 1N/A * full path returned in path buffer 1N/A * if path==0 then the space is malloc'd 1N/A else if (s = (
char*)a)