]> git.sur5r.net Git - cc65/blobdiff - src/common/hashtab.h
Add IntPtrStack
[cc65] / src / common / hashtab.h
index 260a68b39cce4c2e77402c859a0a728a00fedd6c..f110fa1a0c0d68b8da7be334dc25bee44bce25fc 100644 (file)
 
 
 /* Hash table node. NOTE: This structure must be the first member of a struct
- * that is hashed by the module. Having it first allows to omit a pointer to
- * the entry itself, because the C standard guarantees that a pointer to a
- * struct can be converted to its first member.
- */
+** that is hashed by the module. Having it first allows to omit a pointer to
+** the entry itself, because the C standard guarantees that a pointer to a
+** struct can be converted to its first member.
+*/
 typedef struct HashNode HashNode;
 struct HashNode {
     HashNode*           Next;           /* Next entry in hash list */
@@ -75,9 +75,9 @@ struct HashFunctions {
 
     int (*Compare) (const void* Key1, const void* Key2);
     /* Compare two keys. The function must return a value less than zero if
-     * Key1 is smaller than Key2, zero if both are equal, and a value greater
-     * than zero if Key1 is greater then Key2.
-     */
+    ** Key1 is smaller than Key2, zero if both are equal, and a value greater
+    ** than zero if Key1 is greater then Key2.
+    */
 };
 
 /* Hash table */
@@ -122,8 +122,8 @@ HashTable* InitHashTable (HashTable* T, unsigned Slots, const HashFunctions* Fun
 
 void DoneHashTable (HashTable* T);
 /* Destroy the contents of a hash table. Note: This will not free the entries
- * in the table!
- */
+** in the table!
+*/
 
 #if defined(HAVE_INLINE)
 INLINE HashTable* NewHashTable (unsigned Slots, const HashFunctions* Func)
@@ -151,8 +151,8 @@ INLINE unsigned HT_GetCount (const HashTable* T)
 
 HashNode* HT_FindHash (const HashTable* T, const void* Key, unsigned Hash);
 /* Find the node with the given key. Differs from HT_Find in that the hash
- * for the key is precalculated and passed to the function.
- */
+** for the key is precalculated and passed to the function.
+*/
 
 void* HT_Find (const HashTable* T, const void* Key);
 /* Find the entry with the given key and return it */
@@ -165,12 +165,12 @@ void HT_Remove (HashTable* T, void* Entry);
 
 void HT_Walk (HashTable* T, int (*F) (void* Entry, void* Data), void* Data);
 /* Walk over all nodes of a hash table, optionally deleting entries from the
- * table. For each node, the user supplied function F is called, passing a
- * pointer to the entry, and the data pointer passed to HT_Walk by the caller.
- * If F returns true, the node is deleted from the hash table otherwise it's
- * left in place. While deleting the node, the node is not accessed, so it is
- * safe for F to free the memory associcated with the entry.
- */
+** table. For each node, the user supplied function F is called, passing a
+** pointer to the entry, and the data pointer passed to HT_Walk by the caller.
+** If F returns true, the node is deleted from the hash table otherwise it's
+** left in place. While deleting the node, the node is not accessed, so it is
+** safe for F to free the memory associcated with the entry.
+*/