hbmap: fix iterator truncation when size_t < 32bit
[rofl0r-agsutils.git] / Assembler.h
blobe091992690ae3bf0ad3aae351bbf4631b9c6d311
1 #ifndef ASSEMBLER_H
2 #define ASSEMBLER_H
4 #include "ByteArray.h"
5 #include "List.h"
6 #include <stdio.h>
7 #include <stddef.h>
8 #include "hsearch.h"
10 typedef struct AgsAssembler {
11 struct ByteArray obj_b, *obj;
12 struct ByteArray data_b, *data;
13 struct ByteArray code_b, *code;
14 List *export_list, export_list_b;
15 List *fixup_list, fixup_list_b;
16 List *string_list, string_list_b;
17 List *label_ref_list, label_ref_list_b;
18 List *function_ref_list, function_ref_list_b;
19 List *variable_list, variable_list_b;
20 List *import_list, import_list_b;
21 List *sections_list, sections_list_b;
22 struct htab* label_map;
23 struct htab* import_map;
24 struct htab* export_map;
25 struct htab* string_offset_map;
27 size_t string_section_length;
29 FILE* in;
30 } AS;
32 void AS_open_stream(AS* a, FILE* f);
33 int AS_open(AS* a, char* fn);
34 void AS_close(AS* a);
35 int AS_assemble(AS* a, char* out);
37 #pragma RcB2 DEP "Assembler.c"
39 #endif