mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 22:06:38 +02:00
Add "const" keyword for some "char *" function arguments (core and plugins API)
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -43,7 +43,7 @@ struct t_weechat_plugin *weechat_lua_plugin;
|
||||
|
||||
struct t_plugin_script *lua_scripts = NULL;
|
||||
struct t_plugin_script *lua_current_script = NULL;
|
||||
char *lua_current_script_filename = NULL;
|
||||
const char *lua_current_script_filename = NULL;
|
||||
lua_State *lua_current_interpreter = NULL;
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ lua_State *lua_current_interpreter = NULL;
|
||||
|
||||
void *
|
||||
weechat_lua_exec (struct t_plugin_script *script,
|
||||
int ret_type, char *function, char **argv)
|
||||
int ret_type, const char *function, char **argv)
|
||||
{
|
||||
void *ret_value;
|
||||
int argc, *ret_i;
|
||||
@@ -127,7 +127,7 @@ weechat_lua_exec (struct t_plugin_script *script,
|
||||
}
|
||||
|
||||
int
|
||||
weechat_lua_load (char *filename)
|
||||
weechat_lua_load (const char *filename)
|
||||
{
|
||||
FILE *fp;
|
||||
char *weechat_lua_code = {
|
||||
@@ -247,7 +247,7 @@ weechat_lua_load (char *filename)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_lua_load_cb (void *data, char *filename)
|
||||
weechat_lua_load_cb (void *data, const char *filename)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
@@ -292,7 +292,7 @@ weechat_lua_unload (struct t_plugin_script *script)
|
||||
*/
|
||||
|
||||
void
|
||||
weechat_lua_unload_name (char *name)
|
||||
weechat_lua_unload_name (const char *name)
|
||||
{
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
@@ -413,7 +413,7 @@ weechat_lua_command_cb (void *data, struct t_gui_buffer *buffer,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_lua_completion_cb (void *data, char *completion,
|
||||
weechat_lua_completion_cb (void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list)
|
||||
{
|
||||
@@ -432,7 +432,7 @@ weechat_lua_completion_cb (void *data, char *completion,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_lua_debug_dump_cb (void *data, char *signal, char *type_data,
|
||||
weechat_lua_debug_dump_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
@@ -451,7 +451,7 @@ weechat_lua_debug_dump_cb (void *data, char *signal, char *type_data,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_lua_buffer_closed_cb (void *data, char *signal, char *type_data,
|
||||
weechat_lua_buffer_closed_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
|
||||
@@ -26,10 +26,11 @@ extern struct t_weechat_plugin *weechat_lua_plugin;
|
||||
|
||||
extern struct t_plugin_script *lua_scripts;
|
||||
extern struct t_plugin_script *lua_current_script;
|
||||
extern char *lua_current_script_filename;
|
||||
extern const char *lua_current_script_filename;
|
||||
extern lua_State *lua_current_interpreter;
|
||||
|
||||
extern void * weechat_lua_exec (struct t_plugin_script *script,
|
||||
int ret_type, char *function, char **argv);
|
||||
extern void *weechat_lua_exec (struct t_plugin_script *script,
|
||||
int ret_type, const char *function,
|
||||
char **argv);
|
||||
|
||||
#endif /* weechat-lua.h */
|
||||
|
||||
@@ -803,7 +803,7 @@ static XS (XS_weechat_config_new)
|
||||
void
|
||||
weechat_perl_api_config_section_read_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *option_name, char *value)
|
||||
const char *option_name, const char *value)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *perl_argv[4];
|
||||
@@ -814,8 +814,8 @@ weechat_perl_api_config_section_read_cb (void *data,
|
||||
if (script_callback->function && script_callback->function[0])
|
||||
{
|
||||
perl_argv[0] = script_ptr2str (config_file);
|
||||
perl_argv[1] = option_name;
|
||||
perl_argv[2] = value;
|
||||
perl_argv[1] = (char *)option_name;
|
||||
perl_argv[2] = (char *)value;
|
||||
perl_argv[3] = NULL;
|
||||
|
||||
rc = (int *) weechat_perl_exec (script_callback->script,
|
||||
@@ -837,7 +837,7 @@ weechat_perl_api_config_section_read_cb (void *data,
|
||||
void
|
||||
weechat_perl_api_config_section_write_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name)
|
||||
const char *section_name)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *perl_argv[3];
|
||||
@@ -848,7 +848,7 @@ weechat_perl_api_config_section_write_cb (void *data,
|
||||
if (script_callback->function && script_callback->function[0])
|
||||
{
|
||||
perl_argv[0] = script_ptr2str (config_file);
|
||||
perl_argv[1] = section_name;
|
||||
perl_argv[1] = (char *)section_name;
|
||||
perl_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_perl_exec (script_callback->script,
|
||||
@@ -871,7 +871,7 @@ weechat_perl_api_config_section_write_cb (void *data,
|
||||
void
|
||||
weechat_perl_api_config_section_write_default_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name)
|
||||
const char *section_name)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *perl_argv[3];
|
||||
@@ -882,7 +882,7 @@ weechat_perl_api_config_section_write_default_cb (void *data,
|
||||
if (script_callback->function && script_callback->function[0])
|
||||
{
|
||||
perl_argv[0] = script_ptr2str (config_file);
|
||||
perl_argv[1] = section_name;
|
||||
perl_argv[1] = (char *)section_name;
|
||||
perl_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_perl_exec (script_callback->script,
|
||||
@@ -905,8 +905,8 @@ int
|
||||
weechat_perl_api_config_section_create_option_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
struct t_config_section *section,
|
||||
char *option_name,
|
||||
char *value)
|
||||
const char *option_name,
|
||||
const char *value)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *perl_argv[5];
|
||||
@@ -918,8 +918,8 @@ weechat_perl_api_config_section_create_option_cb (void *data,
|
||||
{
|
||||
perl_argv[0] = script_ptr2str (config_file);
|
||||
perl_argv[1] = script_ptr2str (section);
|
||||
perl_argv[2] = option_name;
|
||||
perl_argv[3] = value;
|
||||
perl_argv[2] = (char *)option_name;
|
||||
perl_argv[3] = (char *)value;
|
||||
perl_argv[4] = NULL;
|
||||
|
||||
rc = (int *) weechat_perl_exec (script_callback->script,
|
||||
@@ -2101,7 +2101,7 @@ static XS (XS_weechat_hook_fd)
|
||||
int
|
||||
weechat_perl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
|
||||
time_t date, int tags_count, char **tags,
|
||||
char *prefix, char *message)
|
||||
const char *prefix, const char *message)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *perl_argv[6];
|
||||
@@ -2118,8 +2118,8 @@ weechat_perl_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
|
||||
perl_argv[0] = script_ptr2str (buffer);
|
||||
perl_argv[1] = timebuffer;
|
||||
perl_argv[2] = weechat_string_build_with_exploded (tags, ",");
|
||||
perl_argv[3] = prefix;
|
||||
perl_argv[4] = message;
|
||||
perl_argv[3] = (char *)prefix;
|
||||
perl_argv[4] = (char *)message;
|
||||
perl_argv[5] = NULL;
|
||||
|
||||
rc = (int *) weechat_perl_exec (script_callback->script,
|
||||
@@ -2187,7 +2187,7 @@ static XS (XS_weechat_hook_print)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_perl_api_hook_signal_cb (void *data, char *signal, char *type_data,
|
||||
weechat_perl_api_hook_signal_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
@@ -2197,7 +2197,7 @@ weechat_perl_api_hook_signal_cb (void *data, char *signal, char *type_data,
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
perl_argv[0] = signal;
|
||||
perl_argv[0] = (char *)signal;
|
||||
free_needed = 0;
|
||||
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
|
||||
{
|
||||
@@ -2329,7 +2329,7 @@ static XS (XS_weechat_hook_signal_send)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_perl_api_hook_config_cb (void *data, char *option, char *value)
|
||||
weechat_perl_api_hook_config_cb (void *data, const char *option, const char *value)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *perl_argv[3];
|
||||
@@ -2337,8 +2337,8 @@ weechat_perl_api_hook_config_cb (void *data, char *option, char *value)
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
perl_argv[0] = option;
|
||||
perl_argv[1] = value;
|
||||
perl_argv[0] = (char *)option;
|
||||
perl_argv[1] = (char *)value;
|
||||
perl_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_perl_exec (script_callback->script,
|
||||
@@ -2397,7 +2397,7 @@ static XS (XS_weechat_hook_config)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_perl_api_hook_completion_cb (void *data, char *completion,
|
||||
weechat_perl_api_hook_completion_cb (void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list)
|
||||
{
|
||||
@@ -2407,7 +2407,7 @@ weechat_perl_api_hook_completion_cb (void *data, char *completion,
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
perl_argv[0] = completion;
|
||||
perl_argv[0] = (char *)completion;
|
||||
perl_argv[1] = script_ptr2str (buffer);
|
||||
perl_argv[2] = script_ptr2str (list);
|
||||
perl_argv[3] = NULL;
|
||||
@@ -2472,17 +2472,17 @@ static XS (XS_weechat_hook_completion)
|
||||
*/
|
||||
|
||||
char *
|
||||
weechat_perl_api_hook_modifier_cb (void *data, char *modifier,
|
||||
char *modifier_data, char *string)
|
||||
weechat_perl_api_hook_modifier_cb (void *data, const char *modifier,
|
||||
const char *modifier_data, const char *string)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *perl_argv[4];
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
perl_argv[0] = modifier;
|
||||
perl_argv[1] = modifier_data;
|
||||
perl_argv[2] = string;
|
||||
perl_argv[0] = (char *)modifier;
|
||||
perl_argv[1] = (char *)modifier_data;
|
||||
perl_argv[2] = (char *)string;
|
||||
perl_argv[3] = NULL;
|
||||
|
||||
return (char *)weechat_perl_exec (script_callback->script,
|
||||
@@ -2617,7 +2617,7 @@ static XS (XS_weechat_unhook_all)
|
||||
|
||||
int
|
||||
weechat_perl_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer,
|
||||
char *input_data)
|
||||
const char *input_data)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *perl_argv[3];
|
||||
@@ -2626,7 +2626,7 @@ weechat_perl_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer,
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
perl_argv[0] = script_ptr2str (buffer);
|
||||
perl_argv[1] = input_data;
|
||||
perl_argv[1] = (char *)input_data;
|
||||
perl_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_perl_exec (script_callback->script,
|
||||
|
||||
@@ -41,7 +41,7 @@ struct t_weechat_plugin *weechat_perl_plugin = NULL;
|
||||
|
||||
struct t_plugin_script *perl_scripts = NULL;
|
||||
struct t_plugin_script *perl_current_script = NULL;
|
||||
char *perl_current_script_filename = NULL;
|
||||
const char *perl_current_script_filename = NULL;
|
||||
|
||||
#ifdef NO_PERL_MULTIPLICITY
|
||||
#undef MULTIPLICITY
|
||||
@@ -106,9 +106,9 @@ char *perl_weechat_code =
|
||||
|
||||
void *
|
||||
weechat_perl_exec (struct t_plugin_script *script,
|
||||
int ret_type, char *function, char **argv)
|
||||
int ret_type, const char *function, char **argv)
|
||||
{
|
||||
char *func;
|
||||
const char *func;
|
||||
unsigned int count;
|
||||
void *ret_value;
|
||||
int *ret_i, mem_err, length;
|
||||
@@ -224,7 +224,7 @@ weechat_perl_exec (struct t_plugin_script *script,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_perl_load (char *filename)
|
||||
weechat_perl_load (const char *filename)
|
||||
{
|
||||
STRLEN len;
|
||||
struct t_plugin_script tempscript;
|
||||
@@ -274,13 +274,13 @@ weechat_perl_load (char *filename)
|
||||
NULL);
|
||||
|
||||
eval_pv (perl_weechat_code, TRUE);
|
||||
perl_argv[0] = filename;
|
||||
perl_argv[0] = (char *)filename;
|
||||
perl_argv[1] = NULL;
|
||||
#else
|
||||
snprintf (pkgname, sizeof(pkgname), "%s%d", PKG_NAME_PREFIX, perl_num);
|
||||
perl_num++;
|
||||
tempscript.interpreter = "WeechatPerlScriptLoader";
|
||||
perl_argv[0] = filename;
|
||||
perl_argv[0] = (char *)filename;
|
||||
perl_argv[1] = pkgname;
|
||||
perl_argv[2] = NULL;
|
||||
#endif
|
||||
@@ -376,7 +376,7 @@ weechat_perl_load (char *filename)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_perl_load_cb (void *data, char *filename)
|
||||
weechat_perl_load_cb (void *data, const char *filename)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
@@ -433,7 +433,7 @@ weechat_perl_unload (struct t_plugin_script *script)
|
||||
*/
|
||||
|
||||
void
|
||||
weechat_perl_unload_name (char *name)
|
||||
weechat_perl_unload_name (const char *name)
|
||||
{
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
@@ -554,7 +554,7 @@ weechat_perl_command_cb (void *data, struct t_gui_buffer *buffer,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_perl_completion_cb (void *data, char *completion,
|
||||
weechat_perl_completion_cb (void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list)
|
||||
{
|
||||
@@ -573,7 +573,7 @@ weechat_perl_completion_cb (void *data, char *completion,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_perl_debug_dump_cb (void *data, char *signal, char *type_data,
|
||||
weechat_perl_debug_dump_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
@@ -592,7 +592,7 @@ weechat_perl_debug_dump_cb (void *data, char *signal, char *type_data,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_perl_buffer_closed_cb (void *data, char *signal, char *type_data,
|
||||
weechat_perl_buffer_closed_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
|
||||
@@ -26,9 +26,10 @@ extern struct t_weechat_plugin *weechat_perl_plugin;
|
||||
|
||||
extern struct t_plugin_script *perl_scripts;
|
||||
extern struct t_plugin_script *perl_current_script;
|
||||
extern char *perl_current_script_filename;
|
||||
extern const char *perl_current_script_filename;
|
||||
|
||||
extern void * weechat_perl_exec (struct t_plugin_script *script,
|
||||
int ret_type, char *function, char **argv);
|
||||
extern void *weechat_perl_exec (struct t_plugin_script *script,
|
||||
int ret_type, const char *function,
|
||||
char **argv);
|
||||
|
||||
#endif /* weechat-perl.h */
|
||||
|
||||
@@ -847,7 +847,7 @@ weechat_python_api_config_new (PyObject *self, PyObject *args)
|
||||
void
|
||||
weechat_python_api_config_read_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *option_name, char *value)
|
||||
const char *option_name, const char *value)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *python_argv[4];
|
||||
@@ -858,8 +858,8 @@ weechat_python_api_config_read_cb (void *data,
|
||||
if (script_callback->function && script_callback->function[0])
|
||||
{
|
||||
python_argv[0] = script_ptr2str (config_file);
|
||||
python_argv[1] = option_name;
|
||||
python_argv[2] = value;
|
||||
python_argv[1] = (char *)option_name;
|
||||
python_argv[2] = (char *)value;
|
||||
python_argv[3] = NULL;
|
||||
|
||||
rc = (int *) weechat_python_exec (script_callback->script,
|
||||
@@ -881,7 +881,7 @@ weechat_python_api_config_read_cb (void *data,
|
||||
void
|
||||
weechat_python_api_config_section_write_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name)
|
||||
const char *section_name)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *python_argv[3];
|
||||
@@ -892,7 +892,7 @@ weechat_python_api_config_section_write_cb (void *data,
|
||||
if (script_callback->function && script_callback->function[0])
|
||||
{
|
||||
python_argv[0] = script_ptr2str (config_file);
|
||||
python_argv[1] = section_name;
|
||||
python_argv[1] = (char *)section_name;
|
||||
python_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_python_exec (script_callback->script,
|
||||
@@ -915,7 +915,7 @@ weechat_python_api_config_section_write_cb (void *data,
|
||||
void
|
||||
weechat_python_api_config_section_write_default_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name)
|
||||
const char *section_name)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *python_argv[3];
|
||||
@@ -926,7 +926,7 @@ weechat_python_api_config_section_write_default_cb (void *data,
|
||||
if (script_callback->function && script_callback->function[0])
|
||||
{
|
||||
python_argv[0] = script_ptr2str (config_file);
|
||||
python_argv[1] = section_name;
|
||||
python_argv[1] = (char *)section_name;
|
||||
python_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_python_exec (script_callback->script,
|
||||
@@ -949,8 +949,8 @@ int
|
||||
weechat_python_api_config_section_create_option_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
struct t_config_section *section,
|
||||
char *option_name,
|
||||
char *value)
|
||||
const char *option_name,
|
||||
const char *value)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *python_argv[5];
|
||||
@@ -962,8 +962,8 @@ weechat_python_api_config_section_create_option_cb (void *data,
|
||||
{
|
||||
python_argv[0] = script_ptr2str (config_file);
|
||||
python_argv[1] = script_ptr2str (section);
|
||||
python_argv[2] = option_name;
|
||||
python_argv[3] = value;
|
||||
python_argv[2] = (char *)option_name;
|
||||
python_argv[3] = (char *)value;
|
||||
python_argv[4] = NULL;
|
||||
|
||||
rc = (int *) weechat_python_exec (script_callback->script,
|
||||
@@ -2245,7 +2245,7 @@ weechat_python_api_hook_fd (PyObject *self, PyObject *args)
|
||||
int
|
||||
weechat_python_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
|
||||
time_t date, int tags_count, char **tags,
|
||||
char *prefix, char *message)
|
||||
const char *prefix, const char *message)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *python_argv[6];
|
||||
@@ -2262,8 +2262,8 @@ weechat_python_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
|
||||
python_argv[0] = script_ptr2str (buffer);
|
||||
python_argv[1] = timebuffer;
|
||||
python_argv[2] = weechat_string_build_with_exploded (tags, ",");
|
||||
python_argv[3] = prefix;
|
||||
python_argv[4] = message;
|
||||
python_argv[3] = (char *)prefix;
|
||||
python_argv[4] = (char *)message;
|
||||
python_argv[5] = NULL;
|
||||
|
||||
rc = (int *) weechat_python_exec (script_callback->script,
|
||||
@@ -2336,7 +2336,7 @@ weechat_python_api_hook_print (PyObject *self, PyObject *args)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_python_api_hook_signal_cb (void *data, char *signal, char *type_data,
|
||||
weechat_python_api_hook_signal_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
@@ -2346,7 +2346,7 @@ weechat_python_api_hook_signal_cb (void *data, char *signal, char *type_data,
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
python_argv[0] = signal;
|
||||
python_argv[0] = (char *)signal;
|
||||
free_needed = 0;
|
||||
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
|
||||
{
|
||||
@@ -2481,7 +2481,7 @@ weechat_python_api_hook_signal_send (PyObject *self, PyObject *args)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_python_api_hook_config_cb (void *data, char *option, char *value)
|
||||
weechat_python_api_hook_config_cb (void *data, const char *option, const char *value)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *python_argv[3];
|
||||
@@ -2489,8 +2489,8 @@ weechat_python_api_hook_config_cb (void *data, char *option, char *value)
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
python_argv[0] = option;
|
||||
python_argv[1] = value;
|
||||
python_argv[0] = (char *)option;
|
||||
python_argv[1] = (char *)value;
|
||||
python_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_python_exec (script_callback->script,
|
||||
@@ -2551,7 +2551,7 @@ weechat_python_api_hook_config (PyObject *self, PyObject *args)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_python_api_hook_completion_cb (void *data, char *completion,
|
||||
weechat_python_api_hook_completion_cb (void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list)
|
||||
{
|
||||
@@ -2561,7 +2561,7 @@ weechat_python_api_hook_completion_cb (void *data, char *completion,
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
python_argv[0] = completion;
|
||||
python_argv[0] = (char *)completion;
|
||||
python_argv[1] = script_ptr2str (buffer);
|
||||
python_argv[2] = script_ptr2str (list);
|
||||
python_argv[3] = NULL;
|
||||
@@ -2628,17 +2628,17 @@ weechat_python_api_hook_completion (PyObject *self, PyObject *args)
|
||||
*/
|
||||
|
||||
char *
|
||||
weechat_python_api_hook_modifier_cb (void *data, char *modifier,
|
||||
char *modifier_data, char *string)
|
||||
weechat_python_api_hook_modifier_cb (void *data, const char *modifier,
|
||||
const char *modifier_data, const char *string)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *python_argv[4];
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
python_argv[0] = modifier;
|
||||
python_argv[1] = modifier_data;
|
||||
python_argv[2] = string;
|
||||
python_argv[0] = (char *)modifier;
|
||||
python_argv[1] = (char *)modifier_data;
|
||||
python_argv[2] = (char *)string;
|
||||
python_argv[3] = NULL;
|
||||
|
||||
return (char *)weechat_python_exec (script_callback->script,
|
||||
@@ -2779,7 +2779,7 @@ weechat_python_api_unhook_all (PyObject *self, PyObject *args)
|
||||
|
||||
int
|
||||
weechat_python_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer,
|
||||
char *input_data)
|
||||
const char *input_data)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *python_argv[3];
|
||||
@@ -2788,7 +2788,7 @@ weechat_python_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
python_argv[0] = script_ptr2str (buffer);
|
||||
python_argv[1] = input_data;
|
||||
python_argv[1] = (char *)input_data;
|
||||
python_argv[2] = NULL;
|
||||
|
||||
r = (int *) weechat_python_exec (script_callback->script,
|
||||
|
||||
@@ -39,7 +39,7 @@ struct t_weechat_plugin *weechat_python_plugin = NULL;
|
||||
|
||||
struct t_plugin_script *python_scripts = NULL;
|
||||
struct t_plugin_script *python_current_script = NULL;
|
||||
char *python_current_script_filename = NULL;
|
||||
const char *python_current_script_filename = NULL;
|
||||
PyThreadState *python_mainThreadState = NULL;
|
||||
|
||||
char python_buffer_output[128];
|
||||
@@ -51,7 +51,7 @@ char python_buffer_output[128];
|
||||
|
||||
void *
|
||||
weechat_python_exec (struct t_plugin_script *script,
|
||||
int ret_type, char *function, char **argv)
|
||||
int ret_type, const char *function, char **argv)
|
||||
{
|
||||
PyObject *evMain;
|
||||
PyObject *evDict;
|
||||
@@ -255,7 +255,7 @@ PyMethodDef weechat_python_output_funcs[] = {
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_python_load (char *filename)
|
||||
weechat_python_load (const char *filename)
|
||||
{
|
||||
char *argv[] = { "__weechat_plugin__" , NULL };
|
||||
FILE *fp;
|
||||
@@ -441,7 +441,7 @@ weechat_python_load (char *filename)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_python_load_cb (void *data, char *filename)
|
||||
weechat_python_load_cb (void *data, const char *filename)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
@@ -484,7 +484,7 @@ weechat_python_unload (struct t_plugin_script *script)
|
||||
*/
|
||||
|
||||
void
|
||||
weechat_python_unload_name (char *name)
|
||||
weechat_python_unload_name (const char *name)
|
||||
{
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
@@ -605,7 +605,7 @@ weechat_python_command_cb (void *data, struct t_gui_buffer *buffer,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_python_completion_cb (void *data, char *completion,
|
||||
weechat_python_completion_cb (void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list)
|
||||
{
|
||||
@@ -624,7 +624,7 @@ weechat_python_completion_cb (void *data, char *completion,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_python_debug_dump_cb (void *data, char *signal, char *type_data,
|
||||
weechat_python_debug_dump_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
@@ -643,7 +643,7 @@ weechat_python_debug_dump_cb (void *data, char *signal, char *type_data,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_python_buffer_closed_cb (void *data, char *signal, char *type_data,
|
||||
weechat_python_buffer_closed_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
|
||||
@@ -26,9 +26,10 @@ extern struct t_weechat_plugin *weechat_python_plugin;
|
||||
|
||||
extern struct t_plugin_script *python_scripts;
|
||||
extern struct t_plugin_script *python_current_script;
|
||||
extern char *python_current_script_filename;
|
||||
extern const char *python_current_script_filename;
|
||||
|
||||
extern void * weechat_python_exec (struct t_plugin_script *script,
|
||||
int ret_type, char *function, char **argv);
|
||||
extern void *weechat_python_exec (struct t_plugin_script *script,
|
||||
int ret_type, const char *function,
|
||||
char **argv);
|
||||
|
||||
#endif /* weechat-perl.h */
|
||||
|
||||
@@ -966,7 +966,7 @@ weechat_ruby_api_config_new (VALUE class, VALUE name, VALUE function)
|
||||
void
|
||||
weechat_ruby_api_config_read_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *option_name, char *value)
|
||||
const char *option_name, const char *value)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *ruby_argv[4];
|
||||
@@ -977,8 +977,8 @@ weechat_ruby_api_config_read_cb (void *data,
|
||||
if (script_callback->function && script_callback->function[0])
|
||||
{
|
||||
ruby_argv[0] = script_ptr2str (config_file);
|
||||
ruby_argv[1] = option_name;
|
||||
ruby_argv[2] = value;
|
||||
ruby_argv[1] = (char *)option_name;
|
||||
ruby_argv[2] = (char *)value;
|
||||
ruby_argv[3] = NULL;
|
||||
|
||||
rc = (int *) weechat_ruby_exec (script_callback->script,
|
||||
@@ -1000,7 +1000,7 @@ weechat_ruby_api_config_read_cb (void *data,
|
||||
void
|
||||
weechat_ruby_api_config_section_write_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name)
|
||||
const char *section_name)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *ruby_argv[3];
|
||||
@@ -1011,7 +1011,7 @@ weechat_ruby_api_config_section_write_cb (void *data,
|
||||
if (script_callback->function && script_callback->function[0])
|
||||
{
|
||||
ruby_argv[0] = script_ptr2str (config_file);
|
||||
ruby_argv[1] = section_name;
|
||||
ruby_argv[1] = (char *)section_name;
|
||||
ruby_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_ruby_exec (script_callback->script,
|
||||
@@ -1034,7 +1034,7 @@ weechat_ruby_api_config_section_write_cb (void *data,
|
||||
void
|
||||
weechat_ruby_api_config_section_write_default_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name)
|
||||
const char *section_name)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *ruby_argv[3];
|
||||
@@ -1045,7 +1045,7 @@ weechat_ruby_api_config_section_write_default_cb (void *data,
|
||||
if (script_callback->function && script_callback->function[0])
|
||||
{
|
||||
ruby_argv[0] = script_ptr2str (config_file);
|
||||
ruby_argv[1] = section_name;
|
||||
ruby_argv[1] = (char *)section_name;
|
||||
ruby_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_ruby_exec (script_callback->script,
|
||||
@@ -1068,8 +1068,8 @@ int
|
||||
weechat_ruby_api_config_section_create_option_cb (void *data,
|
||||
struct t_config_file *config_file,
|
||||
struct t_config_section *section,
|
||||
char *option_name,
|
||||
char *value)
|
||||
const char *option_name,
|
||||
const char *value)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *ruby_argv[5];
|
||||
@@ -1081,8 +1081,8 @@ weechat_ruby_api_config_section_create_option_cb (void *data,
|
||||
{
|
||||
ruby_argv[0] = script_ptr2str (config_file);
|
||||
ruby_argv[1] = script_ptr2str (section);
|
||||
ruby_argv[2] = option_name;
|
||||
ruby_argv[3] = value;
|
||||
ruby_argv[2] = (char *)option_name;
|
||||
ruby_argv[3] = (char *)value;
|
||||
ruby_argv[4] = NULL;
|
||||
|
||||
rc = (int *) weechat_ruby_exec (script_callback->script,
|
||||
@@ -2599,7 +2599,7 @@ weechat_ruby_api_hook_fd (VALUE class, VALUE fd, VALUE read, VALUE write,
|
||||
int
|
||||
weechat_ruby_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
|
||||
time_t date, int tags_count, char **tags,
|
||||
char *prefix, char *message)
|
||||
const char *prefix, const char *message)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *ruby_argv[6];
|
||||
@@ -2616,8 +2616,8 @@ weechat_ruby_api_hook_print_cb (void *data, struct t_gui_buffer *buffer,
|
||||
ruby_argv[0] = script_ptr2str (buffer);
|
||||
ruby_argv[1] = timebuffer;
|
||||
ruby_argv[2] = weechat_string_build_with_exploded (tags, ",");
|
||||
ruby_argv[3] = prefix;
|
||||
ruby_argv[4] = message;
|
||||
ruby_argv[3] = (char *)prefix;
|
||||
ruby_argv[4] = (char *)message;
|
||||
ruby_argv[5] = NULL;
|
||||
|
||||
rc = (int *) weechat_ruby_exec (script_callback->script,
|
||||
@@ -2703,7 +2703,7 @@ weechat_ruby_api_hook_print (VALUE class, VALUE buffer, VALUE tags,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_ruby_api_hook_signal_cb (void *data, char *signal, char *type_data,
|
||||
weechat_ruby_api_hook_signal_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
@@ -2713,7 +2713,7 @@ weechat_ruby_api_hook_signal_cb (void *data, char *signal, char *type_data,
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
ruby_argv[0] = signal;
|
||||
ruby_argv[0] = (char *)signal;
|
||||
free_needed = 0;
|
||||
if (strcmp (type_data, WEECHAT_HOOK_SIGNAL_STRING) == 0)
|
||||
{
|
||||
@@ -2862,7 +2862,7 @@ weechat_ruby_api_hook_signal_send (VALUE class, VALUE signal, VALUE type_data,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_ruby_api_hook_config_cb (void *data, char *option, char *value)
|
||||
weechat_ruby_api_hook_config_cb (void *data, const char *option, const char *value)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *ruby_argv[3];
|
||||
@@ -2870,8 +2870,8 @@ weechat_ruby_api_hook_config_cb (void *data, char *option, char *value)
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
ruby_argv[0] = option;
|
||||
ruby_argv[1] = value;
|
||||
ruby_argv[0] = (char *)option;
|
||||
ruby_argv[1] = (char *)value;
|
||||
ruby_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_ruby_exec (script_callback->script,
|
||||
@@ -2938,7 +2938,7 @@ weechat_ruby_api_hook_config (VALUE class, VALUE option, VALUE function)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_ruby_api_hook_completion_cb (void *data, char *completion,
|
||||
weechat_ruby_api_hook_completion_cb (void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list)
|
||||
{
|
||||
@@ -2948,7 +2948,7 @@ weechat_ruby_api_hook_completion_cb (void *data, char *completion,
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
ruby_argv[0] = completion;
|
||||
ruby_argv[0] = (char *)completion;
|
||||
ruby_argv[1] = script_ptr2str (buffer);
|
||||
ruby_argv[2] = script_ptr2str (list);
|
||||
ruby_argv[3] = NULL;
|
||||
@@ -3022,17 +3022,17 @@ weechat_ruby_api_hook_completion (VALUE class, VALUE completion,
|
||||
*/
|
||||
|
||||
char *
|
||||
weechat_ruby_api_hook_modifier_cb (void *data, char *modifier,
|
||||
char *modifier_data, char *string)
|
||||
weechat_ruby_api_hook_modifier_cb (void *data, const char *modifier,
|
||||
const char *modifier_data, const char *string)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *ruby_argv[4];
|
||||
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
ruby_argv[0] = modifier;
|
||||
ruby_argv[1] = modifier_data;
|
||||
ruby_argv[2] = string;
|
||||
ruby_argv[0] = (char *)modifier;
|
||||
ruby_argv[1] = (char *)modifier_data;
|
||||
ruby_argv[2] = (char *)string;
|
||||
ruby_argv[3] = NULL;
|
||||
|
||||
return (char *)weechat_ruby_exec (script_callback->script,
|
||||
@@ -3191,7 +3191,7 @@ weechat_ruby_api_unhook_all (VALUE class)
|
||||
|
||||
int
|
||||
weechat_ruby_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer,
|
||||
char *input_data)
|
||||
const char *input_data)
|
||||
{
|
||||
struct t_script_callback *script_callback;
|
||||
char *ruby_argv[3];
|
||||
@@ -3200,7 +3200,7 @@ weechat_ruby_api_buffer_input_data_cb (void *data, struct t_gui_buffer *buffer,
|
||||
script_callback = (struct t_script_callback *)data;
|
||||
|
||||
ruby_argv[0] = script_ptr2str (buffer);
|
||||
ruby_argv[1] = input_data;
|
||||
ruby_argv[1] = (char *)input_data;
|
||||
ruby_argv[2] = NULL;
|
||||
|
||||
rc = (int *) weechat_ruby_exec (script_callback->script,
|
||||
|
||||
@@ -42,7 +42,7 @@ struct t_weechat_plugin *weechat_ruby_plugin = NULL;
|
||||
|
||||
struct t_plugin_script *ruby_scripts = NULL;
|
||||
struct t_plugin_script *ruby_current_script = NULL;
|
||||
char *ruby_current_script_filename = NULL;
|
||||
const char *ruby_current_script_filename = NULL;
|
||||
|
||||
VALUE ruby_mWeechat, ruby_mWeechatOutputs;
|
||||
|
||||
@@ -107,7 +107,7 @@ rb_protect_funcall (VALUE recv, ID mid, int *state, int argc, ...)
|
||||
|
||||
void *
|
||||
weechat_ruby_exec (struct t_plugin_script *script,
|
||||
int ret_type, char *function, char **argv)
|
||||
int ret_type, const char *function, char **argv)
|
||||
{
|
||||
VALUE rc, err;
|
||||
int ruby_error, *ret_i;
|
||||
@@ -296,7 +296,7 @@ weechat_ruby_output_flush (VALUE self)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_ruby_load (char *filename)
|
||||
weechat_ruby_load (const char *filename)
|
||||
{
|
||||
char modname[64];
|
||||
VALUE curModule, ruby_retcode, err;
|
||||
@@ -422,7 +422,7 @@ weechat_ruby_load (char *filename)
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_ruby_load_cb (void *data, char *filename)
|
||||
weechat_ruby_load_cb (void *data, const char *filename)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) data;
|
||||
@@ -468,7 +468,7 @@ weechat_ruby_unload (struct t_plugin_script *script)
|
||||
*/
|
||||
|
||||
void
|
||||
weechat_ruby_unload_name (char *name)
|
||||
weechat_ruby_unload_name (const char *name)
|
||||
{
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
@@ -589,7 +589,7 @@ weechat_ruby_command_cb (void *data, struct t_gui_buffer *buffer,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_ruby_completion_cb (void *data, char *completion,
|
||||
weechat_ruby_completion_cb (void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list)
|
||||
{
|
||||
@@ -608,7 +608,7 @@ weechat_ruby_completion_cb (void *data, char *completion,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_ruby_debug_dump_cb (void *data, char *signal, char *type_data,
|
||||
weechat_ruby_debug_dump_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
@@ -627,7 +627,7 @@ weechat_ruby_debug_dump_cb (void *data, char *signal, char *type_data,
|
||||
*/
|
||||
|
||||
int
|
||||
weechat_ruby_buffer_closed_cb (void *data, char *signal, char *type_data,
|
||||
weechat_ruby_buffer_closed_cb (void *data, const char *signal, const char *type_data,
|
||||
void *signal_data)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
|
||||
@@ -26,9 +26,10 @@ extern struct t_weechat_plugin *weechat_ruby_plugin;
|
||||
|
||||
extern struct t_plugin_script *ruby_scripts;
|
||||
extern struct t_plugin_script *ruby_current_script;
|
||||
extern char *ruby_current_script_filename;
|
||||
extern const char *ruby_current_script_filename;
|
||||
|
||||
extern void * weechat_ruby_exec (struct t_plugin_script *script,
|
||||
int ret_type, char *function, char **argv);
|
||||
extern void *weechat_ruby_exec (struct t_plugin_script *script,
|
||||
int ret_type, const char *function,
|
||||
char **argv);
|
||||
|
||||
#endif /* weechat-perl.h */
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
void
|
||||
script_api_charset_set (struct t_plugin_script *script,
|
||||
char *charset)
|
||||
const char *charset)
|
||||
{
|
||||
if (script->charset)
|
||||
free (script->charset);
|
||||
@@ -51,10 +51,10 @@ script_api_charset_set (struct t_plugin_script *script,
|
||||
struct t_config_file *
|
||||
script_api_config_new (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *name,
|
||||
const char *name,
|
||||
int (*callback_reload)(void *data,
|
||||
struct t_config_file *config_file),
|
||||
char *function)
|
||||
const char *function)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_config_file *new_config_file;
|
||||
@@ -97,28 +97,28 @@ struct t_config_section *
|
||||
script_api_config_new_section (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_config_file *config_file,
|
||||
char *name,
|
||||
const char *name,
|
||||
int user_can_add_options,
|
||||
int user_can_delete_options,
|
||||
void (*callback_read)(void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *option_name,
|
||||
char *value),
|
||||
const char *option_name,
|
||||
const char *value),
|
||||
char *function_read,
|
||||
void (*callback_write)(void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name),
|
||||
const char *section_name),
|
||||
char *function_write,
|
||||
void (*callback_write_default)(void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name),
|
||||
const char *section_name),
|
||||
char *function_write_default,
|
||||
int (*callback_create_option)(void *data,
|
||||
struct t_config_file *config_file,
|
||||
struct t_config_section *section,
|
||||
char *option_name,
|
||||
char *value),
|
||||
char *function_create_option)
|
||||
const char *option_name,
|
||||
const char *value),
|
||||
const char *function_create_option)
|
||||
{
|
||||
struct t_script_callback *new_script_callback1, *new_script_callback2;
|
||||
struct t_script_callback *new_script_callback3, *new_script_callback4;
|
||||
@@ -288,19 +288,19 @@ script_api_config_new_option (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_config_file *config_file,
|
||||
struct t_config_section *section,
|
||||
char *name, char *type,
|
||||
char *description, char *string_values,
|
||||
int min, int max, char *default_value,
|
||||
const char *name, const char *type,
|
||||
const char *description, const char *string_values,
|
||||
int min, int max, const char *default_value,
|
||||
void (*callback_check_value)(void *data,
|
||||
struct t_config_option *option,
|
||||
char *value),
|
||||
char *function_check_value,
|
||||
const char *value),
|
||||
const char *function_check_value,
|
||||
void (*callback_change)(void *data,
|
||||
struct t_config_option *option),
|
||||
char *function_change,
|
||||
const char *function_change,
|
||||
void (*callback_delete)(void *data,
|
||||
struct t_config_option *option),
|
||||
char *function_delete)
|
||||
const char *function_delete)
|
||||
{
|
||||
struct t_script_callback *new_script_callback1, *new_script_callback2;
|
||||
struct t_script_callback *new_script_callback3;
|
||||
@@ -451,7 +451,7 @@ script_api_config_free (struct t_weechat_plugin *weechat_plugin,
|
||||
void
|
||||
script_api_printf (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer, char *format, ...)
|
||||
struct t_gui_buffer *buffer, const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char *buf, *buf2;
|
||||
@@ -481,7 +481,8 @@ void
|
||||
script_api_printf_date_tags (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer,
|
||||
time_t date, char *tags, char *format, ...)
|
||||
time_t date, const char *tags,
|
||||
const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char *buf, *buf2;
|
||||
@@ -512,7 +513,7 @@ void
|
||||
script_api_printf_y (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer, int y,
|
||||
char *format, ...)
|
||||
const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char *buf, *buf2;
|
||||
@@ -541,8 +542,8 @@ script_api_printf_y (struct t_weechat_plugin *weechat_plugin,
|
||||
void
|
||||
script_api_infobar_printf (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
int delay, char *color_name,
|
||||
char *format, ...)
|
||||
int delay, const char *color_name,
|
||||
const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char buf[1024];
|
||||
@@ -566,7 +567,7 @@ script_api_infobar_printf (struct t_weechat_plugin *weechat_plugin,
|
||||
void
|
||||
script_api_log_printf (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *format, ...)
|
||||
const char *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char *buf, *buf2;
|
||||
@@ -594,14 +595,14 @@ script_api_log_printf (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_hook *
|
||||
script_api_hook_command (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *command, char *description,
|
||||
char *args, char *args_description,
|
||||
char *completion,
|
||||
const char *command, const char *description,
|
||||
const char *args, const char *args_description,
|
||||
const char *completion,
|
||||
int (*callback)(void *data,
|
||||
struct t_gui_buffer *buffer,
|
||||
int argc, char **argv,
|
||||
char **argv_eol),
|
||||
char *function)
|
||||
const char *function)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_hook *new_hook;
|
||||
@@ -639,7 +640,7 @@ script_api_hook_timer (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
int interval, int align_second, int max_calls,
|
||||
int (*callback)(void *data),
|
||||
char *function)
|
||||
const char *function)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_hook *new_hook;
|
||||
@@ -677,7 +678,7 @@ script_api_hook_fd (struct t_weechat_plugin *weechat_plugin,
|
||||
int fd, int flag_read, int flag_write,
|
||||
int flag_exception,
|
||||
int (*callback)(void *data),
|
||||
char *function)
|
||||
const char *function)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_hook *new_hook;
|
||||
@@ -713,13 +714,14 @@ struct t_hook *
|
||||
script_api_hook_print (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer,
|
||||
char *tags, char *message, int strip_colors,
|
||||
const char *tags, const char *message, int strip_colors,
|
||||
int (*callback)(void *data,
|
||||
struct t_gui_buffer *buffer,
|
||||
time_t date,
|
||||
int tags_count, char **tags,
|
||||
char *prefix, char *message),
|
||||
char *function)
|
||||
const char *prefix,
|
||||
const char *message),
|
||||
const char *function)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_hook *new_hook;
|
||||
@@ -754,11 +756,11 @@ script_api_hook_print (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_hook *
|
||||
script_api_hook_signal (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *signal,
|
||||
int (*callback)(void *data, char *signal,
|
||||
char *type_data,
|
||||
const char *signal,
|
||||
int (*callback)(void *data, const char *signal,
|
||||
const char *type_data,
|
||||
void *signal_data),
|
||||
char *function)
|
||||
const char *function)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_hook *new_hook;
|
||||
@@ -792,10 +794,10 @@ script_api_hook_signal (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_hook *
|
||||
script_api_hook_config (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *option,
|
||||
int (*callback)(void *data, char *option,
|
||||
char *value),
|
||||
char *function)
|
||||
const char *option,
|
||||
int (*callback)(void *data, const char *option,
|
||||
const char *value),
|
||||
const char *function)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_hook *new_hook;
|
||||
@@ -829,11 +831,11 @@ script_api_hook_config (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_hook *
|
||||
script_api_hook_completion (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *completion,
|
||||
int (*callback)(void *data, char *completion,
|
||||
const char *completion,
|
||||
int (*callback)(void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list),
|
||||
char *function)
|
||||
const char *function)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_hook *new_hook;
|
||||
@@ -867,10 +869,11 @@ script_api_hook_completion (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_hook *
|
||||
script_api_hook_modifier (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *modifier,
|
||||
char *(*callback)(void *data, char *modifier,
|
||||
char *modifier_data, char *string),
|
||||
char *function)
|
||||
const char *modifier,
|
||||
char *(*callback)(void *data, const char *modifier,
|
||||
const char *modifier_data,
|
||||
const char *string),
|
||||
const char *function)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_hook *new_hook;
|
||||
@@ -951,14 +954,14 @@ script_api_unhook_all (struct t_plugin_script *script)
|
||||
struct t_gui_buffer *
|
||||
script_api_buffer_new (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *category, char *name,
|
||||
const char *category, const char *name,
|
||||
int (*input_callback)(void *data,
|
||||
struct t_gui_buffer *buffer,
|
||||
char *input_data),
|
||||
char *function_input,
|
||||
const char *input_data),
|
||||
const char *function_input,
|
||||
int (*close_callback)(void *data,
|
||||
struct t_gui_buffer *buffer),
|
||||
char *function_close)
|
||||
const char *function_close)
|
||||
{
|
||||
struct t_script_callback *new_script_callback_input;
|
||||
struct t_script_callback *new_script_callback_close;
|
||||
@@ -1071,13 +1074,13 @@ script_api_buffer_close (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_gui_bar_item *
|
||||
script_api_bar_item_new (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *name,
|
||||
const char *name,
|
||||
char *(*build_callback)(void *data,
|
||||
struct t_gui_bar_item *item,
|
||||
struct t_gui_window *window,
|
||||
int max_width,
|
||||
int max_height),
|
||||
char *function_build)
|
||||
const char *function_build)
|
||||
{
|
||||
struct t_script_callback *new_script_callback;
|
||||
struct t_gui_bar_item *new_item;
|
||||
@@ -1143,7 +1146,7 @@ script_api_bar_item_remove (struct t_weechat_plugin *weechat_plugin,
|
||||
void
|
||||
script_api_command (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer, char *command)
|
||||
struct t_gui_buffer *buffer, const char *command)
|
||||
{
|
||||
char *command2;
|
||||
|
||||
@@ -1164,7 +1167,7 @@ script_api_command (struct t_weechat_plugin *weechat_plugin,
|
||||
char *
|
||||
script_api_config_get_plugin (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *option)
|
||||
const char *option)
|
||||
{
|
||||
char *option_fullname, *return_value;
|
||||
|
||||
@@ -1191,7 +1194,7 @@ script_api_config_get_plugin (struct t_weechat_plugin *weechat_plugin,
|
||||
int
|
||||
script_api_config_set_plugin (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *option, char *value)
|
||||
const char *option, const char *value)
|
||||
{
|
||||
char *option_fullname;
|
||||
int return_code;
|
||||
|
||||
@@ -20,179 +20,179 @@
|
||||
#define __WEECHAT_SCRIPT_API_H 1
|
||||
|
||||
extern void script_api_charset_set (struct t_plugin_script *script,
|
||||
char *charset);
|
||||
const char *charset);
|
||||
extern struct t_config_file *script_api_config_new (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *name,
|
||||
const char *name,
|
||||
int (*callback_reload)(void *data,
|
||||
struct t_config_file *config_file),
|
||||
char *function);
|
||||
const char *function);
|
||||
extern struct t_config_section *script_api_config_new_section (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_config_file *config_file,
|
||||
char *name,
|
||||
const char *name,
|
||||
int user_can_add_options,
|
||||
int user_can_delete_options,
|
||||
void (*callback_read)(void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *option_name,
|
||||
char *value),
|
||||
char *function_read,
|
||||
const char *option_name,
|
||||
const char *value),
|
||||
const char *function_read,
|
||||
void (*callback_write)(void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name),
|
||||
char *function_write,
|
||||
const char *section_name),
|
||||
const char *function_write,
|
||||
void (*callback_write_default)(void *data,
|
||||
struct t_config_file *config_file,
|
||||
char *section_name),
|
||||
char *function_write_default,
|
||||
const char *section_name),
|
||||
const char *function_write_default,
|
||||
int (*callback_create_option)(void *data,
|
||||
struct t_config_file *config_file,
|
||||
struct t_config_section *section,
|
||||
char *option_name,
|
||||
char *value),
|
||||
char *function_create_option);
|
||||
const char *option_name,
|
||||
const char *value),
|
||||
const char *function_create_option);
|
||||
extern struct t_config_option *script_api_config_new_option (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_config_file *config_file,
|
||||
struct t_config_section *section,
|
||||
char *name,
|
||||
char *type,
|
||||
char *description,
|
||||
char *string_values,
|
||||
const char *name,
|
||||
const char *type,
|
||||
const char *description,
|
||||
const char *string_values,
|
||||
int min, int max,
|
||||
char *default_value,
|
||||
const char *default_value,
|
||||
void (*callback_change)(void *data),
|
||||
char *function);
|
||||
const char *function);
|
||||
extern void script_api_config_free (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_config_file *config_file);
|
||||
extern void script_api_printf (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer,
|
||||
char *format, ...);
|
||||
const char *format, ...);
|
||||
extern void script_api_printf_date_tags (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer,
|
||||
time_t date, char *tags,
|
||||
char *format, ...);
|
||||
time_t date, const char *tags,
|
||||
const char *format, ...);
|
||||
extern void script_api_printf_y (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer,
|
||||
int y, char *format, ...);
|
||||
int y, const char *format, ...);
|
||||
extern void script_api_infobar_printf (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
int delay, char *color_name,
|
||||
char *format, ...);
|
||||
int delay, const char *color_name,
|
||||
const char *format, ...);
|
||||
extern void script_api_log_printf (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *format, ...);
|
||||
const char *format, ...);
|
||||
extern struct t_hook *script_api_hook_command (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *command, char *description,
|
||||
char *args, char *args_description,
|
||||
char *completion,
|
||||
const char *command, const char *description,
|
||||
const char *args, const char *args_description,
|
||||
const char *completion,
|
||||
int (*callback)(void *data,
|
||||
struct t_gui_buffer *buffer,
|
||||
int argc, char **argv,
|
||||
char **argv_eol),
|
||||
char *function);
|
||||
const char *function);
|
||||
extern struct t_hook *script_api_hook_timer (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
int interval, int align_second,
|
||||
int max_calls,
|
||||
int (*callback)(void *data),
|
||||
char *function);
|
||||
const char *function);
|
||||
extern struct t_hook *script_api_hook_fd (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
int fd, int flag_read,
|
||||
int flag_write, int flag_exception,
|
||||
int (*callback)(void *data),
|
||||
char *function);
|
||||
const char *function);
|
||||
extern struct t_hook *script_api_hook_print (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer,
|
||||
char *tags,
|
||||
char *message,
|
||||
const char *tags,
|
||||
const char *message,
|
||||
int strip_colors,
|
||||
int (*callback)(void *data,
|
||||
struct t_gui_buffer *buffer,
|
||||
time_t date,
|
||||
int tags_count,
|
||||
char **tags,
|
||||
char *prefix,
|
||||
char *message),
|
||||
char *function);
|
||||
const char *prefix,
|
||||
const char *message),
|
||||
const char *function);
|
||||
extern struct t_hook *script_api_hook_signal (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *signal,
|
||||
const char *signal,
|
||||
int (*callback)(void *data,
|
||||
char *signal,
|
||||
char *type_data,
|
||||
const char *signal,
|
||||
const char *type_data,
|
||||
void *signal_data),
|
||||
char *function);
|
||||
const char *function);
|
||||
extern struct t_hook *script_api_hook_config (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *option,
|
||||
const char *option,
|
||||
int (*callback)(void *data,
|
||||
char *option,
|
||||
char *value),
|
||||
char *function);
|
||||
const char *option,
|
||||
const char *value),
|
||||
const char *function);
|
||||
extern struct t_hook *script_api_hook_completion (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *completion,
|
||||
const char *completion,
|
||||
int (*callback)(void *data,
|
||||
char *completion,
|
||||
const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list),
|
||||
char *function);
|
||||
const char *function);
|
||||
extern struct t_hook *script_api_hook_modifier (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *modifier,
|
||||
const char *modifier,
|
||||
char *(*callback)(void *data,
|
||||
char *modifier,
|
||||
char *modifier_data,
|
||||
char *string),
|
||||
char *function);
|
||||
const char *modifier,
|
||||
const char *modifier_data,
|
||||
const char *string),
|
||||
const char *function);
|
||||
extern void script_api_unhook (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_hook *hook);
|
||||
extern void script_api_unhook_all (struct t_plugin_script *script);
|
||||
extern struct t_gui_buffer *script_api_buffer_new (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *category, char *name,
|
||||
const char *category, const char *name,
|
||||
int (*input_callback)(void *data,
|
||||
struct t_gui_buffer *buffer,
|
||||
char *input_data),
|
||||
char *function_input,
|
||||
const char *input_data),
|
||||
const char *function_input,
|
||||
int (*close_callback)(void *data,
|
||||
struct t_gui_buffer *buffer),
|
||||
char *function_close);
|
||||
const char *function_close);
|
||||
extern void script_api_buffer_close (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer,
|
||||
int switch_to_another);
|
||||
extern struct t_gui_bar_item *script_api_bar_item_new (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *name,
|
||||
const char *name,
|
||||
char *(*build_callback)(void *data,
|
||||
struct t_gui_bar_item *item,
|
||||
struct t_gui_window *window,
|
||||
int max_width,
|
||||
int max_height),
|
||||
char *function_build);
|
||||
const char *function_build);
|
||||
extern void script_api_bar_item_remove (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_bar_item *item);
|
||||
extern void script_api_command (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
struct t_gui_buffer *buffer,
|
||||
char *command);
|
||||
const char *command);
|
||||
extern char *script_api_config_get_plugin (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *option);
|
||||
const char *option);
|
||||
extern int script_api_config_set_plugin (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *script,
|
||||
char *option, char *value);
|
||||
const char *option, const char *value);
|
||||
|
||||
#endif /* script-api.h */
|
||||
|
||||
@@ -63,7 +63,7 @@ script_config_read (struct t_weechat_plugin *weechat_plugin)
|
||||
*/
|
||||
|
||||
int
|
||||
script_config_cb (void *data, char *option, char *value)
|
||||
script_config_cb (void *data, const char *option, const char *value)
|
||||
{
|
||||
/* make C compiler happy */
|
||||
(void) option;
|
||||
@@ -84,16 +84,16 @@ script_init (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_gui_buffer *buffer,
|
||||
int argc, char **argv,
|
||||
char **argv_eol),
|
||||
int (*callback_completion)(void *data, char *completion,
|
||||
int (*callback_completion)(void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list),
|
||||
int (*callback_signal_debug_dump)(void *data, char *signal,
|
||||
char *type_data,
|
||||
int (*callback_signal_debug_dump)(void *data, const char *signal,
|
||||
const char *type_data,
|
||||
void *signal_data),
|
||||
int (*callback_signal_buffer_closed)(void *data, char *signal,
|
||||
char *type_data,
|
||||
int (*callback_signal_buffer_closed)(void *data, const char *signal,
|
||||
const char *type_data,
|
||||
void *signal_data),
|
||||
int (*callback_load_file)(void *data, char *filename))
|
||||
int (*callback_load_file)(void *data, const char *filename))
|
||||
{
|
||||
char *string, *completion = "list|listfull|load|autoload|reload|unload %f";
|
||||
int length;
|
||||
@@ -190,7 +190,7 @@ script_ptr2str (void *pointer)
|
||||
*/
|
||||
|
||||
void *
|
||||
script_str2ptr (char *pointer_str)
|
||||
script_str2ptr (const char *pointer_str)
|
||||
{
|
||||
unsigned int value;
|
||||
|
||||
@@ -208,7 +208,7 @@ script_str2ptr (char *pointer_str)
|
||||
|
||||
void
|
||||
script_auto_load (struct t_weechat_plugin *weechat_plugin,
|
||||
int (*callback)(void *data, char *filename))
|
||||
int (*callback)(void *data, const char *filename))
|
||||
{
|
||||
char *dir_home, *dir_name;
|
||||
int dir_length;
|
||||
@@ -235,7 +235,7 @@ script_auto_load (struct t_weechat_plugin *weechat_plugin,
|
||||
|
||||
struct t_plugin_script *
|
||||
script_search (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *scripts, char *name)
|
||||
struct t_plugin_script *scripts, const char *name)
|
||||
{
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
@@ -256,7 +256,7 @@ script_search (struct t_weechat_plugin *weechat_plugin,
|
||||
|
||||
char *
|
||||
script_search_full_name (struct t_weechat_plugin *weechat_plugin,
|
||||
char *filename)
|
||||
const char *filename)
|
||||
{
|
||||
char *final_name, *dir_home, *dir_system;
|
||||
int length;
|
||||
@@ -347,9 +347,9 @@ script_search_full_name (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *
|
||||
script_add (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script **scripts,
|
||||
char *filename, char *name, char *author, char *version,
|
||||
char *license, char *description, char *shutdown_func,
|
||||
char *charset)
|
||||
const char *filename, const char *name, const char *author, const char *version,
|
||||
const char *license, const char *description, const char *shutdown_func,
|
||||
const char *charset)
|
||||
{
|
||||
struct t_plugin_script *new_script;
|
||||
|
||||
@@ -544,7 +544,7 @@ script_completion (struct t_weechat_plugin *weechat_plugin,
|
||||
void
|
||||
script_display_list (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *scripts,
|
||||
char *name, int full)
|
||||
const char *name, int full)
|
||||
{
|
||||
struct t_plugin_script *ptr_script;
|
||||
|
||||
|
||||
@@ -61,33 +61,33 @@ extern void script_init (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_gui_buffer *buffer,
|
||||
int argc, char **argv,
|
||||
char **argv_eol),
|
||||
int (*callback_completion)(void *data, char *completion,
|
||||
int (*callback_completion)(void *data, const char *completion,
|
||||
struct t_gui_buffer *buffer,
|
||||
struct t_weelist *list),
|
||||
int (*callback_signal_debug_dump)(void *data,
|
||||
char *signal,
|
||||
char *type_data,
|
||||
const char *signal,
|
||||
const char *type_data,
|
||||
void *signal_data),
|
||||
int (*callback_signal_buffer_closed)(void *data,
|
||||
char *signal,
|
||||
char *type_data,
|
||||
const char *signal,
|
||||
const char *type_data,
|
||||
void *signal_data),
|
||||
int (*callback_load_file)(void *data, char *filename));
|
||||
int (*callback_load_file)(void *data, const char *filename));
|
||||
extern char *script_ptr2str (void *pointer);
|
||||
extern void *script_str2ptr (char *pointer_str);
|
||||
extern void *script_str2ptr (const char *pointer_str);
|
||||
extern void script_auto_load (struct t_weechat_plugin *weechat_plugin,
|
||||
int (*callback)(void *data, char *filename));
|
||||
int (*callback)(void *data, const char *filename));
|
||||
extern struct t_plugin_script *script_search (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *scripts,
|
||||
char *name);
|
||||
const char *name);
|
||||
extern char *script_search_full_name (struct t_weechat_plugin *weechat_plugin,
|
||||
char *filename);
|
||||
const char *filename);
|
||||
extern struct t_plugin_script *script_add (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script **scripts,
|
||||
char *filename, char *name,
|
||||
char *author, char *version,
|
||||
char *license, char *description,
|
||||
char *shutdown_func, char *charset);
|
||||
const char *filename, const char *name,
|
||||
const char *author, const char *version,
|
||||
const char *license, const char *description,
|
||||
const char *shutdown_func, const char *charset);
|
||||
extern void script_remove_buffer_callbacks (struct t_plugin_script *scripts,
|
||||
struct t_gui_buffer *buffer);
|
||||
extern void script_remove (struct t_weechat_plugin *weechat_plugin,
|
||||
@@ -98,7 +98,7 @@ extern void script_completion (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *scripts);
|
||||
extern void script_display_list (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *scripts,
|
||||
char *name, int full);
|
||||
const char *name, int full);
|
||||
extern void script_print_log (struct t_weechat_plugin *weechat_plugin,
|
||||
struct t_plugin_script *scripts);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user