00001
00295 #ifndef INC_MI32_STDDEFNS_H
00296 #define INC_MI32_STDDEFNS_H
00297
00298 #if !defined(USE_MGUI) && (defined(X_NATIVE) || defined(WINDOWS_MFC))
00299 #define USE_MGUI
00300 #endif
00301
00302 #ifdef DEPRECATE_ALL
00303 #undef NO_DEPRECATED
00304 #define NO_DEPRECATED
00305 #undef DEPRECATE_GROUPKEY
00306 #define DEPRECATE_GROUPKEY
00307 #undef DEPRECATE_OLDHELP
00308 #define DEPRECATE_OLDHELP
00309 #endif
00310
00311
00312 #ifdef index
00313 #undef index
00314 #endif
00315
00316
00317 #if defined(WIN32)
00318 #include <mi32/winfixup.h>
00319 #endif
00320
00321 #ifndef INC_MI32_DLLDEFNS_H
00322 #include <mi32/dlldefns.h>
00323 #endif
00324
00325
00326
00327
00328
00329 #if defined(WIN32) && !defined(WINNT)
00330 #define WINNT
00331 #endif
00332
00333
00334
00335
00336
00337 #if !defined(BYTEORDER_HiLo) && !defined(BYTEORDER_LoHi)
00338 #if defined(i386) || defined(LINUX_INTEL) || defined(WIN32) || defined(__x86_64__)
00339 #define BYTEORDER_LoHi
00340 #else
00341 #define BYTEORDER_HiLo
00342 #endif
00343 #endif
00344
00345 #if !defined(BYTEORDER_Intel) && defined(BYTEORDER_LoHi)
00346 #define BYTEORDER_Intel
00347 #endif
00348
00349
00350
00351
00352
00353 #if defined(WIN32)
00354 #define DEPRECATED __declspec(deprecated)
00355 #define DEPRECATED_MSG(_msg) __declspec(deprecated(_msg))
00356 #ifdef NO_DEPRECATED
00357 #define WLEVEL error
00358 #else
00359 #define WLEVEL 3
00360 #endif
00361
00362 #pragma warning (error:4002) // too many actual parameters for macro
00363 #pragma warning (error:4003) // not enough actual parameters for macro
00364 #pragma warning (error:4005) // Macro defined twice
00365 #pragma warning (error:4013) // Undefined function (missing prototype)
00366 #pragma warning (error:4028) // Formal parameter different from declaration
00367 #pragma warning (error:4033) // Function must return a value
00368 #pragma warning (error:4047) // Different levels of indirection
00369 #pragma warning (error:4098) // Void function returning a value
00370 #pragma warning (error:4129) // Unrecognized character escape sequence
00371 #pragma warning (error:4131) // Function uses old style declarator
00372 #pragma warning (error:4133) // Incompatible types - from 'unsigned short *' to 'char *'
00373 #pragma warning (error:4150) // Deletion of pointer to incomplete type
00374 #pragma warning (error:4152) // Pointer to function converted to pointer to data
00375 #pragma warning (error:4172) // Returning address of local or temporary
00376
00377
00378 #pragma warning (error:4218) // Function does not have a return type
00379 #pragma warning (error:4258) // Defintion from for loop is ignored, defintion from enclosing scope is used
00380 #pragma warning (error:4288) // Loop variable used outside of loop
00381 #pragma warning (error:4305) // Argument truncation from '...' to '...'
00382 #pragma warning (error:4309) // Truncation of constant value
00383 #ifdef WIN64
00384 #pragma warning (error:4311) // Pointer truncation
00385 #endif
00386 #pragma warning (error:4390) // Empty control statement found, no point for it
00387 #pragma warning (error:4508) // 'function' : function should return a value; 'void' return type assumed
00388 #ifndef WINDOWS_MFC
00389 #pragma warning (error:4529) // 'member_name' : forming a pointer-to-member requires explicit use of the address-of operator ('&') and a qualified name
00390 #endif
00391 #pragma warning (error:4545) // expression before comma evaluates to a function which is missing an argument list
00392 #pragma warning (error:4546) // function call before comma missing argument list
00393 #pragma warning (error:4547) // 'operator' : operator before comma has no effect; expected operator with side-effect
00394 #if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER < 1400) // Stupid Microsoft header disallows this on VC 8
00395 #pragma warning (error:4548) // expression before comma has no effect; expected expression with side-effect
00396 #endif
00397 #pragma warning (error:4549) // 'operator' : operator before comma has no effect; did you intend 'operator'?
00398 #ifdef ALLOW_UNUSED_FUNCTIONS
00399 #pragma warning (3:4505) // Local function not used
00400 #else
00401 #pragma warning (error:4505) // Local function not used
00402 #endif
00403 #pragma warning (error:4551) // Function call missing argument list
00404 #pragma warning (error:4552) // Operator has no effect, expected operator with side effect
00405 #pragma warning (error:4553) // '==' operator has no effect
00406 #pragma warning (error:4554) // Check operator precedence
00407 #pragma warning (error:4700) // Local variable used without having been initialized
00408 #pragma warning (error:4701) // Local variable not initialized
00409 #pragma warning (error:4715) // Not all control paths return a value
00410 #pragma warning (error:4717) // 'method' : recursive on all control paths, function will cause runtime stack overflow. Not all control paths return a value
00411
00412 #pragma warning (error:4804) // Unsafe use of type 'bool' in operation
00413 #pragma warning (error:4805) // Unsafe mix of types for bitwise operation
00414 #pragma warning (error:4806) // Unsafe operation, no value of type 'bool can equal the given constant
00415 #ifndef NO_WARN_UNREF_PARM
00416 #pragma warning (3:4100) // Unreferenced formal parameter
00417 #endif
00418 #pragma warning (3:4127) // conditional expression is constant
00419 #pragma warning (3:4132) // 'object' : const object should be initialized
00420 #pragma warning (3:4189) // Local variable initialized but not referenced
00421 #pragma warning (3:4201) // Nameless structure / union
00422 #pragma warning (3:4211) // Redefine extern to static
00423 #pragma warning (WLEVEL:4212) // Function declaration uses ellipsis, definition does not
00424 #pragma warning (WLEVEL:4222) // 'static' used on member function at file scope
00425 #pragma warning (WLEVEL:4234) // Keyword reserved for future use
00426 #pragma warning (WLEVEL:4235) // Keyword not supported
00427 #pragma warning (3:4244) // Conversion results in possible loss of data
00428 #pragma warning (3:4263) // 'function' : member function does not override any base class virtual member function
00429 #pragma warning (3:4264) // 'virtual_function' : no override available for virtual member function from base 'class'; function is hidden
00430 #pragma warning (3:4265) // 'class' : class has virtual functions, but destructor is not virtual
00431 #pragma warning (3:4268) // 'identifier' : 'const' static/global data initialized with compiler generated default constructor fills the object with zeros
00432 #pragma warning (WLEVEL:4287) // 'operator' : unsigned/negative constant mismatch
00433 #pragma warning (3:4295) // 'array' : array is too small to include a terminating null character
00434 #pragma warning (3:4296) // 'operator' : expression is always false
00435 #pragma warning (3:4408) // anonymous union did not declare any data members
00436 #pragma warning (3:4510) // 'class' : default constructor could not be generated
00437 #pragma warning (WLEVEL:4515) // 'namespace' : namespace uses itself
00438 #pragma warning (3:4527) // instances of type 'class' can never be destroyed - user-defined destructor required
00439 #pragma warning (WLEVEL:4555) // expression has no effect; expected expression with side-effect
00440 #pragma warning (3:4610) // object 'class' can never be instantiated - user-defined constructor required
00441
00442
00443
00444
00445
00446 #pragma warning (3:4702) // Unreachable code
00447 #pragma warning (3:4706) // Assignment within conditional expression
00448 #pragma warning (WLEVEL:4709) // Comma operator within array brackets
00449 #pragma warning (3:4928) // illegal copy-initialization; more than one user-defined conversion has been implicitly applied
00450 #pragma warning (WLEVEL:4946) // reinterpret_cast used between related classes: 'class1' and 'class2'
00451 #ifdef WARN_NOT_INLINED
00452 #pragma warning (3:4710) // Function not inlined
00453 #endif
00454
00455 #pragma warning (disable:4251) // class ... needs to have dll-interface to be used by clients of class ...
00456 #if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1400)
00457 #pragma warning (disable:4312) // Conversion to type (pointer) of greater size
00458 #pragma warning (disable:4324) // Structure '...' padded due to __declspec(align())
00459 #endif
00460 #pragma warning (disable:4355) // 'this' used in base member initializaton list
00461 #if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1400)
00462 #pragma warning (disable:4512) // Assignment operator could not be generated
00463 #pragma warning (disable:4610) // Class '...' can never be instantiated - user defined constructor required
00464 #endif
00465 #pragma warning (disable:4786) // Browser identifier limit of 255 characters was exceeded, oh well...
00466 #pragma warning (disable:4820) // padding added after member
00467
00468 #undef WLEVEL
00469 #else
00470 #define DEPRECATED
00471 #define DEPRECATED_MSG(_msg)
00472 #endif
00473
00474
00475
00476
00477
00478 #if defined(__cplusplus)
00479 #if defined(WIN32)
00480 #define ALLOW_NAMESPACES
00481 namespace std {}
00482 #endif
00483 #endif
00484
00485
00486
00487
00488
00489 typedef signed char INT8;
00490 typedef unsigned char UINT8;
00491 typedef short INT16;
00492 typedef unsigned short UINT16;
00493 #if defined(WIN32)
00494 #include <basetsd.h>
00495 #elif defined(LONGS_ARE_64_BIT)
00496 #if !defined(PTRS_ARE_64_BIT) && !defined(PTRS_ARE_32_BIT)
00497 #define PTRS_ARE_64_BIT // If longs are 64-bit then pointers assumed to be unless explictly declared otherwise
00498 #endif
00499 typedef int INT32;
00500 typedef unsigned int UINT32;
00501 typedef long INT64;
00502 typedef unsigned long UINT64;
00503 #else
00504 typedef long INT32;
00505 typedef unsigned long UINT32;
00506 typedef long long INT64;
00507 typedef unsigned long long UINT64;
00508 #endif
00509
00510 #ifdef PTRINT
00511 #undef PTRINT
00512 #endif
00513
00514 #ifdef PTRUINT
00515 #undef PTRUINT
00516 #endif
00517
00518 #if defined(PTRS_ARE_64_BIT)
00519 typedef INT64 PTRINT;
00520 typedef UINT64 PTRUINT;
00521 #else
00522 typedef INT32 PTRINT;
00523 typedef UINT32 PTRUINT;
00524 #endif
00525
00526 typedef unsigned int COLOR32;
00527
00528 #if defined(__cplusplus)
00529
00530
00531 #undef INT8_MIN
00532 #undef INT8_MAX
00533 #undef UINT8_MIN
00534 #undef UINT8_MAX
00535 #undef INT16_MIN
00536 #undef INT16_MAX
00537 #undef UINT16_MIN
00538 #undef UINT16_MAX
00539 #undef INT24_MIN
00540 #undef INT24_MAX
00541 #undef UINT24_MIN
00542 #undef UINT24_MAX
00543 #undef INT32_MIN
00544 #undef INT32_MAX
00545 #undef UINT32_MIN
00546 #undef UINT32_MAX
00547 #undef INT64_MIN
00548 #undef INT64_MAX
00549 #undef UINT64_MIN
00550 #undef UINT64_MAX
00551
00552 const INT8 INT8_MAX = 127;
00553 const INT8 INT8_MIN = -INT8_MAX-1;
00554 const UINT8 UINT8_MAX = 255;
00555 const UINT8 UINT8_MIN = 0;
00556
00557 const INT16 INT16_MAX = 32767;
00558 const INT16 INT16_MIN = -INT16_MAX-1;
00559 const UINT16 UINT16_MAX = 65535;
00560 const UINT16 UINT16_MIN = 0;
00561
00562 const INT32 INT24_MAX = 8388607;
00563 const INT32 INT24_MIN = -INT24_MAX-1;
00564 const UINT32 UINT24_MAX = 16777215;
00565 const UINT32 UINT24_MIN = 0;
00566
00567 const INT32 INT32_MAX = 2147483647;
00568 const INT32 INT32_MIN = -INT32_MAX-1;
00569 const UINT32 UINT32_MAX = 4294967295UL;
00570 const UINT32 UINT32_MIN = 0;
00571
00572 #if defined(WIN32)
00574 const INT64 INT64_MAX = 0x7FFFFFFFFFFFFFFF;
00576 const UINT64 UINT64_MAX = 0xFFFFFFFFFFFFFFFF;
00577 #else
00578
00580 const INT64 INT64_MAX = 0x7FFFFFFFFFFFFFFFLL;
00582 const UINT64 UINT64_MAX = 0xFFFFFFFFFFFFFFFFULL;
00583 #endif
00584
00586 const INT64 INT64_MIN = -INT64_MAX-1;
00588 const UINT64 UINT64_MIN = 0;
00589
00591 const UINT64 INT64_MULT = static_cast<UINT64>(UINT32_MAX) + 1;
00592
00593 namespace MGUI {
00594
00595 typedef PTRINT ID;
00596 }
00597
00598 namespace MGD {
00600 typedef unsigned long PIXEL;
00601 }
00602
00603 #else // Not C++
00604
00605 #define INT8_MAX 127
00606 #define INT8_MIN (-INT8_MAX-1)
00607 #define UINT8_MAX 255
00608 #define UINT8_MIN 0
00609
00610 #define INT16_MAX 32767
00611 #define INT16_MIN (-INT16_MAX-1)
00612 #define UINT16_MAX 65535
00613 #define UINT16_MIN 0
00614
00615 #define INT24_MAX 8388607
00616 #define INT24_MIN (-INT24_MAX-1)
00617 #define UINT24_MAX 16777215
00618 #define UINT24_MIN 0
00619
00620 #define INT32_MAX 2147483647
00621 #define INT32_MIN (-INT32_MAX-1)
00622 #define UINT32_MAX 4294967295
00623 #define UINT32_MIN 0
00624
00625 #define INT64_MAX 0x7FFFFFFFFFFFFFFF
00626 #define INT64_MIN (-INT64_MAX-1)
00627 #define UINT64_MAX 0xFFFFFFFFFFFFFFFF
00628 #define UINT64_MIN 0
00629
00630 #endif
00631
00632 #ifdef WIN32
00633 #define ALIGN8(_x) __declspec(align(8)) _x
00634 #define ALIGN16(_x) __declspec(align(16)) _x
00635 #else
00636 #define ALIGN8(_x) _x __attribute((aligned(8)))
00637 #define ALIGN16(_x) _x __attribute((aligned(16)))
00638 #endif
00639
00640
00641
00642 typedef float FLOAT;
00643 typedef double DOUBLE;
00644
00645 #if defined(WIN32) && defined(_MSC_VER) && (_MSC_VER >= 1400) && defined(_NATIVE_WCHAR_T_DEFINED)
00646
00647
00648
00649
00650 typedef wchar_t MIUNICODE;
00651 #else
00652 typedef unsigned short MIUNICODE;
00653 #endif
00654
00655
00656
00657
00658
00659 #if defined(__cplusplus)
00660
00661 struct WPOINT2D;
00662 struct LPOINT2D;
00663 struct FPOINT2D;
00664 struct DPOINT2D;
00665 struct WPOINT3D;
00666 struct LPOINT3D;
00667 struct FPOINT3D;
00668 struct DPOINT3D;
00669 struct FPOINT3DH;
00670 struct DPOINT3DH;
00671
00672
00673 struct WRECT2D;
00674 struct LRECT2D;
00675 struct DRECT2D;
00676 struct DRECT3D;
00677
00678 typedef LRECT2D LRECTXY;
00679
00680 #endif // C++
00681
00682
00683
00684
00685
00686
00687 #if defined(__cplusplus)
00688
00689 struct LPOLYGON { INT32 numpts; LPOINT2D *point; };
00690 struct DPOLYGON { INT32 numpts; DPOINT2D *point; };
00691
00692 typedef DPOLYGON DPOLYLINE;
00693
00694 struct LSEGMENT2D { INT32 x1, y1, x2, y2; };
00695
00696 #endif // C++
00697
00698
00699
00700
00701
00703 enum TEXTID {
00704 TEXTID__None = 0,
00705 TEXTID__Default = 1
00706 };
00707
00709 enum HELPID {
00710 HELPID__None = 0
00711 };
00712
00713
00714 typedef int ERRVALUE;
00715
00716 #if defined(__cplusplus)
00717
00718 struct DRANGE { double min, max; };
00719
00720 typedef INT64 ELEMNUM;
00721
00722 #define ELEMENTNUM_None -1
00723 #define ELEMENTNUM_DefaultList -2
00724
00725 typedef UINT32 ICID;
00726 typedef INT32 RVCINODENUM;
00727 typedef struct _WidgetRec *Widget;
00728
00729 #ifdef WIN32_NATIVE
00730 #if defined(__cplusplus)
00731 class CWnd;
00732 typedef CWnd* MDLGPARENT;
00733 #endif
00734 #else
00735 #ifndef X_NATIVE
00736 #define X_NATIVE
00737 #endif
00738 typedef Widget MDLGPARENT;
00739 #if defined(WIN32)
00740 typedef unsigned long COLORREF;
00741 #else
00742 typedef UINT32 COLORREF;
00743 #endif
00744 #endif
00745
00746 DEPRECATED_MSG("Deprecated, use TRANS2D_AFFINE or MAT3X3 instead") typedef DOUBLE Mat3x3[3][3];
00747 typedef DOUBLE MAT3X3[3][3];
00748 typedef DOUBLE MAT4X4[4][4];
00749
00750 typedef void *INIHANDLE;
00751 typedef void *MXDHANDLE;
00752 typedef unsigned long MPIXEL;
00753
00754 enum MIPRODUCTCODE {
00755 MIPRODUCTCODE_Default = 0
00756 };
00757
00758
00759
00760
00761
00762
00763
00764 #define EUserCancel -1000
00765 #define EProgramError -1204
00766 #define EBadFuncParm -1213
00767 #define R_NewRequest -2026
00768 #define R_SkipRequest -2035
00769
00770
00771 #ifdef FALSE
00772 #undef FALSE
00773 #endif
00774 #define FALSE 0
00775 #ifdef TRUE
00776 #undef TRUE
00777 #endif
00778 #define TRUE 1
00779
00780 #ifndef NULL
00781 #define NULL 0
00782 #endif
00783
00784 #ifdef PI // LINUX defined this
00785 #undef PI
00786 #endif
00787 #define PI (3.14159265358979323846)
00788 #define RADTODEG (180.0/PI)
00789 #define DEGTORAD (PI/180.0)
00790 #define RADTODEG64 (64.0*180.0/PI)
00791 #define DEG64TORAD (PI/(64.0*180.0))
00792
00793 #define FEETTOMETERS (0.3048)
00794 #define METERSTOFEET (3.280839895)
00795 #define METERSTOINCHES (3.280839895*12.0)
00796
00797 #if defined(WIN32) && !defined(WIN32_NATIVE)
00798 #ifndef NeedFunctionPrototypes
00799 #define NeedFunctionPrototypes 1
00800 #endif
00801 #ifndef XTSTRINGDEFINES
00802 #define XTSTRINGDEFINES
00803 #endif
00804 #ifndef XMSTRINGDEFINES
00805 #define XMSTRINGDEFINES
00806 #endif
00807 #ifndef XmHTML_STRINGDEFINES
00808 #define XmHTML_STRINGDEFINES
00809 #endif
00810 #endif
00811
00812
00813
00814
00815
00816 #ifdef MIN
00817 #undef MIN
00818 #endif
00819 #ifdef MAX
00820 #undef MAX
00821 #endif
00822
00823 #ifndef membersize
00824 #define membersize(type,name) sizeof(((type*)0)->name)
00825 #endif
00826
00827 #define MI_ARRAYSIZE(a) (sizeof(a)/sizeof(a[0]))
00828
00829 #define MIN(i1,i2) (((i1)<(i2))?(i1):(i2))
00830 #define MAX(i1,i2) (((i1)>(i2))?(i1):(i2))
00831 #define SIGN(d) (((d)<0) ? -1 : ((d)>0) ? 1 : 0)
00832 #define SWAP(a,b) { a-=b; b+=a; a=b-a; }
00833 #define bound(val,min,max) (((val)<(min))?(min):(((val)>(max))?(max):(val)))
00834
00835 #if defined(__cplusplus)
00836
00838 #define CHECKSIZE(s) \
00839 inline int _checksize () { return (1 / ((sizeof(*this) == (s)) ? 1 : 0)); }
00840
00842 #define GLOBALFUNC
00843
00846 template <typename _TY> void Exchange (
00847 _TY& v1,
00848 _TY& v2
00849 ) { _TY temp(v1); v1 = v2; v2 = temp; }
00850
00852 template<typename _TY> inline void GetMinMax2 (
00853 const _TY a,
00854 const _TY b,
00855 _TY& minret,
00856 _TY& maxret
00857 ) {
00858 if (a < b) {
00859 minret = a;
00860 maxret = b;
00861 }
00862 else {
00863 minret = b;
00864 maxret = a;
00865 }
00866 }
00867
00869 template<typename _TY> inline void GetMinMax3 (
00870 const _TY a,
00871 const _TY b,
00872 const _TY c,
00873 _TY& minret,
00874 _TY& maxret
00875 ) {
00876 GetMinMax2(a,b,minret,maxret);
00877 if (c < minret) minret = c;
00878 else if (c > maxret) maxret = c;
00879 }
00880
00883 template <class _CT> inline void SetBitFromBool (
00884 _CT& value,
00885 unsigned bit,
00886 bool set
00887 ) { if (set) value |= static_cast<_CT>(bit); else value &= static_cast<_CT>(~bit); }
00888
00889 inline void SetMinMax (double x, double& minx, double& maxx) { if (x < minx) minx = x; if (x > maxx) maxx = x;}
00890 inline void SetMinMax (INT32 x, INT32& minx, INT32& maxx) { if (x < minx) minx = x; if (x > maxx) maxx = x;}
00891 inline void SetMinMax (UINT32 x, UINT32& minx, UINT32& maxx) { if (x < minx) minx = x; if (x > maxx) maxx = x;}
00892
00894 inline INT64 INT32ToINT64 (INT32 high, INT32 low) {INT64 retval = high; return ((retval << 32) + low);};
00895 inline UINT64 UINT32ToUINT64 (UINT32 high, UINT32 low) {UINT64 retval = high; return ((retval << 32) + low);};
00896 #if defined(WIN32)
00897 inline void INT64ToINT32 (INT64 value, INT32& high, INT32& low) {low = static_cast<INT32>(value & 0x00000000FFFFFFFF); high = static_cast<INT32>(value >> 32); return;};
00898 inline void UINT64ToUINT32 (UINT64 value, UINT32& high, UINT32& low) {low = static_cast<UINT32>(value & 0x00000000FFFFFFFF); high = static_cast<UINT32>(value >> 32); return;};
00899 #else
00900 inline void INT64ToINT32 (INT64 value, INT32& high, INT32& low) {low = static_cast<INT32>(value & 0x00000000FFFFFFFFLL); high = static_cast<INT32>(value >> 32); return;};
00901 inline void UINT64ToUINT32 (UINT64 value, UINT32& high, UINT32& low) {low = static_cast<UINT32>(value & 0x00000000FFFFFFFFULL); high = static_cast<UINT32>(value >> 32); return;};
00902 #endif
00903
00904 #ifndef GENERATING_DOXYGEN_OUTPUT
00905
00907 #define DEFINE_ENUM_OP_BITWISE(_CT) \
00908 inline _CT operator| (const _CT& lhs, const _CT& rhs) \
00909 { return (static_cast<_CT>(static_cast<const INT32>(lhs) | static_cast<const INT32>(rhs))); } \
00910 inline _CT& operator|= (_CT& lhs, const _CT& rhs) \
00911 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) | static_cast<const INT32>(rhs))); return (lhs); } \
00912 inline _CT& operator+= (_CT& lhs, const _CT& rhs) \
00913 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) | static_cast<const INT32>(rhs))); return (lhs); } \
00914 inline _CT operator& (const _CT& lhs, const _CT& rhs) \
00915 { return (static_cast<_CT>(static_cast<const INT32>(lhs) & static_cast<const INT32>(rhs))); } \
00916 inline _CT& operator&= (_CT& lhs, const _CT& rhs) \
00917 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) & static_cast<const INT32>(rhs))); return (lhs); } \
00918 inline _CT operator- (const _CT& lhs, const _CT& rhs) \
00919 { return (static_cast<_CT>(static_cast<const INT32>(lhs) & static_cast<const INT32>(~rhs))); } \
00920 inline _CT& operator-= (_CT& lhs, const _CT& rhs) \
00921 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) & static_cast<const INT32>(~rhs))); return (lhs); } \
00922 inline _CT operator^ (const _CT& lhs, const _CT& rhs) \
00923 { return (static_cast<_CT>(static_cast<const INT32>(lhs) ^ static_cast<const INT32>(rhs))); } \
00924 inline _CT& operator^= (_CT& lhs, const _CT& rhs) \
00925 { lhs = (static_cast<_CT>(static_cast<INT32>(lhs) ^ static_cast<const INT32>(rhs))); return (lhs); }
00926
00928 #define DEFINE_ENUM_OP_INCREMENT(_CT) \
00929 inline _CT& operator++ (_CT& lhs) { lhs = static_cast<_CT>(lhs+1); return (lhs); }
00930
00931 #endif // GENERATING_DOXYGEN_OUTPUT
00932
00933 #else // not C++
00934
00935 #define CHECKSIZE(s)
00936 #define bool int
00937
00938 #endif // C++
00939
00940 #if defined(USE_AMEMCPY) && defined(WIN32) && !defined(WIN64)
00946
00947 #include <memory.h>
00948 #include <mi32/cpuext.h>
00949 #define memcpy amemcpy
00950 #endif
00951
00952
00953
00954
00955 #if defined(__cplusplus)
00956 #ifndef GENERATING_DOXYGEN_OUTPUT
00957
00958
00959 #ifdef memcpy
00960
00961 #define PREVENT_MEMFUNC(type) \
00962 void memcmp(type *, const type *, int); \
00963 void memset(type *, int, int);
00964 #else
00965 #define PREVENT_MEMFUNC(type) \
00966 void memcmp(type *, const type *, int); \
00967 void memcpy(type *, const type *, int); \
00968 void memset(type *, int, int);
00969 #endif
00970
00971
00972 #define PREVENT_MEMCMP(type) \
00973 void memcmp(type *, const type *, int);
00974
00975 #endif // GENERATING_DOXYGEN_OUTPUT
00976 #endif // __cplusplus
00977
00978
00979
00982
00987 ERRVALUE MdlgShowErrorCode (
00988 MDLGPARENT parent,
00989 ERRVALUE errcode
00990 );
00991
00993
00994 #endif // C++
00995
00996 #endif // #ifndef INC_MI32_STDDEFNS_H