summaryrefslogtreecommitdiff
path: root/src/plugins/php
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-09-07 21:50:20 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-09-07 21:50:20 +0200
commit1851f6472f0906f81f2a6137a1415b564e306eb5 (patch)
tree665a0583a878a83c62770433204d9464086bb873 /src/plugins/php
parent8bd874a2814bdd57e623edd72d3f5080a4044a86 (diff)
downloadweechat-1851f6472f0906f81f2a6137a1415b564e306eb5.zip
php: rename print functions
Rename: - printf to print - printf_date_tags to print_date_tags - printf_y to print_y - log_printf to log_print
Diffstat (limited to 'src/plugins/php')
-rw-r--r--src/plugins/php/weechat-php-api.c56
-rw-r--r--src/plugins/php/weechat-php-api.h8
-rw-r--r--src/plugins/php/weechat-php.c8
3 files changed, 36 insertions, 36 deletions
diff --git a/src/plugins/php/weechat-php-api.c b/src/plugins/php/weechat-php-api.c
index 6f9f949cf..7cfd0aefe 100644
--- a/src/plugins/php/weechat-php-api.c
+++ b/src/plugins/php/weechat-php-api.c
@@ -1902,92 +1902,92 @@ API_FUNC(color)
API_RETURN_STRING(retval);
}
-API_FUNC(printf)
+API_FUNC(print)
{
- zend_string *z_buffer, *z_format;
+ zend_string *z_buffer, *z_message;
struct t_gui_buffer *buffer;
- char *format;
+ char *message;
- API_INIT_FUNC(0, "printf", API_RETURN_ERROR);
+ API_INIT_FUNC(0, "print", API_RETURN_ERROR);
if (zend_parse_parameters (ZEND_NUM_ARGS(),
- "SS", &z_buffer, &z_format) == FAILURE)
+ "SS", &z_buffer, &z_message) == FAILURE)
API_WRONG_ARGS(API_RETURN_ERROR);
buffer = (struct t_gui_buffer *)API_STR2PTR(ZSTR_VAL(z_buffer));
- format = ZSTR_VAL(z_format);
+ message = ZSTR_VAL(z_message);
plugin_script_api_printf (weechat_php_plugin, php_current_script, buffer,
- "%s", format);
+ "%s", message);
API_RETURN_OK;
}
-API_FUNC(printf_date_tags)
+API_FUNC(print_date_tags)
{
- zend_string *z_buffer, *z_tags, *z_format;
+ zend_string *z_buffer, *z_tags, *z_message;
zend_long z_date;
struct t_gui_buffer *buffer;
time_t date;
- char *tags, *format;
+ char *tags, *message;
- API_INIT_FUNC(1, "printf_date_tags", API_RETURN_ERROR);
+ API_INIT_FUNC(1, "print_date_tags", API_RETURN_ERROR);
if (zend_parse_parameters (ZEND_NUM_ARGS(),
"SlSS", &z_buffer, &z_date, &z_tags,
- &z_format) == FAILURE)
+ &z_message) == FAILURE)
API_WRONG_ARGS(API_RETURN_ERROR);
buffer = (struct t_gui_buffer *)API_STR2PTR(ZSTR_VAL(z_buffer));
date = (time_t)z_date;
tags = ZSTR_VAL(z_tags);
- format = ZSTR_VAL(z_format);
+ message = ZSTR_VAL(z_message);
plugin_script_api_printf_date_tags (weechat_php_plugin,
php_current_script,
buffer,
date,
(const char *)tags,
"%s",
- format);
+ message);
API_RETURN_OK;
}
-API_FUNC(printf_y)
+API_FUNC(print_y)
{
- zend_string *z_buffer, *z_format;
+ zend_string *z_buffer, *z_message;
zend_long z_y;
struct t_gui_buffer *buffer;
int y;
- char *format;
+ char *message;
- API_INIT_FUNC(1, "printf_y", API_RETURN_ERROR);
+ API_INIT_FUNC(1, "print_y", API_RETURN_ERROR);
if (zend_parse_parameters (ZEND_NUM_ARGS(),
- "SlS", &z_buffer, &z_y, &z_format) == FAILURE)
+ "SlS", &z_buffer, &z_y, &z_message) == FAILURE)
API_WRONG_ARGS(API_RETURN_ERROR);
buffer = (struct t_gui_buffer *)API_STR2PTR(ZSTR_VAL(z_buffer));
y = (int)z_y;
- format = ZSTR_VAL(z_format);
+ message = ZSTR_VAL(z_message);
plugin_script_api_printf_y (weechat_php_plugin,
php_current_script,
buffer,
y,
"%s",
- format);
+ message);
API_RETURN_OK;
}
-API_FUNC(log_printf)
+API_FUNC(log_print)
{
- zend_string *z_format;
- char *format;
+ zend_string *z_message;
+ char *message;
- API_INIT_FUNC(1, "log_printf", API_RETURN_ERROR);
- if (zend_parse_parameters (ZEND_NUM_ARGS(), "S", &z_format) == FAILURE)
+ API_INIT_FUNC(1, "log_print", API_RETURN_ERROR);
+ if (zend_parse_parameters (ZEND_NUM_ARGS(), "S", &z_message) == FAILURE)
API_WRONG_ARGS(API_RETURN_ERROR);
- format = ZSTR_VAL(z_format);
+ message = ZSTR_VAL(z_message);
plugin_script_api_log_printf (weechat_php_plugin, php_current_script,
- "%s", format);
+ "%s", message);
API_RETURN_OK;
}
diff --git a/src/plugins/php/weechat-php-api.h b/src/plugins/php/weechat-php-api.h
index bb0be708d..1765fa975 100644
--- a/src/plugins/php/weechat-php-api.h
+++ b/src/plugins/php/weechat-php-api.h
@@ -107,10 +107,10 @@ PHP_FUNCTION(weechat_key_bind);
PHP_FUNCTION(weechat_key_unbind);
PHP_FUNCTION(weechat_prefix);
PHP_FUNCTION(weechat_color);
-PHP_FUNCTION(weechat_printf);
-PHP_FUNCTION(weechat_printf_date_tags);
-PHP_FUNCTION(weechat_printf_y);
-PHP_FUNCTION(weechat_log_printf);
+PHP_FUNCTION(weechat_print);
+PHP_FUNCTION(weechat_print_date_tags);
+PHP_FUNCTION(weechat_print_y);
+PHP_FUNCTION(weechat_log_print);
PHP_FUNCTION(weechat_hook_command);
PHP_FUNCTION(weechat_hook_completion);
PHP_FUNCTION(weechat_hook_completion_get_string);
diff --git a/src/plugins/php/weechat-php.c b/src/plugins/php/weechat-php.c
index ec380a1ff..d4f6311f1 100644
--- a/src/plugins/php/weechat-php.c
+++ b/src/plugins/php/weechat-php.c
@@ -147,10 +147,10 @@ const zend_function_entry weechat_functions[] = {
PHP_FE(weechat_key_unbind, NULL)
PHP_FE(weechat_prefix, NULL)
PHP_FE(weechat_color, NULL)
- PHP_FE(weechat_printf, NULL)
- PHP_FE(weechat_printf_date_tags, NULL)
- PHP_FE(weechat_printf_y, NULL)
- PHP_FE(weechat_log_printf, NULL)
+ PHP_FE(weechat_print, NULL)
+ PHP_FE(weechat_print_date_tags, NULL)
+ PHP_FE(weechat_print_y, NULL)
+ PHP_FE(weechat_log_print, NULL)
PHP_FE(weechat_hook_command, NULL)
PHP_FE(weechat_hook_completion, NULL)
PHP_FE(weechat_hook_completion_get_string, NULL)