version 1.1, 2018/09/19 05:45:08 |
version 1.3, 2021/03/24 04:35:15 |
|
|
* 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: OpenXM_contrib2/asir2018/parse/load.c,v 1.2 2020/10/06 06:31:20 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 147 void env_init() { |
|
Line 147 void env_init() { |
|
char rootname[BUFSIZ]; |
char rootname[BUFSIZ]; |
size_t len; |
size_t len; |
|
|
if ( oxhome = getenv("OpenXM_HOME") ) { |
if ( ( oxhome = getenv("OpenXM_HOME") ) != 0 ) { |
len = strlen(oxhome); |
len = strlen(oxhome); |
}else { |
}else { |
#if defined(VISUAL) || defined(__MINGW32__) |
#if defined(VISUAL) || defined(__MINGW32__) |
Line 206 void env_init() { |
|
Line 206 void env_init() { |
|
strcpy(asir_pager,MORE); |
strcpy(asir_pager,MORE); |
} |
} |
} |
} |
if ( e = getenv("ASIRLOADPATH" ) ) { |
if ( ( e = getenv("ASIRLOADPATH" ) ) != 0 ) { |
for ( i = 0; ; i++, e = p+1 ) { |
for ( i = 0; ; i++, e = p+1 ) { |
p = (char *)index(e,ENVDELIM); |
p = (char *)index(e,ENVDELIM); |
if ( !p ) |
if ( !p ) |
break; |
break; |
} |
} |
i += 5; |
i += 6; |
ASIRLOADPATH_LEN=i; |
ASIRLOADPATH_LEN=i; |
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"); |
for ( i = 0; ; i++, e = p+1 ) { |
for ( i = 0; ; i++, e = p+1 ) { |
Line 226 void env_init() { |
|
Line 226 void env_init() { |
|
if ( !p ) |
if ( !p ) |
break; |
break; |
} |
} |
}else{ |
}else{ |
ASIRLOADPATH=(char **)MALLOC(sizeof(char *)*3); |
ASIRLOADPATH=(char **)MALLOC(sizeof(char *)*6); |
ASIRLOADPATH[0] = NULL; |
ASIRLOADPATH[0] = NULL; |
} |
} |
|
|
Line 400 int loadfile(char *s) |
|
Line 400 int loadfile(char *s) |
|
{ |
{ |
FILE *in; |
FILE *in; |
|
|
if ( in = fopen(s,"r") ) { |
if ( ( in = fopen(s,"r") ) != 0 ) { |
fclose(in); |
fclose(in); |
loadasirfile(s); |
loadasirfile(s); |
return 1; |
return 1; |