Added function hTabMaxKey returns Max key size in a hashTable
[fw/sdcc] / src / SDCChasht.c
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     */
 /*-----------------------------------------------------------------*/