Home Download Musics Developers
API Sources Tools File Format Technicals

Byte ordering
[file68 library documentation.]


Detailed Description

Provides functions for dealing with host byte order.


Files

file  endian68.h
 byte order header.


Functions

int SC68byte_order (void)
 Get integer byte order.

int SC68little_endian (void)
 Check if byte order is little endian.

int SC68big_endian (void)
 Check if byte order is big endian.


Function Documentation

int SC68byte_order void   ) 
 

Get integer byte order.

The SC68byte_order() function returns an integer which gives the position of each byte in the memory.

Examples:

  • Intel little endian will return 0x03020100.
  • Motorola big endian will return 0x00010203.

Returns:
byte order.

int SC68little_endian void   ) 
 

Check if byte order is little endian.

The SC68little_endian() function checks if the byte order is little endian.

Returns:
little endian test.
Return values:
1 byte order is little endian.
0 byte order is not little endian.
Warning:
The function only test if the less signifiant byte is stored at offset 0.

int SC68big_endian void   ) 
 

Check if byte order is big endian.

The SC68big_endian() function checks if the byte order is big endian. By the way it returns !SC68little_endian().

Returns:
big endian test.
Return values:
1 byte order is big endian.
0 byte order is not big endian.
See also:
SC68little_endian();