source: trunk/emx/src/libomflib/omflib0.h@ 2446

Last change on this file since 2446 was 236, checked in by zap, 22 years ago

See ChangeLog.

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