summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2009-09-14 20:39:28 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2009-09-14 20:39:28 (GMT)
commitb9c80f7b7bc395cfc564426b960f39ce3bf21847 (patch)
tree0bacadd21afb96717cab16a707a2b48e888c69d7
parent43db8230440604cac42af68264465c8a24605647 (diff)
downloadhdf5-b9c80f7b7bc395cfc564426b960f39ce3bf21847.zip
hdf5-b9c80f7b7bc395cfc564426b960f39ce3bf21847.tar.gz
hdf5-b9c80f7b7bc395cfc564426b960f39ce3bf21847.tar.bz2
[svn-r17476] Update test file that was refactored.
-rw-r--r--tools/misc/talign.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/tools/misc/talign.c b/tools/misc/talign.c
index 6c1bd81..24420bf 100644
--- a/tools/misc/talign.c
+++ b/tools/misc/talign.c
@@ -23,7 +23,6 @@
#include "hdf5.h"
#include "H5private.h"
-#include "h5tools.h"
const char *fname = "talign.h5";
const char *setname = "align";
@@ -189,3 +188,35 @@ int main(void)
return result;
}
+/*-------------------------------------------------------------------------
+ * Function: h5tools_get_native_type
+ *
+ * Purpose: Wrapper around H5Tget_native_type() to work around
+ * Problems with bitfields.
+ *
+ * Return: Success: datatype ID
+ *
+ * Failure: FAIL
+ *
+ * Programmer: Quincey Koziol
+ * Tuesday, October 5, 2004
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+h5tools_get_native_type(hid_t type)
+{
+ hid_t p_type;
+ H5T_class_t type_class;
+
+ type_class = H5Tget_class(type);
+ if(type_class==H5T_BITFIELD)
+ p_type=H5Tcopy(type);
+ else
+ p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
+
+ return(p_type);
+}
+