9 * Header loading routines for WineLib.
12 /* LOADSHORT Calls LOAD and swaps the high and the low bytes */
14 #define LOAD(x) read (fd, &TAB->x, sizeof (TAB->x))
15 #define LOADSHORT(x) LOAD(x); TAB->x = CONV_SHORT (TAB->x);
16 #define LOADLONG(x) LOAD(x); TAB->x = CONV_LONG (TAB->x);
18 void load_mz_header (int fd, struct mz_header_s *mz_header)
23 LOADSHORT (ne_offset);
26 void load_ne_header (int fd, struct ne_header_s *ne_header)
31 LOADSHORT (linker_version);
32 LOADSHORT (linker_revision);
33 LOADSHORT (entry_tab_offset);
34 LOADSHORT (entry_tab_length);
36 LOADSHORT (format_flags);
37 LOADSHORT (auto_data_seg);
38 LOADSHORT (local_heap_length);
39 LOADSHORT (stack_length);
44 LOADSHORT (n_segment_tab);
45 LOADSHORT (n_mod_ref_tab);
46 LOADSHORT (nrname_tab_length);
47 LOADSHORT (segment_tab_offset);
48 LOADSHORT (resource_tab_offset);
49 LOADSHORT (rname_tab_offset);
50 LOADSHORT (moduleref_tab_offset);
51 LOADSHORT (iname_tab_offset);
52 LOADLONG (nrname_tab_offset);
53 LOADSHORT (n_mov_entry_points);
54 LOADSHORT (align_shift_count);
55 LOADSHORT (n_resource_seg);
56 LOAD (operating_system);
57 LOAD (additional_flags);
58 LOADSHORT (fastload_offset);
59 LOADSHORT (fastload_length);
60 LOADSHORT (reserved2);
61 LOADSHORT (expect_version);
65 * Typeinfo loading routines for non PC-architectures.
68 int load_typeinfo (int fd, struct resource_typeinfo_s *typeinfo)
78 int load_nameinfo (int fd, struct resource_nameinfo_s *nameinfo)