diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2020-08-23 23:27:57 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2020-08-23 23:27:57 +0200 |
commit | cfd221014c1e5337ec14503430c98ca620024f81 (patch) | |
tree | dab43957d533958230c6bf8471c86526825bf47f /src/plugins/guile/weechat-guile.c | |
parent | b459dab84bcc2fa30634c083c931797e3ca6f4f6 (diff) | |
download | weechat-cfd221014c1e5337ec14503430c98ca620024f81.zip |
api: add argument "bytes" in function string_dyn_concat
Diffstat (limited to 'src/plugins/guile/weechat-guile.c')
-rw-r--r-- | src/plugins/guile/weechat-guile.c | 16 |
1 files changed, 8 insertions, 8 deletions
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); } |