X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Ffb-grow.c;h=0898a1a4be68b6128796bdc866f0598f77024942;hb=5959916922193dea72ec0f74fa0a5211ca68f9c4;hp=ab80be0b0c85569234393d33c1d010629db682d2;hpb=f46a288be7a8572b20432833104099305dcd6abd;p=libucw.git diff --git a/ucw/fb-grow.c b/ucw/fb-grow.c index ab80be0b..0898a1a4 100644 --- a/ucw/fb-grow.c +++ b/ucw/fb-grow.c @@ -7,9 +7,9 @@ * of the GNU Lesser General Public License. */ -#include "ucw/lib.h" -#include "ucw/fastbuf.h" -#include "ucw/mempool.h" +#include +#include +#include #include #include @@ -19,7 +19,7 @@ struct fb_gbuf { struct mempool *mp; byte *end; }; -#define FB_GBUF(f) ((struct fb_gbuf *)(f)->is_fastbuf) +#define FB_GBUF(f) ((struct fb_gbuf *)(f)) static int fbgrow_refill(struct fastbuf *b) { @@ -56,7 +56,7 @@ static int fbgrow_seek(struct fastbuf *b, ucw_off_t pos, int whence) if (whence == SEEK_END) pos += len; if (pos < 0 || pos > len) - bthrow(b, "fb.seek", "Seek out of range"); + bthrow(b, "seek", "Seek out of range"); b->bptr = b->buffer + pos; b->bstop = b->buffer; b->pos = 0; @@ -92,7 +92,7 @@ struct fastbuf *fbgrow_create_mp(struct mempool *mp, unsigned basic_size) b->spout = fbgrow_spout; b->seek = fbgrow_seek; b->can_overwrite_buffer = 1; - return fb_tie(b); + return b; } struct fastbuf *fbgrow_create(unsigned basic_size)