mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05: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
@ -53,10 +53,10 @@ int level_get(const char *level)
|
|||||||
{
|
{
|
||||||
int n, len, match;
|
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;
|
return MSGLEVEL_ALL;
|
||||||
|
|
||||||
if (g_strcasecmp(level, "NEVER") == 0)
|
if (g_ascii_strcasecmp(level, "NEVER") == 0)
|
||||||
return MSGLEVEL_NEVER;
|
return MSGLEVEL_NEVER;
|
||||||
|
|
||||||
len = strlen(level);
|
len = strlen(level);
|
||||||
|
@ -30,7 +30,7 @@ static gboolean recode_get_charset(const char **charset)
|
|||||||
*charset = settings_get_str("term_charset");
|
*charset = settings_get_str("term_charset");
|
||||||
if (**charset)
|
if (**charset)
|
||||||
/* we use the same test as in src/fe-text/term.c:123 */
|
/* 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);
|
return g_get_charset(charset);
|
||||||
}
|
}
|
||||||
|
@ -402,7 +402,7 @@ static void cmd_reconnect(const char *data, SERVER_REC *server)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_strcasecmp(tag, "all") == 0) {
|
if (g_ascii_strcasecmp(tag, "all") == 0) {
|
||||||
/* reconnect all servers in reconnect queue */
|
/* reconnect all servers in reconnect queue */
|
||||||
reconnect_all();
|
reconnect_all();
|
||||||
cmd_params_free(free_arg);
|
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->type = module_get_uniq_id("SERVER SETUP", 0);
|
||||||
rec->chat_type = CHAT_PROTOCOL(chatnetrec)->id;
|
rec->chat_type = CHAT_PROTOCOL(chatnetrec)->id;
|
||||||
rec->chatnet = chatnetrec == NULL ? NULL : g_strdup(chatnetrec->name);
|
rec->chatnet = chatnetrec == NULL ? NULL : g_strdup(chatnetrec->name);
|
||||||
rec->family = g_strcasecmp(family, "inet6") == 0 ? AF_INET6 :
|
rec->family = g_ascii_strcasecmp(family, "inet6") == 0 ? AF_INET6 :
|
||||||
(g_strcasecmp(family, "inet") == 0 ? AF_INET : 0);
|
(g_ascii_strcasecmp(family, "inet") == 0 ? AF_INET : 0);
|
||||||
rec->address = g_strdup(server);
|
rec->address = g_strdup(server);
|
||||||
rec->password = g_strdup(config_node_get_str(node, "password", NULL));
|
rec->password = g_strdup(config_node_get_str(node, "password", NULL));
|
||||||
rec->use_ssl = config_node_get_bool(node, "use_ssl", FALSE);
|
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-> */
|
/* fe-text term_type -> fe-common/core term_charset - for 0.8.10-> */
|
||||||
if (strcmp(module, "fe-text") == 0) {
|
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 */
|
/* 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_module = "fe-common/core";
|
||||||
new_key = "term_charset";
|
new_key = "term_charset";
|
||||||
new_value = !is_valid_charset(node->value) ? NULL :
|
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);
|
g_free(new_value);
|
||||||
config_changed = TRUE;
|
config_changed = TRUE;
|
||||||
return new_key != NULL;
|
return new_key != NULL;
|
||||||
} else if (strcasecmp(node->key, "actlist_moves") == 0 &&
|
} else if (g_ascii_strcasecmp(node->key, "actlist_moves") == 0 &&
|
||||||
node->value != NULL && strcasecmp(node->value, "yes") == 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, "actlist_sort", "recent");
|
||||||
config_node_set_str(mainconfig, parent, node->key, NULL);
|
config_node_set_str(mainconfig, parent, node->key, NULL);
|
||||||
config_changed = TRUE;
|
config_changed = TRUE;
|
||||||
|
@ -209,17 +209,17 @@ static int signal_name_to_id(const char *name)
|
|||||||
/* check only the few most common signals, too much job to check
|
/* check only the few most common signals, too much job to check
|
||||||
them all. if we sometimes want more, procps-sources/proc/sig.c
|
them all. if we sometimes want more, procps-sources/proc/sig.c
|
||||||
would be useful for copypasting */
|
would be useful for copypasting */
|
||||||
if (g_strcasecmp(name, "hup") == 0)
|
if (g_ascii_strcasecmp(name, "hup") == 0)
|
||||||
return SIGHUP;
|
return SIGHUP;
|
||||||
if (g_strcasecmp(name, "int") == 0)
|
if (g_ascii_strcasecmp(name, "int") == 0)
|
||||||
return SIGINT;
|
return SIGINT;
|
||||||
if (g_strcasecmp(name, "term") == 0)
|
if (g_ascii_strcasecmp(name, "term") == 0)
|
||||||
return SIGTERM;
|
return SIGTERM;
|
||||||
if (g_strcasecmp(name, "kill") == 0)
|
if (g_ascii_strcasecmp(name, "kill") == 0)
|
||||||
return SIGKILL;
|
return SIGKILL;
|
||||||
if (g_strcasecmp(name, "usr1") == 0)
|
if (g_ascii_strcasecmp(name, "usr1") == 0)
|
||||||
return SIGUSR1;
|
return SIGUSR1;
|
||||||
if (g_strcasecmp(name, "usr2") == 0)
|
if (g_ascii_strcasecmp(name, "usr2") == 0)
|
||||||
return SIGUSR2;
|
return SIGUSR2;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -279,11 +279,11 @@ static void cmd_window_log(const char *data)
|
|||||||
log = logs_find_item(LOG_ITEM_WINDOW_REFNUM, window, NULL, NULL);
|
log = logs_find_item(LOG_ITEM_WINDOW_REFNUM, window, NULL, NULL);
|
||||||
|
|
||||||
open_log = close_log = FALSE;
|
open_log = close_log = FALSE;
|
||||||
if (g_strcasecmp(set, "ON") == 0)
|
if (g_ascii_strcasecmp(set, "ON") == 0)
|
||||||
open_log = TRUE;
|
open_log = TRUE;
|
||||||
else if (g_strcasecmp(set, "OFF") == 0) {
|
else if (g_ascii_strcasecmp(set, "OFF") == 0) {
|
||||||
close_log = TRUE;
|
close_log = TRUE;
|
||||||
} else if (g_strcasecmp(set, "TOGGLE") == 0) {
|
} else if (g_ascii_strcasecmp(set, "TOGGLE") == 0) {
|
||||||
open_log = log == NULL;
|
open_log = log == NULL;
|
||||||
close_log = log != NULL;
|
close_log = log != NULL;
|
||||||
} else {
|
} else {
|
||||||
|
@ -66,11 +66,11 @@ static void set_print_pattern(const char *pattern)
|
|||||||
|
|
||||||
static void set_boolean(const char *key, const char *value)
|
static void set_boolean(const char *key, const char *value)
|
||||||
{
|
{
|
||||||
if (g_strcasecmp(value, "ON") == 0)
|
if (g_ascii_strcasecmp(value, "ON") == 0)
|
||||||
settings_set_bool(key, TRUE);
|
settings_set_bool(key, TRUE);
|
||||||
else if (g_strcasecmp(value, "OFF") == 0)
|
else if (g_ascii_strcasecmp(value, "OFF") == 0)
|
||||||
settings_set_bool(key, FALSE);
|
settings_set_bool(key, FALSE);
|
||||||
else if (g_strcasecmp(value, "TOGGLE") == 0)
|
else if (g_ascii_strcasecmp(value, "TOGGLE") == 0)
|
||||||
settings_set_bool(key, !settings_get_bool(key));
|
settings_set_bool(key, !settings_get_bool(key));
|
||||||
else
|
else
|
||||||
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_NOT_TOGGLE);
|
printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_NOT_TOGGLE);
|
||||||
|
@ -462,9 +462,9 @@ static void sig_gui_dialog(const char *type, const char *text)
|
|||||||
{
|
{
|
||||||
char *format;
|
char *format;
|
||||||
|
|
||||||
if (g_strcasecmp(type, "warning") == 0)
|
if (g_ascii_strcasecmp(type, "warning") == 0)
|
||||||
format = "%_Warning:%_ %s";
|
format = "%_Warning:%_ %s";
|
||||||
else if (g_strcasecmp(type, "error") == 0)
|
else if (g_ascii_strcasecmp(type, "error") == 0)
|
||||||
format = "%_Error:%_ %s";
|
format = "%_Error:%_ %s";
|
||||||
else
|
else
|
||||||
format = "%s";
|
format = "%s";
|
||||||
|
@ -1144,7 +1144,7 @@ static void theme_save(THEME_REC *theme, int save_all)
|
|||||||
if (config != NULL)
|
if (config != NULL)
|
||||||
config_parse(config);
|
config_parse(config);
|
||||||
else {
|
else {
|
||||||
if (g_strcasecmp(theme->name, "default") == 0) {
|
if (g_ascii_strcasecmp(theme->name, "default") == 0) {
|
||||||
config = config_open(NULL, -1);
|
config = config_open(NULL, -1);
|
||||||
config_parse_data(config, default_theme, "internal");
|
config_parse_data(config, default_theme, "internal");
|
||||||
config_change_file_name(config, theme->path, 0660);
|
config_change_file_name(config, theme->path, 0660);
|
||||||
|
@ -175,8 +175,8 @@ static void cmd_window_new(const char *data, void *server, WI_ITEM_REC *item)
|
|||||||
|
|
||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
type = (g_strncasecmp(data, "hid", 3) == 0 || g_strcasecmp(data, "tab") == 0) ? 1 :
|
type = (g_ascii_strncasecmp(data, "hid", 3) == 0 || g_ascii_strcasecmp(data, "tab") == 0) ? 1 :
|
||||||
(g_strcasecmp(data, "split") == 0 ? 2 : 0);
|
(g_ascii_strcasecmp(data, "split") == 0 ? 2 : 0);
|
||||||
signal_emit("gui window create override", 1, GINT_TO_POINTER(type));
|
signal_emit("gui window create override", 1, GINT_TO_POINTER(type));
|
||||||
|
|
||||||
window = window_create(NULL, FALSE);
|
window = window_create(NULL, FALSE);
|
||||||
@ -335,7 +335,7 @@ static void cmd_window_goto(const char *data)
|
|||||||
if (!cmd_get_params(data, &free_arg, 1, &target))
|
if (!cmd_get_params(data, &free_arg, 1, &target))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (g_strcasecmp(target, "active") == 0)
|
if (g_ascii_strcasecmp(target, "active") == 0)
|
||||||
window = window_highest_activity(active_win);
|
window = window_highest_activity(active_win);
|
||||||
else {
|
else {
|
||||||
window = window_find_name(target);
|
window = window_find_name(target);
|
||||||
@ -403,11 +403,11 @@ static void cmd_window_immortal(const char *data)
|
|||||||
|
|
||||||
if (*data == '\0')
|
if (*data == '\0')
|
||||||
set = active_win->immortal;
|
set = active_win->immortal;
|
||||||
else if (g_strcasecmp(data, "ON") == 0)
|
else if (g_ascii_strcasecmp(data, "ON") == 0)
|
||||||
set = TRUE;
|
set = TRUE;
|
||||||
else if (g_strcasecmp(data, "OFF") == 0)
|
else if (g_ascii_strcasecmp(data, "OFF") == 0)
|
||||||
set = FALSE;
|
set = FALSE;
|
||||||
else if (g_strcasecmp(data, "TOGGLE") == 0)
|
else if (g_ascii_strcasecmp(data, "TOGGLE") == 0)
|
||||||
set = !active_win->immortal;
|
set = !active_win->immortal;
|
||||||
else {
|
else {
|
||||||
printformat_window(active_win, MSGLEVEL_CLIENTERROR,
|
printformat_window(active_win, MSGLEVEL_CLIENTERROR,
|
||||||
|
@ -57,11 +57,11 @@ static void sig_layout_restore_item(WINDOW_REC *window, const char *type,
|
|||||||
if (name == NULL || tag == NULL)
|
if (name == NULL || tag == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (g_strcasecmp(type, "CHANNEL") == 0) {
|
if (g_ascii_strcasecmp(type, "CHANNEL") == 0) {
|
||||||
/* bind channel to window */
|
/* bind channel to window */
|
||||||
WINDOW_BIND_REC *rec = window_bind_add(window, tag, name);
|
WINDOW_BIND_REC *rec = window_bind_add(window, tag, name);
|
||||||
rec->sticky = TRUE;
|
rec->sticky = TRUE;
|
||||||
} else if (g_strcasecmp(type, "QUERY") == 0 && chat_type != NULL) {
|
} else if (g_ascii_strcasecmp(type, "QUERY") == 0 && chat_type != NULL) {
|
||||||
CHAT_PROTOCOL_REC *protocol;
|
CHAT_PROTOCOL_REC *protocol;
|
||||||
/* create query immediately */
|
/* create query immediately */
|
||||||
signal_add("query created",
|
signal_add("query created",
|
||||||
|
@ -212,7 +212,7 @@ static void dcc_error_close_not_found(const char *type, const char *nick,
|
|||||||
{
|
{
|
||||||
g_return_if_fail(type != NULL);
|
g_return_if_fail(type != NULL);
|
||||||
g_return_if_fail(nick != NULL);
|
g_return_if_fail(nick != NULL);
|
||||||
if (g_strcasecmp(type, "CHAT") != 0) return;
|
if (g_ascii_strcasecmp(type, "CHAT") != 0) return;
|
||||||
|
|
||||||
printformat(NULL, NULL, MSGLEVEL_DCC,
|
printformat(NULL, NULL, MSGLEVEL_DCC,
|
||||||
IRCTXT_DCC_CHAT_NOT_FOUND, nick);
|
IRCTXT_DCC_CHAT_NOT_FOUND, nick);
|
||||||
|
@ -105,7 +105,7 @@ static void dcc_error_close_not_found(const char *type, const char *nick,
|
|||||||
g_return_if_fail(type != NULL);
|
g_return_if_fail(type != NULL);
|
||||||
g_return_if_fail(nick != NULL);
|
g_return_if_fail(nick != NULL);
|
||||||
g_return_if_fail(fname != NULL);
|
g_return_if_fail(fname != NULL);
|
||||||
if (g_strcasecmp(type, "GET") != 0) return;
|
if (g_ascii_strcasecmp(type, "GET") != 0) return;
|
||||||
|
|
||||||
if (fname == '\0') fname = "(ANY)";
|
if (fname == '\0') fname = "(ANY)";
|
||||||
printformat(NULL, NULL, MSGLEVEL_DCC,
|
printformat(NULL, NULL, MSGLEVEL_DCC,
|
||||||
|
@ -106,7 +106,7 @@ static void dcc_error_close_not_found(const char *type, const char *nick,
|
|||||||
g_return_if_fail(type != NULL);
|
g_return_if_fail(type != NULL);
|
||||||
g_return_if_fail(nick != NULL);
|
g_return_if_fail(nick != NULL);
|
||||||
g_return_if_fail(fname != NULL);
|
g_return_if_fail(fname != NULL);
|
||||||
if (g_strcasecmp(type, "SEND") != 0) return;
|
if (g_ascii_strcasecmp(type, "SEND") != 0) return;
|
||||||
|
|
||||||
if (fname == '\0') fname = "(ANY)";
|
if (fname == '\0') fname = "(ANY)";
|
||||||
printformat(NULL, NULL, MSGLEVEL_DCC,
|
printformat(NULL, NULL, MSGLEVEL_DCC,
|
||||||
|
@ -163,16 +163,16 @@ static void statusbar_read(STATUSBAR_GROUP_REC *group, CONFIG_NODE *node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
visible_str = config_node_get_str(node, "visible", "");
|
visible_str = config_node_get_str(node, "visible", "");
|
||||||
if (g_strcasecmp(visible_str, "active") == 0)
|
if (g_ascii_strcasecmp(visible_str, "active") == 0)
|
||||||
bar->visible = STATUSBAR_VISIBLE_ACTIVE;
|
bar->visible = STATUSBAR_VISIBLE_ACTIVE;
|
||||||
else if (g_strcasecmp(visible_str, "inactive") == 0)
|
else if (g_ascii_strcasecmp(visible_str, "inactive") == 0)
|
||||||
bar->visible = STATUSBAR_VISIBLE_INACTIVE;
|
bar->visible = STATUSBAR_VISIBLE_INACTIVE;
|
||||||
else
|
else
|
||||||
bar->visible = STATUSBAR_VISIBLE_ALWAYS;
|
bar->visible = STATUSBAR_VISIBLE_ALWAYS;
|
||||||
|
|
||||||
if (g_strcasecmp(config_node_get_str(node, "type", ""), "window") == 0)
|
if (g_ascii_strcasecmp(config_node_get_str(node, "type", ""), "window") == 0)
|
||||||
bar->type = STATUSBAR_TYPE_WINDOW;
|
bar->type = STATUSBAR_TYPE_WINDOW;
|
||||||
if (g_strcasecmp(config_node_get_str(node, "placement", ""), "top") == 0)
|
if (g_ascii_strcasecmp(config_node_get_str(node, "placement", ""), "top") == 0)
|
||||||
bar->placement = STATUSBAR_TOP;
|
bar->placement = STATUSBAR_TOP;
|
||||||
bar->position = config_node_get_int(node, "position", 0);
|
bar->position = config_node_get_int(node, "position", 0);
|
||||||
|
|
||||||
@ -378,9 +378,9 @@ static void cmd_statusbar_reset(const char *data, void *server,
|
|||||||
static void cmd_statusbar_type(const char *data, void *server,
|
static void cmd_statusbar_type(const char *data, void *server,
|
||||||
void *item, CONFIG_NODE *node)
|
void *item, CONFIG_NODE *node)
|
||||||
{
|
{
|
||||||
if (g_strcasecmp(data, "window") == 0)
|
if (g_ascii_strcasecmp(data, "window") == 0)
|
||||||
iconfig_node_set_str(node, "type", "window");
|
iconfig_node_set_str(node, "type", "window");
|
||||||
else if (g_strcasecmp(data, "root") == 0)
|
else if (g_ascii_strcasecmp(data, "root") == 0)
|
||||||
iconfig_node_set_str(node, "type", "root");
|
iconfig_node_set_str(node, "type", "root");
|
||||||
else {
|
else {
|
||||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
|
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
|
||||||
@ -392,9 +392,9 @@ static void cmd_statusbar_type(const char *data, void *server,
|
|||||||
static void cmd_statusbar_placement(const char *data, void *server,
|
static void cmd_statusbar_placement(const char *data, void *server,
|
||||||
void *item, CONFIG_NODE *node)
|
void *item, CONFIG_NODE *node)
|
||||||
{
|
{
|
||||||
if (g_strcasecmp(data, "top") == 0)
|
if (g_ascii_strcasecmp(data, "top") == 0)
|
||||||
iconfig_node_set_str(node, "placement", "top");
|
iconfig_node_set_str(node, "placement", "top");
|
||||||
else if (g_strcasecmp(data, "bottom") == 0)
|
else if (g_ascii_strcasecmp(data, "bottom") == 0)
|
||||||
iconfig_node_set_str(node, "placement", "bottom");
|
iconfig_node_set_str(node, "placement", "bottom");
|
||||||
else {
|
else {
|
||||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
|
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
|
||||||
@ -413,11 +413,11 @@ static void cmd_statusbar_position(const char *data, void *server,
|
|||||||
static void cmd_statusbar_visible(const char *data, void *server,
|
static void cmd_statusbar_visible(const char *data, void *server,
|
||||||
void *item, CONFIG_NODE *node)
|
void *item, CONFIG_NODE *node)
|
||||||
{
|
{
|
||||||
if (g_strcasecmp(data, "always") == 0)
|
if (g_ascii_strcasecmp(data, "always") == 0)
|
||||||
iconfig_node_set_str(node, "visible", "always");
|
iconfig_node_set_str(node, "visible", "always");
|
||||||
else if (g_strcasecmp(data, "active") == 0)
|
else if (g_ascii_strcasecmp(data, "active") == 0)
|
||||||
iconfig_node_set_str(node, "visible", "active");
|
iconfig_node_set_str(node, "visible", "active");
|
||||||
else if (g_strcasecmp(data, "inactive") == 0)
|
else if (g_ascii_strcasecmp(data, "inactive") == 0)
|
||||||
iconfig_node_set_str(node, "visible", "inactive");
|
iconfig_node_set_str(node, "visible", "inactive");
|
||||||
else {
|
else {
|
||||||
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
|
printformat(NULL, NULL, MSGLEVEL_CLIENTERROR,
|
||||||
@ -495,7 +495,7 @@ static void cmd_statusbar_add(const char *data, void *server,
|
|||||||
value = g_hash_table_lookup(optlist, "alignment");
|
value = g_hash_table_lookup(optlist, "alignment");
|
||||||
if (value != NULL) {
|
if (value != NULL) {
|
||||||
iconfig_node_set_str(node, "alignment",
|
iconfig_node_set_str(node, "alignment",
|
||||||
g_strcasecmp(value, "right") == 0 ?
|
g_ascii_strcasecmp(value, "right") == 0 ?
|
||||||
"right" : NULL);
|
"right" : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -392,9 +392,9 @@ static void read_settings(void)
|
|||||||
gui_entry_set_utf8(active_entry, term_type == TERM_TYPE_UTF8);
|
gui_entry_set_utf8(active_entry, term_type == TERM_TYPE_UTF8);
|
||||||
|
|
||||||
str = settings_get_str("actlist_sort");
|
str = settings_get_str("actlist_sort");
|
||||||
if (strcasecmp(str, "recent") == 0)
|
if (g_ascii_strcasecmp(str, "recent") == 0)
|
||||||
actlist_sort = 1;
|
actlist_sort = 1;
|
||||||
else if (strcasecmp(str, "level") == 0)
|
else if (g_ascii_strcasecmp(str, "level") == 0)
|
||||||
actlist_sort = 2;
|
actlist_sort = 2;
|
||||||
else {
|
else {
|
||||||
settings_set_str("actlist_sort", "refnum");
|
settings_set_str("actlist_sort", "refnum");
|
||||||
|
@ -120,9 +120,9 @@ static void read_settings(void)
|
|||||||
|
|
||||||
/* set terminal type */
|
/* set terminal type */
|
||||||
str = settings_get_str("term_charset");
|
str = settings_get_str("term_charset");
|
||||||
if (g_strcasecmp(str, "utf-8") == 0)
|
if (g_ascii_strcasecmp(str, "utf-8") == 0)
|
||||||
term_type = TERM_TYPE_UTF8;
|
term_type = TERM_TYPE_UTF8;
|
||||||
else if (g_strcasecmp(str, "big5") == 0)
|
else if (g_ascii_strcasecmp(str, "big5") == 0)
|
||||||
term_type = TERM_TYPE_BIG5;
|
term_type = TERM_TYPE_BIG5;
|
||||||
else
|
else
|
||||||
term_type = TERM_TYPE_8BIT;
|
term_type = TERM_TYPE_8BIT;
|
||||||
|
@ -69,12 +69,12 @@ static void cmd_window_scroll(const char *data)
|
|||||||
GUI_WINDOW_REC *gui;
|
GUI_WINDOW_REC *gui;
|
||||||
|
|
||||||
gui = WINDOW_GUI(active_win);
|
gui = WINDOW_GUI(active_win);
|
||||||
if (g_strcasecmp(data, "default") == 0) {
|
if (g_ascii_strcasecmp(data, "default") == 0) {
|
||||||
gui->use_scroll = FALSE;
|
gui->use_scroll = FALSE;
|
||||||
} else if (g_strcasecmp(data, "on") == 0) {
|
} else if (g_ascii_strcasecmp(data, "on") == 0) {
|
||||||
gui->use_scroll = TRUE;
|
gui->use_scroll = TRUE;
|
||||||
gui->scroll = TRUE;
|
gui->scroll = TRUE;
|
||||||
} else if (g_strcasecmp(data, "off") == 0) {
|
} else if (g_ascii_strcasecmp(data, "off") == 0) {
|
||||||
gui->use_scroll = TRUE;
|
gui->use_scroll = TRUE;
|
||||||
gui->scroll = FALSE;
|
gui->scroll = FALSE;
|
||||||
} else if (*data != '\0') {
|
} else if (*data != '\0') {
|
||||||
|
@ -71,7 +71,7 @@ static void sig_unknown_command(IRC_SERVER_REC *server, const char *data)
|
|||||||
g_return_if_fail(data != NULL);
|
g_return_if_fail(data != NULL);
|
||||||
|
|
||||||
params = event_get_params(data, 2, NULL, &cmd);
|
params = event_get_params(data, 2, NULL, &cmd);
|
||||||
if (g_strcasecmp(cmd, "PING") == 0) {
|
if (g_ascii_strcasecmp(cmd, "PING") == 0) {
|
||||||
/* some servers have disabled PING command, don't bother
|
/* some servers have disabled PING command, don't bother
|
||||||
trying alternative methods to detect lag with these
|
trying alternative methods to detect lag with these
|
||||||
servers. */
|
servers. */
|
||||||
|
@ -165,7 +165,7 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(cmd, "PROXY") == 0) {
|
if (strcmp(cmd, "PROXY") == 0) {
|
||||||
if (g_strcasecmp(args, "CTCP ON") == 0) {
|
if (g_ascii_strcasecmp(args, "CTCP ON") == 0) {
|
||||||
/* client wants all ctcps */
|
/* client wants all ctcps */
|
||||||
client->want_ctcp = 1;
|
client->want_ctcp = 1;
|
||||||
for (tmp = proxy_clients; tmp != NULL; tmp = tmp->next) {
|
for (tmp = proxy_clients; tmp != NULL; tmp = tmp->next) {
|
||||||
@ -182,7 +182,7 @@ static void handle_client_cmd(CLIENT_REC *client, char *cmd, char *args,
|
|||||||
}
|
}
|
||||||
proxy_outdata(client, ":%s NOTICE %s :You're now receiving CTCPs sent to %s\n",
|
proxy_outdata(client, ":%s NOTICE %s :You're now receiving CTCPs sent to %s\n",
|
||||||
client->proxy_address, client->nick,client->listen->ircnet);
|
client->proxy_address, client->nick,client->listen->ircnet);
|
||||||
} else if (g_strcasecmp(args, "CTCP OFF") == 0) {
|
} else if (g_ascii_strcasecmp(args, "CTCP OFF") == 0) {
|
||||||
/* client wants proxy to handle all ctcps */
|
/* client wants proxy to handle all ctcps */
|
||||||
client->want_ctcp = 0;
|
client->want_ctcp = 0;
|
||||||
proxy_outdata(client, ":%s NOTICE %s :Proxy is now handling itself CTCPs sent to %s\n",
|
proxy_outdata(client, ":%s NOTICE %s :Proxy is now handling itself CTCPs sent to %s\n",
|
||||||
|
@ -119,15 +119,15 @@ void expando_signals_add_hash(const char *key, SV *signals)
|
|||||||
SV *argsv = HeVAL(he);
|
SV *argsv = HeVAL(he);
|
||||||
argstr = SvPV(argsv, PL_na);
|
argstr = SvPV(argsv, PL_na);
|
||||||
|
|
||||||
if (strcasecmp(argstr, "none") == 0)
|
if (g_ascii_strcasecmp(argstr, "none") == 0)
|
||||||
arg = EXPANDO_ARG_NONE;
|
arg = EXPANDO_ARG_NONE;
|
||||||
else if (strcasecmp(argstr, "server") == 0)
|
else if (g_ascii_strcasecmp(argstr, "server") == 0)
|
||||||
arg = EXPANDO_ARG_SERVER;
|
arg = EXPANDO_ARG_SERVER;
|
||||||
else if (strcasecmp(argstr, "window") == 0)
|
else if (g_ascii_strcasecmp(argstr, "window") == 0)
|
||||||
arg = EXPANDO_ARG_WINDOW;
|
arg = EXPANDO_ARG_WINDOW;
|
||||||
else if (strcasecmp(argstr, "windowitem") == 0)
|
else if (g_ascii_strcasecmp(argstr, "windowitem") == 0)
|
||||||
arg = EXPANDO_ARG_WINDOW_ITEM;
|
arg = EXPANDO_ARG_WINDOW_ITEM;
|
||||||
else if (strcasecmp(argstr, "never") == 0)
|
else if (g_ascii_strcasecmp(argstr, "never") == 0)
|
||||||
arg = EXPANDO_NEVER;
|
arg = EXPANDO_NEVER;
|
||||||
else {
|
else {
|
||||||
croak("Unknown signal type: %s", argstr);
|
croak("Unknown signal type: %s", argstr);
|
||||||
|
Loading…
Reference in New Issue
Block a user