diff options
31 files changed, 68 insertions, 67 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc index 6649a1bad..3399f4f9d 100644 --- a/ChangeLog.adoc +++ b/ChangeLog.adoc @@ -20,6 +20,7 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes] New features:: + * api: rename function string_build_with_split_string to string_rebuild_split_string * api: add info "uptime_current" Bug fixes:: diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc index 04c9b097e..0434bf54f 100644 --- a/doc/en/weechat_plugin_api.en.adoc +++ b/doc/en/weechat_plugin_api.en.adoc @@ -1788,16 +1788,16 @@ weechat_string_free_split (argv); [NOTE] This function is not available in scripting API. -==== string_build_with_split_string +==== string_rebuild_split_string -Build a string with a split string. +Rebuild a string with a split string. Prototype: [source,c] ---- -char *weechat_string_build_with_split_string (char **split_string, - const char *separator); +char *weechat_string_rebuild_split_string (char **split_string, + const char *separator); ---- Arguments: @@ -1807,7 +1807,7 @@ Arguments: Return value: -* string built with split string (must be freed by calling "free" after use) +* string rebuilt with split string (must be freed by calling "free" after use) C example: @@ -1816,7 +1816,7 @@ C example: char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_build_with_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";"); /* str == "abc;def;ghi" */ /* ... */ free (str); diff --git a/doc/fr/weechat_plugin_api.fr.adoc b/doc/fr/weechat_plugin_api.fr.adoc index 95ea7de62..c978d7175 100644 --- a/doc/fr/weechat_plugin_api.fr.adoc +++ b/doc/fr/weechat_plugin_api.fr.adoc @@ -1820,16 +1820,16 @@ weechat_string_free_split (argv); [NOTE] Cette fonction n'est pas disponible dans l'API script. -==== string_build_with_split_string +==== string_rebuild_split_string -Construire une chaîne à partir d'une chaîne découpée. +Reconstruire une chaîne à partir d'une chaîne découpée. Prototype : [source,c] ---- -char *weechat_string_build_with_split_string (char **split_string - const char *separator); +char *weechat_string_rebuild_split_string (char **split_string + const char *separator); ---- Paramètres : @@ -1839,7 +1839,7 @@ Paramètres : Valeur de retour : -* chaîne construite avec la chaîne découpée (doit être supprimée par un appel à +* chaîne reconstruite avec la chaîne découpée (doit être supprimée par un appel à "free" après utilisation) Exemple en C : @@ -1849,7 +1849,7 @@ Exemple en C : char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_build_with_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";"); /* str == "abc;def;ghi" */ /* ... */ free (str); diff --git a/doc/it/weechat_plugin_api.it.adoc b/doc/it/weechat_plugin_api.it.adoc index d17f2a25c..7b2ae3e40 100644 --- a/doc/it/weechat_plugin_api.it.adoc +++ b/doc/it/weechat_plugin_api.it.adoc @@ -1871,7 +1871,7 @@ weechat_string_free_split (argv); [NOTE] Questa funzione non è disponibile nelle API per lo scripting. -==== string_build_with_split_string +==== string_rebuild_split_string Compila una stringa con una stringa divisa. @@ -1879,8 +1879,8 @@ Prototipo: [source,c] ---- -char *weechat_string_build_with_split_string (char **split_string, - const char *separator); +char *weechat_string_rebuild_split_string (char **split_string, + const char *separator); ---- Argomenti: @@ -1900,7 +1900,7 @@ Esempio in C: char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_build_with_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";"); /* str == "abc;def;ghi" */ /* ... */ free (str); diff --git a/doc/ja/weechat_plugin_api.ja.adoc b/doc/ja/weechat_plugin_api.ja.adoc index d28349a40..0254abc38 100644 --- a/doc/ja/weechat_plugin_api.ja.adoc +++ b/doc/ja/weechat_plugin_api.ja.adoc @@ -1809,7 +1809,7 @@ weechat_string_free_split (argv); [NOTE] スクリプト API ではこの関数を利用できません。 -==== string_build_with_split_string +==== string_rebuild_split_string 分割文字列から文字列を作る。 @@ -1817,8 +1817,8 @@ weechat_string_free_split (argv); [source,c] ---- -char *weechat_string_build_with_split_string (char **split_string, - const char *separator); +char *weechat_string_rebuild_split_string (char **split_string, + const char *separator); ---- 引数: @@ -1838,7 +1838,7 @@ C 言語での使用例: char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_build_with_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";"); /* str == "abc;def;ghi" */ /* ... */ free (str); diff --git a/doc/sr/weechat_plugin_api.sr.adoc b/doc/sr/weechat_plugin_api.sr.adoc index 740359ae2..c3a8e182b 100644 --- a/doc/sr/weechat_plugin_api.sr.adoc +++ b/doc/sr/weechat_plugin_api.sr.adoc @@ -1711,7 +1711,7 @@ weechat_string_free_split (argv); [NOTE] Ова функција није доступна у API скриптовања. -==== string_build_with_split_string +==== string_rebuild_split_string Изграђује стринг од подељеног стринга. @@ -1719,8 +1719,8 @@ weechat_string_free_split (argv); [source,c] ---- -char *weechat_string_build_with_split_string (char **split_string, - const char *separator); +char *weechat_string_rebuild_split_string (char **split_string, + const char *separator); ---- Аргументи: @@ -1739,7 +1739,7 @@ C пример: char **argv; int argc; argv = weechat_string_split ("abc def ghi", " ", 0, 0, &argc); -char *str = weechat_string_build_with_split_string (argv, ";"); +char *str = weechat_string_rebuild_split_string (argv, ";"); /* str == "abc;def;ghi" */ /* ... */ free (str); diff --git a/src/core/hook/wee-hook-hsignal.c b/src/core/hook/wee-hook-hsignal.c index a9856fbb3..37dfa32a8 100644 --- a/src/core/hook/wee-hook-hsignal.c +++ b/src/core/hook/wee-hook-hsignal.c @@ -43,7 +43,7 @@ char * hook_hsignal_get_description (struct t_hook *hook) { - return string_build_with_split_string ( + return string_rebuild_split_string ( (const char **)(HOOK_HSIGNAL(hook, signals)), ";"); } diff --git a/src/core/hook/wee-hook-line.c b/src/core/hook/wee-hook-line.c index d1ef37d63..fa787eba1 100644 --- a/src/core/hook/wee-hook-line.c +++ b/src/core/hook/wee-hook-line.c @@ -166,7 +166,7 @@ hook_line_exec (struct t_gui_line *line) HASHTABLE_SET_TIME("date_printed", line->data->date_printed); HASHTABLE_SET_STR_NOT_NULL("str_time", line->data->str_time); HASHTABLE_SET_INT("tags_count", line->data->tags_count); - str_tags = string_build_with_split_string ( + str_tags = string_rebuild_split_string ( (const char **)line->data->tags_array, ","); HASHTABLE_SET_STR_NOT_NULL("tags", str_tags); if (str_tags) diff --git a/src/core/hook/wee-hook-signal.c b/src/core/hook/wee-hook-signal.c index 158fcbd47..9cd72efcb 100644 --- a/src/core/hook/wee-hook-signal.c +++ b/src/core/hook/wee-hook-signal.c @@ -43,7 +43,7 @@ char * hook_signal_get_description (struct t_hook *hook) { - return string_build_with_split_string ( + return string_rebuild_split_string ( (const char **)(HOOK_SIGNAL(hook, signals)), ";"); } diff --git a/src/core/wee-command.c b/src/core/wee-command.c index d0cdef86b..a34ef109d 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -5582,7 +5582,7 @@ COMMAND_CALLBACK(repeat) repeat_args[0] = strdup (buffer->full_name); repeat_args[1] = strdup (argv_eol[arg_count + 1]); repeat_args[2] = (input_commands_allowed) ? - string_build_with_split_string ( + string_rebuild_split_string ( (const char **)input_commands_allowed, ",") : NULL; hook_timer (NULL, interval, 0, count - 1, &command_repeat_timer_cb, repeat_args, NULL); diff --git a/src/core/wee-config-file.c b/src/core/wee-config-file.c index d59db6756..68a1d457a 100644 --- a/src/core/wee-config-file.c +++ b/src/core/wee-config-file.c @@ -3387,7 +3387,7 @@ config_file_add_option_to_infolist (struct t_infolist *infolist, { goto error; } - string_values = string_build_with_split_string ( + string_values = string_rebuild_split_string ( (const char **)option->string_values, "|"); if (!infolist_new_var_string (ptr_item, "string_values", string_values)) { diff --git a/src/core/wee-dir.c b/src/core/wee-dir.c index 247e943be..e0a0a7361 100644 --- a/src/core/wee-dir.c +++ b/src/core/wee-dir.c @@ -1036,5 +1036,5 @@ dir_get_string_home_dirs () dirs[3] = weechat_runtime_dir; dirs[4] = NULL; - return string_build_with_split_string ((const char **)dirs, ":"); + return string_rebuild_split_string ((const char **)dirs, ":"); } diff --git a/src/core/wee-input.c b/src/core/wee-input.c index 9247458c1..3635ffce4 100644 --- a/src/core/wee-input.c +++ b/src/core/wee-input.c @@ -427,7 +427,7 @@ input_data_delayed (struct t_gui_buffer *buffer, const char *data, } else if (input_commands_allowed) { - new_commands_allowed = string_build_with_split_string ( + new_commands_allowed = string_rebuild_split_string ( (const char **)input_commands_allowed, ","); } else diff --git a/src/core/wee-string.c b/src/core/wee-string.c index f514f55f0..7d27ab367 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -2445,14 +2445,14 @@ string_free_split_shared (char **split_string) } /* - * Builds a string with a split string. + * Rebuilds a split string using a delimiter. * * Note: result must be free after use. */ char * -string_build_with_split_string (const char **split_string, - const char *separator) +string_rebuild_split_string (const char **split_string, + const char *separator) { int i, length, length_separator; char *result; diff --git a/src/core/wee-string.h b/src/core/wee-string.h index 678a30350..450829db1 100644 --- a/src/core/wee-string.h +++ b/src/core/wee-string.h @@ -96,8 +96,8 @@ extern char **string_split_shared (const char *string, const char *separators, extern char **string_split_shell (const char *string, int *num_items); extern void string_free_split (char **split_string); extern void string_free_split_shared (char **split_string); -extern char *string_build_with_split_string (const char **split_string, - const char *separator); +extern char *string_rebuild_split_string (const char **split_string, + const char *separator); extern char **string_split_command (const char *command, char separator); extern void string_free_split_command (char **split_command); extern char ***string_split_tags (const char *tags, int *num_tags); diff --git a/src/gui/gui-buffer.c b/src/gui/gui-buffer.c index c8efb3ea9..cb9c46562 100644 --- a/src/gui/gui-buffer.c +++ b/src/gui/gui-buffer.c @@ -4702,8 +4702,8 @@ gui_buffer_dump_hexa (struct t_gui_buffer *buffer) free (prefix_without_colors); if (message_without_colors) free (message_without_colors); - tags = string_build_with_split_string ((const char **)ptr_line->data->tags_array, - ","); + tags = string_rebuild_split_string ((const char **)ptr_line->data->tags_array, + ","); log_printf (" tags: '%s', displayed: %d, highlight: %d", (tags) ? tags : "(none)", ptr_line->data->displayed, @@ -4920,8 +4920,8 @@ gui_buffer_print_log () while (ptr_line) { num--; - tags = string_build_with_split_string ((const char **)ptr_line->data->tags_array, - ","); + tags = string_rebuild_split_string ((const char **)ptr_line->data->tags_array, + ","); log_printf (" line N-%05d: y:%d, str_time:'%s', tags:'%s', " "displayed:%d, highlight:%d, refresh_needed:%d, " "prefix:'%s'", diff --git a/src/gui/gui-filter.c b/src/gui/gui-filter.c index d522eadca..e5d877706 100644 --- a/src/gui/gui-filter.c +++ b/src/gui/gui-filter.c @@ -592,8 +592,8 @@ gui_filter_add_to_infolist (struct t_infolist *infolist, for (i = 0; i < filter->tags_count; i++) { snprintf (option_name, sizeof (option_name), "tag_%05d", i + 1); - tags = string_build_with_split_string ((const char **)filter->tags_array[i], - "+"); + tags = string_rebuild_split_string ((const char **)filter->tags_array[i], + "+"); if (tags) { if (!infolist_new_var_string (ptr_item, option_name, tags)) diff --git a/src/gui/gui-focus.c b/src/gui/gui-focus.c index 50d5cf13b..a57b5a7a9 100644 --- a/src/gui/gui-focus.c +++ b/src/gui/gui-focus.c @@ -201,7 +201,7 @@ gui_focus_to_hashtable (struct t_gui_focus_info *focus_info, const char *key) { str_time = gui_color_decode (((focus_info->chat_line)->data)->str_time, NULL); str_prefix = gui_color_decode (((focus_info->chat_line)->data)->prefix, NULL); - str_tags = string_build_with_split_string ((const char **)((focus_info->chat_line)->data)->tags_array, ","); + str_tags = string_rebuild_split_string ((const char **)((focus_info->chat_line)->data)->tags_array, ","); str_message = gui_color_decode (((focus_info->chat_line)->data)->message, NULL); nick = gui_line_get_nick_tag (focus_info->chat_line); HASHTABLE_SET_POINTER("_chat_line", focus_info->chat_line); diff --git a/src/plugins/fset/fset-option.c b/src/plugins/fset/fset-option.c index 7cd0c5c6d..ce2a02a0e 100644 --- a/src/plugins/fset/fset-option.c +++ b/src/plugins/fset/fset-option.c @@ -570,7 +570,7 @@ fset_option_set_values (struct t_fset_option *fset_option, ptr_string_values = weechat_config_option_get_pointer (option, "string_values"); if (ptr_string_values) { - fset_option->string_values = weechat_string_build_with_split_string ( + fset_option->string_values = weechat_string_rebuild_split_string ( ptr_string_values, ","); } else diff --git a/src/plugins/guile/weechat-guile-api.c b/src/plugins/guile/weechat-guile-api.c index fc176f60f..5d1309990 100644 --- a/src/plugins/guile/weechat-guile-api.c +++ b/src/plugins/guile/weechat-guile-api.c @@ -2601,7 +2601,7 @@ weechat_guile_api_hook_print_cb (const void *pointer, void *data, func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; func_argv[1] = (char *)API_PTR2STR(buffer); func_argv[2] = timebuffer; - func_argv[3] = weechat_string_build_with_split_string (tags, ","); + func_argv[3] = weechat_string_rebuild_split_string (tags, ","); if (!func_argv[3]) func_argv[3] = strdup (""); func_argv[4] = &displayed; diff --git a/src/plugins/irc/irc-mode.c b/src/plugins/irc/irc-mode.c index c3496a01d..7174bce24 100644 --- a/src/plugins/irc/irc-mode.c +++ b/src/plugins/irc/irc-mode.c @@ -68,7 +68,7 @@ irc_mode_get_arguments (const char *arguments) } argv2[argc] = NULL; - new_arguments = weechat_string_build_with_split_string ( + new_arguments = weechat_string_rebuild_split_string ( (const char **)argv2, " "); weechat_string_free_split (argv); diff --git a/src/plugins/javascript/weechat-js-api.cpp b/src/plugins/javascript/weechat-js-api.cpp index 93e6a2c2c..8c0e95b6c 100644 --- a/src/plugins/javascript/weechat-js-api.cpp +++ b/src/plugins/javascript/weechat-js-api.cpp @@ -2521,7 +2521,7 @@ weechat_js_api_hook_print_cb (const void *pointer, void *data, func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; func_argv[1] = (char *)API_PTR2STR(buffer); func_argv[2] = timebuffer; - func_argv[3] = weechat_string_build_with_split_string (tags, ","); + func_argv[3] = weechat_string_rebuild_split_string (tags, ","); if (!func_argv[3]) func_argv[3] = strdup (""); func_argv[4] = &displayed; diff --git a/src/plugins/lua/weechat-lua-api.c b/src/plugins/lua/weechat-lua-api.c index f03c99ffe..fdbe2ed13 100644 --- a/src/plugins/lua/weechat-lua-api.c +++ b/src/plugins/lua/weechat-lua-api.c @@ -2736,7 +2736,7 @@ weechat_lua_api_hook_print_cb (const void *pointer, void *data, func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; func_argv[1] = (char *)API_PTR2STR(buffer); func_argv[2] = timebuffer; - func_argv[3] = weechat_string_build_with_split_string (tags, ","); + func_argv[3] = weechat_string_rebuild_split_string (tags, ","); if (!func_argv[3]) func_argv[3] = strdup (""); func_argv[4] = &displayed; diff --git a/src/plugins/perl/weechat-perl-api.c b/src/plugins/perl/weechat-perl-api.c index 791c276ce..c3b70d5cf 100644 --- a/src/plugins/perl/weechat-perl-api.c +++ b/src/plugins/perl/weechat-perl-api.c @@ -2631,7 +2631,7 @@ weechat_perl_api_hook_print_cb (const void *pointer, void *data, func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; func_argv[1] = (char *)API_PTR2STR(buffer); func_argv[2] = timebuffer; - func_argv[3] = weechat_string_build_with_split_string (tags, ","); + func_argv[3] = weechat_string_rebuild_split_string (tags, ","); if (!func_argv[3]) func_argv[3] = strdup (""); func_argv[4] = &displayed; diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 1e326f3c5..7f8e2b424 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -629,7 +629,7 @@ plugin_load (const char *filename, int init_plugin, int argc, char **argv) new_plugin->string_split = &string_split; new_plugin->string_split_shell = &string_split_shell; new_plugin->string_free_split = &string_free_split; - new_plugin->string_build_with_split_string = &string_build_with_split_string; + new_plugin->string_rebuild_split_string = &string_rebuild_split_string; new_plugin->string_split_command = &string_split_command; new_plugin->string_free_split_command = &string_free_split_command; new_plugin->string_format_size = &string_format_size; diff --git a/src/plugins/python/weechat-python-api.c b/src/plugins/python/weechat-python-api.c index 90ffdaa47..dbbe6d1e0 100644 --- a/src/plugins/python/weechat-python-api.c +++ b/src/plugins/python/weechat-python-api.c @@ -2642,7 +2642,7 @@ weechat_python_api_hook_print_cb (const void *pointer, void *data, func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; func_argv[1] = (char *)API_PTR2STR(buffer); func_argv[2] = timebuffer; - func_argv[3] = weechat_string_build_with_split_string (tags, ","); + func_argv[3] = weechat_string_rebuild_split_string (tags, ","); if (!func_argv[3]) func_argv[3] = strdup (""); func_argv[4] = &displayed; diff --git a/src/plugins/ruby/weechat-ruby-api.c b/src/plugins/ruby/weechat-ruby-api.c index b55c13321..74f240a83 100644 --- a/src/plugins/ruby/weechat-ruby-api.c +++ b/src/plugins/ruby/weechat-ruby-api.c @@ -3216,7 +3216,7 @@ weechat_ruby_api_hook_print_cb (const void *pointer, void *data, func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; func_argv[1] = (char *)API_PTR2STR(buffer); func_argv[2] = timebuffer; - func_argv[3] = weechat_string_build_with_split_string (tags, ","); + func_argv[3] = weechat_string_rebuild_split_string (tags, ","); if (!func_argv[3]) func_argv[3] = strdup (""); func_argv[4] = &displayed; diff --git a/src/plugins/tcl/weechat-tcl-api.c b/src/plugins/tcl/weechat-tcl-api.c index 6d8fe6c0a..0eee83317 100644 --- a/src/plugins/tcl/weechat-tcl-api.c +++ b/src/plugins/tcl/weechat-tcl-api.c @@ -2936,7 +2936,7 @@ weechat_tcl_api_hook_print_cb (const void *pointer, void *data, func_argv[0] = (ptr_data) ? (char *)ptr_data : empty_arg; func_argv[1] = (char *)API_PTR2STR(buffer); func_argv[2] = timebuffer; - func_argv[3] = weechat_string_build_with_split_string (tags, ","); + func_argv[3] = weechat_string_rebuild_split_string (tags, ","); if (!func_argv[3]) func_argv[3] = strdup (""); func_argv[4] = &displayed; diff --git a/src/plugins/trigger/trigger-callback.c b/src/plugins/trigger/trigger-callback.c index 2d9530999..0659911f4 100644 --- a/src/plugins/trigger/trigger-callback.c +++ b/src/plugins/trigger/trigger-callback.c @@ -1030,7 +1030,7 @@ trigger_callback_print_cb (const void *pointer, void *data, free (str_no_color); } - str_tags = weechat_string_build_with_split_string (tags, ","); + str_tags = weechat_string_rebuild_split_string (tags, ","); if (str_tags) { /* build string with tags and commas around: ",tag1,tag2,tag3," */ diff --git a/src/plugins/weechat-plugin.h b/src/plugins/weechat-plugin.h index ff892c737..8146031d8 100644 --- a/src/plugins/weechat-plugin.h +++ b/src/plugins/weechat-plugin.h @@ -68,7 +68,7 @@ struct timeval; * please change the date with current one; for a second change at same * date, increment the 01, otherwise please keep 01. */ -#define WEECHAT_PLUGIN_API_VERSION "20220312-01" +#define WEECHAT_PLUGIN_API_VERSION "20220720-01" /* macros for defining plugin infos */ #define WEECHAT_PLUGIN_NAME(__name) \ @@ -332,8 +332,8 @@ struct t_weechat_plugin int num_items_max, int *num_items); char **(*string_split_shell) (const char *string, int *num_items); void (*string_free_split) (char **split_string); - char *(*string_build_with_split_string) (const char **split_string, - const char *separator); + char *(*string_rebuild_split_string) (const char **split_string, + const char *separator); char **(*string_split_command) (const char *command, char separator); void (*string_free_split_command) (char **split_command); char *(*string_format_size) (unsigned long long size); @@ -1285,10 +1285,10 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin); (weechat_plugin->string_split_shell)(__string, __num_items) #define weechat_string_free_split(__split_string) \ (weechat_plugin->string_free_split)(__split_string) -#define weechat_string_build_with_split_string(__split_string, \ - __separator) \ - (weechat_plugin->string_build_with_split_string)(__split_string, \ - __separator) +#define weechat_string_rebuild_split_string(__split_string, \ + __separator) \ + (weechat_plugin->string_rebuild_split_string)(__split_string, \ + __separator) #define weechat_string_split_command(__command, __separator) \ (weechat_plugin->string_split_command)(__command, __separator) #define weechat_string_free_split_command(__split_command) \ diff --git a/tests/unit/core/test-core-string.cpp b/tests/unit/core/test-core-string.cpp index 8b7d4a952..f14e572a6 100644 --- a/tests/unit/core/test-core-string.cpp +++ b/tests/unit/core/test-core-string.cpp @@ -1700,15 +1700,15 @@ TEST(CoreString, SplitTags) /* * Tests functions: - * string_build_with_split_string + * string_rebuild_split_string */ -TEST(CoreString, SplitBuildWithSplitString) +TEST(CoreString, RebuildSplitString) { char **argv, *str; int argc, flags; - str = string_build_with_split_string (NULL, NULL); + str = string_rebuild_split_string (NULL, NULL); POINTERS_EQUAL(NULL, str); flags = WEECHAT_STRING_SPLIT_STRIP_LEFT @@ -1716,15 +1716,15 @@ TEST(CoreString, SplitBuildWithSplitString) | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS; argv = string_split (" abc de fghi ", " ", NULL, flags, 0, &argc); - str = string_build_with_split_string ((const char **)argv, NULL); + str = string_rebuild_split_string ((const char **)argv, NULL); STRCMP_EQUAL("abcdefghi", str); free (str); - str = string_build_with_split_string ((const char **)argv, ""); + str = string_rebuild_split_string ((const char **)argv, ""); STRCMP_EQUAL("abcdefghi", str); free (str); - str = string_build_with_split_string ((const char **)argv, ";;"); + str = string_rebuild_split_string ((const char **)argv, ";;"); STRCMP_EQUAL("abc;;de;;fghi", str); free (str); |