X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fhash.h;h=4e4787cb2b22da581b2a71c6b59a9f2b2b80feb9;hb=7024f0c3fa05fb764619523cc13131ef80bb1caf;hp=a2dbec5c86c0f0b60883d2d8384b3c9730864bff;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git.1 diff --git a/src/hash.h b/src/hash.h index a2dbec5..4e4787c 100644 --- a/src/hash.h +++ b/src/hash.h @@ -17,17 +17,17 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: Not in FSF. */ -#ifndef _HASH_H_ -#define _HASH_H_ +#ifndef INCLUDED_hash_h_ +#define INCLUDED_hash_h_ typedef struct { - CONST void *key; + const void *key; void *contents; } hentry; -typedef int (*hash_table_test_function) (CONST void *, CONST void *); -typedef unsigned long (*hash_table_hash_function) (CONST void *); +typedef int (*hash_table_test_function) (const void *, const void *); +typedef unsigned long (*hash_table_hash_function) (const void *); typedef size_t hash_size_t; struct hash_table @@ -50,8 +50,6 @@ make_general_hash_table (hash_size_t size, hash_table_hash_function hash_function, hash_table_test_function test_function); -struct hash_table *make_strings_hash_table (hash_size_t size); - /* Clear HASH-TABLE. A freshly created hash table is already cleared up. */ void clrhash (struct hash_table *hash_table); @@ -59,23 +57,20 @@ void clrhash (struct hash_table *hash_table); void free_hash_table (struct hash_table *hash_table); /* Returns a hentry whose key is 0 if the entry does not exist in HASH-TABLE */ -CONST void *gethash (CONST void *key, struct hash_table *hash_table, - CONST void **ret_value); +const void *gethash (const void *key, struct hash_table *hash_table, + const void **ret_value); /* KEY should be different from 0 */ -void puthash (CONST void *key, void *contents, struct hash_table *hash_table); +void puthash (const void *key, void *contents, struct hash_table *hash_table); /* delete the entry with key KEY */ -void remhash (CONST void *key, struct hash_table *hash_table); +void remhash (const void *key, struct hash_table *hash_table); -typedef int (*maphash_function) (CONST void* key, void* contents, void* arg); +typedef int (*maphash_function) (const void* key, void* contents, void* arg); -typedef int (*remhash_predicate) (CONST void* key, CONST void* contents, +typedef int (*remhash_predicate) (const void* key, const void* contents, void* arg); -typedef void (*generic_hash_table_op) (struct hash_table *hash_table, - void *arg1, void *arg2, void *arg3); - /* Call MF (key, contents, arg) for every entry in HASH-TABLE */ void maphash (maphash_function mf, struct hash_table *hash_table, void* arg); @@ -83,11 +78,4 @@ void maphash (maphash_function mf, struct hash_table *hash_table, void* arg); void map_remhash (remhash_predicate predicate, struct hash_table *hash_table, void *arg); -/* Copy all the entries from SRC into DEST -- DEST is modified as needed - so it is as big as SRC. */ -void copy_hash (struct hash_table *dest, struct hash_table *src); - -/* Make sure HASH-TABLE can hold at least NEEDED_SIZE entries */ -void expand_hash_table (struct hash_table *hash_table, hash_size_t needed_size); - -#endif /* _HASH_H_ */ +#endif /* INCLUDED_hash_h_ */