#include <proto/exec.h>
#include <exec/execbase.h>
#include <exec/memory.h>
#include <exec/resident.h>
#include <exec/initializers.h>

#include <emul/emulinterface.h>
#include <emul/emulregs.h>
#include <ppcinline/exec.h>
#include <public/quark/quark.h>
#include <public/proto/quark/syscall_protos.h>

#define LIBVER	1
#define LIBREV	1
#define LIBDATE	"(24.10.98)"
#define LIBNAME	"xpkGZIP.library"

#define LIBID "xpkGZIP 1.1 (24.10.98) by Gunther Nikl (using zlib 1.1.3) [MorphOS]\r\n"


struct XpkSubBase {
	struct Library xsb_Lib;
	UWORD xsb_Pad;

	struct ExecBase *xsb_SysBase;
	BPTR xsb_SegList;
};


struct Library *LibInit(struct XpkSubBase *XpkSubBase, BPTR SegList, struct ExecBase *sysbase);
struct Library *LIB_Open(void);
BPTR LIB_Close(void);
BPTR LIB_Expunge(void);

#define LIBXpksPackFree   LIBXpksFree
#define LIBXpksUnpackFree LIBXpksFree

const struct XpkInfo *LIBXpksPackerInfo(void);
LONG LIBXpksPackChunk(void);
void LIBXpksPackFree(void);
LONG LIBXpksPackReset(void);
LONG LIBXpksUnpackChunk(void);
//void LIBXpksUnpackFree(void);
