#include "config.h"
#define	FILENOTFOUND	1
#define	NONZMD			2
#define	ZMDVERERR		3
#define	READERR			4
#define	WRITEERR		5
#define	FLUSHERR		6
#define	SWERR			7
#define	TOOMANYFILES	8
#define	WAVNOTDEFIND	9
#define	NOMEMORY		10
#define	ILLEGALSWITCH	11
void initMemMaster(void);
void efreeAll(void);
void efreeAll2(char *label);
void efree(void *ptr, char *label);
void *emalloc(size_t n, char *label);
void *erealloc(void *ptr,size_t n, char *label);
void *emarealloc(void *ptr,size_t n, char *label);
void fatal(int ret,char *fmt, ...);
void terminateProgram(int);
inline WORD  getWordAlign(UBYTE*);
inline DWORD getDwordAlign(UBYTE*);
inline void  putWordAlign(UBYTE*,WORD);
inline void  putDwordAlign(UBYTE*,DWORD);
inline WORD  getWord(UBYTE*);
inline DWORD getDword(UBYTE*);
inline void  putWord(UBYTE*,WORD);
inline void  putDword(UBYTE*,DWORD);
inline int getZvar(UBYTE *zmd,WORD *var);
inline int skipZvar(UBYTE *zmd);
inline UBYTE *getDwordOffsetAlign(UBYTE *zmd);
inline UBYTE *getDwordOffsetForward(UBYTE *zmd);
inline UBYTE *getDwordOffsetBack(UBYTE *zmd);
/* ryk ==> */
/* ryk ==> */
void ZTOMFormatMessage(FILE* fp, const char* fmt, ...);
void ZTOMAddMessage(FILE* fp, const char* pmsg);
#ifdef ZTOM_STATIC_LIB	/* Static lib */
void ZTOMCreateMessageBuf(void);
char* ZTOMGetMessageBuf(void);
void ZTOMDisposeMessageBuf(void);
#endif
/* <== ryk */
