[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.73 and 1.83

version 1.73, 2008/01/04 16:42:19 version 1.83, 2012/12/17 07:20:45
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.72 2007/11/15 05:39:39 ohara Exp $   * $OpenXM: OpenXM_contrib2/asir2000/parse/glob.c,v 1.82 2012/05/30 02:24:33 ohara Exp $
 */  */
 #include "ca.h"  #include "ca.h"
 #include "al.h"  #include "al.h"
Line 77 
Line 77 
   
 #define MAXHIST 100  #define MAXHIST 100
   
 extern int GC_free_space_divisor;  
 extern int GC_free_space_numerator;  
 extern FILE *asir_out;  extern FILE *asir_out;
   
 INFILE asir_infile;  INFILE asir_infile;
Line 169  void glob_init() {
Line 167  void glob_init() {
         reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV));          reallocarray((char **)&APVS->va,(int *)&APVS->asize,(int *)&APVS->n,(int)sizeof(struct oPV));
         reallocarray((char **)&PPVS->va,(int *)&PPVS->asize,(int *)&PPVS->n,(int)sizeof(struct oPV));          reallocarray((char **)&PPVS->va,(int *)&PPVS->asize,(int *)&PPVS->n,(int)sizeof(struct oPV));
         CPVS = GPVS;          CPVS = GPVS;
         MKNODE(ONENODE,mkfnode(1,I_FORMULA,ONE),0);          MKNODE(ONENODE,mkfnode(1,I_FORMULA,ONE),NULLP);
         OID(F_TRUE)=O_F; FOP(F_TRUE)=AL_TRUE; F_TRUE->arg.dummy = 0;          OID(F_TRUE)=O_F; FOP(F_TRUE)=AL_TRUE; F_TRUE->arg.dummy = 0;
         OID(F_FALSE)=O_F; FOP(F_FALSE)=AL_FALSE; F_FALSE->arg.dummy = 0;          OID(F_FALSE)=O_F; FOP(F_FALSE)=AL_FALSE; F_FALSE->arg.dummy = 0;
         OID(Symbol_grlex) = O_SYMBOL; Symbol_grlex->name = "@grlex";          OID(Symbol_grlex) = O_SYMBOL; Symbol_grlex->name = "@grlex";
Line 320  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 331  FILE *in_fp;
Line 342  FILE *in_fp;
   
 void process_args(int ac,char **av)  void process_args(int ac,char **av)
 {  {
           int nm,dv;
         do_asirrc = 1;          do_asirrc = 1;
 #if !defined(MPI)  #if !defined(MPI)
         do_message = 1;          do_message = 1;
Line 343  void process_args(int ac,char **av)
Line 355  void process_args(int ac,char **av)
                         GC_expand_hp(atoi(*(av+1))); av += 2; ac -= 2;                          GC_expand_hp(atoi(*(av+1))); av += 2; ac -= 2;
                 } else if ( !strcmp(*av,"-adj") && (ac >= 2) ) {                  } else if ( !strcmp(*av,"-adj") && (ac >= 2) ) {
                         char *slash;                          char *slash;
   
                         slash = strrchr(*(av+1),'/');                          slash = strrchr(*(av+1),'/');
                         if ( slash ) {                          if ( slash ) {
                                 *slash = 0;                                  *slash = 0;
                                 GC_free_space_numerator = atoi(slash+1);                                  nm = atoi(slash+1);
                           }else {
                                   nm = 1;
                         }                          }
                         GC_free_space_divisor = atoi(*(av+1));                          dv = atoi(*(av+1));
                           Risa_GC_set_adj(nm,dv);
                         av += 2; ac -= 2;                          av += 2; ac -= 2;
                 } else if ( !strcmp(*av,"-cpp") && (ac >= 2) ) {                  } else if ( !strcmp(*av,"-cpp") && (ac >= 2) ) {
                         strcpy(cppname,*(av+1)); av += 2; ac -= 2;                          strcpy(cppname,*(av+1)); av += 2; ac -= 2;
Line 489  void fatal(int n)
Line 503  void fatal(int n)
 }  }
   
 extern int ox_int_received, critical_when_signal;  extern int ox_int_received, critical_when_signal;
   extern int in_gc, caught_intr;
   
 void int_handler(int sig)  void int_handler(int sig)
 {  {
Line 503  void int_handler(int sig)
Line 518  void int_handler(int sig)
                 ox_int_received = 1;                  ox_int_received = 1;
                 return;                  return;
         }          }
           if ( in_gc ) {
                   caught_intr = 1;
                   return;
           }
 #if defined(VISUAL)  #if defined(VISUAL)
         suspend_timer();          suspend_timer();
 #endif  #endif
Line 528  void int_handler(int sig)
Line 547  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 ) {
Line 772  char *get_asir_distribution();
Line 795  char *get_asir_distribution();
   
 char *get_gcversion()  char *get_gcversion()
 {  {
 #if defined(GC7)          return "GC 7.2 copyright 1988-2012, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.\n";
         return "GC 7.0 copyright 1988-2007, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.\n";  
 #else  
         return "GC 6.5 copyright 1988-2005, H-J. Boehm, A. J. Demers, Xerox, SGI, HP.\n";  
 #endif  
 }  }
   
 char *get_pariversion()  char *get_pariversion()

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.83

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