summaryrefslogtreecommitdiff
path: root/src/fe-common
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-common')
-rw-r--r--src/fe-common/core/chat-completion.c34
-rw-r--r--src/fe-common/core/command-history.c3
-rw-r--r--src/fe-common/core/completion.c12
-rw-r--r--src/fe-common/core/fe-core-commands.c4
-rw-r--r--src/fe-common/core/fe-help.c4
-rw-r--r--src/fe-common/core/fe-ignore-messages.c2
-rw-r--r--src/fe-common/core/fe-log.c2
-rw-r--r--src/fe-common/core/fe-queries.c4
-rw-r--r--src/fe-common/core/fe-settings.c4
-rw-r--r--src/fe-common/core/fe-windows.c13
-rw-r--r--src/fe-common/core/formats.c2
-rw-r--r--src/fe-common/core/hilight-text.c2
-rw-r--r--src/fe-common/core/keyboard.c6
-rw-r--r--src/fe-common/core/themes.c14
-rw-r--r--src/fe-common/core/window-items.c2
-rw-r--r--src/fe-common/irc/fe-events-numeric.c6
-rw-r--r--src/fe-common/irc/fe-events.c4
-rw-r--r--src/fe-common/irc/fe-irc-queries.c2
-rw-r--r--src/fe-common/irc/fe-modes.c2
-rw-r--r--src/fe-common/irc/fe-netjoin.c2
-rw-r--r--src/fe-common/irc/fe-netsplit.c6
21 files changed, 67 insertions, 63 deletions
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)