source: trunk/src/emx/include/sys/omflib.h@ 344

Last change on this file since 344 was 236, checked in by zap, 23 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: 3.3 KB
Line 
1/* sys/omflib.h (emx+gcc) */
2
3/* Public header file for the emx OMFLIB library. */
4
5#ifndef _SYS_OMFLIB_H
6#define _SYS_OMFLIB_H
7
8#if defined (__cplusplus)
9extern "C" {
10#endif
11
12#ifndef _BYTE_WORD_DWORD
13#define _BYTE_WORD_DWORD
14typedef unsigned char byte;
15typedef unsigned short word;
16typedef unsigned long dword;
17#endif /* _BYTE_WORD_DWORD */
18
19#if !defined (THEADR)
20
21/* OMF record types. To get the 32-bit variant of a record type, add
22 REC32. */
23#define THEADR 0x80 /* Translator module header record */
24#define COMENT 0x88 /* Comment record */
25#define MODEND 0x8a /* Module end record */
26#define EXTDEF 0x8c /* External names definition record */
27#define TYPDEF 0x8e /* Type definition record */
28#define PUBDEF 0x90 /* Public names definition record */
29#define LINNUM 0x94 /* Line numbers record */
30#define LNAMES 0x96 /* List of names record */
31#define SEGDEF 0x98 /* Segment definition record */
32#define GRPDEF 0x9a /* Group definition record */
33#define FIXUPP 0x9c /* Fixup record */
34#define LEDATA 0xa0 /* Logical enumerated data record */
35#define LIDATA 0xa2 /* Logical iterated data record */
36#define COMDEF 0xb0 /* Communal names definition record */
37#define COMDAT 0xc2 /* Common block */
38#define ALIAS 0xc6 /* Alias definition record */
39#define LIBHDR 0xf0 /* Library header */
40#define LIBEND 0xf1 /* Library end */
41
42/* Add this constant (using the | operator) to get the 32-bit variant
43 of a record type. Some fields will contain 32-bit values instead
44 of 16-bit values. */
45#define REC32 0x01
46
47#endif
48
49/* Comment classes */
50
51#if !defined (IMPDEF_CLASS)
52
53#define IMPDEF_CLASS 0xa0
54#define LIBMOD_CLASS 0xa3
55
56#define IMPDEF_SUBTYPE 0x01
57
58#endif
59
60struct omflib;
61
62struct omflib *omflib_open (const char *fname, char *error);
63struct omflib *omflib_create (const char *fname, int page_size, char *error);
64int omflib_close (struct omflib *p, char *error);
65int omflib_module_name (char *dst, const char *src);
66int omflib_find_module (struct omflib *p, const char *name, char *error);
67int omflib_mark_deleted (struct omflib *p, const char *name, char *error);
68int omflib_pubdef_walk (struct omflib *p, word page,
69 int (*walker)(const char *name, char *error), char *error);
70int omflib_extract (struct omflib *p, const char *name, char *error);
71int omflib_add_module (struct omflib *p, const char *fname, char *error);
72int omflib_module_count (struct omflib *p, char *error);
73int omflib_module_info (struct omflib *p, int n, char *name, int *page,
74 char *error);
75int omflib_copy_lib (struct omflib *dst, struct omflib *src, char *error);
76int omflib_finish (struct omflib *p, char *error);
77int omflib_write_record (struct omflib *p, byte rec_type, word rec_len,
78 const byte *buffer, int chksum, char *error);
79int omflib_write_module (struct omflib *p, const char *name, word *pagep,
80 char *error);
81int omflib_add_pub (struct omflib *p, const char *name, word page,
82 char *error);
83int omflib_header (struct omflib *p, char *error);
84int omflib_find_symbol (struct omflib *p, const char *name, char *error);
85long omflib_page_pos (struct omflib *p, int page);
86
87#if defined (__cplusplus)
88}
89#endif
90
91#endif /* not _SYS_OMFLIB_H */
Note: See TracBrowser for help on using the repository browser.