2004-09-15 14:54:34 +08:00
|
|
|
/*
|
|
|
|
* rdlib.h Functions for manipulating libraries of RDOFF object files.
|
|
|
|
*/
|
2002-05-01 04:52:08 +08:00
|
|
|
|
2007-04-13 00:54:50 +08:00
|
|
|
#ifndef RDOFF_RDLIB_H
|
|
|
|
#define RDOFF_RDLIB_H 1
|
|
|
|
|
2002-05-01 04:52:08 +08:00
|
|
|
struct librarynode {
|
2007-04-13 00:54:50 +08:00
|
|
|
char *name;
|
2005-01-16 06:15:51 +08:00
|
|
|
FILE *fp; /* initialised to NULL - always check */
|
|
|
|
int referenced; /* & open if required. Close afterwards */
|
|
|
|
struct librarynode *next; /* if ! referenced. */
|
2002-05-01 04:52:08 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
extern int rdl_error;
|
|
|
|
|
2002-05-01 04:58:18 +08:00
|
|
|
#define RDL_EOPEN 1
|
|
|
|
#define RDL_EINVALID 2
|
|
|
|
#define RDL_EVERSION 3
|
|
|
|
#define RDL_ENOTFOUND 4
|
|
|
|
|
2007-04-12 10:40:54 +08:00
|
|
|
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);
|
2005-01-16 06:15:51 +08:00
|
|
|
int rdl_openmodule(struct librarynode *lib, int module, rdffile * f);
|
2002-05-01 04:58:18 +08:00
|
|
|
|
2007-04-12 10:40:54 +08:00
|
|
|
void rdl_perror(const int8_t *apname, const int8_t *filename);
|
2007-04-13 00:54:50 +08:00
|
|
|
|
|
|
|
#endif
|