summaryrefslogtreecommitdiffhomepage
path: root/buffer.h
blob: 66f8f0280568c15f09c9902ed3f068a929bbd946 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#pragma once

#include <lua.h>

struct buffer
{
	char * data;
	int length;
	int offset;
	int next;
	int allocated;
};

void grow(lua_State *, struct buffer *);
int read_more(lua_State *, const int, struct buffer *, const int, lua_KContext);
int prepare_at_least(lua_State *, const int, struct buffer *, const int, lua_KContext);
int until(struct buffer *, const char *, const int);