* Sherlock Library -- Fast Buffered I/O
*
* (c) 1997--2000 Martin Mares <mj@ucw.cz>
+ *
+ * This software may be freely distributed and used according to the terms
+ * of the GNU Lesser General Public License.
*/
#include "lib/lib.h"
}
int
-bdirect_read(struct fastbuf *f, byte **buf)
+bdirect_read_prepare(struct fastbuf *f, byte **buf)
{
int len;
return EOF;
*buf = f->bptr;
len = f->bstop - f->bptr;
- f->bptr += len;
return len;
}
+void
+bdirect_read_commit(struct fastbuf *f, byte *pos)
+{
+ f->bptr = pos;
+}
+
int
bdirect_write_prepare(struct fastbuf *f, byte **buf)
{