Clened up, more doxygen docu
[libfirm] / ir / adt / set.c
index 9c44703..1370703 100644 (file)
     Submitted-By: Esmond Pitt <ejp@ausmelb.oz.AU>
     Archive-name: dynamic-hash
 
-    ** Dynamic hashing, after CACM April 1988 pp 446-457, by Per-Ake Larson.
-    ** Coded into C, with minor code improvements, and with hsearch(3) interface,
-    ** by ejp@ausmelb.oz, Jul 26, 1988: 13:16;
+    * Dynamic hashing, after CACM April 1988 pp 446-457, by Per-Ake Larson.
+    * Coded into C, with minor code improvements, and with hsearch(3) interface,
+    * by ejp@ausmelb.oz, Jul 26, 1988: 13:16;
 
     TODO: Fix Esmond's ugly MixedCapsIdentifiers ;->
  */
 
+/* $Id$ */
+
 #ifdef HAVE_CONFIG_H
 # include <config.h>
 #endif
 
+#ifdef USE_GCC_INLINE
+#define INLINE inline
+#else
+#define INLINE
+#endif
+
+/* bcopy is not ISO C *
+#define bcopy(X, Y, Z) memcpy((Y), (X), (Z))
+*/
+
 #ifdef PSET
 # define SET pset
 # define PMANGLE(pre) pre##_pset
@@ -105,7 +117,7 @@ MANGLEP(stats) (SET *table)
          table->naccess, table->ncollision, table->nkey, table->ndups, table->max_chain_len, nfree);
 }
 
-static inline void
+static INLINE void
 stat_chain_len (SET *table, int chain_len)
 {
   table->ncollision += chain_len;
@@ -128,7 +140,7 @@ stat_chain_len (SET *table, int chain_len)
 const char *MANGLEP(tag);
 
 
-void
+static void
 MANGLEP(describe) (SET *table)
 {
   int i, j, collide;
@@ -207,7 +219,7 @@ PMANGLE(del) (SET *table)
 }
 
 
-static inline int
+static INLINE int
 iter_step (SET *table)
 {
   if (++table->iter_j >= SEGMENT_SIZE) {
@@ -259,7 +271,7 @@ MANGLEP(break) (SET *table)
 }
 
 
-static inline unsigned
+static INLINE unsigned
 Hash (SET *table, unsigned h)
 {
   unsigned address;
@@ -271,7 +283,7 @@ Hash (SET *table, unsigned h)
 }
 
 
-static inline int
+static INLINE int
 loaded (SET *table)
 {
   return (  ++table->nkey