added using checked memory handling functions to list handling
[rocksndiamonds.git] / src / game_bd / bd_cave.c
index b138a37b2a687715003e73fcb17dd29178e5dc86..a1a5d40959bda960ea062d8221e932edcdc288a1 100644 (file)
@@ -282,7 +282,7 @@ void gd_cave_init(void)
   {
     char *key;
 
-    key = g_ascii_strup(gd_elements[i].filename, -1);
+    key = getStringToUpper(gd_elements[i].filename);
 
     if (hashtable_exists(name_to_element, key))                /* hash value may be 0 */
       Warn("Name %s already used for element %x", key, i);
@@ -322,7 +322,7 @@ void gd_cave_init(void)
 /* search the element database for the specified name, and return the element */
 GdElement gd_get_element_from_string (const char *string)
 {
-  char *upper = g_ascii_strup(string, -1);
+  char *upper = getStringToUpper(string);
   void *value;
   boolean found;
 
@@ -416,7 +416,7 @@ int gd_add_highscore(GdHighScore *highscores, const char *name, int score)
   qsort(highscores, GD_HIGHSCORE_NUM, sizeof(GdHighScore), gd_highscore_compare);
 
   for (i = 0; i < GD_HIGHSCORE_NUM; i++)
-    if (g_str_equal(highscores[i].name, name) && highscores[i].score == score)
+    if (strEqual(highscores[i].name, name) && highscores[i].score == score)
       return i;
 
   return -1;
@@ -578,7 +578,7 @@ void gd_cave_copy(GdCave *dest, const GdCave *src)
   int i;
 
   /* copy entire data */
-  g_memmove(dest, src, sizeof(GdCave));
+  memmove(dest, src, sizeof(GdCave));
 
   /* but duplicate dynamic data */
   dest->tags = create_hashtable(gd_str_case_hash, gd_str_case_equal, free, free);