summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/wee-command.c2
-rw-r--r--src/core/wee-doc.c20
-rw-r--r--src/gui/curses/gui-curses-chat.c35
-rw-r--r--src/gui/curses/gui-curses-key.c2
-rw-r--r--src/gui/curses/headless/main.c4
-rw-r--r--src/gui/gui-completion.c2
-rw-r--r--src/plugins/fifo/fifo.c2
-rw-r--r--src/plugins/guile/weechat-guile-api.c6
-rw-r--r--src/plugins/irc/irc-batch.c2
-rw-r--r--src/plugins/irc/irc-protocol.c2
-rw-r--r--src/plugins/perl/weechat-perl.c8
-rw-r--r--src/plugins/php/weechat-php.c2
-rw-r--r--src/plugins/python/weechat-python-api.c8
-rw-r--r--src/plugins/python/weechat-python.c4
-rw-r--r--src/plugins/relay/weechat/relay-weechat-msg.c2
-rw-r--r--src/plugins/ruby/weechat-ruby.c2
16 files changed, 54 insertions, 49 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 5bc648dc1..82b8b292b 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -7117,7 +7117,7 @@ COMMAND_CALLBACK(upgrade)
(void) hook_signal_send ("upgrade", WEECHAT_HOOK_SIGNAL_STRING,
"save");
/* save WeeChat session */
- if (!upgrade_weechat_save())
+ if (!upgrade_weechat_save ())
{
gui_chat_printf (NULL,
_("%sUnable to save WeeChat session "
diff --git a/src/core/wee-doc.c b/src/core/wee-doc.c
index dd84a8ece..ed59de52f 100644
--- a/src/core/wee-doc.c
+++ b/src/core/wee-doc.c
@@ -208,9 +208,9 @@ doc_gen_check_command (const char *plugin, const char *command)
return 1;
/* document other options only for weechat, irc, xfer */
- return((strcmp (plugin, "weechat") == 0)
- || (strcmp (plugin, "irc") == 0)
- || (strcmp (plugin, "xfer") == 0)) ?
+ return ((strcmp (plugin, "weechat") == 0)
+ || (strcmp (plugin, "irc") == 0)
+ || (strcmp (plugin, "xfer") == 0)) ?
1 : 0;
}
@@ -644,11 +644,11 @@ doc_gen_user_default_aliases (const char *path, const char *lang)
ptr_infolist = hook_infolist_get (NULL, "alias_default", NULL, NULL);
while (infolist_next (ptr_infolist))
{
- ptr_completion = infolist_string(ptr_infolist, "completion");
+ ptr_completion = infolist_string (ptr_infolist, "completion");
string_fprintf (file,
"| /%s | /%s | %s\n",
- ESCAPE_TABLE(infolist_string(ptr_infolist, "name")),
- ESCAPE_TABLE(infolist_string(ptr_infolist, "command")),
+ ESCAPE_TABLE(infolist_string (ptr_infolist, "name")),
+ ESCAPE_TABLE(infolist_string (ptr_infolist, "command")),
(ptr_completion && ptr_completion[0]) ?
ESCAPE_TABLE(ptr_completion) : "-");
}
@@ -695,8 +695,8 @@ doc_gen_user_irc_colors (const char *path, const char *lang)
string_fprintf (
file,
"| %s | %s\n",
- ESCAPE_TABLE(infolist_string(ptr_infolist, "color_irc")),
- ESCAPE_TABLE(infolist_string(ptr_infolist, "color_weechat")));
+ ESCAPE_TABLE(infolist_string (ptr_infolist, "color_irc")),
+ ESCAPE_TABLE(infolist_string (ptr_infolist, "color_weechat")));
}
infolist_free (ptr_infolist);
@@ -1156,11 +1156,11 @@ doc_gen_api_hdata_content (FILE *file, struct t_hdata *hdata)
}
hashtable_remove_all (hashtable);
hashtable_set (hashtable, "__create_allowed", "");
- if (hdata_update(hdata, NULL, hashtable))
+ if (hdata_update (hdata, NULL, hashtable))
arraylist_add (list_vars_update, "{hdata_update_create}");
hashtable_remove_all (hashtable);
hashtable_set (hashtable, "__delete_allowed", "");
- if (hdata_update(hdata, NULL, hashtable))
+ if (hdata_update (hdata, NULL, hashtable))
arraylist_add (list_vars_update, "{hdata_update_delete}");
list_size = arraylist_size (list_vars_update);
if (list_size > 0)
diff --git a/src/gui/curses/gui-curses-chat.c b/src/gui/curses/gui-curses-chat.c
index cfdfd2f9b..0caf0f90d 100644
--- a/src/gui/curses/gui-curses-chat.c
+++ b/src/gui/curses/gui-curses-chat.c
@@ -607,14 +607,16 @@ gui_chat_display_word (struct t_gui_window *window,
ptr_data = data;
while (ptr_data && ptr_data[0])
{
- chars_displayed += gui_chat_display_prefix_suffix(window, line,
- word + (ptr_data - data),
- pre_lines_displayed,
- lines_displayed,
- chars_displayed,
- simulate,
- apply_style_inactive,
- nick_offline);
+ chars_displayed += gui_chat_display_prefix_suffix (
+ window,
+ line,
+ word + (ptr_data - data),
+ pre_lines_displayed,
+ lines_displayed,
+ chars_displayed,
+ simulate,
+ apply_style_inactive,
+ nick_offline);
chars_to_display = gui_chat_strlen_screen (ptr_data);
@@ -1528,13 +1530,16 @@ gui_chat_display_line (struct t_gui_window *window, struct t_gui_line *line,
gui_chat_display_new_line (window, num_lines, count,
&lines_displayed, simulate);
ptr_data++;
- gui_chat_display_prefix_suffix(window, line,
- ptr_data,
- pre_lines_displayed, &lines_displayed,
- 0,
- simulate,
- CONFIG_BOOLEAN(config_look_color_inactive_message),
- 0);
+ gui_chat_display_prefix_suffix (
+ window,
+ line,
+ ptr_data,
+ pre_lines_displayed,
+ &lines_displayed,
+ 0,
+ simulate,
+ CONFIG_BOOLEAN(config_look_color_inactive_message),
+ 0);
}
gui_chat_get_word_info (window,
diff --git a/src/gui/curses/gui-curses-key.c b/src/gui/curses/gui-curses-key.c
index 51096c4ca..24896e107 100644
--- a/src/gui/curses/gui-curses-key.c
+++ b/src/gui/curses/gui-curses-key.c
@@ -46,7 +46,7 @@
#include "gui-curses.h"
#define BIND(key, command) \
- gui_key_default_bind(context, key, command, create_option)
+ gui_key_default_bind (context, key, command, create_option)
/*
diff --git a/src/gui/curses/headless/main.c b/src/gui/curses/headless/main.c
index 3d49c4109..6e836807e 100644
--- a/src/gui/curses/headless/main.c
+++ b/src/gui/curses/headless/main.c
@@ -50,7 +50,7 @@ daemonize ()
printf (_("Running WeeChat in background..."));
printf (" ");
- pid = fork();
+ pid = fork ();
if (pid < 0)
{
@@ -73,7 +73,7 @@ daemonize ()
setsid ();
/* close all file descriptors */
- for (i = sysconf(_SC_OPEN_MAX); i >= 0; --i)
+ for (i = sysconf (_SC_OPEN_MAX); i >= 0; --i)
{
close (i);
}
diff --git a/src/gui/gui-completion.c b/src/gui/gui-completion.c
index 2b2c4a3be..cab7c6385 100644
--- a/src/gui/gui-completion.c
+++ b/src/gui/gui-completion.c
@@ -1351,7 +1351,7 @@ gui_completion_command (struct t_gui_completion *completion)
*/
char *
-gui_completion_get_default_template(struct t_gui_completion *completion)
+gui_completion_get_default_template (struct t_gui_completion *completion)
{
const char *ptr_default_template;
char *value;
diff --git a/src/plugins/fifo/fifo.c b/src/plugins/fifo/fifo.c
index 904ecd5f5..42c5e98df 100644
--- a/src/plugins/fifo/fifo.c
+++ b/src/plugins/fifo/fifo.c
@@ -261,7 +261,7 @@ fifo_exec (const char *text)
free (text2);
if (command_unescaped)
- free(command_unescaped);
+ free (command_unescaped);
}
/*
diff --git a/src/plugins/guile/weechat-guile-api.c b/src/plugins/guile/weechat-guile-api.c
index 55f8ce7ec..ff2c051cb 100644
--- a/src/plugins/guile/weechat-guile-api.c
+++ b/src/plugins/guile/weechat-guile-api.c
@@ -60,8 +60,8 @@
GUILE_CURRENT_SCRIPT_NAME, \
guile_function_name, __string)
#define API_SCM_TO_STRING(__str) \
- weechat_guile_api_scm_to_string(__str, \
- guile_strings, &guile_num_strings)
+ weechat_guile_api_scm_to_string (__str, \
+ guile_strings, &guile_num_strings)
#define API_FREE_STRINGS \
if (guile_num_strings > 0) \
{ \
@@ -76,7 +76,7 @@
return scm_from_int (0)
#define API_RETURN_EMPTY \
API_FREE_STRINGS; \
- return scm_from_locale_string("")
+ return scm_from_locale_string ("")
#define API_RETURN_STRING(__string) \
return_value = scm_from_locale_string ((__string) ? __string : ""); \
API_FREE_STRINGS; \
diff --git a/src/plugins/irc/irc-batch.c b/src/plugins/irc/irc-batch.c
index 337c29a0d..1fe40f2fb 100644
--- a/src/plugins/irc/irc-batch.c
+++ b/src/plugins/irc/irc-batch.c
@@ -80,7 +80,7 @@ irc_batch_generate_random_ref (char *string, int size)
length_chars = strlen (chars);
for (i = 0; i < size; i++)
{
- string[i] = chars[rand() % length_chars];
+ string[i] = chars[rand () % length_chars];
}
string[size] = '\0';
}
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c
index 33056b59a..2a42d5115 100644
--- a/src/plugins/irc/irc-protocol.c
+++ b/src/plugins/irc/irc-protocol.c
@@ -4075,7 +4075,7 @@ IRC_PROTOCOL_CALLBACK(001)
}
else
{
- length = 1 + strlen(command3) + 1;
+ length = 1 + strlen (command3) + 1;
slash_command = malloc (length);
if (slash_command)
{
diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c
index d6c3475ff..c851d2672 100644
--- a/src/plugins/perl/weechat-perl.c
+++ b/src/plugins/perl/weechat-perl.c
@@ -366,16 +366,16 @@ weechat_perl_exec (struct t_plugin_script *script,
{
case 's': /* string or null */
if (argv[i])
- XPUSHs (sv_2mortal(newSVpv((char *)argv[i], 0)));
+ XPUSHs (sv_2mortal (newSVpv((char *)argv[i], 0)));
else
- XPUSHs (sv_2mortal(&PL_sv_undef));
+ XPUSHs (sv_2mortal (&PL_sv_undef));
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;
}
}
diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c
index 23890a3d5..39d909557 100644
--- a/src/plugins/php/weechat-php.c
+++ b/src/plugins/php/weechat-php.c
@@ -708,7 +708,7 @@ weechat_php_load (const char *filename, const char *code)
memset (&file_handle, 0, sizeof (file_handle));
file_handle.type = ZEND_HANDLE_FILENAME;
#if PHP_VERSION_ID >= 80100
- file_handle.filename = zend_string_init(filename, strlen(filename), 0);
+ file_handle.filename = zend_string_init (filename, strlen(filename), 0);
#else
file_handle.filename = filename;
#endif
diff --git a/src/plugins/python/weechat-python-api.c b/src/plugins/python/weechat-python-api.c
index 2cb87d55f..15c1a41ee 100644
--- a/src/plugins/python/weechat-python-api.c
+++ b/src/plugins/python/weechat-python-api.c
@@ -59,7 +59,7 @@
plugin_script_str2ptr (weechat_python_plugin, \
PYTHON_CURRENT_SCRIPT_NAME, \
python_function_name, __string)
-#define API_RETURN_OK return PyLong_FromLong((long)1)
+#define API_RETURN_OK return PyLong_FromLong ((long)1)
#define API_RETURN_ERROR return PyLong_FromLong ((long)0)
#define API_RETURN_EMPTY \
Py_INCREF (Py_None); \
@@ -77,11 +77,11 @@
} \
return Py_BuildValue ("s", "")
#define API_RETURN_INT(__int) \
- return PyLong_FromLong((long)__int)
+ return PyLong_FromLong ((long)__int)
#define API_RETURN_LONG(__long) \
- return PyLong_FromLong(__long)
+ return PyLong_FromLong (__long)
#define API_RETURN_LONGLONG(__longlong) \
- return PyLong_FromLongLong(__longlong)
+ return PyLong_FromLongLong (__longlong)
/*
diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c
index edbc26b16..4fedb3e7f 100644
--- a/src/plugins/python/weechat-python.c
+++ b/src/plugins/python/weechat-python.c
@@ -1504,9 +1504,9 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
/* PyEval_InitThreads(); */
/* python_mainThreadState = PyThreadState_Swap(NULL); */
#if PY_VERSION_HEX >= 0x03070000
- python_mainThreadState = PyThreadState_Get();
+ python_mainThreadState = PyThreadState_Get ();
#else
- python_mainThreadState = PyEval_SaveThread();
+ python_mainThreadState = PyEval_SaveThread ();
#endif
/* PyEval_ReleaseLock (); */
diff --git a/src/plugins/relay/weechat/relay-weechat-msg.c b/src/plugins/relay/weechat/relay-weechat-msg.c
index aab57d87e..f4c9b9359 100644
--- a/src/plugins/relay/weechat/relay-weechat-msg.c
+++ b/src/plugins/relay/weechat/relay-weechat-msg.c
@@ -1135,7 +1135,7 @@ relay_weechat_msg_compress_zstd (struct t_relay_client *client,
compression_level = (((compression - 1) * 19) / 100) + 1;
gettimeofday (&tv1, NULL);
- comp_size = ZSTD_compress(
+ comp_size = ZSTD_compress (
dest + 5,
dest_size,
(void *)(msg->data + 5),
diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c
index 8e43b94fb..02f74b072 100644
--- a/src/plugins/ruby/weechat-ruby.c
+++ b/src/plugins/ruby/weechat-ruby.c
@@ -274,7 +274,7 @@ weechat_ruby_print_exception (VALUE err)
backtrace = rb_protect_funcall (err, rb_intern ("backtrace"),
&ruby_error, 0, NULL);
- message = rb_protect_funcall(err, rb_intern ("message"), &ruby_error, 0, NULL);
+ message = rb_protect_funcall (err, rb_intern ("message"), &ruby_error, 0, NULL);
err_msg = StringValueCStr (message);
err_class = NULL;