From d234f54b2f82067699f36593188e687fc7dc321a Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Sun, 10 Oct 2010 21:44:21 -0500 Subject: vcs-svn: make buffer_skip_bytes return length read Currently there is no way to detect when input ended if it ended early during buffer_skip_bytes. Tell the calling program how many bytes were actually skipped for easier debugging. Existing callers will still ignore early EOF. Signed-off-by: Jonathan Nieder Signed-off-by: David Barr Signed-off-by: Jonathan Nieder --- vcs-svn/line_buffer.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'vcs-svn/line_buffer.txt') diff --git a/vcs-svn/line_buffer.txt b/vcs-svn/line_buffer.txt index e89cc41d5..4ef0755cf 100644 --- a/vcs-svn/line_buffer.txt +++ b/vcs-svn/line_buffer.txt @@ -76,7 +76,8 @@ Functions `buffer_skip_bytes`:: Discards `len` bytes from the input stream (stopping early - if necessary because of an error or eof). + if necessary because of an error or eof). Return value is + the number of bytes successfully read. `buffer_reset`:: Deallocates non-static buffers. -- cgit v1.2.1