Joe Onorato | 84614dd | 2009-08-10 15:01:51 -0700 | [diff] [blame] | 1 | #ifndef SPEC_H |
| 2 | #define SPEC_H |
| 3 | |
Joe Onorato | dd75809 | 2009-08-10 17:46:06 -0700 | [diff] [blame] | 4 | #include <string.h> |
| 5 | #include <stdlib.h> |
| 6 | |
Joe Onorato | 84614dd | 2009-08-10 15:01:51 -0700 | [diff] [blame] | 7 | #if __cplusplus |
| 8 | extern "C" { |
| 9 | #endif |
| 10 | |
| 11 | extern int num_lines; |
| 12 | |
| 13 | typedef struct { |
| 14 | int isConst; |
| 15 | int type; |
| 16 | int bits; |
| 17 | int ptrLevel; |
| 18 | char name[256]; |
| 19 | char typeName[256]; |
| 20 | } VarType; |
| 21 | |
| 22 | extern VarType *currType; |
| 23 | |
| 24 | typedef struct { |
| 25 | char name[256]; |
| 26 | int sync; |
Jason Sams | 9397e30 | 2009-08-27 20:23:34 -0700 | [diff] [blame] | 27 | int handcodeApi; |
Jason Sams | 186e591 | 2011-04-26 14:50:00 -0700 | [diff] [blame] | 28 | int direct; |
| 29 | int nocontext; |
Joe Onorato | 84614dd | 2009-08-10 15:01:51 -0700 | [diff] [blame] | 30 | int paramCount; |
| 31 | VarType ret; |
| 32 | VarType params[16]; |
| 33 | } ApiEntry; |
| 34 | |
| 35 | extern ApiEntry apis[128]; |
| 36 | extern int apiCount; |
| 37 | |
| 38 | extern int typeNextState; |
| 39 | |
| 40 | #if __cplusplus |
| 41 | } // extern "C" |
| 42 | #endif |
| 43 | |
| 44 | #endif // SPEC_H |