ReactOS 0.4.15-dev-8408-g466a198
util.c
Go to the documentation of this file.
1
2
3#if !defined(_MSC_VER) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
4#include <stdlib.h>
5#include <intrin.h>
6
7void
8byteReverse(unsigned char *buf, unsigned longs)
9{
10 unsigned int t;
11
12 do
13 {
14#if 0
15 t = (unsigned int)((unsigned)buf[3] << 8 | buf[2]) << 16 |
16 ((unsigned)buf[1] << 8 | buf[0]);
17#else
18 t = _byteswap_ulong(*(unsigned int *)buf);
19#endif
20 *(unsigned int *)buf = t;
21 buf += 4;
22 } while (--longs);
23}
24
25#endif // !defined(_MSC_VER) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
26
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
GLdouble GLdouble t
Definition: gl.h:2047
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
_Check_return_ unsigned long __cdecl _byteswap_ulong(_In_ unsigned long)
#define byteReverse(buf, long)
Definition: util.h:5