00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136 #ifndef INC_MI32_STDDEFNS_H
00137 #define INC_MI32_STDDEFNS_H
00138
00139 #if !defined(USE_MGUI) && (defined(X_NATIVE) || defined(WIN32_MFC))
00140 #define USE_MGUI
00141 #endif
00142
00143 #ifdef DEPRECATE_ALL
00144 #undef NO_DEPRECATED
00145 #define NO_DEPRECATED
00146 #undef DEPRECATE_GROUPKEY
00147 #define DEPRECATE_GROUPKEY
00148 #undef DEPRECATE_OLDHELP
00149 #define DEPRECATE_OLDHELP
00150 #endif
00151
00152
00153 #ifdef index
00154 #undef index
00155 #endif
00156
00157 #ifndef NO_DEPRECATED
00158
00159
00160 #define ENUM enum
00161 #ifdef WIN32
00162 #pragma deprecated("ENUM")
00163 #endif
00164 #endif
00165
00166
00167 #if defined(WIN32)
00168 #include <mi32/winfixup.h>
00169 #endif
00170
00171 #ifndef INC_MI32_DLLDEFNS_H
00172 #include <mi32/dlldefns.h>
00173 #endif
00174
00175 #ifndef INC_MI32_ERRCODES_H
00176 #include <mi32/errcodes.h>
00177 #endif
00178
00179
00180
00181
00182
00183 #if defined(WIN32) && !defined(WINNT)
00184 #define WINNT
00185 #endif
00186
00187
00188
00189
00190
00191 #if !defined(BYTEORDER_HiLo) && !defined(BYTEORDER_LoHi)
00192 #if defined(i386) || defined(LINUX_INTEL) || defined(WIN32)
00193 #define BYTEORDER_LoHi
00194 #else
00195 #define BYTEORDER_HiLo
00196 #endif
00197 #endif
00198
00199 #if !defined(BYTEORDER_Intel) && defined(BYTEORDER_LoHi)
00200 #define BYTEORDER_Intel
00201 #endif
00202
00203
00204
00205
00206
00207 #if defined(WIN32)
00208 #define DEPRECATED __declspec(deprecated)
00209
00210 #pragma warning (error:4002) // too many actual parameters for macro
00211 #pragma warning (error:4003) // not enough actual parameters for macro
00212 #pragma warning (error:4005) // Macro defined twice
00213 #pragma warning (error:4013) // Undefined function (missing prototype)
00214 #pragma warning (error:4028) // Formal parameter different from declaration
00215 #pragma warning (error:4033) // Function must return a value
00216 #pragma warning (error:4047) // Different levels of indirection
00217 #pragma warning (error:4098) // Void function returning a value
00218 #pragma warning (error:4131) // Function uses old style declarator
00219 #pragma warning (error:4133) // Incompatible types - from 'unsigned short *' to 'char *'
00220 #pragma warning (error:4150) // Deletion of pointer to incomplete type
00221 #pragma warning (error:4152) // Pointer to function converted to pointer to data
00222 #pragma warning (error:4172) // Returning address of local or temporary
00223
00224
00225 #pragma warning (error:4218) // Function does not have a return type
00226 #pragma warning (error:4258) // Defintion from for loop is ignored, defintion from enclosing scope is used
00227 #pragma warning (error:4288) // Loop variable used outside of loop
00228 #pragma warning (error:4305) // Argument truncation from '...' to '...'
00229 #pragma warning (error:4309) // Truncation of constant value
00230 #pragma warning (error:4390) // Empty control statement found, no point for it
00231 #pragma warning (error:4508) // 'function' : function should return a value; 'void' return type assumed
00232 #pragma warning (error:4545) // expression before comma evaluates to a function which is missing an argument list
00233 #pragma warning (error:4546) // function call before comma missing argument list
00234 #pragma warning (error:4547) // 'operator' : operator before comma has no effect; expected operator with side-effect
00235 #pragma warning (error:4548) // expression before comma has no effect; expected expression with side-effect
00236 #pragma warning (error:4549) // 'operator' : operator before comma has no effect; did you intend 'operator'?
00237 #ifdef ALLOW_UNUSED_FUNCTIONS
00238 #pragma warning (3:4505) // Local function not used
00239 #else
00240 #pragma warning (error:4505) // Local function not used
00241 #endif
00242 #pragma warning (error:4551) // Function call missing argument list
00243 #pragma warning (error:4552) // Operator has no effect, expected operator with side effect
00244 #pragma warning (error:4553) // '==' operator has no effect
00245 #pragma warning (error:4700) // Local variable used without having been initialized
00246 #pragma warning (error:4715) // Not all control paths return a value
00247 #pragma warning (error:4717) // 'method' : recursive on all control paths, function will cause runtime stack overflow. Not all control paths return a value
00248
00249 #pragma warning (error:4804) // Unsafe use of type 'bool' in operation
00250 #pragma warning (error:4805) // Unsafe mix of types for bitwise operation
00251 #pragma warning (error:4806) // Unsafe operation, no value of type 'bool can equal the given constant
00252 #ifdef WARN_UNREF_PARM
00253 #pragma warning (3:4100) // Unreferenced formal parameter
00254 #endif
00255
00256 #pragma warning (3:4132) // 'object' : const object should be initialized
00257 #pragma warning (3:4189) // Local variable initialized but not referenced
00258 #pragma warning (3:4201) // Nameless structure / union
00259 #pragma warning (3:4211) // Redefine extern to static
00260 #pragma warning (3:4212) // Function declaration uses ellipsis, definition does not
00261 #pragma warning (3:4222) // 'static' used on member function at file scope
00262 #pragma warning (3:4234) // Keyword reserved for future use
00263 #pragma warning (3:4235) // Keyword not supported
00264 #pragma warning (3:4244) // Conversion results in possible loss of data
00265 #pragma warning (3:4263) // 'function' : member function does not override any base class virtual member function
00266 #pragma warning (3:4264) // 'virtual_function' : no override available for virtual member function from base 'class'; function is hidden
00267 #pragma warning (3:4265) // 'class' : class has virtual functions, but destructor is not virtual
00268 #pragma warning (3:4268) // 'identifier' : 'const' static/global data initialized with compiler generated default constructor fills the object with zeros
00269 #pragma warning (3:4287) // 'operator' : unsigned/negative constant mismatch
00270 #pragma warning (3:4295) // 'array' : array is too small to include a terminating null character
00271 #pragma warning (3:4296) // 'operator' : expression is always false
00272 #pragma warning (3:4408) // anonymous union did not declare any data members
00273 #pragma warning (3:4510) // 'class' : default constructor could not be generated
00274 #pragma warning (3:4515) // 'namespace' : namespace uses itself
00275 #pragma warning (3:4527) // instances of type 'class' can never be destroyed - user-defined destructor required
00276 #pragma warning (3:4555) // expression has no effect; expected expression with side-effect
00277 #pragma warning (3:4610) // object 'class' can never be instantiated - user-defined constructor required
00278
00279
00280
00281
00282
00283 #pragma warning (3:4701) // Local variable not initialized
00284 #pragma warning (3:4702) // Unreachable code
00285 #pragma warning (3:4705) // Statement has no effect
00286 #pragma warning (3:4706) // Assignment within conditional expression
00287 #pragma warning (3:4709) // Comma operator within array brackets
00288 #pragma warning (3:4928) // illegal copy-initialization; more than one user-defined conversion has been implicitly applied
00289 #pragma warning (3:4946) // reinterpret_cast used between related classes: 'class1' and 'class2'
00290 #ifdef WARN_NOT_INLINED
00291 #pragma warning (3:4710) // Function not inlined
00292 #endif
00293 #pragma warning (disable:4284) // Warning about operator-> with infix notation
00294 #pragma warning (disable:4355) // 'this' used in base member initializaton list
00295 #pragma warning (disable:4786) // Browser identifier limit of 255 characters was exceeded, oh well...
00296 #else
00297 #define DEPRECATED
00298 #endif
00299
00300
00301
00302
00303
00304 #if defined(__cplusplus)
00305 #if defined(WIN32)
00306 #define ALLOW_NAMESPACES
00307 namespace std {}
00308 #endif
00309 #endif
00310
00311
00312
00313
00314
00315 typedef signed char INT8;
00316 typedef unsigned char UINT8;
00317 typedef short INT16;
00318 typedef unsigned short UINT16;
00319 #if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1200)
00320
00321 #include <basetsd.h>
00322 #define INT32_is_int
00323 typedef int PTRINT;
00324 typedef unsigned int PTRUINT;
00325 #elif defined(LONGS_ARE_64_BIT)
00326
00327
00328 typedef int INT32;
00329 typedef unsigned int UINT32;
00330 typedef long INT64;
00331 typedef unsigned long UINT64;
00332 #define INT32_is_int
00333 typedef long PTRINT;
00334 typedef unsigned long PTRUINT;
00335 #else
00336 typedef long INT32;
00337 typedef unsigned long UINT32;
00338 typedef long long INT64;
00339 typedef unsigned long long UINT64;
00340 typedef long PTRINT;
00341 typedef unsigned long PTRUINT;
00342 #endif
00343
00344 typedef unsigned int COLOR32;
00345
00346 #if defined(__cplusplus)
00347
00348 const INT8 INT8_MAX = 127;
00349 const INT8 INT8_MIN = -INT8_MAX-1;
00350 const UINT8 UINT8_MAX = 255;
00351 const UINT8 UINT8_MIN = 0;
00352
00353 const INT16 INT16_MAX = 32767;
00354 const INT16 INT16_MIN = -INT16_MAX-1;
00355 const UINT16 UINT16_MAX = 65535;
00356 const UINT16 UINT16_MIN = 0;
00357
00358 const INT32 INT32_MAX = 2147483647;
00359 const INT32 INT32_MIN = -INT32_MAX-1;
00360 const UINT32 UINT32_MAX = 4294967295UL;
00361 const UINT32 UINT32_MIN = 0;
00362
00363
00364 #undef INT64_MIN
00365 #undef INT64_MAX
00366 #undef UINT64_MIN
00367 #undef UINT64_MAX
00368
00369 #if defined(WIN32)
00370
00371 const INT64 INT64_MAX = 0x7FFFFFFFFFFFFFFF;
00372
00373 const UINT64 UINT64_MAX = 0xFFFFFFFFFFFFFFFF;
00374 #else
00375
00376
00377 const INT64 INT64_MAX = 0x7FFFFFFFFFFFFFFFLL;
00378
00379 const UINT64 UINT64_MAX = 0xFFFFFFFFFFFFFFFFULL;
00380 #endif
00381
00382
00383 const INT64 INT64_MIN = -INT64_MAX-1;
00384
00385 const UINT64 UINT64_MIN = 0;
00386
00387
00388 const UINT64 INT64_MULT = static_cast<UINT64>(UINT32_MAX) + 1;
00389
00390 namespace MGUI {
00391
00392 typedef PTRINT ID;
00393 }
00394
00395 namespace MGD {
00396
00397 typedef unsigned long PIXEL;
00398 }
00399
00400 #else // Not C++
00401
00402 #define INT8_MAX 127
00403 #define INT8_MIN (-INT8_MAX-1)
00404 #define UINT8_MAX 255
00405 #define UINT8_MIN 0
00406
00407 #define INT16_MAX 32767
00408 #define INT16_MIN (-INT16_MAX-1)
00409 #define UINT16_MAX 65535
00410 #define UINT16_MIN 0
00411
00412 #define INT32_MAX 2147483647
00413 #define INT32_MIN (-INT32_MAX-1)
00414 #define UINT32_MAX 4294967295
00415 #define UINT32_MIN 0
00416
00417 #define INT64_MAX 0x7FFFFFFFFFFFFFFF
00418 #define INT64_MIN (-INT64_MAX-1)
00419 #define UINT64_MAX 0xFFFFFFFFFFFFFFFF
00420 #define UINT64_MIN 0
00421
00422 #endif
00423
00424 #ifdef WIN32
00425 #define ALIGN8(_x) __declspec(align(8)) _x
00426 #define ALIGN16(_x) __declspec(align(16)) _x
00427 #else
00428 #define ALIGN8(_x) _x __attribute((aligned(8)))
00429 #define ALIGN16(_x) _x __attribute((aligned(16)))
00430 #endif
00431
00432
00433
00434 typedef float FLOAT;
00435 typedef double DOUBLE;
00436 typedef unsigned short MIUNICODE;
00437
00438
00439
00440
00441
00442 #if defined(__cplusplus)
00443
00444 struct WPOINT2D;
00445 struct LPOINT2D;
00446 struct FPOINT2D;
00447 struct DPOINT2D;
00448 struct WPOINT3D;
00449 struct LPOINT3D;
00450 struct FPOINT3D;
00451 struct DPOINT3D;
00452 struct FPOINT3DH;
00453 struct DPOINT3DH;
00454
00455
00456 struct WRECT2D;
00457 struct LRECT2D;
00458 struct DRECT2D;
00459 struct DRECT3D;
00460
00461 typedef WRECT2D WRECTXY;
00462 typedef LRECT2D LRECTXY;
00463
00464 struct MAPPROJPARM;
00465 struct RVCGENINFO;
00466 struct FNAMEINODEUC;
00467
00468 #endif // C++
00469
00470
00471
00472
00473
00474
00475 #if defined(__cplusplus)
00476
00477 struct WPOLYGON { INT32 numpts; WPOINT2D *point; };
00478 struct LPOLYGON { INT32 numpts; LPOINT2D *point; };
00479 struct DPOLYGON { INT32 numpts; DPOINT2D *point; };
00480
00481 typedef WPOLYGON WPOLYLINE;
00482 typedef LPOLYGON LPOLYLINE;
00483 typedef DPOLYGON DPOLYLINE;
00484
00485 struct DPOLYLINE3D { INT32 numpts; DPOINT3D *point; };
00486
00487 struct LSEGMENT2D { INT32 x1, y1, x2, y2; };
00488
00489 #endif // C++
00490
00491
00492
00493
00494
00495
00496 enum TEXTID {
00497 TEXTID__None = 0
00498 };
00499
00500
00501 enum HELPID {
00502 HELPID__None = 0
00503 };
00504
00505 typedef int ERRVALUE;
00506
00507
00508
00509
00510
00511
00512
00513 #if defined(__cplusplus)
00514
00515 struct DRANGE { double min, max; };
00516
00517 typedef UINT32 ICID;
00518
00519 typedef INT32 RVCINODENUM;
00520 typedef int (*MfFiltFuncProto) (int, RVCINODENUM, RVCGENINFO*, void*, char*);
00521 typedef int (*MfValidMultiProto) (int, FNAMEINODEUC*, void*, int*, char*);
00522
00523 typedef struct _WidgetRec *Widget;
00524
00525 #ifdef WIN32_NATIVE
00526 #if defined(__cplusplus)
00527 class CWnd;
00528 typedef CWnd* MDLGPARENT;
00529 #endif
00530 #else
00531 #ifndef X_NATIVE
00532 #define X_NATIVE
00533 #endif
00534 typedef Widget MDLGPARENT;
00535 #ifdef WIN32
00536 typedef unsigned long COLORREF;
00537 #else
00538 typedef UINT32 COLORREF;
00539 #endif
00540 #endif
00541
00542 typedef DOUBLE Mat3x3[3][3];
00543 typedef DOUBLE MAT3X3[3][3];
00544 typedef DOUBLE MAT4X4[4][4];
00545
00546 typedef void *INIHANDLE;
00547 typedef void *MXDHANDLE;
00548 typedef unsigned long MPIXEL;
00549
00550
00551
00552
00553
00554
00555 #ifdef FALSE
00556 #undef FALSE
00557 #endif
00558 #define FALSE 0
00559 #ifdef TRUE
00560 #undef TRUE
00561 #endif
00562 #define TRUE 1
00563
00564 #ifndef NULL
00565 #define NULL 0
00566 #endif
00567
00568 #ifdef PI // LINUX defined this
00569 #undef PI
00570 #endif
00571 #define PI (3.14159265358979323846)
00572 #define RADTODEG (180.0/PI)
00573 #define DEGTORAD (PI/180.0)
00574 #define RADTODEG64 (64.0*180.0/PI)
00575 #define DEG64TORAD (PI/(64.0*180.0))
00576
00577 #define FEETTOMETERS (0.3048)
00578 #define METERSTOFEET (3.280839895)
00579 #define METERSTOINCHES (3.280839895*12.0)
00580
00581 #if defined(WIN32) && !defined(WIN32_NATIVE)
00582 #ifndef NeedFunctionPrototypes
00583 #define NeedFunctionPrototypes 1
00584 #endif
00585 #ifndef XTSTRINGDEFINES
00586 #define XTSTRINGDEFINES
00587 #endif
00588 #ifndef XMSTRINGDEFINES
00589 #define XMSTRINGDEFINES
00590 #endif
00591 #ifndef XmHTML_STRINGDEFINES
00592 #define XmHTML_STRINGDEFINES
00593 #endif
00594 #endif
00595
00596
00597
00598
00599
00600 #ifdef MIN
00601 #undef MIN
00602 #endif
00603 #ifdef MAX
00604 #undef MAX
00605 #endif
00606
00607 #ifndef membersize
00608 #define membersize(type,name) sizeof(((type*)0)->name)
00609 #endif
00610
00611 #define ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
00612 #define MIN(i1,i2) (((i1)<(i2))?(i1):(i2))
00613 #define MAX(i1,i2) (((i1)>(i2))?(i1):(i2))
00614 #define SIGN(d) (((d)<0) ? -1 : ((d)>0) ? 1 : 0)
00615 #define SWAP(a,b) { a-=b; b+=a; a=b-a; }
00616 #define bound(val,min,max) (((val)<(min))?(min):(((val)>(max))?(max):(val)))
00617
00618 #if defined(WIN32) && defined(__cplusplus)
00619
00620
00621
00622
00623
00624
00625
00626
00627
00628
00629
00630
00631
00632
00633
00634
00635 inline INT32 FAST_ROUND (double x) {
00636 static const double d = 1E-10;
00637 INT32 result;
00638 __asm fld x
00639 __asm fadd d
00640 __asm fistp result
00641 return result;
00642 }
00643
00644
00645
00646
00647
00648
00649
00650
00651 inline INT32 FAST_CEIL (double x) {
00652 static const double d = .4999999999;
00653 INT32 result;
00654 __asm fld x
00655 __asm fadd d
00656 __asm fistp result
00657 return result;
00658 }
00659
00660
00661
00662
00663
00664
00665
00666
00667 inline INT32 FAST_FLOOR (double x) {
00668 static const double d = -.4999999999;
00669 INT32 result;
00670 __asm fld x
00671 __asm fadd d
00672 __asm fistp result
00673 return result;
00674 }
00675
00676
00677
00678
00679
00680
00681
00682
00683
00684
00685 inline INT32 FAST_TRUNCATE (double x) {
00686 static const double d = .4999999999;
00687 INT32 result;
00688 if (x < 0) {
00689 __asm fld x
00690 __asm fadd d
00691 __asm fistp result
00692 }
00693 else {
00694 __asm fld x
00695 __asm fsub d
00696 __asm fistp result
00697 }
00698 return result;
00699 }
00700
00701
00702 #else
00703
00704 #define FAST_ROUND(d) static_cast<INT32>(floor((d)+.5))
00705 #define FAST_CEIL(d) static_cast<INT32>(ceil(d))
00706 #define FAST_FLOOR(d) static_cast<INT32>(floor(d))
00707 #define FAST_TRUNCATE(d) static_cast<INT32>(d)
00708
00709 #endif
00710
00711 #define ROUND FAST_ROUND
00712
00713 #if defined(__cplusplus)
00714
00715
00716 #define CHECKSIZE(s) \
00717 inline int _checksize () { return (1 / ((sizeof(*this) == (s)) ? 1 : 0)); }
00718
00719
00720 #if defined(WIN32) && !defined(VC7) // VC 7 causes ERRVALUE GLOBALFUNC GetLastErrCode() to be interpreted as ERRVALUE::GetLastErrCode()
00721 #define GLOBALFUNC ::
00722 #else
00723 #define GLOBALFUNC
00724 #endif
00725
00726
00727
00728 template <class _CT> inline void SetBitFromBool (
00729 _CT& value,
00730 unsigned bit,
00731 bool set
00732 ) { if (set) value |= static_cast<_CT>(bit); else value &= static_cast<_CT>(~bit); }
00733
00734 inline void SetMinMax (double x, double& minx, double& maxx) { if (x < minx) minx = x; if (x > maxx) maxx = x;}
00735 inline void SetMinMax (INT32 x, INT32& minx, INT32& maxx) { if (x < minx) minx = x; if (x > maxx) maxx = x;}
00736 inline void SetMinMax (UINT32 x, UINT32& minx, UINT32& maxx) { if (x < minx) minx = x; if (x > maxx) maxx = x;}
00737
00738
00739 inline INT64 INT32ToINT64 (INT32 high, INT32 low) {INT64 retval = high; return ((retval << 32) + low);};
00740 inline UINT64 UINT32ToUINT64 (UINT32 high, UINT32 low) {UINT64 retval = high; return ((retval << 32) + low);};
00741 #if defined(WIN32)
00742 inline void INT64ToINT32 (INT64 value, INT32& high, INT32& low) {low = static_cast<INT32>(value & 0x00000000FFFFFFFF); high = static_cast<INT32>(value >> 32); return;};
00743 inline void UINT64ToUINT32 (UINT64 value, UINT32& high, UINT32& low) {low = static_cast<UINT32>(value & 0x00000000FFFFFFFF); high = static_cast<UINT32>(value >> 32); return;};
00744 #else
00745 inline void INT64ToINT32 (INT64 value, INT32& high, INT32& low) {low = static_cast<INT32>(value & 0x00000000FFFFFFFFLL); high = static_cast<INT32>(value >> 32); return;};
00746 inline void UINT64ToUINT32 (UINT64 value, UINT32& high, UINT32& low) {low = static_cast<UINT32>(value & 0x00000000FFFFFFFFULL); high = static_cast<UINT32>(value >> 32); return;};
00747 #endif
00748
00749 #ifndef GENERATING_DOXYGEN_OUTPUT
00750
00751
00752 #define DEFINE_ENUM_OP_BITWISE(_CT) \
00753 inline _CT operator| (const _CT& lhs, const _CT& rhs) \
00754 { return (static_cast<_CT>(static_cast<const INT32>(lhs) | static_cast<const INT32>(rhs))); } \
00755 inline _CT& operator|= (_CT& lhs, const _CT& rhs) \
00756 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) | static_cast<const INT32>(rhs))); return (lhs); } \
00757 inline _CT& operator+= (_CT& lhs, const _CT& rhs) \
00758 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) | static_cast<const INT32>(rhs))); return (lhs); } \
00759 inline _CT operator& (const _CT& lhs, const _CT& rhs) \
00760 { return (static_cast<_CT>(static_cast<const INT32>(lhs) & static_cast<const INT32>(rhs))); } \
00761 inline _CT& operator&= (_CT& lhs, const _CT& rhs) \
00762 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) & static_cast<const INT32>(rhs))); return (lhs); } \
00763 inline _CT operator- (const _CT& lhs, const _CT& rhs) \
00764 { return (static_cast<_CT>(static_cast<const INT32>(lhs) & static_cast<const INT32>(~rhs))); } \
00765 inline _CT& operator-= (_CT& lhs, const _CT& rhs) \
00766 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) & static_cast<const INT32>(~rhs))); return (lhs); } \
00767 inline _CT operator^ (const _CT& lhs, const _CT& rhs) \
00768 { return (static_cast<_CT>(static_cast<const INT32>(lhs) ^ static_cast<const INT32>(rhs))); } \
00769 inline _CT& operator^= (_CT& lhs, const _CT& rhs) \
00770 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) ^ static_cast<const INT32>(rhs))); return (lhs); }
00771 #define DEFINE_ENUM_OPERATORS DEFINE_ENUM_OP_BITWISE
00772
00773
00774 #define DEFINE_ENUM_OP_INCREMENT(_CT) \
00775 inline _CT& operator++ (_CT& lhs) { lhs = static_cast<_CT>(lhs+1); return (lhs); }
00776
00777 #endif // GENERATING_DOXYGEN_OUTPUT
00778
00779 #else // not C++
00780
00781 #define CHECKSIZE(s)
00782 #define bool int
00783
00784 #endif // C++
00785
00786 #if defined(USE_AMEMCPY) && defined(WIN32)
00787
00788
00789
00790
00791
00792
00793 #include <memory.h>
00794 #include <mi32/cpuext.h>
00795 #define memcpy amemcpy
00796 #endif
00797
00798
00799
00800
00801 #if defined(__cplusplus)
00802 #ifndef GENERATING_DOXYGEN_OUTPUT
00803
00804
00805 #ifdef memcpy
00806
00807 #define PREVENT_MEMFUNC(type) \
00808 void memcmp(type *, const type *, int); \
00809 extern void* (*amemcpy)(type *, const type *, int); \
00810 void memset(type *, int, int);
00811 #else
00812 #define PREVENT_MEMFUNC(type) \
00813 void memcmp(type *, const type *, int); \
00814 void memcpy(type *, const type *, int); \
00815 void memset(type *, int, int);
00816 #endif
00817
00818
00819 #define PREVENT_MEMCMP(type) \
00820 void memcmp(type *, const type *, int);
00821
00822 #endif // GENERATING_DOXYGEN_OUTPUT
00823 #endif // __cplusplus
00824
00825
00826
00827
00828
00829
00830
00831
00832
00833
00834 ERRVALUE MdlgShowErrorCode (
00835 MDLGPARENT parent,
00836 ERRVALUE errcode
00837 );
00838
00839
00840
00841 #endif // C++
00842
00843 #endif // #ifndef INC_MI32_STDDEFNS_H