/[gcl]/gcl/o/hash.d
ViewVC logotype

Diff of /gcl/o/hash.d

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

revision 1.7 by camm, Thu Aug 1 22:15:06 2002 UTC revision 1.8 by camm, Sat Feb 15 00:38:28 2003 UTC
# Line 32  object sKrehash_size; Line 32  object sKrehash_size;
32  object sKrehash_threshold;  object sKrehash_threshold;
33    
34    
35  unsigned int  static unsigned int
36  hash_eql(x)  hash_eql(x)
37  object x;  object x;
38  {  {
# Line 86  object x; Line 86  object x;
86          }          }
87  }  }
88    
89  unsigned int  static unsigned int
90  ihash_equal(x,depth)  ihash_equal(x,depth)
91  object x;  object x;
92  int depth;  int depth;
# Line 179  BEGIN: Line 179  BEGIN:
179          }          }
180  }  }
181                                    
182  object  static object
183  hash_equal(x,depth)  hash_equal(x,depth)
184  object x;  object x;
185  int depth;  int depth;
# Line 241  object hashtable; Line 241  object hashtable;
241          return(&hashtable->ht.ht_self[j]);      /* added by chou */          return(&hashtable->ht.ht_self[j]);      /* added by chou */
242  }  }
243    
244  void  static void
245  extend_hashtable(object);  extend_hashtable(object);
246    
247  void  void
# Line 270  object key, hashtable, value; Line 270  object key, hashtable, value;
270          e->hte_value = value;          e->hte_value = value;
271  }  }
272                    
273  void  static void
274  extend_hashtable(hashtable)  extend_hashtable(hashtable)
275  object hashtable;  object hashtable;
276  {  {
# Line 373  object hashtable; Line 373  object hashtable;
373  @)  @)
374    
375  void  void
376  Lhash_table_p()  Lhash_table_p(void)
377  {  {
378          check_arg(1);          check_arg(1);
379    
# Line 488  Lmaphash() Line 488  Lmaphash()
488          vs_popp;          vs_popp;
489  }  }
490    
491  DEFUN("NEXT-HASH-TABLE-ENTRY",object,fSnext_hash_table_entry,SI,2,2,NONE,OO,OO,OO,OO,"For HASH-TABLE and for index I return three values: NEXT-START, the next KEY and its  VALUE.   NEXT-START will be -1 if there are no more entries, otherwise it will be a value suitable for passing as an index")  DEFUN_NEW("NEXT-HASH-TABLE-ENTRY",object,fSnext_hash_table_entry,SI,2,2,NONE,OO,OO,OO,OO,(object table,object ind),"For HASH-TABLE and for index I return three values: NEXT-START, the next KEY and its  VALUE.   NEXT-START will be -1 if there are no more entries, otherwise it will be a value suitable for passing as an index")
 (table,ind)  
 object table;  
 object ind;  
492  { int i = fix(ind);  { int i = fix(ind);
493    check_type_hash_table(&table);    check_type_hash_table(&table);
494    if ( i < 0) { FEerror("needs non negative index",0);}    if ( i < 0) { FEerror("needs non negative index",0);}
# Line 504  object ind; Line 501  object ind;
501     RETURN(3,object,small_fixnum(-1),(RV(sLnil),RV(sLnil)));     RETURN(3,object,small_fixnum(-1),(RV(sLnil),RV(sLnil)));
502  }  }
503    
504  DEFUN("HASH-TABLE-TEST",object,fLhash_table_test,LISP,1,1,NONE,OO,OO,OO,OO,  DEFUN_NEW("HASH-TABLE-TEST",object,fLhash_table_test,LISP,1,1,NONE,OO,OO,OO,OO,(object table),
505   "Given a HASH-TABLE return a symbol which specifies the function used in its test") (table)   "Given a HASH-TABLE return a symbol which specifies the function used in its test")
 object table;  
506  { switch(table->ht.ht_test) {  { switch(table->ht.ht_test) {
507       case htt_equal: RETURN1(sLequal);       case htt_equal: RETURN1(sLequal);
508       case htt_eq: RETURN1(sLeq);       case htt_eq: RETURN1(sLeq);
# Line 516  object table; Line 512  object table;
512    RETURN1(sLnil);    RETURN1(sLnil);
513  }  }
514    
515  DEFUN("HASH-TABLE-SIZE",object,fLhash_table_size,LISP,1,1,NONE,OO,OO,OO,OO,"")  DEFUN_NEW("HASH-TABLE-SIZE",object,fLhash_table_size,LISP,1,1,NONE,OO,OO,OO,OO,(object table),"")
 (table)  
 object table;  
516  {  {
517    RETURN1(make_fixnum(table->ht.ht_size));    RETURN1(make_fixnum(table->ht.ht_size));
518    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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