/[gcl]/gcl/o/predicate.c
ViewVC logotype

Diff of /gcl/o/predicate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by wfs, Mon Dec 6 22:44:12 1999 UTC revision 1.2 by camm, Sat Jul 20 07:10:56 2002 UTC
# Line 389  object x0,x1; Line 389  object x0,x1;
389      ;}      ;}
390    
391  bool  bool
392  eql(x, y)  eql(object x, object y)
 object x, y;  
393  {  {
394          enum type t;          enum type t;
395    
# Line 407  object x, y; Line 406  object x, y;
406                          return(FALSE);                          return(FALSE);
407    
408          case t_bignum:          case t_bignum:
409                  if (big_compare((struct bignum *)x,                  if (big_compare(x,y) == 0)
                                 (struct bignum *)y) == 0)  
410                          return(TRUE);                          return(TRUE);
411                  else                  else
412                          return(FALSE);                          return(FALSE);
# Line 446  object x, y; Line 444  object x, y;
444                          return(TRUE);                          return(TRUE);
445                  else                  else
446                          return(FALSE);                          return(FALSE);
447            default:
448              break;
449          }          }
450          return(FALSE);          return(FALSE);
451  }  }
# Line 465  RETURN1(x0);} Line 465  RETURN1(x0);}
465    
466  bool  bool
467    
468  equal(x, y)  equal(register object x, register object y)
469  register object x;                    
470  #ifdef UNIX   /* in non unix case cs_check want's an address */  #ifdef UNIX   /* in non unix case cs_check want's an address */
471  register          
472  #endif  #endif
473  object y;          
474  {  {
475  register enum type t;  register enum type t;
476    
# Line 504  BEGIN: Line 504  BEGIN:
504          return(x->LF.LFVAL==y->LF.LFVAL);          return(x->LF.LFVAL==y->LF.LFVAL);
505    
506          case t_string:          case t_string:
507                  return(string_eq(x, y));            return(string_eq(x, y));
508    
509          case t_bitvector:          case t_bitvector:
510          {          {
# Line 534  BEGIN: Line 534  BEGIN:
534                  else                  else
535                          return(FALSE);                          return(FALSE);
536    
537            default:
538              break;
539          }          }
540          return(eql(x,y));          return(eql(x,y));
541  }  }
# Line 548  object x0,x1; Line 550  object x0,x1;
550                  x0 = Ct;                  x0 = Ct;
551          else          else
552                  x0 = Cnil;                  x0 = Cnil;
553          vs_pop;          vs_popp;
554          RETURN1(x0);          RETURN1(x0);
555  }  }
556    
557  bool  bool
558  equalp(x, y)  equalp(object x, object y)
 object x, y;  
559  {  {
560          enum type tx, ty;          enum type tx, ty;
561          int j;          int j;
# Line 605  BEGIN: Line 606  BEGIN:
606                      goto ARRAY;}                      goto ARRAY;}
607                  else                  else
608                          return(FALSE);                          return(FALSE);
609            default:
610              break;
611          }          }
612          if (tx != ty)          if (tx != ty)
613                  return(FALSE);                  return(FALSE);
# Line 651  BEGIN: Line 654  BEGIN:
654    
655          case t_pathname:          case t_pathname:
656                  return(equal(x, y));                  return(equal(x, y));
657            default:
658              break;
659          }          }
660          return(FALSE);          return(FALSE);
661    
# Line 665  ARRAY: Line 670  ARRAY:
670                          vs_top[-2] = aref(x, i);                          vs_top[-2] = aref(x, i);
671                          vs_top[-1] = aref(y, i);                          vs_top[-1] = aref(y, i);
672                          if (!equalp(vs_top[-2], vs_top[-1])) {                          if (!equalp(vs_top[-2], vs_top[-1])) {
673                                  vs_pop;                                  vs_popp;
674                                  vs_pop;                                  vs_popp;
675                                  return(FALSE);                                  return(FALSE);
676                          }                          }
677                  }                  }
678                  vs_pop;                  vs_popp;
679                  vs_pop;                  vs_popp;
680                  return(TRUE);                  return(TRUE);
681          }          }
682  }  }
# Line 689  object x0,x1; Line 694  object x0,x1;
694          RETURN1(x0);          RETURN1(x0);
695  }  }
696    
697  Fand(args)  void
698  object args;  Fand(object args)
699  {  {
700          object endp_temp;          object endp_temp;
701    
# Line 714  object args; Line 719  object args;
719          eval(MMcar(args));          eval(MMcar(args));
720  }  }
721    
722  For(args)  void
723  object args;  For(object args)
724  {  {
725          object endp_temp;          object endp_temp;
726    
# Line 746  object args; Line 751  object args;
751          Refer to the compiler about this magic.          Refer to the compiler about this magic.
752  */  */
753  bool  bool
754  contains_sharp_comma(x)  contains_sharp_comma(object x)
 object x;  
755  {  {
756          enum type tx;          enum type tx;
757    
# Line 829  object x0; Line 833  object x0;
833          RETURN1(x0);          RETURN1(x0);
834  }  }
835    
836  init_predicate_function()  void
837    init_predicate_function(void)
838  {  {
839    
840          make_special_form("AND",Fand);          make_special_form("AND",Fand);

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26