/**************************************************************************
 * Source Id :
 *
 * $Id: d_types.cpp,v 1.3 2001/04/20 10:15:01 georgetasker Exp $
 *-------------------------------------------------------------------------
 * Project Notes :
 *
 *  Diamond Base
 *  ============
 *      A solid database implementation, spurred on by the continuing
 *  Metal (Lead) Base saga.
 *
 *  Project Team :
 *        A. Davison
 *        K. Lentin
 *        D. Platt
 *
 *	Project Commenced : 05-02-1993
 *
 *-------------------------------------------------------------------------
 *  Module Notes :
 *
 *	Diamond Types.
 *		Special type definitions and constant instatiations.
 *
 *
 *
 *  Original Author : Andy
 *
 **************************************************************************/

// FOR NOW::
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"

#ifdef __BORLANDC__
    #pragma hdrstop
#endif

#include <diamond/defs.h>

// This stuff was going to be used to make the db file system independent,
// but has been sidelined for the time being.

#if 0
d_int::d_int(int32 val)
{
	data[0] = val&0xff;
	data[1] = val&0xff00;
	data[2] = val&0xff0000;
	data[3] = val&0xff000000;
}

d_int::d_int(const d_int& from)
{
	copyMem(from.data,data,4);
}

d_int& d_int::operator = (const d_int& from)
{
	copyMem(from.data,data,4);
	return *this;
}

d_int& d_int::operator =(const int32 val)
{
	data[0] = val&0xff;
	data[1] = val&0xff00;
	data[2] = val&0xff0000;
	data[3] = val&0xff000000;
	return *this;
}

d_int::operator int32() const
{
	return (data[0]) + (data[1]<<8) + (data[2]<<16) + (data[3]<<32);
}

#endif

///////////////////////////////////////////////////////////////////////////
// Revision History:
//
// $Log: d_types.cpp,v $
// Revision 1.3  2001/04/20 10:15:01  georgetasker
// Cygwin compilation fixes, compilation speed enhancements
// Code modified to get rid of some compiler warnings
//
// Revision 1.2  2001/04/19 21:12:54  georgetasker
// cygwin compilation fixes
//
// Revision 1.1  2001/04/04 12:05:49  aleksandras
// forgotten diamond .cpps
//
// Revision 1.11  1996/02/01  21:32:44  dmb
// long->int32.
//
// Revision 1.10  1994/12/22  03:49:04  kevinl
// s/memcpy/copyMem/g
//
// Revision 1.9  1994/02/03  05:54:19  kevinl
// Moved include files to diamond/ and fixed HAVE_MALLOC_H
//
// Revision 1.8  1993/06/23  05:21:22  kevinl
// Mallocs are now in angular brackets
//
// Revision 1.7  1993/06/20  13:43:05  kevinl
// Fixed multiple mallocs
//
// Revision 1.6  1993/05/26  01:01:39  kevinl
// MALLOC_H_MISSING
//
// Revision 1.5  1993/05/06  04:00:19  kevinl
// SASC define for malloc.h
//
// Revision 1.4  1993/04/15  04:21:52  kevinl
// Moved malloc.h
//
// Revision 1.3  1993/03/29  08:20:09  darrenp
// Added new malloc library support
//
// Revision 1.2  1993/03/21  23:35:07  kevinl
// Changed D_* constant ints to an enum
//
// Revision 1.1  1993/03/15  19:27:48  davison
// Initial revision
//
///////////////////////////////////////////////////////////////////////////
