Return to glob.c CVS log | Up to [local] / OpenXM_contrib2 / asir2000 / parse |
version 1.78, 2010/08/01 08:44:15 | version 1.79, 2010/08/03 04:34:44 | ||
---|---|---|---|
|
|
||
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, | * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, | ||
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. | * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. | ||
* | * | ||
* $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.77 2010/05/26 06:32:49 noro Exp $ | * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.78 2010/08/01 08:44:15 ohara Exp $ | ||
*/ | */ | ||
#include "ca.h" | #include "ca.h" | ||
#include "al.h" | #include "al.h" | ||
|
|
||
void cppname_init() | void cppname_init() | ||
{ | { | ||
#if !defined(VISUAL) | #if !defined(VISUAL) | ||
char oxcpp[BUFSIZ]; | char *oxhome; | ||
if(which("ox_cpp", getenv("PATH"), oxcpp, BUFSIZ) && access(oxcpp, X_OK&R_OK) == 0) { | char oxcpp[BUFSIZ]; | ||
strncpy(cppname,oxcpp,BUFSIZ-1); | #define OXCPP "/bin/ox_cpp" | ||
}else if (access(cppname, X_OK&R_OK) != 0) { | |||
if ( oxhome = getenv("OpenXM_HOME") ) { | |||
if ( strlen(oxhome)+strlen(OXCPP)<BUFSIZ ) { | |||
sprintf(oxcpp,"%s%s",oxhome,OXCPP); | |||
if ( access(oxcpp,X_OK&R_OK) == 0 ) { | |||
strcpy(cppname,oxcpp); | |||
return; | |||
} | |||
} | |||
} | |||
if (access(cppname, X_OK&R_OK) != 0) { | |||
which("cpp", "/lib:/usr/ccs/lib:/usr/bin", cppname, BUFSIZ) || | which("cpp", "/lib:/usr/ccs/lib:/usr/bin", cppname, BUFSIZ) || | ||
which("cpp", getenv("PATH"), cppname, BUFSIZ); | which("cpp", getenv("PATH"), cppname, BUFSIZ); | ||
} | } |