# $Id: dynpaths.m,v 1.3 2008/12/09 15:52:54 ksb Exp $ require "util_fsearch.m" augment char* named "pcIostat" { before 'pcIostat = findInPath(%D/iostat/qv);' } augment char* named "pcOpPath" { before 'pcOpPath = findInPath(%K?qv);' } augment char* named "pcVxPath" { before 'pcVxPath = findInPath(%K?qv);' } %c /* find the full path to this prog in $PATH */ char * findInPath(pcprog) char *pcprog; { char *apcprog[2]; char *pcRet; apcprog[0] = pcprog; apcprog[1] = (char*) 0; pcRet = util_fsearch(apcprog, getenv("PATH")); if((char *) 0 == pcRet) pcRet = strdup("false"); return pcRet; }