version 1.16, 2005/03/24 22:54:22 |
version 1.18, 2005/03/28 09:20:38 |
|
|
* 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/load.c,v 1.15 2005/03/24 12:46:45 takayama Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/load.c,v 1.17 2005/03/24 23:40:50 takayama Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 90 char **ASIRLOADPATH; |
|
Line 90 char **ASIRLOADPATH; |
|
#endif |
#endif |
|
|
#ifndef ASIR_LIBDIR |
#ifndef ASIR_LIBDIR |
#define ASIR_LIBDIR "." |
#define ASIR_LIBDIR "/usr/local/lib/asir" |
#endif |
#endif |
|
#ifndef ASIR_CONTRIB_DIR |
|
#define ASIR_CONTRIB_DIR "/usr/local/lib/asir-contrib" |
|
#endif |
|
|
char *getenv(); |
char *getenv(); |
void Pget_rootdir(); |
void Pget_rootdir(); |
char *search_executable(char *name); |
char *search_executable(char *name); |
|
|
extern char *asir_libdir; |
extern char *asir_libdir; |
|
extern char *asir_contrib_dir; |
extern char *asir_pager; |
extern char *asir_pager; |
extern int read_exec_file; |
extern int read_exec_file; |
extern int main_parser; |
extern int main_parser; |
Line 156 void env_init() { |
|
Line 160 void env_init() { |
|
#endif |
#endif |
} |
} |
} |
} |
|
|
|
if ( !(asir_contrib_dir = getenv("ASIR_CONTRIB_DIR")) ) { |
|
if ( oxhome = getenv("OpenXM_HOME") ) { |
|
asir_contrib_dir = (char *)malloc(strlen(oxhome)+strlen("/lib/asir-contrib")+1); |
|
sprintf(asir_contrib_dir,"%s/lib/asir-contrib",oxhome); |
|
} else { |
|
#if defined(VISUAL) |
|
get_rootdir(rootname,sizeof(rootname)); |
|
asir_contrib_dir = (char *)malloc(strlen(rootname)+strlen("/lib-asir-contrib")+1); |
|
sprintf(asir_contrib_dir,"%s/lib-asir-contrib",rootname); |
|
#else |
|
asir_contrib_dir = (char *)malloc(strlen(ASIR_CONTRIB_DIR)+1); |
|
strcpy(asir_contrib_dir,ASIR_CONTRIB_DIR); |
|
#endif |
|
} |
|
} |
|
|
if ( !(asir_pager = getenv("PAGER")) ) { |
if ( !(asir_pager = getenv("PAGER")) ) { |
japanese = 0; |
japanese = 0; |
if ( (e = getenv("LANGUAGE")) && |
if ( (e = getenv("LANGUAGE")) && |
Line 180 void env_init() { |
|
Line 201 void env_init() { |
|
if ( !p ) |
if ( !p ) |
break; |
break; |
} |
} |
i += 3; |
i += 4; |
ASIRLOADPATH=(char **)MALLOC(sizeof(char *)*i); |
ASIRLOADPATH=(char **)MALLOC(sizeof(char *)*i); |
for ( l = 0; l<i; l++) ASIRLOADPATH[l] = NULL; |
for ( l = 0; l<i; l++) ASIRLOADPATH[l] = NULL; |
e = getenv("ASIRLOADPATH"); |
e = getenv("ASIRLOADPATH"); |
Line 196 void env_init() { |
|
Line 217 void env_init() { |
|
}else{ |
}else{ |
ASIRLOADPATH=(char **)MALLOC(sizeof(char *)*3); |
ASIRLOADPATH=(char **)MALLOC(sizeof(char *)*3); |
ASIRLOADPATH[0] = NULL; |
ASIRLOADPATH[0] = NULL; |
} |
} |
|
|
for ( i = 0; ASIRLOADPATH[i]; i++ ); |
for ( i = 0; ASIRLOADPATH[i]; i++ ); |
ASIRLOADPATH[i++] = asir_libdir; |
if (asir_contrib_dir) ASIRLOADPATH[i++] = asir_contrib_dir; |
|
if (asir_libdir) ASIRLOADPATH[i++] = asir_libdir; |
ASIRLOADPATH[i] = NULL; |
ASIRLOADPATH[i] = NULL; |
} |
} |
|
|