summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_dump.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5tools_dump.c')
-rw-r--r--tools/lib/h5tools_dump.c87
1 files changed, 42 insertions, 45 deletions
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index 190325f..cb4f9d2 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -465,7 +465,7 @@ done:
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -522,7 +522,7 @@ h5tools_print_region_data_blocks(hid_t region_id, FILE *stream, const h5tool_for
HDmemset(&ctx, 0, sizeof(ctx));
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((type_size = H5Tget_size(type_id)) == 0)
H5TOOLS_THROW(FAIL, "H5Tget_size failed");
@@ -642,7 +642,7 @@ done:
if (H5Sclose(sid1) < 0)
H5TOOLS_ERROR(FAIL, "H5Sclose failed");
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -696,7 +696,7 @@ h5tools_dump_region_data_blocks(hid_t region_space, hid_t region_id, FILE *strea
HDassert(ctx);
HDassert(buffer);
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
outputformat = *info;
outputformat.idx_fmt = "";
outputformat.idx_n_fmt = "";
@@ -865,7 +865,7 @@ done:
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -915,7 +915,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, FILE *stre
HDassert(ptdata);
HDassert(ndims > 0);
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
HDmemset(&ctx, 0, sizeof(ctx));
/* Allocate space for the dimension array */
@@ -1001,7 +1001,7 @@ done:
if (H5Sclose(mem_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1053,7 +1053,7 @@ h5tools_dump_region_data_points(hid_t region_space, hid_t region_id, FILE *strea
HDassert(ctx);
HDassert(buffer);
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
outputformat = *info;
outputformat.idx_fmt = "";
outputformat.idx_n_fmt = "";
@@ -1217,7 +1217,7 @@ done:
H5_LEAVE(dimension_break)
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1284,7 +1284,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
unsigned int vl_data = 0; /* contains VL datatypes */
herr_t ret_value = SUCCEED;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((size_t)ctx->ndims > NELMTS(sm_size))
H5TOOLS_THROW(FAIL, "ndims and sm_size comparision failed");
@@ -1398,7 +1398,7 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
if (sm_buf)
HDfree(sm_buf);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1583,7 +1583,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co
hbool_t past_catch = FALSE;
herr_t ret_value = SUCCEED;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((f_space = H5Dget_space(dset)) < 0)
H5TOOLS_THROW(FAIL, "H5Dget_space failed");
@@ -1607,7 +1607,7 @@ h5tools_dump_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_co
if (f_space >= 0 && H5Sclose(f_space) < 0)
H5TOOLS_THROW(FAIL, "H5Sclose failed");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1660,7 +1660,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont
unsigned int vl_data = 0; /* contains VL datatypes */
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if (H5I_INVALID_HID == (f_space = H5Dget_space(dset)))
H5TOOLS_GOTO_ERROR((-1), "H5Dget_space failed");
@@ -1795,7 +1795,7 @@ done:
if (f_space >= 0 && H5Sclose(f_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1826,7 +1826,7 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte
/* VL data special information */
unsigned int vl_data = 0; /* contains VL datatypes */
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if (H5I_INVALID_HID == (f_space = H5Aget_space(attr_id)))
H5TOOLS_GOTO_ERROR((-1), "H5Dget_space failed");
@@ -1885,7 +1885,7 @@ done:
if (f_space >= 0 && H5Sclose(f_space) < 0)
H5TOOLS_ERROR((-1), "H5Sclose failed");
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1917,7 +1917,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
h5tool_format_t info_dflt;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/* Use default values */
if (!stream)
stream = rawoutstream;
@@ -1969,7 +1969,7 @@ done:
if (f_space > 0)
H5Sclose(f_space);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -1993,7 +1993,7 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c
h5tool_format_t info_dflt;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
/* Use default values */
if (!stream)
stream = rawoutstream;
@@ -2039,7 +2039,7 @@ done:
if (f_space > 0)
H5Sclose(f_space);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -2082,7 +2082,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
const char *order_s = NULL; /* byte order string */
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((type_class = H5Tget_class(type)) < 0)
H5TOOLS_THROW((-1), "H5Tget_class failed");
if (object_search && H5Tcommitted(type) > 0) {
@@ -2197,9 +2197,10 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
else
sign_s = " unknown-sign";
- /* print size, order, and sign */
- h5tools_str_append(buffer, "%lu-bit%s%s integer", (unsigned long)(8 * H5Tget_size(type)),
- order_s, sign_s);
+ /* print size, order, sign, and precision */
+ h5tools_str_append(buffer, "%lu-bit%s%s integer %lu-bit precision",
+ (unsigned long)(8 * H5Tget_size(type)), order_s, sign_s,
+ H5Tget_precision(type));
}
break;
@@ -2220,10 +2221,6 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
h5tools_str_append(buffer, "H5T_NATIVE_FLOAT");
else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE)
h5tools_str_append(buffer, "H5T_NATIVE_DOUBLE");
-#if H5_SIZEOF_LONG_DOUBLE != 0
- else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE)
- h5tools_str_append(buffer, "H5T_NATIVE_LDOUBLE");
-#endif
else {
/* print what the library knows */
/* byte order */
@@ -2241,9 +2238,9 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
else
order_s = "";
- /* print size and byte order */
- h5tools_str_append(buffer, "%lu-bit%s floating-point", (unsigned long)(8 * H5Tget_size(type)),
- order_s);
+ /* print size. byte order, and precision */
+ h5tools_str_append(buffer, "%lu-bit%s floating-point %lu-bit precision",
+ (unsigned long)(8 * H5Tget_size(type)), order_s, H5Tget_precision(type));
}
break;
@@ -2644,7 +2641,7 @@ found_string_type:
}
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -2670,7 +2667,7 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space)
int i;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if ((ndims = H5Sget_simple_extent_dims(space, size, maxsize)) < 0)
H5TOOLS_THROW((-1), "H5Sget_simple_extent_dims failed");
@@ -2724,7 +2721,7 @@ h5tools_print_dataspace(h5tools_str_t *buffer, hid_t space)
} /* end switch */
CATCH
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -2759,7 +2756,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
hbool_t past_catch = FALSE;
int ret_value = 0;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
if (info->line_ncols > 0)
ncols = info->line_ncols;
@@ -2871,7 +2868,7 @@ h5tools_print_enum(FILE *stream, h5tools_str_t *buffer, const h5tool_format_t *i
if (0 == nmembs)
h5tools_str_append(buffer, "\n<empty>");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return ret_value;
}
@@ -3301,8 +3298,8 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
(hsize_t)0);
}
else {
- haddr_t ioffset;
- hbool_t supported = FALSE;
+ haddr_t ioffset;
+ uint64_t supported = 0;
/* NORMAL FILE */
@@ -3325,7 +3322,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info, h5tools_context_t *
*/
H5VLquery_optional(dset_id, H5VL_SUBCLS_DATASET, H5VL_NATIVE_DATASET_GET_OFFSET, &supported);
- if (supported) {
+ if (supported & H5VL_OPT_QUERY_SUPPORTED) {
ctx->need_prefix = TRUE;
@@ -3780,12 +3777,12 @@ h5tools_dump_comment(FILE *stream, const h5tool_format_t *info, h5tools_context_
* instead of the current stripmine position i; this is necessary
* to print the array indices
*/
- hbool_t supported = FALSE;
+ uint64_t supported = 0;
/* Check if comments are supported and return if not */
H5VLquery_optional(obj_id, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_GET_COMMENT, &supported);
- if (!supported)
+ if (!(supported & H5VL_OPT_QUERY_SUPPORTED))
return;
/* setup */
@@ -4072,7 +4069,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_str_t buffer; /* string into which to render */
h5tools_context_t datactx; /* print context */
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
datactx = *ctx; /* print context */
/* Assume entire data space to be printed */
@@ -4279,7 +4276,7 @@ h5tools_dump_reference(FILE *stream, const h5tool_format_t *info, h5tools_contex
h5tools_str_close(&buffer);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -4496,5 +4493,5 @@ done:
}
h5tools_str_close(&buffer);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}