revert back to old itasks, add sds support in bytecode
[mTask.git] / int / misc.h
1 #ifndef MISC_H
2 #define MISC_H
3
4 #define DEBUG
5
6 #ifdef DEBUG
7 #define debug(s, ...) printf(s, ##__VA_ARGS__);
8 #define trace(op, ...) printf("pc: %d, sp: %d, op: " op, pc, sp, ##__VA_ARGS__);
9 #else
10 #define debug(s, ...) ;
11 #define trace(pc, sp, op) ;
12 #endif
13
14 #define pdie(s) {perror(s); exit(1);}
15 #define die(s, ...) {fprintf(stderr, s, ##__VA_ARGS__); exit(1);}
16
17 #endif