| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
#ifndef __BINCFG_H |
| 5 |
#define __BINCFG_H |
| 6 |
|
| 7 |
#define VALID_BIT 0x80 |
| 8 |
#define MAX_WIDTH 32 |
| 9 |
#define CHECKSUM_SIZE 16 |
| 10 |
|
| 11 |
struct field { |
| 12 |
char *name; |
| 13 |
unsigned int width; |
| 14 |
unsigned int value; |
| 15 |
struct field *next; |
| 16 |
}; |
| 17 |
|
| 18 |
|
| 19 |
struct blob { |
| 20 |
unsigned int bloblen; |
| 21 |
unsigned char *blb; |
| 22 |
unsigned short checksum; |
| 23 |
unsigned char *actualblob; |
| 24 |
unsigned int lenactualblob; |
| 25 |
}; |
| 26 |
|
| 27 |
static struct field *putsym (char const *, unsigned int); |
| 28 |
static struct field *getsym (char const *); |
| 29 |
static void yyerror (FILE* fp, char const *); |
| 30 |
int yylex (void); |
| 31 |
|
| 32 |
static struct blob *binary; |
| 33 |
static struct field *sym_table; |
| 34 |
static struct field *sym_table_tail; |
| 35 |
|
| 36 |
#endif |