From cfd221014c1e5337ec14503430c98ca620024f81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 23 Aug 2020 23:27:57 +0200 Subject: api: add argument "bytes" in function string_dyn_concat --- src/plugins/guile/weechat-guile.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/plugins/guile') diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c index 4b6406e48..e1a6484c7 100644 --- a/src/plugins/guile/weechat-guile.c +++ b/src/plugins/guile/weechat-guile.c @@ -1180,13 +1180,13 @@ weechat_guile_port_write (SCM port, SCM src, size_t start, size_t count) ptr_data = data2; while ((ptr_newline = strchr (ptr_data, '\n')) != NULL) { - ptr_newline[0] = '\0'; - weechat_string_dyn_concat (guile_buffer_output, ptr_data); + weechat_string_dyn_concat (guile_buffer_output, + ptr_data, + ptr_newline - ptr_data); weechat_guile_output_flush (); - ptr_newline[0] = '\n'; ptr_data = ++ptr_newline; } - weechat_string_dyn_concat (guile_buffer_output, ptr_data); + weechat_string_dyn_concat (guile_buffer_output, ptr_data, -1); free (data2); @@ -1212,13 +1212,13 @@ weechat_guile_port_write (SCM port, const void *data, size_t size) ptr_data = data2; while ((ptr_newline = strchr (ptr_data, '\n')) != NULL) { - ptr_newline[0] = '\0'; - weechat_string_dyn_concat (guile_buffer_output, ptr_data); + weechat_string_dyn_concat (guile_buffer_output, + ptr_data, + ptr_newline - ptr_data); weechat_guile_output_flush (); - ptr_newline[0] = '\n'; ptr_data = ++ptr_newline; } - weechat_string_dyn_concat (guile_buffer_output, ptr_data); + weechat_string_dyn_concat (guile_buffer_output, ptr_data, -1); free (data2); } -- cgit v1.2.3