* of the GNU Lesser General Public License.
*/
-#include "ucw/lib.h"
-#include "ucw/fastbuf.h"
-#include "ucw/mempool.h"
+#include <ucw/lib.h>
+#include <ucw/fastbuf.h>
+#include <ucw/mempool.h>
#include <stdio.h>
#include <stdlib.h>
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)
{
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;
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)