From: Holger Schemel Date: Mon, 19 Feb 2024 22:35:57 +0000 (+0100) Subject: replaced glib function calls to g_strsplit_set() X-Git-Tag: 4.4.0.0-test-1~339 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=74980a61aa0aff2c56f46f7dbef8346c59509f4f;p=rocksndiamonds.git replaced glib function calls to g_strsplit_set() --- diff --git a/src/game_bd/bd_bdcff.c b/src/game_bd/bd_bdcff.c index 6f3b935b..8b7164b9 100644 --- a/src/game_bd/bd_bdcff.c +++ b/src/game_bd/bd_bdcff.c @@ -150,7 +150,7 @@ static boolean struct_set_property(gpointer str, const GdStructDescriptor *prop_ int i; boolean was_string; - params = g_strsplit_set(param, " ", -1); + params = getSplitStringArray(param, " ", -1); paramcount = g_strv_length(params); identifier_found = FALSE; @@ -347,7 +347,7 @@ static boolean replay_store_more_from_bdcff(GdReplay *replay, const char *param) int i; boolean result = TRUE; - split = g_strsplit_set(param, " ", -1); + split = getSplitStringArray(param, " ", -1); for (i = 0; split[i] != 0; i++) result = result && replay_store_from_bdcff(replay, split[i]); @@ -403,7 +403,7 @@ static boolean cave_process_tags_func(const char *attrib, const char *param, GdC char **params; boolean identifier_found; - params = g_strsplit_set(param, " ", -1); + params = getSplitStringArray(param, " ", -1); identifier_found = FALSE; if (strcasecmp(attrib, "SnapExplosions") == 0) @@ -669,7 +669,7 @@ boolean gd_caveset_load_from_bdcff(const char *contents) replay_tags = g_hash_table_new_full(gd_str_case_hash, gd_str_case_equal, free, free); /* split into lines */ - lines = g_strsplit_set (contents, "\n", 0); + lines = getSplitStringArray (contents, "\n", 0); /* attributes read will be set in cave. if no [cave]; they are stored in the default cave; like in a [game] */ @@ -1048,7 +1048,7 @@ boolean gd_caveset_load_from_bdcff(const char *contents) /* CHECK IF IT IS AN EFFECT */ char **params; - params = g_strsplit_set(param, " ", -1); + params = getSplitStringArray(param, " ", -1); /* an effect command has two parameters */ if (g_strv_length(params) == 2) diff --git a/src/game_bd/bd_caveobject.c b/src/game_bd/bd_caveobject.c index 750543d2..c0202397 100644 --- a/src/game_bd/bd_caveobject.c +++ b/src/game_bd/bd_caveobject.c @@ -617,7 +617,7 @@ GdObject *gd_object_new_from_string(char *str) if (words) g_strfreev(words); - words = g_strsplit_set(param, " ", -1); + words = getSplitStringArray(param, " ", -1); l = g_strv_length(words); if (l < 10 || l > 19)