diff src/hash.h @ 412:697ef44129c6 r21-2-14

Import from CVS: tag r21-2-14
author cvs
date Mon, 13 Aug 2007 11:20:41 +0200
parents 74fd4e045ea6
children
line wrap: on
line diff
--- a/src/hash.h	Mon Aug 13 11:19:22 2007 +0200
+++ b/src/hash.h	Mon Aug 13 11:20:41 2007 +0200
@@ -17,17 +17,17 @@
 
 /* Synched up with: Not in FSF. */
 
-#ifndef INCLUDED_hash_h_
-#define INCLUDED_hash_h_
+#ifndef _HASH_H_
+#define _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
@@ -57,18 +57,18 @@
 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);
 
 /* Call MF (key, contents, arg) for every entry in HASH-TABLE */
@@ -78,4 +78,4 @@
 void map_remhash (remhash_predicate predicate,
 		  struct hash_table *hash_table, void *arg);
 
-#endif /* INCLUDED_hash_h_ */
+#endif /* _HASH_H_ */