## Byte ordering

Byte ordering — functions for decoding integer types of different byte-orders

## Synopsis

    enum                IptcByteOrder;
    typedef             IptcByte;
    typedef             IptcShort;
    typedef             IptcLong;
    typedef             IptcSLong;
    IptcShort           iptc_get_short                      (const unsigned char *b,
                                                             IptcByteOrder order);
    IptcLong            iptc_get_long                       (const unsigned char *b,
                                                             IptcByteOrder order);
    IptcSLong           iptc_get_slong                      (const unsigned char *b,
                                                             IptcByteOrder order);
    void                iptc_set_short                      (unsigned char *b,
                                                             IptcByteOrder order,
                                                             IptcShort value);
    void                iptc_set_long                       (unsigned char *b,
                                                             IptcByteOrder order,
                                                             IptcLong value);
    void                iptc_set_slong                      (unsigned char *b,
                                                             IptcByteOrder order,
                                                             IptcSLong value);
    #define             MIN                                 (a,
                                                             b)
    #define             IPTC_TAG_SUBSEC_TIME

## Description

## Details

### enum IptcByteOrder

    typedef enum {
    	IPTC_BYTE_ORDER_MOTOROLA,
    	IPTC_BYTE_ORDER_INTEL
    } IptcByteOrder;

`IPTC_BYTE_ORDER_MOTOROLA` |
`IPTC_BYTE_ORDER_INTEL` |

### IptcByte

    typedef char		IptcByte;          /* 1 byte  */

### IptcShort

    typedef uint16_t IptcShort;         /* 2 bytes */

### IptcLong

    typedef uint32_t IptcLong;          /* 4 bytes */

### IptcSLong

    typedef int32_t		IptcSLong;         /* 4 bytes */

### iptc_get_short ()

    IptcShort           iptc_get_short                      (const unsigned char *b,
                                                             IptcByteOrder order);

### iptc_get_long ()

    IptcLong            iptc_get_long                       (const unsigned char *b,
                                                             IptcByteOrder order);

### iptc_get_slong ()

    IptcSLong           iptc_get_slong                      (const unsigned char *b,
                                                             IptcByteOrder order);

### iptc_set_short ()

    void                iptc_set_short                      (unsigned char *b,
                                                             IptcByteOrder order,
                                                             IptcShort value);

### iptc_set_long ()

    void                iptc_set_long                       (unsigned char *b,
                                                             IptcByteOrder order,
                                                             IptcLong value);

### iptc_set_slong ()

    void                iptc_set_slong                      (unsigned char *b,
                                                             IptcByteOrder order,
                                                             IptcSLong value);

### MIN()

    #define MIN(a, b)  (((a) < (b)) ? (a) : (b))

### IPTC_TAG_SUBSEC_TIME

    #define IPTC_TAG_SUBSEC_TIME IPTC_TAG_SUB_SEC_TIME