-
Notifications
You must be signed in to change notification settings - Fork 1
/
zfin.h
28 lines (21 loc) · 869 Bytes
/
zfin.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* zfin.h
* Scott Bronson
* 13 June 2005
*/
typedef struct {
void (*found)(struct fifo *f, const char *buf, int size, int fd);
const char *ref; // remembers where in the zfin string we're scanning.
int oocount; // remembers how many Os we've seen
char *savebuf; // saves all data after the ZFIN+OO.
int savemax;
int savecnt;
master_pipe *master;
} zfinscanstate;
zfinscanstate* zfin_create(master_pipe *mp,
void (*proc)(struct fifo *f, const char *buf, int size, int fd));
void zfin_destroy(zfinscanstate *state);
void zfin_scan(struct fifo *f, const char *buf, int size, int fd);
void zfin_nooo(struct fifo *f, const char *buf, int size, int fd);
void zfin_save(struct fifo *f, const char *buf, int size, int fd);
void zfin_term(struct fifo *f, const char *buf, int size, int fd);
void zfin_drop(struct fifo *f, const char *buf, int size, int fd);