projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added function to free string array
[rocksndiamonds.git]
/
src
/
game_bd
/
bd_bdcff.c
diff --git
a/src/game_bd/bd_bdcff.c
b/src/game_bd/bd_bdcff.c
index 19cfc2d7cced2cc99fbe918f72280840a2a9d695..8b7164b902cd83e82f505bcd86be440159a6726f 100644
(file)
--- a/
src/game_bd/bd_bdcff.c
+++ b/
src/game_bd/bd_bdcff.c
@@
-82,7
+82,7
@@
static boolean replay_store_from_bdcff(GdReplay *replay, const char *str)
break;
default:
break;
default:
- if (
g_ascii_isdigit(str[i])
)
+ if (
str[i] >= '0' && str[i] <= '9'
)
{
if (!num)
num = str + i;
{
if (!num)
num = str + i;
@@
-150,7
+150,7
@@
static boolean struct_set_property(gpointer str, const GdStructDescriptor *prop_
int i;
boolean was_string;
int i;
boolean was_string;
- params = g
_strsplit_set
(param, " ", -1);
+ params = g
etSplitStringArray
(param, " ", -1);
paramcount = g_strv_length(params);
identifier_found = FALSE;
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;
int i;
boolean result = TRUE;
- split = g
_strsplit_set
(param, " ", -1);
+ split = g
etSplitStringArray
(param, " ", -1);
for (i = 0; split[i] != 0; i++)
result = result && replay_store_from_bdcff(replay, split[i]);
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;
char **params;
boolean identifier_found;
- params = g
_strsplit_set
(param, " ", -1);
+ params = g
etSplitStringArray
(param, " ", -1);
identifier_found = FALSE;
if (strcasecmp(attrib, "SnapExplosions") == 0)
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 */
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 = g
etSplitStringArray
(contents, "\n", 0);
/* attributes read will be set in cave. if no [cave]; they are stored
in the default cave; like in a [game] */
/* 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;
/* CHECK IF IT IS AN EFFECT */
char **params;
- params = g
_strsplit_set
(param, " ", -1);
+ params = g
etSplitStringArray
(param, " ", -1);
/* an effect command has two parameters */
if (g_strv_length(params) == 2)
/* an effect command has two parameters */
if (g_strv_length(params) == 2)