mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 12:23:37 +02:00
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
This commit is contained in:
parent
496d82ac48
commit
7df46597e1
22 changed files with 63 additions and 63 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue