Added function hTabMaxKey returns Max key size in a hashTable
authorsandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 9 Nov 2001 20:41:50 +0000 (20:41 +0000)
committersandeep <sandeep@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Fri, 9 Nov 2001 20:41:50 +0000 (20:41 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1539 4a8a32a2-be11-0410-ad9d-d568d2c75423

src/SDCChasht.c
src/SDCChasht.h

index cc467afd7f928a19b799849e75d82e67c1feb816..d7551c04ac30a53b002e03ed940bb5e1fc60885a 100644 (file)
@@ -513,6 +513,14 @@ hTabItemWithKey (hTab * htab, int key)
   return htip->item;
 }
 
+/*-----------------------------------------------------------------*/
+/* hTabMaxKey - return the maxKey of item in the hashTable         */
+/*-----------------------------------------------------------------*/
+int hTabMaxKey (hTab *htab)
+{
+    return (htab ? htab->maxKey : 0);
+}      
+
 /*-----------------------------------------------------------------*/
 /*hTabAddItemIfNotP - adds an item with nothing found with key     */
 /*-----------------------------------------------------------------*/
index 4afcabec7b2822e65a95908674bd3d9416ac2a47..89013cc5fa893ae2061a85c29443025d583fed85 100644 (file)
@@ -106,6 +106,7 @@ void hTabDeleteAll (hTab *);
 void *hTabFirstItemWK (hTab * htab, int wk);
 void *hTabNextItemWK (hTab * htab);
 void hTabClearAll (hTab * htab);
+int hTabMaxKey (hTab *htab);
 
 /** Find the first item that either is 'item' or which
     according to 'compareFunc' is the same as item.