diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2018-01-07 09:11:45 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2018-01-07 09:11:45 +0100 |
commit | 7ee88fb46c512c125191d6447ff1348dfc3254f3 (patch) | |
tree | 708d6960a34134455ceafe5f737d2d99ed344f5f | |
parent | 91f792416bd40c8e47d7f035e15f49732be368ce (diff) | |
download | weechat-7ee88fb46c512c125191d6447ff1348dfc3254f3.zip |
core: fix some styles
58 files changed, 295 insertions, 294 deletions
diff --git a/src/core/wee-arraylist.c b/src/core/wee-arraylist.c index a251f731a..729774892 100644 --- a/src/core/wee-arraylist.c +++ b/src/core/wee-arraylist.c @@ -646,8 +646,8 @@ arraylist_clear (struct t_arraylist *arraylist) arraylist->size_alloc = 0; if (arraylist->size_alloc_min > 0) { - arraylist->data = calloc(arraylist->size_alloc_min, - sizeof (*arraylist->data)); + arraylist->data = calloc (arraylist->size_alloc_min, + sizeof (*arraylist->data)); if (!arraylist->data) return 0; arraylist->size_alloc = arraylist->size_alloc_min; diff --git a/src/core/wee-command.c b/src/core/wee-command.c index 1f38a1051..2a0cdd77e 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -999,7 +999,7 @@ COMMAND_CALLBACK(buffer) /* close buffer */ if (string_strcasecmp (argv[1], "close") == 0) { - weechat_buffer = gui_buffer_search_main(); + weechat_buffer = gui_buffer_search_main (); if (argc < 3) { @@ -5599,7 +5599,7 @@ command_set_display_option_list (const char *message, const char *search, * if we are displaying only changed options, skip options plugins.* * because they are all "changed" (default value is always empty string) */ - if (display_only_changed && strcmp(ptr_config->name, "plugins") == 0) + if (display_only_changed && (strcmp (ptr_config->name, "plugins") == 0)) continue; for (ptr_section = ptr_config->sections; ptr_section; ptr_section = ptr_section->next_section) @@ -6266,7 +6266,7 @@ COMMAND_CALLBACK(uptime) if ((argc >= 2) && (string_strcasecmp (argv[1], "-o") == 0)) { - snprintf (str_first_start, sizeof(str_first_start), + snprintf (str_first_start, sizeof (str_first_start), "%s", ctime (&weechat_first_start_time)); if (str_first_start[0]) str_first_start[strlen (str_first_start) - 1] = '\0'; @@ -6342,20 +6342,20 @@ command_version_display (struct t_gui_buffer *buffer, if (send_to_buffer_as_input && !translated_string) { - snprintf (str_first_start, sizeof(str_first_start), + snprintf (str_first_start, sizeof (str_first_start), "%s", ctime (&weechat_first_start_time)); if (str_first_start[0]) str_first_start[strlen (str_first_start) - 1] = '\0'; - snprintf (str_last_start, sizeof(str_last_start), + snprintf (str_last_start, sizeof (str_last_start), "%s", ctime (&weechat_last_start_time)); if (str_last_start[0]) str_last_start[strlen (str_last_start) - 1] = '\0'; } else { - snprintf (str_first_start, sizeof(str_first_start), + snprintf (str_first_start, sizeof (str_first_start), "%s", util_get_time_string (&weechat_first_start_time)); - snprintf (str_last_start, sizeof(str_last_start), + snprintf (str_last_start, sizeof (str_last_start), "%s", util_get_time_string (&weechat_last_start_time)); } } @@ -8291,9 +8291,9 @@ command_startup (int plugins_loaded) { if (plugins_loaded) { - command_exec_list(CONFIG_STRING(config_startup_command_after_plugins)); - command_exec_list(weechat_startup_commands); + command_exec_list (CONFIG_STRING(config_startup_command_after_plugins)); + command_exec_list (weechat_startup_commands); } else - command_exec_list(CONFIG_STRING(config_startup_command_before_plugins)); + command_exec_list (CONFIG_STRING(config_startup_command_before_plugins)); } diff --git a/src/core/wee-completion.c b/src/core/wee-completion.c index 448ec2134..ec2da787f 100644 --- a/src/core/wee-completion.c +++ b/src/core/wee-completion.c @@ -616,7 +616,7 @@ completion_list_add_commands_cb (const void *pointer, void *data, { if (pos) { - snprintf (str_command, sizeof(str_command), + snprintf (str_command, sizeof (str_command), "%s%s", pos, HOOK_COMMAND(ptr_hook, command)); @@ -1000,7 +1000,7 @@ completion_list_add_plugins_commands_cb (const void *pointer, void *data, { if (pos) { - snprintf (str_command, sizeof(str_command), + snprintf (str_command, sizeof (str_command), "%s%s", pos, HOOK_COMMAND(ptr_hook, command)); @@ -1017,7 +1017,7 @@ completion_list_add_plugins_commands_cb (const void *pointer, void *data, } } - string_free_split(argv); + string_free_split (argv); return WEECHAT_RC_OK; } @@ -1281,7 +1281,7 @@ completion_list_add_weechat_commands_cb (const void *pointer, void *data, { if (pos) { - snprintf (str_command, sizeof(str_command), + snprintf (str_command, sizeof (str_command), "%s%s", pos, HOOK_COMMAND(ptr_hook, command)); diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index f372cf5f4..56e949688 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -1947,7 +1947,7 @@ int config_file_option_has_changed (struct t_config_option *option) case CONFIG_OPTION_TYPE_INTEGER: return CONFIG_INTEGER(option) != CONFIG_INTEGER_DEFAULT(option); case CONFIG_OPTION_TYPE_STRING: - return strcmp(CONFIG_STRING(option), CONFIG_STRING_DEFAULT(option)) != 0; + return strcmp (CONFIG_STRING(option), CONFIG_STRING_DEFAULT(option)) != 0; case CONFIG_OPTION_TYPE_COLOR: return CONFIG_COLOR(option) != CONFIG_COLOR_DEFAULT(option); case CONFIG_NUM_OPTION_TYPES: @@ -2668,7 +2668,7 @@ config_file_read_internal (struct t_config_file *config_file, int reload) { undefined_value = 0; /* remove simple or double quotes and spaces at the end */ - if (strlen(pos) > 1) + if (strlen (pos) > 1) { pos2 = pos + strlen (pos) - 1; while ((pos2 > pos) && (pos2[0] == ' ')) @@ -3203,11 +3203,11 @@ config_file_hdata_config_option_cb (const void *pointer, void *data, */ int -config_file_add_option_to_infolist(struct t_infolist *infolist, - struct t_config_file *config_file, - struct t_config_section *section, - struct t_config_option *option, - const char *option_name) +config_file_add_option_to_infolist (struct t_infolist *infolist, + struct t_config_file *config_file, + struct t_config_section *section, + struct t_config_option *option, + const char *option_name) { char *option_full_name, *value, *string_values; struct t_config_option *ptr_parent_option; diff --git a/src/core/wee-hdata.c b/src/core/wee-hdata.c index a26a9414d..cfb326c8c 100644 --- a/src/core/wee-hdata.c +++ b/src/core/wee-hdata.c @@ -557,7 +557,7 @@ hdata_move (struct t_hdata *hdata, void *pointer, int count) return NULL; ptr_var = (count < 0) ? hdata->var_prev : hdata->var_next; - abs_count = abs(count); + abs_count = abs (count); for (i = 0; i < abs_count; i++) { diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 237c73c4b..530bf8794 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -1062,9 +1062,9 @@ hook_timer_init (struct t_hook *hook) gettimeofday (&HOOK_TIMER(hook, last_exec), NULL); time_now = time (NULL); - local_time = localtime(&time_now); + local_time = localtime (&time_now); local_hour = local_time->tm_hour; - gm_time = gmtime(&time_now); + gm_time = gmtime (&time_now); gm_hour = gm_time->tm_hour; if ((local_time->tm_year > gm_time->tm_year) || (local_time->tm_mon > gm_time->tm_mon) @@ -3680,7 +3680,7 @@ hook_set (struct t_hook *hook, const char *property, const char *value) if (string_strcasecmp (property, "subplugin") == 0) { if (hook->subplugin) - free(hook->subplugin); + free (hook->subplugin); hook->subplugin = strdup (value); } else if (string_strcasecmp (property, "stdin") == 0) diff --git a/src/core/wee-log.c b/src/core/wee-log.c index 55ba784b7..051439051 100644 --- a/src/core/wee-log.c +++ b/src/core/wee-log.c @@ -273,7 +273,7 @@ log_crash_rename () local_time->tm_year + 1900, local_time->tm_mon + 1, local_time->tm_mday, - getpid()); + getpid ()); if (rename (old_name, new_name) == 0) { string_fprintf (stderr, "*** Full crash dump was saved to %s file.\n", diff --git a/src/core/wee-network.c b/src/core/wee-network.c index 599f9e034..d5494f1d2 100644 --- a/src/core/wee-network.c +++ b/src/core/wee-network.c @@ -160,7 +160,7 @@ network_end () if (!weechat_no_gnutls) { gnutls_certificate_free_credentials (gnutls_xcred); - gnutls_global_deinit(); + gnutls_global_deinit (); } #endif /* HAVE_GNUTLS */ network_init_gnutls_ok = 0; @@ -321,7 +321,7 @@ network_resolve (const char *hostname, char *ip, int *version) if (!res) return 0; - if (getnameinfo (res->ai_addr, res->ai_addrlen, ipbuffer, sizeof(ipbuffer), + if (getnameinfo (res->ai_addr, res->ai_addrlen, ipbuffer, sizeof (ipbuffer), NULL, 0, NI_NUMERICHOST) != 0) { freeaddrinfo (res); @@ -494,9 +494,9 @@ network_pass_socks5proxy (struct t_proxy *proxy, int sock, const char *address, } /* authentication successful then giving address/port to connect */ - addr_len = strlen(address); + addr_len = strlen (address); addr_buffer_len = 4 + 1 + addr_len + 2; - addr_buffer = malloc (addr_buffer_len * sizeof(*addr_buffer)); + addr_buffer = malloc (addr_buffer_len * sizeof (*addr_buffer)); if (!addr_buffer) return 0; addr_buffer[0] = 5; /* version 5 */ @@ -984,7 +984,7 @@ network_connect_child (struct t_hook *hook_connect) if (tmp_num_groups >= retry) { /* shuffle while adding */ - rand_num = tmp_host + (rand() % ((i + 1) - tmp_host)); + rand_num = tmp_host + (rand () % ((i + 1) - tmp_host)); if (rand_num == i) res_reorder[i++] = ptr_res; else @@ -1015,7 +1015,7 @@ network_connect_child (struct t_hook *hook_connect) if (tmp_num_groups < retry) { /* shuffle while adding */ - rand_num = tmp_host + (rand() % ((i + 1) - tmp_host)); + rand_num = tmp_host + (rand () % ((i + 1) - tmp_host)); if (rand_num == i) res_reorder[i++] = ptr_res; else @@ -1208,7 +1208,7 @@ network_connect_child (struct t_hook *hook_connect) cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; cmsg->cmsg_len = CMSG_LEN(sizeof (sock)); - memcpy(CMSG_DATA(cmsg), &sock, sizeof (sock)); + memcpy (CMSG_DATA(cmsg), &sock, sizeof (sock)); msg.msg_controllen = cmsg->cmsg_len; num_written = sendmsg (HOOK_CONNECT(hook_connect, child_send), &msg, 0); (void) num_written; @@ -1470,7 +1470,7 @@ network_connect_child_read_cb (const void *pointer, void *data, int fd) && cmsg->cmsg_type == SCM_RIGHTS && cmsg->cmsg_len >= sizeof (sock)) { - memcpy(&sock, CMSG_DATA(cmsg), sizeof (sock)); + memcpy (&sock, CMSG_DATA(cmsg), sizeof (sock)); } } } diff --git a/src/core/wee-string.c b/src/core/wee-string.c index 2f989056c..0bdb2f356 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -2175,7 +2175,7 @@ string_split_command (const char *command, char separator) nb_substr = 1; ptr = command; - while ((p = strchr(ptr, separator)) != NULL) + while ((p = strchr (ptr, separator)) != NULL) { nb_substr++; ptr = ++p; @@ -2185,7 +2185,7 @@ string_split_command (const char *command, char separator) if (!array) return NULL; - buffer = malloc (strlen(command) + 1); + buffer = malloc (strlen (command) + 1); if (!buffer) { free (array); @@ -2195,7 +2195,7 @@ string_split_command (const char *command, char separator) ptr = command; str_idx = 0; arr_idx = 0; - while(*ptr != '\0') + while (*ptr != '\0') { type = 0; if (*ptr == separator) @@ -2235,7 +2235,7 @@ string_split_command (const char *command, char separator) free (buffer); - array2 = realloc (array, (arr_idx + 1) * sizeof(array[0])); + array2 = realloc (array, (arr_idx + 1) * sizeof (array[0])); if (!array2) { if (array) @@ -2288,7 +2288,7 @@ string_iconv (int from_utf8, const char *from_code, const char *to_code, #ifdef HAVE_ICONV if (from_code && from_code[0] && to_code && to_code[0] - && (string_strcasecmp(from_code, to_code) != 0)) + && (string_strcasecmp (from_code, to_code) != 0)) { cd = iconv_open (to_code, from_code); if (cd == (iconv_t)(-1)) diff --git a/src/core/wee-url.c b/src/core/wee-url.c index f345f1032..c24329b15 100644 --- a/src/core/wee-url.c +++ b/src/core/wee-url.c @@ -871,7 +871,7 @@ weeurl_get_mask_value (struct t_url_constant *constants, { for (i = 0; i < num_items; i++) { - item = string_remove_quotes(items[i], "'\""); + item = string_remove_quotes (items[i], "'\""); if (item) { index = weeurl_search_constant (constants, item); @@ -1115,7 +1115,7 @@ weeurl_download (const char *url, struct t_hashtable *options) goto end; } - curl = curl_easy_init(); + curl = curl_easy_init (); if (!curl) { rc = 3; diff --git a/src/core/wee-utf8.c b/src/core/wee-utf8.c index 3a85cdd73..b27302584 100644 --- a/src/core/wee-utf8.c +++ b/src/core/wee-utf8.c @@ -138,7 +138,7 @@ utf8_is_valid (const char *string, int length, char **error) { goto invalid; } - code_point = utf8_char_int(string); + code_point = utf8_char_int (string); if ((code_point < 0x10000) || (code_point > 0x1FFFFF)) goto invalid; string += 4; @@ -433,7 +433,7 @@ utf8_char_size (const char *string) /* * Gets length of an UTF-8 string in number of chars (not bytes). - * Result is <= strlen(string). + * Result is <= strlen (string). * * Returns length of string (>= 0). */ diff --git a/src/core/wee-util.c b/src/core/wee-util.c index ade4bdad1..8760aacea 100644 --- a/src/core/wee-util.c +++ b/src/core/wee-util.c @@ -359,7 +359,7 @@ util_catch_signal (int signum, void (*handler)(int)) sigemptyset (&act.sa_mask); act.sa_flags = 0; act.sa_handler = handler; - sigaction(signum, &act, NULL); + sigaction (signum, &act, NULL); } /* @@ -562,7 +562,7 @@ util_search_full_lib_name_ext (const char *filename, const char *extension, { length = strlen (extra_libdir) + strlen (name_with_ext) + strlen (plugins_dir) + 16; - final_name = malloc(length); + final_name = malloc (length); if (!final_name) { free (name_with_ext); @@ -719,7 +719,7 @@ util_file_get_content (const char *filename) if (!buffer2) goto error; buffer = buffer2; - count = fread (&buffer[fp], sizeof(char), 1024, f); + count = fread (&buffer[fp], sizeof (char), 1024, f); if (count <= 0) goto error; fp += count; @@ -739,7 +739,7 @@ error: if (buffer) free (buffer); if (f) - fclose(f); + fclose (f); return NULL; } diff --git a/src/core/weechat.c b/src/core/weechat.c index cc4ca6887..56347e956 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -159,7 +159,7 @@ weechat_display_usage () "(see /help upgrade in WeeChat)\n" " -v, --version display WeeChat version\n" " plugin:option option for plugin (see man weechat)\n")); - string_fprintf(stdout, "\n"); + string_fprintf (stdout, "\n"); } /* @@ -594,7 +594,7 @@ weechat_shutdown (int return_code, int crash) free (weechat_local_charset); if (crash) - abort(); + abort (); else if (return_code >= 0) exit (return_code); } diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index fea9e6426..feb74163e 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -1497,7 +1497,7 @@ gui_color_init_weechat () void gui_color_alloc () { - if (has_colors()) + if (has_colors ()) { start_color (); use_default_colors (); diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c index d6e203c5d..b319c11b0 100644 --- a/src/gui/curses/gui-curses-main.c +++ b/src/gui/curses/gui-curses-main.c @@ -265,13 +265,13 @@ gui_main_handle_quit_signals () switch (weechat_quit_signal) { case SIGHUP: - snprintf (str_signal, sizeof(str_signal), "SIGHUP"); + snprintf (str_signal, sizeof (str_signal), "SIGHUP"); break; case SIGQUIT: - snprintf (str_signal, sizeof(str_signal), "SIGQUIT"); + snprintf (str_signal, sizeof (str_signal), "SIGQUIT"); break; case SIGTERM: - snprintf (str_signal, sizeof(str_signal), "SIGTERM"); + snprintf (str_signal, sizeof (str_signal), "SIGTERM"); break; default: str_signal[0] = '\0'; @@ -280,9 +280,9 @@ gui_main_handle_quit_signals () if (str_signal[0]) { - snprintf (str_weechat_signal, sizeof(str_weechat_signal), + snprintf (str_weechat_signal, sizeof (str_weechat_signal), "signal_%s", str_signal); - string_tolower(str_weechat_signal); + string_tolower (str_weechat_signal); rc = hook_signal_send (str_weechat_signal, WEECHAT_HOOK_SIGNAL_STRING, NULL); if ((rc != WEECHAT_RC_OK_EAT) && !weechat_quit) diff --git a/src/gui/curses/gui-curses-window.c b/src/gui/curses/gui-curses-window.c index 4b54d953a..3b410dfd7 100644 --- a/src/gui/curses/gui-curses-window.c +++ b/src/gui/curses/gui-curses-window.c @@ -2565,7 +2565,7 @@ gui_window_term_display_infos () gui_chat_printf (NULL, ""); gui_chat_printf (NULL, _("Terminal infos:")); gui_chat_printf (NULL, _(" TERM='%s', size: %dx%d"), - getenv("TERM"), gui_term_cols, gui_term_lines); + getenv ("TERM"), gui_term_cols, gui_term_lines); } /* diff --git a/src/gui/gui-bar-window.c b/src/gui/gui-bar-window.c index 0bfbcba7e..9bc7dfc88 100644 --- a/src/gui/gui-bar-window.c +++ b/src/gui/gui-bar-window.c @@ -828,7 +828,7 @@ gui_bar_window_content_get_with_filling (struct t_gui_bar_window *bar_window, total_items = 0; max_length = 1; max_length_screen = 1; - split_items = malloc(bar_window->items_count * sizeof(*split_items)); + split_items = malloc (bar_window->items_count * sizeof (*split_items)); for (i = 0; i < bar_window->items_count; i++) { if (bar_window->items_subcount[i] > 0) diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c index 8fa5e62f8..9af2d2371 100644 --- a/src/gui/gui-chat.c +++ b/src/gui/gui-chat.c @@ -116,9 +116,9 @@ gui_chat_prefix_build () ptr_prefix = CONFIG_STRING(config_look_prefix[i]); pos_color = strstr (ptr_prefix, "${"); - snprintf(prefix, sizeof (prefix), "%s%s\t", - (ptr_prefix[0] && (!pos_color || (pos_color > ptr_prefix))) ? GUI_COLOR(prefix_color[i]) : "", - ptr_prefix); + snprintf (prefix, sizeof (prefix), "%s%s\t", + (ptr_prefix[0] && (!pos_color || (pos_color > ptr_prefix))) ? GUI_COLOR(prefix_color[i]) : "", + ptr_prefix); if (pos_color) gui_chat_prefix[i] = eval_expression (prefix, NULL, NULL, NULL); diff --git a/src/gui/gui-input.c b/src/gui/gui-input.c index 187a1b19b..c9d7d695d 100644 --- a/src/gui/gui-input.c +++ b/src/gui/gui-input.c @@ -364,7 +364,7 @@ gui_input_clipboard_copy (const char *buffer, int size) if (gui_input_clipboard != NULL) free (gui_input_clipboard); - gui_input_clipboard = malloc((size + 1) * sizeof(*gui_input_clipboard)); + gui_input_clipboard = malloc ((size + 1) * sizeof (*gui_input_clipboard)); if (gui_input_clipboard) { diff --git a/src/gui/gui-key.c b/src/gui/gui-key.c index 37b89caea..021376c41 100644 --- a/src/gui/gui-key.c +++ b/src/gui/gui-key.c @@ -1920,22 +1920,22 @@ gui_key_hdata_key_cb (const void *pointer, void *data, "gui_keys%s%s", (i == GUI_KEY_CONTEXT_DEFAULT) ? "" : "_", (i == GUI_KEY_CONTEXT_DEFAULT) ? "" : gui_key_context_string[i]); - hdata_new_list(hdata, str_list, &gui_keys[i], 0); + hdata_new_list (hdata, str_list, &gui_keys[i], 0); snprintf (str_list, sizeof (str_list), "last_gui_key%s%s", (i == GUI_KEY_CONTEXT_DEFAULT) ? "" : "_", (i == GUI_KEY_CONTEXT_DEFAULT) ? "" : gui_key_context_string[i]); - hdata_new_list(hdata, str_list, &last_gui_key[i], 0); + hdata_new_list (hdata, str_list, &last_gui_key[i], 0); snprintf (str_list, sizeof (str_list), "gui_default_keys%s%s", (i == GUI_KEY_CONTEXT_DEFAULT) ? "" : "_", (i == GUI_KEY_CONTEXT_DEFAULT) ? "" : gui_key_context_string[i]); - hdata_new_list(hdata, str_list, &gui_default_keys[i], 0); + hdata_new_list (hdata, str_list, &gui_default_keys[i], 0); snprintf (str_list, sizeof (str_list), "last_gui_default_key%s%s", (i == GUI_KEY_CONTEXT_DEFAULT) ? "" : "_", (i == GUI_KEY_CONTEXT_DEFAULT) ? "" : gui_key_context_string[i]); - hdata_new_list(hdata, str_list, &last_gui_default_key[i], 0); + hdata_new_list (hdata, str_list, &last_gui_default_key[i], 0); } } return hdata; diff --git a/src/gui/gui-nicklist.c b/src/gui/gui-nicklist.c index 63a687bd9..f8c35a3a9 100644 --- a/src/gui/gui-nicklist.c +++ b/src/gui/gui-nicklist.c @@ -219,7 +219,7 @@ gui_nicklist_search_group_internal (struct t_gui_buffer *buffer, while (ptr_group) { ptr_name = (skip_digits) ? - gui_nicklist_get_group_start(ptr_group->name) : ptr_group->name; + gui_nicklist_get_group_start (ptr_group->name) : ptr_group->name; if (strcmp (ptr_name, name) == 0) return ptr_group; ptr_group = ptr_group->next_group; diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index 37b393336..c7794e22f 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -312,7 +312,7 @@ alias_run_command (struct t_gui_buffer **buffer, const char *command) struct t_gui_buffer *old_current_buffer, *new_current_buffer; /* save current buffer pointer */ - old_current_buffer = weechat_current_buffer(); + old_current_buffer = weechat_current_buffer (); /* execute command */ string = weechat_buffer_string_replace_local_var (*buffer, command); @@ -322,7 +322,7 @@ alias_run_command (struct t_gui_buffer **buffer, const char *command) free (string); /* get new current buffer */ - new_current_buffer = weechat_current_buffer(); + new_current_buffer = weechat_current_buffer (); /* * if current buffer was changed by command, then we'll use this one for @@ -415,7 +415,7 @@ alias_cb (const void *pointer, void *data, } else { - alias_command = malloc (1 + strlen((args_replaced) ? args_replaced : *ptr_cmd) + 1); + alias_command = malloc (1 + strlen ((args_replaced) ? args_replaced : *ptr_cmd) + 1); if (alias_command) { strcpy (alias_command, "/"); diff --git a/src/plugins/aspell/weechat-aspell-command.c b/src/plugins/aspell/weechat-aspell-command.c index 152f311c4..6d66eb7d4 100644 --- a/src/plugins/aspell/weechat-aspell-command.c +++ b/src/plugins/aspell/weechat-aspell-command.c @@ -158,7 +158,7 @@ weechat_aspell_command_speller_list_dicts () enchant_broker_list_dicts (broker, weechat_aspell_enchant_dict_describe_cb, NULL); #else - config = new_aspell_config(); + config = new_aspell_config (); list = get_aspell_dict_info_list (config); elements = aspell_dict_info_list_elements (list); diff --git a/src/plugins/aspell/weechat-aspell-speller.c b/src/plugins/aspell/weechat-aspell-speller.c index cdac14a9a..4e9bf099b 100644 --- a/src/plugins/aspell/weechat-aspell-speller.c +++ b/src/plugins/aspell/weechat-aspell-speller.c @@ -161,7 +161,7 @@ weechat_aspell_speller_new (const char *lang) } #else /* create a speller instance for the newly created cell */ - config = new_aspell_config(); + config = new_aspell_config (); aspell_config_replace (config, "lang", lang); #endif /* USE_ENCHANT */ diff --git a/src/plugins/buflist/buflist-mouse.c b/src/plugins/buflist/buflist-mouse.c index ceb460d52..297bf2305 100644 --- a/src/plugins/buflist/buflist-mouse.c +++ b/src/plugins/buflist/buflist-mouse.c @@ -331,8 +331,8 @@ buflist_mouse_init () &buflist_focus_cb, NULL, NULL); } - weechat_hook_hsignal(BUFLIST_MOUSE_HSIGNAL, - &buflist_hsignal_cb, NULL, NULL); + weechat_hook_hsignal (BUFLIST_MOUSE_HSIGNAL, + &buflist_hsignal_cb, NULL, NULL); return 1; } diff --git a/src/plugins/buflist/buflist.c b/src/plugins/buflist/buflist.c index 88d010290..bdc8aea76 100644 --- a/src/plugins/buflist/buflist.c +++ b/src/plugins/buflist/buflist.c @@ -71,8 +71,8 @@ buflist_add_bar () */ void -buflist_buffer_get_irc_pointers(struct t_gui_buffer *buffer, - void **irc_server, void **irc_channel) +buflist_buffer_get_irc_pointers (struct t_gui_buffer *buffer, + void **irc_server, void **irc_channel) { const char *ptr_server_name, *ptr_channel_name, *ptr_name; struct t_hdata *hdata_irc_server, *hdata_irc_channel; diff --git a/src/plugins/buflist/buflist.h b/src/plugins/buflist/buflist.h index b95445083..487e7031d 100644 --- a/src/plugins/buflist/buflist.h +++ b/src/plugins/buflist/buflist.h @@ -35,8 +35,9 @@ extern struct t_hdata *buflist_hdata_bar_item; extern struct t_hdata *buflist_hdata_bar_window; extern void buflist_add_bar (); -extern void buflist_buffer_get_irc_pointers(struct t_gui_buffer *buffer, - void **irc_server, void **irc_channel); +extern void buflist_buffer_get_irc_pointers (struct t_gui_buffer *buffer, + void **irc_server, + void **irc_channel); extern struct t_arraylist *buflist_sort_buffers (); #endif /* WEECHAT_PLUGIN_BUFLIST_H */ diff --git a/src/plugins/fifo/fifo-config.c b/src/plugins/fifo/fifo-config.c index bbe49322e..1bb12729d 100644 --- a/src/plugins/fifo/fifo-config.c +++ b/src/plugins/fifo/fifo-config.c @@ -50,7 +50,7 @@ fifo_config_change_file_enabled (const void *pointer, void *data, fifo_remove (); if (weechat_config_boolean (fifo_config_file_enabled)) - fifo_create(); + fifo_create (); } /* diff --git a/src/plugins/fset/fset-mouse.c b/src/plugins/fset/fset-mouse.c index fdcdf84a8..266ad75d9 100644 --- a/src/plugins/fset/fset-mouse.c +++ b/src/plugins/fset/fset-mouse.c @@ -324,8 +324,8 @@ fset_mouse_init () weechat_hook_focus ("chat", &fset_mouse_focus_cb, NULL, NULL); - weechat_hook_hsignal(FSET_MOUSE_HSIGNAL, - &fset_mouse_hsignal_cb, NULL, NULL); + weechat_hook_hsignal (FSET_MOUSE_HSIGNAL, + &fset_mouse_hsignal_cb, NULL, NULL); weechat_hashtable_set ( keys, diff --git a/src/plugins/irc/irc-bar-item.c b/src/plugins/irc/irc-bar-item.c index 3812023b7..02428b9a8 100644 --- a/src/plugins/irc/irc-bar-item.c +++ b/src/plugins/irc/irc-bar-item.c @@ -280,7 +280,7 @@ irc_bar_item_buffer_modes (const void *pointer, void *data, modes_without_args = NULL; if (!irc_config_display_channel_modes_arguments (channel->modes)) { - pos_space = strchr(channel->modes, ' '); + pos_space = strchr (channel->modes, ' '); if (pos_space) { modes_without_args = weechat_strndup ( diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index f69317e1a..4b6158ee6 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -356,7 +356,7 @@ irc_channel_create_buffer (struct t_irc_server *server, } /* set highlights settings on channel buffer */ - weechat_buffer_set( + weechat_buffer_set ( ptr_buffer, "highlight_words_add", (channel_type == IRC_CHANNEL_TYPE_CHANNEL) ? @@ -711,8 +711,8 @@ irc_channel_check_whox (struct t_irc_server *server, } else { - irc_channel_remove_account(server, channel); - irc_channel_remove_away(server, channel); + irc_channel_remove_account (server, channel); + irc_channel_remove_away (server, channel); } } } diff --git a/src/plugins/irc/irc-command.c b/src/plugins/irc/irc-command.c index 1d5635a26..943f1be33 100644 --- a/src/plugins/irc/irc-command.c +++ b/src/plugins/irc/irc-command.c @@ -2954,7 +2954,7 @@ IRC_COMMAND_CALLBACK(list) REG_EXTENDED | REG_ICASE | REG_NOSUB)) != 0) { regerror (ret, ptr_server->cmd_list_regexp, - buf, sizeof(buf)); + buf, sizeof (buf)); weechat_printf ( ptr_server->buffer, _("%s%s: \"%s\" is not a valid regular expression " diff --git a/src/plugins/irc/irc-config.c b/src/plugins/irc/irc-config.c index 7c30cfcad..c0aa17b7f 100644 --- a/src/plugins/irc/irc-config.c +++ b/src/plugins/irc/irc-config.c @@ -224,7 +224,7 @@ irc_config_compute_nick_colors () } /* if colors are displayed for nicks in nicklist, refresh them */ - if (weechat_config_boolean(irc_config_look_color_nicks_in_nicklist)) + if (weechat_config_boolean (irc_config_look_color_nicks_in_nicklist)) irc_nick_nicklist_set_color_all (); } diff --git a/src/plugins/irc/irc-nick.c b/src/plugins/irc/irc-nick.c index 7e7fa834e..83d7d9259 100644 --- a/src/plugins/irc/irc-nick.c +++ b/src/plugins/irc/irc-nick.c @@ -320,7 +320,7 @@ irc_nick_get_color_for_nicklist (struct t_irc_server *server, if (nick->away) return nick_color_away; - if (weechat_config_boolean(irc_config_look_color_nicks_in_nicklist)) + if (weechat_config_boolean (irc_config_look_color_nicks_in_nicklist)) { if (irc_server_strcasecmp (server, nick->name, server->nick) == 0) return nick_color_self; diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 38918a450..573892788 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -508,7 +508,7 @@ IRC_PROTOCOL_CALLBACK(cap) snprintf (str_msg_auth, sizeof (str_msg_auth), "AUTHENTICATE %s", irc_sasl_mechanism_string[sasl_mechanism]); - weechat_string_toupper(str_msg_auth); + weechat_string_toupper (str_msg_auth); irc_server_sendf (server, 0, NULL, str_msg_auth); if (server->hook_timer_sasl) weechat_unhook (server->hook_timer_sasl); @@ -1348,7 +1348,7 @@ IRC_PROTOCOL_CALLBACK(nick) address), _("%s%s%s%s is now known as %s%s%s"), weechat_prefix ("network"), - weechat_config_boolean(irc_config_look_color_nicks_in_server_messages) ? + weechat_config_boolean (irc_config_look_color_nicks_in_server_messages) ? old_color : IRC_COLOR_CHAT_NICK, nick, IRC_COLOR_RESET, @@ -4502,7 +4502,7 @@ IRC_PROTOCOL_CALLBACK(354) date, irc_protocol_tags (command, "irc_numeric", NULL, NULL), "%s%s[%s%s%s] %s%s %s%s%s%s%s%s(%s%s@%s%s)%s %s%s%s%s(%s)", - weechat_prefix("network"), + weechat_prefix ("network"), IRC_COLOR_CHAT_DELIMITERS, IRC_COLOR_CHAT_CHANNEL, argv[3], diff --git a/src/plugins/irc/irc-redirect.c b/src/plugins/irc/irc-redirect.c index 07a07d0f1..64fc30ac6 100644 --- a/src/plugins/irc/irc-redirect.c +++ b/src/plugins/irc/irc-redirect.c @@ -686,7 +686,7 @@ irc_redirect_message_add (struct t_irc_redirect *redirect, const char *message, /* add message to output */ if (redirect->output) { - redirect->output_size += strlen("\n") + strlen (message); + redirect->output_size += strlen ("\n") + strlen (message); output2 = realloc (redirect->output, redirect->output_size); if (!output2) { diff --git a/src/plugins/irc/irc-sasl.c b/src/plugins/irc/irc-sasl.c index 38cb4e7a1..689e7ecb8 100644 --- a/src/plugins/irc/irc-sasl.c +++ b/src/plugins/irc/irc-sasl.c @@ -493,7 +493,7 @@ irc_sasl_mechanism_dh_blowfish (const char *data_base64, length_answer = 2 + length_key + length_username + length_password; answer = malloc (length_answer); ptr_answer = answer; - *((unsigned int *)ptr_answer) = htons(length_key); + *((unsigned int *)ptr_answer) = htons (length_key); ptr_answer += 2; memcpy (ptr_answer, public_bin, length_key); ptr_answer += length_key; @@ -554,7 +554,7 @@ irc_sasl_mechanism_dh_aes (const char *data_base64, secret_bin = NULL; public_bin = NULL; - if (irc_sasl_dh(data_base64, &public_bin, &secret_bin, &length_key) == 0) + if (irc_sasl_dh (data_base64, &public_bin, &secret_bin, &length_key) == 0) goto aesend; /* Select cipher algorithm: key length * 8 = cipher bit size */ @@ -596,7 +596,7 @@ irc_sasl_mechanism_dh_aes (const char *data_base64, goto aesend; if (gcry_cipher_setkey (gcrypt_handle, secret_bin, length_key) != 0) goto aesend; - if (gcry_cipher_setiv (gcrypt_handle, iv, sizeof(iv)) != 0) + if (gcry_cipher_setiv (gcrypt_handle, iv, sizeof (iv)) != 0) goto aesend; if (gcry_cipher_encrypt (gcrypt_handle, userpass_crypted, length_userpass, @@ -615,7 +615,7 @@ irc_sasl_mechanism_dh_aes (const char *data_base64, length_answer = 2 + length_key + sizeof (iv) + length_userpass; answer = malloc (length_answer); ptr_answer = answer; - *((unsigned int *)ptr_answer) = htons(length_key); + *((unsigned int *)ptr_answer) = htons (length_key); ptr_answer += 2; memcpy (ptr_answer, public_bin, length_key); ptr_answer += length_key; diff --git a/src/plugins/javascript/weechat-js-v8.h b/src/plugins/javascript/weechat-js-v8.h index 60b73da1c..078042548 100644 --- a/src/plugins/javascript/weechat-js-v8.h +++ b/src/plugins/javascript/weechat-js-v8.h @@ -27,21 +27,21 @@ class WeechatJsV8 { public: - WeechatJsV8(void); - ~WeechatJsV8(void); + WeechatJsV8 (void); + ~WeechatJsV8 (void); - bool load(v8::Handle<v8::String>); - bool load(const char *); + bool load (v8::Handle<v8::String>); + bool load (const char *); - bool execScript(void); - bool functionExists(const char *); - v8::Handle<v8::Value> execFunction(const char *, - int argc, v8::Handle<v8::Value> *); + bool execScript (void); + bool functionExists (const char *); + v8::Handle<v8::Value> execFunction (const char *, + int argc, v8::Handle<v8::Value> *); - void addGlobal(v8::Handle<v8::String>, v8::Handle<v8::Template>); - void addGlobal(const char *, v8::Handle<v8::Template>); + void addGlobal (v8::Handle<v8::String>, v8::Handle<v8::Template>); + void addGlobal (const char *, v8::Handle<v8::Template>); - void loadLibs(void); + void loadLibs (void); private: v8::HandleScope handle_scope; diff --git a/src/plugins/logger/logger.c b/src/plugins/logger/logger.c index 862e5db47..5194d12dd 100644 --- a/src/plugins/logger/logger.c +++ b/src/plugins/logger/logger.c @@ -773,15 +773,15 @@ logger_list () } weechat_printf (NULL, " %s[%s%d%s]%s (%s) %s%s%s: %s%s%s%s", - weechat_color("chat_delimiters"), - weechat_color("chat"), + weechat_color ("chat_delimiters"), + weechat_color ("chat"), weechat_infolist_integer (ptr_infolist, "number"), - weechat_color("chat_delimiters"), - weechat_color("chat"), + weechat_color ("chat_delimiters"), + weechat_color ("chat"), weechat_infolist_string (ptr_infolist, "plugin_name"), - weechat_color("chat_buffer"), + weechat_color ("chat_buffer"), weechat_infolist_string (ptr_infolist, "name"), - weechat_color("chat"), + weechat_color ("chat"), status, (ptr_logger_buffer) ? " (" : "", (ptr_logger_buffer) ? diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c index 037c09209..03563021b 100644 --- a/src/plugins/lua/weechat-lua.c +++ b/src/plugins/lua/weechat-lua.c @@ -405,7 +405,7 @@ weechat_lua_add_constant (lua_State *L, struct t_lua_const *ptr_const) #else lua_pushnumber (L, ptr_const->int_value); #endif /* LUA_VERSION_NUM >= 503 */ - lua_settable(L, -3); + lua_settable (L, -3); } /* @@ -415,7 +415,7 @@ weechat_lua_add_constant (lua_State *L, struct t_lua_const *ptr_const) int weechat_lua_newindex (lua_State *L) { - luaL_error(L, "Error: read-only constant"); + luaL_error (L, "Error: read-only constant"); return 0; } @@ -514,7 +514,7 @@ weechat_lua_load (const char *filename, const char *code) lua_current_script = NULL; lua_registered_script = NULL; - lua_current_interpreter = luaL_newstate(); + lua_current_interpreter = luaL_newstate (); if (lua_current_interpreter == NULL) { diff --git a/src/plugins/lua/weechat-lua.h b/src/plugins/lua/weechat-lua.h index 0701c0ea3..7d830787b 100644 --- a/src/plugins/lua/weechat-lua.h +++ b/src/plugins/lua/weechat-lua.h @@ -55,8 +55,8 @@ extern void *weechat_lua_exec (struct t_plugin_script *script, int ret_type, const char *function, const char *format, void **argv); -extern void weechat_lua_register_lib(lua_State *L, const char *libname, - const luaL_Reg *lua_api_funcs, - struct t_lua_const lua_api_consts[]); +extern void weechat_lua_register_lib (lua_State *L, const char *libname, + const luaL_Reg *lua_api_funcs, + struct t_lua_const lua_api_consts[]); #endif /* WEECHAT_PLUGIN_LUA_H */ diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c index 8395ed68e..8099874e2 100644 --- a/src/plugins/perl/weechat-perl.c +++ b/src/plugins/perl/weechat-perl.c @@ -351,14 +351,14 @@ weechat_perl_exec (struct t_plugin_script *script, switch (format[i]) { case 's': /* string */ - XPUSHs(sv_2mortal(newSVpv((char *)argv[i], 0))); + XPUSHs (sv_2mortal(newSVpv((char *)argv[i], 0))); break; case 'i': /* integer */ - XPUSHs(sv_2mortal(newSViv(*((int *)argv[i])))); + XPUSHs (sv_2mortal(newSViv(*((int *)argv[i])))); break; case 'h': /* hash */ hash = weechat_perl_hashtable_to_hash (argv[i]); - XPUSHs(sv_2mortal(newRV_inc((SV *)hash))); + XPUSHs (sv_2mortal(newRV_inc((SV *)hash))); break; } } @@ -400,7 +400,7 @@ weechat_perl_exec (struct t_plugin_script *script, { if (ret_type == WEECHAT_SCRIPT_EXEC_STRING) { - ret_s = newSVsv(POPs); + ret_s = newSVsv (POPs); ret_value = strdup (SvPV_nolen (ret_s)); SvREFCNT_dec (ret_s); } @@ -520,7 +520,7 @@ weechat_perl_load (const char *filename, const char *code) perl_registered_script = NULL; #ifdef MULTIPLICITY - perl_current_interpreter = perl_alloc(); + perl_current_interpreter = perl_alloc (); if (!perl_current_interpreter) { @@ -584,7 +584,7 @@ weechat_perl_load (const char *filename, const char *code) weechat_printf (NULL, weechat_gettext ("%s%s: error: %s"), weechat_prefix ("error"), PERL_PLUGIN_NAME, - SvPV_nolen(ERRSV)); + SvPV_nolen (ERRSV)); #ifdef MULTIPLICITY perl_destruct (perl_current_interpreter); perl_free (perl_current_interpreter); diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c index 04ae5afe0..15ce76401 100644 --- a/src/plugins/php/weechat-php.c +++ b/src/plugins/php/weechat-php.c @@ -549,8 +549,8 @@ weechat_php_exec (struct t_plugin_script *script, int ret_type, /* Invoke func */ ret_value = NULL; - memset(&fci, 0, sizeof (zend_fcall_info)); - memset(&fci_cache, 0, sizeof (zend_fcall_info_cache)); + memset (&fci, 0, sizeof (zend_fcall_info)); + memset (&fci_cache, 0, sizeof (zend_fcall_info_cache)); zfunc = weechat_php_func_map_get (function); if (zfunc && zend_fcall_info_init (zfunc, 0, &fci, &fci_cache, NULL, NULL) == SUCCESS) diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 9a6831e9b..57bdf4103 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -423,7 +423,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv) gui_chat_printf (NULL, _("%sError: unable to load plugin \"%s\": %s"), gui_chat_prefix[GUI_CHAT_PREFIX_ERROR], - filename, dlerror()); + filename, dlerror ()); gui_chat_printf (NULL, _("%sIf you're trying to load a script and not a C " "plugin, try command to load scripts (/perl, " diff --git a/src/plugins/python/weechat-python-api.c b/src/plugins/python/weechat-python-api.c index 27a354d3e..b9b3ba14c 100644 --- a/src/plugins/python/weechat-python-api.c +++ b/src/plugins/python/weechat-python-api.c @@ -2255,7 +2255,7 @@ weechat_python_api_hook_fd_cb (const void *pointer, void *data, int fd) if (ptr_function && ptr_function[0]) { func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; - func_argv[1] = PyLong_FromLong((long)fd); + func_argv[1] = PyLong_FromLong ((long)fd); rc = (int *) weechat_python_exec (script, WEECHAT_SCRIPT_EXEC_INT, @@ -2347,7 +2347,7 @@ weechat_python_api_hook_process_cb (const void *pointer, void *data, { func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; func_argv[1] = (command) ? (char *)command : empty_arg; - func_argv[2] = PyLong_FromLong((long)return_code); + func_argv[2] = PyLong_FromLong ((long)return_code); func_argv[3] = (out) ? (char *)out : empty_arg; func_argv[4] = (err) ? (char *)err : empty_arg; @@ -2453,9 +2453,9 @@ weechat_python_api_hook_connect_cb (const void *pointer, void *data, if (ptr_function && ptr_function[0]) { func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; - func_argv[1] = PyLong_FromLong((long)status); - func_argv[2] = PyLong_FromLong((long)gnutls_rc); - func_argv[3] = PyLong_FromLong((long)sock); + func_argv[1] = PyLong_FromLong ((long)status); + func_argv[2] = PyLong_FromLong ((long)gnutls_rc); + func_argv[3] = PyLong_FromLong ((long)sock); func_argv[4] = (ip_address) ? (char *)ip_address : empty_arg; func_argv[5] = (error) ? (char *)error : empty_arg; @@ -2559,8 +2559,8 @@ weechat_python_api_hook_print_cb (const void *pointer, void *data, func_argv[3] = weechat_string_build_with_split_string (tags, ","); if (!func_argv[3]) func_argv[3] = strdup (""); - func_argv[4] = PyLong_FromLong((long)displayed); - func_argv[5] = PyLong_FromLong((long)highlight); + func_argv[4] = PyLong_FromLong ((long)displayed); + func_argv[5] = PyLong_FromLong ((long)highlight); func_argv[6] = (prefix) ? (char *)prefix : empty_arg; func_argv[7] = (message) ? (char *)message : empty_arg; diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c index ea10091dc..e34485417 100644 --- a/src/plugins/python/weechat-python.c +++ b/src/plugins/python/weechat-python.c @@ -491,7 +491,7 @@ weechat_python_exec (struct t_plugin_script *script, if (rc == NULL) rc = PyLong_FromLong ((long)0); - if (PyErr_Occurred()) + if (PyErr_Occurred ()) { PyErr_Print (); Py_XDECREF(rc); @@ -591,53 +591,53 @@ void weechat_python_init_module_weechat () } /* define some constants */ - weechat_dict = PyModule_GetDict(weechat_module); - PyDict_SetItemString(weechat_dict, "WEECHAT_RC_OK", PyLong_FromLong((long) WEECHAT_RC_OK)); - PyDict_SetItemString(weechat_dict, "WEECHAT_RC_OK_EAT", PyLong_FromLong((long) WEECHAT_RC_OK_EAT)); - PyDict_SetItemString(weechat_dict, "WEECHAT_RC_ERROR", PyLong_FromLong((long) WEECHAT_RC_ERROR)); - - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_READ_OK", PyLong_FromLong((long) WEECHAT_CONFIG_READ_OK)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_READ_MEMORY_ERROR", PyLong_FromLong((long) WEECHAT_CONFIG_READ_MEMORY_ERROR)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_READ_FILE_NOT_FOUND", PyLong_FromLong((long) WEECHAT_CONFIG_READ_FILE_NOT_FOUND)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_WRITE_OK", PyLong_FromLong((long) WEECHAT_CONFIG_WRITE_OK)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_WRITE_ERROR", PyLong_FromLong((long) WEECHAT_CONFIG_WRITE_ERROR)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_WRITE_MEMORY_ERROR", PyLong_FromLong((long) WEECHAT_CONFIG_WRITE_MEMORY_ERROR)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_OPTION_SET_OK_CHANGED", PyLong_FromLong((long) WEECHAT_CONFIG_OPTION_SET_OK_CHANGED)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE", PyLong_FromLong((long) WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_OPTION_SET_ERROR", PyLong_FromLong((long) WEECHAT_CONFIG_OPTION_SET_ERROR)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND", PyLong_FromLong((long) WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET", PyLong_FromLong((long) WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_OPTION_UNSET_OK_RESET", PyLong_FromLong((long) WEECHAT_CONFIG_OPTION_UNSET_OK_RESET)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED", PyLong_FromLong((long) WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED)); - PyDict_SetItemString(weechat_dict, "WEECHAT_CONFIG_OPTION_UNSET_ERROR", PyLong_FromLong((long) WEECHAT_CONFIG_OPTION_UNSET_ERROR)); - - PyDict_SetItemString(weechat_dict, "WEECHAT_LIST_POS_SORT", PyUnicode_FromString(WEECHAT_LIST_POS_SORT)); - PyDict_SetItemString(weechat_dict, "WEECHAT_LIST_POS_BEGINNING", PyUnicode_FromString(WEECHAT_LIST_POS_BEGINNING)); - PyDict_SetItemString(weechat_dict, "WEECHAT_LIST_POS_END", PyUnicode_FromString(WEECHAT_LIST_POS_END)); - - PyDict_SetItemString(weechat_dict, "WEECHAT_HOTLIST_LOW", PyUnicode_FromString(WEECHAT_HOTLIST_LOW)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOTLIST_MESSAGE", PyUnicode_FromString(WEECHAT_HOTLIST_MESSAGE)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOTLIST_PRIVATE", PyUnicode_FromString(WEECHAT_HOTLIST_PRIVATE)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOTLIST_HIGHLIGHT", PyUnicode_FromString(WEECHAT_HOTLIST_HIGHLIGHT)); - - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_PROCESS_RUNNING", PyLong_FromLong((long) WEECHAT_HOOK_PROCESS_RUNNING)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_PROCESS_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_PROCESS_ERROR)); - - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_OK", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_OK)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_PROXY_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_PROXY_ERROR)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_MEMORY_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_MEMORY_ERROR)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_TIMEOUT", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_TIMEOUT)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_CONNECT_SOCKET_ERROR", PyLong_FromLong((long) WEECHAT_HOOK_CONNECT_SOCKET_ERROR)); - - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_SIGNAL_STRING", PyUnicode_FromString(WEECHAT_HOOK_SIGNAL_STRING)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_SIGNAL_INT", PyUnicode_FromString(WEECHAT_HOOK_SIGNAL_INT)); - PyDict_SetItemString(weechat_dict, "WEECHAT_HOOK_SIGNAL_POINTER", PyUnicode_FromString(WEECHAT_HOOK_SIGNAL_POINTER)); + weechat_dict = PyModule_GetDict (weechat_module); + PyDict_SetItemString (weechat_dict, "WEECHAT_RC_OK", PyLong_FromLong ((long)WEECHAT_RC_OK)); + PyDict_SetItemString (weechat_dict, "WEECHAT_RC_OK_EAT", PyLong_FromLong ((long)WEECHAT_RC_OK_EAT)); + PyDict_SetItemString (weechat_dict, "WEECHAT_RC_ERROR", PyLong_FromLong ((long)WEECHAT_RC_ERROR)); + + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_READ_OK", PyLong_FromLong ((long)WEECHAT_CONFIG_READ_OK)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_READ_MEMORY_ERROR", PyLong_FromLong ((long)WEECHAT_CONFIG_READ_MEMORY_ERROR)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_READ_FILE_NOT_FOUND", PyLong_FromLong ((long)WEECHAT_CONFIG_READ_FILE_NOT_FOUND)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_WRITE_OK", PyLong_FromLong ((long)WEECHAT_CONFIG_WRITE_OK)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_WRITE_ERROR", PyLong_FromLong ((long)WEECHAT_CONFIG_WRITE_ERROR)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_WRITE_MEMORY_ERROR", PyLong_FromLong ((long)WEECHAT_CONFIG_WRITE_MEMORY_ERROR)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_OPTION_SET_OK_CHANGED", PyLong_FromLong ((long)WEECHAT_CONFIG_OPTION_SET_OK_CHANGED)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE", PyLong_FromLong ((long)WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_OPTION_SET_ERROR", PyLong_FromLong ((long)WEECHAT_CONFIG_OPTION_SET_ERROR)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND", PyLong_FromLong ((long)WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET", PyLong_FromLong ((long)WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_OPTION_UNSET_OK_RESET", PyLong_FromLong ((long)WEECHAT_CONFIG_OPTION_UNSET_OK_RESET)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED", PyLong_FromLong ((long)WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED)); + PyDict_SetItemString (weechat_dict, "WEECHAT_CONFIG_OPTION_UNSET_ERROR", PyLong_FromLong ((long)WEECHAT_CONFIG_OPTION_UNSET_ERROR)); + + PyDict_SetItemString (weechat_dict, "WEECHAT_LIST_POS_SORT", PyUnicode_FromString (WEECHAT_LIST_POS_SORT)); + PyDict_SetItemString (weechat_dict, "WEECHAT_LIST_POS_BEGINNING", PyUnicode_FromString (WEECHAT_LIST_POS_BEGINNING)); + PyDict_SetItemString (weechat_dict, "WEECHAT_LIST_POS_END", PyUnicode_FromString (WEECHAT_LIST_POS_END)); + + PyDict_SetItemString (weechat_dict, "WEECHAT_HOTLIST_LOW", PyUnicode_FromString (WEECHAT_HOTLIST_LOW)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOTLIST_MESSAGE", PyUnicode_FromString (WEECHAT_HOTLIST_MESSAGE)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOTLIST_PRIVATE", PyUnicode_FromString (WEECHAT_HOTLIST_PRIVATE)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOTLIST_HIGHLIGHT", PyUnicode_FromString (WEECHAT_HOTLIST_HIGHLIGHT)); + + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_PROCESS_RUNNING", PyLong_FromLong ((long)WEECHAT_HOOK_PROCESS_RUNNING)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_PROCESS_ERROR", PyLong_FromLong ((long)WEECHAT_HOOK_PROCESS_ERROR)); + + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_OK", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_OK)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_PROXY_ERROR", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_PROXY_ERROR)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_MEMORY_ERROR", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_MEMORY_ERROR)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_TIMEOUT", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_TIMEOUT)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_CONNECT_SOCKET_ERROR", PyLong_FromLong ((long)WEECHAT_HOOK_CONNECT_SOCKET_ERROR)); + + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_SIGNAL_STRING", PyUnicode_FromString (WEECHAT_HOOK_SIGNAL_STRING)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_SIGNAL_INT", PyUnicode_FromString (WEECHAT_HOOK_SIGNAL_INT)); + PyDict_SetItemString (weechat_dict, "WEECHAT_HOOK_SIGNAL_POINTER", PyUnicode_FromString (WEECHAT_HOOK_SIGNAL_POINTER)); #if PY_MAJOR_VERSION >= 3 return weechat_module; @@ -658,19 +658,19 @@ weechat_python_set_output () weechat_outputs = PyModule_Create (&moduleDefOutputs); #else /* python <= 2.x */ - weechat_outputs = Py_InitModule("weechatOutputs", - weechat_python_output_funcs); + weechat_outputs = Py_InitModule ("weechatOutputs", + weechat_python_output_funcs); #endif /* PY_MAJOR_VERSION >= 3 */ if (weechat_outputs) { - if (PySys_SetObject("stdout", weechat_outputs) == -1) + if (PySys_SetObject ("stdout", weechat_outputs) == -1) { weechat_printf (NULL, weechat_gettext ("%s%s: unable to redirect stdout"), weechat_prefix ("error"), PYTHON_PLUGIN_NAME); } - if (PySys_SetObject("stderr", weechat_outputs) == -1) + if (PySys_SetObject ("stderr", weechat_outputs) == -1) { weechat_printf (NULL, weechat_gettext ("%s%s: unable to redirect stderr"), @@ -746,13 +746,13 @@ weechat_python_load (const char *filename, const char *code) free (wargv[0]); wargv[0] = NULL; } - PySys_SetArgv(1, wargv); + PySys_SetArgv (1, wargv); if (wargv[0]) free (wargv[0]); } #else /* python <= 2.x */ - PySys_SetArgv(1, argv); + PySys_SetArgv (1, argv); #endif /* PY_MAJOR_VERSION >= 3 */ if (!python_current_interpreter) @@ -781,7 +781,7 @@ weechat_python_load (const char *filename, const char *code) snprintf (str_home, len, "%s/python", weechat_home); #if PY_MAJOR_VERSION >= 3 /* python >= 3.x */ - path = PyUnicode_FromString(str_home); + path = PyUnicode_FromString (str_home); #else /* python <= 2.x */ path = PyBytes_FromString (str_home); @@ -1500,8 +1500,8 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[]) NULL, &weechat_python_info_python2_bin_cb, NULL, NULL); - PyImport_AppendInittab("weechat", - &weechat_python_init_module_weechat); + PyImport_AppendInittab ("weechat", + &weechat_python_init_module_weechat); Py_Initialize (); if (Py_IsInitialized () == 0) diff --git a/src/plugins/relay/irc/relay-irc.c b/src/plugins/relay/irc/relay-irc.c index 3d206f071..a4003030e 100644 --- a/src/plugins/relay/irc/relay-irc.c +++ b/src/plugins/relay/irc/relay-irc.c @@ -1499,7 +1499,7 @@ relay_irc_recv (struct t_relay_client *client, const char *data) "weechat-relay-irc, running version %s", RELAY_IRC_DATA(client, address), RELAY_IRC_DATA(client, nick), - weechat_info_get("version", NULL)); + weechat_info_get ("version", NULL)); snprintf (str_time, sizeof (str_time), "%s", ctime (&client->listen_start_time)); if (str_time[0]) @@ -1514,7 +1514,7 @@ relay_irc_recv (struct t_relay_client *client, const char *data) RELAY_IRC_DATA(client, address), RELAY_IRC_DATA(client, nick), RELAY_IRC_DATA(client, address), - weechat_info_get("version", NULL)); + weechat_info_get ("version", NULL)); infolist_server = weechat_infolist_get ("irc_server", NULL, client->protocol_args); if (infolist_server) diff --git a/src/plugins/relay/relay-buffer.c b/src/plugins/relay/relay-buffer.c index 14da9745a..1b9ab9153 100644 --- a/src/plugins/relay/relay-buffer.c +++ b/src/plugins/relay/relay-buffer.c @@ -56,9 +56,9 @@ relay_buffer_refresh (const char *hotlist) client_selected = relay_client_search_by_number (relay_buffer_selected_line); weechat_printf_y (relay_buffer, 0, "%s%s%s%s%s%s%s", - weechat_color("green"), + weechat_color ("green"), _("Actions (letter+enter):"), - weechat_color("lightgreen"), + weechat_color ("lightgreen"), /* disconnect */ (client_selected && !RELAY_CLIENT_HAS_ENDED(client_selected)) ? @@ -119,9 +119,9 @@ relay_buffer_refresh (const char *hotlist) /* first line with status, description and bytes recv/sent */ weechat_printf_y (relay_buffer, (line * 2) + 2, _("%s%s[%s%s%s%s] %s, received: %s, sent: %s"), - weechat_color(str_color), + weechat_color (str_color), (line == relay_buffer_selected_line) ? "*** " : " ", - weechat_color(weechat_config_string (relay_config_color_status[ptr_client->status])), + weechat_color (weechat_config_string (relay_config_color_status[ptr_client->status])), str_status, weechat_color ("reset"), weechat_color (str_color), @@ -132,7 +132,7 @@ relay_buffer_refresh (const char *hotlist) /* second line with start/end time */ weechat_printf_y (relay_buffer, (line * 2) + 3, _("%s%-26s started on: %s, ended on: %s"), - weechat_color(str_color), + weechat_color (str_color), " ", str_date_start, str_date_end); diff --git a/src/plugins/relay/relay-completion.c b/src/plugins/relay/relay-completion.c index 5f6c5084d..f49cc7186 100644 --- a/src/plugins/relay/relay-completion.c +++ b/src/plugins/relay/relay-completion.c @@ -47,7 +47,7 @@ relay_completion_protocol_name_cb (const void *pointer, void *data, (void) buffer; (void) completion_item; - infolist = weechat_infolist_get("irc_server", NULL, NULL); + infolist = weechat_infolist_get ("irc_server", NULL, NULL); if (infolist) { while (weechat_infolist_next (infolist)) diff --git a/src/plugins/relay/weechat/relay-weechat-msg.c b/src/plugins/relay/weechat/relay-weechat-msg.c index fbab94a4d..5352ef5e5 100644 --- a/src/plugins/relay/weechat/relay-weechat-msg.c +++ b/src/plugins/relay/weechat/relay-weechat-msg.c @@ -904,9 +904,9 @@ relay_weechat_msg_add_nicklist_buffer (struct t_relay_weechat_msg *msg, relay_weechat_msg_add_pointer (msg, ptr_nick); relay_weechat_msg_add_char (msg, 0); /* group */ relay_weechat_msg_add_char (msg, - (char)weechat_hdata_integer(ptr_hdata_nick, - ptr_nick, - "visible")); + (char)weechat_hdata_integer (ptr_hdata_nick, + ptr_nick, + "visible")); relay_weechat_msg_add_int (msg, 0); /* level */ relay_weechat_msg_add_string (msg, weechat_hdata_string (ptr_hdata_nick, @@ -932,9 +932,9 @@ relay_weechat_msg_add_nicklist_buffer (struct t_relay_weechat_msg *msg, relay_weechat_msg_add_pointer (msg, ptr_group); relay_weechat_msg_add_char (msg, 1); /* group */ relay_weechat_msg_add_char (msg, - (char)weechat_hdata_integer(ptr_hdata_group, - ptr_group, - "visible")); + (char)weechat_hdata_integer (ptr_hdata_group, + ptr_group, + "visible")); relay_weechat_msg_add_int (msg, weechat_hdata_integer (ptr_hdata_group, ptr_group, diff --git a/src/plugins/ruby/weechat-ruby-api.c b/src/plugins/ruby/weechat-ruby-api.c index 9d3d8090d..84da52a96 100644 --- a/src/plugins/ruby/weechat-ruby-api.c +++ b/src/plugins/ruby/weechat-ruby-api.c @@ -6149,52 +6149,52 @@ weechat_ruby_api_upgrade_close (VALUE class, VALUE upgrade_file) void weechat_ruby_api_init (VALUE ruby_mWeechat) { - rb_define_const(ruby_mWeechat, "WEECHAT_RC_OK", INT2NUM(WEECHAT_RC_OK)); - rb_define_const(ruby_mWeechat, "WEECHAT_RC_OK_EAT", INT2NUM(WEECHAT_RC_OK_EAT)); - rb_define_const(ruby_mWeechat, "WEECHAT_RC_ERROR", INT2NUM(WEECHAT_RC_ERROR)); - - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_READ_OK", INT2NUM(WEECHAT_CONFIG_READ_OK)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_READ_MEMORY_ERROR", INT2NUM(WEECHAT_CONFIG_READ_MEMORY_ERROR)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_READ_FILE_NOT_FOUND", INT2NUM(WEECHAT_CONFIG_READ_FILE_NOT_FOUND)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_WRITE_OK", INT2NUM(WEECHAT_CONFIG_WRITE_OK)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_WRITE_ERROR", INT2NUM(WEECHAT_CONFIG_WRITE_ERROR)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_WRITE_MEMORY_ERROR", INT2NUM(WEECHAT_CONFIG_WRITE_MEMORY_ERROR)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_OPTION_SET_OK_CHANGED", INT2NUM(WEECHAT_CONFIG_OPTION_SET_OK_CHANGED)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE", INT2NUM(WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_OPTION_SET_ERROR", INT2NUM(WEECHAT_CONFIG_OPTION_SET_ERROR)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND", INT2NUM(WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET", INT2NUM(WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_OPTION_UNSET_OK_RESET", INT2NUM(WEECHAT_CONFIG_OPTION_UNSET_OK_RESET)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED", INT2NUM(WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED)); - rb_define_const(ruby_mWeechat, "WEECHAT_CONFIG_OPTION_UNSET_ERROR", INT2NUM(WEECHAT_CONFIG_OPTION_UNSET_ERROR)); - - rb_define_const(ruby_mWeechat, "WEECHAT_LIST_POS_SORT", rb_str_new2(WEECHAT_LIST_POS_SORT)); - rb_define_const(ruby_mWeechat, "WEECHAT_LIST_POS_BEGINNING", rb_str_new2(WEECHAT_LIST_POS_BEGINNING)); - rb_define_const(ruby_mWeechat, "WEECHAT_LIST_POS_END", rb_str_new2(WEECHAT_LIST_POS_END)); - - rb_define_const(ruby_mWeechat, "WEECHAT_HOTLIST_LOW", rb_str_new2(WEECHAT_HOTLIST_LOW)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOTLIST_MESSAGE", rb_str_new2(WEECHAT_HOTLIST_MESSAGE)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOTLIST_PRIVATE", rb_str_new2(WEECHAT_HOTLIST_PRIVATE)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOTLIST_HIGHLIGHT", rb_str_new2(WEECHAT_HOTLIST_HIGHLIGHT)); - - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_PROCESS_RUNNING", INT2NUM(WEECHAT_HOOK_PROCESS_RUNNING)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_PROCESS_ERROR", INT2NUM(WEECHAT_HOOK_PROCESS_ERROR)); - - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_OK", INT2NUM(WEECHAT_HOOK_CONNECT_OK)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND", INT2NUM(WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND", INT2NUM(WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED", INT2NUM(WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_PROXY_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_PROXY_ERROR)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_MEMORY_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_MEMORY_ERROR)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_TIMEOUT", INT2NUM(WEECHAT_HOOK_CONNECT_TIMEOUT)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_CONNECT_SOCKET_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_SOCKET_ERROR)); - - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_STRING", rb_str_new2(WEECHAT_HOOK_SIGNAL_STRING)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_INT", rb_str_new2(WEECHAT_HOOK_SIGNAL_INT)); - rb_define_const(ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_POINTER", rb_str_new2(WEECHAT_HOOK_SIGNAL_POINTER)); + rb_define_const (ruby_mWeechat, "WEECHAT_RC_OK", INT2NUM(WEECHAT_RC_OK)); + rb_define_const (ruby_mWeechat, "WEECHAT_RC_OK_EAT", INT2NUM(WEECHAT_RC_OK_EAT)); + rb_define_const (ruby_mWeechat, "WEECHAT_RC_ERROR", INT2NUM(WEECHAT_RC_ERROR)); + + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_READ_OK", INT2NUM(WEECHAT_CONFIG_READ_OK)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_READ_MEMORY_ERROR", INT2NUM(WEECHAT_CONFIG_READ_MEMORY_ERROR)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_READ_FILE_NOT_FOUND", INT2NUM(WEECHAT_CONFIG_READ_FILE_NOT_FOUND)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_WRITE_OK", INT2NUM(WEECHAT_CONFIG_WRITE_OK)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_WRITE_ERROR", INT2NUM(WEECHAT_CONFIG_WRITE_ERROR)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_WRITE_MEMORY_ERROR", INT2NUM(WEECHAT_CONFIG_WRITE_MEMORY_ERROR)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_OPTION_SET_OK_CHANGED", INT2NUM(WEECHAT_CONFIG_OPTION_SET_OK_CHANGED)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE", INT2NUM(WEECHAT_CONFIG_OPTION_SET_OK_SAME_VALUE)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_OPTION_SET_ERROR", INT2NUM(WEECHAT_CONFIG_OPTION_SET_ERROR)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND", INT2NUM(WEECHAT_CONFIG_OPTION_SET_OPTION_NOT_FOUND)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET", INT2NUM(WEECHAT_CONFIG_OPTION_UNSET_OK_NO_RESET)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_OPTION_UNSET_OK_RESET", INT2NUM(WEECHAT_CONFIG_OPTION_UNSET_OK_RESET)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED", INT2NUM(WEECHAT_CONFIG_OPTION_UNSET_OK_REMOVED)); + rb_define_const (ruby_mWeechat, "WEECHAT_CONFIG_OPTION_UNSET_ERROR", INT2NUM(WEECHAT_CONFIG_OPTION_UNSET_ERROR)); + + rb_define_const (ruby_mWeechat, "WEECHAT_LIST_POS_SORT", rb_str_new2 (WEECHAT_LIST_POS_SORT)); + rb_define_const (ruby_mWeechat, "WEECHAT_LIST_POS_BEGINNING", rb_str_new2 (WEECHAT_LIST_POS_BEGINNING)); + rb_define_const (ruby_mWeechat, "WEECHAT_LIST_POS_END", rb_str_new2 (WEECHAT_LIST_POS_END)); + + rb_define_const (ruby_mWeechat, "WEECHAT_HOTLIST_LOW", rb_str_new2 (WEECHAT_HOTLIST_LOW)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOTLIST_MESSAGE", rb_str_new2 (WEECHAT_HOTLIST_MESSAGE)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOTLIST_PRIVATE", rb_str_new2 (WEECHAT_HOTLIST_PRIVATE)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOTLIST_HIGHLIGHT", rb_str_new2 (WEECHAT_HOTLIST_HIGHLIGHT)); + + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_PROCESS_RUNNING", INT2NUM(WEECHAT_HOOK_PROCESS_RUNNING)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_PROCESS_ERROR", INT2NUM(WEECHAT_HOOK_PROCESS_ERROR)); + + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_OK", INT2NUM(WEECHAT_HOOK_CONNECT_OK)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND", INT2NUM(WEECHAT_HOOK_CONNECT_ADDRESS_NOT_FOUND)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND", INT2NUM(WEECHAT_HOOK_CONNECT_IP_ADDRESS_NOT_FOUND)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED", INT2NUM(WEECHAT_HOOK_CONNECT_CONNECTION_REFUSED)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_PROXY_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_PROXY_ERROR)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_LOCAL_HOSTNAME_ERROR)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_GNUTLS_INIT_ERROR)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_GNUTLS_HANDSHAKE_ERROR)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_MEMORY_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_MEMORY_ERROR)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_TIMEOUT", INT2NUM(WEECHAT_HOOK_CONNECT_TIMEOUT)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_CONNECT_SOCKET_ERROR", INT2NUM(WEECHAT_HOOK_CONNECT_SOCKET_ERROR)); + + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_STRING", rb_str_new2 (WEECHAT_HOOK_SIGNAL_STRING)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_INT", rb_str_new2 (WEECHAT_HOOK_SIGNAL_INT)); + rb_define_const (ruby_mWeechat, "WEECHAT_HOOK_SIGNAL_POINTER", rb_str_new2 (WEECHAT_HOOK_SIGNAL_POINTER)); API_DEF_FUNC(register, 7); API_DEF_FUNC(plugin_get_name, 1); diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c index 09c286453..1f928c1e5 100644 --- a/src/plugins/ruby/weechat-ruby.c +++ b/src/plugins/ruby/weechat-ruby.c @@ -186,16 +186,16 @@ weechat_ruby_hash_foreach_cb (VALUE key, VALUE value, void *arg) type_values = weechat_hashtable_get_string (hashtable, "type_values"); if (strcmp (type_values, WEECHAT_HASHTABLE_STRING) == 0) { - weechat_hashtable_set (hashtable, StringValuePtr(key), - StringValuePtr(value)); + weechat_hashtable_set (hashtable, StringValuePtr (key), + StringValuePtr (value)); } else if (strcmp (type_values, WEECHAT_HASHTABLE_POINTER) == 0) { - weechat_hashtable_set (hashtable, StringValuePtr(key), + weechat_hashtable_set (hashtable, StringValuePtr (key), plugin_script_str2ptr ( weechat_ruby_plugin, NULL, NULL, - StringValuePtr(value))); + StringValuePtr (value))); } } @@ -269,30 +269,30 @@ weechat_ruby_print_exception (VALUE err) char* err_msg; char* err_class; - backtrace = rb_protect_funcall (err, rb_intern("backtrace"), + backtrace = rb_protect_funcall (err, rb_intern ("backtrace"), &ruby_error, 0, NULL); - tmp1 = rb_protect_funcall(err, rb_intern("message"), &ruby_error, 0, NULL); - err_msg = StringValueCStr(tmp1); + tmp1 = rb_protect_funcall(err, rb_intern ("message"), &ruby_error, 0, NULL); + err_msg = StringValueCStr (tmp1); - tmp2 = rb_protect_funcall(rb_protect_funcall(err, rb_intern("class"), - &ruby_error, 0, NULL), - rb_intern("name"), &ruby_error, 0, NULL); - err_class = StringValuePtr(tmp2); + tmp2 = rb_protect_funcall (rb_protect_funcall (err, rb_intern ("class"), + &ruby_error, 0, NULL), + rb_intern ("name"), &ruby_error, 0, NULL); + err_class = StringValuePtr (tmp2); if (strcmp (err_class, "SyntaxError") == 0) { - tmp3 = rb_inspect(err); + tmp3 = rb_inspect (err); weechat_printf (NULL, weechat_gettext ("%s%s: error: %s"), weechat_prefix ("error"), RUBY_PLUGIN_NAME, - StringValuePtr(tmp3)); + StringValuePtr (tmp3)); } else { for (i = 0; i < RARRAY_LEN(backtrace); i++) { - line = StringValuePtr(RARRAY_PTR(backtrace)[i]); + line = StringValuePtr (RARRAY_PTR(backtrace)[i]); cline = NULL; if (i == 0) { @@ -311,8 +311,8 @@ weechat_ruby_print_exception (VALUE err) } else { - cline = (char *)calloc(strlen (line) + strlen (" from ") + 1, - sizeof (char)); + cline = (char *)calloc (strlen (line) + strlen (" from ") + 1, + sizeof (char)); if (cline) { strcat (cline, " from "); @@ -487,13 +487,13 @@ weechat_ruby_exec (struct t_plugin_script *script, if (argc > 0) { rc = rb_protect_funcall ((VALUE) script->interpreter, - rb_intern(function), + rb_intern (function), &ruby_error, argc, argv2); } else { rc = rb_protect_funcall ((VALUE) script->interpreter, - rb_intern(function), + rb_intern (function), &ruby_error, 0, NULL); } @@ -505,8 +505,8 @@ weechat_ruby_exec (struct t_plugin_script *script, weechat_gettext ("%s%s: unable to run function \"%s\""), weechat_prefix ("error"), RUBY_PLUGIN_NAME, function); - err = rb_gv_get("$!"); - weechat_ruby_print_exception(err); + err = rb_gv_get ("$!"); + weechat_ruby_print_exception (err); return NULL; } @@ -595,7 +595,7 @@ weechat_ruby_load (const char *filename, const char *code) ruby_current_script = NULL; ruby_registered_script = NULL; - snprintf (modname, sizeof(modname), "%s%d", MOD_NAME_PREFIX, ruby_num); + snprintf (modname, sizeof (modname), "%s%d", MOD_NAME_PREFIX, ruby_num); ruby_num++; ruby_current_module = rb_define_module (modname); @@ -610,8 +610,8 @@ weechat_ruby_load (const char *filename, const char *code) if (ruby_retcode == Qnil) { - err = rb_gv_get("$!"); - weechat_ruby_print_exception(err); + err = rb_gv_get ("$!"); + weechat_ruby_print_exception (err); return NULL; } @@ -662,8 +662,8 @@ weechat_ruby_load (const char *filename, const char *code) "\"weechat_init\" in file \"%s\""), weechat_prefix ("error"), RUBY_PLUGIN_NAME, filename); - err = rb_gv_get("$!"); - weechat_ruby_print_exception(err); + err = rb_gv_get ("$!"); + weechat_ruby_print_exception (err); if (ruby_current_script) { diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c index 7bd187886..95c8c7524 100644 --- a/src/plugins/script/script-repo.c +++ b/src/plugins/script/script-repo.c @@ -1039,7 +1039,7 @@ script_repo_file_exists () int rc; struct stat st; - filename = script_config_get_xml_filename(); + filename = script_config_get_xml_filename (); if (!filename) return 0; diff --git a/src/plugins/tcl/weechat-tcl.c b/src/plugins/tcl/weechat-tcl.c index 48301c7ab..11f80ff43 100644 --- a/src/plugins/tcl/weechat-tcl.c +++ b/src/plugins/tcl/weechat-tcl.c @@ -159,7 +159,7 @@ weechat_tcl_dict_to_hashtable (Tcl_Interp *interp, Tcl_Obj *dict, if (Tcl_DictObjFirst (interp, dict, &search, &key, &value, &done) == TCL_OK) { - for (; !done ; Tcl_DictObjNext(&search, &key, &value, &done)) + for (; !done ; Tcl_DictObjNext (&search, &key, &value, &done)) { if (strcmp (type_values, WEECHAT_HASHTABLE_STRING) == 0) { @@ -449,7 +449,7 @@ weechat_tcl_unload (struct t_plugin_script *script) plugin_script_remove (weechat_tcl_plugin, &tcl_scripts, &last_tcl_script, script); - Tcl_DeleteInterp(interp); + Tcl_DeleteInterp (interp); (void) weechat_hook_signal_send ("tcl_script_unloaded", WEECHAT_HOOK_SIGNAL_STRING, filename); diff --git a/src/plugins/xfer/xfer-buffer.c b/src/plugins/xfer/xfer-buffer.c index 079c4f7d9..608ccd25f 100644 --- a/src/plugins/xfer/xfer-buffer.c +++ b/src/plugins/xfer/xfer-buffer.c @@ -57,9 +57,9 @@ xfer_buffer_refresh (const char *hotlist) xfer_selected = xfer_search_by_number (xfer_buffer_selected_line); weechat_printf_y (xfer_buffer, 0, "%s%s%s%s%s%s%s%s", - weechat_color("green"), + weechat_color ("green"), _("Actions (letter+enter):"), - weechat_color("lightgreen"), + weechat_color ("lightgreen"), /* accept */ (xfer_selected && XFER_IS_RECV(xfer_selected->type) && (xfer_selected->status == XFER_STATUS_WAITING)) ? @@ -116,7 +116,7 @@ xfer_buffer_refresh (const char *hotlist) /* display first line with remote nick, filename and plugin name/id */ weechat_printf_y (xfer_buffer, (line * 2) + 2, "%s%s%-24s %s%s%s%s (%s.%s)%s%s", - weechat_color(str_color), + weechat_color (str_color), (line == xfer_buffer_selected_line) ? "*** " : " ", ptr_xfer->remote_nick, @@ -154,12 +154,12 @@ xfer_buffer_refresh (const char *hotlist) } weechat_printf_y (xfer_buffer, (line * 2) + 3, "%s%s%s %s%s%s%s%s", - weechat_color(str_color), + weechat_color (str_color), (line == xfer_buffer_selected_line) ? "*** " : " ", (XFER_IS_SEND(ptr_xfer->type)) ? "<<--" : "-->>", - weechat_color(weechat_config_string (xfer_config_color_status[ptr_xfer->status])), + weechat_color (weechat_config_string (xfer_config_color_status[ptr_xfer->status])), status, weechat_color ("reset"), weechat_color (str_color), @@ -228,10 +228,10 @@ xfer_buffer_refresh (const char *hotlist) /* display second line for file with status, progress bar and estimated time */ weechat_printf_y (xfer_buffer, (line * 2) + 3, "%s%s%s %s%s%s%s%3llu%% %s / %s (%s%s/s)", - weechat_color(str_color), + weechat_color (str_color), (line == xfer_buffer_selected_line) ? "*** " : " ", (XFER_IS_SEND(ptr_xfer->type)) ? "<<--" : "-->>", - weechat_color(weechat_config_string (xfer_config_color_status[ptr_xfer->status])), + weechat_color (weechat_config_string (xfer_config_color_status[ptr_xfer->status])), status, weechat_color (str_color), (progress_bar) ? progress_bar : "", diff --git a/src/plugins/xfer/xfer-command.c b/src/plugins/xfer/xfer-command.c index cebb5de0a..fd2d1d86c 100644 --- a/src/plugins/xfer/xfer-command.c +++ b/src/plugins/xfer/xfer-command.c @@ -147,8 +147,8 @@ xfer_command_xfer_list (int full) ptr_xfer->remote_nick, ptr_xfer->local_nick, date, - weechat_color( - weechat_config_string( + weechat_color ( + weechat_config_string ( xfer_config_color_status[ptr_xfer->status])), _(xfer_status_string[ptr_xfer->status])); } diff --git a/src/plugins/xfer/xfer-file.c b/src/plugins/xfer/xfer-file.c index 8d390f0ab..82853dd0a 100644 --- a/src/plugins/xfer/xfer-file.c +++ b/src/plugins/xfer/xfer-file.c @@ -103,7 +103,7 @@ xfer_file_find_filename (struct t_xfer *xfer) } strcpy (xfer->local_filename, path); - dir_separator = weechat_info_get("dir_separator", ""); + dir_separator = weechat_info_get ("dir_separator", ""); if (dir_separator && (xfer->local_filename[strlen (xfer->local_filename) - 1] != dir_separator[0])) strcat (xfer->local_filename, dir_separator); diff --git a/src/plugins/xfer/xfer.c b/src/plugins/xfer/xfer.c index b6c8edc2e..091bb06f1 100644 --- a/src/plugins/xfer/xfer.c +++ b/src/plugins/xfer/xfer.c @@ -688,11 +688,11 @@ xfer_new (const char *plugin_name, const char *plugin_id, if (XFER_IS_RECV(type)) { new_xfer->local_address_str = strdup (""); - xfer_set_remote_address(new_xfer, address, address_length, str_address); + xfer_set_remote_address (new_xfer, address, address_length, str_address); } else { - xfer_set_local_address(new_xfer, address, address_length, str_address); + xfer_set_local_address (new_xfer, address, address_length, str_address); new_xfer->remote_address_str = strdup (""); } @@ -1184,7 +1184,7 @@ xfer_add_cb (const void *pointer, void *data, } else { - memset(&bind_addr, 0, sizeof(bind_addr)); + memset (&bind_addr, 0, sizeof (bind_addr)); /* determine bind_addr family from either own_ip or default */ if (weechat_config_string (xfer_config_network_own_ip) |