summaryrefslogtreecommitdiff
path: root/src/plugins/scripts
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2010-03-19 23:33:14 +0100
committerSebastien Helleu <flashcode@flashtux.org>2010-03-19 23:33:14 +0100
commit2801b8437c0ee1c529244c1b7f7a6603e029a5a5 (patch)
tree506e97763d6dadc664a3811b600a0f2890cc0b4b /src/plugins/scripts
parentbc3fa9fd4cddd24d066b60f11c08d3c8e5ff1e61 (diff)
downloadweechat-2801b8437c0ee1c529244c1b7f7a6603e029a5a5.zip
Reformat multi-line comments
Diffstat (limited to 'src/plugins/scripts')
-rw-r--r--src/plugins/scripts/lua/Makefile.am2
-rw-r--r--src/plugins/scripts/lua/weechat-lua.c26
-rw-r--r--src/plugins/scripts/perl/weechat-perl-api.c2
-rw-r--r--src/plugins/scripts/perl/weechat-perl.c26
-rw-r--r--src/plugins/scripts/python/Makefile.am2
-rw-r--r--src/plugins/scripts/python/weechat-python.c34
-rw-r--r--src/plugins/scripts/ruby/Makefile.am2
-rw-r--r--src/plugins/scripts/ruby/weechat-ruby.c32
-rw-r--r--src/plugins/scripts/script.c2
-rw-r--r--src/plugins/scripts/tcl/weechat-tcl-api.c48
-rw-r--r--src/plugins/scripts/tcl/weechat-tcl.c24
11 files changed, 105 insertions, 95 deletions
diff --git a/src/plugins/scripts/lua/Makefile.am b/src/plugins/scripts/lua/Makefile.am
index f902d0bb3..8223bb55e 100644
--- a/src/plugins/scripts/lua/Makefile.am
+++ b/src/plugins/scripts/lua/Makefile.am
@@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(LUA_CFLAGS)
+INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(LUA_CFLAGS)
libdir = ${weechat_libdir}/plugins
diff --git a/src/plugins/scripts/lua/weechat-lua.c b/src/plugins/scripts/lua/weechat-lua.c
index 12ac19a85..f8c6469cf 100644
--- a/src/plugins/scripts/lua/weechat-lua.c
+++ b/src/plugins/scripts/lua/weechat-lua.c
@@ -48,18 +48,20 @@ struct t_plugin_script *lua_current_script = NULL;
const char *lua_current_script_filename = NULL;
lua_State *lua_current_interpreter = NULL;
-/* string used to execute action "install":
- when signal "lua_install_script" is received, name of string
- is added to this string, to be installed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "install":
+ * when signal "lua_install_script" is received, name of string
+ * is added to this string, to be installed later by a timer (when nothing is
+ * running in script)
+ */
char *lua_action_install_list = NULL;
-/* string used to execute action "remove":
- when signal "lua_remove_script" is received, name of string
- is added to this string, to be removed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "remove":
+ * when signal "lua_remove_script" is received, name of string
+ * is added to this string, to be removed later by a timer (when nothing is
+ * running in script)
+ */
char *lua_action_remove_list = NULL;
@@ -157,7 +159,7 @@ weechat_lua_exec (struct t_plugin_script *script,
lua_current_script = old_lua_current_script;
- return ret_value;
+ return ret_value;
}
int
@@ -218,7 +220,7 @@ weechat_lua_load (const char *filename)
#ifdef LUA_VERSION_NUM
if (luaL_dostring (lua_current_interpreter, weechat_lua_code) != 0)
-#else
+#else
if (lua_dostring (lua_current_interpreter, weechat_lua_code) != 0)
#endif
{
diff --git a/src/plugins/scripts/perl/weechat-perl-api.c b/src/plugins/scripts/perl/weechat-perl-api.c
index 08b84d8e7..bd674b9cb 100644
--- a/src/plugins/scripts/perl/weechat-perl-api.c
+++ b/src/plugins/scripts/perl/weechat-perl-api.c
@@ -4693,7 +4693,7 @@ XS (XS_weechat_api_nicklist_remove_group)
buffer = SvPV (ST (0), PL_na);
group = SvPV (ST (1), PL_na);
- weechat_nicklist_remove_group (script_str2ptr (buffer),
+ weechat_nicklist_remove_group (script_str2ptr (buffer),
script_str2ptr (group));
PERL_RETURN_OK;
diff --git a/src/plugins/scripts/perl/weechat-perl.c b/src/plugins/scripts/perl/weechat-perl.c
index 15a741545..212b07cee 100644
--- a/src/plugins/scripts/perl/weechat-perl.c
+++ b/src/plugins/scripts/perl/weechat-perl.c
@@ -46,18 +46,20 @@ struct t_plugin_script *perl_current_script = NULL;
const char *perl_current_script_filename = NULL;
int perl_quit_or_upgrade = 0;
-/* string used to execute action "install":
- when signal "perl_install_script" is received, name of string
- is added to this string, to be installed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "install":
+ * when signal "perl_install_script" is received, name of string
+ * is added to this string, to be installed later by a timer (when nothing is
+ * running in script)
+ */
char *perl_action_install_list = NULL;
-/* string used to execute action "remove":
- when signal "perl_remove_script" is received, name of string
- is added to this string, to be removed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "remove":
+ * when signal "perl_remove_script" is received, name of string
+ * is added to this string, to be removed later by a timer (when nothing is
+ * running in script)
+ */
char *perl_action_remove_list = NULL;
#ifdef NO_PERL_MULTIPLICITY
@@ -329,7 +331,7 @@ weechat_perl_load (const char *filename)
return 0;
}
- if (*eval != 0)
+ if (*eval != 0)
{
if (*eval == 2)
{
@@ -439,7 +441,7 @@ weechat_perl_unload (struct t_plugin_script *script)
PERL_SET_CONTEXT (script->interpreter);
#else
eval_pv (script->interpreter, TRUE);
-#endif
+#endif
if (script->shutdown_func && script->shutdown_func[0])
{
diff --git a/src/plugins/scripts/python/Makefile.am b/src/plugins/scripts/python/Makefile.am
index a7e1dcc1a..9e8b96ba9 100644
--- a/src/plugins/scripts/python/Makefile.am
+++ b/src/plugins/scripts/python/Makefile.am
@@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PYTHON_CFLAGS)
+INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(PYTHON_CFLAGS)
libdir = ${weechat_libdir}/plugins
diff --git a/src/plugins/scripts/python/weechat-python.c b/src/plugins/scripts/python/weechat-python.c
index a2dc8312a..e406de6b7 100644
--- a/src/plugins/scripts/python/weechat-python.c
+++ b/src/plugins/scripts/python/weechat-python.c
@@ -44,18 +44,20 @@ struct t_plugin_script *python_current_script = NULL;
const char *python_current_script_filename = NULL;
PyThreadState *python_mainThreadState = NULL;
-/* string used to execute action "install":
- when signal "python_install_script" is received, name of string
- is added to this string, to be installed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "install":
+ * when signal "python_install_script" is received, name of string
+ * is added to this string, to be installed later by a timer (when nothing is
+ * running in script)
+ */
char *python_action_install_list = NULL;
-/* string used to execute action "remove":
- when signal "python_remove_script" is received, name of string
- is added to this string, to be removed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "remove":
+ * when signal "python_remove_script" is received, name of string
+ * is added to this string, to be removed later by a timer (when nothing is
+ * running in script)
+ */
char *python_action_remove_list = NULL;
char python_buffer_output[128];
@@ -179,10 +181,10 @@ weechat_python_exec (struct t_plugin_script *script,
ret_value = NULL;
- /*
- ugly hack : rc = NULL while 'return weechat.WEECHAT_RC_OK ....
- because of '#define WEECHAT_RC_OK 0'
- */
+ /*
+ * ugly hack : rc = NULL while 'return weechat.WEECHAT_RC_OK ....
+ * because of '#define WEECHAT_RC_OK 0'
+ */
if (rc == NULL)
rc = PyInt_FromLong (0);
@@ -259,7 +261,7 @@ weechat_python_output (PyObject *self, PyObject *args)
python_buffer_output[0] = '\0';
}
}
- else
+ else
{
m = msg;
while ((p = strchr (m, '\n')) != NULL)
@@ -367,7 +369,7 @@ weechat_python_load (const char *filename)
return 0;
}
- /* adding $weechat_dir/python in $PYTHONPATH */
+ /* adding $weechat_dir/python in $PYTHONPATH */
python_path = PySys_GetObject ("path");
weechat_home = weechat_info_get ("weechat_dir", "");
if (weechat_home)
diff --git a/src/plugins/scripts/ruby/Makefile.am b/src/plugins/scripts/ruby/Makefile.am
index 79009c948..5b56e8612 100644
--- a/src/plugins/scripts/ruby/Makefile.am
+++ b/src/plugins/scripts/ruby/Makefile.am
@@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(RUBY_CFLAGS)
+INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\" $(RUBY_CFLAGS)
libdir = ${weechat_libdir}/plugins
diff --git a/src/plugins/scripts/ruby/weechat-ruby.c b/src/plugins/scripts/ruby/weechat-ruby.c
index 8179d758d..fe4a1181a 100644
--- a/src/plugins/scripts/ruby/weechat-ruby.c
+++ b/src/plugins/scripts/ruby/weechat-ruby.c
@@ -66,18 +66,20 @@ struct t_plugin_script *last_ruby_script = NULL;
struct t_plugin_script *ruby_current_script = NULL;
const char *ruby_current_script_filename = NULL;
-/* string used to execute action "install":
- when signal "ruby_install_script" is received, name of string
- is added to this string, to be installed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "install":
+ * when signal "ruby_install_script" is received, name of string
+ * is added to this string, to be installed later by a timer (when nothing is
+ * running in script)
+ */
char *ruby_action_install_list = NULL;
-/* string used to execute action "remove":
- when signal "ruby_remove_script" is received, name of string
- is added to this string, to be removed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "remove":
+ * when signal "ruby_remove_script" is received, name of string
+ * is added to this string, to be removed later by a timer (when nothing is
+ * running in script)
+ */
char *ruby_action_remove_list = NULL;
VALUE ruby_mWeechat, ruby_mWeechatOutputs;
@@ -95,11 +97,11 @@ typedef struct protect_call_arg {
} protect_call_arg_t;
-/*
+/*
* protect_funcall0 : used to protect a function call
*/
-static VALUE
+static VALUE
protect_funcall0 (VALUE arg)
{
return rb_funcall2 (((protect_call_arg_t *)arg)->recv,
@@ -108,7 +110,7 @@ protect_funcall0 (VALUE arg)
((protect_call_arg_t *)arg)->argv);
}
-/*
+/*
* rb_protect_funcall : function call in protect mode
*/
@@ -389,7 +391,7 @@ weechat_ruby_exec (struct t_plugin_script *script,
* weechat_ruby_output: redirection for stdout and stderr
*/
-static VALUE
+static VALUE
weechat_ruby_output (VALUE self, VALUE str)
{
char *msg, *p, *m;
@@ -436,7 +438,7 @@ weechat_ruby_output (VALUE self, VALUE str)
* weechat_ruby_output_flush: just for compatibility
*/
-static VALUE
+static VALUE
weechat_ruby_output_flush (VALUE self)
{
/* make C compiler happy */
diff --git a/src/plugins/scripts/script.c b/src/plugins/scripts/script.c
index 20b8712fe..1afaa40b7 100644
--- a/src/plugins/scripts/script.c
+++ b/src/plugins/scripts/script.c
@@ -558,7 +558,7 @@ script_search_path (struct t_weechat_plugin *weechat_plugin,
}
/*
- * script_find_pos: find position for a script (for sorting scripts list)
+ * script_find_pos: find position for a script (for sorting scripts list)
*/
struct t_plugin_script *
diff --git a/src/plugins/scripts/tcl/weechat-tcl-api.c b/src/plugins/scripts/tcl/weechat-tcl-api.c
index 84f75aa7d..d239b9983 100644
--- a/src/plugins/scripts/tcl/weechat-tcl-api.c
+++ b/src/plugins/scripts/tcl/weechat-tcl-api.c
@@ -19,7 +19,7 @@
/* weechat-tcl-api.c: Tcl API functions */
-#undef _
+#undef _
#include <tcl.h>
#include <stdlib.h>
@@ -234,7 +234,7 @@ weechat_tcl_api_plugin_get_name (ClientData clientData, Tcl_Interp *interp,
Tcl_Obj* objp;
char *plugin;
const char *result;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -267,7 +267,7 @@ weechat_tcl_api_charset_set (ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj* objp;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -301,7 +301,7 @@ weechat_tcl_api_iconv_to_internal (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *result, *charset, *string;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -337,7 +337,7 @@ weechat_tcl_api_iconv_from_internal (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *result, *charset, *string;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -372,7 +372,7 @@ weechat_tcl_api_gettext (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
const char *result;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -692,7 +692,7 @@ weechat_tcl_api_list_add (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *result, *weelist, *data, *where, *user_data;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -733,7 +733,7 @@ weechat_tcl_api_list_search (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *result, *weelist, *data;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -769,7 +769,7 @@ weechat_tcl_api_list_casesearch (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *result, *weelist, *data;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -844,7 +844,7 @@ weechat_tcl_api_list_set (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *item, *new_value;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -879,7 +879,7 @@ weechat_tcl_api_list_next (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *result;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -911,7 +911,7 @@ weechat_tcl_api_list_prev (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *result;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -943,7 +943,7 @@ weechat_tcl_api_list_string (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
const char *result;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -975,7 +975,7 @@ weechat_tcl_api_list_size (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
int size;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -1007,7 +1007,7 @@ weechat_tcl_api_list_remove (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *weelist, *item;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -1071,7 +1071,7 @@ weechat_tcl_api_list_free (ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj* objp;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -1145,7 +1145,7 @@ weechat_tcl_api_config_new (ClientData clientData, Tcl_Interp *interp,
{
Tcl_Obj* objp;
char *result, *name, *function, *data;
- int i;
+ int i;
/* make C compiler happy */
(void) clientData;
@@ -1411,7 +1411,7 @@ weechat_tcl_api_config_new_section (ClientData clientData, Tcl_Interp *interp,
int i, can_add, can_delete;
/* make C compiler happy */
- (void) clientData;
+ (void) clientData;
if (!tcl_current_script)
{
@@ -1744,7 +1744,7 @@ weechat_tcl_api_config_string_to_boolean (ClientData clientData, Tcl_Interp *int
int objc, Tcl_Obj *CONST objv[])
{
Tcl_Obj* objp;
- int result, i;
+ int result, i;
/* make C compiler happy */
(void) clientData;
@@ -2893,7 +2893,7 @@ weechat_tcl_api_print_date_tags (ClientData clientData, Tcl_Interp *interp,
{
WEECHAT_SCRIPT_MSG_WRONG_ARGS(TCL_CURRENT_SCRIPT_NAME, "print_date_tags");
TCL_RETURN_EMPTY;
- }
+ }
buffer = Tcl_GetStringFromObj (objv[1], &i);
tags = Tcl_GetStringFromObj (objv[3], &i);
@@ -5259,7 +5259,7 @@ weechat_tcl_api_nicklist_remove_group (ClientData clientData, Tcl_Interp *interp
buffer = Tcl_GetStringFromObj (objv[1], &i);
group = Tcl_GetStringFromObj (objv[2], &i);
- weechat_nicklist_remove_group (script_str2ptr (buffer),
+ weechat_nicklist_remove_group (script_str2ptr (buffer),
script_str2ptr (group));
TCL_RETURN_OK;
@@ -6435,7 +6435,7 @@ weechat_tcl_api_upgrade_read (ClientData clientData, Tcl_Interp *interp,
int i, rc;
/* make C compiler happy */
- (void) clientData;
+ (void) clientData;
if (!tcl_current_script)
{
@@ -6506,10 +6506,10 @@ void weechat_tcl_api_init (Tcl_Interp *interp)
int i;
Tcl_Obj *objp;
- /* standard initializer */
+ /* standard initializer */
Tcl_Init (interp);
- Tcl_Eval (interp,"namespace eval weechat {}");
+ Tcl_Eval (interp,"namespace eval weechat {}");
/* interface constants */
/* set variables, TODO: make them unmodifiable (thru Tcl_TraceVar) ? */
diff --git a/src/plugins/scripts/tcl/weechat-tcl.c b/src/plugins/scripts/tcl/weechat-tcl.c
index 89c7e40c4..4a5a05666 100644
--- a/src/plugins/scripts/tcl/weechat-tcl.c
+++ b/src/plugins/scripts/tcl/weechat-tcl.c
@@ -48,18 +48,20 @@ struct t_plugin_script *last_tcl_script = NULL;
struct t_plugin_script *tcl_current_script = NULL;
const char *tcl_current_script_filename = NULL;
-/* string used to execute action "install":
- when signal "tcl_install_script" is received, name of string
- is added to this string, to be installed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "install":
+ * when signal "tcl_install_script" is received, name of string
+ * is added to this string, to be installed later by a timer (when nothing is
+ * running in script)
+ */
char *tcl_action_install_list = NULL;
-/* string used to execute action "remove":
- when signal "tcl_remove_script" is received, name of string
- is added to this string, to be removed later by a timer (when nothing is
- running in script)
-*/
+/*
+ * string used to execute action "remove":
+ * when signal "tcl_remove_script" is received, name of string
+ * is added to this string, to be removed later by a timer (when nothing is
+ * running in script)
+ */
char *tcl_action_remove_list = NULL;
Tcl_Interp* cinterp;
@@ -85,7 +87,7 @@ weechat_tcl_exec (struct t_plugin_script *script,
tcl_current_script = script;
interp = (Tcl_Interp*)script->interpreter;
- if (function && function[0])
+ if (function && function[0])
{
cmdlist = Tcl_NewListObj(0,NULL);
Tcl_IncrRefCount(cmdlist); /* +1 */