diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-03-09 12:01:16 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-03-09 12:01:16 +0000 |
commit | 7df46597e17ff7af4a660ab47673fe2cabc91db6 (patch) | |
tree | 2e2abd9c8e4de4e7311c0506119142f62a78a2f1 /src/core | |
parent | 496d82ac4843b3dcf8fe64c216470f41f91120d9 (diff) | |
download | irssi-7df46597e17ff7af4a660ab47673fe2cabc91db6.zip |
Use g_ascii_str{,n}casecmp for case insensitive comparison with
ascii only strings.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4738 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/levels.c | 4 | ||||
-rw-r--r-- | src/core/recode.c | 2 | ||||
-rw-r--r-- | src/core/servers-reconnect.c | 2 | ||||
-rw-r--r-- | src/core/servers-setup.c | 4 | ||||
-rw-r--r-- | src/core/settings.c | 8 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/core/levels.c b/src/core/levels.c index 2c972b3f..587e1432 100644 --- a/src/core/levels.c +++ b/src/core/levels.c @@ -53,10 +53,10 @@ int level_get(const char *level) { int n, len, match; - if (g_strcasecmp(level, "ALL") == 0 || strcmp(level, "*") == 0) + if (g_ascii_strcasecmp(level, "ALL") == 0 || strcmp(level, "*") == 0) return MSGLEVEL_ALL; - if (g_strcasecmp(level, "NEVER") == 0) + if (g_ascii_strcasecmp(level, "NEVER") == 0) return MSGLEVEL_NEVER; len = strlen(level); diff --git a/src/core/recode.c b/src/core/recode.c index 0b1895c9..48f2811e 100644 --- a/src/core/recode.c +++ b/src/core/recode.c @@ -30,7 +30,7 @@ static gboolean recode_get_charset(const char **charset) *charset = settings_get_str("term_charset"); if (**charset) /* we use the same test as in src/fe-text/term.c:123 */ - return (g_strcasecmp(*charset, "utf-8") == 0); + return (g_ascii_strcasecmp(*charset, "utf-8") == 0); return g_get_charset(charset); } diff --git a/src/core/servers-reconnect.c b/src/core/servers-reconnect.c index 87bcf568..2b227ebe 100644 --- a/src/core/servers-reconnect.c +++ b/src/core/servers-reconnect.c @@ -402,7 +402,7 @@ static void cmd_reconnect(const char *data, SERVER_REC *server) return; } - if (g_strcasecmp(tag, "all") == 0) { + if (g_ascii_strcasecmp(tag, "all") == 0) { /* reconnect all servers in reconnect queue */ reconnect_all(); cmd_params_free(free_arg); diff --git a/src/core/servers-setup.c b/src/core/servers-setup.c index 66eb35e4..b6d77753 100644 --- a/src/core/servers-setup.c +++ b/src/core/servers-setup.c @@ -399,8 +399,8 @@ static SERVER_SETUP_REC *server_setup_read(CONFIG_NODE *node) rec->type = module_get_uniq_id("SERVER SETUP", 0); rec->chat_type = CHAT_PROTOCOL(chatnetrec)->id; rec->chatnet = chatnetrec == NULL ? NULL : g_strdup(chatnetrec->name); - rec->family = g_strcasecmp(family, "inet6") == 0 ? AF_INET6 : - (g_strcasecmp(family, "inet") == 0 ? AF_INET : 0); + rec->family = g_ascii_strcasecmp(family, "inet6") == 0 ? AF_INET6 : + (g_ascii_strcasecmp(family, "inet") == 0 ? AF_INET : 0); rec->address = g_strdup(server); rec->password = g_strdup(config_node_get_str(node, "password", NULL)); rec->use_ssl = config_node_get_bool(node, "use_ssl", FALSE); diff --git a/src/core/settings.c b/src/core/settings.c index d119607d..b5876484 100644 --- a/src/core/settings.c +++ b/src/core/settings.c @@ -453,9 +453,9 @@ static int backwards_compatibility(const char *module, CONFIG_NODE *node, /* fe-text term_type -> fe-common/core term_charset - for 0.8.10-> */ if (strcmp(module, "fe-text") == 0) { - if (strcasecmp(node->key, "term_type") == 0 || + if (g_ascii_strcasecmp(node->key, "term_type") == 0 || /* kludge for cvs-version where term_charset was in fe-text */ - strcasecmp(node->key, "term_charset") == 0) { + g_ascii_strcasecmp(node->key, "term_charset") == 0) { new_module = "fe-common/core"; new_key = "term_charset"; new_value = !is_valid_charset(node->value) ? NULL : @@ -472,8 +472,8 @@ static int backwards_compatibility(const char *module, CONFIG_NODE *node, g_free(new_value); config_changed = TRUE; return new_key != NULL; - } else if (strcasecmp(node->key, "actlist_moves") == 0 && - node->value != NULL && strcasecmp(node->value, "yes") == 0) { + } else if (g_ascii_strcasecmp(node->key, "actlist_moves") == 0 && + node->value != NULL && g_ascii_strcasecmp(node->value, "yes") == 0) { config_node_set_str(mainconfig, parent, "actlist_sort", "recent"); config_node_set_str(mainconfig, parent, node->key, NULL); config_changed = TRUE; |