diff options
| author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-08-12 19:16:06 -0300 |
|---|---|---|
| committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-08-13 08:52:17 -0300 |
| commit | 6b3cd381dcd01268479dc56103498a029133644d (patch) | |
| tree | 0944a99a09ca4c574d4a3945e9bcb9d4f0e8d505 /src/nvim/os | |
| parent | 166d8c799f367e64744cef4d9a6ddd386809ece8 (diff) | |
| download | rneovim-6b3cd381dcd01268479dc56103498a029133644d.tar.gz rneovim-6b3cd381dcd01268479dc56103498a029133644d.tar.bz2 rneovim-6b3cd381dcd01268479dc56103498a029133644d.zip | |
rstream: Pass read count to read events
This is necessary to keep events in the same order received from the OS.
Diffstat (limited to 'src/nvim/os')
| -rw-r--r-- | src/nvim/os/input.c | 3 | ||||
| -rw-r--r-- | src/nvim/os/shell.c | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/src/nvim/os/input.c b/src/nvim/os/input.c index 8bc713bcff..09f162f79d 100644 --- a/src/nvim/os/input.c +++ b/src/nvim/os/input.c @@ -316,7 +316,8 @@ static InbufPollResult inbuf_poll(int ms) return input_eof ? kInputEof : kInputNone; } -static void read_cb(Stream *stream, RBuffer *buf, void *data, bool at_eof) +static void read_cb(Stream *stream, RBuffer *buf, size_t c, void *data, + bool at_eof) { if (at_eof) { input_eof = true; diff --git a/src/nvim/os/shell.c b/src/nvim/os/shell.c index 8faa46dd63..77750bb077 100644 --- a/src/nvim/os/shell.c +++ b/src/nvim/os/shell.c @@ -298,7 +298,8 @@ static void dynamic_buffer_ensure(DynamicBuffer *buf, size_t desired) buf->data = xrealloc(buf->data, buf->cap); } -static void system_data_cb(Stream *stream, RBuffer *buf, void *data, bool eof) +static void system_data_cb(Stream *stream, RBuffer *buf, size_t count, + void *data, bool eof) { DynamicBuffer *dbuf = data; @@ -308,7 +309,8 @@ static void system_data_cb(Stream *stream, RBuffer *buf, void *data, bool eof) dbuf->len += nread; } -static void out_data_cb(Stream *stream, RBuffer *buf, void *data, bool eof) +static void out_data_cb(Stream *stream, RBuffer *buf, size_t count, void *data, + bool eof) { size_t cnt; char *ptr = rbuffer_read_ptr(buf, &cnt); |