Mercurial > hg > th-libs
comparison th_endian.h @ 10:a25f5d22483e
Updates.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 20 Apr 2009 00:01:43 +0300 |
parents | 8552edc844a7 |
children | 598609fb49b0 |
comparison
equal
deleted
inserted
replaced
9:62f8c657734d | 10:a25f5d22483e |
---|---|
19 #endif | 19 #endif |
20 | 20 |
21 | 21 |
22 /* Endianess swapping macros | 22 /* Endianess swapping macros |
23 */ | 23 */ |
24 #define TH_SWAP_16_LE_BE(value) ((uint16_t) ( \ | 24 #define TH_SWAP_16_LE_BE(value) ((uint16_t) ( \ |
25 (uint16_t) ((uint16_t) (value) >> 8) | \ | 25 (uint16_t) ((uint16_t) (value) >> 8) | \ |
26 (uint16_t) ((uint16_t) (value) << 8)) ) | 26 (uint16_t) ((uint16_t) (value) << 8)) ) |
27 | 27 |
28 | 28 |
29 #define TH_SWAP_32_LE_BE(value) ((uint32_t) ( \ | 29 #define TH_SWAP_32_LE_BE(value) ((uint32_t) ( \ |