diff options
Diffstat (limited to 'src')
41 files changed, 711 insertions, 721 deletions
diff --git a/src/core/hook/wee-hook-command-run.c b/src/core/hook/wee-hook-command-run.c index 235ad8f1b..9eb3b183e 100644 --- a/src/core/hook/wee-hook-command-run.c +++ b/src/core/hook/wee-hook-command-run.c @@ -133,15 +133,15 @@ hook_command_run_exec (struct t_gui_buffer *buffer, const char *command) { hook_matching = string_match (ptr_command, HOOK_COMMAND_RUN(ptr_hook, command), - 0); + 1); if (!hook_matching && !strchr (HOOK_COMMAND_RUN(ptr_hook, command), ' ')) { length = strlen (HOOK_COMMAND_RUN(ptr_hook, command)); - hook_matching = ((string_strncasecmp (ptr_command, - HOOK_COMMAND_RUN(ptr_hook, command), - utf8_strlen (HOOK_COMMAND_RUN(ptr_hook, command))) == 0) + hook_matching = ((string_strncmp (ptr_command, + HOOK_COMMAND_RUN(ptr_hook, command), + utf8_strlen (HOOK_COMMAND_RUN(ptr_hook, command))) == 0) && ((ptr_command[length] == ' ') || (ptr_command[length] == '\0'))); } diff --git a/src/core/hook/wee-hook-command.c b/src/core/hook/wee-hook-command.c index 5b1120ba5..c0c5d4372 100644 --- a/src/core/hook/wee-hook-command.c +++ b/src/core/hook/wee-hook-command.c @@ -66,7 +66,7 @@ hook_command_search (struct t_weechat_plugin *plugin, const char *command) { if (!ptr_hook->deleted && (ptr_hook->plugin == plugin) - && (string_strcasecmp (HOOK_COMMAND(ptr_hook, command), command) == 0)) + && (string_strcmp (HOOK_COMMAND(ptr_hook, command), command) == 0)) return ptr_hook; } @@ -406,8 +406,8 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, if (!ptr_hook->deleted) { - if (string_strcasecmp (ptr_command_name, - HOOK_COMMAND(ptr_hook, command)) == 0) + if (string_strcmp (ptr_command_name, + HOOK_COMMAND(ptr_hook, command)) == 0) { if (ptr_hook->plugin == plugin) { @@ -427,9 +427,9 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, } } else if (allow_incomplete_commands - && (string_strncasecmp (ptr_command_name, - HOOK_COMMAND(ptr_hook, command), - length_command_name) == 0)) + && (string_strncmp (ptr_command_name, + HOOK_COMMAND(ptr_hook, command), + length_command_name) == 0)) { hook_incomplete_command = ptr_hook; count_incomplete_commands++; diff --git a/src/core/hook/wee-hook-completion.c b/src/core/hook/wee-hook-completion.c index ae5d285d0..06cc36ff6 100644 --- a/src/core/hook/wee-hook-completion.c +++ b/src/core/hook/wee-hook-completion.c @@ -132,8 +132,8 @@ hook_completion_exec (struct t_weechat_plugin *plugin, if (!ptr_hook->deleted && !ptr_hook->running - && (string_strcasecmp (HOOK_COMPLETION(ptr_hook, completion_item), - item) == 0)) + && (string_strcmp (HOOK_COMPLETION(ptr_hook, completion_item), + item) == 0)) { ptr_hook->running = 1; (void) (HOOK_COMPLETION(ptr_hook, callback)) diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 9e37aeb5f..c400f328b 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -234,21 +234,21 @@ COMMAND_CALLBACK(bar) (void) buffer; /* list of bars */ - if ((argc == 1) || (string_strcasecmp (argv[1], "list") == 0)) + if ((argc == 1) || (string_strcmp (argv[1], "list") == 0)) { command_bar_list (0); return WEECHAT_RC_OK; } /* full list of bars */ - if (string_strcasecmp (argv[1], "listfull") == 0) + if (string_strcmp (argv[1], "listfull") == 0) { command_bar_list (1); return WEECHAT_RC_OK; } /* list of bar items */ - if (string_strcasecmp (argv[1], "listitems") == 0) + if (string_strcmp (argv[1], "listitems") == 0) { if (gui_bar_items) { @@ -271,7 +271,7 @@ COMMAND_CALLBACK(bar) } /* add a new bar */ - if (string_strcasecmp (argv[1], "add") == 0) + if (string_strcmp (argv[1], "add") == 0) { COMMAND_MIN_ARGS(8, "add"); pos_condition = strchr (argv[3], ','); @@ -361,7 +361,7 @@ COMMAND_CALLBACK(bar) } /* create default bars */ - if (string_strcasecmp (argv[1], "default") == 0) + if (string_strcmp (argv[1], "default") == 0) { if (argc > 2) { @@ -383,10 +383,10 @@ COMMAND_CALLBACK(bar) } /* delete a bar */ - if (string_strcasecmp (argv[1], "del") == 0) + if (string_strcmp (argv[1], "del") == 0) { COMMAND_MIN_ARGS(3, "del"); - if (string_strcasecmp (argv[2], "-all") == 0) + if (string_strcmp (argv[2], "-all") == 0) { gui_bar_free_all (); gui_chat_printf (NULL, _("All bars have been deleted")); @@ -414,7 +414,7 @@ COMMAND_CALLBACK(bar) } /* set a bar property */ - if (string_strcasecmp (argv[1], "set") == 0) + if (string_strcmp (argv[1], "set") == 0) { COMMAND_MIN_ARGS(5, "set"); ptr_bar = gui_bar_search (argv[2]); @@ -438,7 +438,7 @@ COMMAND_CALLBACK(bar) } /* hide a bar */ - if (string_strcasecmp (argv[1], "hide") == 0) + if (string_strcmp (argv[1], "hide") == 0) { COMMAND_MIN_ARGS(3, "hide"); ptr_bar = gui_bar_search (argv[2]); @@ -456,7 +456,7 @@ COMMAND_CALLBACK(bar) } /* show a bar */ - if (string_strcasecmp (argv[1], "show") == 0) + if (string_strcmp (argv[1], "show") == 0) { COMMAND_MIN_ARGS(3, "show"); ptr_bar = gui_bar_search (argv[2]); @@ -474,7 +474,7 @@ COMMAND_CALLBACK(bar) } /* toggle a bar visible/hidden */ - if (string_strcasecmp (argv[1], "toggle") == 0) + if (string_strcmp (argv[1], "toggle") == 0) { COMMAND_MIN_ARGS(3, "toggle"); ptr_bar = gui_bar_search (argv[2]); @@ -492,7 +492,7 @@ COMMAND_CALLBACK(bar) } /* scroll in a bar */ - if (string_strcasecmp (argv[1], "scroll") == 0) + if (string_strcmp (argv[1], "scroll") == 0) { COMMAND_MIN_ARGS(5, "scroll"); ptr_bar = gui_bar_search (argv[2]); @@ -608,7 +608,7 @@ COMMAND_CALLBACK(buffer) (void) pointer; (void) data; - if ((argc == 1) || (string_strcasecmp (argv[1], "list") == 0)) + if ((argc == 1) || (string_strcmp (argv[1], "list") == 0)) { /* list buffers */ gui_chat_printf (NULL, ""); @@ -642,7 +642,7 @@ COMMAND_CALLBACK(buffer) } /* create a new buffer */ - if (string_strcasecmp (argv[1], "add") == 0) + if (string_strcmp (argv[1], "add") == 0) { COMMAND_MIN_ARGS(3, "add"); arg_name = 2; @@ -650,9 +650,9 @@ COMMAND_CALLBACK(buffer) switch_to_buffer = 0; for (i = 2; i < argc; i++) { - if (string_strcasecmp (argv[i], "-free") == 0) + if (string_strcmp (argv[i], "-free") == 0) type_free = 1; - else if (string_strcasecmp (argv[i], "-switch") == 0) + else if (string_strcmp (argv[i], "-switch") == 0) switch_to_buffer = 1; else arg_name = i; @@ -678,17 +678,17 @@ COMMAND_CALLBACK(buffer) } /* clear content of buffer(s) */ - if (string_strcasecmp (argv[1], "clear") == 0) + if (string_strcmp (argv[1], "clear") == 0) { if (argc > 2) { - if (string_strcasecmp (argv[2], "-all") == 0) + if (string_strcmp (argv[2], "-all") == 0) gui_buffer_clear_all (); else { for (i = 2; i < argc; i++) { - if (string_strcasecmp (argv[i], "-merged") == 0) + if (string_strcmp (argv[i], "-merged") == 0) { ptr_buffer = buffer; clear_number = 1; @@ -732,7 +732,7 @@ COMMAND_CALLBACK(buffer) } /* move buffer to another number in the list */ - if (string_strcasecmp (argv[1], "move") == 0) + if (string_strcmp (argv[1], "move") == 0) { COMMAND_MIN_ARGS(3, "move"); if (strcmp (argv[2], "-") == 0) @@ -777,7 +777,7 @@ COMMAND_CALLBACK(buffer) } /* swap buffers */ - if (string_strcasecmp (argv[1], "swap") == 0) + if (string_strcmp (argv[1], "swap") == 0) { COMMAND_MIN_ARGS(3, "swap"); @@ -819,7 +819,7 @@ COMMAND_CALLBACK(buffer) } /* cycle between a list of buffers */ - if (string_strcasecmp (argv[1], "cycle") == 0) + if (string_strcmp (argv[1], "cycle") == 0) { COMMAND_MIN_ARGS(3, "cycle"); @@ -867,7 +867,7 @@ COMMAND_CALLBACK(buffer) } /* merge buffer with another buffer in the list */ - if (string_strcasecmp (argv[1], "merge") == 0) + if (string_strcmp (argv[1], "merge") == 0) { COMMAND_MIN_ARGS(3, "merge"); error = NULL; @@ -885,12 +885,12 @@ COMMAND_CALLBACK(buffer) } /* unmerge buffer */ - if (string_strcasecmp (argv[1], "unmerge") == 0) + if (string_strcmp (argv[1], "unmerge") == 0) { number = -1; if (argc >= 3) { - if (string_strcasecmp (argv[2], "-all") == 0) + if (string_strcmp (argv[2], "-all") == 0) { gui_buffer_unmerge_all (); return WEECHAT_RC_OK; @@ -918,11 +918,11 @@ COMMAND_CALLBACK(buffer) } /* hide buffer(s) */ - if (string_strcasecmp (argv[1], "hide") == 0) + if (string_strcmp (argv[1], "hide") == 0) { if (argc > 2) { - if (string_strcasecmp (argv[2], "-all") == 0) + if (string_strcmp (argv[2], "-all") == 0) gui_buffer_hide_all (); else { @@ -956,11 +956,11 @@ COMMAND_CALLBACK(buffer) } /* unhide buffer(s) */ - if (string_strcasecmp (argv[1], "unhide") == 0) + if (string_strcmp (argv[1], "unhide") == 0) { if (argc > 2) { - if (string_strcasecmp (argv[2], "-all") == 0) + if (string_strcmp (argv[2], "-all") == 0) gui_buffer_unhide_all (); else { @@ -994,9 +994,9 @@ COMMAND_CALLBACK(buffer) } /* switch to next/previous active buffer */ - if (string_strcasecmp (argv[1], "switch") == 0) + if (string_strcmp (argv[1], "switch") == 0) { - if ((argc > 2) && (string_strcasecmp (argv[2], "-previous") == 0)) + if ((argc > 2) && (string_strcmp (argv[2], "-previous") == 0)) gui_buffer_switch_active_buffer_previous (buffer); else gui_buffer_switch_active_buffer (buffer); @@ -1004,14 +1004,14 @@ COMMAND_CALLBACK(buffer) } /* zoom on merged buffer */ - if (string_strcasecmp (argv[1], "zoom") == 0) + if (string_strcmp (argv[1], "zoom") == 0) { gui_buffer_zoom (buffer); return WEECHAT_RC_OK; } /* renumber buffers */ - if (string_strcasecmp (argv[1], "renumber") == 0) + if (string_strcmp (argv[1], "renumber") == 0) { if (CONFIG_BOOLEAN(config_look_buffer_auto_renumber)) { @@ -1055,7 +1055,7 @@ COMMAND_CALLBACK(buffer) } /* close buffer */ - if (string_strcasecmp (argv[1], "close") == 0) + if (string_strcmp (argv[1], "close") == 0) { buffers_to_close = arraylist_new (32, 0, 0, NULL, NULL, NULL, NULL); if (!buffers_to_close) @@ -1173,7 +1173,7 @@ COMMAND_CALLBACK(buffer) } /* display or set notify level */ - if (string_strcasecmp (argv[1], "notify") == 0) + if (string_strcmp (argv[1], "notify") == 0) { if (argc < 3) { @@ -1206,8 +1206,8 @@ COMMAND_CALLBACK(buffer) * but is still accepted for compatibility with WeeChat ≤ 3.0; * it is now deprecated and will be removed in a future version) */ - if ((string_strcasecmp (argv[1], "listvar") == 0) - || (string_strcasecmp (argv[1], "localvar") == 0)) + if ((string_strcmp (argv[1], "listvar") == 0) + || (string_strcmp (argv[1], "localvar") == 0)) { if (argc > 2) ptr_buffer = gui_buffer_search_by_number_or_name (argv[2]); @@ -1239,7 +1239,7 @@ COMMAND_CALLBACK(buffer) } /* set a local variable in buffer */ - if (string_strcasecmp (argv[1], "setvar") == 0) + if (string_strcmp (argv[1], "setvar") == 0) { COMMAND_MIN_ARGS(3, "setvar"); if (argc == 3) @@ -1259,7 +1259,7 @@ COMMAND_CALLBACK(buffer) } /* delete a local variable from a buffer */ - if (string_strcasecmp (argv[1], "delvar") == 0) + if (string_strcmp (argv[1], "delvar") == 0) { COMMAND_MIN_ARGS(3, "delvar"); gui_buffer_local_var_remove (buffer, argv[2]); @@ -1267,7 +1267,7 @@ COMMAND_CALLBACK(buffer) } /* set a property on buffer */ - if (string_strcasecmp (argv[1], "set") == 0) + if (string_strcmp (argv[1], "set") == 0) { COMMAND_MIN_ARGS(3, "set"); if (argc == 3) @@ -1289,7 +1289,7 @@ COMMAND_CALLBACK(buffer) } /* get a buffer property */ - if (string_strcasecmp (argv[1], "get") == 0) + if (string_strcmp (argv[1], "get") == 0) { COMMAND_MIN_ARGS(3, "get"); if (gui_buffer_property_in_list (gui_buffer_properties_get_integer, @@ -1304,7 +1304,7 @@ COMMAND_CALLBACK(buffer) } if (gui_buffer_property_in_list (gui_buffer_properties_get_string, argv[2]) - || (string_strncasecmp (argv[2], "localvar_", 9) == 0)) + || (string_strncmp (argv[2], "localvar_", 9) == 0)) { gui_chat_printf (NULL, "%s%s%s: (str) %s = %s", GUI_COLOR(GUI_COLOR_CHAT_BUFFER), @@ -1327,16 +1327,16 @@ COMMAND_CALLBACK(buffer) } /* jump to another buffer */ - if (string_strcasecmp (argv[1], "jump") == 0) + if (string_strcmp (argv[1], "jump") == 0) { COMMAND_MIN_ARGS(3, "jump"); - if (string_strcasecmp (argv[2], "smart") == 0) + if (string_strcmp (argv[2], "smart") == 0) gui_buffer_jump_smart (gui_current_window); - else if (string_strcasecmp (argv[2], "last_displayed") == 0) + else if (string_strcmp (argv[2], "last_displayed") == 0) gui_buffer_jump_last_buffer_displayed (gui_current_window); - else if (string_strcasecmp (argv[2], "prev_visited") == 0) + else if (string_strcmp (argv[2], "prev_visited") == 0) gui_buffer_jump_previously_visited_buffer (gui_current_window); - else if (string_strcasecmp (argv[2], "next_visited") == 0) + else if (string_strcmp (argv[2], "next_visited") == 0) gui_buffer_jump_next_visited_buffer (gui_current_window); else COMMAND_ERROR; @@ -1560,7 +1560,7 @@ COMMAND_CALLBACK(color) } /* send terminal/colors info to buffer */ - if (string_strcasecmp (argv[1], "-o") == 0) + if (string_strcmp (argv[1], "-o") == 0) { gui_color_info_term_colors (str_color, sizeof (str_color)); (void) input_data (buffer, str_color, NULL); @@ -1568,7 +1568,7 @@ COMMAND_CALLBACK(color) } /* add a color alias */ - if (string_strcasecmp (argv[1], "alias") == 0) + if (string_strcmp (argv[1], "alias") == 0) { COMMAND_MIN_ARGS(4, "alias"); @@ -1628,7 +1628,7 @@ COMMAND_CALLBACK(color) } /* delete a color alias */ - if (string_strcasecmp (argv[1], "unalias") == 0) + if (string_strcmp (argv[1], "unalias") == 0) { COMMAND_MIN_ARGS(3, "unalias"); @@ -1675,21 +1675,21 @@ COMMAND_CALLBACK(color) } /* reset color pairs */ - if (string_strcasecmp (argv[1], "reset") == 0) + if (string_strcmp (argv[1], "reset") == 0) { gui_color_reset_pairs (); return WEECHAT_RC_OK; } /* switch WeeChat/terminal colors */ - if (string_strcasecmp (argv[1], "switch") == 0) + if (string_strcmp (argv[1], "switch") == 0) { gui_color_switch_colors (); return WEECHAT_RC_OK; } /* convert terminal color to RGB color */ - if (string_strcasecmp (argv[1], "term2rgb") == 0) + if (string_strcmp (argv[1], "term2rgb") == 0) { COMMAND_MIN_ARGS(3, "term2rgb"); error = NULL; @@ -1704,7 +1704,7 @@ COMMAND_CALLBACK(color) } /* convert RGB color to terminal color */ - if (string_strcasecmp (argv[1], "rgb2term") == 0) + if (string_strcmp (argv[1], "rgb2term") == 0) { COMMAND_MIN_ARGS(3, "rgb2term"); if (sscanf ((argv[2][0] == '#') ? argv[2] + 1 : argv[2], "%x", &rgb) != 1) @@ -1751,7 +1751,7 @@ COMMAND_CALLBACK(command) any_plugin = 0; ptr_plugin = NULL; - if ((argc >= 5) && (string_strcasecmp (argv[1], "-buffer") == 0)) + if ((argc >= 5) && (string_strcmp (argv[1], "-buffer") == 0)) { ptr_buffer = gui_buffer_search_by_full_name (argv[2]); if (!ptr_buffer) @@ -1770,7 +1770,7 @@ COMMAND_CALLBACK(command) any_plugin = 1; ptr_plugin = ptr_buffer->plugin; } - else if (string_strcasecmp (argv[index_args], PLUGIN_CORE) != 0) + else if (string_strcmp (argv[index_args], PLUGIN_CORE) != 0) { ptr_plugin = plugin_search (argv[index_args]); if (!ptr_plugin) @@ -1826,7 +1826,7 @@ COMMAND_CALLBACK(cursor) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "go") == 0) + if (string_strcmp (argv[1], "go") == 0) { if (argc > 2) { @@ -1857,31 +1857,31 @@ COMMAND_CALLBACK(cursor) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "move") == 0) + if (string_strcmp (argv[1], "move") == 0) { if (argc > 2) { - if (string_strcasecmp (argv[2], "up") == 0) + if (string_strcmp (argv[2], "up") == 0) gui_cursor_move_add_xy (0, -1); - else if (string_strcasecmp (argv[2], "down") == 0) + else if (string_strcmp (argv[2], "down") == 0) gui_cursor_move_add_xy (0, 1); - else if (string_strcasecmp (argv[2], "left") == 0) + else if (string_strcmp (argv[2], "left") == 0) gui_cursor_move_add_xy (-1, 0); - else if (string_strcasecmp (argv[2], "right") == 0) + else if (string_strcmp (argv[2], "right") == 0) gui_cursor_move_add_xy (1, 0); - else if (string_strcasecmp (argv[2], "area_up") == 0) + else if (string_strcmp (argv[2], "area_up") == 0) gui_cursor_move_area_add_xy (0, -1); - else if (string_strcasecmp (argv[2], "area_down") == 0) + else if (string_strcmp (argv[2], "area_down") == 0) gui_cursor_move_area_add_xy (0, 1); - else if (string_strcasecmp (argv[2], "area_left") == 0) + else if (string_strcmp (argv[2], "area_left") == 0) gui_cursor_move_area_add_xy (-1, 0); - else if (string_strcasecmp (argv[2], "area_right") == 0) + else if (string_strcmp (argv[2], "area_right") == 0) gui_cursor_move_area_add_xy (1, 0); } return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "stop") == 0) + if (string_strcmp (argv[1], "stop") == 0) { gui_cursor_mode_stop (); return WEECHAT_RC_OK; @@ -1906,7 +1906,7 @@ COMMAND_CALLBACK(debug) (void) pointer; (void) data; - if ((argc == 1) || (string_strcasecmp (argv[1], "list") == 0)) + if ((argc == 1) || (string_strcmp (argv[1], "list") == 0)) { gui_chat_printf (NULL, ""); gui_chat_printf (NULL, "Debug:"); @@ -1925,7 +1925,7 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "buffer") == 0) + if (string_strcmp (argv[1], "buffer") == 0) { gui_buffer_dump_hexa (buffer); gui_chat_printf (NULL, @@ -1934,7 +1934,7 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "certs") == 0) + if (string_strcmp (argv[1], "certs") == 0) { gui_chat_printf (NULL, NG_("%d certificate loaded (system: %d, user: %d)", @@ -1946,32 +1946,32 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "color") == 0) + if (string_strcmp (argv[1], "color") == 0) { gui_color_dump (); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "cursor") == 0) + if (string_strcmp (argv[1], "cursor") == 0) { if (gui_cursor_debug) gui_cursor_debug_set (0); else { debug = ((argc > 2) - && (string_strcasecmp (argv[2], "verbose") == 0)) ? 2 : 1; + && (string_strcmp (argv[2], "verbose") == 0)) ? 2 : 1; gui_cursor_debug_set (debug); } return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "dirs") == 0) + if (string_strcmp (argv[1], "dirs") == 0) { debug_directories (); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "dump") == 0) + if (string_strcmp (argv[1], "dump") == 0) { if (argc > 2) log_printf ("Dump request for plugin: \"%s\"", argv_eol[2]); @@ -1984,16 +1984,16 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "hdata") == 0) + if (string_strcmp (argv[1], "hdata") == 0) { - if ((argc > 2) && (string_strcasecmp (argv[2], "free") == 0)) + if ((argc > 2) && (string_strcmp (argv[2], "free") == 0)) hdata_free_all (); else debug_hdata (); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "hooks") == 0) + if (string_strcmp (argv[1], "hooks") == 0) { if (argc > 2) debug_hooks_plugin (argv[2]); @@ -2002,13 +2002,13 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "infolists") == 0) + if (string_strcmp (argv[1], "infolists") == 0) { debug_infolists (); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "libs") == 0) + if (string_strcmp (argv[1], "libs") == 0) { gui_chat_printf (NULL, ""); gui_chat_printf (NULL, "Libs:"); @@ -2016,26 +2016,26 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "memory") == 0) + if (string_strcmp (argv[1], "memory") == 0) { debug_memory (); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "mouse") == 0) + if (string_strcmp (argv[1], "mouse") == 0) { if (gui_mouse_debug) gui_mouse_debug_set (0); else { debug = ((argc > 2) - && (string_strcasecmp (argv[2], "verbose") == 0)) ? 2 : 1; + && (string_strcmp (argv[2], "verbose") == 0)) ? 2 : 1; gui_mouse_debug_set (debug); } return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "set") == 0) + if (string_strcmp (argv[1], "set") == 0) { COMMAND_MIN_ARGS(4, "set"); if (strcmp (argv[3], "0") == 0) @@ -2067,21 +2067,21 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "tags") == 0) + if (string_strcmp (argv[1], "tags") == 0) { gui_chat_display_tags ^= 1; gui_window_ask_refresh (2); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "term") == 0) + if (string_strcmp (argv[1], "term") == 0) { gui_window_term_display_infos (); weechat_term_check (); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "time") == 0) + if (string_strcmp (argv[1], "time") == 0) { COMMAND_MIN_ARGS(3, "time"); gettimeofday (&time_start, NULL); @@ -2091,7 +2091,7 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "unicode") == 0) + if (string_strcmp (argv[1], "unicode") == 0) { COMMAND_MIN_ARGS(3, "unicode"); result = eval_expression (argv_eol[2], NULL, NULL, NULL); @@ -2103,7 +2103,7 @@ COMMAND_CALLBACK(debug) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "windows") == 0) + if (string_strcmp (argv[1], "windows") == 0) { debug_windows_tree (); return WEECHAT_RC_OK; @@ -2170,22 +2170,22 @@ COMMAND_CALLBACK(eval) ptr_args = argv_eol[1]; for (i = 1; i < argc; i++) { - if (string_strcasecmp (argv[i], "-n") == 0) + if (string_strcmp (argv[i], "-n") == 0) { print_only = 1; ptr_args = argv_eol[i + 1]; } - else if (string_strcasecmp (argv[i], "-s") == 0) + else if (string_strcmp (argv[i], "-s") == 0) { split_command = 1; ptr_args = argv_eol[i + 1]; } - else if (string_strcasecmp (argv[i], "-c") == 0) + else if (string_strcmp (argv[i], "-c") == 0) { condition = 1; ptr_args = argv_eol[i + 1]; } - else if (string_strcasecmp (argv[i], "-d") == 0) + else if (string_strcmp (argv[i], "-d") == 0) { debug++; ptr_args = argv_eol[i + 1]; @@ -2367,7 +2367,7 @@ COMMAND_CALLBACK(filter) (void) pointer; (void) data; - if ((argc == 1) || (string_strcasecmp (argv[1], "list") == 0)) + if ((argc == 1) || (string_strcmp (argv[1], "list") == 0)) { /* display all filters */ gui_chat_printf_date_tags (NULL, 0, GUI_FILTER_TAG_NO_FILTER, ""); @@ -2397,7 +2397,7 @@ COMMAND_CALLBACK(filter) } /* enable global filtering or a filter */ - if (string_strcasecmp (argv[1], "enable") == 0) + if (string_strcmp (argv[1], "enable") == 0) { if (argc > 2) { @@ -2454,7 +2454,7 @@ COMMAND_CALLBACK(filter) } /* disable global filtering or a filter */ - if (string_strcasecmp (argv[1], "disable") == 0) + if (string_strcmp (argv[1], "disable") == 0) { if (argc > 2) { @@ -2511,7 +2511,7 @@ COMMAND_CALLBACK(filter) } /* toggle global filtering or a filter on/off */ - if (string_strcasecmp (argv[1], "toggle") == 0) + if (string_strcmp (argv[1], "toggle") == 0) { if (argc > 2) { @@ -2556,8 +2556,8 @@ COMMAND_CALLBACK(filter) } /* add (or add/replace) a filter */ - if ((string_strcasecmp (argv[1], "add") == 0) - || (string_strcasecmp (argv[1], "addreplace") == 0)) + if ((string_strcmp (argv[1], "add") == 0) + || (string_strcmp (argv[1], "addreplace") == 0)) { COMMAND_MIN_ARGS(6, argv[1]); @@ -2571,7 +2571,7 @@ COMMAND_CALLBACK(filter) } update = 0; - if (string_strcasecmp (argv[1], "addreplace") == 0) + if (string_strcmp (argv[1], "addreplace") == 0) { ptr_filter = gui_filter_search_by_name (argv[2]); if (ptr_filter) @@ -2601,7 +2601,7 @@ COMMAND_CALLBACK(filter) } /* recreate a filter */ - if (string_strcasecmp (argv[1], "recreate") == 0) + if (string_strcmp (argv[1], "recreate") == 0) { COMMAND_MIN_ARGS(3, "recreate"); ptr_filter = gui_filter_search_by_name (argv[2]); @@ -2629,7 +2629,7 @@ COMMAND_CALLBACK(filter) } /* rename a filter */ - if (string_strcasecmp (argv[1], "rename") == 0) + if (string_strcmp (argv[1], "rename") == 0) { COMMAND_MIN_ARGS(4, "rename"); ptr_filter = gui_filter_search_by_name (argv[2]); @@ -2661,10 +2661,10 @@ COMMAND_CALLBACK(filter) } /* delete filter */ - if (string_strcasecmp (argv[1], "del") == 0) + if (string_strcmp (argv[1], "del") == 0) { COMMAND_MIN_ARGS(3, "del"); - if (string_strcasecmp (argv[2], "-all") == 0) + if (string_strcmp (argv[2], "-all") == 0) { if (gui_filters) { @@ -2896,14 +2896,14 @@ COMMAND_CALLBACK(help) (void) argv_eol; /* display help for all commands */ - if ((argc == 1) || (string_strncasecmp (argv[1], "-list", 5) == 0)) + if ((argc == 1) || (string_strncmp (argv[1], "-list", 5) == 0)) { - verbose = ((argc > 1) && (string_strcasecmp (argv[1], "-listfull") == 0)); + verbose = ((argc > 1) && (string_strcmp (argv[1], "-listfull") == 0)); if (argc > 2) { for (i = 2; i < argc; i++) { - if (string_strcasecmp (argv[i], PLUGIN_CORE) == 0) + if (string_strcmp (argv[i], PLUGIN_CORE) == 0) command_help_list_plugin_commands (NULL, verbose); else { @@ -2926,8 +2926,7 @@ COMMAND_CALLBACK(help) if (!ptr_hook->deleted && HOOK_COMMAND(ptr_hook, command) && HOOK_COMMAND(ptr_hook, command)[0] - && (string_strcasecmp (HOOK_COMMAND(ptr_hook, command), - argv[1]) == 0)) + && (string_strcmp (HOOK_COMMAND(ptr_hook, command), argv[1]) == 0)) { command_found = 1; gui_chat_printf (NULL, ""); @@ -3292,7 +3291,7 @@ COMMAND_CALLBACK(history) if (argc == 2) { - if (string_strcasecmp (argv[1], "clear") == 0) + if (string_strcmp (argv[1], "clear") == 0) { gui_history_buffer_free (buffer); return WEECHAT_RC_OK; @@ -3345,7 +3344,7 @@ COMMAND_CALLBACK(hotlist) COMMAND_MIN_ARGS(2, ""); - if (string_strcasecmp (argv[1], "add") == 0) + if (string_strcmp (argv[1], "add") == 0) { priority = GUI_HOTLIST_LOW; if (argc > 2) @@ -3362,21 +3361,21 @@ COMMAND_CALLBACK(hotlist) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "clear") == 0) + if (string_strcmp (argv[1], "clear") == 0) { gui_hotlist_clear_level_string (buffer, (argc > 2) ? argv[2] : NULL); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "remove") == 0) + if (string_strcmp (argv[1], "remove") == 0) { gui_hotlist_remove_buffer (buffer, 1); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "restore") == 0) + if (string_strcmp (argv[1], "restore") == 0) { - if ((argc > 2) && (string_strcasecmp (argv[2], "-all") == 0)) + if ((argc > 2) && (string_strcmp (argv[2], "-all") == 0)) gui_hotlist_restore_all_buffers (); else gui_hotlist_restore_buffer (buffer); @@ -3398,94 +3397,94 @@ COMMAND_CALLBACK(input) COMMAND_MIN_ARGS(2, ""); - if (string_strcasecmp (argv[1], "clipboard_paste") == 0) + if (string_strcmp (argv[1], "clipboard_paste") == 0) gui_input_clipboard_paste (buffer); - else if (string_strcasecmp (argv[1], "return") == 0) + else if (string_strcmp (argv[1], "return") == 0) gui_input_return (buffer); - else if (string_strcasecmp (argv[1], "complete_next") == 0) + else if (string_strcmp (argv[1], "complete_next") == 0) gui_input_complete_next (buffer); - else if (string_strcasecmp (argv[1], "complete_previous") == 0) + else if (string_strcmp (argv[1], "complete_previous") == 0) gui_input_complete_previous (buffer); - else if (string_strcasecmp (argv[1], "search_text_here") == 0) + else if (string_strcmp (argv[1], "search_text_here") == 0) gui_input_search_text_here (buffer); - else if (string_strcasecmp (argv[1], "search_text") == 0) + else if (string_strcmp (argv[1], "search_text") == 0) gui_input_search_text (buffer); - else if (string_strcasecmp (argv[1], "search_previous") == 0) + else if (string_strcmp (argv[1], "search_previous") == 0) gui_input_search_previous (buffer); - else if (string_strcasecmp (argv[1], "search_next") == 0) + else if (string_strcmp (argv[1], "search_next") == 0) gui_input_search_next (buffer); - else if (string_strcasecmp (argv[1], "search_switch_case") == 0) + else if (string_strcmp (argv[1], "search_switch_case") == 0) gui_input_search_switch_case (buffer); - else if (string_strcasecmp (argv[1], "search_switch_regex") == 0) + else if (string_strcmp (argv[1], "search_switch_regex") == 0) gui_input_search_switch_regex (buffer); - else if (string_strcasecmp (argv[1], "search_switch_where") == 0) + else if (string_strcmp (argv[1], "search_switch_where") == 0) gui_input_search_switch_where (buffer); - else if (string_strcasecmp (argv[1], "search_stop_here") == 0) + else if (string_strcmp (argv[1], "search_stop_here") == 0) gui_input_search_stop_here (buffer); - else if (string_strcasecmp (argv[1], "search_stop") == 0) + else if (string_strcmp (argv[1], "search_stop") == 0) gui_input_search_stop (buffer); - else if (string_strcasecmp (argv[1], "delete_previous_char") == 0) + else if (string_strcmp (argv[1], "delete_previous_char") == 0) gui_input_delete_previous_char (buffer); - else if (string_strcasecmp (argv[1], "delete_next_char") == 0) + else if (string_strcmp (argv[1], "delete_next_char") == 0) gui_input_delete_next_char (buffer); - else if (string_strcasecmp (argv[1], "delete_previous_word") == 0) + else if (string_strcmp (argv[1], "delete_previous_word") == 0) gui_input_delete_previous_word (buffer); - else if (string_strcasecmp (argv[1], "delete_previous_word_whitespace") == 0) + else if (string_strcmp (argv[1], "delete_previous_word_whitespace") == 0) gui_input_delete_previous_word_whitespace (buffer); - else if (string_strcasecmp (argv[1], "delete_next_word") == 0) + else if (string_strcmp (argv[1], "delete_next_word") == 0) gui_input_delete_next_word (buffer); - else if (string_strcasecmp (argv[1], "delete_beginning_of_line") == 0) + else if (string_strcmp (argv[1], "delete_beginning_of_line") == 0) gui_input_delete_beginning_of_line (buffer); - else if (string_strcasecmp (argv[1], "delete_end_of_line") == 0) + else if (string_strcmp (argv[1], "delete_end_of_line") == 0) gui_input_delete_end_of_line (buffer); - else if (string_strcasecmp (argv[1], "delete_line") == 0) + else if (string_strcmp (argv[1], "delete_line") == 0) gui_input_delete_line (buffer); - else if (string_strcasecmp (argv[1], "transpose_chars") == 0) + else if (string_strcmp (argv[1], "transpose_chars") == 0) gui_input_transpose_chars (buffer); - else if (string_strcasecmp (argv[1], "move_beginning_of_line") == 0) + else if (string_strcmp (argv[1], "move_beginning_of_line") == 0) gui_input_move_beginning_of_line (buffer); - else if (string_strcasecmp (argv[1], "move_end_of_line") == 0) + else if (string_strcmp (argv[1], "move_end_of_line") == 0) gui_input_move_end_of_line (buffer); - else if (string_strcasecmp (argv[1], "move_previous_char") == 0) + else if (string_strcmp (argv[1], "move_previous_char") == 0) gui_input_move_previous_char (buffer); - else if (string_strcasecmp (argv[1], "move_next_char") == 0) + else if (string_strcmp (argv[1], "move_next_char") == 0) gui_input_move_next_char (buffer); - else if (string_strcasecmp (argv[1], "move_previous_word") == 0) + else if (string_strcmp (argv[1], "move_previous_word") == 0) gui_input_move_previous_word (buffer); - else if (string_strcasecmp (argv[1], "move_next_word") == 0) + else if (string_strcmp (argv[1], "move_next_word") == 0) gui_input_move_next_word (buffer); - else if (string_strcasecmp (argv[1], "history_previous") == 0) + else if (string_strcmp (argv[1], "history_previous") == 0) gui_input_history_local_previous (buffer); - else if (string_strcasecmp (argv[1], "history_next") == 0) + else if (string_strcmp (argv[1], "history_next") == 0) gui_input_history_local_next (buffer); - else if (string_strcasecmp (argv[1], "history_global_previous") == 0) + else if (string_strcmp (argv[1], "history_global_previous") == 0) gui_input_history_global_previous (buffer); - else if (string_strcasecmp (argv[1], "history_global_next") == 0) + else if (string_strcmp (argv[1], "history_global_next") == 0) gui_input_history_global_next (buffer); - else if (string_strcasecmp (argv[1], "grab_key") == 0) + else if (string_strcmp (argv[1], "grab_key") == 0) gui_input_grab_key (buffer, 0, (argc > 2) ? argv[2] : NULL); - else if (string_strcasecmp (argv[1], "grab_key_command") == 0) + else if (string_strcmp (argv[1], "grab_key_command") == 0) gui_input_grab_key (buffer, 1, (argc > 2) ? argv[2] : NULL); - else if (string_strcasecmp (argv[1], "grab_mouse") == 0) + else if (string_strcmp (argv[1], "grab_mouse") == 0) gui_input_grab_mouse (buffer, 0); - else if (string_strcasecmp (argv[1], "grab_mouse_area") == 0) + else if (string_strcmp (argv[1], "grab_mouse_area") == 0) gui_input_grab_mouse (buffer, 1); - else if (string_strcasecmp (argv[1], "insert") == 0) + else if (string_strcmp (argv[1], "insert") == 0) { if (argc > 2) gui_input_insert (buffer, argv_eol[2]); } - else if (string_strcasecmp (argv[1], "send") == 0) + else if (string_strcmp (argv[1], "send") == 0) (void) input_data (buffer, argv_eol[2], NULL); - else if (string_strcasecmp (argv[1], "undo") == 0) + else if (string_strcmp (argv[1], "undo") == 0) gui_input_undo (buffer); - else if (string_strcasecmp (argv[1], "redo") == 0) + else if (string_strcmp (argv[1], "redo") == 0) gui_input_redo (buffer); - else if (string_strcasecmp (argv[1], "paste_start") == 0) + else if (string_strcmp (argv[1], "paste_start") == 0) { /* do nothing here */ } - else if (string_strcasecmp (argv[1], "paste_stop") == 0) + else if (string_strcmp (argv[1], "paste_stop") == 0) { /* do nothing here */ } @@ -3497,46 +3496,46 @@ COMMAND_CALLBACK(input) */ /* since WeeChat 3.8: "/buffer jump smart" */ - if (string_strcasecmp (argv[1], "jump_smart") == 0) + if (string_strcmp (argv[1], "jump_smart") == 0) gui_buffer_jump_smart (gui_current_window); /* since WeeChat 1.0: "/buffer +" */ - else if (string_strcasecmp (argv[1], "jump_last_buffer") == 0) + else if (string_strcmp (argv[1], "jump_last_buffer") == 0) gui_buffer_jump_last_visible_number (gui_current_window); /* since WeeChat 3.8: "/buffer jump last_displayed" */ - else if (string_strcasecmp (argv[1], "jump_last_buffer_displayed") == 0) + else if (string_strcmp (argv[1], "jump_last_buffer_displayed") == 0) gui_buffer_jump_last_buffer_displayed (gui_current_window); /* since WeeChat 3.8: "/buffer jump prev_visited" */ - else if (string_strcasecmp (argv[1], "jump_previously_visited_buffer") == 0) + else if (string_strcmp (argv[1], "jump_previously_visited_buffer") == 0) gui_buffer_jump_previously_visited_buffer (gui_current_window); /* since WeeChat 3.8: "/buffer jump next_visited" */ - else if (string_strcasecmp (argv[1], "jump_next_visited_buffer") == 0) + else if (string_strcmp (argv[1], "jump_next_visited_buffer") == 0) gui_buffer_jump_next_visited_buffer (gui_current_window); /* since WeeChat 3.8: "/hotlist clear" */ - else if (string_strcasecmp (argv[1], "hotlist_clear") == 0) + else if (string_strcmp (argv[1], "hotlist_clear") == 0) gui_hotlist_clear_level_string (buffer, (argc > 2) ? argv[2] : NULL); /* since WeeChat 3.8: "/hotlist remove" */ - else if (string_strcasecmp (argv[1], "hotlist_remove_buffer") == 0) + else if (string_strcmp (argv[1], "hotlist_remove_buffer") == 0) gui_hotlist_remove_buffer (buffer, 1); /* since WeeChat 3.8: "/hotlist restore" */ - else if (string_strcasecmp (argv[1], "hotlist_restore_buffer") == 0) + else if (string_strcmp (argv[1], "hotlist_restore_buffer") == 0) gui_hotlist_restore_buffer (buffer); /* since WeeChat 3.8: "/hotlist restore -all" */ - else if (string_strcasecmp (argv[1], "hotlist_restore_all") == 0) + else if (string_strcmp (argv[1], "hotlist_restore_all") == 0) gui_hotlist_restore_all_buffers (); /* since WeeChat 3.8: "/buffer set unread" */ - else if (string_strcasecmp (argv[1], "set_unread_current_buffer") == 0) + else if (string_strcmp (argv[1], "set_unread_current_buffer") == 0) (void) input_data (buffer, "/buffer set unread", NULL); /* since WeeChat 3.8: "/allbuf /buffer set unread" */ - else if (string_strcasecmp (argv[1], "set_unread") == 0) + else if (string_strcmp (argv[1], "set_unread") == 0) (void) input_data (buffer, "/allbuf /buffer set unread", NULL); /* since WeeChat 3.8: "/buffer switch" */ - else if (string_strcasecmp (argv[1], "switch_active_buffer") == 0) + else if (string_strcmp (argv[1], "switch_active_buffer") == 0) gui_buffer_switch_active_buffer (buffer); /* since WeeChat 3.8: "/buffer switch previous" */ - else if (string_strcasecmp (argv[1], "switch_active_buffer_previous") == 0) + else if (string_strcmp (argv[1], "switch_active_buffer_previous") == 0) gui_buffer_switch_active_buffer_previous (buffer); /* since WeeChat 3.8: "/buffer zoom" */ - else if (string_strcasecmp (argv[1], "zoom_merged_buffer") == 0) + else if (string_strcmp (argv[1], "zoom_merged_buffer") == 0) gui_buffer_zoom (buffer); else COMMAND_ERROR; @@ -3559,7 +3558,7 @@ COMMAND_CALLBACK(item) (void) pointer; (void) data; - if ((argc == 1) || (string_strcasecmp (argv[1], "list") == 0)) + if ((argc == 1) || (string_strcmp (argv[1], "list") == 0)) { /* display all custom bar items */ if (gui_custom_bar_items) @@ -3595,8 +3594,8 @@ COMMAND_CALLBACK(item) } /* add (or add/replace) a custom bar item */ - if ((string_strcasecmp (argv[1], "add") == 0) - || (string_strcasecmp (argv[1], "addreplace") == 0)) + if ((string_strcmp (argv[1], "add") == 0) + || (string_strcmp (argv[1], "addreplace") == 0)) { sargv = string_split_shell (argv_eol[2], &sargc); if (!sargv || (sargc < 3)) @@ -3607,7 +3606,7 @@ COMMAND_CALLBACK(item) } update = 0; - if (string_strcasecmp (argv[1], "addreplace") == 0) + if (string_strcmp (argv[1], "addreplace") == 0) { ptr_bar_item_custom = gui_bar_item_custom_search (sargv[0]); if (ptr_bar_item_custom) @@ -3641,7 +3640,7 @@ COMMAND_CALLBACK(item) } /* refresh bar items */ - if (string_strcasecmp (argv[1], "refresh") == 0) + if (string_strcmp (argv[1], "refresh") == 0) { for (i = 2; i < argc; i++) { @@ -3651,7 +3650,7 @@ COMMAND_CALLBACK(item) } /* recreate a custom bar item */ - if (string_strcasecmp (argv[1], "recreate") == 0) + if (string_strcmp (argv[1], "recreate") == 0) { COMMAND_MIN_ARGS(3, "recreate"); ptr_bar_item_custom = gui_bar_item_custom_search (argv[2]); @@ -3678,7 +3677,7 @@ COMMAND_CALLBACK(item) } /* rename a custom bar item */ - if (string_strcasecmp (argv[1], "rename") == 0) + if (string_strcmp (argv[1], "rename") == 0) { COMMAND_MIN_ARGS(4, "rename"); ptr_bar_item_custom = gui_bar_item_custom_search (argv[2]); @@ -3710,10 +3709,10 @@ COMMAND_CALLBACK(item) } /* delete a custom bar item */ - if (string_strcasecmp (argv[1], "del") == 0) + if (string_strcmp (argv[1], "del") == 0) { COMMAND_MIN_ARGS(3, "del"); - if (string_strcasecmp (argv[2], "-all") == 0) + if (string_strcmp (argv[2], "-all") == 0) { if (gui_custom_bar_items) { @@ -4006,12 +4005,12 @@ COMMAND_CALLBACK(key) (void) buffer; /* display all key bindings (current keys) */ - if ((argc == 1) || (string_strcasecmp (argv[1], "list") == 0)) + if ((argc == 1) || (string_strcmp (argv[1], "list") == 0)) { for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++) { if ((argc < 3) - || (string_strcasecmp (argv[2], gui_key_context_string[i]) == 0)) + || (string_strcmp (argv[2], gui_key_context_string[i]) == 0)) { command_key_display_list (_("No key binding defined for " "context \"%s\""), @@ -4025,12 +4024,12 @@ COMMAND_CALLBACK(key) } /* display redefined or key bindings added */ - if (string_strcasecmp (argv[1], "listdiff") == 0) + if (string_strcmp (argv[1], "listdiff") == 0) { for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++) { if ((argc < 3) - || (string_strcasecmp (argv[2], gui_key_context_string[i]) == 0)) + || (string_strcmp (argv[2], gui_key_context_string[i]) == 0)) { command_key_display_listdiff (i); } @@ -4039,12 +4038,12 @@ COMMAND_CALLBACK(key) } /* display default key bindings */ - if (string_strcasecmp (argv[1], "listdefault") == 0) + if (string_strcmp (argv[1], "listdefault") == 0) { for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++) { if ((argc < 3) - || (string_strcasecmp (argv[2], gui_key_context_string[i]) == 0)) + || (string_strcmp (argv[2], gui_key_context_string[i]) == 0)) { command_key_display_list (_("No default key binding for " "context \"%s\""), @@ -4060,7 +4059,7 @@ COMMAND_CALLBACK(key) } /* bind a key (or display binding) */ - if (string_strcasecmp (argv[1], "bind") == 0) + if (string_strcmp (argv[1], "bind") == 0) { COMMAND_MIN_ARGS(3, "bind"); @@ -4120,7 +4119,7 @@ COMMAND_CALLBACK(key) } /* bind a key for given context (or display binding) */ - if (string_strcasecmp (argv[1], "bindctxt") == 0) + if (string_strcmp (argv[1], "bindctxt") == 0) { COMMAND_MIN_ARGS(4, "bindctxt"); @@ -4191,7 +4190,7 @@ COMMAND_CALLBACK(key) } /* unbind a key */ - if (string_strcasecmp (argv[1], "unbind") == 0) + if (string_strcmp (argv[1], "unbind") == 0) { COMMAND_MIN_ARGS(3, "unbind"); @@ -4211,7 +4210,7 @@ COMMAND_CALLBACK(key) } /* unbind a key for a given context */ - if (string_strcasecmp (argv[1], "unbindctxt") == 0) + if (string_strcmp (argv[1], "unbindctxt") == 0) { COMMAND_MIN_ARGS(4, "unbindctxt"); @@ -4242,14 +4241,14 @@ COMMAND_CALLBACK(key) } /* reset a key to default binding */ - if (string_strcasecmp (argv[1], "reset") == 0) + if (string_strcmp (argv[1], "reset") == 0) { COMMAND_MIN_ARGS(3, "reset"); return command_key_reset (GUI_KEY_CONTEXT_DEFAULT, argv[2]); } /* reset a key to default binding for a given context */ - if (string_strcasecmp (argv[1], "resetctxt") == 0) + if (string_strcmp (argv[1], "resetctxt") == 0) { COMMAND_MIN_ARGS(4, "resetctxt"); @@ -4268,14 +4267,14 @@ COMMAND_CALLBACK(key) } /* reset ALL keys (only with "-yes", for security reason) */ - if (string_strcasecmp (argv[1], "resetall") == 0) + if (string_strcmp (argv[1], "resetall") == 0) { - if ((argc >= 3) && (string_strcasecmp (argv[2], "-yes") == 0)) + if ((argc >= 3) && (string_strcmp (argv[2], "-yes") == 0)) { for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++) { if ((argc < 4) - || (string_strcasecmp (argv[3], gui_key_context_string[i]) == 0)) + || (string_strcmp (argv[3], gui_key_context_string[i]) == 0)) { gui_key_free_all (&gui_keys[i], &last_gui_key[i], &gui_keys_count[i]); @@ -4299,12 +4298,12 @@ COMMAND_CALLBACK(key) } /* add missing keys */ - if (string_strcasecmp (argv[1], "missing") == 0) + if (string_strcmp (argv[1], "missing") == 0) { for (i = 0; i < GUI_KEY_NUM_CONTEXTS; i++) { if ((argc < 3) - || (string_strcasecmp (argv[2], gui_key_context_string[i]) == 0)) + || (string_strcmp (argv[2], gui_key_context_string[i]) == 0)) { old_keys_count = gui_keys_count[i]; gui_key_verbose = 1; @@ -4388,9 +4387,9 @@ command_layout_get_arguments (int argc, char **argv, for (i = 2; i < argc; i++) { - if (string_strcasecmp (argv[i], "buffers") == 0) + if (string_strcmp (argv[i], "buffers") == 0) *flag_windows = 0; - else if (string_strcasecmp (argv[i], "windows") == 0) + else if (string_strcmp (argv[i], "windows") == 0) *flag_buffers = 0; else if (!*layout_name) *layout_name = argv[i]; @@ -4460,7 +4459,7 @@ COMMAND_CALLBACK(layout) } /* store in a layout */ - if (string_strcasecmp (argv[1], "store") == 0) + if (string_strcmp (argv[1], "store") == 0) { command_layout_get_arguments (argc, argv, &layout_name, &ptr_layout, &flag_buffers, &flag_windows); @@ -4489,7 +4488,7 @@ COMMAND_CALLBACK(layout) } /* apply layout */ - if (string_strcasecmp (argv[1], "apply") == 0) + if (string_strcmp (argv[1], "apply") == 0) { command_layout_get_arguments (argc, argv, &layout_name, &ptr_layout, &flag_buffers, &flag_windows); @@ -4506,7 +4505,7 @@ COMMAND_CALLBACK(layout) } /* leave current layout */ - if (string_strcasecmp (argv[1], "leave") == 0) + if (string_strcmp (argv[1], "leave") == 0) { gui_layout_buffer_reset (); gui_layout_window_reset (); @@ -4520,7 +4519,7 @@ COMMAND_CALLBACK(layout) } /* delete layout */ - if (string_strcasecmp (argv[1], "del") == 0) + if (string_strcmp (argv[1], "del") == 0) { command_layout_get_arguments (argc, argv, &layout_name, &ptr_layout, &flag_buffers, &flag_windows); @@ -4571,7 +4570,7 @@ COMMAND_CALLBACK(layout) } /* rename layout */ - if (string_strcasecmp (argv[1], "rename") == 0) + if (string_strcmp (argv[1], "rename") == 0) { COMMAND_MIN_ARGS(4, "rename"); ptr_layout = gui_layout_search (argv[2]); @@ -4659,7 +4658,7 @@ COMMAND_CALLBACK(mouse) } /* enable mouse */ - if (string_strcasecmp (argv[1], "enable") == 0) + if (string_strcmp (argv[1], "enable") == 0) { config_file_option_set (config_look_mouse, "1", 1); gui_chat_printf (NULL, _("Mouse enabled")); @@ -4669,7 +4668,7 @@ COMMAND_CALLBACK(mouse) } /* disable mouse */ - if (string_strcasecmp (argv[1], "disable") == 0) + if (string_strcmp (argv[1], "disable") == 0) { config_file_option_set (config_look_mouse, "0", 1); gui_chat_printf (NULL, _("Mouse disabled")); @@ -4679,7 +4678,7 @@ COMMAND_CALLBACK(mouse) } /* toggle mouse */ - if (string_strcasecmp (argv[1], "toggle") == 0) + if (string_strcmp (argv[1], "toggle") == 0) { if (gui_mouse_enabled) { @@ -4727,19 +4726,19 @@ COMMAND_CALLBACK(mute) ptr_command = argv_eol[1]; - if (string_strcasecmp (argv[1], "-core") == 0) + if (string_strcmp (argv[1], "-core") == 0) { mute_mode = GUI_CHAT_MUTE_BUFFER; mute_buffer = gui_buffer_search_main (); ptr_command = argv_eol[2]; } - else if (string_strcasecmp (argv[1], "-current") == 0) + else if (string_strcmp (argv[1], "-current") == 0) { mute_mode = GUI_CHAT_MUTE_BUFFER; mute_buffer = buffer; ptr_command = argv_eol[2]; } - else if (string_strcasecmp (argv[1], "-buffer") == 0) + else if (string_strcmp (argv[1], "-buffer") == 0) { COMMAND_MIN_ARGS(3, "-buffer"); ptr_buffer = gui_buffer_search_by_full_name (argv[2]); @@ -4750,7 +4749,7 @@ COMMAND_CALLBACK(mute) } ptr_command = argv_eol[3]; } - else if (string_strcasecmp (argv[1], "-all") == 0) + else if (string_strcmp (argv[1], "-all") == 0) { /* * action ignored in WeeChat >= 1.0 (mute on all buffers is default) @@ -4956,17 +4955,17 @@ COMMAND_CALLBACK(plugin) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "list") == 0) + if (string_strcmp (argv[1], "list") == 0) { if (argc > 2) { - if (string_strcasecmp (argv[2], "-i") == 0) + if (string_strcmp (argv[2], "-i") == 0) command_plugin_list_input (buffer, 0, 0); - else if (string_strcasecmp (argv[2], "-il") == 0) + else if (string_strcmp (argv[2], "-il") == 0) command_plugin_list_input (buffer, 0, 1); - else if (string_strcasecmp (argv[2], "-o") == 0) + else if (string_strcmp (argv[2], "-o") == 0) command_plugin_list_input (buffer, 1, 0); - else if (string_strcasecmp (argv[2], "-ol") == 0) + else if (string_strcmp (argv[2], "-ol") == 0) command_plugin_list_input (buffer, 1, 1); else command_plugin_list (argv[2], 0); @@ -4978,13 +4977,13 @@ COMMAND_CALLBACK(plugin) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "listfull") == 0) + if (string_strcmp (argv[1], "listfull") == 0) { command_plugin_list ((argc > 2) ? argv[2] : NULL, 1); return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "autoload") == 0) + if (string_strcmp (argv[1], "autoload") == 0) { if (argc > 2) { @@ -5000,7 +4999,7 @@ COMMAND_CALLBACK(plugin) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "load") == 0) + if (string_strcmp (argv[1], "load") == 0) { COMMAND_MIN_ARGS(3, "load"); plugin_argv = NULL; @@ -5022,7 +5021,7 @@ COMMAND_CALLBACK(plugin) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "reload") == 0) + if (string_strcmp (argv[1], "reload") == 0) { if (argc > 2) { @@ -5057,7 +5056,7 @@ COMMAND_CALLBACK(plugin) return WEECHAT_RC_OK; } - if (string_strcasecmp (argv[1], "unload") == 0) + if (string_strcmp (argv[1], "unload") == 0) { if (argc > 2) plugin_unload_name (argv[2]); @@ -5103,7 +5102,7 @@ COMMAND_CALLBACK(print) for (i = 1; i < argc; i++) { - if (string_strcasecmp (argv[i], "-buffer") == 0) + if (string_strcmp (argv[i], "-buffer") == 0) { if (i + 1 >= argc) COMMAND_ERROR; @@ -5112,34 +5111,34 @@ COMMAND_CALLBACK(print) if (!ptr_buffer) COMMAND_ERROR; } - else if (string_strcasecmp (argv[i], "-newbuffer") == 0) + else if (string_strcmp (argv[i], "-newbuffer") == 0) { if (i + 1 >= argc) COMMAND_ERROR; i++; arg_new_buffer_name = i; } - else if (string_strcasecmp (argv[i], "-free") == 0) + else if (string_strcmp (argv[i], "-free") == 0) { new_buffer_type_free = 1; } - else if (string_strcasecmp (argv[i], "-switch") == 0) + else if (string_strcmp (argv[i], "-switch") == 0) { switch_to_buffer = 1; } - else if (string_strcasecmp (argv[i], "-current") == 0) + else if (string_strcmp (argv[i], "-current") == 0) { ptr_buffer = (gui_current_window) ? gui_current_window->buffer : NULL; } - else if (string_strcasecmp (argv[i], "-core") == 0) + else if (string_strcmp (argv[i], "-core") == 0) { ptr_buffer = NULL; } - else if (string_strcasecmp (argv[i], "-escape") == 0) + else if (string_strcmp (argv[i], "-escape") == 0) { escape = 1; } - else if (string_strcasecmp (argv[i], "-y") == 0) + else if (string_strcmp (argv[i], "-y") == 0) { if (i + 1 >= argc) COMMAND_ERROR; @@ -5150,7 +5149,7 @@ COMMAND_CALLBACK(print) COMMAND_ERROR; y = (int)value; } - else if (string_strcasecmp (argv[i], "-date") == 0) + else if (string_strcmp (argv[i], "-date") == 0) { if (i + 1 >= argc) COMMAND_ERROR; @@ -5195,42 +5194,42 @@ COMMAND_CALLBACK(print) } } } - else if (string_strcasecmp (argv[i], "-tags") == 0) + else if (string_strcmp (argv[i], "-tags") == 0) { if (i + 1 >= argc) COMMAND_ERROR; i++; tags = argv[i]; } - else if (string_strcasecmp (argv[i], "-action") == 0) + else if (string_strcmp (argv[i], "-action") == 0) { prefix = gui_chat_prefix[GUI_CHAT_PREFIX_ACTION]; } - else if (string_strcasecmp (argv[i], "-error") == 0) + else if (string_strcmp (argv[i], "-error") == 0) { prefix = gui_chat_prefix[GUI_CHAT_PREFIX_ERROR]; } - else if (string_strcasecmp (argv[i], "-join") == 0) + else if (string_strcmp (argv[i], "-join") == 0) { prefix = gui_chat_prefix[GUI_CHAT_PREFIX_JOIN]; } - else if (string_strcasecmp (argv[i], "-network") == 0) + else if (string_strcmp (argv[i], "-network") == 0) { prefix = gui_chat_prefix[GUI_CHAT_PREFIX_NETWORK]; } - else if (string_strcasecmp (argv[i], "-quit") == 0) + else if (string_strcmp (argv[i], "-quit") == 0) { prefix = gui_chat_prefix[GUI_CHAT_PREFIX_QUIT]; } - else if (string_strcasecmp (argv[i], "-stdout") == 0) + else if (string_strcmp (argv[i], "-stdout") == 0) { to_stdout = 1; } - else if (string_strcasecmp (argv[i], "-stderr") == 0) + else if (string_strcmp (argv[i], "-stderr") == 0) { to_stderr = 1; } - else if (string_strcasecmp (argv[i], "-beep") == 0) + else if (string_strcmp (argv[i], "-beep") == 0) { fprintf (stderr, "\a"); fflush (stderr); @@ -5395,14 +5394,14 @@ COMMAND_CALLBACK(proxy) (void) buffer; /* list of bars */ - if ((argc == 1) || (string_strcasecmp (argv[1], "list") == 0)) + if ((argc == 1) || (string_strcmp (argv[1], "list") == 0)) { command_proxy_list (); return WEECHAT_RC_OK; } /* add a new proxy */ - if (string_strcasecmp (argv[1], "add") == 0) + if (string_strcmp (argv[1], "add") == 0) { COMMAND_MIN_ARGS(6, "add"); type = proxy_search_type (argv[3]); @@ -5446,10 +5445,10 @@ COMMAND_CALLBACK(proxy) } /* delete a proxy */ - if (string_strcasecmp (argv[1], "del") == 0) + if (string_strcmp (argv[1], "del") == 0) { COMMAND_MIN_ARGS(3, "del"); - if (string_strcasecmp (argv[2], "-all") == 0) + if (string_strcmp (argv[2], "-all") == 0) { proxy_free_all (); gui_chat_printf (NULL, _("All proxies have been deleted")); @@ -5472,7 +5471,7 @@ COMMAND_CALLBACK(proxy) } /* set a proxy property */ - if (string_strcasecmp (argv[1], "set") == 0) + if (string_strcmp (argv[1], "set") == 0) { COMMAND_MIN_ARGS(5, "set"); ptr_proxy = proxy_search (argv[2]); @@ -5520,7 +5519,7 @@ COMMAND_CALLBACK(quit) pos_args = NULL; if (argc > 1) { - if (string_strcasecmp (argv[1], "-yes") == 0) + if (string_strcmp (argv[1], "-yes") == 0) { confirm_ok = 1; if (argc > 2) @@ -5695,7 +5694,7 @@ COMMAND_CALLBACK(repeat) arg_count = 1; interval = 0; - if ((argc >= 5) && (string_strcasecmp (argv[1], "-interval") == 0)) + if ((argc >= 5) && (string_strcmp (argv[1], "-interval") == 0)) { interval = util_parse_delay (argv[2], 1000); if (interval < 1) @@ -5852,7 +5851,7 @@ COMMAND_CALLBACK(secure) count_encrypted = secure_hashtable_data_encrypted->items_count; /* decrypt data still encrypted */ - if (string_strcasecmp (argv[1], "decrypt") == 0) + if (string_strcmp (argv[1], "decrypt") == 0) { COMMAND_MIN_ARGS(3, "decrypt"); if (count_encrypted == 0) @@ -5893,7 +5892,7 @@ COMMAND_CALLBACK(secure) } /* set the passphrase */ - if (string_strcasecmp (argv[1], "passphrase") == 0) + if (string_strcmp (argv[1], "passphrase") == 0) { COMMAND_MIN_ARGS(3, "passphrase"); if ((strcmp (argv[2], "-delete") != 0) @@ -5948,7 +5947,7 @@ COMMAND_CALLBACK(secure) } /* set a secured data */ - if (string_strcasecmp (argv[1], "set") == 0) + if (string_strcmp (argv[1], "set") == 0) { COMMAND_MIN_ARGS(4, "set"); hashtable_set (secure_hashtable_data, argv[2], argv_eol[3]); @@ -5959,7 +5958,7 @@ COMMAND_CALLBACK(secure) } /* delete a secured data */ - if (string_strcasecmp (argv[1], "del") == 0) + if (string_strcmp (argv[1], "del") == 0) { COMMAND_MIN_ARGS(3, "del"); if (hashtable_has_key (secure_hashtable_data, argv[2])) @@ -5980,7 +5979,7 @@ COMMAND_CALLBACK(secure) } /* toggle values on secured data buffer */ - if (string_strcasecmp (argv[1], "toggle_values") == 0) + if (string_strcmp (argv[1], "toggle_values") == 0) { if (secure_buffer) { @@ -6284,7 +6283,7 @@ COMMAND_CALLBACK(set) (void) buffer; /* display/set environment variables */ - if ((argc > 1) && (string_strcasecmp (argv[1], "env") == 0)) + if ((argc > 1) && (string_strcmp (argv[1], "env") == 0)) { if (argc == 2) { @@ -6375,7 +6374,7 @@ COMMAND_CALLBACK(set) arg_option_end = argc - 1; /* if "diff" is specified as first argument, display only changed values */ - if ((argc >= 2) && (string_strcasecmp (argv[1], "diff") == 0)) + if ((argc >= 2) && (string_strcmp (argv[1], "diff") == 0)) { display_only_changed = 1; arg_option_start = 2; @@ -6424,7 +6423,7 @@ COMMAND_CALLBACK(set) /* set option value */ config_file_search_with_string (argv[1], NULL, NULL, &ptr_option_before, NULL); - value = (string_strcasecmp (argv_eol[2], WEECHAT_CONFIG_OPTION_NULL) == 0) ? + value = (string_strcmp (argv_eol[2], WEECHAT_CONFIG_OPTION_NULL) == 0) ? NULL : string_remove_quotes (argv_eol[2], "'\""); rc = config_file_option_set_with_string (argv[1], value); if (value) @@ -6511,7 +6510,7 @@ COMMAND_CALLBACK(toggle) sargv = string_split_shell (argv_eol[2], &sargc); if (!sargv) COMMAND_ERROR; - if (string_strcasecmp (argv[2], WEECHAT_CONFIG_OPTION_NULL) == 0) + if (string_strcmp (argv[2], WEECHAT_CONFIG_OPTION_NULL) == 0) { if (sargv[0]) free (sargv[0]); @@ -6602,7 +6601,7 @@ COMMAND_CALLBACK(unset) number_reset = 0; number_removed = 0; - if (string_strcasecmp (argv[1], "-mask") == 0) + if (string_strcmp (argv[1], "-mask") == 0) { COMMAND_MIN_ARGS(3, "-mask"); mask = 1; @@ -6694,7 +6693,7 @@ COMMAND_CALLBACK(upgrade) confirm_ok = 0; index_args = 1; - if ((argc > 1) && (string_strcasecmp (argv[1], "-yes") == 0)) + if ((argc > 1) && (string_strcmp (argv[1], "-yes") == 0)) { confirm_ok = 1; index_args = 2; @@ -6712,13 +6711,13 @@ COMMAND_CALLBACK(upgrade) } if ((argc > index_args) - && (string_strcasecmp (argv[index_args], "-dummy") == 0)) + && (string_strcmp (argv[index_args], "-dummy") == 0)) { return WEECHAT_RC_OK; } if ((argc > index_args) - && (string_strcasecmp (argv[index_args], "-save") == 0)) + && (string_strcmp (argv[index_args], "-save") == 0)) { /* send "upgrade" signal to plugins */ (void) hook_signal_send ("upgrade", WEECHAT_HOOK_SIGNAL_STRING, @@ -6753,7 +6752,7 @@ COMMAND_CALLBACK(upgrade) if (argc > index_args) { - if (string_strcasecmp (argv[index_args], "-quit") == 0) + if (string_strcmp (argv[index_args], "-quit") == 0) quit = 1; else { @@ -6892,7 +6891,7 @@ COMMAND_CALLBACK(uptime) util_get_time_diff (weechat_first_start_time, time (NULL), NULL, &days, &hours, &minutes, &seconds); - if ((argc >= 2) && (string_strcasecmp (argv[1], "-o") == 0)) + if ((argc >= 2) && (string_strcmp (argv[1], "-o") == 0)) { snprintf (str_first_start, sizeof (str_first_start), "%s", ctime (&weechat_first_start_time)); @@ -6908,7 +6907,7 @@ COMMAND_CALLBACK(uptime) str_first_start); (void) input_data (buffer, string, NULL); } - else if ((argc >= 2) && (string_strcasecmp (argv[1], "-ol") == 0)) + else if ((argc >= 2) && (string_strcmp (argv[1], "-ol") == 0)) { snprintf (string, sizeof (string), /* TRANSLATORS: "%s" after "started on" is a date */ @@ -7074,9 +7073,9 @@ COMMAND_CALLBACK(version) if (argc >= 2) { - if (string_strcasecmp (argv[1], "-o") == 0) + if (string_strcmp (argv[1], "-o") == 0) send_to_buffer_as_input = 1; - else if (string_strcasecmp (argv[1], "-ol") == 0) + else if (string_strcmp (argv[1], "-ol") == 0) { send_to_buffer_as_input = 1; translated_string = 1; @@ -7131,7 +7130,7 @@ COMMAND_CALLBACK(window) (void) buffer; (void) argv_eol; - if ((argc == 1) || (string_strcasecmp (argv[1], "list") == 0)) + if ((argc == 1) || (string_strcmp (argv[1], "list") == 0)) { /* list all windows */ gui_chat_printf (NULL, ""); @@ -7162,14 +7161,14 @@ COMMAND_CALLBACK(window) return WEECHAT_RC_OK; /* refresh screen */ - if (string_strcasecmp (argv[1], "refresh") == 0) + if (string_strcmp (argv[1], "refresh") == 0) { gui_window_ask_refresh (2); return WEECHAT_RC_OK; } /* balance windows */ - if (string_strcasecmp (argv[1], "balance") == 0) + if (string_strcmp (argv[1], "balance") == 0) { if (gui_window_balance (gui_windows_tree)) gui_window_ask_refresh (1); @@ -7182,7 +7181,7 @@ COMMAND_CALLBACK(window) */ ptr_win = gui_current_window; win_args = 2; - if ((argc > 3) && (string_strcasecmp (argv[2], "-window") == 0)) + if ((argc > 3) && (string_strcmp (argv[2], "-window") == 0)) { error = NULL; number = strtol (argv[3], &error, 10); @@ -7203,21 +7202,21 @@ COMMAND_CALLBACK(window) return WEECHAT_RC_OK; /* page up */ - if (string_strcasecmp (argv[1], "page_up") == 0) + if (string_strcmp (argv[1], "page_up") == 0) { gui_window_page_up (ptr_win); return WEECHAT_RC_OK; } /* page down */ - if (string_strcasecmp (argv[1], "page_down") == 0) + if (string_strcmp (argv[1], "page_down") == 0) { gui_window_page_down (ptr_win); return WEECHAT_RC_OK; } /* vertical scroll */ - if (string_strcasecmp (argv[1], "scroll") == 0) + if (string_strcmp (argv[1], "scroll") == 0) { if (argc > win_args) gui_window_scroll (ptr_win, argv[win_args]); @@ -7225,7 +7224,7 @@ COMMAND_CALLBACK(window) } /* horizontal scroll in window (for buffers with free content) */ - if (string_strcasecmp (argv[1], "scroll_horiz") == 0) + if (string_strcmp (argv[1], "scroll_horiz") == 0) { if ((argc > win_args) && (ptr_win->buffer->type == GUI_BUFFER_TYPE_FREE)) @@ -7236,63 +7235,63 @@ COMMAND_CALLBACK(window) } /* scroll up */ - if (string_strcasecmp (argv[1], "scroll_up") == 0) + if (string_strcmp (argv[1], "scroll_up") == 0) { gui_window_scroll_up (ptr_win); return WEECHAT_RC_OK; } /* scroll down */ - if (string_strcasecmp (argv[1], "scroll_down") == 0) + if (string_strcmp (argv[1], "scroll_down") == 0) { gui_window_scroll_down (ptr_win); return WEECHAT_RC_OK; } /* scroll to top of window */ - if (string_strcasecmp (argv[1], "scroll_top") == 0) + if (string_strcmp (argv[1], "scroll_top") == 0) { gui_window_scroll_top (ptr_win); return WEECHAT_RC_OK; } /* scroll to bottom of window */ - if (string_strcasecmp (argv[1], "scroll_bottom") == 0) + if (string_strcmp (argv[1], "scroll_bottom") == 0) { gui_window_scroll_bottom (ptr_win); return WEECHAT_RC_OK; } /* scroll beyond the end of buffer */ - if (string_strcasecmp (argv[1], "scroll_beyond_end") == 0) + if (string_strcmp (argv[1], "scroll_beyond_end") == 0) { gui_window_scroll_beyond_end (ptr_win); return WEECHAT_RC_OK; } /* scroll to previous highlight */ - if (string_strcasecmp (argv[1], "scroll_previous_highlight") == 0) + if (string_strcmp (argv[1], "scroll_previous_highlight") == 0) { gui_window_scroll_previous_highlight (ptr_win); return WEECHAT_RC_OK; } /* scroll to next highlight */ - if (string_strcasecmp (argv[1], "scroll_next_highlight") == 0) + if (string_strcmp (argv[1], "scroll_next_highlight") == 0) { gui_window_scroll_next_highlight (ptr_win); return WEECHAT_RC_OK; } /* scroll to unread marker */ - if (string_strcasecmp (argv[1], "scroll_unread") == 0) + if (string_strcmp (argv[1], "scroll_unread") == 0) { gui_window_scroll_unread (ptr_win); return WEECHAT_RC_OK; } /* split window horizontally */ - if (string_strcasecmp (argv[1], "splith") == 0) + if (string_strcmp (argv[1], "splith") == 0) { if (argc > win_args) { @@ -7310,7 +7309,7 @@ COMMAND_CALLBACK(window) } /* split window vertically */ - if (string_strcasecmp (argv[1], "splitv") == 0) + if (string_strcmp (argv[1], "splitv") == 0) { if (argc > win_args) { @@ -7328,7 +7327,7 @@ COMMAND_CALLBACK(window) } /* resize window */ - if (string_strcasecmp (argv[1], "resize") == 0) + if (string_strcmp (argv[1], "resize") == 0) { if (argc > win_args) { @@ -7369,11 +7368,11 @@ COMMAND_CALLBACK(window) } /* merge windows */ - if (string_strcasecmp (argv[1], "merge") == 0) + if (string_strcmp (argv[1], "merge") == 0) { if (argc > win_args) { - if (string_strcasecmp (argv[win_args], "all") == 0) + if (string_strcmp (argv[win_args], "all") == 0) gui_window_merge_all (ptr_win); else COMMAND_ERROR; @@ -7393,7 +7392,7 @@ COMMAND_CALLBACK(window) } /* close window */ - if (string_strcasecmp (argv[1], "close") == 0) + if (string_strcmp (argv[1], "close") == 0) { if (!gui_window_close (ptr_win)) { @@ -7407,59 +7406,59 @@ COMMAND_CALLBACK(window) } /* switch to previous window */ - if (string_strcasecmp (argv[1], "-1") == 0) + if (string_strcmp (argv[1], "-1") == 0) { gui_window_switch_previous (ptr_win); return WEECHAT_RC_OK; } /* switch to next window */ - if (string_strcasecmp (argv[1], "+1") == 0) + if (string_strcmp (argv[1], "+1") == 0) { gui_window_switch_next (ptr_win); return WEECHAT_RC_OK; } /* switch to window above */ - if (string_strcasecmp (argv[1], "up") == 0) + if (string_strcmp (argv[1], "up") == 0) { gui_window_switch_up (ptr_win); return WEECHAT_RC_OK; } /* switch to window below */ - if (string_strcasecmp (argv[1], "down") == 0) + if (string_strcmp (argv[1], "down") == 0) { gui_window_switch_down (ptr_win); return WEECHAT_RC_OK; } /* switch to window on the left */ - if (string_strcasecmp (argv[1], "left") == 0) + if (string_strcmp (argv[1], "left") == 0) { gui_window_switch_left (ptr_win); return WEECHAT_RC_OK; } /* switch to window on the right */ - if (string_strcasecmp (argv[1], "right") == 0) + if (string_strcmp (argv[1], "right") == 0) { gui_window_switch_right (ptr_win); return WEECHAT_RC_OK; } /* swap windows */ - if (string_strcasecmp (argv[1], "swap") == 0) + if (string_strcmp (argv[1], "swap") == 0) { if (argc > win_args) { - if (string_strcasecmp (argv[win_args], "up") == 0) + if (string_strcmp (argv[win_args], "up") == 0) gui_window_swap (ptr_win, 1); - else if (string_strcasecmp (argv[win_args], "down") == 0) + else if (string_strcmp (argv[win_args], "down") == 0) gui_window_swap (ptr_win, 3); - else if (string_strcasecmp (argv[win_args], "left") == 0) + else if (string_strcmp (argv[win_args], "left") == 0) gui_window_swap (ptr_win, 4); - else if (string_strcasecmp (argv[win_args], "right") == 0) + else if (string_strcmp (argv[win_args], "right") == 0) gui_window_swap (ptr_win, 2); else COMMAND_ERROR; @@ -7472,21 +7471,21 @@ COMMAND_CALLBACK(window) } /* zoom window */ - if (string_strcasecmp (argv[1], "zoom") == 0) + if (string_strcmp (argv[1], "zoom") == 0) { gui_window_zoom (ptr_win); return WEECHAT_RC_OK; } /* bare display */ - if (string_strcasecmp (argv[1], "bare") == 0) + if (string_strcmp (argv[1], "bare") == 0) { gui_window_bare_display_toggle ((argc > 2) ? argv[2] : NULL); return WEECHAT_RC_OK; } /* jump to window by buffer number */ - if (string_strncasecmp (argv[1], "b", 1) == 0) + if (string_strncmp (argv[1], "b", 1) == 0) { error = NULL; number = strtol (argv[1] + 1, &error, 10); diff --git a/src/core/wee-completion.c b/src/core/wee-completion.c index a1421a235..1a544cdd9 100644 --- a/src/core/wee-completion.c +++ b/src/core/wee-completion.c @@ -1262,7 +1262,7 @@ completion_list_add_plugins_commands_cb (const void *pointer, void *data, arg_index = argc - 1; ptr_plugin = NULL; - if (string_strcasecmp (argv[arg_index], PLUGIN_CORE) != 0) + if (string_strcmp (argv[arg_index], PLUGIN_CORE) != 0) { /* * plugin name is different from "core", then search it in diff --git a/src/core/wee-debug.c b/src/core/wee-debug.c index 7672d3b45..a6cb5a3be 100644 --- a/src/core/wee-debug.c +++ b/src/core/wee-debug.c @@ -137,7 +137,7 @@ debug_dump_cb (const void *pointer, void *data, (void) signal; (void) type_data; - if (!signal_data || (string_strcasecmp ((char *)signal_data, "core") == 0)) + if (!signal_data || (string_strcmp ((char *)signal_data, PLUGIN_CORE) == 0)) debug_dump (0); return WEECHAT_RC_OK; diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 74e2553d7..603dc25ca 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -204,8 +204,8 @@ hook_find_pos (struct t_hook *hook) { if (!ptr_hook->deleted) { - rc_cmp = string_strcasecmp (HOOK_COMMAND(hook, command), - HOOK_COMMAND(ptr_hook, command)); + rc_cmp = string_strcmp (HOOK_COMMAND(hook, command), + HOOK_COMMAND(ptr_hook, command)); if (rc_cmp < 0) return ptr_hook; if ((rc_cmp == 0) && (hook->priority > ptr_hook->priority)) @@ -692,7 +692,7 @@ hook_add_to_infolist_type (struct t_infolist *infolist, int type, switch (ptr_hook->type) { case HOOK_TYPE_COMMAND: - match = string_match (HOOK_COMMAND(ptr_hook, command), arguments, 0); + match = string_match (HOOK_COMMAND(ptr_hook, command), arguments, 1); break; default: break; diff --git a/src/core/wee-input.c b/src/core/wee-input.c index 7ad716344..d10cdd038 100644 --- a/src/core/wee-input.c +++ b/src/core/wee-input.c @@ -138,7 +138,7 @@ input_exec_command (struct t_gui_buffer *buffer, /* check if command is allowed */ if (input_commands_allowed && !string_match_list (command_name + 1, - (const char **)input_commands_allowed, 0)) + (const char **)input_commands_allowed, 1)) { if (weechat_debug_core >= 1) { diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c index 0e285e8d0..fde406f20 100644 --- a/src/gui/gui-completion.c +++ b/src/gui/gui-completion.c @@ -74,7 +74,7 @@ gui_completion_word_compare_cb (void *data, completion_word1 = (struct t_gui_completion_word *)pointer1; completion_word2 = (struct t_gui_completion_word *)pointer2; - return string_strcasecmp (completion_word1->word, completion_word2->word); + return string_strcmp (completion_word1->word, completion_word2->word); } /* @@ -332,17 +332,16 @@ gui_completion_search_command (struct t_weechat_plugin *plugin, && HOOK_COMMAND(ptr_hook, command) && HOOK_COMMAND(ptr_hook, command)[0]) { - if (string_strcasecmp (HOOK_COMMAND(ptr_hook, command), - command) == 0) + if (string_strcmp (HOOK_COMMAND(ptr_hook, command), command) == 0) { if (ptr_hook->plugin == plugin) return ptr_hook; hook_for_other_plugin = ptr_hook; } else if (allow_incomplete_commands - && (string_strncasecmp (HOOK_COMMAND(ptr_hook, command), - command, - length_command) == 0)) + && (string_strncmp (HOOK_COMMAND(ptr_hook, command), + command, + length_command) == 0)) { hook_incomplete_command = ptr_hook; count_incomplete_commands++; @@ -478,8 +477,8 @@ gui_completion_list_add (struct t_gui_completion *completion, const char *word, if (!completion->base_word || !completion->base_word[0] || (nick_completion && (gui_completion_nickncmp (completion->base_word, word, utf8_strlen (completion->base_word)) == 0)) - || (!nick_completion && (string_strncasecmp (completion->base_word, word, - utf8_strlen (completion->base_word)) == 0))) + || (!nick_completion && (string_strncmp (completion->base_word, word, + utf8_strlen (completion->base_word)) == 0))) { completion_word = malloc (sizeof (*completion_word)); if (completion_word) @@ -1144,7 +1143,6 @@ gui_completion_complete (struct t_gui_completion *completion) int length, word_found_seen, other_completion, partial_completion; int common_prefix_size, index, index2; struct t_gui_completion_word *ptr_completion_word, *ptr_completion_word2; - char *word_found_lower; length = utf8_strlen (completion->base_word); word_found_seen = 0; @@ -1202,9 +1200,9 @@ gui_completion_complete (struct t_gui_completion *completion) ptr_completion_word->word, length) == 0)) || (!ptr_completion_word->nick_completion - && (string_strncasecmp (completion->base_word, - ptr_completion_word->word, - length) == 0))) + && (string_strncmp (completion->base_word, + ptr_completion_word->word, + length) == 0))) { if ((!completion->word_found) || word_found_seen) { @@ -1237,9 +1235,9 @@ gui_completion_complete (struct t_gui_completion *completion) ptr_completion_word2->word, length) == 0)) || (!ptr_completion_word->nick_completion - && (string_strncasecmp (completion->base_word, - ptr_completion_word2->word, - length) == 0))) + && (string_strncmp (completion->base_word, + ptr_completion_word2->word, + length) == 0))) { other_completion++; } @@ -1263,12 +1261,6 @@ gui_completion_complete (struct t_gui_completion *completion) completion->word_found_is_nick = 0; completion->add_space = 0; completion->position = -1; - word_found_lower = string_tolower (completion->word_found); - if (word_found_lower) - { - free (completion->word_found); - completion->word_found = word_found_lower; - } /* alert user of partial completion */ if (CONFIG_BOOLEAN(config_completion_partial_completion_alert)) diff --git a/src/plugins/alias/alias-command.c b/src/plugins/alias/alias-command.c index d9a704317..e8ac4783e 100644 --- a/src/plugins/alias/alias-command.c +++ b/src/plugins/alias/alias-command.c @@ -91,7 +91,7 @@ alias_command_cb (const void *pointer, void *data, (void) buffer; /* List all aliases */ - if ((argc == 1) || (weechat_strcasecmp (argv[1], "list") == 0)) + if ((argc == 1) || (weechat_strcmp (argv[1], "list") == 0)) { if (alias_list) { @@ -171,7 +171,7 @@ alias_command_cb (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "add") == 0) + if (weechat_strcmp (argv[1], "add") == 0) { WEECHAT_COMMAND_MIN_ARGS(4, "add"); alias_command_add ( @@ -182,7 +182,7 @@ alias_command_cb (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "addcompletion") == 0) + if (weechat_strcmp (argv[1], "addcompletion") == 0) { WEECHAT_COMMAND_MIN_ARGS(5, "addcompletion"); alias_command_add ( @@ -193,7 +193,7 @@ alias_command_cb (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "del") == 0) + if (weechat_strcmp (argv[1], "del") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "del"); for (i = 2; i < argc; i++) diff --git a/src/plugins/buflist/buflist-command.c b/src/plugins/buflist/buflist-command.c index 9c6bf7470..5a7d56110 100644 --- a/src/plugins/buflist/buflist-command.c +++ b/src/plugins/buflist/buflist-command.c @@ -46,31 +46,31 @@ buflist_command_buflist (const void *pointer, void *data, if (argc == 1) return WEECHAT_RC_OK; - if (weechat_strcasecmp (argv[1], "enable") == 0) + if (weechat_strcmp (argv[1], "enable") == 0) { weechat_config_option_set (buflist_config_look_enabled, "on", 1); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "disable") == 0) + if (weechat_strcmp (argv[1], "disable") == 0) { weechat_config_option_set (buflist_config_look_enabled, "off", 1); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "toggle") == 0) + if (weechat_strcmp (argv[1], "toggle") == 0) { weechat_config_option_set (buflist_config_look_enabled, "toggle", 1); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "bar") == 0) + if (weechat_strcmp (argv[1], "bar") == 0) { buflist_add_bar (); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "refresh") == 0) + if (weechat_strcmp (argv[1], "refresh") == 0) { buflist_bar_item_update (0); return WEECHAT_RC_OK; diff --git a/src/plugins/charset/charset.c b/src/plugins/charset/charset.c index 4c4150931..7c2940fed 100644 --- a/src/plugins/charset/charset.c +++ b/src/plugins/charset/charset.c @@ -515,7 +515,7 @@ charset_command_cb (const void *pointer, void *data, snprintf (option_name, length, "%s.%s", plugin_name, name); } - if (weechat_strcasecmp (argv[1], "reset") == 0) + if (weechat_strcmp (argv[1], "reset") == 0) { charset_set (charset_config_section_decode, "decode", option_name, NULL); @@ -526,12 +526,12 @@ charset_command_cb (const void *pointer, void *data, { if (argc > 2) { - if (weechat_strcasecmp (argv[1], "decode") == 0) + if (weechat_strcmp (argv[1], "decode") == 0) { ptr_section = charset_config_section_decode; ptr_charset = argv_eol[2]; } - else if (weechat_strcasecmp (argv[1], "encode") == 0) + else if (weechat_strcmp (argv[1], "encode") == 0) { ptr_section = charset_config_section_encode; ptr_charset = argv_eol[2]; diff --git a/src/plugins/exec/exec-command.c b/src/plugins/exec/exec-command.c index 2e6289cb8..7cfec192a 100644 --- a/src/plugins/exec/exec-command.c +++ b/src/plugins/exec/exec-command.c @@ -186,31 +186,31 @@ exec_command_parse_options (struct t_exec_cmd_options *cmd_options, for (i = start_arg; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "-sh") == 0) + if (weechat_strcmp (argv[i], "-sh") == 0) { cmd_options->use_shell = 1; } - else if (weechat_strcasecmp (argv[i], "-nosh") == 0) + else if (weechat_strcmp (argv[i], "-nosh") == 0) { cmd_options->use_shell = 0; } - else if (weechat_strcasecmp (argv[i], "-bg") == 0) + else if (weechat_strcmp (argv[i], "-bg") == 0) { cmd_options->detached = 1; } - else if (weechat_strcasecmp (argv[i], "-nobg") == 0) + else if (weechat_strcmp (argv[i], "-nobg") == 0) { cmd_options->detached = 0; } - else if (weechat_strcasecmp (argv[i], "-stdin") == 0) + else if (weechat_strcmp (argv[i], "-stdin") == 0) { cmd_options->pipe_stdin = 1; } - else if (weechat_strcasecmp (argv[i], "-nostdin") == 0) + else if (weechat_strcmp (argv[i], "-nostdin") == 0) { cmd_options->pipe_stdin = 0; } - else if (weechat_strcasecmp (argv[i], "-buffer") == 0) + else if (weechat_strcmp (argv[i], "-buffer") == 0) { if (i + 1 >= argc) return 0; @@ -226,73 +226,73 @@ exec_command_parse_options (struct t_exec_cmd_options *cmd_options, if (!cmd_options->ptr_buffer) cmd_options->new_buffer = 1; } - else if (weechat_strcasecmp (argv[i], "-l") == 0) + else if (weechat_strcmp (argv[i], "-l") == 0) { cmd_options->output_to_buffer = 0; cmd_options->output_to_buffer_exec_cmd = 0; cmd_options->new_buffer = 0; } - else if (weechat_strcasecmp (argv[i], "-o") == 0) + else if (weechat_strcmp (argv[i], "-o") == 0) { cmd_options->output_to_buffer = 1; cmd_options->output_to_buffer_exec_cmd = 0; cmd_options->new_buffer = 0; } - else if (weechat_strcasecmp (argv[i], "-oc") == 0) + else if (weechat_strcmp (argv[i], "-oc") == 0) { cmd_options->output_to_buffer = 1; cmd_options->output_to_buffer_exec_cmd = 1; cmd_options->new_buffer = 0; } - else if (weechat_strcasecmp (argv[i], "-oerr") == 0) + else if (weechat_strcmp (argv[i], "-oerr") == 0) { cmd_options->output_to_buffer_stderr = 1; } - else if (weechat_strcasecmp (argv[i], "-n") == 0) + else if (weechat_strcmp (argv[i], "-n") == 0) { cmd_options->output_to_buffer = 0; cmd_options->output_to_buffer_exec_cmd = 0; cmd_options->new_buffer = 1; } - else if (weechat_strcasecmp (argv[i], "-nf") == 0) + else if (weechat_strcmp (argv[i], "-nf") == 0) { cmd_options->output_to_buffer = 0; cmd_options->output_to_buffer_exec_cmd = 0; cmd_options->new_buffer = 2; } - else if (weechat_strcasecmp (argv[i], "-cl") == 0) + else if (weechat_strcmp (argv[i], "-cl") == 0) { cmd_options->new_buffer_clear = 1; } - else if (weechat_strcasecmp (argv[i], "-nocl") == 0) + else if (weechat_strcmp (argv[i], "-nocl") == 0) { cmd_options->new_buffer_clear = 0; } - else if (weechat_strcasecmp (argv[i], "-sw") == 0) + else if (weechat_strcmp (argv[i], "-sw") == 0) { cmd_options->switch_to_buffer = 1; } - else if (weechat_strcasecmp (argv[i], "-nosw") == 0) + else if (weechat_strcmp (argv[i], "-nosw") == 0) { cmd_options->switch_to_buffer = 0; } - else if (weechat_strcasecmp (argv[i], "-ln") == 0) + else if (weechat_strcmp (argv[i], "-ln") == 0) { cmd_options->line_numbers = 1; } - else if (weechat_strcasecmp (argv[i], "-noln") == 0) + else if (weechat_strcmp (argv[i], "-noln") == 0) { cmd_options->line_numbers = 0; } - else if (weechat_strcasecmp (argv[i], "-flush") == 0) + else if (weechat_strcmp (argv[i], "-flush") == 0) { cmd_options->flush = 1; } - else if (weechat_strcasecmp (argv[i], "-noflush") == 0) + else if (weechat_strcmp (argv[i], "-noflush") == 0) { cmd_options->flush = 0; } - else if (weechat_strcasecmp (argv[i], "-color") == 0) + else if (weechat_strcmp (argv[i], "-color") == 0) { if (i + 1 >= argc) return 0; @@ -301,15 +301,15 @@ exec_command_parse_options (struct t_exec_cmd_options *cmd_options, if (cmd_options->color < 0) return 0; } - else if (weechat_strcasecmp (argv[i], "-rc") == 0) + else if (weechat_strcmp (argv[i], "-rc") == 0) { cmd_options->display_rc = 1; } - else if (weechat_strcasecmp (argv[i], "-norc") == 0) + else if (weechat_strcmp (argv[i], "-norc") == 0) { cmd_options->display_rc = 0; } - else if (weechat_strcasecmp (argv[i], "-timeout") == 0) + else if (weechat_strcmp (argv[i], "-timeout") == 0) { if (i + 1 >= argc) return 0; @@ -319,14 +319,14 @@ exec_command_parse_options (struct t_exec_cmd_options *cmd_options, if (!error || error[0]) return 0; } - else if (weechat_strcasecmp (argv[i], "-name") == 0) + else if (weechat_strcmp (argv[i], "-name") == 0) { if (i + 1 >= argc) return 0; i++; cmd_options->ptr_command_name = argv[i]; } - else if (weechat_strcasecmp (argv[i], "-pipe") == 0) + else if (weechat_strcmp (argv[i], "-pipe") == 0) { if (i + 1 >= argc) return 0; @@ -370,7 +370,7 @@ exec_command_parse_options (struct t_exec_cmd_options *cmd_options, else cmd_options->pipe_command = strdup (argv[i]); } - else if (weechat_strcasecmp (argv[i], "-hsignal") == 0) + else if (weechat_strcmp (argv[i], "-hsignal") == 0) { if (i + 1 >= argc) return 0; @@ -676,14 +676,14 @@ exec_command_exec (const void *pointer, void *data, /* list running commands */ if ((argc == 1) - || ((argc == 2) && (weechat_strcasecmp (argv[1], "-list") == 0))) + || ((argc == 2) && (weechat_strcmp (argv[1], "-list") == 0))) { exec_command_list (); return WEECHAT_RC_OK; } /* send text to a running process */ - if (weechat_strcasecmp (argv[1], "-in") == 0) + if (weechat_strcmp (argv[1], "-in") == 0) { WEECHAT_COMMAND_MIN_ARGS(4, "-in"); ptr_exec_cmd = exec_command_search_running_id (argv[2]); @@ -702,7 +702,7 @@ exec_command_exec (const void *pointer, void *data, } /* send text to a running process (if given), then close stdin */ - if (weechat_strcasecmp (argv[1], "-inclose") == 0) + if (weechat_strcmp (argv[1], "-inclose") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "-inclose"); ptr_exec_cmd = exec_command_search_running_id (argv[2]); @@ -725,7 +725,7 @@ exec_command_exec (const void *pointer, void *data, } /* send a signal to a running process */ - if (weechat_strcasecmp (argv[1], "-signal") == 0) + if (weechat_strcmp (argv[1], "-signal") == 0) { WEECHAT_COMMAND_MIN_ARGS(4, "-signal"); ptr_exec_cmd = exec_command_search_running_id (argv[2]); @@ -735,7 +735,7 @@ exec_command_exec (const void *pointer, void *data, } /* send a KILL signal to a running process */ - if (weechat_strcasecmp (argv[1], "-kill") == 0) + if (weechat_strcmp (argv[1], "-kill") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "-kill"); ptr_exec_cmd = exec_command_search_running_id (argv[2]); @@ -745,7 +745,7 @@ exec_command_exec (const void *pointer, void *data, } /* send a KILL signal to all running processes */ - if (weechat_strcasecmp (argv[1], "-killall") == 0) + if (weechat_strcmp (argv[1], "-killall") == 0) { for (ptr_exec_cmd = exec_cmds; ptr_exec_cmd; ptr_exec_cmd = ptr_exec_cmd->next_cmd) @@ -759,7 +759,7 @@ exec_command_exec (const void *pointer, void *data, } /* set a hook property */ - if (weechat_strcasecmp (argv[1], "-set") == 0) + if (weechat_strcmp (argv[1], "-set") == 0) { WEECHAT_COMMAND_MIN_ARGS(5, "-set"); ptr_exec_cmd = exec_command_search_running_id (argv[2]); @@ -769,10 +769,10 @@ exec_command_exec (const void *pointer, void *data, } /* delete terminated command(s) */ - if (weechat_strcasecmp (argv[1], "-del") == 0) + if (weechat_strcmp (argv[1], "-del") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "-del"); - if (weechat_strcasecmp (argv[2], "-all") == 0) + if (weechat_strcmp (argv[2], "-all") == 0) { count = 0; ptr_exec_cmd = exec_cmds; diff --git a/src/plugins/exec/exec.c b/src/plugins/exec/exec.c index da404a080..71447a76b 100644 --- a/src/plugins/exec/exec.c +++ b/src/plugins/exec/exec.c @@ -65,7 +65,7 @@ exec_search_color (const char *color) for (i = 0; i < EXEC_NUM_COLORS; i++) { - if (weechat_strcasecmp (exec_color_string[i], color) == 0) + if (weechat_strcmp (exec_color_string[i], color) == 0) return i; } @@ -724,7 +724,7 @@ exec_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, EXEC_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, EXEC_PLUGIN_NAME) == 0)) { weechat_log_printf (""); weechat_log_printf ("***** \"%s\" plugin dump *****", diff --git a/src/plugins/fifo/fifo-command.c b/src/plugins/fifo/fifo-command.c index f07cbf29b..4e8ce14bd 100644 --- a/src/plugins/fifo/fifo-command.c +++ b/src/plugins/fifo/fifo-command.c @@ -59,21 +59,21 @@ fifo_command_fifo (const void *pointer, void *data, } /* enable pipe */ - if (weechat_strcasecmp (argv[1], "enable") == 0) + if (weechat_strcmp (argv[1], "enable") == 0) { weechat_config_option_set (fifo_config_file_enabled, "on", 1); return WEECHAT_RC_OK; } /* disable pipe */ - if (weechat_strcasecmp (argv[1], "disable") == 0) + if (weechat_strcmp (argv[1], "disable") == 0) { weechat_config_option_set (fifo_config_file_enabled, "off", 1); return WEECHAT_RC_OK; } /* toggle pipe */ - if (weechat_strcasecmp (argv[1], "toggle") == 0) + if (weechat_strcmp (argv[1], "toggle") == 0) { weechat_config_option_set ( fifo_config_file_enabled, diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c index 2ca4ab89d..63c1fdd64 100644 --- a/src/plugins/fset/fset-command.c +++ b/src/plugins/fset/fset-command.c @@ -108,13 +108,13 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-bar") == 0) + if (weechat_strcmp (argv[1], "-bar") == 0) { fset_add_bar (); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-refresh") == 0) + if (weechat_strcmp (argv[1], "-refresh") == 0) { fset_option_get_options (); fset_buffer_refresh (0); @@ -122,7 +122,7 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-up") == 0) + if (weechat_strcmp (argv[1], "-up") == 0) { if (fset_buffer) { @@ -143,7 +143,7 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-down") == 0) + if (weechat_strcmp (argv[1], "-down") == 0) { if (fset_buffer) { @@ -164,7 +164,7 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-left") == 0) + if (weechat_strcmp (argv[1], "-left") == 0) { if (fset_buffer) { @@ -188,7 +188,7 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-right") == 0) + if (weechat_strcmp (argv[1], "-right") == 0) { if (fset_buffer) { @@ -212,13 +212,13 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-go") == 0) + if (weechat_strcmp (argv[1], "-go") == 0) { if (fset_buffer) { if (argc < 3) WEECHAT_COMMAND_ERROR; - if (weechat_strcasecmp (argv[2], "end") == 0) + if (weechat_strcmp (argv[2], "end") == 0) line = weechat_arraylist_size (fset_options) - 1; else line = fset_command_get_int_arg (argc, argv, 2, -1); @@ -233,7 +233,7 @@ fset_command_fset (const void *pointer, void *data, if (argv[1][0] == '-') { - if (weechat_strcasecmp (argv[1], "-toggle") == 0) + if (weechat_strcmp (argv[1], "-toggle") == 0) { if (fset_option_count_marked > 0) { @@ -257,7 +257,7 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-add") == 0) + if (weechat_strcmp (argv[1], "-add") == 0) { value = fset_command_get_int_arg (argc, argv, 2, 0); if (value == 0) @@ -295,7 +295,7 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-reset") == 0) + if (weechat_strcmp (argv[1], "-reset") == 0) { if (fset_option_count_marked > 0) { @@ -319,7 +319,7 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-unset") == 0) + if (weechat_strcmp (argv[1], "-unset") == 0) { if (fset_option_count_marked > 0) { @@ -343,35 +343,35 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-set") == 0) + if (weechat_strcmp (argv[1], "-set") == 0) { fset_command_get_option (&ptr_fset_option, &ptr_option); fset_option_set (ptr_fset_option, ptr_option, buffer, 0); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-setnew") == 0) + if (weechat_strcmp (argv[1], "-setnew") == 0) { fset_command_get_option (&ptr_fset_option, &ptr_option); fset_option_set (ptr_fset_option, ptr_option, buffer, -1); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-append") == 0) + if (weechat_strcmp (argv[1], "-append") == 0) { fset_command_get_option (&ptr_fset_option, &ptr_option); fset_option_set (ptr_fset_option, ptr_option, buffer, 1); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-mark") == 0) + if (weechat_strcmp (argv[1], "-mark") == 0) { fset_command_get_option (&ptr_fset_option, &ptr_option); fset_option_toggle_mark (ptr_fset_option, ptr_option); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-format") == 0) + if (weechat_strcmp (argv[1], "-format") == 0) { min = weechat_hdata_integer (fset_hdata_config_option, fset_config_look_format_number, @@ -388,20 +388,20 @@ fset_command_fset (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "-export") == 0) + if (weechat_strcmp (argv[1], "-export") == 0) { if (argc < 3) WEECHAT_COMMAND_ERROR; with_help = weechat_config_boolean (fset_config_look_export_help_default); ptr_filename = argv_eol[2]; - if (weechat_strcasecmp (argv[2], "-help") == 0) + if (weechat_strcmp (argv[2], "-help") == 0) { with_help = 1; if (argc < 4) WEECHAT_COMMAND_ERROR; ptr_filename = argv_eol[3]; } - else if (weechat_strcasecmp (argv[2], "-nohelp") == 0) + else if (weechat_strcmp (argv[2], "-nohelp") == 0) { with_help = 0; if (argc < 4) @@ -483,8 +483,8 @@ fset_command_run_set_cb (const void *pointer, void *data, * (we must not catch that in fset!) */ if ((argc > 1) - && ((weechat_strcasecmp (argv[1], "diff") == 0) - || (weechat_strcasecmp (argv[1], "env") == 0))) + && ((weechat_strcmp (argv[1], "diff") == 0) + || (weechat_strcmp (argv[1], "env") == 0))) { goto end; } diff --git a/src/plugins/fset/fset.c b/src/plugins/fset/fset.c index 7c99bf19a..1cd4c5f99 100644 --- a/src/plugins/fset/fset.c +++ b/src/plugins/fset/fset.c @@ -66,7 +66,7 @@ fset_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, FSET_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, FSET_PLUGIN_NAME) == 0)) { weechat_log_printf (""); weechat_log_printf ("***** \"%s\" plugin dump *****", diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c index 2c26fad87..88fb2756c 100644 --- a/src/plugins/guile/weechat-guile.c +++ b/src/plugins/guile/weechat-guile.c @@ -816,30 +816,30 @@ weechat_guile_command_cb (const void *pointer, void *data, } else if (argc == 2) { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_guile_plugin, guile_scripts, NULL, 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_guile_plugin, guile_scripts, NULL, 1); } - else if (weechat_strcasecmp (argv[1], "autoload") == 0) + else if (weechat_strcmp (argv[1], "autoload") == 0) { plugin_script_auto_load (weechat_guile_plugin, &weechat_guile_load_cb); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { weechat_guile_unload_all (); plugin_script_auto_load (weechat_guile_plugin, &weechat_guile_load_cb); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { weechat_guile_unload_all (); } - else if (weechat_strcasecmp (argv[1], "version") == 0) + else if (weechat_strcmp (argv[1], "version") == 0) { plugin_script_display_interpreter (weechat_guile_plugin, 0); } @@ -848,19 +848,19 @@ weechat_guile_command_cb (const void *pointer, void *data, } else { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_guile_plugin, guile_scripts, argv_eol[2], 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_guile_plugin, guile_scripts, argv_eol[2], 1); } - else if ((weechat_strcasecmp (argv[1], "load") == 0) - || (weechat_strcasecmp (argv[1], "reload") == 0) - || (weechat_strcasecmp (argv[1], "unload") == 0)) + else if ((weechat_strcmp (argv[1], "load") == 0) + || (weechat_strcmp (argv[1], "reload") == 0) + || (weechat_strcmp (argv[1], "unload") == 0)) { ptr_name = argv_eol[2]; if (strncmp (ptr_name, "-q ", 3) == 0) @@ -872,7 +872,7 @@ weechat_guile_command_cb (const void *pointer, void *data, ptr_name++; } } - if (weechat_strcasecmp (argv[1], "load") == 0) + if (weechat_strcmp (argv[1], "load") == 0) { /* load guile script */ path_script = plugin_script_search_path (weechat_guile_plugin, @@ -882,19 +882,19 @@ weechat_guile_command_cb (const void *pointer, void *data, if (path_script) free (path_script); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { /* reload one guile script */ weechat_guile_reload_name (ptr_name); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { /* unload guile script */ weechat_guile_unload_name (ptr_name); } guile_quiet = 0; } - else if (weechat_strcasecmp (argv[1], "eval") == 0) + else if (weechat_strcmp (argv[1], "eval") == 0) { send_to_buffer_as_input = 0; exec_commands = 0; @@ -1037,7 +1037,7 @@ weechat_guile_signal_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, GUILE_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, GUILE_PLUGIN_NAME) == 0)) { plugin_script_print_log (weechat_guile_plugin, guile_scripts); } diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 9e10c42ac..8752946cd 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -569,7 +569,7 @@ IRC_COMMAND_CALLBACK(allchan) ptr_command = argv_eol[1]; for (i = 1; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "-current") == 0) + if (weechat_strcmp (argv[i], "-current") == 0) { if (!ptr_server) { @@ -584,18 +584,18 @@ IRC_COMMAND_CALLBACK(allchan) current_server = 1; ptr_command = argv_eol[i + 1]; } - else if (weechat_strcasecmp (argv[i], "-parted") == 0) + else if (weechat_strcmp (argv[i], "-parted") == 0) { parted_channels = 1; ptr_command = argv_eol[i + 1]; } - else if (weechat_strncasecmp (argv[i], "-exclude=", 9) == 0) + else if (weechat_strncmp (argv[i], "-exclude=", 9) == 0) { ptr_channels = argv[i] + 9; ptr_command = argv_eol[i + 1]; inclusive = 0; } - else if (weechat_strncasecmp (argv[i], "-include=", 9) == 0) + else if (weechat_strncmp (argv[i], "-include=", 9) == 0) { ptr_channels = argv[i] + 9; ptr_command = argv_eol[i + 1]; @@ -644,7 +644,7 @@ IRC_COMMAND_CALLBACK(allpv) ptr_command = argv_eol[1]; for (i = 1; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "-current") == 0) + if (weechat_strcmp (argv[i], "-current") == 0) { if (!ptr_server) { @@ -659,13 +659,13 @@ IRC_COMMAND_CALLBACK(allpv) current_server = 1; ptr_command = argv_eol[i + 1]; } - else if (weechat_strncasecmp (argv[i], "-exclude=", 9) == 0) + else if (weechat_strncmp (argv[i], "-exclude=", 9) == 0) { ptr_channels = argv[i] + 9; ptr_command = argv_eol[i + 1]; inclusive = 0; } - else if (weechat_strncasecmp (argv[i], "-include=", 9) == 0) + else if (weechat_strncmp (argv[i], "-include=", 9) == 0) { ptr_channels = argv[i] + 9; ptr_command = argv_eol[i + 1]; @@ -781,13 +781,13 @@ IRC_COMMAND_CALLBACK(allserv) ptr_command = argv_eol[1]; for (i = 1; i < argc; i++) { - if (weechat_strncasecmp (argv[i], "-exclude=", 9) == 0) + if (weechat_strncmp (argv[i], "-exclude=", 9) == 0) { ptr_servers = argv[i] + 9; ptr_command = argv_eol[i + 1]; inclusive = 0; } - else if (weechat_strncasecmp (argv[i], "-include=", 9) == 0) + else if (weechat_strncmp (argv[i], "-include=", 9) == 0) { ptr_servers = argv[i] + 9; ptr_command = argv_eol[i + 1]; @@ -925,7 +925,7 @@ IRC_COMMAND_CALLBACK(autojoin) IRC_SERVER_OPTION_AUTOJOIN); /* join channels in server "autojoin" option */ - if (weechat_strcasecmp (argv[1], "join") == 0) + if (weechat_strcmp (argv[1], "join") == 0) { if (ptr_autojoin) { @@ -943,7 +943,7 @@ IRC_COMMAND_CALLBACK(autojoin) old_autojoin = strdup ((ptr_autojoin) ? ptr_autojoin : ""); /* add channel(s) */ - if (weechat_strcasecmp (argv[1], "add") == 0) + if (weechat_strcmp (argv[1], "add") == 0) { if (argc < 3) { @@ -978,7 +978,7 @@ IRC_COMMAND_CALLBACK(autojoin) } /* add raw channel(s) */ - if (weechat_strcasecmp (argv[1], "addraw") == 0) + if (weechat_strcmp (argv[1], "addraw") == 0) { if (argc < 3) { @@ -991,7 +991,7 @@ IRC_COMMAND_CALLBACK(autojoin) } /* delete channel(s) */ - if (weechat_strcasecmp (argv[1], "del") == 0) + if (weechat_strcmp (argv[1], "del") == 0) { if (argc < 3) { @@ -1016,14 +1016,14 @@ IRC_COMMAND_CALLBACK(autojoin) } /* apply currently joined channels in server "autojoin" option */ - if (weechat_strcasecmp (argv[1], "apply") == 0) + if (weechat_strcmp (argv[1], "apply") == 0) { irc_join_save_channels_to_autojoin (ptr_server); goto end; } /* sort channels */ - if (weechat_strcasecmp (argv[1], "sort") == 0) + if (weechat_strcmp (argv[1], "sort") == 0) { irc_join_sort_autojoin (ptr_server); goto end; @@ -1328,7 +1328,7 @@ IRC_COMMAND_CALLBACK(away) (void) pointer; (void) data; - if ((argc >= 2) && (weechat_strcasecmp (argv[1], "-all") == 0)) + if ((argc >= 2) && (weechat_strcmp (argv[1], "-all") == 0)) { weechat_buffer_set (NULL, "hotlist", "-"); for (ptr_server = irc_servers; ptr_server; @@ -1635,15 +1635,15 @@ IRC_COMMAND_CALLBACK(connect) autoconnect = 0; for (i = 1; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "-all") == 0) + if (weechat_strcmp (argv[i], "-all") == 0) all_servers = 1; - else if (weechat_strcasecmp (argv[i], "-open") == 0) + else if (weechat_strcmp (argv[i], "-open") == 0) all_opened = 1; - else if (weechat_strcasecmp (argv[i], "-switch") == 0) + else if (weechat_strcmp (argv[i], "-switch") == 0) switch_address = 1; - else if (weechat_strcasecmp (argv[i], "-nojoin") == 0) + else if (weechat_strcmp (argv[i], "-nojoin") == 0) no_join = 1; - else if (weechat_strcasecmp (argv[i], "-auto") == 0) + else if (weechat_strcmp (argv[i], "-auto") == 0) autoconnect = 1; } @@ -1791,7 +1791,7 @@ IRC_COMMAND_CALLBACK(connect) } else { - if (weechat_strcasecmp (argv[i], "-port") == 0) + if (weechat_strcmp (argv[i], "-port") == 0) i++; } } @@ -1829,7 +1829,7 @@ IRC_COMMAND_CALLBACK(ctcp) arg_type = 2; arg_args = 3; - if ((argc >= 5) && (weechat_strcasecmp (argv[1], "-server") == 0)) + if ((argc >= 5) && (weechat_strcmp (argv[1], "-server") == 0)) { ptr_server = irc_server_search (argv[2]); ptr_channel = NULL; @@ -2071,7 +2071,7 @@ IRC_COMMAND_CALLBACK(dcc) } /* DCC SEND file */ - if (weechat_strcasecmp (argv[1], "send") == 0) + if (weechat_strcmp (argv[1], "send") == 0) { WEECHAT_COMMAND_MIN_ARGS(4, "send"); infolist = weechat_infolist_new (); @@ -2099,7 +2099,7 @@ IRC_COMMAND_CALLBACK(dcc) } /* DCC CHAT */ - if (weechat_strcasecmp (argv[1], "chat") == 0) + if (weechat_strcmp (argv[1], "chat") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "chat"); infolist = weechat_infolist_new (); @@ -2394,7 +2394,7 @@ IRC_COMMAND_CALLBACK(disconnect) { disconnect_ok = 1; - if (weechat_strcasecmp (argv[1], "-all") == 0) + if (weechat_strcmp (argv[1], "-all") == 0) { for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) @@ -2408,7 +2408,7 @@ IRC_COMMAND_CALLBACK(disconnect) } } } - else if (weechat_strcasecmp (argv[1], "-pending") == 0) + else if (weechat_strcmp (argv[1], "-pending") == 0) { for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) @@ -2521,7 +2521,7 @@ IRC_COMMAND_CALLBACK(ignore) (void) argv_eol; if ((argc == 1) - || ((argc == 2) && (weechat_strcasecmp (argv[1], "list") == 0))) + || ((argc == 2) && (weechat_strcmp (argv[1], "list") == 0))) { /* display all ignores */ if (irc_ignore_list) @@ -2540,7 +2540,7 @@ IRC_COMMAND_CALLBACK(ignore) } /* add ignore */ - if (weechat_strcasecmp (argv[1], "add") == 0) + if (weechat_strcmp (argv[1], "add") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "add"); @@ -2629,11 +2629,11 @@ IRC_COMMAND_CALLBACK(ignore) } /* delete ignore */ - if (weechat_strcasecmp (argv[1], "del") == 0) + if (weechat_strcmp (argv[1], "del") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "del"); - if (weechat_strcasecmp (argv[2], "-all") == 0) + if (weechat_strcmp (argv[2], "-all") == 0) { if (irc_ignore_list) { @@ -2982,7 +2982,7 @@ IRC_COMMAND_CALLBACK(join) for (i = 1; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "-server") == 0) + if (weechat_strcmp (argv[i], "-server") == 0) { if (argc <= i + 1) WEECHAT_COMMAND_ERROR; @@ -2992,7 +2992,7 @@ IRC_COMMAND_CALLBACK(join) arg_channels = i + 2; i++; } - else if (weechat_strcasecmp (argv[i], "-noswitch") == 0) + else if (weechat_strcmp (argv[i], "-noswitch") == 0) { noswitch = 1; arg_channels = i + 1; @@ -3309,7 +3309,7 @@ IRC_COMMAND_CALLBACK(list) for (i = 1; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "-server") == 0) + if (weechat_strcmp (argv[i], "-server") == 0) { if (argc <= i + 1) WEECHAT_COMMAND_ERROR; @@ -3318,7 +3318,7 @@ IRC_COMMAND_CALLBACK(list) WEECHAT_COMMAND_ERROR; i++; } - else if (weechat_strcasecmp (argv[i], "-re") == 0) + else if (weechat_strcmp (argv[i], "-re") == 0) { if (argc <= i + 1) WEECHAT_COMMAND_ERROR; @@ -3606,7 +3606,7 @@ IRC_COMMAND_CALLBACK(msg) arg_target = 1; arg_text = 2; - if ((argc >= 5) && (weechat_strcasecmp (argv[1], "-server") == 0)) + if ((argc >= 5) && (weechat_strcmp (argv[1], "-server") == 0)) { ptr_server = irc_server_search (argv[2]); ptr_channel = NULL; @@ -3875,7 +3875,7 @@ IRC_COMMAND_CALLBACK(nick) if (argc > 2) { - if (weechat_strcasecmp (argv[1], "-all") != 0) + if (weechat_strcmp (argv[1], "-all") != 0) WEECHAT_COMMAND_ERROR; for (ptr_server = irc_servers; ptr_server; ptr_server = ptr_server->next_server) @@ -3910,7 +3910,7 @@ IRC_COMMAND_CALLBACK(notice) arg_target = 1; arg_text = 2; - if ((argc >= 5) && (weechat_strcasecmp (argv[1], "-server") == 0)) + if ((argc >= 5) && (weechat_strcmp (argv[1], "-server") == 0)) { ptr_server = irc_server_search (argv[2]); arg_target = 3; @@ -4000,7 +4000,7 @@ IRC_COMMAND_CALLBACK(notify) } /* add notify */ - if (weechat_strcasecmp (argv[1], "add") == 0) + if (weechat_strcmp (argv[1], "add") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "add"); @@ -4033,7 +4033,7 @@ IRC_COMMAND_CALLBACK(notify) { for (i = 4; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "-away") == 0) + if (weechat_strcmp (argv[i], "-away") == 0) check_away = 1; } } @@ -4083,7 +4083,7 @@ IRC_COMMAND_CALLBACK(notify) } /* delete notify */ - if (weechat_strcasecmp (argv[1], "del") == 0) + if (weechat_strcmp (argv[1], "del") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "del"); @@ -4110,7 +4110,7 @@ IRC_COMMAND_CALLBACK(notify) return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[2], "-all") == 0) + if (weechat_strcmp (argv[2], "-all") == 0) { if (ptr_server->notify_list) { @@ -4406,7 +4406,7 @@ IRC_COMMAND_CALLBACK(query) for (i = 1; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "-server") == 0) + if (weechat_strcmp (argv[i], "-server") == 0) { if (argc <= i + 1) WEECHAT_COMMAND_ERROR; @@ -4417,7 +4417,7 @@ IRC_COMMAND_CALLBACK(query) arg_text = i + 3; i++; } - else if (weechat_strcasecmp (argv[i], "-noswitch") == 0) + else if (weechat_strcmp (argv[i], "-noswitch") == 0) { noswitch = 1; arg_nick = i + 1; @@ -4591,7 +4591,7 @@ IRC_COMMAND_CALLBACK(quote) WEECHAT_COMMAND_MIN_ARGS(2, ""); - if ((argc >= 4) && (weechat_strcasecmp (argv[1], "-server") == 0)) + if ((argc >= 4) && (weechat_strcmp (argv[1], "-server") == 0)) { ptr_server = irc_server_search (argv[2]); if (!ptr_server || (ptr_server->sock < 0)) @@ -4674,11 +4674,11 @@ IRC_COMMAND_CALLBACK(reconnect) no_join = 0; for (i = 1; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "-all") == 0) + if (weechat_strcmp (argv[i], "-all") == 0) all_servers = 1; - else if (weechat_strcasecmp (argv[i], "-switch") == 0) + else if (weechat_strcmp (argv[i], "-switch") == 0) switch_address = 1; - else if (weechat_strcasecmp (argv[i], "-nojoin") == 0) + else if (weechat_strcmp (argv[i], "-nojoin") == 0) no_join = 1; } @@ -5507,17 +5507,17 @@ IRC_COMMAND_CALLBACK(server) (void) buffer; if ((argc == 1) - || (weechat_strcasecmp (argv[1], "list") == 0) - || (weechat_strcasecmp (argv[1], "listfull") == 0)) + || (weechat_strcmp (argv[1], "list") == 0) + || (weechat_strcmp (argv[1], "listfull") == 0)) { /* list servers */ server_name = NULL; detailed_list = 0; for (i = 1; i < argc; i++) { - if (weechat_strcasecmp (argv[i], "list") == 0) + if (weechat_strcmp (argv[i], "list") == 0) continue; - if (weechat_strcasecmp (argv[i], "listfull") == 0) + if (weechat_strcmp (argv[i], "listfull") == 0) { detailed_list = 1; continue; @@ -5567,7 +5567,7 @@ IRC_COMMAND_CALLBACK(server) return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "add") == 0) + if (weechat_strcmp (argv[1], "add") == 0) { WEECHAT_COMMAND_MIN_ARGS(4, "add"); @@ -5616,7 +5616,7 @@ IRC_COMMAND_CALLBACK(server) return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "copy") == 0) + if (weechat_strcmp (argv[1], "copy") == 0) { WEECHAT_COMMAND_MIN_ARGS(4, "copy"); @@ -5664,7 +5664,7 @@ IRC_COMMAND_CALLBACK(server) WEECHAT_COMMAND_ERROR; } - if (weechat_strcasecmp (argv[1], "rename") == 0) + if (weechat_strcmp (argv[1], "rename") == 0) { WEECHAT_COMMAND_MIN_ARGS(4, "rename"); @@ -5711,7 +5711,7 @@ IRC_COMMAND_CALLBACK(server) WEECHAT_COMMAND_ERROR; } - if (weechat_strcasecmp (argv[1], "reorder") == 0) + if (weechat_strcmp (argv[1], "reorder") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "reorder"); @@ -5723,11 +5723,11 @@ IRC_COMMAND_CALLBACK(server) return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "open") == 0) + if (weechat_strcmp (argv[1], "open") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "open"); - if (weechat_strcasecmp (argv[2], "-all") == 0) + if (weechat_strcmp (argv[2], "-all") == 0) { for (ptr_server2 = irc_servers; ptr_server2; ptr_server2 = ptr_server2->next_server) @@ -5772,7 +5772,7 @@ IRC_COMMAND_CALLBACK(server) return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "keep") == 0) + if (weechat_strcmp (argv[1], "keep") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "keep"); @@ -5813,7 +5813,7 @@ IRC_COMMAND_CALLBACK(server) return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "del") == 0) + if (weechat_strcmp (argv[1], "del") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "del"); @@ -5853,7 +5853,7 @@ IRC_COMMAND_CALLBACK(server) return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "deloutq") == 0) + if (weechat_strcmp (argv[1], "deloutq") == 0) { for (ptr_server2 = irc_servers; ptr_server2; ptr_server2 = ptr_server2->next_server) @@ -5871,7 +5871,7 @@ IRC_COMMAND_CALLBACK(server) return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "raw") == 0) + if (weechat_strcmp (argv[1], "raw") == 0) { refresh = irc_raw_buffer && (argc > 2); if (argc > 2) @@ -5882,14 +5882,14 @@ IRC_COMMAND_CALLBACK(server) return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "jump") == 0) + if (weechat_strcmp (argv[1], "jump") == 0) { if (ptr_server && ptr_server->buffer) weechat_buffer_set (ptr_server->buffer, "display", "1"); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "fakerecv") == 0) + if (weechat_strcmp (argv[1], "fakerecv") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "fakerecv"); IRC_COMMAND_CHECK_SERVER("server fakerecv", 0, 1); @@ -6165,7 +6165,7 @@ IRC_COMMAND_CALLBACK(topic) if (new_topic) { - if (weechat_strcasecmp (new_topic, "-delete") == 0) + if (weechat_strcmp (new_topic, "-delete") == 0) { irc_server_sendf (ptr_server, IRC_SERVER_SEND_OUTQ_PRIO_HIGH, NULL, "TOPIC %s :", channel_name); diff --git a/src/plugins/irc/irc-debug.c b/src/plugins/irc/irc-debug.c index d5bbe0be9..ea664dff7 100644 --- a/src/plugins/irc/irc-debug.c +++ b/src/plugins/irc/irc-debug.c @@ -46,7 +46,7 @@ irc_debug_signal_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, IRC_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, IRC_PLUGIN_NAME) == 0)) { weechat_log_printf (""); weechat_log_printf ("***** \"%s\" plugin dump *****", diff --git a/src/plugins/irc/irc-server.c b/src/plugins/irc/irc-server.c index 397d5cfc1..de61fea66 100644 --- a/src/plugins/irc/irc-server.c +++ b/src/plugins/irc/irc-server.c @@ -1936,7 +1936,7 @@ irc_server_apply_command_line_options (struct t_irc_server *server, } if (option_name) { - if (weechat_strcasecmp (option_name, "temp") == 0) + if (weechat_strcmp (option_name, "temp") == 0) { /* temporary server, not saved */ server->temp_server = 1; @@ -1947,7 +1947,7 @@ irc_server_apply_command_line_options (struct t_irc_server *server, if (index_option < 0) { /* look if option is negative, like "-noxxx" */ - if (weechat_strncasecmp (argv[i], "-no", 3) == 0) + if (weechat_strncmp (argv[i], "-no", 3) == 0) { free (option_name); option_name = strdup (argv[i] + 3); diff --git a/src/plugins/irc/irc.c b/src/plugins/irc/irc.c index d6e66943d..ea6612cec 100644 --- a/src/plugins/irc/irc.c +++ b/src/plugins/irc/irc.c @@ -254,7 +254,7 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) /* look at arguments */ for (i = 0; i < argc; i++) { - if ((weechat_strncasecmp (argv[i], IRC_PLUGIN_NAME, 3) == 0)) + if ((weechat_strncmp (argv[i], IRC_PLUGIN_NAME, 3) == 0)) { if (!irc_server_alloc_with_url (argv[i])) { diff --git a/src/plugins/javascript/weechat-js.cpp b/src/plugins/javascript/weechat-js.cpp index 3fc9c545f..6b9555c17 100644 --- a/src/plugins/javascript/weechat-js.cpp +++ b/src/plugins/javascript/weechat-js.cpp @@ -597,30 +597,30 @@ weechat_js_command_cb (const void *pointer, void *data, } else if (argc == 2) { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_js_plugin, js_scripts, NULL, 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_js_plugin, js_scripts, NULL, 1); } - else if (weechat_strcasecmp (argv[1], "autoload") == 0) + else if (weechat_strcmp (argv[1], "autoload") == 0) { plugin_script_auto_load (weechat_js_plugin, &weechat_js_load_cb); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { weechat_js_unload_all (); plugin_script_auto_load (weechat_js_plugin, &weechat_js_load_cb); } - else if (weechat_strcasecmp(argv[1], "unload") == 0) + else if (weechat_strcmp(argv[1], "unload") == 0) { weechat_js_unload_all (); } - else if (weechat_strcasecmp (argv[1], "version") == 0) + else if (weechat_strcmp (argv[1], "version") == 0) { plugin_script_display_interpreter (weechat_js_plugin, 0); } @@ -629,19 +629,19 @@ weechat_js_command_cb (const void *pointer, void *data, } else { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_js_plugin, js_scripts, argv_eol[2], 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_js_plugin, js_scripts, argv_eol[2], 1); } - else if ((weechat_strcasecmp (argv[1], "load") == 0) - || (weechat_strcasecmp (argv[1], "reload") == 0) - || (weechat_strcasecmp (argv[1], "unload") == 0)) + else if ((weechat_strcmp (argv[1], "load") == 0) + || (weechat_strcmp (argv[1], "reload") == 0) + || (weechat_strcmp (argv[1], "unload") == 0)) { ptr_name = argv_eol[2]; if (strncmp (ptr_name, "-q ", 3) == 0) @@ -653,7 +653,7 @@ weechat_js_command_cb (const void *pointer, void *data, ptr_name++; } } - if (weechat_strcasecmp (argv[1], "load") == 0) + if (weechat_strcmp (argv[1], "load") == 0) { /* load javascript script */ path_script = plugin_script_search_path (weechat_js_plugin, @@ -663,19 +663,19 @@ weechat_js_command_cb (const void *pointer, void *data, if (path_script) free (path_script); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { /* reload one javascript script */ weechat_js_reload_name (ptr_name); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { /* unload javascript script */ weechat_js_unload_name (ptr_name); } js_quiet = 0; } - else if (weechat_strcasecmp (argv[1], "eval") == 0) + else if (weechat_strcmp (argv[1], "eval") == 0) { send_to_buffer_as_input = 0; exec_commands = 0; @@ -820,7 +820,7 @@ weechat_js_signal_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, JS_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, JS_PLUGIN_NAME) == 0)) { plugin_script_print_log (weechat_js_plugin, js_scripts); } diff --git a/src/plugins/logger/logger-command.c b/src/plugins/logger/logger-command.c index 2cc1b07f6..e5ff04d49 100644 --- a/src/plugins/logger/logger-command.c +++ b/src/plugins/logger/logger-command.c @@ -128,26 +128,26 @@ logger_command_cb (const void *pointer, void *data, (void) argv_eol; if ((argc == 1) - || ((argc == 2) && (weechat_strcasecmp (argv[1], "list") == 0))) + || ((argc == 2) && (weechat_strcmp (argv[1], "list") == 0))) { logger_list (); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "set") == 0) + if (weechat_strcmp (argv[1], "set") == 0) { if (argc > 2) logger_set_buffer (buffer, argv[2]); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "flush") == 0) + if (weechat_strcmp (argv[1], "flush") == 0) { logger_buffer_flush (); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "disable") == 0) + if (weechat_strcmp (argv[1], "disable") == 0) { logger_set_buffer (buffer, "0"); return WEECHAT_RC_OK; diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c index cce139136..28c18317b 100644 --- a/src/plugins/lua/weechat-lua.c +++ b/src/plugins/lua/weechat-lua.c @@ -915,30 +915,30 @@ weechat_lua_command_cb (const void *pointer, void *data, } else if (argc == 2) { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_lua_plugin, lua_scripts, NULL, 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_lua_plugin, lua_scripts, NULL, 1); } - else if (weechat_strcasecmp (argv[1], "autoload") == 0) + else if (weechat_strcmp (argv[1], "autoload") == 0) { plugin_script_auto_load (weechat_lua_plugin, &weechat_lua_load_cb); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { weechat_lua_unload_all (); plugin_script_auto_load (weechat_lua_plugin, &weechat_lua_load_cb); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { weechat_lua_unload_all (); } - else if (weechat_strcasecmp (argv[1], "version") == 0) + else if (weechat_strcmp (argv[1], "version") == 0) { plugin_script_display_interpreter (weechat_lua_plugin, 0); } @@ -947,19 +947,19 @@ weechat_lua_command_cb (const void *pointer, void *data, } else { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_lua_plugin, lua_scripts, argv_eol[2], 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_lua_plugin, lua_scripts, argv_eol[2], 1); } - else if ((weechat_strcasecmp (argv[1], "load") == 0) - || (weechat_strcasecmp (argv[1], "reload") == 0) - || (weechat_strcasecmp (argv[1], "unload") == 0)) + else if ((weechat_strcmp (argv[1], "load") == 0) + || (weechat_strcmp (argv[1], "reload") == 0) + || (weechat_strcmp (argv[1], "unload") == 0)) { ptr_name = argv_eol[2]; if (strncmp (ptr_name, "-q ", 3) == 0) @@ -971,7 +971,7 @@ weechat_lua_command_cb (const void *pointer, void *data, ptr_name++; } } - if (weechat_strcasecmp (argv[1], "load") == 0) + if (weechat_strcmp (argv[1], "load") == 0) { /* load lua script */ path_script = plugin_script_search_path (weechat_lua_plugin, @@ -981,19 +981,19 @@ weechat_lua_command_cb (const void *pointer, void *data, if (path_script) free (path_script); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { /* reload one lua script */ weechat_lua_reload_name (ptr_name); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { /* unload lua script */ weechat_lua_unload_name (ptr_name); } lua_quiet = 0; } - else if (weechat_strcasecmp (argv[1], "eval") == 0) + else if (weechat_strcmp (argv[1], "eval") == 0) { send_to_buffer_as_input = 0; exec_commands = 0; @@ -1136,7 +1136,7 @@ weechat_lua_signal_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, LUA_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, LUA_PLUGIN_NAME) == 0)) { plugin_script_print_log (weechat_lua_plugin, lua_scripts); } diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c index fc97edece..c44315b1f 100644 --- a/src/plugins/perl/weechat-perl.c +++ b/src/plugins/perl/weechat-perl.c @@ -898,30 +898,30 @@ weechat_perl_command_cb (const void *pointer, void *data, } else if (argc == 2) { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_perl_plugin, perl_scripts, NULL, 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_perl_plugin, perl_scripts, NULL, 1); } - else if (weechat_strcasecmp (argv[1], "autoload") == 0) + else if (weechat_strcmp (argv[1], "autoload") == 0) { plugin_script_auto_load (weechat_perl_plugin, &weechat_perl_load_cb); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { weechat_perl_unload_all (); plugin_script_auto_load (weechat_perl_plugin, &weechat_perl_load_cb); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { weechat_perl_unload_all (); } - else if (weechat_strcasecmp (argv[1], "version") == 0) + else if (weechat_strcmp (argv[1], "version") == 0) { plugin_script_display_interpreter (weechat_perl_plugin, 0); } @@ -930,19 +930,19 @@ weechat_perl_command_cb (const void *pointer, void *data, } else { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_perl_plugin, perl_scripts, argv_eol[2], 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_perl_plugin, perl_scripts, argv_eol[2], 1); } - else if ((weechat_strcasecmp (argv[1], "load") == 0) - || (weechat_strcasecmp (argv[1], "reload") == 0) - || (weechat_strcasecmp (argv[1], "unload") == 0)) + else if ((weechat_strcmp (argv[1], "load") == 0) + || (weechat_strcmp (argv[1], "reload") == 0) + || (weechat_strcmp (argv[1], "unload") == 0)) { ptr_name = argv_eol[2]; if (strncmp (ptr_name, "-q ", 3) == 0) @@ -954,7 +954,7 @@ weechat_perl_command_cb (const void *pointer, void *data, ptr_name++; } } - if (weechat_strcasecmp (argv[1], "load") == 0) + if (weechat_strcmp (argv[1], "load") == 0) { /* load perl script */ path_script = plugin_script_search_path (weechat_perl_plugin, @@ -964,19 +964,19 @@ weechat_perl_command_cb (const void *pointer, void *data, if (path_script) free (path_script); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { /* reload one perl script */ weechat_perl_reload_name (ptr_name); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { /* unload perl script */ weechat_perl_unload_name (ptr_name); } perl_quiet = 0; } - else if (weechat_strcasecmp (argv[1], "eval") == 0) + else if (weechat_strcmp (argv[1], "eval") == 0) { send_to_buffer_as_input = 0; exec_commands = 0; @@ -1119,7 +1119,7 @@ weechat_perl_signal_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, PERL_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, PERL_PLUGIN_NAME) == 0)) { plugin_script_print_log (weechat_perl_plugin, perl_scripts); } diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c index 97b9723ef..8528a3e5f 100644 --- a/src/plugins/php/weechat-php.c +++ b/src/plugins/php/weechat-php.c @@ -916,30 +916,30 @@ weechat_php_command_cb (const void *pointer, void *data, } else if (argc == 2) { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_php_plugin, php_scripts, NULL, 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_php_plugin, php_scripts, NULL, 1); } - else if (weechat_strcasecmp (argv[1], "autoload") == 0) + else if (weechat_strcmp (argv[1], "autoload") == 0) { plugin_script_auto_load (weechat_php_plugin, &weechat_php_load_cb); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { weechat_php_unload_all (); plugin_script_auto_load (weechat_php_plugin, &weechat_php_load_cb); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { weechat_php_unload_all (); } - else if (weechat_strcasecmp (argv[1], "version") == 0) + else if (weechat_strcmp (argv[1], "version") == 0) { plugin_script_display_interpreter (weechat_php_plugin, 0); } @@ -948,19 +948,19 @@ weechat_php_command_cb (const void *pointer, void *data, } else { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_php_plugin, php_scripts, argv_eol[2], 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_php_plugin, php_scripts, argv_eol[2], 1); } - else if ((weechat_strcasecmp (argv[1], "load") == 0) - || (weechat_strcasecmp (argv[1], "reload") == 0) - || (weechat_strcasecmp (argv[1], "unload") == 0)) + else if ((weechat_strcmp (argv[1], "load") == 0) + || (weechat_strcmp (argv[1], "reload") == 0) + || (weechat_strcmp (argv[1], "unload") == 0)) { ptr_name = argv_eol[2]; if (strncmp (ptr_name, "-q ", 3) == 0) @@ -972,7 +972,7 @@ weechat_php_command_cb (const void *pointer, void *data, ptr_name++; } } - if (weechat_strcasecmp (argv[1], "load") == 0) + if (weechat_strcmp (argv[1], "load") == 0) { /* load PHP script */ path_script = plugin_script_search_path (weechat_php_plugin, @@ -982,19 +982,19 @@ weechat_php_command_cb (const void *pointer, void *data, if (path_script) free (path_script); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { /* reload one PHP script */ weechat_php_reload_name (ptr_name); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { /* unload PHP script */ weechat_php_unload_name (ptr_name); } php_quiet = 0; } - else if (weechat_strcasecmp (argv[1], "eval") == 0) + else if (weechat_strcmp (argv[1], "eval") == 0) { send_to_buffer_as_input = 0; exec_commands = 0; @@ -1139,7 +1139,7 @@ weechat_php_signal_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, PHP_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, PHP_PLUGIN_NAME) == 0)) { plugin_script_print_log (weechat_php_plugin, php_scripts); } diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c index b0cc081b9..bdba2a123 100644 --- a/src/plugins/python/weechat-python.c +++ b/src/plugins/python/weechat-python.c @@ -1141,30 +1141,30 @@ weechat_python_command_cb (const void *pointer, void *data, } else if (argc == 2) { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_python_plugin, python_scripts, NULL, 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_python_plugin, python_scripts, NULL, 1); } - else if (weechat_strcasecmp (argv[1], "autoload") == 0) + else if (weechat_strcmp (argv[1], "autoload") == 0) { plugin_script_auto_load (weechat_python_plugin, &weechat_python_load_cb); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { weechat_python_unload_all (); plugin_script_auto_load (weechat_python_plugin, &weechat_python_load_cb); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { weechat_python_unload_all (); } - else if (weechat_strcasecmp (argv[1], "version") == 0) + else if (weechat_strcmp (argv[1], "version") == 0) { plugin_script_display_interpreter (weechat_python_plugin, 0); } @@ -1173,19 +1173,19 @@ weechat_python_command_cb (const void *pointer, void *data, } else { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_python_plugin, python_scripts, argv_eol[2], 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_python_plugin, python_scripts, argv_eol[2], 1); } - else if ((weechat_strcasecmp (argv[1], "load") == 0) - || (weechat_strcasecmp (argv[1], "reload") == 0) - || (weechat_strcasecmp (argv[1], "unload") == 0)) + else if ((weechat_strcmp (argv[1], "load") == 0) + || (weechat_strcmp (argv[1], "reload") == 0) + || (weechat_strcmp (argv[1], "unload") == 0)) { ptr_name = argv_eol[2]; if (strncmp (ptr_name, "-q ", 3) == 0) @@ -1197,7 +1197,7 @@ weechat_python_command_cb (const void *pointer, void *data, ptr_name++; } } - if (weechat_strcasecmp (argv[1], "load") == 0) + if (weechat_strcmp (argv[1], "load") == 0) { /* load python script */ path_script = plugin_script_search_path (weechat_python_plugin, @@ -1207,19 +1207,19 @@ weechat_python_command_cb (const void *pointer, void *data, if (path_script) free (path_script); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { /* reload one python script */ weechat_python_reload_name (ptr_name); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { /* unload python script */ weechat_python_unload_name (ptr_name); } python_quiet = 0; } - else if (weechat_strcasecmp (argv[1], "eval") == 0) + else if (weechat_strcmp (argv[1], "eval") == 0) { send_to_buffer_as_input = 0; exec_commands = 0; @@ -1363,7 +1363,7 @@ weechat_python_signal_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, PYTHON_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, PYTHON_PLUGIN_NAME) == 0)) { plugin_script_print_log (weechat_python_plugin, python_scripts); } diff --git a/src/plugins/relay/relay-command.c b/src/plugins/relay/relay-command.c index 97a671b1d..f255a3066 100644 --- a/src/plugins/relay/relay-command.c +++ b/src/plugins/relay/relay-command.c @@ -204,25 +204,25 @@ relay_command_relay (const void *pointer, void *data, if (argc > 1) { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { relay_command_client_list (0); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "listfull") == 0) + if (weechat_strcmp (argv[1], "listfull") == 0) { relay_command_client_list (1); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "listrelay") == 0) + if (weechat_strcmp (argv[1], "listrelay") == 0) { relay_command_server_list (); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "add") == 0) + if (weechat_strcmp (argv[1], "add") == 0) { WEECHAT_COMMAND_MIN_ARGS(4, "add"); relay_server_get_protocol_args (argv[2], NULL, NULL, NULL, @@ -245,7 +245,7 @@ relay_command_relay (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "del") == 0) + if (weechat_strcmp (argv[1], "del") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "del"); ptr_server = relay_server_search (argv_eol[2]); @@ -279,7 +279,7 @@ relay_command_relay (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "stop") == 0) + if (weechat_strcmp (argv[1], "stop") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "stop"); ptr_server = relay_server_search (argv_eol[2]); @@ -298,7 +298,7 @@ relay_command_relay (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "start") == 0) + if (weechat_strcmp (argv[1], "start") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "start"); ptr_server = relay_server_search (argv_eol[2]); @@ -318,7 +318,7 @@ relay_command_relay (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "restart") == 0) + if (weechat_strcmp (argv[1], "restart") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "restart"); ptr_server = relay_server_search (argv_eol[2]); @@ -338,19 +338,19 @@ relay_command_relay (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "raw") == 0) + if (weechat_strcmp (argv[1], "raw") == 0) { relay_raw_open (1); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "sslcertkey") == 0) + if (weechat_strcmp (argv[1], "sslcertkey") == 0) { relay_network_set_ssl_cert_key (1); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "up") == 0) + if (weechat_strcmp (argv[1], "up") == 0) { if (relay_buffer && (relay_buffer_selected_line > 0)) { @@ -360,7 +360,7 @@ relay_command_relay (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "down") == 0) + if (weechat_strcmp (argv[1], "down") == 0) { if (relay_buffer && relay_buffer_selected_line < relay_client_count - 1) diff --git a/src/plugins/relay/relay.c b/src/plugins/relay/relay.c index 2553041ad..dd8932ae0 100644 --- a/src/plugins/relay/relay.c +++ b/src/plugins/relay/relay.c @@ -171,7 +171,7 @@ relay_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, RELAY_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, RELAY_PLUGIN_NAME) == 0)) { weechat_log_printf (""); weechat_log_printf ("***** \"%s\" plugin dump *****", diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c index 922c77d9f..3105fcfc7 100644 --- a/src/plugins/ruby/weechat-ruby.c +++ b/src/plugins/ruby/weechat-ruby.c @@ -952,30 +952,30 @@ weechat_ruby_command_cb (const void *pointer, void *data, } else if (argc == 2) { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_ruby_plugin, ruby_scripts, NULL, 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_ruby_plugin, ruby_scripts, NULL, 1); } - else if (weechat_strcasecmp (argv[1], "autoload") == 0) + else if (weechat_strcmp (argv[1], "autoload") == 0) { plugin_script_auto_load (weechat_ruby_plugin, &weechat_ruby_load_cb); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { weechat_ruby_unload_all (); plugin_script_auto_load (weechat_ruby_plugin, &weechat_ruby_load_cb); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { weechat_ruby_unload_all (); } - else if (weechat_strcasecmp (argv[1], "version") == 0) + else if (weechat_strcmp (argv[1], "version") == 0) { plugin_script_display_interpreter (weechat_ruby_plugin, 0); } @@ -984,19 +984,19 @@ weechat_ruby_command_cb (const void *pointer, void *data, } else { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_ruby_plugin, ruby_scripts, argv_eol[2], 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_ruby_plugin, ruby_scripts, argv_eol[2], 1); } - else if ((weechat_strcasecmp (argv[1], "load") == 0) - || (weechat_strcasecmp (argv[1], "reload") == 0) - || (weechat_strcasecmp (argv[1], "unload") == 0)) + else if ((weechat_strcmp (argv[1], "load") == 0) + || (weechat_strcmp (argv[1], "reload") == 0) + || (weechat_strcmp (argv[1], "unload") == 0)) { ptr_name = argv_eol[2]; if (strncmp (ptr_name, "-q ", 3) == 0) @@ -1008,7 +1008,7 @@ weechat_ruby_command_cb (const void *pointer, void *data, ptr_name++; } } - if (weechat_strcasecmp (argv[1], "load") == 0) + if (weechat_strcmp (argv[1], "load") == 0) { /* load ruby script */ path_script = plugin_script_search_path (weechat_ruby_plugin, @@ -1018,19 +1018,19 @@ weechat_ruby_command_cb (const void *pointer, void *data, if (path_script) free (path_script); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { /* reload one ruby script */ weechat_ruby_reload_name (ptr_name); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { /* unload ruby script */ weechat_ruby_unload_name (ptr_name); } ruby_quiet = 0; } - else if (weechat_strcasecmp (argv[1], "eval") == 0) + else if (weechat_strcmp (argv[1], "eval") == 0) { send_to_buffer_as_input = 0; exec_commands = 0; @@ -1173,7 +1173,7 @@ weechat_ruby_signal_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, RUBY_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, RUBY_PLUGIN_NAME) == 0)) { plugin_script_print_log (weechat_ruby_plugin, ruby_scripts); } diff --git a/src/plugins/script/script-action.c b/src/plugins/script/script-action.c index 28e349f9e..89994a1fe 100644 --- a/src/plugins/script/script-action.c +++ b/src/plugins/script/script-action.c @@ -1294,7 +1294,7 @@ script_action_run_all () &argc); if (argv && argv_eol) { - if (weechat_strcasecmp (argv[0], "buffer") == 0) + if (weechat_strcmp (argv[0], "buffer") == 0) { /* open buffer with list of scripts */ if (!script_buffer) @@ -1304,17 +1304,17 @@ script_action_run_all () } weechat_buffer_set (script_buffer, "display", "1"); } - else if (weechat_strcasecmp (argv[0], "list") == 0) + else if (weechat_strcmp (argv[0], "list") == 0) { if (argc > 1) { - if (weechat_strcasecmp (argv[1], "-i") == 0) + if (weechat_strcmp (argv[1], "-i") == 0) script_action_run_list_input (0, 0); - else if (weechat_strcasecmp (argv[1], "-il") == 0) + else if (weechat_strcmp (argv[1], "-il") == 0) script_action_run_list_input (0, 1); - else if (weechat_strcasecmp (argv[1], "-o") == 0) + else if (weechat_strcmp (argv[1], "-o") == 0) script_action_run_list_input (1, 0); - else if (weechat_strcasecmp (argv[1], "-ol") == 0) + else if (weechat_strcmp (argv[1], "-ol") == 0) script_action_run_list_input (1, 1); else script_action_run_list (); @@ -1322,49 +1322,49 @@ script_action_run_all () else script_action_run_list (); } - else if (weechat_strcasecmp (argv[0], "load") == 0) + else if (weechat_strcmp (argv[0], "load") == 0) { for (j = 1; j < argc; j++) { script_action_run_load (argv[j], quiet); } } - else if (weechat_strcasecmp (argv[0], "unload") == 0) + else if (weechat_strcmp (argv[0], "unload") == 0) { for (j = 1; j < argc; j++) { script_action_run_unload (argv[j], quiet); } } - else if (weechat_strcasecmp (argv[0], "reload") == 0) + else if (weechat_strcmp (argv[0], "reload") == 0) { for (j = 1; j < argc; j++) { script_action_run_reload (argv[j], quiet); } } - else if (weechat_strcasecmp (argv[0], "autoload") == 0) + else if (weechat_strcmp (argv[0], "autoload") == 0) { for (j = 1; j < argc; j++) { script_action_run_autoload (argv[j], quiet, 1); } } - else if (weechat_strcasecmp (argv[0], "noautoload") == 0) + else if (weechat_strcmp (argv[0], "noautoload") == 0) { for (j = 1; j < argc; j++) { script_action_run_autoload (argv[j], quiet, 0); } } - else if (weechat_strcasecmp (argv[0], "toggleautoload") == 0) + else if (weechat_strcmp (argv[0], "toggleautoload") == 0) { for (j = 1; j < argc; j++) { script_action_run_autoload (argv[j], quiet, -1); } } - else if (weechat_strcasecmp (argv[0], "install") == 0) + else if (weechat_strcmp (argv[0], "install") == 0) { script_found = 0; for (j = 1; j < argc; j++) @@ -1402,14 +1402,14 @@ script_action_run_all () if (script_found) script_action_run_install (quiet); } - else if (weechat_strcasecmp (argv[0], "remove") == 0) + else if (weechat_strcmp (argv[0], "remove") == 0) { for (j = 1; j < argc; j++) { script_action_run_remove (argv[j], quiet); } } - else if (weechat_strcasecmp (argv[0], "installremove") == 0) + else if (weechat_strcmp (argv[0], "installremove") == 0) { script_found = 0; for (j = 1; j < argc; j++) @@ -1443,7 +1443,7 @@ script_action_run_all () if (script_found) script_action_run_install (quiet); } - else if (weechat_strcasecmp (argv[0], "hold") == 0) + else if (weechat_strcmp (argv[0], "hold") == 0) { script_found = 0; for (j = 1; j < argc; j++) @@ -1454,7 +1454,7 @@ script_action_run_all () if (script_found) script_buffer_refresh (0); } - else if (weechat_strcasecmp (argv[0], "show") == 0) + else if (weechat_strcmp (argv[0], "show") == 0) { if (!script_buffer) script_buffer_open (); @@ -1462,11 +1462,11 @@ script_action_run_all () quiet); weechat_buffer_set (script_buffer, "display", "1"); } - else if (weechat_strcasecmp (argv[0], "showdiff") == 0) + else if (weechat_strcmp (argv[0], "showdiff") == 0) { script_action_run_showdiff (); } - else if (weechat_strcasecmp (argv[0], "upgrade") == 0) + else if (weechat_strcmp (argv[0], "upgrade") == 0) { script_found = 0; for (ptr_script = scripts_repo; ptr_script; diff --git a/src/plugins/script/script-command.c b/src/plugins/script/script-command.c index c943514e4..98aad22f4 100644 --- a/src/plugins/script/script-command.c +++ b/src/plugins/script/script-command.c @@ -91,8 +91,8 @@ script_command_action (struct t_gui_buffer *buffer, { /* action on current line of script buffer */ if (script_buffer_detail_script - && ((weechat_strcasecmp (action, "show") == 0) - || (weechat_strcasecmp (action, "showdiff") == 0))) + && ((weechat_strcmp (action, "show") == 0) + || (weechat_strcmp (action, "showdiff") == 0))) { /* if detail on script is displayed, back to list */ snprintf (str_action, sizeof (str_action), @@ -144,7 +144,7 @@ script_command_script (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "go") == 0) + if (weechat_strcmp (argv[1], "go") == 0) { if ((argc > 2) && script_buffer && !script_buffer_detail_script) { @@ -158,7 +158,7 @@ script_command_script (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "search") == 0) + if (weechat_strcmp (argv[1], "search") == 0) { if (scripts_repo) script_repo_filter_scripts ((argc > 2) ? argv_eol[2] : NULL); @@ -168,18 +168,18 @@ script_command_script (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { script_action_schedule (argv_eol[1], 1, 0, 0); return WEECHAT_RC_OK; } - if ((weechat_strcasecmp (argv[1], "load") == 0) - || (weechat_strcasecmp (argv[1], "unload") == 0) - || (weechat_strcasecmp (argv[1], "reload") == 0) - || (weechat_strcasecmp (argv[1], "autoload") == 0) - || (weechat_strcasecmp (argv[1], "noautoload") == 0) - || (weechat_strcasecmp (argv[1], "toggleautoload") == 0)) + if ((weechat_strcmp (argv[1], "load") == 0) + || (weechat_strcmp (argv[1], "unload") == 0) + || (weechat_strcmp (argv[1], "reload") == 0) + || (weechat_strcmp (argv[1], "autoload") == 0) + || (weechat_strcmp (argv[1], "noautoload") == 0) + || (weechat_strcmp (argv[1], "toggleautoload") == 0)) { script_command_action (buffer, argv[1], @@ -189,12 +189,12 @@ script_command_script (const void *pointer, void *data, return WEECHAT_RC_OK; } - if ((weechat_strcasecmp (argv[1], "install") == 0) - || (weechat_strcasecmp (argv[1], "remove") == 0) - || (weechat_strcasecmp (argv[1], "installremove") == 0) - || (weechat_strcasecmp (argv[1], "hold") == 0) - || (weechat_strcasecmp (argv[1], "show") == 0) - || (weechat_strcasecmp (argv[1], "showdiff") == 0)) + if ((weechat_strcmp (argv[1], "install") == 0) + || (weechat_strcmp (argv[1], "remove") == 0) + || (weechat_strcmp (argv[1], "installremove") == 0) + || (weechat_strcmp (argv[1], "hold") == 0) + || (weechat_strcmp (argv[1], "show") == 0) + || (weechat_strcmp (argv[1], "showdiff") == 0)) { script_command_action (buffer, argv[1], @@ -204,19 +204,19 @@ script_command_script (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "upgrade") == 0) + if (weechat_strcmp (argv[1], "upgrade") == 0) { script_action_schedule ("upgrade", 1, 1, 0); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "update") == 0) + if (weechat_strcmp (argv[1], "update") == 0) { script_repo_file_update (0); return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "up") == 0) + if (weechat_strcmp (argv[1], "up") == 0) { if (script_buffer) { @@ -250,7 +250,7 @@ script_command_script (const void *pointer, void *data, return WEECHAT_RC_OK; } - if (weechat_strcasecmp (argv[1], "down") == 0) + if (weechat_strcmp (argv[1], "down") == 0) { if (script_buffer) { diff --git a/src/plugins/script/script.c b/src/plugins/script/script.c index 95a946f10..16481c0d4 100644 --- a/src/plugins/script/script.c +++ b/src/plugins/script/script.c @@ -244,7 +244,7 @@ script_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, SCRIPT_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, SCRIPT_PLUGIN_NAME) == 0)) { weechat_log_printf (""); weechat_log_printf ("***** \"%s\" plugin dump *****", diff --git a/src/plugins/spell/spell-command.c b/src/plugins/spell/spell-command.c index 51212ca26..c2f38980a 100644 --- a/src/plugins/spell/spell-command.c +++ b/src/plugins/spell/spell-command.c @@ -392,7 +392,7 @@ spell_command_cb (const void *pointer, void *data, } /* enable spell */ - if (weechat_strcasecmp (argv[1], "enable") == 0) + if (weechat_strcmp (argv[1], "enable") == 0) { weechat_config_option_set (spell_config_check_enabled, "1", 1); weechat_printf (NULL, _("Spell checker enabled")); @@ -400,7 +400,7 @@ spell_command_cb (const void *pointer, void *data, } /* disable spell */ - if (weechat_strcasecmp (argv[1], "disable") == 0) + if (weechat_strcmp (argv[1], "disable") == 0) { weechat_config_option_set (spell_config_check_enabled, "0", 1); weechat_printf (NULL, _("Spell checker disabled")); @@ -408,7 +408,7 @@ spell_command_cb (const void *pointer, void *data, } /* toggle spell */ - if (weechat_strcasecmp (argv[1], "toggle") == 0) + if (weechat_strcmp (argv[1], "toggle") == 0) { if (spell_enabled) { @@ -424,14 +424,14 @@ spell_command_cb (const void *pointer, void *data, } /* list of dictionaries */ - if (weechat_strcasecmp (argv[1], "listdict") == 0) + if (weechat_strcmp (argv[1], "listdict") == 0) { spell_command_speller_list_dicts (); return WEECHAT_RC_OK; } /* set dictionary for current buffer */ - if (weechat_strcasecmp (argv[1], "setdict") == 0) + if (weechat_strcmp (argv[1], "setdict") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "setdict"); dicts = weechat_string_replace (argv_eol[2], " ", ""); @@ -443,14 +443,14 @@ spell_command_cb (const void *pointer, void *data, } /* delete dictionary used on current buffer */ - if (weechat_strcasecmp (argv[1], "deldict") == 0) + if (weechat_strcmp (argv[1], "deldict") == 0) { spell_command_set_dict (buffer, NULL); return WEECHAT_RC_OK; } /* add word to personal dictionary */ - if (weechat_strcasecmp (argv[1], "addword") == 0) + if (weechat_strcmp (argv[1], "addword") == 0) { WEECHAT_COMMAND_MIN_ARGS(3, "addword"); if (argc > 3) diff --git a/src/plugins/spell/spell.c b/src/plugins/spell/spell.c index c1e02c6a0..88fd1e04d 100644 --- a/src/plugins/spell/spell.c +++ b/src/plugins/spell/spell.c @@ -351,8 +351,7 @@ spell_command_authorized (const char *command) for (i = 0; i < spell_count_commands_to_check; i++) { if ((spell_length_commands_to_check[i] == length_command) - && (weechat_strcasecmp (command, - spell_commands_to_check[i]) == 0)) + && (weechat_strcmp (command, spell_commands_to_check[i]) == 0)) { /* command is authorized */ return 1; diff --git a/src/plugins/tcl/weechat-tcl.c b/src/plugins/tcl/weechat-tcl.c index e1b3783ba..637bf0502 100644 --- a/src/plugins/tcl/weechat-tcl.c +++ b/src/plugins/tcl/weechat-tcl.c @@ -598,30 +598,30 @@ weechat_tcl_command_cb (const void *pointer, void *data, } else if (argc == 2) { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_tcl_plugin, tcl_scripts, NULL, 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_tcl_plugin, tcl_scripts, NULL, 1); } - else if (weechat_strcasecmp (argv[1], "autoload") == 0) + else if (weechat_strcmp (argv[1], "autoload") == 0) { plugin_script_auto_load (weechat_tcl_plugin, &weechat_tcl_load_cb); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { weechat_tcl_unload_all (); plugin_script_auto_load (weechat_tcl_plugin, &weechat_tcl_load_cb); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { weechat_tcl_unload_all (); } - else if (weechat_strcasecmp (argv[1], "version") == 0) + else if (weechat_strcmp (argv[1], "version") == 0) { plugin_script_display_interpreter (weechat_tcl_plugin, 0); } @@ -630,19 +630,19 @@ weechat_tcl_command_cb (const void *pointer, void *data, } else { - if (weechat_strcasecmp (argv[1], "list") == 0) + if (weechat_strcmp (argv[1], "list") == 0) { plugin_script_display_list (weechat_tcl_plugin, tcl_scripts, argv_eol[2], 0); } - else if (weechat_strcasecmp (argv[1], "listfull") == 0) + else if (weechat_strcmp (argv[1], "listfull") == 0) { plugin_script_display_list (weechat_tcl_plugin, tcl_scripts, argv_eol[2], 1); } - else if ((weechat_strcasecmp (argv[1], "load") == 0) - || (weechat_strcasecmp (argv[1], "reload") == 0) - || (weechat_strcasecmp (argv[1], "unload") == 0)) + else if ((weechat_strcmp (argv[1], "load") == 0) + || (weechat_strcmp (argv[1], "reload") == 0) + || (weechat_strcmp (argv[1], "unload") == 0)) { ptr_name = argv_eol[2]; if (strncmp (ptr_name, "-q ", 3) == 0) @@ -654,7 +654,7 @@ weechat_tcl_command_cb (const void *pointer, void *data, ptr_name++; } } - if (weechat_strcasecmp (argv[1], "load") == 0) + if (weechat_strcmp (argv[1], "load") == 0) { /* load tcl script */ path_script = plugin_script_search_path (weechat_tcl_plugin, @@ -664,19 +664,19 @@ weechat_tcl_command_cb (const void *pointer, void *data, if (path_script) free (path_script); } - else if (weechat_strcasecmp (argv[1], "reload") == 0) + else if (weechat_strcmp (argv[1], "reload") == 0) { /* reload one tcl script */ weechat_tcl_reload_name (ptr_name); } - else if (weechat_strcasecmp (argv[1], "unload") == 0) + else if (weechat_strcmp (argv[1], "unload") == 0) { /* unload tcl script */ weechat_tcl_unload_name (ptr_name); } tcl_quiet = 0; } - else if (weechat_strcasecmp (argv[1], "eval") == 0) + else if (weechat_strcmp (argv[1], "eval") == 0) { send_to_buffer_as_input = 0; exec_commands = 0; @@ -821,7 +821,7 @@ weechat_tcl_signal_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, TCL_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, TCL_PLUGIN_NAME) == 0)) { plugin_script_print_log (weechat_tcl_plugin, tcl_scripts); } diff --git a/src/plugins/trigger/trigger-command.c b/src/plugins/trigger/trigger-command.c index 9db93adff..9ca8b50d1 100644 --- a/src/plugins/trigger/trigger-command.c +++ b/src/plugins/trigger/trigger-command.c @@ -527,30 +527,30 @@ trigger_command_trigger (const void *pointer, void *data, /* list all triggers */ if ((argc == 1) - || ((argc == 2) && (weechat_strcasecmp (argv[1], "list") == 0))) + || ((argc == 2) && (weechat_strcmp (argv[1], "list") == 0))) { trigger_command_list (_("List of triggers:"), 0); goto end; } /* full list of all triggers */ - if ((argc == 2) && (weechat_strcasecmp (argv[1], "listfull") == 0)) + if ((argc == 2) && (weechat_strcmp (argv[1], "listfull") == 0)) { trigger_command_list (_("List of triggers:"), 1); goto end; } /* list of default triggers */ - if ((argc == 2) && (weechat_strcasecmp (argv[1], "listdefault") == 0)) + if ((argc == 2) && (weechat_strcmp (argv[1], "listdefault") == 0)) { trigger_command_list_default (1); goto end; } /* add a trigger */ - if ((weechat_strcasecmp (argv[1], "add") == 0) - || (weechat_strcasecmp (argv[1], "addoff") == 0) - || (weechat_strcasecmp (argv[1], "addreplace") == 0)) + if ((weechat_strcmp (argv[1], "add") == 0) + || (weechat_strcmp (argv[1], "addoff") == 0) + || (weechat_strcmp (argv[1], "addreplace") == 0)) { sargv = weechat_string_split_shell (argv_eol[2], &sargc); if (!sargv || (sargc < 2)) @@ -636,7 +636,7 @@ trigger_command_trigger (const void *pointer, void *data, ptr_trigger = trigger_search (sargv[0]); if (ptr_trigger) { - if (weechat_strcasecmp (argv[1], "addreplace") == 0) + if (weechat_strcmp (argv[1], "addreplace") == 0) { if (ptr_trigger) { @@ -672,7 +672,7 @@ trigger_command_trigger (const void *pointer, void *data, } ptr_trigger = trigger_new ( sargv[0], /* name */ - (weechat_strcasecmp (argv[1], "addoff") == 0) ? "off" : "on", + (weechat_strcmp (argv[1], "addoff") == 0) ? "off" : "on", sargv[1], /* hook */ (sargc > 2) ? sargv[2] : "", /* arguments */ (sargc > 3) ? sargv[3] : "", /* conditions */ @@ -698,7 +698,7 @@ trigger_command_trigger (const void *pointer, void *data, } /* add trigger command in input (to help trigger creation) */ - if (weechat_strcasecmp (argv[1], "addinput") == 0) + if (weechat_strcmp (argv[1], "addinput") == 0) { type = TRIGGER_HOOK_SIGNAL; if (argc >= 3) @@ -748,9 +748,9 @@ trigger_command_trigger (const void *pointer, void *data, * - output: send the command to the buffer * - recreate: same as input, but the trigger is first deleted */ - if ((weechat_strcasecmp (argv[1], "input") == 0) - || (weechat_strcasecmp (argv[1], "output") == 0) - || (weechat_strcasecmp (argv[1], "recreate") == 0)) + if ((weechat_strcmp (argv[1], "input") == 0) + || (weechat_strcmp (argv[1], "output") == 0) + || (weechat_strcmp (argv[1], "recreate") == 0)) { if (argc < 3) goto error; @@ -780,7 +780,7 @@ trigger_command_trigger (const void *pointer, void *data, weechat_config_string (ptr_trigger->options[TRIGGER_OPTION_POST_ACTION])); input = trigger_command_build_string ( "//trigger %s %s %s \"%s\" \"%s\" \"%s\" \"%s\" \"%s\" \"%s\"", - (weechat_strcasecmp (argv[1], "recreate") == 0) ? "addreplace" : "add", + (weechat_strcmp (argv[1], "recreate") == 0) ? "addreplace" : "add", ptr_trigger->name, weechat_config_string (ptr_trigger->options[TRIGGER_OPTION_HOOK]), arg_arguments, @@ -803,7 +803,7 @@ trigger_command_trigger (const void *pointer, void *data, free (arg_post_action); if (input) { - if (weechat_strcasecmp (argv[1], "output") == 0) + if (weechat_strcmp (argv[1], "output") == 0) { weechat_command (buffer, input); } @@ -820,7 +820,7 @@ trigger_command_trigger (const void *pointer, void *data, } /* set option in a trigger */ - if (weechat_strcasecmp (argv[1], "set") == 0) + if (weechat_strcmp (argv[1], "set") == 0) { if (argc < 5) goto error; @@ -839,7 +839,7 @@ trigger_command_trigger (const void *pointer, void *data, trigger_command_error_running (ptr_trigger, argv[1]); goto end; } - if (weechat_strcasecmp (argv[3], "name") == 0) + if (weechat_strcmp (argv[3], "name") == 0) { trigger_command_rename (ptr_trigger, argv[4]); goto end; @@ -870,7 +870,7 @@ trigger_command_trigger (const void *pointer, void *data, } /* rename a trigger */ - if (weechat_strcasecmp (argv[1], "rename") == 0) + if (weechat_strcmp (argv[1], "rename") == 0) { if (argc < 4) goto error; @@ -894,7 +894,7 @@ trigger_command_trigger (const void *pointer, void *data, } /* copy a trigger */ - if (weechat_strcasecmp (argv[1], "copy") == 0) + if (weechat_strcmp (argv[1], "copy") == 0) { if (argc < 4) goto error; @@ -950,20 +950,20 @@ trigger_command_trigger (const void *pointer, void *data, } /* enable/disable/toggle/restart trigger(s) */ - if ((weechat_strcasecmp (argv[1], "enable") == 0) - || (weechat_strcasecmp (argv[1], "disable") == 0) - || (weechat_strcasecmp (argv[1], "toggle") == 0) - || (weechat_strcasecmp (argv[1], "restart") == 0)) + if ((weechat_strcmp (argv[1], "enable") == 0) + || (weechat_strcmp (argv[1], "disable") == 0) + || (weechat_strcmp (argv[1], "toggle") == 0) + || (weechat_strcmp (argv[1], "restart") == 0)) { if (argc < 3) { - if (weechat_strcasecmp (argv[1], "restart") == 0) + if (weechat_strcmp (argv[1], "restart") == 0) goto error; - if (weechat_strcasecmp (argv[1], "enable") == 0) + if (weechat_strcmp (argv[1], "enable") == 0) weechat_config_option_set (trigger_config_look_enabled, "1", 1); - else if (weechat_strcasecmp (argv[1], "disable") == 0) + else if (weechat_strcmp (argv[1], "disable") == 0) weechat_config_option_set (trigger_config_look_enabled, "0", 1); - else if (weechat_strcasecmp (argv[1], "toggle") == 0) + else if (weechat_strcmp (argv[1], "toggle") == 0) { weechat_config_option_set (trigger_config_look_enabled, (trigger_enabled) ? "0" : "1", @@ -973,13 +973,13 @@ trigger_command_trigger (const void *pointer, void *data, goto end; } enable = -1; - if (weechat_strcasecmp (argv[1], "enable") == 0) + if (weechat_strcmp (argv[1], "enable") == 0) enable = 1; - else if (weechat_strcasecmp (argv[1], "disable") == 0) + else if (weechat_strcmp (argv[1], "disable") == 0) enable = 0; - else if (weechat_strcasecmp (argv[1], "restart") == 0) + else if (weechat_strcmp (argv[1], "restart") == 0) enable = 2; - if (weechat_strcasecmp (argv[2], "-all") == 0) + if (weechat_strcmp (argv[2], "-all") == 0) { for (ptr_trigger = triggers; ptr_trigger; ptr_trigger = ptr_trigger->next_trigger) @@ -1008,11 +1008,11 @@ trigger_command_trigger (const void *pointer, void *data, } /* delete trigger(s) */ - if (weechat_strcasecmp (argv[1], "del") == 0) + if (weechat_strcmp (argv[1], "del") == 0) { if (argc < 3) goto error; - if (weechat_strcasecmp (argv[2], "-all") == 0) + if (weechat_strcmp (argv[2], "-all") == 0) { count = triggers_count; ptr_trigger = triggers; @@ -1066,7 +1066,7 @@ trigger_command_trigger (const void *pointer, void *data, } /* show detailed info on a trigger */ - if (weechat_strcasecmp (argv[1], "show") == 0) + if (weechat_strcmp (argv[1], "show") == 0) { if (argc < 3) goto error; @@ -1087,7 +1087,7 @@ trigger_command_trigger (const void *pointer, void *data, } /* restore default trigger(s) */ - if (weechat_strcasecmp (argv[1], "restore") == 0) + if (weechat_strcmp (argv[1], "restore") == 0) { if (argc < 3) goto error; @@ -1139,9 +1139,9 @@ trigger_command_trigger (const void *pointer, void *data, } /* delete all triggers and restore default ones */ - if (weechat_strcasecmp (argv[1], "default") == 0) + if (weechat_strcmp (argv[1], "default") == 0) { - if ((argc >= 3) && (weechat_strcasecmp (argv[2], "-yes") == 0)) + if ((argc >= 3) && (weechat_strcmp (argv[2], "-yes") == 0)) { ptr_trigger = triggers; while (ptr_trigger) @@ -1174,7 +1174,7 @@ trigger_command_trigger (const void *pointer, void *data, } /* open the trigger monitor buffer */ - if (weechat_strcasecmp (argv[1], "monitor") == 0) + if (weechat_strcmp (argv[1], "monitor") == 0) { trigger_buffer_open ((argc > 2) ? argv_eol[2] : NULL, 1); goto end; diff --git a/src/plugins/trigger/trigger.c b/src/plugins/trigger/trigger.c index d5d998d2d..220d9fc45 100644 --- a/src/plugins/trigger/trigger.c +++ b/src/plugins/trigger/trigger.c @@ -1354,7 +1354,7 @@ trigger_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, TRIGGER_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, TRIGGER_PLUGIN_NAME) == 0)) { weechat_log_printf (""); weechat_log_printf ("***** \"%s\" plugin dump *****", diff --git a/src/plugins/xfer/xfer-command.c b/src/plugins/xfer/xfer-command.c index 493b35103..a94f38b64 100644 --- a/src/plugins/xfer/xfer-command.c +++ b/src/plugins/xfer/xfer-command.c @@ -207,13 +207,13 @@ xfer_command_xfer (const void *pointer, void *data, (void) buffer; (void) argv_eol; - if ((argc > 1) && (weechat_strcasecmp (argv[1], "list") == 0)) + if ((argc > 1) && (weechat_strcmp (argv[1], "list") == 0)) { xfer_command_xfer_list (0); return WEECHAT_RC_OK; } - if ((argc > 1) && (weechat_strcasecmp (argv[1], "listfull") == 0)) + if ((argc > 1) && (weechat_strcmp (argv[1], "listfull") == 0)) { xfer_command_xfer_list (1); return WEECHAT_RC_OK; diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index 4908a6df8..6b081d114 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -1754,7 +1754,7 @@ xfer_debug_dump_cb (const void *pointer, void *data, (void) type_data; if (!signal_data - || (weechat_strcasecmp ((char *)signal_data, XFER_PLUGIN_NAME) == 0)) + || (weechat_strcmp ((char *)signal_data, XFER_PLUGIN_NAME) == 0)) { weechat_log_printf (""); weechat_log_printf ("***** \"%s\" plugin dump *****", |