summaryrefslogtreecommitdiff
path: root/rdoff/rdlib.h
blob: c051da73e17d1108f6add16775696306647d4646 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * rdlib.h	Functions for manipulating libraries of RDOFF object files.
 */

#ifndef RDOFF_RDLIB_H
#define RDOFF_RDLIB_H 1

struct librarynode {
    char *name;
    FILE *fp;                   /* initialised to NULL - always check */
    int referenced;             /* & open if required. Close afterwards */
    struct librarynode *next;   /* if ! referenced. */
};

extern int rdl_error;

#define RDL_EOPEN     1
#define RDL_EINVALID  2
#define RDL_EVERSION  3
#define RDL_ENOTFOUND 4

int rdl_verify(const int8_t *filename);
int rdl_open(struct librarynode *lib, const int8_t *filename);
int rdl_searchlib(struct librarynode *lib, const int8_t *label, rdffile * f);
int rdl_openmodule(struct librarynode *lib, int module, rdffile * f);

void rdl_perror(const int8_t *apname, const int8_t *filename);

#endif