diff options
Diffstat (limited to 'src/plugins')
37 files changed, 227 insertions, 226 deletions
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) |