Fixed up s51 autodetect
[fw/sdcc] / src / SDCChasht.c
index e33f08cb28a9c0c9b5c141557078cc015247eb09..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     */
 /*-----------------------------------------------------------------*/
@@ -557,7 +565,7 @@ shash_add (hTab ** h, const char *szKey, const char *szValue)
   /* First, delete any that currently exist */
   hTabDeleteByKey (h, key, szKey, _compare);
   /* Now add in ours */
-  hTabAddItemLong (h, key, gc_strdup (szKey), gc_strdup (szValue));
+  hTabAddItemLong (h, key, Safe_strdup (szKey), Safe_strdup (szValue));
 }
 
 const char *