diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-03 10:56:51 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-06-03 10:56:51 +0200 |
commit | 3a53257032a0df8aa5f3b31f14a8e6f4e1f07595 (patch) | |
tree | 23d16979c6ee884220afbe148b32981338f7f690 /src/core/wee-hook.c | |
parent | 2b1d7df86c745367cfdf4de13629790197b523b3 (diff) | |
download | weechat-3a53257032a0df8aa5f3b31f14a8e6f4e1f07595.zip |
Add "const" keyword for some "char *" function arguments (core and plugins API)
Diffstat (limited to 'src/core/wee-hook.c')
-rw-r--r-- | src/core/wee-hook.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/src/core/wee-hook.c b/src/core/wee-hook.c index 43ecb6d8f..98b853e9f 100644 --- a/src/core/wee-hook.c +++ b/src/core/wee-hook.c @@ -293,7 +293,7 @@ hook_exec_end () */ struct t_hook * -hook_search_command (char *command) +hook_search_command (const char *command) { struct t_hook *ptr_hook; @@ -314,8 +314,10 @@ hook_search_command (char *command) */ struct t_hook * -hook_command (struct t_weechat_plugin *plugin, char *command, char *description, - char *args, char *args_description, char *completion, +hook_command (struct t_weechat_plugin *plugin, const char *command, + const char *description, + const char *args, const char *args_description, + const char *completion, t_hook_callback_command *callback, void *callback_data) { struct t_hook *ptr_hook,*new_hook; @@ -382,7 +384,7 @@ hook_command (struct t_weechat_plugin *plugin, char *command, char *description, int hook_command_exec (struct t_gui_buffer *buffer, int any_plugin, - struct t_weechat_plugin *plugin, char *string) + struct t_weechat_plugin *plugin, const char *string) { struct t_hook *ptr_hook, *next_hook; struct t_hook *hook_for_plugin, *hook_for_other_plugin; @@ -791,8 +793,8 @@ hook_fd_exec (fd_set *read_fds, fd_set *write_fds, fd_set *exception_fds) */ struct t_hook * -hook_connect (struct t_weechat_plugin *plugin, char *address, int port, - int sock, int ipv6, void *gnutls_sess, char *local_hostname, +hook_connect (struct t_weechat_plugin *plugin, const char *address, int port, + int sock, int ipv6, void *gnutls_sess, const char *local_hostname, t_hook_callback_connect *callback, void *callback_data) { struct t_hook *new_hook; @@ -847,7 +849,7 @@ hook_connect (struct t_weechat_plugin *plugin, char *address, int port, struct t_hook * hook_print (struct t_weechat_plugin *plugin, struct t_gui_buffer *buffer, - char *tags, char *message, int strip_colors, + const char *tags, const char *message, int strip_colors, t_hook_callback_print *callback, void *callback_data) { struct t_hook *new_hook; @@ -892,7 +894,7 @@ hook_print (struct t_weechat_plugin *plugin, struct t_gui_buffer *buffer, void hook_print_exec (struct t_gui_buffer *buffer, time_t date, int tags_count, - char **tags_array, char *prefix, char *message) + char **tags_array, const char *prefix, const char *message) { struct t_hook *ptr_hook, *next_hook; char *prefix_no_color, *message_no_color; @@ -987,7 +989,7 @@ hook_print_exec (struct t_gui_buffer *buffer, time_t date, int tags_count, */ struct t_hook * -hook_signal (struct t_weechat_plugin *plugin, char *signal, +hook_signal (struct t_weechat_plugin *plugin, const char *signal, t_hook_callback_signal *callback, void *callback_data) { struct t_hook *new_hook; @@ -1022,7 +1024,7 @@ hook_signal (struct t_weechat_plugin *plugin, char *signal, */ void -hook_signal_send (char *signal, char *type_data, void *signal_data) +hook_signal_send (const char *signal, const char *type_data, void *signal_data) { struct t_hook *ptr_hook, *next_hook; @@ -1054,7 +1056,7 @@ hook_signal_send (char *signal, char *type_data, void *signal_data) */ struct t_hook * -hook_config (struct t_weechat_plugin *plugin, char *option, +hook_config (struct t_weechat_plugin *plugin, const char *option, t_hook_callback_config *callback, void *callback_data) { struct t_hook *new_hook; @@ -1086,7 +1088,7 @@ hook_config (struct t_weechat_plugin *plugin, char *option, */ void -hook_config_exec (char *option, char *value) +hook_config_exec (const char *option, const char *value) { struct t_hook *ptr_hook, *next_hook; @@ -1119,7 +1121,7 @@ hook_config_exec (char *option, char *value) */ struct t_hook * -hook_completion (struct t_weechat_plugin *plugin, char *completion, +hook_completion (struct t_weechat_plugin *plugin, const char *completion, t_hook_callback_completion *callback, void *callback_data) { struct t_hook *new_hook; @@ -1154,7 +1156,7 @@ hook_completion (struct t_weechat_plugin *plugin, char *completion, */ void -hook_completion_exec (struct t_weechat_plugin *plugin, char *completion, +hook_completion_exec (struct t_weechat_plugin *plugin, const char *completion, struct t_gui_buffer *buffer, struct t_weelist *list) { struct t_hook *ptr_hook, *next_hook; @@ -1191,7 +1193,7 @@ hook_completion_exec (struct t_weechat_plugin *plugin, char *completion, */ struct t_hook * -hook_modifier (struct t_weechat_plugin *plugin, char *modifier, +hook_modifier (struct t_weechat_plugin *plugin, const char *modifier, t_hook_callback_modifier *callback, void *callback_data) { struct t_hook *new_hook; @@ -1226,8 +1228,8 @@ hook_modifier (struct t_weechat_plugin *plugin, char *modifier, */ char * -hook_modifier_exec (struct t_weechat_plugin *plugin, char *modifier, - char *modifier_data, char *string) +hook_modifier_exec (struct t_weechat_plugin *plugin, const char *modifier, + const char *modifier_data, const char *string) { struct t_hook *ptr_hook, *next_hook; char *new_msg, *message_modified; |