#ifndef __LC_H__ | |
#define __LC_H__ | |
typedef void * lc_t; | |
#define LC_CONCAT2(s1, s2) s1##s2 | |
#define LC_CONCAT(s1, s2) LC_CONCAT2(s1, s2) | |
#define LC_SET(s) \ | |
do { \ | |
LC_CONCAT(LC_LABEL, __LINE__): \ | |
(s) = &&LC_CONCAT(LC_LABEL, __LINE__); \ | |
} while(0) | |
#define LC_RESUME(s) \ | |
do { \ | |
if(s != NULL) { \ | |
goto *s; \ | |
} \ | |
} while(0) | |
#define LC_END(s) | |
#define LC_INIT(s) s = NULL | |
#endif /* __LC_H__ */ |