version 1.29, 2015/08/14 13:51:56 |
version 1.31, 2016/08/30 02:29:11 |
|
|
* 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.28 2015/08/06 10:01:53 fujimoto Exp $ |
* $OpenXM: OpenXM_contrib2/asir2000/parse/load.c,v 1.30 2016/03/31 07:33:32 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 186 void env_init() { |
|
Line 186 void env_init() { |
|
#endif |
#endif |
|
|
if ( !(asir_pager = getenv("PAGER")) ) { |
if ( !(asir_pager = getenv("PAGER")) ) { |
|
#if 0 |
japanese = 0; |
japanese = 0; |
if ( (e = getenv("LANGUAGE")) && |
if ( (e = getenv("LANGUAGE")) && |
(!strncmp(e,"japan",5) || !strncmp(e,"ja_JP",5)) ) japanese = 1; |
(!strncmp(e,"japan",5) || !strncmp(e,"ja_JP",5)) ) japanese = 1; |
Line 197 void env_init() { |
|
Line 198 void env_init() { |
|
(!strncmp(e,"japan",5) || !strncmp(e,"ja_JP",5)) ) japanese = 1; |
(!strncmp(e,"japan",5) || !strncmp(e,"ja_JP",5)) ) japanese = 1; |
if ( japanese ) |
if ( japanese ) |
asir_pager = search_executable("jless"); |
asir_pager = search_executable("jless"); |
|
#endif |
|
asir_pager = search_executable("less"); |
if ( !asir_pager ) { |
if ( !asir_pager ) { |
/* default: more */ |
/* default: more */ |
asir_pager = (char *)malloc(strlen(MORE)+1); |
asir_pager = (char *)malloc(strlen(MORE)+1); |
Line 366 void loadasirfile(char *name0) |
|
Line 369 void loadasirfile(char *name0) |
|
#else |
#else |
char com[BUFSIZ]; |
char com[BUFSIZ]; |
|
|
sprintf(com,"%s -I%s %s",cppname,asir_libdir,name0); in = popen(com,"r"); |
sprintf(com,"%s -I%s -D__FILE__=%s %s",cppname,asir_libdir,name0,name0); in = popen(com,"r"); |
if ( !in ) { |
if ( !in ) { |
perror("popen"); |
perror("popen"); |
error("load : failed"); |
error("load : failed"); |