[BACK]Return to glob.c CVS log [TXT][DIR] Up to [local] / OpenXM_contrib2 / asir2000 / parse

Diff for /OpenXM_contrib2/asir2000/parse/glob.c between version 1.76 and 1.79

version 1.76, 2009/03/18 05:13:47 version 1.79, 2010/08/03 04:34:44
Line 45 
Line 45 
  * 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/glob.c,v 1.75 2009/02/05 08:37:02 ohara Exp $   * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.78 2010/08/01 08:44:15 ohara Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "al.h"  #include "al.h"
Line 318  static int which(char *prog, char *path, char *buf, si
Line 318  static int which(char *prog, char *path, char *buf, si
 void cppname_init()  void cppname_init()
 {  {
 #if !defined(VISUAL)  #if !defined(VISUAL)
           char *oxhome;
           char oxcpp[BUFSIZ];
   #define OXCPP "/bin/ox_cpp"
   
           if ( oxhome = getenv("OpenXM_HOME") ) {
                   if ( strlen(oxhome)+strlen(OXCPP)<BUFSIZ ) {
                           sprintf(oxcpp,"%s%s",oxhome,OXCPP);
                           if ( access(oxcpp,X_OK&R_OK) == 0 ) {
                           strcpy(cppname,oxcpp);
                                   return;
                           }
                   }
           }
     if (access(cppname, X_OK&R_OK) != 0) {      if (access(cppname, X_OK&R_OK) != 0) {
         which("cpp", "/lib:/usr/ccs/lib:/usr/bin", cppname, BUFSIZ) ||          which("cpp", "/lib:/usr/ccs/lib:/usr/bin", cppname, BUFSIZ) ||
         which("cpp", getenv("PATH"), cppname, BUFSIZ);          which("cpp", getenv("PATH"), cppname, BUFSIZ);
Line 529  void int_handler(int sig)
Line 542  void int_handler(int sig)
   
                 fprintf(stderr,"interrupt ?(q/t/c/d/u/w/?) "); fflush(stderr);                  fprintf(stderr,"interrupt ?(q/t/c/d/u/w/?) "); fflush(stderr);
                 buf[0] = '\n';                  buf[0] = '\n';
                 while ( buf[0] == '\n' )                  while ( !feof(stdin) && buf[0] == '\n' )
                         fgets(buf,BUFSIZ,stdin);                          fgets(buf,BUFSIZ,stdin);
                   if ( feof(stdin) ) {
                           clearerr(stdin);
                           continue;
                   }
                 switch ( c = buf[0] ) {                  switch ( c = buf[0] ) {
                         case 'q':                          case 'q':
                                 while ( 1 ) {                                  while ( 1 ) {

Legend:
Removed from v.1.76  
changed lines
  Added in v.1.79

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>