9 // stuff to make Mac code compatable with Windows
12 // disable warnings about double to float conversions
13 #pragma warning(disable:4305)
14 #pragma warning(disable:4244)
16 // disable warnings about boolean to int conversions
17 #pragma warning(disable:4800)
19 // disable warning about unreferenced local variables
20 #pragma warning(disable:4101)
31 typedef signed char SInt8;
32 typedef unsigned int UInt32;
38 void CopyCStringToPascal( const char* src, unsigned char dst[256]);
39 void CopyPascalStringToC( const unsigned char* src, char* dst);
42 typedef struct AbsoluteTime
48 AbsoluteTime UpTime(); // NOTE: returns time since app started, not system start
50 typedef long Duration;
54 durationMicrosecond = -1,
55 durationMillisecond = 1,
56 durationSecond = 1000,
57 durationMinute = 1000 * 60,
58 durationHour = 1000 * 60 * 60,
59 durationDay = 1000 * 60 * 60 * 24,
60 durationForever = 0x7FFFFFFF,
61 durationImmediate = 0,
64 Duration AbsoluteDeltaToDuration( AbsoluteTime& a, AbsoluteTime& b);
67 inline bool isnormal( double x)
69 int ret = _fpclass( x);
70 return (ret == _FPCLASS_NN || ret == _FPCLASS_PN);
73 typedef unsigned int uintptr_t;
76 // fix file names to use '/' instead of ':'
77 char* ConvertFileName( const char* orgfilename);
79 #define fopen( a, b) fopen( ConvertFileName( a), b);
81 inline float abs( float f)
88 inline double abs( double f)
95 inline long long abs( long long f)