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 |
{ |
{ |
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; |
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; |
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 |
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 |
{ |
{ |
373 |
@) |
@) |
374 |
|
|
375 |
void |
void |
376 |
Lhash_table_p() |
Lhash_table_p(void) |
377 |
{ |
{ |
378 |
check_arg(1); |
check_arg(1); |
379 |
|
|
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);} |
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); |
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 |
|
|