=================================================================== RCS file: /home/cvs/OpenXM_contrib2/asir2000/parse/glob.c,v retrieving revision 1.75 retrieving revision 1.78 diff -u -p -r1.75 -r1.78 --- OpenXM_contrib2/asir2000/parse/glob.c 2009/02/05 08:37:02 1.75 +++ OpenXM_contrib2/asir2000/parse/glob.c 2010/08/01 08:44:15 1.78 @@ -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/glob.c,v 1.74 2008/03/19 07:05:56 ohara Exp $ + * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.77 2010/05/26 06:32:49 noro Exp $ */ #include "ca.h" #include "al.h" @@ -318,7 +318,10 @@ static int which(char *prog, char *path, char *buf, si void cppname_init() { #if !defined(VISUAL) - if (access(cppname, X_OK&R_OK) != 0) { + char oxcpp[BUFSIZ]; + if(which("ox_cpp", getenv("PATH"), oxcpp, BUFSIZ) && access(oxcpp, X_OK&R_OK) == 0) { + strncpy(cppname,oxcpp,BUFSIZ-1); + }else if (access(cppname, X_OK&R_OK) != 0) { which("cpp", "/lib:/usr/ccs/lib:/usr/bin", cppname, BUFSIZ) || which("cpp", getenv("PATH"), cppname, BUFSIZ); } @@ -529,8 +532,12 @@ void int_handler(int sig) fprintf(stderr,"interrupt ?(q/t/c/d/u/w/?) "); fflush(stderr); buf[0] = '\n'; - while ( buf[0] == '\n' ) + while ( !feof(stdin) && buf[0] == '\n' ) fgets(buf,BUFSIZ,stdin); + if ( feof(stdin) ) { + clearerr(stdin); + continue; + } switch ( c = buf[0] ) { case 'q': while ( 1 ) { @@ -774,7 +781,7 @@ char *get_asir_distribution(); char *get_gcversion() { #if defined(GC7) - return "GC 7.0 copyright 1988-2007, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.\n"; + return "GC 7.1 copyright 1988-2008, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.\n"; #else return "GC 6.8 copyright 1988-2006, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.\n"; #endif