summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_util.c
diff options
context:
space:
mode:
authorLarry Knox <lrknox@hdfgroup.org>2017-07-06 19:16:57 (GMT)
committerLarry Knox <lrknox@hdfgroup.org>2017-07-06 19:16:57 (GMT)
commit23a702e7bad93fc4f14eab07678c75d276e2d0ad (patch)
treeafb57ddaeca17021342fa09b8999c15569630e71 /tools/lib/h5diff_util.c
parent03dbcb75918b2cbf39800d9edf5665d3471a1fee (diff)
parentc15238a38fdb3692466bc1218de4c5aeb420fdcc (diff)
downloadhdf5-23a702e7bad93fc4f14eab07678c75d276e2d0ad.zip
hdf5-23a702e7bad93fc4f14eab07678c75d276e2d0ad.tar.gz
hdf5-23a702e7bad93fc4f14eab07678c75d276e2d0ad.tar.bz2
Merge pull request #593 in HDFFV/hdf5 from hdf5_1_8_19 to 1.8/masterhdf5-1_8_19
* commit 'c15238a38fdb3692466bc1218de4c5aeb420fdcc': (153 commits) Commit changes to release version strings in README.txt and RELEASE.txt from release. Put back link targets for dynamically loaded libraries in Makefile.ams that avoid linking with libhdf5 dependencies. Some configurations failed unnecessarily to find and link with lz and lsz when these targets were removed. Update URL for obtaining source inINSTALL file. Disable building of libdynlib* dynamically loaded plugin test libraries on CYGWIN. Added known problem entry to RELEASE.txt. Set version for 1.8.19 release. Barbara updated contents of README.txt file. Moved libdynlib* plugin test libraries to noist_LT_LIBRARIES with added flag '-rpath /nowhere' to stop them being installed while keeping them from linking with libhdf5, etc. Incremented version to 1.8.19-pre1 and ran bin/release to create tar and zip files for testing. HDF5 1.8.19-pre1 released. Add RELEASE.txt entry for H5Dget_chunk_size. Remove test entries Ran bin/reconfigure after so number change. Update hl lib .so numbers: new function was added. Update RELEASE.txt: move H5DOread_chunks entry to new features, clarify entry for HDFFV-10051. Updated notes for test fixes and added bug fix for h5diff help text. Update h5vers and release scripts for 1.8.19 branch, set version to 1.8.19-pre1. Make script name consistent across product versions Update version to 1.8.19-pre1. Propagate .so number changes to Makefile.ins with bin/reconfigure. Add toolset option Update so version numbers according to the interface compatibility report. Update supported Platforms section. Remove empty sub-sections of New Features and Bugs Fixed sections. Add entries for HDFFV-10051 and HDFFV-9934 to RELEASE.txt. Correct spelling ...
Diffstat (limited to 'tools/lib/h5diff_util.c')
-rw-r--r--tools/lib/h5diff_util.c148
1 files changed, 77 insertions, 71 deletions
diff --git a/tools/lib/h5diff_util.c b/tools/lib/h5diff_util.c
index ab3e1ce..0c02779 100644
--- a/tools/lib/h5diff_util.c
+++ b/tools/lib/h5diff_util.c
@@ -5,12 +5,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic HDF5 document set and *
- * is linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
- * access to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "H5private.h"
@@ -35,19 +33,14 @@ print_dimensions (int rank, hsize_t *dims)
{
int i;
- if ( rank <= 0 )
- {
+ if( rank <= 0 )
parallel_print("H5S_SCALAR" );
- }
- else
- {
+ else {
if (!dims)
parallel_print("dimension is NULL");
- else
- {
+ else {
parallel_print("[");
- for ( i = 0; i < rank-1; i++)
- {
+ for ( i = 0; i < rank-1; i++) {
parallel_print(HSIZE_T_FORMAT, dims[i]);
parallel_print("x");
}
@@ -76,91 +69,108 @@ print_dimensions (int rank, hsize_t *dims)
*/
void print_type(hid_t type)
{
- switch (H5Tget_class(type))
- {
+ switch (H5Tget_class(type)) {
case H5T_INTEGER:
- if (H5Tequal(type, H5T_STD_I8BE)) {
+ if(H5Tequal(type, H5T_STD_I8BE))
parallel_print("H5T_STD_I8BE");
- } else if (H5Tequal(type, H5T_STD_I8LE)) {
+ else if(H5Tequal(type, H5T_STD_I8LE))
parallel_print("H5T_STD_I8LE");
- } else if (H5Tequal(type, H5T_STD_I16BE)) {
+ else if(H5Tequal(type, H5T_STD_I16BE))
parallel_print("H5T_STD_I16BE");
- } else if (H5Tequal(type, H5T_STD_I16LE)) {
+ else if(H5Tequal(type, H5T_STD_I16LE))
parallel_print("H5T_STD_I16LE");
- } else if (H5Tequal(type, H5T_STD_I32BE)) {
+ else if(H5Tequal(type, H5T_STD_I32BE))
parallel_print("H5T_STD_I32BE");
- } else if (H5Tequal(type, H5T_STD_I32LE)) {
+ else if(H5Tequal(type, H5T_STD_I32LE))
parallel_print("H5T_STD_I32LE");
- } else if (H5Tequal(type, H5T_STD_I64BE)) {
+ else if(H5Tequal(type, H5T_STD_I64BE))
parallel_print("H5T_STD_I64BE");
- } else if (H5Tequal(type, H5T_STD_I64LE)) {
+ else if(H5Tequal(type, H5T_STD_I64LE))
parallel_print("H5T_STD_I64LE");
- } else if (H5Tequal(type, H5T_STD_U8BE)) {
+ else if(H5Tequal(type, H5T_STD_U8BE))
parallel_print("H5T_STD_U8BE");
- } else if (H5Tequal(type, H5T_STD_U8LE)) {
+ else if(H5Tequal(type, H5T_STD_U8LE))
parallel_print("H5T_STD_U8LE");
- } else if (H5Tequal(type, H5T_STD_U16BE)) {
+ else if(H5Tequal(type, H5T_STD_U16BE))
parallel_print("H5T_STD_U16BE");
- } else if (H5Tequal(type, H5T_STD_U16LE)) {
+ else if(H5Tequal(type, H5T_STD_U16LE))
parallel_print("H5T_STD_U16LE");
- } else if (H5Tequal(type, H5T_STD_U32BE)) {
+ else if(H5Tequal(type, H5T_STD_U32BE))
parallel_print("H5T_STD_U32BE");
- } else if (H5Tequal(type, H5T_STD_U32LE)) {
+ else if(H5Tequal(type, H5T_STD_U32LE))
parallel_print("H5T_STD_U32LE");
- } else if (H5Tequal(type, H5T_STD_U64BE)) {
+ else if(H5Tequal(type, H5T_STD_U64BE))
parallel_print("H5T_STD_U64BE");
- } else if (H5Tequal(type, H5T_STD_U64LE)) {
+ else if(H5Tequal(type, H5T_STD_U64LE))
parallel_print("H5T_STD_U64LE");
- } else if (H5Tequal(type, H5T_NATIVE_SCHAR)) {
+ else if(H5Tequal(type, H5T_NATIVE_SCHAR))
parallel_print("H5T_NATIVE_SCHAR");
- } else if (H5Tequal(type, H5T_NATIVE_UCHAR)) {
+ else if(H5Tequal(type, H5T_NATIVE_UCHAR))
parallel_print("H5T_NATIVE_UCHAR");
- } else if (H5Tequal(type, H5T_NATIVE_SHORT)) {
+ else if(H5Tequal(type, H5T_NATIVE_SHORT))
parallel_print("H5T_NATIVE_SHORT");
- } else if (H5Tequal(type, H5T_NATIVE_USHORT)) {
+ else if(H5Tequal(type, H5T_NATIVE_USHORT))
parallel_print("H5T_NATIVE_USHORT");
- } else if (H5Tequal(type, H5T_NATIVE_INT)) {
+ else if(H5Tequal(type, H5T_NATIVE_INT))
parallel_print("H5T_NATIVE_INT");
- } else if (H5Tequal(type, H5T_NATIVE_UINT)) {
+ else if(H5Tequal(type, H5T_NATIVE_UINT))
parallel_print("H5T_NATIVE_UINT");
- } else if (H5Tequal(type, H5T_NATIVE_LONG)) {
+ else if(H5Tequal(type, H5T_NATIVE_LONG))
parallel_print("H5T_NATIVE_LONG");
- } else if (H5Tequal(type, H5T_NATIVE_ULONG)) {
+ else if(H5Tequal(type, H5T_NATIVE_ULONG))
parallel_print("H5T_NATIVE_ULONG");
- } else if (H5Tequal(type, H5T_NATIVE_LLONG)) {
+ else if(H5Tequal(type, H5T_NATIVE_LLONG))
parallel_print("H5T_NATIVE_LLONG");
- } else if (H5Tequal(type, H5T_NATIVE_ULLONG)) {
+ else if(H5Tequal(type, H5T_NATIVE_ULLONG))
parallel_print("H5T_NATIVE_ULLONG");
- } else {
+ else
parallel_print("undefined integer");
- }
break;
case H5T_FLOAT:
- if (H5Tequal(type, H5T_IEEE_F32BE)) {
+ if(H5Tequal(type, H5T_IEEE_F32BE))
parallel_print("H5T_IEEE_F32BE");
- } else if (H5Tequal(type, H5T_IEEE_F32LE)) {
+ else if(H5Tequal(type, H5T_IEEE_F32LE))
parallel_print("H5T_IEEE_F32LE");
- } else if (H5Tequal(type, H5T_IEEE_F64BE)) {
+ else if(H5Tequal(type, H5T_IEEE_F64BE))
parallel_print("H5T_IEEE_F64BE");
- } else if (H5Tequal(type, H5T_IEEE_F64LE)) {
+ else if(H5Tequal(type, H5T_IEEE_F64LE))
parallel_print("H5T_IEEE_F64LE");
- } else if (H5Tequal(type, H5T_NATIVE_FLOAT)) {
+ else if(H5Tequal(type, H5T_NATIVE_FLOAT))
parallel_print("H5T_NATIVE_FLOAT");
- } else if (H5Tequal(type, H5T_NATIVE_DOUBLE)) {
+ else if(H5Tequal(type, H5T_NATIVE_DOUBLE))
parallel_print("H5T_NATIVE_DOUBLE");
#if H5_SIZEOF_LONG_DOUBLE !=0
- } else if (H5Tequal(type, H5T_NATIVE_LDOUBLE)) {
+ else if(H5Tequal(type, H5T_NATIVE_LDOUBLE))
parallel_print("H5T_NATIVE_LDOUBLE");
#endif
- } else {
+ else
parallel_print("undefined float");
- }
+ break;
+
+ case H5T_BITFIELD:
+ if(H5Tequal(type, H5T_STD_B8BE))
+ parallel_print("H5T_STD_B8BE");
+ else if(H5Tequal(type, H5T_STD_B8LE))
+ parallel_print("H5T_STD_B8LE");
+ else if(H5Tequal(type, H5T_STD_B16BE))
+ parallel_print("H5T_STD_B16BE");
+ else if(H5Tequal(type, H5T_STD_B16LE))
+ parallel_print("H5T_STD_B16LE");
+ else if(H5Tequal(type, H5T_STD_B32BE))
+ parallel_print("H5T_STD_B32BE");
+ else if(H5Tequal(type, H5T_STD_B32LE))
+ parallel_print("H5T_STD_B32LE");
+ else if(H5Tequal(type, H5T_STD_B64BE))
+ parallel_print("H5T_STD_B64BE");
+ else if(H5Tequal(type, H5T_STD_B64LE))
+ parallel_print("H5T_STD_B64LE");
+ else
+ parallel_print("undefined bitfield");
break;
case H5T_TIME:
case H5T_STRING:
- case H5T_BITFIELD:
case H5T_OPAQUE:
case H5T_COMPOUND:
case H5T_REFERENCE:
@@ -191,16 +201,16 @@ diff_basename(const char *name)
{
size_t i;
- if (name == NULL)
+ if(name == NULL)
return NULL;
/* Find the end of the base name */
i = HDstrlen(name);
- while (i > 0 && '/' == name[i - 1])
+ while(i > 0 && '/' == name[i - 1])
--i;
/* Skip backward over base name */
- while (i > 0 && '/' != name[i - 1])
+ while(i > 0 && '/' != name[i - 1])
--i;
return(name+i);
@@ -258,7 +268,7 @@ get_type(h5trav_type_t type)
const char*
get_sign(H5T_sign_t sign)
{
- switch (sign)
+ switch(sign)
{
case H5T_SGN_NONE:
return "H5T_SGN_NONE";
@@ -293,7 +303,7 @@ get_sign(H5T_sign_t sign)
const char*
get_class(H5T_class_t tclass)
{
- switch (tclass) {
+ switch(tclass) {
case H5T_TIME:
return("H5T_TIME");
@@ -353,24 +363,21 @@ void print_found(hsize_t nfound)
/*-----------------------------------------------------------------
* Function: match_up_memsize
- *
+ *
* Purpose: match smaller memory size up to bigger memory size
*------------------------------------------------------------------
*/
herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id,
- hid_t *m_tid1, hid_t *m_tid2,
+ hid_t *m_tid1, hid_t *m_tid2,
size_t *m_size1, size_t *m_size2)
{
herr_t ret = SUCCEED;
- if( (*m_size1) != (*m_size2) )
- {
- if( (*m_size1) < (*m_size2) )
- {
+ if((*m_size1) != (*m_size2)) {
+ if((*m_size1) < (*m_size2)) {
H5Tclose( *m_tid1 );
- if(( (*m_tid1) = h5tools_get_native_type(f_tid2_id)) < 0)
- {
+ if(((*m_tid1) = H5Tget_native_type(f_tid2_id, H5T_DIR_DEFAULT)) < 0) {
ret = FAIL;
goto out;
}
@@ -380,8 +387,7 @@ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id,
else {
H5Tclose(*m_tid2);
- if(( (*m_tid2) = h5tools_get_native_type(f_tid1_id)) < 0)
- {
+ if(((*m_tid2) = H5Tget_native_type(f_tid1_id, H5T_DIR_DEFAULT)) < 0) {
ret = FAIL;
goto out;
}
@@ -389,7 +395,7 @@ herr_t match_up_memsize (hid_t f_tid1_id, hid_t f_tid2_id,
*m_size2 = H5Tget_size(*m_tid2);
} /* end else */
} /* end if */
- HDassert( (*m_size1) == (*m_size2) );
+ HDassert((*m_size1) == (*m_size2));
out:
return ret;