summaryrefslogtreecommitdiff
path: root/src/core/hook
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2019-06-15 20:47:14 +0200
committerSébastien Helleu <flashcode@flashtux.org>2019-06-15 20:47:14 +0200
commit917815635415b523eaf58ed4c65757247d5cca99 (patch)
treeabac3f1894ed07cbf2caed70cc285bde87b3263c /src/core/hook
parent866a29c7e63bbda24e04fc36b34bbd798a8c98db (diff)
downloadweechat-917815635415b523eaf58ed4c65757247d5cca99.zip
api: add argument "strip_items" in function string_split
Diffstat (limited to 'src/core/hook')
-rw-r--r--src/core/hook/wee-hook-command.c6
-rw-r--r--src/core/hook/wee-hook-focus.c2
-rw-r--r--src/core/hook/wee-hook-line.c1
3 files changed, 6 insertions, 3 deletions
diff --git a/src/core/hook/wee-hook-command.c b/src/core/hook/wee-hook-command.c
index 31d9a90d5..4708a4518 100644
--- a/src/core/hook/wee-hook-command.c
+++ b/src/core/hook/wee-hook-command.c
@@ -174,6 +174,7 @@ hook_command_build_completion (struct t_hook_command *hook_command)
hook_command->cplt_template_args[i] = string_split (
hook_command->cplt_templates[i],
" ",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -218,6 +219,7 @@ hook_command_build_completion (struct t_hook_command *hook_command)
items = string_split (
hook_command->cplt_template_args[j][i],
"|",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -349,7 +351,7 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
if (hook_command_run_exec (buffer, string) == WEECHAT_RC_OK_EAT)
return HOOK_COMMAND_EXEC_OK;
- argv = string_split (string, " ",
+ argv = string_split (string, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
@@ -359,7 +361,7 @@ hook_command_exec (struct t_gui_buffer *buffer, int any_plugin,
string_free_split (argv);
return HOOK_COMMAND_EXEC_NOT_FOUND;
}
- argv_eol = string_split (string, " ",
+ argv_eol = string_split (string, " ", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS
diff --git a/src/core/hook/wee-hook-focus.c b/src/core/hook/wee-hook-focus.c
index 357c82087..dd303a243 100644
--- a/src/core/hook/wee-hook-focus.c
+++ b/src/core/hook/wee-hook-focus.c
@@ -233,7 +233,7 @@ hook_focus_get_data (struct t_hashtable *hashtable_focus1,
keys = hashtable_get_string (hashtable1, "keys");
if (keys)
{
- list_keys = string_split (keys, ",",
+ list_keys = string_split (keys, ",", NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,
diff --git a/src/core/hook/wee-hook-line.c b/src/core/hook/wee-hook-line.c
index e6e0e498c..5c16bf63d 100644
--- a/src/core/hook/wee-hook-line.c
+++ b/src/core/hook/wee-hook-line.c
@@ -79,6 +79,7 @@ hook_line (struct t_weechat_plugin *plugin, const char *buffer_type,
new_hook_line->buffers = string_split (
(buffer_name && buffer_name[0]) ? buffer_name : "*",
",",
+ NULL,
WEECHAT_STRING_SPLIT_STRIP_LEFT
| WEECHAT_STRING_SPLIT_STRIP_RIGHT
| WEECHAT_STRING_SPLIT_COLLAPSE_SEPS,