diff options
author | Alexander Færøy <ahf@0x90.dk> | 2014-06-15 19:59:10 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@0x90.dk> | 2014-06-15 19:59:10 +0200 |
commit | a68eb46a246bae7821f6c8f987c48180d98737a4 (patch) | |
tree | 518969d3708e45ebe0faff022d7f3c8319bd32bf /src | |
parent | 20cbbe58fefeb3cbb9faec329ba5a8b0478b3047 (diff) | |
parent | 8d5142f03291c73937119209e9db1eb418dc26d4 (diff) | |
download | irssi-a68eb46a246bae7821f6c8f987c48180d98737a4.zip |
Merge pull request #5 from dajohi/master
Replace deprecated g_str[n]casecmp with g_ascii_str[n]cmp.
Diffstat (limited to 'src')
63 files changed, 169 insertions, 161 deletions
diff --git a/src/core/channels-setup.c b/src/core/channels-setup.c index 9e2908a8..e1289c23 100644 --- a/src/core/channels-setup.c +++ b/src/core/channels-setup.c @@ -102,7 +102,7 @@ CHANNEL_SETUP_REC *channel_setup_find(const char *channel, for (tmp = setupchannels; tmp != NULL; tmp = tmp->next) { CHANNEL_SETUP_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, channel) == 0 && + if (g_ascii_strcasecmp(rec->name, channel) == 0 && channel_chatnet_match(rec->chatnet, chatnet)) return rec; } diff --git a/src/core/channels-setup.h b/src/core/channels-setup.h index 423bccb2..61b828b2 100644 --- a/src/core/channels-setup.h +++ b/src/core/channels-setup.h @@ -26,6 +26,6 @@ CHANNEL_SETUP_REC *channel_setup_find(const char *channel, #define channel_chatnet_match(rec, chatnet) \ ((rec) == NULL || (rec)[0] == '\0' || \ - ((chatnet) != NULL && g_strcasecmp(rec, chatnet) == 0)) + ((chatnet) != NULL && g_ascii_strcasecmp(rec, chatnet) == 0)) #endif diff --git a/src/core/channels.c b/src/core/channels.c index 907d363b..8235a4c7 100644 --- a/src/core/channels.c +++ b/src/core/channels.c @@ -110,7 +110,7 @@ static CHANNEL_REC *channel_find_server(SERVER_REC *server, for (tmp = server->channels; tmp != NULL; tmp = tmp->next) { CHANNEL_REC *rec = tmp->data; - if (g_strcasecmp(name, rec->name) == 0) + if (g_ascii_strcasecmp(name, rec->name) == 0) return rec; } diff --git a/src/core/chat-commands.c b/src/core/chat-commands.c index c128439d..535bf9f8 100644 --- a/src/core/chat-commands.c +++ b/src/core/chat-commands.c @@ -178,7 +178,7 @@ static RECONNECT_REC *find_reconnect_server(int chat_type, if (rec->conn->chat_type == chat_type) { count++; last_proto_match = rec; - if (g_strcasecmp(rec->conn->address, addr) == 0) { + if (g_ascii_strcasecmp(rec->conn->address, addr) == 0) { if (rec->conn->port == port) return rec; match = rec; diff --git a/src/core/chat-protocols.c b/src/core/chat-protocols.c index ef22dc5c..ee15c087 100644 --- a/src/core/chat-protocols.c +++ b/src/core/chat-protocols.c @@ -59,7 +59,7 @@ CHAT_PROTOCOL_REC *chat_protocol_find(const char *name) for (tmp = chat_protocols; tmp != NULL; tmp = tmp->next) { CHAT_PROTOCOL_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, name) == 0) + if (g_ascii_strcasecmp(rec->name, name) == 0) return rec; } diff --git a/src/core/chatnets.c b/src/core/chatnets.c index 376fab58..3c794ab4 100644 --- a/src/core/chatnets.c +++ b/src/core/chatnets.c @@ -105,7 +105,7 @@ CHATNET_REC *chatnet_find(const char *name) for (tmp = chatnets; tmp != NULL; tmp = tmp->next) { CHATNET_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, name) == 0) + if (g_ascii_strcasecmp(rec->name, name) == 0) return rec; } diff --git a/src/core/commands.c b/src/core/commands.c index 1b811bc4..547f7b16 100644 --- a/src/core/commands.c +++ b/src/core/commands.c @@ -47,7 +47,7 @@ COMMAND_REC *command_find(const char *cmd) for (tmp = commands; tmp != NULL; tmp = tmp->next) { COMMAND_REC *rec = tmp->data; - if (g_strcasecmp(rec->cmd, cmd) == 0) + if (g_ascii_strcasecmp(rec->cmd, cmd) == 0) return rec; } @@ -65,7 +65,7 @@ static COMMAND_MODULE_REC *command_module_find(COMMAND_REC *rec, for (tmp = rec->modules; tmp != NULL; tmp = tmp->next) { COMMAND_MODULE_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, module) == 0) + if (g_ascii_strcasecmp(rec->name, module) == 0) return rec; } @@ -110,7 +110,7 @@ int command_have_sub(const char *command) for (tmp = commands; tmp != NULL; tmp = tmp->next) { COMMAND_REC *rec = tmp->data; - if (g_strncasecmp(rec->cmd, command, len) == 0 && + if (g_ascii_strncasecmp(rec->cmd, command, len) == 0 && rec->cmd[len] == ' ') return TRUE; } @@ -265,7 +265,7 @@ static const char *command_expand(char *cmd) for (tmp = commands; tmp != NULL; tmp = tmp->next) { COMMAND_REC *rec = tmp->data; - if (g_strncasecmp(rec->cmd, cmd, len) == 0 && + if (g_ascii_strncasecmp(rec->cmd, cmd, len) == 0 && strchr(rec->cmd+len, ' ') == NULL) { if (rec->cmd[len] == '\0') { /* full match */ @@ -345,7 +345,7 @@ static GSList *optlist_find(GSList *optlist, const char *option) char *name = optlist->data; if (iscmdtype(*name)) name++; - if (g_strcasecmp(name, option) == 0) + if (g_ascii_strcasecmp(name, option) == 0) return optlist; optlist = optlist->next; @@ -371,7 +371,7 @@ int command_have_option(const char *cmd, const char *option) for (tmp = rec->options; *tmp != NULL; tmp++) { char *name = iscmdtype(**tmp) ? (*tmp)+1 : *tmp; - if (g_strcasecmp(name, option) == 0) + if (g_ascii_strcasecmp(name, option) == 0) return TRUE; } @@ -531,7 +531,7 @@ static int option_find(char **array, const char *option) for (tmp = array; *tmp != NULL; tmp++, index++) { const char *text = *tmp + iscmdtype(**tmp); - if (g_strncasecmp(text, option, len) == 0) { + if (g_ascii_strncasecmp(text, option, len) == 0) { if (text[len] == '\0') { /* full match */ return index; diff --git a/src/core/ignore.c b/src/core/ignore.c index ef7221b7..a7aa106f 100644 --- a/src/core/ignore.c +++ b/src/core/ignore.c @@ -115,7 +115,7 @@ static int ignore_match_pattern(IGNORE_REC *rec, const char *text) #define ignore_match_server(rec, server) \ ((rec)->servertag == NULL || \ - g_strcasecmp((server)->tag, (rec)->servertag) == 0) + g_ascii_strcasecmp((server)->tag, (rec)->servertag) == 0) int ignore_check(SERVER_REC *server, const char *nick, const char *host, const char *channel, const char *text, int level) @@ -198,14 +198,14 @@ IGNORE_REC *ignore_find(const char *servertag, const char *mask, (servertag != NULL && rec->servertag == NULL)) continue; - if (servertag != NULL && g_strcasecmp(servertag, rec->servertag) != 0) + if (servertag != NULL && g_ascii_strcasecmp(servertag, rec->servertag) != 0) continue; } if ((rec->mask == NULL && mask != NULL) || (rec->mask != NULL && mask == NULL)) continue; - if (rec->mask != NULL && g_strcasecmp(rec->mask, mask) != 0) + if (rec->mask != NULL && g_ascii_strcasecmp(rec->mask, mask) != 0) continue; if ((channels == NULL && rec->channels == NULL)) diff --git a/src/core/log.c b/src/core/log.c index 106aafb8..263b3526 100644 --- a/src/core/log.c +++ b/src/core/log.c @@ -247,7 +247,7 @@ static int itemcmp(const char *patt, const char *item) if (!strcmp(patt, "*")) return 0; - return item ? g_strcasecmp(patt, item) : 1; + return item ? g_ascii_strcasecmp(patt, item) : 1; } LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item, @@ -262,7 +262,7 @@ LOG_ITEM_REC *log_item_find(LOG_REC *log, int type, const char *item, if (rec->type == type && itemcmp(rec->name, item) == 0 && (rec->servertag == NULL || (servertag != NULL && - g_strcasecmp(rec->servertag, servertag) == 0))) + g_ascii_strcasecmp(rec->servertag, servertag) == 0))) return rec; } diff --git a/src/core/masks.c b/src/core/masks.c index 92318765..cc28b3bf 100644 --- a/src/core/masks.c +++ b/src/core/masks.c @@ -57,7 +57,7 @@ static int check_mask(SERVER_REC *server, const char *mask, } return wildcards ? match_wildcards(mask, str) : - g_strcasecmp(mask, str) == 0; + g_ascii_strcasecmp(mask, str) == 0; } int mask_match(SERVER_REC *server, const char *mask, @@ -117,7 +117,7 @@ int masks_match(SERVER_REC *server, const char *masks, mask = g_strdup_printf("%s!%s", nick, address); list = g_strsplit(masks, " ", -1); for (tmp = list; *tmp != NULL; tmp++) { - if (g_strcasecmp(*tmp, nick) == 0) { + if (g_ascii_strcasecmp(*tmp, nick) == 0) { found = TRUE; break; } diff --git a/src/core/misc.c b/src/core/misc.c index 7c930e3f..8d821ecc 100644 --- a/src/core/misc.c +++ b/src/core/misc.c @@ -140,7 +140,7 @@ int find_substr(const char *list, const char *item) ptr = strchr(list, ' '); if (ptr == NULL) ptr = list+strlen(list); - if (g_strncasecmp(list, item, ptr-list) == 0 && + if (g_ascii_strncasecmp(list, item, ptr-list) == 0 && item[ptr-list] == '\0') return TRUE; @@ -174,7 +174,7 @@ int strarray_find(char **array, const char *item) index = 0; for (tmp = array; *tmp != NULL; tmp++, index++) { - if (g_strcasecmp(*tmp, item) == 0) + if (g_ascii_strcasecmp(*tmp, item) == 0) return index; } @@ -192,7 +192,7 @@ GSList *gslist_find_string(GSList *list, const char *key) GSList *gslist_find_icase_string(GSList *list, const char *key) { for (list = list; list != NULL; list = list->next) - if (g_strcasecmp(list->data, key) == 0) return list; + if (g_ascii_strcasecmp(list->data, key) == 0) return list; return NULL; } @@ -277,7 +277,7 @@ GList *glist_find_string(GList *list, const char *key) GList *glist_find_icase_string(GList *list, const char *key) { for (list = list; list != NULL; list = list->next) - if (g_strcasecmp(list->data, key) == 0) return list; + if (g_ascii_strcasecmp(list->data, key) == 0) return list; return NULL; } @@ -443,12 +443,12 @@ char *convert_home(const char *path) int g_istr_equal(gconstpointer v, gconstpointer v2) { - return g_strcasecmp((const char *) v, (const char *) v2) == 0; + return g_ascii_strcasecmp((const char *) v, (const char *) v2) == 0; } int g_istr_cmp(gconstpointer v, gconstpointer v2) { - return g_strcasecmp((const char *) v, (const char *) v2); + return g_ascii_strcasecmp((const char *) v, (const char *) v2); } /* a char* hash function from ASU */ diff --git a/src/core/modules.c b/src/core/modules.c index 6dfbd5f8..b002819b 100644 --- a/src/core/modules.c +++ b/src/core/modules.c @@ -237,7 +237,7 @@ MODULE_REC *module_find(const char *name) for (tmp = modules; tmp != NULL; tmp = tmp->next) { MODULE_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, name) == 0) + if (g_ascii_strcasecmp(rec->name, name) == 0) return rec; } diff --git a/src/core/nicklist.c b/src/core/nicklist.c index c38df6d4..d6590261 100644 --- a/src/core/nicklist.c +++ b/src/core/nicklist.c @@ -291,7 +291,7 @@ static void get_nicks_same_hash(gpointer key, NICK_REC *nick, NICKLIST_GET_SAME_REC *rec) { while (nick != NULL) { - if (g_strcasecmp(nick->nick, rec->nick) == 0) { + if (g_ascii_strcasecmp(nick->nick, rec->nick) == 0) { rec->list = g_slist_append(rec->list, rec->channel); rec->list = g_slist_append(rec->list, nick); } @@ -365,7 +365,7 @@ int nicklist_compare(NICK_REC *p1, NICK_REC *p2, const char *nick_prefix) if (p2 == NULL) return 1; if (p1->prefixes[0] == p2->prefixes[0]) - return g_strcasecmp(p1->nick, p2->nick); + return g_ascii_strcasecmp(p1->nick, p2->nick); if (!p1->prefixes[0]) return 1; @@ -384,7 +384,7 @@ int nicklist_compare(NICK_REC *p1, NICK_REC *p2, const char *nick_prefix) } /* we should never have gotten here... */ - return g_strcasecmp(p1->nick, p2->nick); + return g_ascii_strcasecmp(p1->nick, p2->nick); } static void nicklist_update_flags_list(SERVER_REC *server, int gone, @@ -516,7 +516,8 @@ int nick_match_msg(CHANNEL_REC *channel, const char *msg, const char *nick) /* first check for identical match */ len = strlen(nick); - if (g_strncasecmp(msg, nick, len) == 0 && !isalnumhigh((int) msg[len])) + if (g_ascii_strncasecmp(msg, nick, len) == 0 && + !isalnumhigh((int) msg[len])) return TRUE; orignick = nick; diff --git a/src/core/queries.c b/src/core/queries.c index fd51fbb8..a2fd4b0a 100644 --- a/src/core/queries.c +++ b/src/core/queries.c @@ -97,7 +97,7 @@ static QUERY_REC *query_find_server(SERVER_REC *server, const char *nick) for (tmp = server->queries; tmp != NULL; tmp = tmp->next) { QUERY_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, nick) == 0) + if (g_ascii_strcasecmp(rec->name, nick) == 0) return rec; } @@ -117,7 +117,7 @@ QUERY_REC *query_find(SERVER_REC *server, const char *nick) for (tmp = queries; tmp != NULL; tmp = tmp->next) { QUERY_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, nick) == 0) + if (g_ascii_strcasecmp(rec->name, nick) == 0) return rec; } diff --git a/src/core/servers-reconnect.c b/src/core/servers-reconnect.c index 15f9f354..0a08b461 100644 --- a/src/core/servers-reconnect.c +++ b/src/core/servers-reconnect.c @@ -208,7 +208,7 @@ server_connect_copy_skeleton(SERVER_CONNECT_REC *src, int connect_info) #define sserver_connect_ok(rec, net) \ (!(rec)->banned && (rec)->chatnet != NULL && \ - g_strcasecmp((rec)->chatnet, (net)) == 0) + g_ascii_strcasecmp((rec)->chatnet, (net)) == 0) static void sig_reconnect(SERVER_REC *server) { @@ -283,7 +283,7 @@ static void sig_reconnect(SERVER_REC *server) SERVER_SETUP_REC *rec = tmp->data; if (!use_next && server->connrec->port == rec->port && - g_strcasecmp(rec->address, server->connrec->address) == 0) + g_ascii_strcasecmp(rec->address, server->connrec->address) == 0) use_next = TRUE; else if (use_next && sserver_connect_ok(rec, conn->chatnet)) { if (rec == sserver) diff --git a/src/core/servers-setup.c b/src/core/servers-setup.c index fcb0180b..0819ff1a 100644 --- a/src/core/servers-setup.c +++ b/src/core/servers-setup.c @@ -282,7 +282,7 @@ create_chatnet_conn(const char *dest, int port, SERVER_SETUP_REC *rec = tmp->data; if (rec->chatnet == NULL || - g_strcasecmp(rec->chatnet, dest) != 0) + g_ascii_strcasecmp(rec->chatnet, dest) != 0) continue; if (!rec->last_failed) { @@ -342,9 +342,9 @@ SERVER_SETUP_REC *server_setup_find(const char *address, int port, for (tmp = setupservers; tmp != NULL; tmp = tmp->next) { SERVER_SETUP_REC *rec = tmp->data; - if (g_strcasecmp(rec->address, address) == 0 && + if (g_ascii_strcasecmp(rec->address, address) == 0 && (chatnet == NULL || rec->chatnet == NULL || - g_strcasecmp(rec->chatnet, chatnet) == 0)) { + g_ascii_strcasecmp(rec->chatnet, chatnet) == 0)) { server = rec; if (rec->port == port) break; diff --git a/src/core/servers.c b/src/core/servers.c index eb2be4de..4dac2b83 100644 --- a/src/core/servers.c +++ b/src/core/servers.c @@ -553,7 +553,7 @@ SERVER_REC *server_find_tag(const char *tag) for (tmp = servers; tmp != NULL; tmp = tmp->next) { SERVER_REC *server = tmp->data; - if (g_strcasecmp(server->tag, tag) == 0) + if (g_ascii_strcasecmp(server->tag, tag) == 0) return server; } @@ -570,7 +570,7 @@ SERVER_REC *server_find_lookup_tag(const char *tag) for (tmp = lookup_servers; tmp != NULL; tmp = tmp->next) { SERVER_REC *server = tmp->data; - if (g_strcasecmp(server->tag, tag) == 0) + if (g_ascii_strcasecmp(server->tag, tag) == 0) return server; } @@ -588,7 +588,7 @@ SERVER_REC *server_find_chatnet(const char *chatnet) SERVER_REC *server = tmp->data; if (server->connrec->chatnet != NULL && - g_strcasecmp(server->connrec->chatnet, chatnet) == 0) + g_ascii_strcasecmp(server->connrec->chatnet, chatnet) == 0) return server; } diff --git a/src/fe-common/core/chat-completion.c b/src/fe-common/core/chat-completion.c index a25f63c6..d3e018ad 100644 --- a/src/fe-common/core/chat-completion.c +++ b/src/fe-common/core/chat-completion.c @@ -57,7 +57,7 @@ static LAST_MSG_REC *last_msg_find(GSList *list, const char *nick) while (list != NULL) { LAST_MSG_REC *rec = list->data; - if (g_strcasecmp(rec->nick, nick) == 0) + if (g_ascii_strcasecmp(rec->nick, nick) == 0) return rec; list = list->next; } @@ -269,7 +269,7 @@ static void completion_msg_server(GSList **list, SERVER_REC *server, for (; tmp != NULL; tmp = tmp->next) { LAST_MSG_REC *rec = tmp->data; - if (len != 0 && g_strncasecmp(rec->nick, nick, len) != 0) + if (len != 0 && g_ascii_strncasecmp(rec->nick, nick, len) != 0) continue; msg = g_new(LAST_MSG_REC, 1); @@ -352,7 +352,7 @@ static void complete_from_nicklist(GList **outlist, CHANNEL_REC *channel, for (tmp = mchannel->lastmsgs; tmp != NULL; tmp = tmp->next) { LAST_MSG_REC *rec = tmp->data; - if (g_strncasecmp(rec->nick, nick, len) == 0 && + if (g_ascii_strncasecmp(rec->nick, nick, len) == 0 && glist_find_icase_string(*outlist, rec->nick) == NULL) { str = g_strconcat(rec->nick, suffix, NULL); if (completion_lowercase) ascii_strdown(str); @@ -404,7 +404,7 @@ static GList *completion_nicks_nonstrict(CHANNEL_REC *channel, *out = '\0'; /* add to list if 'cleaned' nick matches */ - if (g_strncasecmp(str, nick, len) == 0) { + if (g_ascii_strncasecmp(str, nick, len) == 0) { tnick = g_strconcat(rec->nick, suffix, NULL); if (completion_lowercase) ascii_strdown(tnick); @@ -447,7 +447,7 @@ static GList *completion_channel_nicks(CHANNEL_REC *channel, const char *nick, for (tmp = nicks; tmp != NULL; tmp = tmp->next) { NICK_REC *rec = tmp->data; - if (g_strncasecmp(rec->nick, nick, len) == 0 && + if (g_ascii_strncasecmp(rec->nick, nick, len) == 0 && rec != channel->ownnick) { str = g_strconcat(rec->nick, suffix, NULL); if (completion_lowercase) @@ -501,7 +501,7 @@ GList *completion_get_servertags(const char *word) for (tmp = servers; tmp != NULL; tmp = tmp->next) { SERVER_REC *rec = tmp->data; - if (g_strncasecmp(rec->tag, word, len) == 0) { + if (g_ascii_strncasecmp(rec->tag, word, len) == 0) { if (rec == active_win->active_server) list = g_list_prepend(list, g_strdup(rec->tag)); else @@ -529,9 +529,9 @@ GList *completion_get_channels(SERVER_REC *server, const char *word) for (; tmp != NULL; tmp = tmp->next) { CHANNEL_REC *rec = tmp->data; - if (g_strncasecmp(rec->visible_name, word, len) == 0) + if (g_ascii_strncasecmp(rec->visible_name, word, len) == 0) list = g_list_append(list, g_strdup(rec->visible_name)); - else if (g_strncasecmp(rec->name, word, len) == 0) + else if (g_ascii_strncasecmp(rec->name, word, len) == 0) list = g_list_append(list, g_strdup(rec->name)); } @@ -539,7 +539,7 @@ GList *completion_get_channels(SERVER_REC *server, const char *word) for (tmp = setupchannels; tmp != NULL; tmp = tmp->next) { CHANNEL_SETUP_REC *rec = tmp->data; - if (g_strncasecmp(rec->name, word, len) == 0 && + if (g_ascii_strncasecmp(rec->name, word, len) == 0 && glist_find_icase_string(list, rec->name) == NULL) list = g_list_append(list, g_strdup(rec->name)); @@ -569,7 +569,7 @@ GList *completion_get_aliases(const char *word) if (node->type != NODE_TYPE_KEY) continue; - if (len != 0 && g_strncasecmp(node->key, word, len) != 0) + if (len != 0 && g_ascii_strncasecmp(node->key, word, len) != 0) continue; list = g_list_append(list, g_strdup(node->key)); @@ -655,7 +655,7 @@ static void sig_complete_word(GList **list, WINDOW_REC *window, channel = CHANNEL(window->active); query = QUERY(window->active); if (channel == NULL && query != NULL && - g_strncasecmp(word, query->name, strlen(word)) == 0) { + g_ascii_strncasecmp(word, query->name, strlen(word)) == 0) { /* completion in query */ *list = g_list_append(*list, g_strdup(query->name)); } else if (channel != NULL) { @@ -737,7 +737,7 @@ static void sig_erase_complete_msg(WINDOW_REC *window, const char *word, for (tmp = mserver->lastmsgs; tmp != NULL; tmp = tmp->next) { LAST_MSG_REC *rec = tmp->data; - if (g_strcasecmp(rec->nick, word) == 0) { + if (g_ascii_strcasecmp(rec->nick, word) == 0) { last_msg_destroy(&mserver->lastmsgs, rec); break; } @@ -760,7 +760,7 @@ GList *completion_get_chatnets(const char *word) for (tmp = chatnets; tmp != NULL; tmp = tmp->next) { CHATNET_REC *rec = tmp->data; - if (g_strncasecmp(rec->name, word, len) == 0) + if (g_ascii_strncasecmp(rec->name, word, len) == 0) list = g_list_append(list, g_strdup(rec->name)); } @@ -781,7 +781,7 @@ GList *completion_get_servers(const char *word) for (tmp = setupservers; tmp != NULL; tmp = tmp->next) { SERVER_SETUP_REC *rec = tmp->data; - if (g_strncasecmp(rec->address, word, len) == 0) + if (g_ascii_strncasecmp(rec->address, word, len) == 0) list = g_list_append(list, g_strdup(rec->address)); } @@ -809,7 +809,7 @@ GList *completion_get_targets(const char *word) if (node->type != NODE_TYPE_KEY) continue; - if (len != 0 && g_strncasecmp(node->key, word, len) != 0) + if (len != 0 && g_ascii_strncasecmp(node->key, word, len) != 0) continue; list = g_list_append(list, g_strdup(node->key)); @@ -929,9 +929,9 @@ static void sig_complete_window(GList **list, WINDOW_REC *window, win = tmp->data; item = win->active; - if (win->name != NULL && g_strncasecmp(win->name, word, len) == 0) + if (win->name != NULL && g_ascii_strncasecmp(win->name, word, len) == 0) *list = g_list_append(*list, g_strdup(win->name)); - if (item != NULL && g_strncasecmp(item->visible_name, word, len) == 0) + if (item != NULL && g_ascii_strncasecmp(item->visible_name, word, len) == 0) *list = g_list_append(*list, g_strdup(item->visible_name)); } diff --git a/src/fe-common/core/command-history.c b/src/fe-common/core/command-history.c index 9ca0eca6..afe19aa7 100644 --- a/src/fe-common/core/command-history.c +++ b/src/fe-common/core/command-history.c @@ -79,7 +79,8 @@ HISTORY_REC *command_history_find_name(const char *name) for (tmp = histories; tmp != NULL; tmp = tmp->next) { HISTORY_REC *rec = tmp->data; - if (rec->name != NULL && g_strcasecmp(rec->name, name) == 0) + if (rec->name != NULL && + g_ascii_strcasecmp(rec->name, name) == 0) return rec; } diff --git a/src/fe-common/core/completion.c b/src/fe-common/core/completion.c index 91115e61..db21fcb8 100644 --- a/src/fe-common/core/completion.c +++ b/src/fe-common/core/completion.c @@ -362,7 +362,7 @@ static GList *completion_get_settings(const char *key, SettingType type) SETTINGS_REC *rec = tmp->data; if ((type == -1 || rec->type == type) && - g_strncasecmp(rec->key, key, len) == 0) + g_ascii_strncasecmp(rec->key, key, len) == 0) complist = g_list_insert_sorted(complist, g_strdup(rec->key), (GCompareFunc) g_istr_cmp); } g_slist_free(sets); @@ -391,7 +391,7 @@ static GList *completion_get_aliases(const char *alias, char cmdchar) if (node->type != NODE_TYPE_KEY) continue; - if (g_strncasecmp(node->key, alias, len) == 0) { + if (g_ascii_strncasecmp(node->key, alias, len) == 0) { word = g_strdup_printf("%c%s", cmdchar, node->key); /* add matching alias to completion list, aliases will be appended after command completions and kept in @@ -422,7 +422,7 @@ static GList *completion_get_commands(const char *cmd, char cmdchar) if (strchr(rec->cmd, ' ') != NULL) continue; - if (g_strncasecmp(rec->cmd, cmd, len) == 0) { + if (g_ascii_strncasecmp(rec->cmd, cmd, len) == 0) { word = cmdchar == '\0' ? g_strdup(rec->cmd) : g_strdup_printf("%c%s", cmdchar, rec->cmd); if (glist_find_icase_string(complist, word) == NULL) @@ -459,7 +459,7 @@ static GList *completion_get_subcommands(const char *cmd) if (strchr(rec->cmd+len, ' ') != NULL) continue; - if (g_strncasecmp(rec->cmd, cmd, len) == 0) + if (g_ascii_strncasecmp(rec->cmd, cmd, len) == 0) complist = g_list_insert_sorted(complist, g_strdup(rec->cmd+skip), (GCompareFunc) g_istr_cmp); } return complist; @@ -483,7 +483,7 @@ static GList *completion_get_options(const char *cmd, const char *option) for (tmp = rec->options; *tmp != NULL; tmp++) { const char *optname = *tmp + iscmdtype(**tmp); - if (len == 0 || g_strncasecmp(optname, option, len) == 0) + if (len == 0 || g_ascii_strncasecmp(optname, option, len) == 0) list = g_list_append(list, g_strconcat("-", optname, NULL)); } @@ -805,7 +805,7 @@ static void cmd_completion(const char *data) node = tmp->data; if (len == 0 || - g_strncasecmp(node->key, key, len) == 0) { + g_ascii_strncasecmp(node->key, key, len) == 0) { printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_COMPLETION_LINE, node->key, config_node_get_str(node, "value", ""), diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c index 0302cbfa..7b1d7b94 100644 --- a/src/fe-common/core/fe-core-commands.c +++ b/src/fe-common/core/fe-core-commands.c @@ -177,7 +177,7 @@ static void cmd_uptime(char *data) g_return_if_fail(data != NULL); if (*data == '\0') { - uptime = time(NULL) - client_start_time; + uptime = (long)difftime(time(NULL), client_start_time); printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, "Uptime: %ldd %ldh %ldm %lds", uptime/3600/24, uptime/3600%24, @@ -292,7 +292,7 @@ static void event_list_subcommands(const char *command) for (tmp = commands; tmp != NULL; tmp = tmp->next) { COMMAND_REC *rec = tmp->data; - if (g_strncasecmp(rec->cmd, command, len) == 0 && + if (g_ascii_strncasecmp(rec->cmd, command, len) == 0 && rec->cmd[len] == ' ' && strchr(rec->cmd+len+1, ' ') == NULL) { g_string_append_printf(str, "%s ", rec->cmd+len+1); diff --git a/src/fe-common/core/fe-help.c b/src/fe-common/core/fe-help.c index b51b8949..4ea7c89f 100644 --- a/src/fe-common/core/fe-help.c +++ b/src/fe-common/core/fe-help.c @@ -194,11 +194,11 @@ static void show_help(const char *data) items = 0; } - if (last != NULL && g_strcasecmp(rec->cmd, last->cmd) == 0) + if (last != NULL && g_ascii_strcasecmp(rec->cmd, last->cmd) == 0) continue; /* don't display same command twice */ if ((int)strlen(rec->cmd) >= findlen && - g_strncasecmp(rec->cmd, data, findlen) == 0) { + g_ascii_strncasecmp(rec->cmd, data, findlen) == 0) { if (rec->cmd[findlen] == '\0') { fullmatch = TRUE; found = TRUE; diff --git a/src/fe-common/core/fe-ignore-messages.c b/src/fe-common/core/fe-ignore-messages.c index 32e63260..fd889783 100644 --- a/src/fe-common/core/fe-ignore-messages.c +++ b/src/fe-common/core/fe-ignore-messages.c @@ -66,7 +66,7 @@ static void sig_message_kick(SERVER_REC *server, const char *channel, const char *address, const char *reason) { /* never ignore if you were kicked */ - if (g_strcasecmp(nick, server->nick) != 0 && + if (g_ascii_strcasecmp(nick, server->nick) != 0 && ignore_check(server, kicker, address, channel, reason, MSGLEVEL_KICKS)) signal_stop(); diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c index 3008d0a7..5ee72d8b 100644 --- a/src/fe-common/core/fe-log.c +++ b/src/fe-common/core/fe-log.c @@ -375,7 +375,7 @@ static void sig_server_disconnected(SERVER_REC *server) logitem = log->items->data; if (logitem->type == LOG_ITEM_TARGET && logitem->servertag != NULL && - g_strcasecmp(logitem->servertag, server->tag) == 0 && + g_ascii_strcasecmp(logitem->servertag, server->tag) == 0 && server_ischannel(server, logitem->name)) /* kludge again.. so we won't close dcc chats */ log_close(log); } diff --git a/src/fe-common/core/fe-queries.c b/src/fe-common/core/fe-queries.c index adf2b3d4..7599fb23 100644 --- a/src/fe-common/core/fe-queries.c +++ b/src/fe-common/core/fe-queries.c @@ -127,7 +127,7 @@ static void signal_query_nick_changed(QUERY_REC *query, const char *oldnick) query->name, MSGLEVEL_NICKS, NULL); /* don't print the nick change message if only the case was changed */ - if (g_strcasecmp(query->name, oldnick) != 0) { + if (g_ascii_strcasecmp(query->name, oldnick) != 0) { printformat_dest(&dest, TXT_NICK_CHANGED, oldnick, query->name, query->name, query->address == NULL ? "" : query->address); @@ -160,7 +160,7 @@ static void sig_server_connected(SERVER_REC *server) if (rec->server == NULL && (rec->server_tag == NULL || - g_strcasecmp(rec->server_tag, server->tag) == 0)) { + g_ascii_strcasecmp(rec->server_tag, server->tag) == 0)) { window_item_change_server((WI_ITEM_REC *) rec, server); server->queries = g_slist_append(server->queries, rec); } diff --git a/src/fe-common/core/fe-settings.c b/src/fe-common/core/fe-settings.c index 59f136b2..96e03ceb 100644 --- a/src/fe-common/core/fe-settings.c +++ b/src/fe-common/core/fe-settings.c @@ -205,7 +205,7 @@ static void cmd_toggle(const char *data) static int config_key_compare(CONFIG_NODE *node1, CONFIG_NODE *node2) { - return g_strcasecmp(node1->key, node2->key); + return g_ascii_strcasecmp(node1->key, node2->key); } static void show_aliases(const char *alias) @@ -228,7 +228,7 @@ static void show_aliases(const char *alias) if (node->type != NODE_TYPE_KEY) continue; - if (aliaslen != 0 && g_strncasecmp(node->key, alias, aliaslen) != 0) + if (aliaslen != 0 && g_ascii_strncasecmp(node->key, alias, aliaslen) != 0) continue; list = g_slist_insert_sorted(list, node, (GCompareFunc) config_key_compare); diff --git a/src/fe-common/core/fe-windows.c b/src/fe-common/core/fe-windows.c index 30df327b..aa5ea397 100644 --- a/src/fe-common/core/fe-windows.c +++ b/src/fe-common/core/fe-windows.c @@ -311,8 +311,8 @@ WINDOW_REC *window_find_closest(void *server, const char *name, int level) generic msgs window. And check for prefixed !channel name --Borys */ - if (g_strcasecmp(name, item->visible_name) == 0 || - g_strcasecmp(name, (char *) window_item_get_target((WI_ITEM_REC *) item)) == 0) + if (g_ascii_strcasecmp(name, item->visible_name) == 0 || + g_ascii_strcasecmp(name, (char *) window_item_get_target((WI_ITEM_REC *) item)) == 0) return namewindow; } } @@ -362,7 +362,8 @@ WINDOW_REC *window_find_name(const char *name) for (tmp = windows; tmp != NULL; tmp = tmp->next) { WINDOW_REC *rec = tmp->data; - if (rec->name != NULL && g_strcasecmp(rec->name, name) == 0) + if (rec->name != NULL && + g_ascii_strcasecmp(rec->name, name) == 0) return rec; } @@ -510,8 +511,8 @@ WINDOW_BIND_REC *window_bind_find(WINDOW_REC *window, const char *servertag, for (tmp = window->bound_items; tmp != NULL; tmp = tmp->next) { WINDOW_BIND_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, name) == 0 && - g_strcasecmp(rec->servertag, servertag) == 0) + if (g_ascii_strcasecmp(rec->name, name) == 0 && + g_ascii_strcasecmp(rec->servertag, servertag) == 0) return rec; } @@ -543,7 +544,7 @@ static void sig_server_connected(SERVER_REC *server) WINDOW_REC *rec = tmp->data; if ((rec->servertag == NULL || - g_strcasecmp(rec->servertag, server->tag) == 0) && + g_ascii_strcasecmp(rec->servertag, server->tag) == 0) && (rec->active_server == NULL || (rec == active_win && rec->items == NULL))) window_change_server(rec, server); diff --git a/src/fe-common/core/formats.c b/src/fe-common/core/formats.c index 8fb2a6f0..f2a82030 100644 --- a/src/fe-common/core/formats.c +++ b/src/fe-common/core/formats.c @@ -55,7 +55,7 @@ int format_find_tag(const char *module, const char *tag) for (n = 0; formats[n].def != NULL; n++) { if (formats[n].tag != NULL && - g_strcasecmp(formats[n].tag, tag) == 0) + g_ascii_strcasecmp(formats[n].tag, tag) == 0) return n; } diff --git a/src/fe-common/core/hilight-text.c b/src/fe-common/core/hilight-text.c index f501db93..34c5c643 100644 --- a/src/fe-common/core/hilight-text.c +++ b/src/fe-common/core/hilight-text.c @@ -161,7 +161,7 @@ static HILIGHT_REC *hilight_find(const char *text, char **channels) for (tmp = hilights; tmp != NULL; tmp = tmp->next) { HILIGHT_REC *rec = tmp->data; - if (g_strcasecmp(rec->text, text) != 0) + if (g_ascii_strcasecmp(rec->text, text) != 0) continue; if ((channels == NULL && rec->channels == NULL)) diff --git a/src/fe-common/core/keyboard.c b/src/fe-common/core/keyboard.c index 49bcd399..94c6bfd7 100644 --- a/src/fe-common/core/keyboard.c +++ b/src/fe-common/core/keyboard.c @@ -164,7 +164,7 @@ KEYINFO_REC *key_info_find(const char *id) for (tmp = keyinfos; tmp != NULL; tmp = tmp->next) { KEYINFO_REC *rec = tmp->data; - if (g_strcasecmp(rec->id, id) == 0) + if (g_ascii_strcasecmp(rec->id, id) == 0) return rec; } @@ -661,7 +661,7 @@ static void cmd_show_keys(const char *searchkey, int full) for (key = rec->keys; key != NULL; key = key->next) { KEY_REC *rec = key->data; - if ((len == 0 || g_strncasecmp(rec->key, searchkey, len) == 0) && + if ((len == 0 || g_ascii_strncasecmp(rec->key, searchkey, len) == 0) && (!full || rec->key[len] == '\0')) { printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_LIST, rec->key, rec->info->id, rec->data == NULL ? "" : rec->data); @@ -739,7 +739,7 @@ static GList *completion_get_keyinfos(const char *info) for (tmp = keyinfos; tmp != NULL; tmp = tmp->next) { KEYINFO_REC *rec = tmp->data; - if (g_strncasecmp(rec->id, info, len) == 0) + if (g_ascii_strncasecmp(rec->id, info, len) == 0) list = g_list_append(list, g_strdup(rec->id)); } diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index 7c50c28c..a3a23c2d 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -799,7 +799,7 @@ static THEME_REC *theme_find(const char *name) for (tmp = themes; tmp != NULL; tmp = tmp->next) { THEME_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, name) == 0) + if (g_ascii_strcasecmp(rec->name, name) == 0) return rec; } @@ -970,7 +970,7 @@ typedef struct { static int theme_search_equal(THEME_SEARCH_REC *r1, THEME_SEARCH_REC *r2) { - return g_strcasecmp(r1->short_name, r2->short_name); + return g_ascii_strcasecmp(r1->short_name, r2->short_name); } static void theme_get_modules(char *module, FORMAT_REC *formats, GSList **list) @@ -1001,7 +1001,7 @@ static THEME_SEARCH_REC *theme_search(GSList *list, const char *module) while (list != NULL) { rec = list->data; - if (g_strcasecmp(rec->short_name, module) == 0) + if (g_ascii_strcasecmp(rec->short_name, module) == 0) return rec; list = list->next; } @@ -1026,7 +1026,7 @@ static void theme_show(THEME_SEARCH_REC *rec, const char *key, const char *value if (formats[n].tag == NULL) last_title = text; - else if ((value != NULL && key != NULL && g_strcasecmp(formats[n].tag, key) == 0) || + else if ((value != NULL && key != NULL && g_ascii_strcasecmp(formats[n].tag, key) == 0) || (value == NULL && (key == NULL || stristr(formats[n].tag, key) != NULL))) { if (first) { printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_FORMAT_TITLE, rec->short_name, formats[0].def); @@ -1086,7 +1086,7 @@ static void cmd_format(const char *data) for (tmp = modules; tmp != NULL; tmp = tmp->next) { THEME_SEARCH_REC *rec = tmp->data; - if (module == NULL || g_strcasecmp(rec->short_name, module) == 0) + if (module == NULL || g_ascii_strcasecmp(rec->short_name, module) == 0) theme_show(rec, key, value, reset); } g_slist_foreach(modules, (GFunc) g_free, NULL); @@ -1207,7 +1207,7 @@ static void complete_format_list(THEME_SEARCH_REC *rec, const char *key, GList * for (n = 1; formats[n].def != NULL; n++) { const char *item = formats[n].tag; - if (item != NULL && g_strncasecmp(item, key, len) == 0) + if (item != NULL && g_ascii_strncasecmp(item, key, len) == 0) *list = g_list_append(*list, g_strdup(item)); } } @@ -1226,7 +1226,7 @@ static GList *completion_get_formats(const char *module, const char *key) for (tmp = modules; tmp != NULL; tmp = tmp->next) { THEME_SEARCH_REC *rec = tmp->data; - if (*module == '\0' || g_strcasecmp(rec->short_name, module) == 0) + if (*module == '\0' || g_ascii_strcasecmp(rec->short_name, module) == 0) complete_format_list(rec, key, &list); } } diff --git a/src/fe-common/core/window-items.c b/src/fe-common/core/window-items.c index fcbbe2b1..303a80db 100644 --- a/src/fe-common/core/window-items.c +++ b/src/fe-common/core/window-items.c @@ -218,7 +218,7 @@ WI_ITEM_REC *window_item_find_window(WINDOW_REC *window, WI_ITEM_REC *rec = tmp->data; if ((server == NULL || rec->server == server) && - g_strcasecmp(name, rec->visible_name) == 0) + g_ascii_strcasecmp(name, rec->visible_name) == 0) return rec; } diff --git a/src/fe-common/irc/fe-events-numeric.c b/src/fe-common/irc/fe-events-numeric.c index b6b6e8a8..d1cd12d4 100644 --- a/src/fe-common/irc/fe-events-numeric.c +++ b/src/fe-common/irc/fe-events-numeric.c @@ -336,8 +336,10 @@ static void event_away(IRC_SERVER_REC *server, const char *data) params = event_get_params(data, 3, NULL, &nick, &awaymsg); recoded = recode_in(SERVER(server), awaymsg, nick); if (!settings_get_bool("show_away_once") || - last_away_nick == NULL || g_strcasecmp(last_away_nick, nick) != 0 || - last_away_msg == NULL || g_strcasecmp(last_away_msg, awaymsg) != 0) { + last_away_nick == NULL || + g_ascii_strcasecmp(last_away_nick, nick) != 0 || + last_away_msg == NULL || + g_ascii_strcasecmp(last_away_msg, awaymsg) != 0) { /* don't show the same away message from the same nick all the time */ g_free_not_null(last_away_nick); diff --git a/src/fe-common/irc/fe-events.c b/src/fe-common/irc/fe-events.c index a6fd8599..5cde9e4b 100644 --- a/src/fe-common/irc/fe-events.c +++ b/src/fe-common/irc/fe-events.c @@ -209,7 +209,7 @@ static void event_nick(IRC_SERVER_REC *server, const char *data, params = event_get_params(data, 1, &newnick); /* NOTE: server->nick was already changed in irc/core/irc-nicklist.c */ - signal_emit(g_strcasecmp(newnick, server->nick) == 0 ? + signal_emit(g_ascii_strcasecmp(newnick, server->nick) == 0 ? "message own_nick" : "message nick", 4, server, newnick, sender, addr); @@ -330,7 +330,7 @@ static void event_connected(IRC_SERVER_REC *server) g_return_if_fail(server != NULL); nick = server->connrec->nick; - if (g_strcasecmp(server->nick, nick) == 0) + if (g_ascii_strcasecmp(server->nick, nick) == 0) return; /* someone has our nick, find out who. */ diff --git a/src/fe-common/irc/fe-irc-queries.c b/src/fe-common/irc/fe-irc-queries.c index ec55a5db..0861c9e4 100644 --- a/src/fe-common/irc/fe-irc-queries.c +++ b/src/fe-common/irc/fe-irc-queries.c @@ -35,7 +35,7 @@ static QUERY_REC *query_find_address(SERVER_REC *server, const char *address) QUERY_REC *rec = tmp->data; if (*rec->name != '=' && rec->address != NULL && - g_strcasecmp(address, rec->address) == 0) + g_ascii_strcasecmp(address, rec->address) == 0) return rec; } diff --git a/src/fe-common/irc/fe-modes.c b/src/fe-common/irc/fe-modes.c index 48a83515..027d7a76 100644 --- a/src/fe-common/irc/fe-modes.c +++ b/src/fe-common/irc/fe-modes.c @@ -184,7 +184,7 @@ static void sig_message_mode(IRC_SERVER_REC *server, const char *channel, chanrec = !group_multi_mode ? NULL : irc_channel_find(server, channel); - if (chanrec != NULL && g_strcasecmp(nick, server->nick) != 0) + if (chanrec != NULL && g_ascii_strcasecmp(nick, server->nick) != 0) msg_multi_mode(chanrec, nick, addr, mode); else { printformat(server, channel, MSGLEVEL_MODES, diff --git a/src/fe-common/irc/fe-netjoin.c b/src/fe-common/irc/fe-netjoin.c index 35ee43f5..35c463e4 100644 --- a/src/fe-common/irc/fe-netjoin.c +++ b/src/fe-common/irc/fe-netjoin.c @@ -119,7 +119,7 @@ static NETJOIN_REC *netjoin_find(IRC_SERVER_REC *server, const char *nick) for (tmp = srec->netjoins; tmp != NULL; tmp = tmp->next) { NETJOIN_REC *rec = tmp->data; - if (g_strcasecmp(rec->nick, nick) == 0) + if (g_ascii_strcasecmp(rec->nick, nick) == 0) return rec; } diff --git a/src/fe-common/irc/fe-netsplit.c b/src/fe-common/irc/fe-netsplit.c index 788f6d00..3eb30796 100644 --- a/src/fe-common/irc/fe-netsplit.c +++ b/src/fe-common/irc/fe-netsplit.c @@ -73,7 +73,7 @@ static GSList *get_source_servers(const char *server, GSList **servers) NETSPLIT_SERVER_REC *rec = tmp->data; next = tmp->next; - if (g_strcasecmp(rec->server, server) == 0) { + if (g_ascii_strcasecmp(rec->server, server) == 0) { rec->prints = 0; list = g_slist_append(list, rec); *servers = g_slist_remove(*servers, rec); @@ -91,7 +91,7 @@ static TEMP_SPLIT_CHAN_REC *find_split_chan(TEMP_SPLIT_REC *rec, for (tmp = rec->channels; tmp != NULL; tmp = tmp->next) { TEMP_SPLIT_CHAN_REC *chanrec = tmp->data; - if (g_strcasecmp(chanrec->name, name) == 0) + if (g_ascii_strcasecmp(chanrec->name, name) == 0) return chanrec; } @@ -292,7 +292,7 @@ static void sig_netsplit_servers(void) static int split_equal(NETSPLIT_REC *n1, NETSPLIT_REC *n2) { - return g_strcasecmp(n1->nick, n2->nick); + return g_ascii_strcasecmp(n1->nick, n2->nick); } static void split_get(void *key, NETSPLIT_REC *rec, GSList **list) diff --git a/src/irc/core/bans.c b/src/irc/core/bans.c index 1d46acb8..de799812 100644 --- a/src/irc/core/bans.c +++ b/src/irc/core/bans.c @@ -150,7 +150,7 @@ void ban_remove(IRC_CHANNEL_REC *channel, const char *bans) if (!found) { rec = NULL; - if (!g_strcasecmp(*ban, BAN_LAST)) { + if (!g_ascii_strcasecmp(*ban, BAN_LAST)) { /* unnbanning last set ban */ rec = g_slist_nth_data(channel->banlist, g_slist_length(channel->banlist) - 1); diff --git a/src/irc/core/channel-events.c b/src/irc/core/channel-events.c index 7d4fbd39..9198ed82 100644 --- a/src/irc/core/channel-events.c +++ b/src/irc/core/channel-events.c @@ -199,7 +199,7 @@ static IRC_CHANNEL_REC *channel_find_unjoined(IRC_SERVER_REC *server, if (!IS_IRC_CHANNEL(rec) || rec->joined) continue; - if (g_strncasecmp(channel, rec->name, len) == 0 && + if (g_ascii_strncasecmp(channel, rec->name, len) == 0 && (len > 20 || rec->name[len] == '\0')) return rec; } @@ -214,7 +214,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data, const char *nic g_return_if_fail(data != NULL); - if (g_strcasecmp(nick, server->nick) != 0) { + if (g_ascii_strcasecmp(nick, server->nick) != 0) { /* someone else joined channel, no need to do anything */ return; } @@ -286,7 +286,7 @@ static void event_part(IRC_SERVER_REC *server, const char *data, const char *nic g_return_if_fail(data != NULL); - if (g_strcasecmp(nick, server->nick) != 0) { + if (g_ascii_strcasecmp(nick, server->nick) != 0) { /* someone else part, no need to do anything here */ return; } @@ -311,7 +311,7 @@ static void event_kick(IRC_SERVER_REC *server, const char *data) params = event_get_params(data, 3, &channel, &nick, &reason); - if (g_strcasecmp(nick, server->nick) != 0) { + if (g_ascii_strcasecmp(nick, server->nick) != 0) { /* someone else was kicked, no need to do anything */ g_free(params); return; diff --git a/src/irc/core/channel-rejoin.c b/src/irc/core/channel-rejoin.c index c9528edc..d518f0c2 100644 --- a/src/irc/core/channel-rejoin.c +++ b/src/irc/core/channel-rejoin.c @@ -58,7 +58,7 @@ static REJOIN_REC *rejoin_find(IRC_SERVER_REC *server, const char *channel) for (tmp = server->rejoin_channels; tmp != NULL; tmp = tmp->next) { REJOIN_REC *rec = tmp->data; - if (g_strcasecmp(rec->channel, channel) == 0) + if (g_ascii_strcasecmp(rec->channel, channel) == 0) return rec; } diff --git a/src/irc/core/ctcp.c b/src/irc/core/ctcp.c index be2edba0..accbb57f 100644 --- a/src/irc/core/ctcp.c +++ b/src/irc/core/ctcp.c @@ -44,7 +44,7 @@ static CTCP_CMD_REC *ctcp_cmd_find(const char *name) for (tmp = ctcp_cmds; tmp != NULL; tmp = tmp->next) { CTCP_CMD_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, name) == 0) + if (g_ascii_strcasecmp(rec->name, name) == 0) return rec; } diff --git a/src/irc/core/irc-commands.c b/src/irc/core/irc-commands.c index 52a9a748..301b3300 100644 --- a/src/irc/core/irc-commands.c +++ b/src/irc/core/irc-commands.c @@ -418,7 +418,7 @@ static void cmd_whois(const char *data, IRC_SERVER_REC *server, g_string_printf(tmpstr, "WHOIS %s", query); else { g_string_printf(tmpstr, "WHOIS %s %s", qserver, query); - if (g_strcasecmp(qserver, query) == 0) + if (g_ascii_strcasecmp(qserver, query) == 0) event_402 = "whois event not found"; } diff --git a/src/irc/core/irc-expandos.c b/src/irc/core/irc-expandos.c index a1030624..5d2de503 100644 --- a/src/irc/core/irc-expandos.c +++ b/src/irc/core/irc-expandos.c @@ -116,7 +116,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data, { g_return_if_fail(nick != NULL); - if (g_strcasecmp(nick, server->nick) != 0) { + if (g_ascii_strcasecmp(nick, server->nick) != 0) { g_free_not_null(last_join); last_join = g_strdup(nick); } diff --git a/src/irc/core/irc-nicklist.c b/src/irc/core/irc-nicklist.c index 8a75233c..cbf8b9fa 100644 --- a/src/irc/core/irc-nicklist.c +++ b/src/irc/core/irc-nicklist.c @@ -342,9 +342,9 @@ static void event_nick_in_use(IRC_SERVER_REC *server, const char *data) } /* nick already in use - need to change it .. */ - if (g_strcasecmp(server->nick, server->connrec->nick) == 0 && + if (g_ascii_strcasecmp(server->nick, server->connrec->nick) == 0 && server->connrec->alternate_nick != NULL && - g_strcasecmp(server->connrec->alternate_nick, server->nick) != 0) { + g_ascii_strcasecmp(server->connrec->alternate_nick, server->nick) != 0) { /* first try, so try the alternative nick.. */ g_free(server->nick); server->nick = g_strdup(server->connrec->alternate_nick); @@ -400,10 +400,10 @@ static void event_nick(IRC_SERVER_REC *server, const char *data, params = event_get_params(data, 1, &nick); - if (g_strcasecmp(orignick, server->nick) == 0) { + if (g_ascii_strcasecmp(orignick, server->nick) == 0) { /* You changed your nick */ if (server->last_nick != NULL && - g_strcasecmp(server->last_nick, nick) == 0) { + g_ascii_strcasecmp(server->last_nick, nick) == 0) { /* changed with /NICK - keep it as wanted nick */ g_free(server->connrec->nick); server->connrec->nick = g_strdup(nick); diff --git a/src/irc/core/irc-servers.c b/src/irc/core/irc-servers.c index 23960a38..787044b3 100644 --- a/src/irc/core/irc-servers.c +++ b/src/irc/core/irc-servers.c @@ -90,7 +90,8 @@ static void send_message(SERVER_REC *server, const char *target, if (*target == '!') { /* !chan -> !12345chan */ channel = channel_find(server, target); - if (channel != NULL && g_strcasecmp(channel->name, target) != 0) + if (channel != NULL && + g_ascii_strcasecmp(channel->name, target) != 0) target = channel->name; } diff --git a/src/irc/core/massjoin.c b/src/irc/core/massjoin.c index 1322db7d..6cc2b7c7 100644 --- a/src/irc/core/massjoin.c +++ b/src/irc/core/massjoin.c @@ -42,7 +42,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data, g_return_if_fail(data != NULL); - if (g_strcasecmp(nick, server->nick) == 0) { + if (g_ascii_strcasecmp(nick, server->nick) == 0) { /* You joined, no need to do anything here */ return; } @@ -104,7 +104,7 @@ static void event_part(IRC_SERVER_REC *server, const char *data, g_return_if_fail(data != NULL); - if (g_strcasecmp(nick, server->nick) == 0) { + if (g_ascii_strcasecmp(nick, server->nick) == 0) { /* you left channel, no need to do anything here */ return; } @@ -140,7 +140,7 @@ static void event_quit(IRC_SERVER_REC *server, const char *data, g_return_if_fail(data != NULL); - if (g_strcasecmp(nick, server->nick) == 0) { + if (g_ascii_strcasecmp(nick, server->nick) == 0) { /* you quit, don't do anything here */ return; } @@ -171,7 +171,7 @@ static void event_kick(IRC_SERVER_REC *server, const char *data) params = event_get_params(data, 3, &channel, &nick, &reason); - if (g_strcasecmp(nick, server->nick) == 0) { + if (g_ascii_strcasecmp(nick, server->nick) == 0) { /* you were kicked, no need to do anything */ g_free(params); return; diff --git a/src/irc/core/mode-lists.c b/src/irc/core/mode-lists.c index 875d25b9..73b7a6b2 100644 --- a/src/irc/core/mode-lists.c +++ b/src/irc/core/mode-lists.c @@ -53,7 +53,7 @@ BAN_REC *banlist_find(GSList *list, const char *ban) for (tmp = list; tmp != NULL; tmp = tmp->next) { BAN_REC *rec = tmp->data; - if (g_strcasecmp(rec->ban, ban) == 0) + if (g_ascii_strcasecmp(rec->ban, ban) == 0) return rec; } diff --git a/src/irc/core/modes.c b/src/irc/core/modes.c index 3b1e7d21..7054182f 100644 --- a/src/irc/core/modes.c +++ b/src/irc/core/modes.c @@ -301,7 +301,7 @@ void modes_type_prefix(IRC_CHANNEL_REC *channel, const char *setby, { int umode = (unsigned char) mode; - if (g_strcasecmp(channel->server->nick, arg) == 0) { + if (g_ascii_strcasecmp(channel->server->nick, arg) == 0) { /* see if we need to update channel->chanop */ const char *prefix = g_hash_table_lookup(channel->server->isupport, "PREFIX"); @@ -692,7 +692,7 @@ static int get_wildcard_nicks(GString *output, const char *mask, (voice == 1 && !rec->voice) || (voice == 0 && rec->voice)) continue; - if (g_strcasecmp(rec->nick, channel->server->nick) == 0) + if (g_ascii_strcasecmp(rec->nick, channel->server->nick) == 0) continue; g_string_append_printf(output, "%s ", rec->nick); @@ -859,7 +859,7 @@ static void cmd_mode(const char *data, IRC_SERVER_REC *server, } else if (ischannel(*target)) channel_set_mode(server, target, mode); else { - if (g_strcasecmp(target, server->nick) == 0) { + if (g_ascii_strcasecmp(target, server->nick) == 0) { server_redirect_event(server, "mode user", 1, target, -1, NULL, "event mode", "requested usermode change", NULL); } diff --git a/src/irc/core/netsplit.c b/src/irc/core/netsplit.c index 706212ee..0642846f 100644 --- a/src/irc/core/netsplit.c +++ b/src/irc/core/netsplit.c @@ -43,8 +43,8 @@ static NETSPLIT_SERVER_REC *netsplit_server_find(IRC_SERVER_REC *server, for (tmp = server->split_servers; tmp != NULL; tmp = tmp->next) { NETSPLIT_SERVER_REC *rec = tmp->data; - if (g_strcasecmp(rec->server, servername) == 0 && - g_strcasecmp(rec->destserver, destserver) == 0) + if (g_ascii_strcasecmp(rec->server, servername) == 0 && + g_ascii_strcasecmp(rec->destserver, destserver) == 0) return rec; } @@ -191,7 +191,7 @@ NETSPLIT_REC *netsplit_find(IRC_SERVER_REC *server, const char *nick, if (rec == NULL) return NULL; return (address == NULL || - g_strcasecmp(rec->address, address) == 0) ? rec : NULL; + g_ascii_strcasecmp(rec->address, address) == 0) ? rec : NULL; } NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server, @@ -211,7 +211,7 @@ NETSPLIT_CHAN_REC *netsplit_find_channel(IRC_SERVER_REC *server, for (tmp = rec->channels; tmp != NULL; tmp = tmp->next) { NETSPLIT_CHAN_REC *rec = tmp->data; - if (g_strcasecmp(rec->name, channel) == 0) + if (g_ascii_strcasecmp(rec->name, channel) == 0) return rec; } @@ -315,7 +315,7 @@ static void event_join(IRC_SERVER_REC *server, const char *data, /* check if split is over */ rec = g_hash_table_lookup(server->splits, nick); - if (rec != NULL && g_strcasecmp(rec->address, address) == 0) { + if (rec != NULL && g_ascii_strcasecmp(rec->address, address) == 0) { /* yep, looks like it is. for same people that had the same splitted servers set the timeout to one minute. @@ -350,7 +350,7 @@ static void event_quit(IRC_SERVER_REC *server, const char *data, g_return_if_fail(data != NULL); if (*data == ':') data++; - if (g_strcasecmp(nick, server->nick) != 0 && quitmsg_is_split(data)) { + if (g_ascii_strcasecmp(nick, server->nick) != 0 && quitmsg_is_split(data)) { /* netsplit! */ netsplit_add(server, nick, address, data); } diff --git a/src/irc/dcc/dcc-chat.c b/src/irc/dcc/dcc-chat.c index b3950002..ad1442fc 100644 --- a/src/irc/dcc/dcc-chat.c +++ b/src/irc/dcc/dcc-chat.c @@ -103,7 +103,7 @@ CHAT_DCC_REC *dcc_chat_find_id(const char *id) CHAT_DCC_REC *dcc = tmp->data; if (IS_DCC_CHAT(dcc) && dcc->id != NULL && - g_strcasecmp(dcc->id, id) == 0) + g_ascii_strcasecmp(dcc->id, id) == 0) return dcc; } @@ -121,7 +121,7 @@ static CHAT_DCC_REC *dcc_chat_find_nick(IRC_SERVER_REC *server, CHAT_DCC_REC *dcc = tmp->data; if (IS_DCC_CHAT(dcc) && dcc->server == server && - g_strcasecmp(dcc->nick, nick) == 0) + g_ascii_strcasecmp(dcc->nick, nick) == 0) return dcc; } @@ -562,7 +562,7 @@ static void cmd_dcc_close(char *data, SERVER_REC *server) next = tmp->next; if (IS_DCC_CHAT(dcc) && dcc->id != NULL && - g_strcasecmp(dcc->id, nick) == 0) { + g_ascii_strcasecmp(dcc->id, nick) == 0) { found = TRUE; if (!dcc_is_connected(dcc) && IS_IRC_SERVER(server)) dcc_reject(DCC(dcc), IRC_SERVER(server)); @@ -777,7 +777,7 @@ static void event_nick(IRC_SERVER_REC *server, const char *data, g_return_if_fail(orignick != NULL); params = event_get_params(data, 1, &nick); - if (g_strcasecmp(nick, orignick) == 0) { + if (g_ascii_strcasecmp(nick, orignick) == 0) { /* shouldn't happen, but just to be sure irssi doesn't get into infinite loop */ g_free(params); diff --git a/src/irc/dcc/dcc-get.c b/src/irc/dcc/dcc-get.c index bdcd2424..3c88ff24 100644 --- a/src/irc/dcc/dcc-get.c +++ b/src/irc/dcc/dcc-get.c @@ -549,7 +549,7 @@ void cmd_dcc_receive(const char *data, DCC_GET_FUNC accept_func, GET_DCC_REC *dcc = tmp->data; next = tmp->next; - if (IS_DCC_GET(dcc) && g_strcasecmp(dcc->nick, nick) == 0 && + if (IS_DCC_GET(dcc) && g_ascii_strcasecmp(dcc->nick, nick) == 0 && (dcc_is_waiting_user(dcc) || dcc->from_dccserver) && (*fname == '\0' || strcmp(dcc->arg, fname) == 0)) { found = TRUE; diff --git a/src/irc/dcc/dcc-queue.c b/src/irc/dcc/dcc-queue.c index 65649848..895f9e44 100644 --- a/src/irc/dcc/dcc-queue.c +++ b/src/irc/dcc/dcc-queue.c @@ -47,11 +47,12 @@ int dcc_queue_old(const char *nick, const char *servertag) if (rec == NULL) continue; - if (*nick != '\0' && g_strcasecmp(nick, rec->nick) != 0) + if (*nick != '\0' && + g_ascii_strcasecmp(nick, rec->nick) != 0) continue; if (*servertag != '\0' && - g_strcasecmp(servertag, rec->servertag) != 0) + g_ascii_strcasecmp(servertag, rec->servertag) != 0) continue; /* found a queue matching nick/server! */ diff --git a/src/irc/dcc/dcc-resume.c b/src/irc/dcc/dcc-resume.c index 5a5a75a5..28871986 100644 --- a/src/irc/dcc/dcc-resume.c +++ b/src/irc/dcc/dcc-resume.c @@ -37,7 +37,8 @@ static FILE_DCC_REC *dcc_resume_find(int type, const char *nick, int port) FILE_DCC_REC *dcc = tmp->data; if (dcc->type == type && !dcc_is_connected(dcc) && - dcc->port == port && g_strcasecmp(dcc->nick, nick) == 0) + dcc->port == port && + g_ascii_strcasecmp(dcc->nick, nick) == 0) return dcc; } diff --git a/src/irc/dcc/dcc-send.c b/src/irc/dcc/dcc-send.c index 78ccf01d..6d2b794d 100644 --- a/src/irc/dcc/dcc-send.c +++ b/src/irc/dcc/dcc-send.c @@ -180,7 +180,7 @@ static void cmd_dcc_send(const char *data, IRC_SERVER_REC *server, chat = item_get_dcc(item); if (chat != NULL && - (chat->mirc_ctcp || g_strcasecmp(nick, chat->nick) != 0)) + (chat->mirc_ctcp || g_ascii_strcasecmp(nick, chat->nick) != 0)) chat = NULL; if (IS_IRC_SERVER(server) && server->connected) diff --git a/src/irc/dcc/dcc.c b/src/irc/dcc/dcc.c index a4bb774e..e4ee4b7c 100644 --- a/src/irc/dcc/dcc.c +++ b/src/irc/dcc/dcc.c @@ -148,7 +148,7 @@ DCC_REC *dcc_find_request(int type, const char *nick, const char *arg) DCC_REC *dcc = tmp->data; if (dcc->type == type && !dcc_is_connected(dcc) && - g_strcasecmp(dcc->nick, nick) == 0 && + g_ascii_strcasecmp(dcc->nick, nick) == 0 && (arg == NULL || strcmp(dcc->arg, arg) == 0)) return dcc; } @@ -287,7 +287,7 @@ static void sig_connected(IRC_SERVER_REC *server) DCC_REC *dcc = tmp->data; if (dcc->server == NULL && dcc->servertag != NULL && - g_strcasecmp(dcc->servertag, server->tag) == 0) { + g_ascii_strcasecmp(dcc->servertag, server->tag) == 0) { dcc->server = server; g_free(dcc->mynick); dcc->mynick = g_strdup(server->nick); @@ -479,7 +479,7 @@ static void event_no_such_nick(IRC_SERVER_REC *server, char *data) next = tmp->next; if (!dcc_is_connected(dcc) && dcc->server == server && - dcc->nick != NULL && g_strcasecmp(dcc->nick, nick) == 0) + dcc->nick != NULL && g_ascii_strcasecmp(dcc->nick, nick) == 0) dcc_close(dcc); } @@ -515,7 +515,7 @@ static void cmd_dcc_close(char *data, IRC_SERVER_REC *server) DCC_REC *dcc = tmp->data; next = tmp->next; - if (dcc->type == type && g_strcasecmp(dcc->nick, nick) == 0 && + if (dcc->type == type && g_ascii_strcasecmp(dcc->nick, nick) == 0 && (*arg == '\0' || strcmp(dcc->arg, arg) == 0)) { dcc_reject(dcc, server); found = TRUE; diff --git a/src/irc/flood/flood.c b/src/irc/flood/flood.c index 677d739b..29502ca6 100644 --- a/src/irc/flood/flood.c +++ b/src/irc/flood/flood.c @@ -172,7 +172,7 @@ static FLOOD_ITEM_REC *flood_find(FLOOD_REC *flood, int level, FLOOD_ITEM_REC *rec = tmp->data; if (rec->level == level && - g_strcasecmp(rec->target, target) == 0) + g_ascii_strcasecmp(rec->target, target) == 0) return rec; } @@ -245,7 +245,7 @@ static void flood_privmsg(IRC_SERVER_REC *server, const char *data, g_return_if_fail(data != NULL); g_return_if_fail(server != NULL); - if (addr == NULL || g_strcasecmp(nick, server->nick) == 0) + if (addr == NULL || g_ascii_strcasecmp(nick, server->nick) == 0) return; params = event_get_params(data, 2, &target, &text); @@ -265,7 +265,7 @@ static void flood_notice(IRC_SERVER_REC *server, const char *data, g_return_if_fail(data != NULL); g_return_if_fail(server != NULL); - if (addr == NULL || g_strcasecmp(nick, server->nick) == 0) + if (addr == NULL || g_ascii_strcasecmp(nick, server->nick) == 0) return; params = event_get_params(data, 2, &target, &text); @@ -283,7 +283,7 @@ static void flood_ctcp(IRC_SERVER_REC *server, const char *data, g_return_if_fail(data != NULL); g_return_if_fail(server != NULL); - if (addr == NULL || g_strcasecmp(nick, server->nick) == 0) + if (addr == NULL || g_ascii_strcasecmp(nick, server->nick) == 0) return; level = g_ascii_strncasecmp(data, "ACTION ", 7) != 0 ? MSGLEVEL_CTCPS : diff --git a/src/irc/notifylist/notify-ison.c b/src/irc/notifylist/notify-ison.c index 74bb4a94..f9ca7b37 100644 --- a/src/irc/notifylist/notify-ison.c +++ b/src/irc/notifylist/notify-ison.c @@ -69,7 +69,7 @@ NOTIFY_NICK_REC *notify_nick_find(IRC_SERVER_REC *server, const char *nick) for (tmp = mserver->notify_users; tmp != NULL; tmp = tmp->next) { rec = tmp->data; - if (g_strcasecmp(rec->nick, nick) == 0) + if (g_ascii_strcasecmp(rec->nick, nick) == 0) return rec; } diff --git a/src/irc/notifylist/notifylist.c b/src/irc/notifylist/notifylist.c index 467fa30a..b0b7ee1c 100644 --- a/src/irc/notifylist/notifylist.c +++ b/src/irc/notifylist/notifylist.c @@ -94,7 +94,7 @@ int notifylist_ircnets_match(NOTIFYLIST_REC *rec, const char *ircnet) if (strcmp(ircnet, "*") == 0) return TRUE; for (tmp = rec->ircnets; *tmp != NULL; tmp++) { - if (g_strcasecmp(*tmp, ircnet) == 0) + if (g_ascii_strcasecmp(*tmp, ircnet) == 0) return TRUE; } @@ -113,7 +113,7 @@ NOTIFYLIST_REC *notifylist_find(const char *mask, const char *ircnet) NOTIFYLIST_REC *rec = tmp->data; /* check mask */ - if (g_strncasecmp(rec->mask, mask, len) != 0 || + if (g_ascii_strncasecmp(rec->mask, mask, len) != 0 || (rec->mask[len] != '\0' && rec->mask[len] != '!')) continue; /* check ircnet */ diff --git a/src/irc/proxy/listen.c b/src/irc/proxy/listen.c index 4df315fd..5dfd46db 100644 --- a/src/irc/proxy/listen.c +++ b/src/irc/proxy/listen.c @@ -152,8 +152,8 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args, params = event_get_params(args, 2, &origin, &target); if (*target == '\0' || - g_strcasecmp(target, client->proxy_address) == 0 || - g_strcasecmp(target, client->nick) == 0) { + g_ascii_strcasecmp(target, client->proxy_address) == 0 || + g_ascii_strcasecmp(target, client->nick) == 0) { proxy_outdata(client, ":%s PONG %s :%s\n", client->proxy_address, client->proxy_address, origin); @@ -169,7 +169,7 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args, client->want_ctcp = 1; for (tmp = proxy_clients; tmp != NULL; tmp = tmp->next) { CLIENT_REC *rec = tmp->data; - if ((g_strcasecmp(client->listen->ircnet,rec->listen->ircnet) == 0) && + if ((g_ascii_strcasecmp(client->listen->ircnet,rec->listen->ircnet) == 0) && /* kludgy way to check if the clients aren't the same */ (client->recv_tag != rec->recv_tag)) { if (rec->want_ctcp == 1) @@ -463,7 +463,7 @@ static void event_connected(IRC_SERVER_REC *server) if (rec->connected && rec->server == NULL && (strcmp(rec->listen->ircnet, "*") == 0 || (chatnet != NULL && - g_strcasecmp(chatnet, rec->listen->ircnet) == 0))) { + g_ascii_strcasecmp(chatnet, rec->listen->ircnet) == 0))) { proxy_outdata(rec, ":%s NOTICE %s :Connected to server\n", rec->proxy_address, rec->nick); rec->server = server; @@ -514,7 +514,7 @@ static void event_nick(IRC_SERVER_REC *server, const char *data, if (!IS_IRC_SERVER(server)) return; - if (g_strcasecmp(orignick, server->nick) != 0) + if (g_ascii_strcasecmp(orignick, server->nick) != 0) return; if (*data == ':') data++; @@ -566,7 +566,7 @@ static LISTEN_REC *find_listen(const char *ircnet, int port) LISTEN_REC *rec = tmp->data; if (rec->port == port && - g_strcasecmp(rec->ircnet, ircnet) == 0) + g_ascii_strcasecmp(rec->ircnet, ircnet) == 0) return rec; } diff --git a/src/lib-config/get.c b/src/lib-config/get.c index c0f6a3dd..2f1e90e1 100644 --- a/src/lib-config/get.c +++ b/src/lib-config/get.c @@ -31,7 +31,7 @@ CONFIG_NODE *config_node_find(CONFIG_NODE *node, const char *key) for (tmp = node->value; tmp != NULL; tmp = tmp->next) { CONFIG_NODE *node = tmp->data; - if (node->key != NULL && g_strcasecmp(node->key, key) == 0) + if (node->key != NULL && g_ascii_strcasecmp(node->key, key) == 0) return node; } diff --git a/src/lib-config/parse.c b/src/lib-config/parse.c index 22832c07..1b20195a 100644 --- a/src/lib-config/parse.c +++ b/src/lib-config/parse.c @@ -22,7 +22,7 @@ static int g_istr_equal(gconstpointer v, gconstpointer v2) { - return g_strcasecmp((const char *) v, (const char *) v2) == 0; + return g_ascii_strcasecmp((const char *) v, (const char *) v2) == 0; } /* a char* hash function from ASU */ diff --git a/src/perl/ui/Themes.xs b/src/perl/ui/Themes.xs index ff025ee9..ebc8b69b 100644 --- a/src/perl/ui/Themes.xs +++ b/src/perl/ui/Themes.xs @@ -262,7 +262,7 @@ CODE: for (i = 0; formats[i].def != NULL; i++) { if (formats[i].tag != NULL && - g_strcasecmp(formats[i].tag, tag) == 0) + g_ascii_strcasecmp(formats[i].tag, tag) == 0) break; } |