/*
- * Sherlock Library -- Fast Buffered I/O on Memory Streams
+ * UCW Library -- Fast Buffered I/O on Memory Streams
*
* (c) 1997--2002 Martin Mares <mj@ucw.cz>
*
#include "lib/lib.h"
#include "lib/fastbuf.h"
-#include <stdlib.h>
-
struct memstream {
unsigned blocksize;
unsigned uc;
xfree(f);
}
-static int
-fbmem_config(struct fastbuf *f UNUSED, uns item, int value UNUSED)
-{
- switch (item)
- {
- case BCONFIG_CAN_OVERWRITE:
- return 1;
- default:
- return -1;
- }
-}
-
struct fastbuf *
fbmem_create(unsigned blocksize)
{
f->name = "<fbmem-write>";
f->spout = fbmem_spout;
f->close = fbmem_close;
- f->config = fbmem_config;
return f;
}
f->refill = fbmem_refill;
f->seek = fbmem_seek;
f->close = fbmem_close;
- f->config = fbmem_config;
+ f->can_overwrite_buffer = 1;
return f;
}