/*****************************************************************************
 * $LastChangedDate: 2009-12-28 22:35:38 -0500 (Mon, 28 Dec 2009) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Definitions, constants.
 * @remarks defs.hh should have generic defs only.
 *//*
 * LEGAL:   COPYRIGHT (C) 2004 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef BASE_DEFS_HH
#define BASE_DEFS_HH 1

namespace base {
namespace defs {

////////////////////////////////////////////////////////////////////////////////
// Definitions, constants.
#define KILOBYTE (1024u)
#define MEGABYTE (1048576u)
#define GIGABYTE (1073741824u)
#define THOUSAND (1000)
#define MILLION  (1000000)
#define CHAR_LF '\n'
#define CHAR_CR '\r'
const bool DISABLE = false, ENABLE = true;
const bool FORCE = true;

////////////////////////////////////////////////////////////////////////////////
// @def Numeric limits.
// *_LARGE are the largest positive values.
// *_SMALL are the smallest negative values.
// Defined by limits.h: INT_MIN, INT_MAX, UINT_MAX
// Defined by float.h: FLT_MAX, FLT_MIN
#define INT_SMALL (INT_MIN)
#define INT_LARGE (INT_MAX)
#define FLOAT_SMALL (-9999999999.0)     ///< FLOAT_SMALL is supposed to be negative
#define FLOAT_LARGE ( 9999999999.0)     ///< so it cannot be based on FLT_MIN which is zero.

////////////////////////////////////////////////////////////////////////////////
// @def Misc limits.
const uint MAX_ELEMS = 128 * MEGABYTE;  ///< maximum array elements

/// @def ILLEGAL_PTR
/// ILLEGAL_PTR is a non-zero value for initializing/asserting pointers
/// that normally can hold either a non-NULL or NULL address.
#define ILLEGAL_PTR ((void*)13)  ///< an unlucky address in the faulty zero page

} // namespace defs
} // namespace base

using namespace base::defs;

#endif // BASE_DEFS_HH
