//						XREF.H

#ifndef xrefh
#define xrefh

#define XREF_JUMP 1
#define XREF_CALL 2
#define XREF_START 3
#define XREF_JUMPTABLE 4
#define XREF_EXPORT 5
#define XREF_DATA 6
#define XREF_NULL 7

struct xreflist
{ struct xreflist *next;
  unsigned long where,ref_by;
  unsigned char reftype;
  BOOL decoded;
};

class xref
{ private:
	 struct xreflist *listtop,*lastxref,*printref;
	 BOOL addedxref;

  public:
	 xref();
	 ~xref();
	 void addxref(unsigned long where,unsigned long ref_by,unsigned char reftype);
	 void printxref(unsigned long where);
    unsigned long nextcode(void);
	 void reset(void);
    unsigned long getref(unsigned long addr);
};

#endif