source: vendor/emx/current/src/libomflib/omflib0.h

Last change on this file was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 2.0 KB
Line 
1/* omflib0.h (emx+gcc) -- Copyright (c) 1993-1996 by Eberhard Mattes */
2
3/* Private header file for the emx OMFLIB library. */
4
5#define FALSE 0
6#define TRUE 1
7
8typedef unsigned char byte;
9typedef unsigned short word;
10typedef unsigned long dword;
11
12
13#define FLAG_DELETED 0x0001
14
15enum omf_state
16{
17 OS_EMPTY, /* Empty module */
18 OS_SIMPLE, /* Alias or import definition only */
19 OS_OTHER, /* Any other records present */
20};
21
22struct omfmod
23{
24 char *name;
25 word page;
26 word flags;
27};
28
29struct pubsym
30{
31 word page;
32 char *name;
33};
34
35struct omflib
36{
37 FILE *f;
38 long dict_offset;
39 int page_size;
40 int dict_blocks;
41 int flags;
42 struct omfmod *mod_tab;
43 int mod_alloc;
44 int mod_count;
45 byte *dict;
46 int block_index;
47 int block_index_delta;
48 int bucket_index;
49 int bucket_index_delta;
50 struct pubsym *pub_tab;
51 int pub_alloc;
52 int pub_count;
53 char output;
54 word mod_page;
55 enum omf_state state;
56 char mod_name[256+1];
57};
58
59struct ptr
60{
61 byte *ptr;
62 int len;
63};
64
65#pragma pack(1)
66
67struct omf_rec
68{
69 byte rec_type;
70 word rec_len;
71};
72
73struct lib_header
74{
75 byte rec_type;
76 word rec_len;
77 dword dict_offset;
78 word dict_blocks;
79 byte flags;
80};
81
82#pragma pack()
83
84int omflib_set_error (char *error);
85int omflib_read_dictionary (struct omflib *p, char *error);
86void omflib_hash (struct omflib *p, const byte *name);
87int omflib_pad (FILE *f, int size, int force, char *error);
88int omflib_copy_module (struct omflib *dst_lib, FILE *dst_file,
89 struct omflib *src_lib, FILE *src_file, const char *mod_name, char *error);
90int omflib_make_mod_tab (struct omflib *p, char *error);
91int omflib_pubdef (struct omf_rec *rec, byte *buf, word page,
92 int (*walker)(const char *name, char *error), char *error);
93int omflib_impdef (struct omf_rec *rec, byte *buf, word page,
94 int (*walker)(const char *name, char *error), char *error);
95int omflib_alias (struct omf_rec *rec, byte *buf, word page,
96 int (*walker)(const char *name, char *error), char *error);
Note: See TracBrowser for help on using the repository browser.