//===========================================================================//
// File:	verify.hpp                                                          //
// Contents: verification fail routines                                      //
//---------------------------------------------------------------------------//
//   Date    Who  Modification                                               //
// --------  ---  ---------------------------------------------------------- //
// 09/29/94  JMA  Initial coding.                                            //
// 11/01/94  JMA  Made compatible with SGI CC                                //
// 11/03/94  ECH  Made compatible with BC4.0                                 //
//---------------------------------------------------------------------------//
// Copyright (C) 1994-1995, Virtual World Entertainment, Inc.                //
//                      PROPRIETARY AND CONFIDENTIAL                         //
//===========================================================================//

#if !defined(VERIFY_HPP)
#	define VERIFY_HPP

#	if defined(__BCPLUSPLUS__)
		extern int
			_matherr(struct exception *a);
#	endif

	extern int
		Fpu_Ok();
	extern void
		Verify_Failed(char *message, char *file, int line);
	extern void
		Fail_To_Debugger(char *message, char *file, int line);

	class Signature
	{
	private:
#		if DEBUG_LEVEL>0
			enum Mark
			{
				ok,
				destroyed,
				corrupted,
				noMagic=(int)0xAB135795L,
				magic=(int)0xFFED1231L
			} mark;
#		endif

	protected:
		Signature();
		~Signature();

	public:
		friend int
			Is_Signature_Bad(const volatile Signature *p);
	};

#	if defined(USE_SIGNATURE)
#		define SIGNATURED : public Signature
#	else
#		define SIGNATURED
#		define Is_Signature_Bad(p) (False)
#	endif

#endif

