summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_attr.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-10-06 16:11:18 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-10-06 16:11:18 (GMT)
commitdefe612ab21a22b9d54e19fa332d45f8489a6da5 (patch)
treed142a0ce72e5f80a3cba336542e5cadc96458a8c /tools/lib/h5diff_attr.c
parent5d9f7ebd4c1fb7a008aaa5190fa212dbca5c711c (diff)
downloadhdf5-defe612ab21a22b9d54e19fa332d45f8489a6da5.zip
hdf5-defe612ab21a22b9d54e19fa332d45f8489a6da5.tar.gz
hdf5-defe612ab21a22b9d54e19fa332d45f8489a6da5.tar.bz2
[svn-r9370] Purpose:
Refactor code Description: Refactor common code for determining the native type for using in the tools into separate routine. Also, reduce diffs between the two branches and bring back some fixes from the development branch to the release branch. Platforms tested: FreeBSD 4.10 (sleipnir) too minor to require h5committest
Diffstat (limited to 'tools/lib/h5diff_attr.c')
-rw-r--r--tools/lib/h5diff_attr.c24
1 files changed, 5 insertions, 19 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 3278bdb..fb4343f 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -12,6 +12,7 @@
* access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+#include "h5tools.h"
#include "h5diff.h"
#include "H5private.h"
@@ -66,7 +67,6 @@ int diff_attr(hid_t loc1_id,
int ret=0;
hsize_t nfound;
int cmp=1;
- H5T_class_t type_class; /* Datatype class */
if ((n1 = H5Aget_num_attrs(loc1_id))<0)
goto error;
@@ -162,25 +162,11 @@ int diff_attr(hid_t loc1_id,
for (j=0; j<rank1; j++)
nelmts1*=dims1[j];
- if((type_class = H5Tget_class(ftype1_id))<0)
- goto error;
- if(type_class==H5T_BITFIELD) {
- if((mtype1_id=H5Tcopy(ftype1_id))<0)
- goto error;
- } else {
- if ((mtype1_id=H5Tget_native_type(ftype1_id,H5T_DIR_DEFAULT))<0)
- goto error;
- }
+ if ((mtype1_id=h5tools_get_native_type(ftype1_id))<0)
+ goto error;
- if((type_class = H5Tget_class(ftype2_id))<0)
- goto error;
- if(type_class==H5T_BITFIELD) {
- if((mtype2_id=H5Tcopy(ftype2_id))<0)
- goto error;
- } else {
- if ((mtype2_id=H5Tget_native_type(ftype2_id,H5T_DIR_DEFAULT))<0)
- goto error;
- }
+ if ((mtype2_id=h5tools_get_native_type(ftype2_id))<0)
+ goto error;
if ((msize1=H5Tget_size(mtype1_id))==0)
goto error;