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

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

int buffer_grow(struct buffer *);
int buffer_read_more(const int, struct buffer *, const int);
int buffer_prepare_at_least(const int, struct buffer *, const int);
int buffer_until(struct buffer *, const char *, const int);