From 3421a4f00c9ae6556b3ea85af96d50590ef277d5 Mon Sep 17 00:00:00 2001 From: dark-ether Date: Wed, 20 Jul 2022 16:41:09 -0300 Subject: [PATCH] changed all occurences of strcasecmp to fc_strcasecomp see osdn #45034 --- client/client_main.c | 6 +++--- common/ai.c | 2 +- server/civserver.c | 6 +++--- server/savegame/savecompat.c | 4 ++-- server/savegame/savegame2.c | 6 +++--- tools/ruledit/effect_edit.cpp | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/client/client_main.c b/client/client_main.c index a29443621d..5e8d37708f 100644 --- a/client/client_main.c +++ b/client/client_main.c @@ -536,12 +536,12 @@ int client_main(int argc, char *argv[]) sz_strlcpy(forced_tileset_name, option); free(option); } else if ((option = get_option_malloc("--Announce", argv, &i, argc, FALSE))) { - if (!strcasecmp(option, "ipv4")) { + if (!fc_strcasecmp(option, "ipv4")) { announce = ANNOUNCE_IPV4; - } else if (!strcasecmp(option, "none")) { + } else if (!fc_strcasecmp(option, "none")) { announce = ANNOUNCE_NONE; #ifdef FREECIV_IPV6_SUPPORT - } else if (!strcasecmp(option, "ipv6")) { + } else if (!fc_strcasecmp(option, "ipv6")) { announce = ANNOUNCE_IPV6; #endif /* IPv6 support */ } else { diff --git a/common/ai.c b/common/ai.c index 3eee2ad5b3..5c8fe79e70 100644 --- a/common/ai.c +++ b/common/ai.c @@ -369,7 +369,7 @@ const char *ai_level_name_update_cb(const char *old) { #ifndef FREECIV_DEBUG /* No experimental level in !FREECIV_DEBUG build */ - if (!strcasecmp("Experimental", old)) { + if (!fc_strcasecmp("Experimental", old)) { /* Convert it to hard */ return ai_level_name(AI_LEVEL_HARD); } diff --git a/server/civserver.c b/server/civserver.c index a77eec0c6d..b7c1e3a75f 100644 --- a/server/civserver.c +++ b/server/civserver.c @@ -204,12 +204,12 @@ int main(int argc, char *argv[]) } else if (is_option("--version", argv[inx])) { showvers = TRUE; } else if ((option = get_option_malloc("--Announce", argv, &inx, argc, FALSE))) { - if (!strcasecmp(option, "ipv4")) { + if (!fc_strcasecmp(option, "ipv4")) { srvarg.announce = ANNOUNCE_IPV4; - } else if (!strcasecmp(option, "none")) { + } else if (!fc_strcasecmp(option, "none")) { srvarg.announce = ANNOUNCE_NONE; #ifdef FREECIV_IPV6_SUPPORT - } else if (!strcasecmp(option, "ipv6")) { + } else if (!fc_strcasecmp(option, "ipv6")) { srvarg.announce = ANNOUNCE_IPV6; #endif /* IPv6 support */ } else { diff --git a/server/savegame/savecompat.c b/server/savegame/savecompat.c index 6cd1e1af23..2f4df2afb5 100644 --- a/server/savegame/savecompat.c +++ b/server/savegame/savecompat.c @@ -1578,7 +1578,7 @@ static void compat_load_030100(struct loaddata *loading, savemod = fc_calloc(action_count, sizeof(*savemod)); for (j = 0; j < action_count; j++) { - if (!strcasecmp("Recycle Unit", modname[j])) { + if (!fc_strcasecmp("Recycle Unit", modname[j])) { savemod[j] = dur_name; } else { savemod[j] = modname[j]; @@ -2670,7 +2670,7 @@ static void compat_load_dev(struct loaddata *loading) savemod = fc_calloc(action_count, sizeof(*savemod)); for (j = 0; j < action_count; j++) { - if (!strcasecmp("Recycle Unit", modname[j])) { + if (!fc_strcasecmp("Recycle Unit", modname[j])) { savemod[j] = dur_name; } else { savemod[j] = modname[j]; diff --git a/server/savegame/savegame2.c b/server/savegame/savegame2.c index 75ade60409..c63f052ae1 100644 --- a/server/savegame/savegame2.c +++ b/server/savegame/savegame2.c @@ -1305,11 +1305,11 @@ static void sg_load_savefile(struct loaddata *loading) loading->special.order = fc_calloc(nmod, sizeof(*loading->special.order)); for (j = 0; j < loading->special.size; j++) { - if (!strcasecmp("Road", modname[j])) { + if (!fc_strcasecmp("Road", modname[j])) { loading->special.order[j] = S_OLD_ROAD; - } else if (!strcasecmp("Railroad", modname[j])) { + } else if (!fc_strcasecmp("Railroad", modname[j])) { loading->special.order[j] = S_OLD_RAILROAD; - } else if (!strcasecmp("River", modname[j])) { + } else if (!fc_strcasecmp("River", modname[j])) { loading->special.order[j] = S_OLD_RIVER; } else { loading->special.order[j] = special_by_rule_name(modname[j]); diff --git a/tools/ruledit/effect_edit.cpp b/tools/ruledit/effect_edit.cpp index 57e3cce30e..e727bfa520 100644 --- a/tools/ruledit/effect_edit.cpp +++ b/tools/ruledit/effect_edit.cpp @@ -359,7 +359,7 @@ void effect_edit::multiplier_menu(QAction *action) return; } - if (!strcasecmp(NO_MULTIPLIER_NAME, an_bytes)) { + if (!fc_strcasecmp(NO_MULTIPLIER_NAME, an_bytes)) { selected->multiplier = NULL; } else { selected->multiplier = multiplier_by_rule_name(an_bytes); -- 2.37.1