XEmacs 21.2.29 "Hestia".
[chise/xemacs-chise.git.1] / src / hash.c
index 8c6a0ea..71e3b44 100644 (file)
@@ -34,10 +34,10 @@ Boston, MA 02111-1307, USA.  */
 static void rehash (hentry *harray, struct hash_table *ht, hash_size_t size);
 
 unsigned long
-memory_hash (CONST void *xv, size_t size)
+memory_hash (const void *xv, size_t size)
 {
   unsigned int h = 0;
-  unsigned CONST char *x = (unsigned CONST char *) xv;
+  unsigned const char *x = (unsigned const char *) xv;
 
   if (!x) return 0;
 
@@ -59,7 +59,7 @@ hash_table_size (size_t requested_size)
   /* Return some prime near, but greater than or equal to, SIZE.
      Decades from the time of writing, someone will have a system large
      enough that the list below will be too short... */
-  static CONST size_t primes [] =
+  static const size_t primes [] =
   {
     19, 29, 41, 59, 79, 107, 149, 197, 263, 347, 457, 599, 787, 1031,
     1361, 1777, 2333, 3037, 3967, 5167, 6719, 8737, 11369, 14783,
@@ -85,8 +85,8 @@ hash_table_size (size_t requested_size)
   return primes [high];
 }
 
-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)
 {
   if (!key)
     {
@@ -104,7 +104,7 @@ gethash (CONST void *key, struct hash_table *hash_table, CONST void **ret_value)
        (unsigned long) key;
       unsigned int hcode = hcode_initial % size;
       hentry *e = &harray [hcode];
-      CONST void *e_key = e->key;
+      const void *e_key = e->key;
 
       if (e_key ?
          KEYS_DIFFER_P (e_key, key, test_function) :
@@ -188,7 +188,7 @@ grow_hash_table (struct hash_table *hash_table, hash_size_t new_size)
 }
 
 void
-puthash (CONST void *key, void *contents, struct hash_table *hash_table)
+puthash (const void *key, void *contents, struct hash_table *hash_table)
 {
   if (!key)
     {
@@ -207,8 +207,8 @@ puthash (CONST void *key, void *contents, struct hash_table *hash_table)
       unsigned int hcode = hcode_initial % size;
       size_t h2 = size - 2;
       unsigned int incr = 1 + (hcode_initial % h2);
-      CONST void *e_key = harray [hcode].key;
-      CONST void *oldcontents;
+      const void *e_key = harray [hcode].key;
+      const void *oldcontents;
 
       if (e_key && KEYS_DIFFER_P (e_key, key, test_function))
        {
@@ -269,7 +269,7 @@ rehash (hentry *harray, struct hash_table *hash_table, hash_size_t size)
 }
 
 void
-remhash (CONST void *key, struct hash_table *hash_table)
+remhash (const void *key, struct hash_table *hash_table)
 {
   if (!key)
     {
@@ -287,7 +287,7 @@ remhash (CONST void *key, struct hash_table *hash_table)
        ((unsigned long) key);
       unsigned int hcode = hcode_initial % size;
       hentry *e = &harray [hcode];
-      CONST void *e_key = e->key;
+      const void *e_key = e->key;
 
       if (e_key ?
          KEYS_DIFFER_P (e_key, key, test_function) :