//	Zinc Application Framework - D_ENV.HPP
//	COPYRIGHT (C) 1990-1999.  All Rights Reserved.
//	Zinc Software Incorporated.  Pleasant Grove, Utah  USA

#ifndef D_ENV_HPP
#define D_ENV_HPP

// Switches for the international language versions.
//#define ZAF_HARDWARE			// Support for Non-AT MS-DOS machines.

// ----- Compiler/Environment Default Dependencies --------------------------

#define ZAF_EXPORT
#define ZAF_EXPORT_CLASS_FUNCTION
#define ZAF_LITTLEENDIAN			// Byte ordering.  Opposite of ZAF_BIGENDIAN.
#define ZAF_LINKBUG
#define ZAF_WORD_SIZE				16
#define ZAF_SIGNED_CHAR
#define ZAF_STRING_LENGTH			64

#if defined(ZAF_METAWINDOW)
#	include <metawndo.h>
#elif defined(ZAF_UGL)
#	include <ugl.h>
#else
#error display library undefined.
#endif

// ----- bool, true/false ---------------------------------------------------

#if (defined(__BORLANDC__) && __BORLANDC__ >= 0x0500) || \
	(defined(_MSC_VER) && _MSC_VER >= 1100) || \
	(defined(__WATCOMC__) && __WATCOMC__ >= 1100)
#	define ZAF_BOOL_DEFINED 1
#endif

#if !defined(ZAF_BOOL_DEFINED)
#	if defined (_MSC_VER)
#	define bool boolType
#	endif
typedef int bool;
#	if !defined(true)
#		define true 1
#	endif
#	if !defined(false)
#		define false 0
#	endif
#endif

// --------------------------------------------------------------------------
// ----- BORLAND ------------------------------------------------------------
// --------------------------------------------------------------------------

#if defined(__BORLANDC__)
#	define ZAF_MSDOS					20
#	if defined(DOSX286) || defined(DOS16M)
#		pragma option -zEZAF_FARDATA
#		define ZAF_FARDATA			far
#	elif defined(DOS386)
#		undef ZAF_WORD_SIZE
#		define ZAF_WORD_SIZE			32
#		define ZAF_BIGNUM_SIZE 		16
#		define ZAF_FARDATA
#	else
#		pragma option -zEZAF_FARDATA
#		define ZAF_FARDATA			far
#	endif
#endif

// --------------------------------------------------------------------------
// ----- MICROSOFT ----------------------------------------------------------
// --------------------------------------------------------------------------

#if defined(_MSC_VER) && !defined(__WATCOMC__)
#	define ZAF_MSDOS					20
#	if defined(DOS386)
#		undef ZAF_WORD_SIZE
#		define ZAF_WORD_SIZE			32
#		define ZAF_BIGNUM_SIZE		16
#		define ZAF_FARDATA
#	else
#  		define ZAF_FARDATA		far
#			pragma data_seg("ZAF_FARDATA");
#	endif
#endif

// --------------------------------------------------------------------------
// ----- WATCOM -------------------------------------------------------------
// --------------------------------------------------------------------------

#if defined(__WATCOMC__)
#	undef ZAF_VOIDP
#	define ZAF_VOIDP(pointer)	((void *)(pointer))
#	undef ZAF_SIGNED_CHAR
#	if defined(ZAF_UNICODE)
#		include <stddef.h>
#		define ICHAR_T wchar_t
#	endif
#	define ZAF_MSDOS	20
#	undef ZAF_WORD_SIZE
#	define ZAF_WORD_SIZE	32
#	define ZAF_BIGNUM_SIZE			16
#	define ZAF_FARDATA
#endif

// ----- Compiler/Environment Default Dependencies --------------------------
#if !defined(ZAF_FARDATA)
#	define ZAF_FARDATA
#endif
#if defined(DOSX286) || defined(DOS16PP) || defined(DOS16M)
#	define ZAF_DOSEXTENDED16
#endif
#if defined(DOS32PP) || defined(DOS386)
#	define ZAF_DOSEXTENDED32
#endif
#if defined(ZAF_DOSEXTENDED16) || defined(ZAF_DOSEXTENDED32)
#	define ZAF_DOSEXTENDED
#endif

//	Symantec 32-bit mode doesn't support int 21h, function 38h right.
#if !defined(ZAF_DISABLE_INT21)
struct Dos3Country
{
	short dateFormat;
	char currencySymbol[5];
	char thousandsSeparator[2];
	char decimalSeparator[2];
	char dateSeparator[2];
	char timeSeparator[2];
	unsigned char currencyStyle;
	unsigned char significantDigits;
	unsigned char timeFormat;
	long caseMap;
	char dataSeparator[2];
	char filler[10];
};

extern Dos3Country dos3Info;
#endif

#endif // D_ENV_HPP

