]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fb-mem.c
Removed trailing whitespaces.
[libucw.git] / lib / fb-mem.c
index efe749c51ede07d18c1b1db6d4b2290ccd243e95..0de590e04fb90b19cca2c567f2c7c338d75b4180 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *     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>
  *
@@ -10,8 +10,6 @@
 #include "lib/lib.h"
 #include "lib/fastbuf.h"
 
-#include <stdlib.h>
-
 struct memstream {
   unsigned blocksize;
   unsigned uc;
@@ -149,18 +147,6 @@ fbmem_close(struct fastbuf *f)
   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)
 {
@@ -174,7 +160,6 @@ fbmem_create(unsigned blocksize)
   f->name = "<fbmem-write>";
   f->spout = fbmem_spout;
   f->close = fbmem_close;
-  f->config = fbmem_config;
   return f;
 }
 
@@ -192,7 +177,7 @@ fbmem_clone_read(struct fastbuf *b)
   f->refill = fbmem_refill;
   f->seek = fbmem_seek;
   f->close = fbmem_close;
-  f->config = fbmem_config;
+  f->can_overwrite_buffer = 1;
   return f;
 }