char *read_pos;
};
-#define TOKBUF_PAGE 256
+#define TOKBUF_PAGE 65536
static void init_tokbuf(struct tokbuf *tb)
{
struct tokpage *pg = tb->last_page;
if (!pg || pg->end - pg->pos < l)
{
+ if (pg)
+ pg->end = pg->pos;
int size = TOKBUF_PAGE - sizeof(struct tokbuf);
if (l > size/5)
size = l;