Deprecated Core Endian Functions

A function identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in OS X v10.8

CoreEndianFlipData

Calls the flipper callback associated with the specified data type. (Deprecated in OS X v10.8.)

OSStatus CoreEndianFlipData (
   OSType dataDomain,
   OSType dataType,
   SInt16 id,
   void *data,
   ByteCount dataLen,
   Boolean currentlyNative
);
Parameters
dataDomain

An OSType value that specifies the domain of the flipper callback you want to invoke. Pass kCoreEndianResourceManagerDomain if your callback applies to resource data. Pass kCoreEndianAppleEventManagerDomain if your callback applies to Apple event data. See “Domain Types” for more information.

dataType

An OSType value that specifies the type of data that needs to be byte-swapped. This is the four character code of the resource type or Apple event. This never needs to be byte-swapped even though GDB and Xcode display the resource in byte-swapped order.

id

The resource ID of the data type. The Resource Manager byte-swaps this for you so you can compare the resource ID against constants in your code. If the data is not a resource, pass 0.

data

A pointer to the first byte of the data to be byte swapped.

dataLen

The length of the data (in bytes) to be byte swapped.

currentlyNative

A Boolean value that indicates the direction to byte swap. Pass true when the data specified by the data parameter uses the byte ordering of the currently executing code. On a PowerPC system, true specifies that the data is in big-endian format. On an x86 system, true specifies that the data is in little-endian format.

Return Value

A result code. Returns noErr if the data is byte swapped and handlerNotFound if the data is not byte swapped. Note that data is only byte swapped if it needs to be byte swapped.

Availability
  • Available in OS X v10.3 and later.
  • Deprecated in OS X v10.8.
Declared In
Endian.h

CoreEndianGetFlipper

Obtains the flipper callback that is installed for the specified data type. (Deprecated in OS X v10.8.)

OSStatus CoreEndianGetFlipper (
   OSType dataDomain,
   OSType dataType,
   CoreEndianFlipProc *proc,
   void **refcon
);
Parameters
dataDomain

An OSType value that specifies the domain of the flipper callback you want to obtain. Pass kCoreEndianResourceManagerDomain to obtain a callback that applies to resource data. Pass kCoreEndianAppleEventManagerDomain to obtain a callback that applies to Apple event data. See “Domain Types” for more information.

dataType

An OSType value that specifies the type of data associated with the flipper callback you want to obtain. This is the four character code of the resource type or Apple event. This never needs to be byte-swapped even though GDB and Xcode display the resource in byte-swapped order.

proc

On output, points to the flipper callback that is installed for the data type specified by the dataType parameter.

refCon

On output, points to a 32-bit value that references callback-specific data.

Return Value

A result code. Returns noErr if the flipper callback is found.

Discussion

You can call the function CoreEndianGetFlipper to determine whether a flipper for a given data type is available.

Availability
  • Available in OS X v10.3 and later.
  • Deprecated in OS X v10.8.
Declared In
Endian.h

CoreEndianInstallFlipper

Installs a flipper callback for the specified data type. (Deprecated in OS X v10.8.)

OSStatus CoreEndianInstallFlipper (
   OSType dataDomain,
   OSType dataType,
   CoreEndianFlipProc proc,
   void *refcon
);
Parameters
dataDomain

An OSType value that specifies the domain to which the flipper callback applies. Pass kCoreEndianResourceManagerDomain if your callback applies to resource data. Pass kCoreEndianAppleEventManagerDomain if your callback applies to Apple event data. See “Domain Types” for more information.

dataType

An OSType value that specifies the type of data for which you want your flipper callback installed. This is the four character code of the resource type or Apple event.

proc

A pointer to your flipper callback. The flipper callback is installed into a per-process table that is searched before the system table.

refCon

A 32-bit value containing or referring to data needed by the callback.

Return Value

A result code. Returns noErr if your flipper callback is installed.

Discussion

You should install the callback by calling the function CoreEndianInstallFlipper when your application calls its initialization routine or when you open your resource file.

Availability
  • Available in OS X v10.3 and later.
  • Deprecated in OS X v10.8.
Declared In
Endian.h

Endian16_Swap

Changes the endian format of an unsigned 16-bit integer. (Deprecated in OS X v10.8.)

UInt16 Endian16_Swap (
   UInt16    value
);
Parameters
value

An unsigned 16-bit integer input.

Return Value

The unsigned 16-bit integer result.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

Endian32_Swap

Changes the endian format of an unsigned 32-bit integer. (Deprecated in OS X v10.8.)

UInt32 Endian32_Swap (
   UInt32    value
);
Parameters
value

An unsigned 32-bit integer input.

Return Value

The unsigned 32-bit integer result.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

Endian64_Swap

Changes the endian format of an unsigned 64-bit integer. (Deprecated in OS X v10.8.)

static UInt64 Endian64_Swap (
   UInt64 value
);
Parameters
value

An unsigned 64-bit integer input.

Return Value

The unsigned 64-bit integer result.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS16_BtoL

Converts a signed 16-bit big-endian value to the equivalent little-endian value. (Deprecated in OS X v10.8.)

SInt16 EndianS16_BtoL (
   SInt16    value
);
Parameters
value

A signed 16-bit big-endian value.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS16_BtoN

Converts a signed 16-bit big-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

SInt16 EndianS16_BtoN (
   SInt16    value
);
Parameters
value

A signed 16-bit big-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS16_LtoB

Converts a signed 16-bit little-endian value to the equivalent big-endian value. (Deprecated in OS X v10.8.)

SInt16 EndianS16_LtoB (
   SInt16    value
);
Parameters
value

A signed 16-bit little-endian value.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS16_LtoN

Converts a signed 16-bit little-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

SInt16 EndianS16_LtoN (
   SInt16    value
);
Parameters
value

A signed 16-bit little-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS16_NtoB

Converts a signed 16-bit value in the computer’s native format to the equivalent big-endian value. (Deprecated in OS X v10.8.)

SInt16 EndianS16_NtoB (
   SInt16    value
);
Parameters
value

A signed 16-bit value in the computer’s native format.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS16_NtoL

Converts a signed 16-bit value in the computer’s native format to the equivalent little-endian value. (Deprecated in OS X v10.8.)

SInt16 EndianS16_NtoL (
   SInt16    value
);
Parameters
value

A signed 16-bit value in the computer’s native format.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS32_BtoL

Converts a signed 32-bit big-endian value to the equivalent little-endian value. (Deprecated in OS X v10.8.)

SInt32 EndianS32_BtoL (
   SInt32    value
);
Parameters
value

A signed 32-bit big-endian value.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS32_BtoN

Converts a signed 32-bit big-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

SInt32 EndianS32_BtoN (
   SInt32    value
);
Parameters
value

A signed 32-bit big-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS32_LtoB

Converts a signed 32-bit little-endian value to the equivalent big-endian value. (Deprecated in OS X v10.8.)

SInt32 EndianS32_LtoB (
   SInt32    value
);
Parameters
value

A signed 32-bit little-endian value.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS32_LtoN

Converts a signed 32-bit little-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

SInt32 EndianS32_LtoN (
   SInt32    value
);
Parameters
value

A signed 32-bit little-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS32_NtoB

Converts a signed 32-bit value in the computer’s native format to the equivalent big-endian value. (Deprecated in OS X v10.8.)

SInt32 EndianS32_NtoB (
   SInt32    value
);
Parameters
value

A signed 32-bit value in the computer’s native format.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS32_NtoL

Converts a signed 32-bit value in the computer’s native format to the equivalent little-endian value. (Deprecated in OS X v10.8.)

SInt32 EndianS32_NtoL (
   SInt32    value
);
Parameters
value

A signed 32-bit value in the computer’s native format.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS64_BtoL

Converts a signed 64-bit big-endian value to the equivalent little-endian value. (Deprecated in OS X v10.8.)

SInt64 EndianS64_BtoL (
   SInt64    value
);
Parameters
value

A signed 64-bit big-endian value.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS64_BtoN

Converts a signed 64-bit big-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

SInt64 EndianS64_BtoN (
   SInt64    value
);
Parameters
value

A signed 64-bit big-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS64_LtoB

Converts a signed 64-bit little-endian value to the equivalent big-endian value. (Deprecated in OS X v10.8.)

SInt64 EndianS64_LtoB (
   SInt64    value
);
Parameters
value

A signed 64-bit little-endian value.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS64_LtoN

Converts a signed 64-bit little-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

SInt64 EndianS64_LtoN (
   SInt64    value
);
Parameters
value

A signed 64-bit little-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS64_NtoB

Converts a signed 64-bit value in the computer’s native format to the equivalent big-endian value. (Deprecated in OS X v10.8.)

SInt64 EndianS64_NtoB (
   SInt64    value
);
Parameters
value

A signed 64-bit value in the computer’s native format.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianS64_NtoL

Converts a signed 64-bit value in the computer’s native format to the equivalent little-endian value. (Deprecated in OS X v10.8.)

SInt64 EndianS64_NtoL (
   SInt64    value
);
Parameters
value

A signed 64-bit value in the computer’s native format.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU16_BtoL

Converts an unsigned 16-bit big-endian value to the equivalent little-endian value. (Deprecated in OS X v10.8.)

UInt16 EndianU16_BtoL (
   UInt16    value
);
Parameters
value

An unsigned 16-bit big-endian value.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU16_BtoN

Converts an unsigned 16-bit big-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

UInt16 EndianU16_BtoN (
   UInt16    value
);
Parameters
value

An unsigned 16-bit big-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU16_LtoB

Converts an unsigned 16-bit little-endian value to the equivalent big-endian value. (Deprecated in OS X v10.8.)

UInt16 EndianU16_LtoB (
   UInt16    value
);
Parameters
value

An unsigned 16-bit little-endian value.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU16_LtoN

Converts an unsigned 16-bit little-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

UInt16 EndianU16_LtoN (
   UInt16    value
);
Parameters
value

An unsigned 16-bit little-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU16_NtoB

Converts an unsigned 16-bit value in the computer’s native format to the equivalent big-endian value. (Deprecated in OS X v10.8.)

UInt16 EndianU16_NtoB (
   UInt16    value
);
Parameters
value

An unsigned 16-bit value in the computer’s native format.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU16_NtoL

Converts an unsigned 16-bit value in the computer’s native format to the equivalent little-endian value. (Deprecated in OS X v10.8.)

UInt16 EndianU16_NtoL (
   UInt16    value
);
Parameters
value

An unsigned 16-bit value in the computer’s native format.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU32_BtoL

Converts an unsigned 32-bit big-endian value to the equivalent little-endian value. (Deprecated in OS X v10.8.)

UInt32 EndianU32_BtoL (
   UInt32    value
);
Parameters
value

An unsigned 32-bit big-endian value.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU32_BtoN

Converts an unsigned 32-bit big-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

UInt32 EndianU32_BtoN (
   UInt32    value
);
Parameters
value

An unsigned 32-bit big-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU32_LtoB

Converts an unsigned 32-bit little-endian value to the equivalent big-endian value. (Deprecated in OS X v10.8.)

UInt32 EndianU32_LtoB (
   UInt32    value
);
Parameters
value

An unsigned 32-bit little-endian value.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU32_LtoN

Converts an unsigned 32-bit little-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

UInt32 EndianU32_LtoN (
   UInt32    value
);
Parameters
value

An unsigned 32-bit little-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU32_NtoB

Converts an unsigned 32-bit value in the computer’s native format to the equivalent big-endian value. (Deprecated in OS X v10.8.)

UInt32 EndianU32_NtoB (
   UInt32    value
);
Parameters
value

An unsigned 32-bit value in the computer’s native format.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Related Sample Code
Declared In
Endian.h

EndianU32_NtoL

Converts an unsigned 32-bit value in the computer’s native format to the equivalent little-endian value. (Deprecated in OS X v10.8.)

UInt32 EndianU32_NtoL (
   UInt32    value
);
Parameters
value

An unsigned 32-bit value in the computer’s native format.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU64_BtoL

Converts an unsigned 64-bit big-endian value to the equivalent little-endian value. (Deprecated in OS X v10.8.)

UInt64 EndianU64_BtoL (
   UInt64    value
);
Parameters
value

An unsigned 64-bit big-endian value.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU64_BtoN

Converts an unsigned 64-bit big-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

UInt64 EndianU64_BtoN (
   UInt64    value
);
Parameters
value

An unsigned 64-bit big-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU64_LtoB

Converts an unsigned 64-bit little-endian value to the equivalent big-endian value. (Deprecated in OS X v10.8.)

UInt64 EndianU64_LtoB (
   UInt64    value
);
Parameters
value

An unsigned 64-bit little-endian value.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU64_LtoN

Converts an unsigned 64-bit little-endian value to the equivalent value in the computer’s native format. (Deprecated in OS X v10.8.)

UInt64 EndianU64_LtoN (
   UInt64    value
);
Parameters
value

An unsigned 64-bit little-endian value.

Return Value

The equivalent value in the computer’s native format.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU64_NtoB

Converts an unsigned 64-bit value in the computer’s native format to the equivalent big-endian value. (Deprecated in OS X v10.8.)

UInt64 EndianU64_NtoB (
   UInt64    value
);
Parameters
value

An unsigned 64-bit value in the computer’s native format.

Return Value

The equivalent big-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h

EndianU64_NtoL

Converts an unsigned 64-bit value in the computer’s native format to the equivalent little-endian value. (Deprecated in OS X v10.8.)

UInt64 EndianU64_NtoL (
   UInt64    value
);
Parameters
value

An unsigned 64-bit value in the computer’s native format.

Return Value

The equivalent little-endian value.

Availability
  • Deprecated in OS X v10.8.
Declared In
Endian.h