lustrec/include/arrow.h @ 04e26a3f
1 |
|
---|---|
2 |
#ifndef _ARROW
|
3 |
#define _ARROW
|
4 |
|
5 |
struct _arrow_mem {struct _arrow_reg {_Bool _first; } _reg; }; |
6 |
|
7 |
extern struct _arrow_mem *arrow_alloc (); |
8 |
|
9 |
#define _arrow_DECLARE(inst)\
|
10 |
struct _arrow_mem inst;
|
11 |
|
12 |
#define _arrow_LINK(inst) do {\
|
13 |
;\
|
14 |
} while (0)
|
15 |
|
16 |
#define _arrow_step(x,y,output,self) ((self)->_reg._first?((self)->_reg._first=0,(*output = x)):(*output = y))
|
17 |
|
18 |
#define _arrow_reset(self) {(self)->_reg._first = 1;}
|
19 |
|
20 |
#endif
|