summaryrefslogtreecommitdiff
path: root/stream.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@sourcefrog.net>2001-03-11 03:45:47 +0000
committerMartin Pool <mbp@sourcefrog.net>2001-03-11 03:45:47 +0000
commitcd396675ad78cad43988b192ce60dc83c58d0b09 (patch)
treea80105556bb8f62dd7e706f45faf998c0555bc9c /stream.c
parent90517d4d2d995632d4483d6264e270cd75fc6705 (diff)
downloadlibrsync-cd396675ad78cad43988b192ce60dc83c58d0b09.tar.gz
It's no longer necessary to call rs_buffers_init on a stream before
starting to use it: all the internal data is kept in the job, not in the stream. Rename rs_stream_t to rs_buffers_t, a more obvious name. Pass the buffers to every rs_job_iter() call, rather than setting it at startup. Similarly for all the _begin() functions. rs_job_new also takes the initial state function. Return RS_PARAM_ERROR when library is misused.
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stream.c b/stream.c
index ea3e90e..3b00c45 100644
--- a/stream.c
+++ b/stream.c
@@ -108,7 +108,7 @@ static const int RS_STREAM_DOGTAG = 2001125;
* rs_blow_copy to cause the copy to happen gradually as space
* becomes available.
*/
-int rs_stream_copy(rs_stream_t *stream, int max_len)
+int rs_buffers_copy(rs_buffers_t *stream, int max_len)
{
int len = max_len;
@@ -146,7 +146,7 @@ int rs_stream_copy(rs_stream_t *stream, int max_len)
* because it has either consumed all the input or has filled the
* output buffer. This function checks that simple postcondition.
*/
-void rs_stream_check_exit(rs_stream_t const *stream)
+void rs_buffers_check_exit(rs_buffers_t const *stream)
{
assert(stream->avail_in == 0 || stream->avail_out == 0);
}