The mapping of the old types to the new types is described in an article in the
now-inaccessible Knowledge Database. There's also a set of typedefs in the
PalmCompatibility.h file in the 3.5 SDK. In case the SDK you have doesn't have
that file (I'm not sure it appeared in early 3.5 SDKs), here are the typedefs
(not that Int was changed to Int16, NOT Int32):

// The data types Byte, Word, DWord and so on are now deprecated.  We
// recommend that you use the corresponding new data types: for example,
// use Int16 instead of SWord and UInt32 instead of DWord.  In particular,
// the unfortunate distinction between Handle/VoidHand has been fixed:
// use MemHandle instead.

typedef Int8        SByte;
#if __DEFINE_TYPES_
typedef UInt8       Byte;
#endif

typedef Int16       SWord;
typedef UInt16      Word;

typedef Int32       SDWord;
typedef UInt32      DWord;


// Logical data types
typedef Int8        SChar;
typedef UInt8       UChar;

typedef Int16       Short;
typedef UInt16      UShort;

typedef Int16       Int;
typedef UInt16      UInt;

typedef Int32       Long;
typedef UInt32      ULong;


// Pointer Types
typedef MemPtr      VoidPtr;
typedef MemHandle   VoidHand;

#if __DEFINE_TYPES_
typedef MemPtr      Ptr;
typedef MemHandle   Handle;
#endif


// Because "const BytePtr" means "const pointer to Byte" rather than "pointer
// to const Byte", all these XXXXPtr types are deprecated: you're better off
// just using "Byte *" and so on.  (Even better, use "UInt8 *"!)

typedef SByte*      SBytePtr;
#if __DEFINE_TYPES_
typedef Byte*       BytePtr;
#endif

typedef SWord*      SWordPtr;
typedef Word*       WordPtr;
typedef UInt16*     UInt16Ptr;

typedef SDWord*     SDWordPtr;
typedef DWord*      DWordPtr;

// Logical data types
typedef Boolean*    BooleanPtr;

typedef Char*       CharPtr;
typedef SChar*      SCharPtr;
typedef UChar*      UCharPtr;

typedef WChar*      WCharPtr;

typedef Short*      ShortPtr;
typedef UShort*     UShortPtr;

typedef Int*        IntPtr;
typedef UInt*       UIntPtr;

typedef Long*       LongPtr;
typedef ULong*      ULongPtr;

-- Keith






Steve Mann <[EMAIL PROTECTED]> on 01/06/2000 02:40:11 PM

Please respond to [EMAIL PROTECTED]

Sent by:  Steve Mann <[EMAIL PROTECTED]>


To:   [EMAIL PROTECTED]
cc:    (Keith Rollin/HQ/3Com)
Subject:  Re: Pre 3.5 Types & 3.5 SDK




I'm trying to use MathLib in a 3.5 project. The problem is that the
basic data types have changed with 3.5 such that an Int is now called
an Int32 for instance. Has anyone worked out a proper scheme for
using pre 3.5 source code in a 3.5 project without changing the
source code? I've been able to get an almost clean compile using a
bunch of typedefs, but then I need to test, and so on. If someone's
been there and done that, it would make life so much easier. I tried
pulling inn the 3.1 types file, but there were some problems with
that.

Thanks in advance.

Regards,
Steve Mann
-------------------------------------------
Creative Digital Publishing Inc.
1315 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.784.9461              805.784.9462 (fax)
[EMAIL PROTECTED]       http://www.cdpubs.com





Reply via email to