From b9c80f7b7bc395cfc564426b960f39ce3bf21847 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 14 Sep 2009 15:39:28 -0500 Subject: [svn-r17476] Update test file that was refactored. --- tools/misc/talign.c | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) 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); +} + -- cgit v0.12