00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef skGENERAL_H
00022 #define skGENERAL_H
00023
00024
00025 #if defined(_MSC_VER)
00026 #ifdef _DEBUG
00027 #define MYDEBUG_NEW new( _NORMAL_BLOCK, __FILE__, __LINE__)
00028
00029
00030 #else
00031 #define MYDEBUG_NEW
00032 #endif // _DEBUG
00033 #endif
00034
00035
00036
00037 #include <stdlib.h>
00038
00039 typedef unsigned int USize;
00040
00041 #ifndef max
00042 #define max(a,b) (((a)>(b))?(a):(b))
00043 #endif
00044 #ifndef min
00045 #define min(a,b) (((a)<(b))?(a):(b))
00046 #endif
00047
00048
00049
00050
00051
00052
00053
00054 #ifdef ENABLE_WINDOWS_THREAD_SUPPORT
00055 #if defined(_MSC_VER) && (_MSC_VER >= 1200 )
00056 #define THREAD __declspec(thread)
00057 #else
00058 #define THREAD
00059 #endif
00060 #else
00061 #define THREAD
00062 #endif
00063
00064
00065
00066
00067 #ifdef ENABLE_WINDOWS_DLL_SUPPORT
00068 #if defined(_MSC_VER)
00069 #define LIBIMPORT __declspec( dllimport )
00070 #define LIBEXPORT __declspec( dllexport )
00071 #endif
00072 #if defined(BUILDING_DLL)
00073 #define CLASSEXPORT LIBEXPORT
00074 #define EXTERN_TEMPLATE
00075 #else
00076 #define CLASSEXPORT LIBIMPORT
00077 #define EXTERN_TEMPLATE extern
00078 #endif
00079 #else
00080
00081 #define LIBIMPORT
00082 #define LIBEXPORT
00083 #define CLASSEXPORT
00084 #define EXTERN_TEMPLATE
00085 #endif
00086
00087
00088 #if defined(_MSC_VER)
00089 #ifdef _DEBUG
00090 #define _CRTDBG_MAP_ALLOC
00091 #define _INC_MALLOC
00092 #include <crtdbg.h>
00093 #endif
00094 #endif
00095
00096
00097 #if defined(_MSC_VER)
00098 #ifdef _DEBUG
00099 #define new MYDEBUG_NEW
00100 #endif
00101 #endif
00102
00103
00104
00105 #ifndef _WIN32_WCE
00106 #define STREAMS_ENABLED
00107 #define EXCEPTIONS_DEFINED
00108 #include <assert.h>
00109 #else
00110 #include <windows.h>
00111 #include <dbgapi.h>
00112 #define assert ASSERT
00113 #define UNICODE_STRINGS
00114 #endif
00115
00116 #endif