summaryrefslogtreecommitdiff
path: root/include/generic.h
diff options
context:
space:
mode:
authorpixel <pixel>2004-05-03 13:04:57 +0000
committerpixel <pixel>2004-05-03 13:04:57 +0000
commit07a9ac6cac63fbabf1aba79d949d52fc6782840a (patch)
tree662f3c40cf1d1da5027278a781f158d8f83c7eac /include/generic.h
parent10d0c8f54d7f614fa8705590c9f86698cc6cb7bf (diff)
tolittle and tobig functions added
Diffstat (limited to 'include/generic.h')
-rw-r--r--include/generic.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/generic.h b/include/generic.h
index 85f178b..6276662 100644
--- a/include/generic.h
+++ b/include/generic.h
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: generic.h,v 1.27 2004-03-01 07:41:47 pixel Exp $ */
+/* $Id: generic.h,v 1.28 2004-05-03 13:04:57 pixel Exp $ */
#ifndef __GENERIC_H__
#define __GENERIC_H__
@@ -111,6 +111,18 @@ typedef unsigned _int64 Uint64;
extern char verbosity;
char ** split(char * s, char t);
+#ifdef _WIN32
+#define tolittle(x) x
+static inline Uint32 tobig(Uint32 x) {
+ return (x >> 24) | ((x >> 8) & 0x0000ff00) | ((x << 8) & 0x00ff0000) | (x << 24);
+}
+#else
+#define tolittle(x) x
+static inline Uint32 tobig(Uint32 x) {
+ return (x >> 24) | ((x >> 8) & 0x0000ff00) | ((x << 8) & 0x00ff0000) | (x << 24);
+}
+#endif
+
#if defined __cplusplus
#ifndef MAX