OpenCOBOL 1.1pre-rel
Defines
byteswap.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define COB_BSWAP_16_CONSTANT(val)
#define COB_BSWAP_32_CONSTANT(val)
#define COB_BSWAP_64_CONSTANT(val)
#define COB_BSWAP_16(val)   (COB_BSWAP_16_CONSTANT (val))
#define COB_BSWAP_32(val)   (COB_BSWAP_32_CONSTANT (val))
#define COB_BSWAP_64(val)   (COB_BSWAP_64_CONSTANT (val))

Define Documentation

#define COB_BSWAP_16 (   val)    (COB_BSWAP_16_CONSTANT (val))

Definition at line 183 of file byteswap.h.

#define COB_BSWAP_16_CONSTANT (   val)
Value:
((unsigned short) (     \
    (unsigned short) ((unsigned short) (val) >> 8) |            \
    (unsigned short) ((unsigned short) (val) << 8)))

Definition at line 32 of file byteswap.h.

#define COB_BSWAP_32 (   val)    (COB_BSWAP_32_CONSTANT (val))

Definition at line 184 of file byteswap.h.

#define COB_BSWAP_32_CONSTANT (   val)
Value:
((unsigned int) (               \
    (((unsigned int) (val) & (unsigned int) 0x000000ffU) << 24) |       \
    (((unsigned int) (val) & (unsigned int) 0x0000ff00U) <<  8) |       \
    (((unsigned int) (val) & (unsigned int) 0x00ff0000U) >>  8) |       \
    (((unsigned int) (val) & (unsigned int) 0xff000000U) >> 24)))

Definition at line 36 of file byteswap.h.

#define COB_BSWAP_64 (   val)    (COB_BSWAP_64_CONSTANT (val))

Definition at line 185 of file byteswap.h.

#define COB_BSWAP_64_CONSTANT (   val)
Value:
((unsigned long long) ( \
    (((unsigned long long) (val) &                              \
      (unsigned long long) 0x00000000000000ffULL) << 56) |      \
    (((unsigned long long) (val) &                              \
      (unsigned long long) 0x000000000000ff00ULL) << 40) |      \
    (((unsigned long long) (val) &                              \
      (unsigned long long) 0x0000000000ff0000ULL) << 24) |      \
    (((unsigned long long) (val) &                              \
      (unsigned long long) 0x00000000ff000000ULL) <<  8) |      \
    (((unsigned long long) (val) &                              \
      (unsigned long long) 0x000000ff00000000ULL) >>  8) |      \
    (((unsigned long long) (val) &                              \
      (unsigned long long) 0x0000ff0000000000ULL) >> 24) |      \
    (((unsigned long long) (val) &                              \
      (unsigned long long) 0x00ff000000000000ULL) >> 40) |      \
    (((unsigned long long) (val) &                              \
      (unsigned long long) 0xff00000000000000ULL) >> 56)))

Definition at line 42 of file byteswap.h.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines