blob: e010e2bf4a5654f7178148ef5db8762234f175f5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
struct decoder {
unsigned char *data;
int length;
int bitoff;
int byteoff;
int state;
};
void decoder_init(struct decoder *d, void *data, int length);
int decoder_token(struct decoder *d, int *type, int *len);
enum {
BLACK = 0,
WHITE = 1,
TERM = (1 << 7)
};
enum {
DECODER_NOOP = 0,
DECODER_BLACK,
DECODER_WHITE,
DECODER_EOL
};
|