diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-03-10 13:16:59 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-03-10 18:29:16 +0100 |
commit | 2b70d71aa1c891f2f251aa775cf239e5611576d5 (patch) | |
tree | 33b7daaa910582482c420e4e1e06a2d8851572e9 /src/plugins/fset | |
parent | 8aa5f5375e2a16d538fdf96babcd52a2f8f7801c (diff) | |
download | weechat-2b70d71aa1c891f2f251aa775cf239e5611576d5.zip |
core: replace argument "keep_eol" by "flags" in function string_split (closes #1322)
Diffstat (limited to 'src/plugins/fset')
-rw-r--r-- | src/plugins/fset/fset-buffer.c | 6 | ||||
-rw-r--r-- | src/plugins/fset/fset-command.c | 6 | ||||
-rw-r--r-- | src/plugins/fset/fset-completion.c | 7 | ||||
-rw-r--r-- | src/plugins/fset/fset-config.c | 7 |
4 files changed, 22 insertions, 4 deletions
diff --git a/src/plugins/fset/fset-buffer.c b/src/plugins/fset/fset-buffer.c index 9a6653e5e..6820148ca 100644 --- a/src/plugins/fset/fset-buffer.c +++ b/src/plugins/fset/fset-buffer.c @@ -782,7 +782,11 @@ fset_buffer_display_option_eval (struct t_fset_option *fset_option) NULL); if (line) { - lines = weechat_string_split (line, "\r\n", 0, 0, &num_lines); + lines = weechat_string_split (line, "\r\n", + WEECHAT_STRING_SPLIT_STRIP_LEFT + | WEECHAT_STRING_SPLIT_STRIP_RIGHT + | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS, + 0, &num_lines); if (lines) { y = fset_option->index * fset_config_format_option_num_lines[format_number - 1]; diff --git a/src/plugins/fset/fset-command.c b/src/plugins/fset/fset-command.c index 6d9324e37..4b510a8a7 100644 --- a/src/plugins/fset/fset-command.c +++ b/src/plugins/fset/fset-command.c @@ -469,7 +469,11 @@ fset_command_run_set_cb (const void *pointer, void *data, rc = WEECHAT_RC_OK; - argv = weechat_string_split (command, " ", 0, 0, &argc); + argv = weechat_string_split (command, " ", + WEECHAT_STRING_SPLIT_STRIP_LEFT + | WEECHAT_STRING_SPLIT_STRIP_RIGHT + | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS, + 0, &argc); if (argc > 2) goto end; diff --git a/src/plugins/fset/fset-completion.c b/src/plugins/fset/fset-completion.c index 90124a3d7..25b2eb6ec 100644 --- a/src/plugins/fset/fset-completion.c +++ b/src/plugins/fset/fset-completion.c @@ -81,7 +81,12 @@ fset_completion_option_cb (const void *pointer, void *data, WEECHAT_LIST_POS_SORT); words = weechat_string_split ( weechat_config_option_get_string (ptr_option, "name"), - "_", 0, 0, &num_words); + "_", + WEECHAT_STRING_SPLIT_STRIP_LEFT + | WEECHAT_STRING_SPLIT_STRIP_RIGHT + | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS, + 0, + &num_words); if (words && (num_words > 1)) { for (i = 0; i < num_words; i++) diff --git a/src/plugins/fset/fset-config.c b/src/plugins/fset/fset-config.c index 5994c9d5f..3a4b1bb18 100644 --- a/src/plugins/fset/fset-config.c +++ b/src/plugins/fset/fset-config.c @@ -153,7 +153,12 @@ fset_config_change_sort_cb (const void *pointer, void *data, fset_config_sort_fields = weechat_string_split ( weechat_config_string (fset_config_look_sort), - ",", 0, 0, &fset_config_sort_fields_count); + ",", + WEECHAT_STRING_SPLIT_STRIP_LEFT + | WEECHAT_STRING_SPLIT_STRIP_RIGHT + | WEECHAT_STRING_SPLIT_COLLAPSE_SEPS, + 0, + &fset_config_sort_fields_count); if (fset_buffer) { |