aboutsummaryrefslogtreecommitdiff
path: root/src/iemlib.h
diff options
context:
space:
mode:
authormusil <tmusil@users.sourceforge.net>2009-02-01 05:25:21 +0000
committermusil <tmusil@users.sourceforge.net>2009-02-01 05:25:21 +0000
commitbb04075ca94cfbb8391e3bbb0e693d2ebd079e95 (patch)
tree32f4367b8587b533724b2b04c2060d815415efa1 /src/iemlib.h
parent0c2bbab79dd04ed75310ae10358b613c20179fc5 (diff)
changed for 64 bit array access
svn path=/trunk/externals/iem/iem_tab/; revision=10706
Diffstat (limited to 'src/iemlib.h')
-rw-r--r--src/iemlib.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/iemlib.h b/src/iemlib.h
index 973bfeb..97b088b 100644
--- a/src/iemlib.h
+++ b/src/iemlib.h
@@ -1,7 +1,7 @@
/* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution.
-iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2007 */
+iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2009 */
#ifndef __IEMLIB_H__
#define __IEMLIB_H__
@@ -99,4 +99,18 @@ union tabfudge_f
#endif
+/* on 64bit systems we cannot use garray_getfloatarray... */
+#if (defined __x86_64__)
+# define iemarray_t t_word
+# define iemarray_getarray garray_getfloatwords
+# define iemarray_getfloat(pointer, index) (pointer[index].w_float)
+# define iemarray_setfloat(pointer, index, fvalue) (pointer[index].w_float = fvalue)
+#else
+# define iemarray_t t_float
+# define iemarray_getarray garray_getfloatarray
+# define iemarray_getfloat(pointer, index) (pointer[index])
+# define iemarray_setfloat(pointer, index, fvalue) (pointer[index] = fvalue)
+#endif
+
+
#endif