aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/os
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2014-11-07 13:35:31 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2014-11-07 13:35:49 -0300
commit05ae9781b5d1dbff7bf82051e9ba6f8e3a68953b (patch)
treed6d72199053903f3aafe0a6752c1bbb75a99a0c9 /src/nvim/os
parent07775c07c0c269fe70effa0489f65fb98143c12c (diff)
parentea3296ad856fcf6124fbac9c05888745caa5bbab (diff)
downloadrneovim-05ae9781b5d1dbff7bf82051e9ba6f8e3a68953b.tar.gz
rneovim-05ae9781b5d1dbff7bf82051e9ba6f8e3a68953b.tar.bz2
rneovim-05ae9781b5d1dbff7bf82051e9ba6f8e3a68953b.zip
Merge PR #1255 '[RDY] Set `v:job_data[2]` line-wise and `jobsend(,[list]). (#1243)'
Diffstat (limited to 'src/nvim/os')
-rw-r--r--src/nvim/os/rstream.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nvim/os/rstream.c b/src/nvim/os/rstream.c
index f16226cdd1..e36a0213c8 100644
--- a/src/nvim/os/rstream.c
+++ b/src/nvim/os/rstream.c
@@ -190,6 +190,18 @@ RStream * rstream_new(rstream_cb cb, RBuffer *buffer, void *data)
return rv;
}
+/// Returns the read pointer used by the rstream.
+char *rstream_read_ptr(RStream *rstream)
+{
+ return rbuffer_read_ptr(rstream->buffer);
+}
+
+/// Returns the number of bytes before the rstream is full.
+size_t rstream_available(RStream *rstream)
+{
+ return rbuffer_available(rstream->buffer);
+}
+
/// Frees all memory allocated for a RStream instance
///
/// @param rstream The `RStream` instance