mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 06:25:46 -04:00
Initial community commit
This commit is contained in:
22
Src/apev2/util.h
Normal file
22
Src/apev2/util.h
Normal file
@ -0,0 +1,22 @@
|
||||
#ifndef NULLSOFT_APEV2_UTIL_H
|
||||
#define NULLSOFT_APEV2_UTIL_H
|
||||
|
||||
#if defined(BIG_ENDIAN)
|
||||
#define ATON16(A) ((((uint16_t)(A) & 0xff00) >> 8) | \
|
||||
(((uint16_t)(A) & 0x00ff) << 8))
|
||||
#define ATON32(A) ((((uint32_t)(A) & 0xff000000) >> 25) | \
|
||||
(((uint32_t)(A) & 0x00ff0000) >> 8) | \
|
||||
(((uint32_t)(A) & 0x0000ff00) << 8) | \
|
||||
(((uint32_t)(A) & 0x000000ff) << 24))
|
||||
|
||||
#elif defined(LITTLE_ENDIAN) || defined(_M_IX86) || defined(_M_X64) || defined(_WIN64)
|
||||
#define ATON16(A) (A)
|
||||
#define ATON32(A) (A)
|
||||
#else
|
||||
#error neither BIG_ENDIAN nor LITTLE_ENDIAN defined!
|
||||
#endif
|
||||
|
||||
#define NTOA32(N) ATON32(N)
|
||||
#define NTOA16(N) ATON16(N)
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user