=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/load.c,v retrieving revision 1.29 retrieving revision 1.32 diff -u -p -r1.29 -r1.32 --- OpenXM_contrib2/asir2000/parse/load.c 2015/08/14 13:51:56 1.29 +++ OpenXM_contrib2/asir2000/parse/load.c 2017/02/07 08:30:31 1.32 @@ -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.28 2015/08/06 10:01:53 fujimoto Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/load.c,v 1.31 2016/08/30 02:29:11 noro Exp $ */ #include "ca.h" #include "parse.h" @@ -186,6 +186,7 @@ void env_init() { #endif if ( !(asir_pager = getenv("PAGER")) ) { +#if 0 japanese = 0; if ( (e = getenv("LANGUAGE")) && (!strncmp(e,"japan",5) || !strncmp(e,"ja_JP",5)) ) japanese = 1; @@ -197,6 +198,8 @@ void env_init() { (!strncmp(e,"japan",5) || !strncmp(e,"ja_JP",5)) ) japanese = 1; if ( japanese ) asir_pager = search_executable("jless"); +#endif + asir_pager = search_executable("less"); if ( !asir_pager ) { /* default: more */ asir_pager = (char *)malloc(strlen(MORE)+1); @@ -366,7 +369,7 @@ void loadasirfile(char *name0) #else 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 ) { perror("popen"); error("load : failed"); @@ -378,7 +381,7 @@ void loadasirfile(char *name0) main_parser = 1; /* XXX */ Eungetc(afternl(),asir_infile->fp); if ( !EPVS->va ) - reallocarray((char **)&EPVS->va,(int *)&EPVS->asize,(int *)&EPVS->n,(int)sizeof(struct oPV)); + asir_reallocarray((char **)&EPVS->va,(int *)&EPVS->asize,(int *)&EPVS->n,(int)sizeof(struct oPV)); } void execasirfile(char *name)