diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-08 19:59:36 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2007-10-08 19:59:36 (GMT) |
commit | 16683943c6edb42f9129cc5d6c8f340c74014dad (patch) | |
tree | d1ed13b0b7677e56d4253b4fe5e0640f851e27ca /tools/lib/h5diff_dset.c | |
parent | d3ee3988b68292524b3a893b9db55c074f4b9e87 (diff) | |
download | hdf5-16683943c6edb42f9129cc5d6c8f340c74014dad.zip hdf5-16683943c6edb42f9129cc5d6c8f340c74014dad.tar.gz hdf5-16683943c6edb42f9129cc5d6c8f340c74014dad.tar.bz2 |
[svn-r14193] Description:
Make H5Dopen versioned and change all internal usage to use H5Dopen2
Add simple regression test for H5Dopen1
Tested on:
FreeBSD/32 6.2 (duty) in debug mode
FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'tools/lib/h5diff_dset.c')
-rw-r--r-- | tools/lib/h5diff_dset.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c index d3a7078..ea833db 100644 --- a/tools/lib/h5diff_dset.c +++ b/tools/lib/h5diff_dset.c @@ -65,11 +65,11 @@ hsize_t diff_dataset( hid_t file1_id, const char *obj2_name, diff_opt_t *options) { - hid_t did1=-1; - hid_t did2=-1; - hid_t dcpl1=-1; - hid_t dcpl2=-1; - hsize_t nfound=0; + hid_t did1 = -1; + hid_t did2 = -1; + hid_t dcpl1 = -1; + hid_t dcpl2 = -1; + hsize_t nfound = 0; /*------------------------------------------------------------------------- * open the handles @@ -78,23 +78,21 @@ hsize_t diff_dataset( hid_t file1_id, /* disable error reporting */ H5E_BEGIN_TRY { /* Open the datasets */ - if ( (did1 = H5Dopen(file1_id,obj1_name)) < 0 ) - { - printf("Cannot open dataset <%s>\n", obj1_name ); + if((did1 = H5Dopen2(file1_id, obj1_name, H5P_DEFAULT)) < 0) { + printf("Cannot open dataset <%s>\n", obj1_name); goto error; } - if ( (did2 = H5Dopen(file2_id,obj2_name)) < 0 ) - { - printf("Cannot open dataset <%s>\n", obj2_name ); + if((did2 = H5Dopen2(file2_id, obj2_name, H5P_DEFAULT)) < 0) { + printf("Cannot open dataset <%s>\n", obj2_name); goto error; } /* enable error reporting */ } H5E_END_TRY; - if ((dcpl1=H5Dget_create_plist(did1))<0) + if((dcpl1 = H5Dget_create_plist(did1)) < 0) goto error; - if ((dcpl2=H5Dget_create_plist(did2))<0) + if((dcpl2 = H5Dget_create_plist(did2)) < 0) goto error; /*------------------------------------------------------------------------- @@ -315,10 +313,10 @@ hsize_t diff_datasetid( hid_t did1, * memory type and sizes *------------------------------------------------------------------------- */ - if ((m_tid1=h5tools_get_native_type(f_tid1))<0) + if ((m_tid1=h5tools_get_native_type(f_tid1)) < 0) goto error; - if ((m_tid2=h5tools_get_native_type(f_tid2))<0) + if ((m_tid2=h5tools_get_native_type(f_tid2)) < 0) goto error; m_size1 = H5Tget_size( m_tid1 ); @@ -378,7 +376,7 @@ hsize_t diff_datasetid( hid_t did1, { H5Tclose(m_tid1); - if ((m_tid1=h5tools_get_native_type(f_tid2))<0) + if ((m_tid1=h5tools_get_native_type(f_tid2)) < 0) goto error; m_size1 = H5Tget_size( m_tid1 ); @@ -387,7 +385,7 @@ hsize_t diff_datasetid( hid_t did1, { H5Tclose(m_tid2); - if ((m_tid2=h5tools_get_native_type(f_tid1))<0) + if ((m_tid2=h5tools_get_native_type(f_tid1)) < 0) goto error; m_size2 = H5Tget_size( m_tid2 ); @@ -495,11 +493,11 @@ hsize_t diff_datasetid( hid_t did1, hs_size[i] = MIN(dims1[i] - hs_offset[i], sm_size[i]); hs_nelmts *= hs_size[i]; } - if (H5Sselect_hyperslab(sid1, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL)<0) + if (H5Sselect_hyperslab(sid1, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) goto error; - if (H5Sselect_hyperslab(sid2, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL)<0) + if (H5Sselect_hyperslab(sid2, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0) goto error; - if (H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL)<0) + if (H5Sselect_hyperslab(sm_space, H5S_SELECT_SET, zero, NULL, &hs_nelmts, NULL) < 0) goto error; } else @@ -692,10 +690,10 @@ int diff_can_type( hid_t f_tid1, /* file data type */ *------------------------------------------------------------------------- */ - if ((tclass1=H5Tget_class(f_tid1))<0) + if ((tclass1=H5Tget_class(f_tid1)) < 0) return -1; - if ((tclass2=H5Tget_class(f_tid2))<0) + if ((tclass2=H5Tget_class(f_tid2)) < 0) return -1; if ( tclass1 != tclass2 ) |