=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/load.c,v retrieving revision 1.13 retrieving revision 1.16 diff -u -p -r1.13 -r1.16 --- OpenXM_contrib2/asir2000/parse/load.c 2004/03/05 08:45:49 1.13 +++ OpenXM_contrib2/asir2000/parse/load.c 2005/03/24 22:54:22 1.16 @@ -45,7 +45,7 @@ * DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, * PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. * - * $OpenXM: OpenXM_contrib2/asir2000/parse/load.c,v 1.12 2004/03/05 08:34:43 noro Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/load.c,v 1.15 2005/03/24 12:46:45 takayama Exp $ */ #include "ca.h" #include "parse.h" @@ -79,7 +79,7 @@ #define MALLOC(x) GC_malloc((x)+4) #endif -char *ASIRLOADPATH[32]; +char **ASIRLOADPATH; #if defined(VISUAL) #define ENVDELIM ';' @@ -121,7 +121,10 @@ char *search_executable(char *name) if ( len+nlen+1 >= BUFSIZ ) continue; sprintf(path,"%s/%s",dir,name); if ( !stat(path,&buf) && !(buf.st_mode & S_IFDIR) - && !access(path,X_OK) ) { +#if !defined(VISUAL) + && !access(path,X_OK) +#endif + ) { len = strlen(path)+1; ret = (char *)MALLOC(len); strcpy(ret,path); @@ -171,9 +174,18 @@ void env_init() { strcpy(asir_pager,MORE); } } - if ( e = getenv("ASIRLOADPATH" ) ) + if ( e = getenv("ASIRLOADPATH" ) ) { for ( i = 0; ; i++, e = p+1 ) { p = (char *)index(e,ENVDELIM); + if ( !p ) + break; + } + i += 3; + ASIRLOADPATH=(char **)MALLOC(sizeof(char *)*i); + for ( l = 0; l