22 #ifndef __CONDITIONALMACROS__
43 #if PRAGMA_STRUCT_ALIGN
44 #pragma options align = mac68k
45 #elif PRAGMA_STRUCT_PACKPUSH
47 #elif PRAGMA_STRUCT_PACK
66 inline SInt64 S64Max(
void) {
return 9223372036854775807LL; }
68 #define S64Max() (9223372036854775807LL)
72 #if defined(__MWERKS__) && (__MWERKS__ < 0x1800) && defined(S64Max)
75 #define S64Max() 9223372036854775807
94 #define S64Min() (-S64Max() - 1)
120 #define S64Add(left, right) ((SInt64)(left) + (SInt64)(right))
146 #define S64Subtract(left, right) ((SInt64)(left) - (SInt64)(right))
169 #define S64Negate(value) (-(SInt64)(value))
194 #define S64Absolute(value) (llabs((SInt64)value))
223 #define S64Multiply(left, right) ((SInt64)(left) * (SInt64)(right))
227 #if CALL_NOT_IN_CARBON
251 #define S64Mod(dividend, divisor) ((SInt64)(dividend) % (SInt64)(divisor))
282 return ((remainder) ? (*((
SInt64 *)(remainder)) =
288 #define S64Divide(dividend, divisor, remainder) \
289 (((remainder) ? (*((SInt64 *)(remainder)) = \
290 ((SInt64)(dividend) % (SInt64)(divisor))) \
292 ((SInt64)(dividend) / (SInt64)(divisor)))
302 #define S64Div(dividend, divisor) (S64Divide((dividend), (divisor), NULL))
324 #define S64Set(value) ((SInt64)(value))
345 #define S64SetU(value) ((SInt64)(value))
365 inline SInt32
S32Set(
SInt64 value) {
return (SInt32)(value); }
367 #define S32Set(value) ((SInt32)(value))
391 #define S64And(left, right) ((SInt64)(left) && (SInt64)(right))
415 #define S64Or(left, right) ((SInt64)(left) || (SInt64)(right))
439 #define S64Eor(left, right) \
440 ((Boolean)(((SInt64)(left) ? 1 : 0) ^ ((SInt64)(right) ? 1 : 0)))
461 #define S64Not(value) (!((SInt64)(value)))
508 #define S64BitwiseAnd(left, right) ((SInt64)(left) & (SInt64)(right))
532 #define S64BitwiseOr(left, right) ((SInt64)(left) | (SInt64)(right))
556 #define S64BitwiseEor(left, right) ((SInt64)(left) ^ (SInt64)(right))
577 #define S64BitwiseNot(value) (~((SInt64)(value)))
598 return (
SInt64)(value) >> ((shift) & 0x7F);
601 #define S64ShiftRight(value, shift) ((SInt64)(value) >> ((shift) & 0x7F))
622 return (
SInt64)(value) << ((shift) & 0x7F);
625 #define S64ShiftLeft(value, shift) ((SInt64)(value) << ((shift) & 0x7F))
629 #if TYPE_LONGLONG || !TYPE_LONGDOUBLE_IS_DOUBLE
647 SInt64ToLongDouble(
SInt64 value);
650 inline long double SInt64ToLongDouble(
SInt64 value)
652 return (
long double)(value);
655 #define SInt64ToLongDouble(value) ((long double)(value))
676 LongDoubleToSInt64(
long double value);
679 inline SInt64 LongDoubleToSInt64(
long double value) {
return (
SInt64)(value); }
681 #define LongDoubleToSInt64(value) ((SInt64)(value))
702 inline UInt64 U64Max(
void) {
return 0xffffffffffffffffULL; }
704 #define U64Max() (0xffffffffffffffffULL)
708 #if defined(__MWERKS__) && (__MWERKS__ < 0x1800) && defined(U64Max)
711 #define U64Max() 0xffffffffffffffff
735 #define U64Add(left, right) ((UInt64)(left) + (UInt64)(right))
761 #define U64Subtract(left, right) ((UInt64)(left) - (UInt64)(right))
788 #define U64Multiply(left, right) ((UInt64)(left) * (UInt64)(right))
792 #if CALL_NOT_IN_CARBON
816 #define U64Mod(dividend, divisor) ((UInt64)(dividend) % (UInt64)(divisor))
847 return ((remainder) ? (*((
UInt64 *)(remainder)) =
853 #define U64Divide(dividend, divisor, remainder) \
854 (((remainder) ? (*((UInt64 *)(remainder)) = \
855 ((UInt64)(dividend) % (UInt64)(divisor))) \
857 ((UInt64)(dividend) / (UInt64)(divisor)))
867 #define U64Div(dividend, divisor) (U64Divide((dividend), (divisor), NULL))
889 #define U64Set(value) ((UInt64)(value))
910 #define U64SetU(value) ((UInt64)(value))
930 inline UInt32
U32SetU(
UInt64 value) {
return (UInt32)(value); }
932 #define U32SetU(value) ((UInt32)(value))
956 #define U64And(left, right) ((UInt64)(left) && (UInt64)(right))
980 #define U64Or(left, right) ((UInt64)(left) || (UInt64)(right))
1004 #define U64Eor(left, right) \
1005 ((Boolean)(((UInt64)(left) ? 1 : 0) ^ ((UInt64)(right) ? 1 : 0)))
1026 #define U64Not(value) (!((UInt64)(value)))
1073 #define U64BitwiseAnd(left, right) ((UInt64)(left) & (UInt64)(right))
1097 #define U64BitwiseOr(left, right) ((UInt64)(left) | (UInt64)(right))
1121 #define U64BitwiseEor(left, right) ((UInt64)(left) ^ (UInt64)(right))
1142 #define U64BitwiseNot(value) (~((UInt64)(value)))
1163 return (
UInt64)(value) >> ((shift) & 0x7F);
1166 #define U64ShiftRight(value, shift) ((UInt64)(value) >> ((shift) & 0x7F))
1187 return (
UInt64)(value) << ((shift) & 0x7F);
1190 #define U64ShiftLeft(value, shift) ((UInt64)(value) << ((shift) & 0x7F))
1194 #if TYPE_LONGLONG || !TYPE_LONGDOUBLE_IS_DOUBLE
1208 UInt64ToLongDouble(
UInt64 value);
1211 inline long double UInt64ToLongDouble(
UInt64 value)
1213 return (
long double)(value);
1216 #define UInt64ToLongDouble(value) ((long double)(value))
1233 LongDoubleToUInt64(
long double value);
1236 inline UInt64 LongDoubleToUInt64(
long double value) {
return (
UInt64)(value); }
1238 #define LongDoubleToUInt64(value) ((UInt64)(value))
1261 #define UInt64ToSInt64(value) ((SInt64)(value))
1282 #define SInt64ToUInt64(value) ((UInt64)(value))
1308 #define SInt64ToWide(x) (*((wide *)(&x)))
1309 #define WideToSInt64(x) (*((SInt64 *)(&x)))
1310 #define UInt64ToUnsignedWide(x) (*((UnsignedWide *)(&x)))
1311 #define UnsignedWideToUInt64(x) (*((UInt64 *)(&x)))
1313 #define SInt64ToWide(x) (x)
1314 #define WideToSInt64(x) (x)
1315 #define UInt64ToUnsignedWide(x) (x)
1316 #define UnsignedWideToUInt64(x) (x)
1319 #if PRAGMA_STRUCT_ALIGN
1320 #pragma options align = reset
1321 #elif PRAGMA_STRUCT_PACKPUSH
1323 #elif PRAGMA_STRUCT_PACK
1327 #ifdef PRAGMA_IMPORT_OFF
1330 #pragma import reset
Set up for compiler independent conditionals.
Basic Macintosh data types.
#define NULL
Definition: MacTypes.h:61
unsigned char Boolean
Definition: MacTypes.h:318
wide SInt64
Definition: MacTypes.h:139
UInt64 U64BitwiseNot(UInt64 value)
SInt32 U64Compare(UInt64 left, UInt64 right)
SInt64 S64ShiftLeft(SInt64 value, UInt32 shift)
SInt64 S64BitwiseNot(SInt64 value)
Boolean S64Eor(SInt64 left, SInt64 right)
Boolean S64Or(SInt64 left, SInt64 right)
UInt64 SInt64ToUInt64(SInt64 value)
Boolean S64And(SInt64 left, SInt64 right)
SInt64 S64Mod(SInt64 dividend, SInt64 divisor)
SInt64 S64ShiftRight(SInt64 value, UInt32 shift)
#define S64Div(dividend, divisor)
Definition: Math64.h:302
UInt64 U64BitwiseOr(UInt64 left, UInt64 right)
SInt32 S64Compare(SInt64 left, SInt64 right)
SInt64 S64Negate(SInt64 value)
UInt64 U64Mod(UInt64 dividend, UInt64 divisor)
SInt32 S32Set(SInt64 value)
SInt64 S64Add(SInt64 left, SInt64 right)
#define U64Div(dividend, divisor)
Definition: Math64.h:867
UInt64 U64Add(UInt64 left, UInt64 right)
UInt64 U64Subtract(UInt64 left, UInt64 right)
SInt64 S64Absolute(SInt64 value)
UInt32 U32SetU(UInt64 value)
UInt64 U64Divide(UInt64 dividend, UInt64 divisor, UInt64 *remainder)
Boolean U64Or(UInt64 left, UInt64 right)
SInt64 S64SetU(UInt32 value)
UInt64 U64Multiply(UInt64 left, UInt64 right)
UInt64 U64BitwiseAnd(UInt64 left, UInt64 right)
Boolean U64Eor(UInt64 left, UInt64 right)
UInt64 U64SetU(UInt32 value)
SInt64 S64Multiply(SInt64 left, SInt64 right)
Boolean U64Not(UInt64 value)
UInt64 U64ShiftRight(UInt64 value, UInt32 shift)
Boolean S64Not(SInt64 value)
SInt64 S64BitwiseEor(SInt64 left, SInt64 right)
SInt64 UInt64ToSInt64(UInt64 value)
UInt64 U64Set(SInt32 value)
Boolean U64And(UInt64 left, UInt64 right)
UInt64 U64BitwiseEor(UInt64 left, UInt64 right)
SInt64 S64Divide(SInt64 dividend, SInt64 divisor, SInt64 *remainder)
SInt64 S64BitwiseOr(SInt64 left, SInt64 right)
SInt64 S64Subtract(SInt64 left, SInt64 right)
SInt64 S64Set(SInt32 value)
UInt64 U64ShiftLeft(UInt64 value, UInt32 shift)
SInt64 S64BitwiseAnd(SInt64 left, SInt64 right)
Definition: MacTypes.h:110
Definition: MacTypes.h:104