#ifndef __PPORT_H__
#define __PPORT_H__
#ifndef __cplusplus
# error "This is a C++ source"
#endif
#define PTYPES_NAMESPACE pt
#ifdef PTYPES_NAMESPACE
# define PTYPES_BEGIN namespace PTYPES_NAMESPACE {
# define PTYPES_END }
# define USING_PTYPES using namespace PTYPES_NAMESPACE;
#else
# define PTYPES_NAMESPACE
# define PTYPES_BEGIN
# define PTYPES_END
# define USING_PTYPES
#endif
#ifdef WIN32
# if defined(PTYPES_DLL_EXPORTS)
# define ptpublic __declspec(dllexport)
# elif defined(PTYPES_DLL)
# define ptpublic __declspec(dllimport)
# else
# define ptpublic
# endif
#else
# define ptpublic
#endif
#define PTYPES_VERSION 0x00010803
extern "C" ptpublic unsigned long __ptypes_version;
PTYPES_BEGIN
#ifdef _MSC_VER
# pragma warning (disable: 4514)
#endif
#if defined(_DEBUG) && !defined(DEBUG)
# define DEBUG
#endif
#if defined(__WIN32__) && !defined(WIN32)
# define WIN32
#endif
#if defined(__APPLE__)
# define __DARWIN__
#endif
#ifdef DEBUG
# define CHECK_BOUNDS
#endif
typedef unsigned int uint;
typedef unsigned long ulong;
typedef unsigned short ushort;
typedef unsigned char uchar;
typedef signed char schar;
typedef char* pchar;
typedef const char* pconst;
typedef void* ptr;
typedef int* pint;
#if defined(_MSC_VER) || defined(__BORLANDC__)
typedef __int64 large;
typedef unsigned __int64 ularge;
# define LLCONST(a) (a##i64)
#else
typedef long long large;
typedef unsigned long long ularge;
# define LLCONST(a) (a##ll)
#endif
#define LARGE_MIN (LLCONST(-9223372036854775807)-1)
#define LARGE_MAX (LLCONST(9223372036854775807))
#define ULARGE_MAX (LLCONST(18446744073709551615u))
#if defined(_MSC_VER) || defined(__BORLANDC__)
# define strcasecmp stricmp
# define snprintf _snprintf
#endif
#define nil 0
inline int imax(int x, int y) { return (x > y) ? x : y; }
inline int imin(int x, int y) { return (x < y) ? x : y; }
inline large lmax(large x, large y) { return (x > y) ? x : y; }
inline large lmin(large x, large y) { return (x < y) ? x : y; }
#define CRIT_FIRST 0xC0000
typedef void (*_pcrithandler)(int code, const char* msg);
ptpublic _pcrithandler getcrithandler();
ptpublic _pcrithandler setcrithandler(_pcrithandler newh);
ptpublic void fatal(int code, const char* msg);
ptpublic void* memalloc(uint a);
ptpublic void* memrealloc(void* p, uint a);
ptpublic void memfree(void* p);
ptpublic void memerror();
PTYPES_END
#endif