| 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)
|
|---|
| 9 | extern "C" {
|
|---|
| 10 | #endif
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 | #if !defined (THEADR)
|
|---|
| 14 |
|
|---|
| 15 | #define THEADR 0x80
|
|---|
| 16 | #define LHEADR 0x82
|
|---|
| 17 | #define COMENT 0x88
|
|---|
| 18 | #define MODEND 0x8a
|
|---|
| 19 | #define PUBDEF 0x90
|
|---|
| 20 | #define ALIAS 0xc6
|
|---|
| 21 | #define LIBHDR 0xf0
|
|---|
| 22 | #define LIBEND 0xf1
|
|---|
| 23 |
|
|---|
| 24 | #define REC32 0x01
|
|---|
| 25 |
|
|---|
| 26 | #endif
|
|---|
| 27 |
|
|---|
| 28 | /* Comment classes */
|
|---|
| 29 |
|
|---|
| 30 | #if !defined (IMPDEF_CLASS)
|
|---|
| 31 |
|
|---|
| 32 | #define IMPDEF_CLASS 0xa0
|
|---|
| 33 | #define LIBMOD_CLASS 0xa3
|
|---|
| 34 |
|
|---|
| 35 | #define IMPDEF_SUBTYPE 0x01
|
|---|
| 36 |
|
|---|
| 37 | #endif
|
|---|
| 38 |
|
|---|
| 39 | struct omflib;
|
|---|
| 40 |
|
|---|
| 41 | struct omflib *omflib_open (const char *fname, char *error);
|
|---|
| 42 | struct omflib *omflib_create (const char *fname, int page_size, char *error);
|
|---|
| 43 | int omflib_close (struct omflib *p, char *error);
|
|---|
| 44 | int omflib_module_name (char *dst, const char *src);
|
|---|
| 45 | int omflib_find_module (struct omflib *p, const char *name, char *error);
|
|---|
| 46 | int omflib_mark_deleted (struct omflib *p, const char *name, char *error);
|
|---|
| 47 | int omflib_pubdef_walk (struct omflib *p, word page,
|
|---|
| 48 | int (*walker)(const char *name, char *error), char *error);
|
|---|
| 49 | int omflib_extract (struct omflib *p, const char *name, char *error);
|
|---|
| 50 | int omflib_add_module (struct omflib *p, const char *fname, char *error);
|
|---|
| 51 | int omflib_module_count (struct omflib *p, char *error);
|
|---|
| 52 | int omflib_module_info (struct omflib *p, int n, char *name, int *page,
|
|---|
| 53 | char *error);
|
|---|
| 54 | int omflib_copy_lib (struct omflib *dst, struct omflib *src, char *error);
|
|---|
| 55 | int omflib_finish (struct omflib *p, char *error);
|
|---|
| 56 | int omflib_write_record (struct omflib *p, byte rec_type, word rec_len,
|
|---|
| 57 | const byte *buffer, int chksum, char *error);
|
|---|
| 58 | int omflib_write_module (struct omflib *p, const char *name, word *pagep,
|
|---|
| 59 | char *error);
|
|---|
| 60 | int omflib_add_pub (struct omflib *p, const char *name, word page,
|
|---|
| 61 | char *error);
|
|---|
| 62 | int omflib_header (struct omflib *p, char *error);
|
|---|
| 63 | int omflib_find_symbol (struct omflib *p, const char *name, char *error);
|
|---|
| 64 | long omflib_page_pos (struct omflib *p, int page);
|
|---|
| 65 |
|
|---|
| 66 | #if defined (__cplusplus)
|
|---|
| 67 | }
|
|---|
| 68 | #endif
|
|---|
| 69 |
|
|---|
| 70 | #endif /* not _SYS_OMFLIB_H */
|
|---|