]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/fb-mem.c
Packages: install-ucw-sorter-api make target moved into install-libucw-api.
[libucw.git] / ucw / fb-mem.c
index 38fa9001d374050f3289ce36243816c0fc88a1ed..71b171c7c994e21e1ba9ab7ad2110f8e7376dda9 100644 (file)
@@ -7,8 +7,8 @@
  *     of the GNU Lesser General Public License.
  */
 
-#include "ucw/lib.h"
-#include "ucw/fastbuf.h"
+#include <ucw/lib.h>
+#include <ucw/fastbuf.h>
 
 #include <stdio.h>
 
@@ -30,7 +30,7 @@ struct fb_mem {
   struct memstream *stream;
   struct msblock *block;
 };
-#define FB_MEM(f) ((struct fb_mem *)(f)->is_fastbuf)
+#define FB_MEM(f) ((struct fb_mem *)(f))
 
 static int
 fbmem_refill(struct fastbuf *f)
@@ -128,7 +128,7 @@ fbmem_seek(struct fastbuf *f, ucw_off_t pos, int whence)
       FB_MEM(f)->block = NULL;
       return 1;
     }
-  bthrow(f, "fb.seek", "fbmem_seek to invalid offset");
+  bthrow(f, "seek", "fbmem_seek to an invalid offset");
 }
 
 static void
@@ -162,7 +162,6 @@ fbmem_create(unsigned blocksize)
   f->name = "<fbmem-write>";
   f->spout = fbmem_spout;
   f->close = fbmem_close;
-  fb_tie(f);
   return f;
 }
 
@@ -181,7 +180,6 @@ fbmem_clone_read(struct fastbuf *b)
   f->seek = fbmem_seek;
   f->close = fbmem_close;
   f->can_overwrite_buffer = 1;
-  fb_tie(f);
   return f;
 }