Keep track of the current offset in the _mu_stream structure.
* include/mailutils/sys/stream.h (_mu_stream)<offset>: New member. * mailbox/stream.c (_stream_fill_buffer): Propagate return value from mu_stream_read_unbuffered. (_stream_flush_buffer): Use stream->offset. Honor the `all' argument. (mu_stream_seek): Rewrite using the `offset' member. (mu_stream_read_unbuffered) (mu_stream_write_unbuffered): Update offset. (mu_stream_readline): Return EINVAL if size is 0.
Showing
2 changed files
with
40 additions
and
34 deletions
-
Please register or sign in to post a comment