Documentation  |   Table of Contents   |  < Previous   |  Next >  

80    PalmTypes.h

Porting Applications to Palm OS® Cobalt

Exploring Palm OS®

The basic data types used by the Palm OS Cobalt APIs are different from those declared in the 68K-based SDKs. In Palm OS Cobalt a signed 16-bit integer is declared as an int16_t, whereas in a Palm OS Garnet application you would have declared it as Int16.

Be aware that the Palm OS Protein C/C++ Compiler treats the char type as unsigned. Code compiled using a compiler that treats the char type as signed may need to be modified in order to function correctly.


NOTE: Early in the porting process you may want to #include PalmTypesCompatibility.h (after the #include for PalmOS.h). This header file defines a number of APIs and macros that allow applications using Palm OS Garnet data types to compile and run. This compatibility header should not be counted on long-term, however, so later in the porting process you should remove the #include and fix any problems that result.

Unlike with the 68K-based versions of Palm OS, Palm OS Cobalt does not use traps to handle calls to operating system functions.

Deleted APIs ^TOP^

Table 80.1  Deleted macros

Deleted API

Use instead

ASM_SYS_TRAP()

Nothing. Palm OS Cobalt functions aren't accessed via a trap.

SYS_TRAP()

Nothing. Palm OS Cobalt functions aren't accessed via a trap.

Table 80.2  Deleted #defines

Deleted API

Use instead

bitsInByte

8

loop_forever

for (;;)

sysDbgBreakpointTrapNum

Nothing. Palm OS Cobalt functions aren't accessed via a trap.

sysDbgTrapNum

Nothing. Palm OS Cobalt functions aren't accessed via a trap.

sysDispatchTrapNum

Nothing. Palm OS Cobalt functions aren't accessed via a trap.

USE_TRAPS

Nothing. Palm OS Cobalt functions aren't accessed via a trap.

Table 80.3  Deleted enumerated types

Deleted API

Use instead

true/false enum

TRUE and FALSE #define values

Modified APIs ^TOP^

Table 80.4  Modified types

Modified API

Description of change

typedef int32_t Err

typedef int16_t Int16

typedef int32_t Int32

typedef int8_t Int8

typedef uint16_t UInt16

typedef uint32_t UInt32

typedef uint8_t UInt8

Unchanged APIs ^TOP^

Table 80.5  Unchanged macros

OffsetOf()

Table 80.6  Unchanged structures

MemHandle

Table 80.7  Unchanged types

Boolean

Char1

Coord

LocalID

MemPtr

WChar2

1. The Palm OS Protein C/C++ Compiler treats the char type as unsigned. Code compiled using a compiler that treats the char type as signed may need to be modified in order to function correctly.
2. Although still declared in the Palm OS Protein headers, the WChar type is deprecated. Use wchar32_t, or wchar16_t if you need an explicit 16-bit value for UTF-16/UCS-2 Unicode support.

Table 80.8  Unchanged #defines

NULL

Table 80.9  Unchanged application-defined functions

ProcPtr()