/* FastIO on static buffers */
-void fbbuf_init_read(struct fastbuf *f, byte *buffer, uns size);
+void fbbuf_init_read(struct fastbuf *f, byte *buffer, uns size, uns can_overwrite);
void fbbuf_init_write(struct fastbuf *f, byte *buffer, uns size);
static inline uns
fbbuf_count_written(struct fastbuf *f)
/*
* Sherlock Library -- Fast Buffered I/O on Static Buffers
*
- * (c) 2003 Martin Mares <mj@ucw.cz>
+ * (c) 2003--2004 Martin Mares <mj@ucw.cz>
*
* This software may be freely distributed and used according to the terms
* of the GNU Lesser General Public License.
}
void
-fbbuf_init_read(struct fastbuf *f, byte *buf, uns size)
+fbbuf_init_read(struct fastbuf *f, byte *buf, uns size, uns can_overwrite)
{
f->buffer = f->bptr = buf;
f->bstop = f->bufend = buf + size;
f->seek = NULL;
f->close = NULL;
f->config = NULL;
- f->can_overwrite_buffer = 1;
+ f->can_overwrite_buffer = can_overwrite;
}
static void