From d552e97eae59408f210d7d7909b8b71811fbd930 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Wed, 4 Dec 2019 16:36:32 -0600 Subject: Update h5ls help and rework dump_mem routines for attrs --- tools/lib/h5tools.c | 4 +- tools/lib/h5tools_dump.c | 308 ++++++++++++++---------------- tools/lib/h5tools_dump.h | 3 +- tools/lib/h5tools_str.c | 4 +- tools/src/h5dump/h5dump.c | 2 + tools/src/h5dump/h5dump_xml.c | 42 +--- tools/src/h5ls/h5ls.c | 109 +++++------ tools/testfiles/help-1.ls | 9 +- tools/testfiles/help-2.ls | 9 +- tools/testfiles/help-3.ls | 9 +- tools/testfiles/tattrreg_be.ls | 17 +- tools/testfiles/tattrreg_le.ls | 17 +- tools/testfiles/textlinksrc-nodangle-1.ls | 9 +- tools/testfiles/tgroup-1.ls | 9 +- 14 files changed, 248 insertions(+), 303 deletions(-) diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c index 9c217dd..727e493 100644 --- a/tools/lib/h5tools.c +++ b/tools/lib/h5tools.c @@ -1521,7 +1521,7 @@ int render_bin_output_region_data_blocks(hid_t region_id, FILE *stream, hid_t container, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata) { - H5TOOLS_ERR_INIT(int, SUCCEED); + H5TOOLS_ERR_INIT(int, SUCCEED) hsize_t *dims1 = NULL; hsize_t *start = NULL; hsize_t *count = NULL; @@ -1687,7 +1687,7 @@ render_bin_output_region_data_points(hid_t region_space, hid_t region_id, FILE *stream, hid_t container, unsigned ndims, hid_t type_id, hsize_t npoints) { - H5TOOLS_ERR_INIT(int, SUCCEED); + H5TOOLS_ERR_INIT(int, SUCCEED) hsize_t *dims1 = NULL; size_t type_size; hid_t mem_space = -1; diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c index 8417b18..43fdf88 100644 --- a/tools/lib/h5tools_dump.c +++ b/tools/lib/h5tools_dump.c @@ -257,7 +257,7 @@ h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t contai h5tools_context_t *ctx, /* in,out */ unsigned flags, hsize_t nelmts, hid_t type, void *_mem) { - H5TOOLS_ERR_INIT(int, SUCCEED); + H5TOOLS_ERR_INIT(int, SUCCEED) unsigned char *mem = (unsigned char*) _mem; hsize_t i; /* element counter */ size_t size; /* size of each datum */ @@ -493,7 +493,7 @@ h5tools_print_region_data_blocks(hid_t region_id, h5tools_str_t *buffer, /* string into which to render */ size_t ncols, unsigned ndims, hid_t type_id, hsize_t nblocks, hsize_t *ptdata) { - H5TOOLS_ERR_INIT(int, SUCCEED); + H5TOOLS_ERR_INIT(int, SUCCEED) hbool_t dimension_break = TRUE; hsize_t *dims1 = NULL; hsize_t *start = NULL; @@ -888,7 +888,7 @@ h5tools_print_region_data_points(hid_t region_space, hid_t region_id, h5tools_str_t *buffer, size_t ncols, unsigned ndims, hid_t type_id, hsize_t npoints, hsize_t *ptdata) { - H5TOOLS_ERR_INIT(int, SUCCEED); + H5TOOLS_ERR_INIT(int, SUCCEED) hbool_t dimension_break = TRUE; hsize_t *dims1 = NULL; hsize_t elmtno; /* elemnt index */ @@ -1709,7 +1709,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont if (ctx->ndims > 0) { for (i = ctx->ndims; i > 0; --i) { hsize_t size = H5TOOLS_BUFSIZE / sm_nbytes; - if ( size == 0) /* datum size > H5TOOLS_BUFSIZE */ + if (size == 0) /* datum size > H5TOOLS_BUFSIZE */ size = 1; sm_size[i - 1] = MIN(total_size[i - 1], size); sm_nbytes *= sm_size[i - 1]; @@ -1788,7 +1788,7 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info, h5tools_cont } } else - H5TOOLS_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread failed"); + H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Dread failed"); ctx->continuation++; H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "stripmine read loop:%d complete", i); @@ -1817,17 +1817,27 @@ CATCH *------------------------------------------------------------------------- */ static int -h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t obj_id, - hid_t type, hid_t space, void *mem) +h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, + hid_t attr_id, hid_t p_type) { H5TOOLS_ERR_INIT(herr_t, SUCCEED) - int sndims; /* rank of dataspace */ - unsigned i; /*counters */ - hsize_t nelmts; /*total selected elmts */ + hid_t f_space = H5I_INVALID_HID; /* file data space */ + hsize_t alloc_size; + int sndims; /* rank of dataspace */ + unsigned i; /* counters */ + hsize_t total_size[H5S_MAX_RANK]; /* total size of dataset*/ + hsize_t p_nelmts; /* total selected elmts */ + unsigned char *buf = NULL; /* buffer for raw data */ + + /* VL data special information */ + unsigned int vl_data = 0; /* contains VL datatypes */ H5TOOLS_PUSH_STACK(); H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter"); - sndims = H5Sget_simple_extent_ndims(space); + if (FAIL == (f_space = H5Aget_space(attr_id))) + H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_space failed"); + + sndims = H5Sget_simple_extent_ndims(f_space); if(sndims < 0) H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Dget_simple_extent_ndims failed"); ctx->ndims = (unsigned)sndims; @@ -1837,30 +1847,54 @@ h5tools_dump_simple_mem(FILE *stream, const h5tool_format_t *info, h5tools_conte H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "ctx->ndims > NELMTS(ctx->p_min_idx) failed"); /* Assume entire data space to be printed */ - for (i = 0; i < ctx->ndims; i++) - ctx->p_min_idx[i] = 0; + if (ctx->ndims > 0) + for (i = 0; i < (size_t)ctx->ndims; i++) + ctx->p_min_idx[i] = 0; - H5Sget_simple_extent_dims(space, ctx->p_max_idx, NULL); + H5Sget_simple_extent_dims(f_space, total_size, NULL); - for (i = 0, nelmts = 1; ctx->ndims != 0 && i < ctx->ndims; i++) - nelmts *= ctx->p_max_idx[i] - ctx->p_min_idx[i]; + /* calculate the number of elements we're going to print */ + p_nelmts = 1; - if (nelmts == 0) - H5_LEAVE(SUCCEED); /* nothing to print */ if (ctx->ndims > 0) { - HDassert(ctx->p_max_idx[ctx->ndims - 1] == (hsize_t) ((int) ctx->p_max_idx[ctx->ndims - 1])); - ctx->size_last_dim = ctx->p_max_idx[ctx->ndims - 1]; + for (i = 0; i < ctx->ndims; i++) + p_nelmts *= total_size[i]; + ctx->size_last_dim = (total_size[ctx->ndims - 1]); } /* end if */ else ctx->size_last_dim = 0; - if (ctx->ndims > 0) - init_acc_pos(ctx, ctx->p_max_idx); - H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ctx->ndims:%d", ctx->ndims); + if (p_nelmts == 0) + H5_LEAVE(SUCCEED); /* nothing to print */ + + /* Check if we have VL data in the dataset's datatype */ + if (h5tools_detect_vlen(p_type) == TRUE) + vl_data = TRUE; - if(h5tools_dump_simple_data(stream, info, obj_id, ctx, START_OF_DATA | END_OF_DATA, nelmts, type, mem) < 0) - H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "h5tools_dump_simple_data failed"); + alloc_size = p_nelmts * H5Tget_size(p_type); + HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ + if (NULL != (buf = (unsigned char *)HDmalloc((size_t)alloc_size))) { + if (ctx->ndims > 0) + init_acc_pos(ctx, total_size); + H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "ctx->ndims:%d", ctx->ndims); + H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Read the data"); + /* Read the data */ + if (H5Aread(attr_id, p_type, buf) >= 0) { + if(h5tools_dump_simple_data(stream, info, attr_id, ctx, START_OF_DATA | END_OF_DATA, p_nelmts, p_type, buf) < 0) + H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "h5tools_dump_simple_data failed"); + + /* Reclaim any VL memory, if necessary */ + if (vl_data) + H5Treclaim(p_type, f_space, H5P_DEFAULT, buf); + } + else + H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Aread failed"); + HDfree(buf); + } /* if (NULL != (buf...)) */ +done: + if(f_space >= 0 && H5Sclose(f_space) < 0) + H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sclose failed"); CATCH H5TOOLS_ENDDEBUG(H5E_tools_min_dbg_id_g, "exit"); H5TOOLS_POP_STACK(); @@ -1888,11 +1922,11 @@ CATCH int h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t dset) { - hid_t f_space = -1; - hid_t p_type = -1; - hid_t f_type = -1; + H5TOOLS_ERR_INIT(int, SUCCEED) + hid_t f_space = H5I_INVALID_HID; + hid_t p_type = H5I_INVALID_HID; + hid_t f_type = H5I_INVALID_HID; H5S_class_t space_type; - int status = FAIL; h5tool_format_t info_dflt; /* Use default values */ if (!stream) @@ -1929,13 +1963,13 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t * /* Print the data */ if (space_type == H5S_SIMPLE || space_type == H5S_SCALAR) { if(!ctx->sset) - status = h5tools_dump_simple_dset(rawdatastream, info, ctx, dset, p_type); + ret_value = h5tools_dump_simple_dset(rawdatastream, info, ctx, dset, p_type); else - status = h5tools_dump_simple_subset(rawdatastream, info, ctx, dset, p_type); + ret_value = h5tools_dump_simple_subset(rawdatastream, info, ctx, dset, p_type); } else { /* space is H5S_NULL */ - status = SUCCEED; + ret_value = SUCCEED; } done: if (f_type > 0) @@ -1945,7 +1979,7 @@ done: if (f_space > 0) H5Sclose(f_space); - return status; + return ret_value; } /*------------------------------------------------------------------------- @@ -1960,10 +1994,12 @@ done: *------------------------------------------------------------------------- */ int -h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, - hid_t obj_id, hid_t type, hid_t space, void *mem) +h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t attr_id) { H5TOOLS_ERR_INIT(int, SUCCEED) + hid_t f_space = H5I_INVALID_HID; + hid_t p_type = H5I_INVALID_HID; + hid_t f_type = H5I_INVALID_HID; h5tool_format_t info_dflt; /* Use default values */ @@ -1975,13 +2011,42 @@ h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, h5tools_context_t *c info = &info_dflt; } + f_type = H5Aget_type(attr_id); + if (f_type < 0) + goto done; + + if (info->raw || bin_form == 1) + p_type = H5Tcopy(f_type); + else if (bin_form == 2) + p_type = h5tools_get_little_endian_type(f_type); + else if (bin_form == 3) + p_type = h5tools_get_big_endian_type(f_type); + else + p_type = H5Tget_native_type(f_type, H5T_DIR_DEFAULT); + + if (p_type < 0) + goto done; + /* Check the data space */ - if (H5Sis_simple(space) <= 0) - H5TOOLS_THROW(FAIL, H5E_tools_min_id_g, "H5Sis_simple failed") + f_space = H5Aget_space(attr_id); + if (f_space < 0) + goto done; - H5_LEAVE(h5tools_dump_simple_mem(rawattrstream, info, ctx, obj_id, type, space, mem)) + /* Check the data space */ + if (H5Sis_simple(f_space) <= 0) { + H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Sis_simple failed"); + } + else { + ret_value = h5tools_dump_simple_mem(rawattrstream, info, ctx, attr_id, p_type); + } +done: + if (f_type > 0) + H5Tclose(f_type); + if (p_type > 0) + H5Tclose(p_type); + if (f_space > 0) + H5Sclose(f_space); -CATCH return ret_value; } @@ -3901,22 +3966,17 @@ h5tools_dump_subsetting_header(FILE *stream, const h5tool_format_t *info, h5tool void h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx, hid_t obj_id, int obj_data) { - H5TOOLS_ERR_INIT(int, SUCCEED); + H5TOOLS_ERR_INIT(int, SUCCEED) H5S_class_t space_type; int ndims; size_t i; hid_t space = H5I_INVALID_HID; - hid_t p_type = H5I_INVALID_HID; hid_t f_type = H5I_INVALID_HID; hid_t new_obj_id = H5I_INVALID_HID; hid_t new_obj_sid = H5I_INVALID_HID; hsize_t total_size[H5S_MAX_RANK]; - hsize_t size[64]; - hsize_t alloc_size; - hsize_t nelmts = 1; hsize_t elmt_counter = 0; /*counts the # elements printed. */ int status = -1; - void *buf = NULL; hbool_t dimension_break; h5tools_str_t buffer; /* string into which to render */ hsize_t curr_pos = 0; /* total data element position */ @@ -4205,140 +4265,62 @@ h5tools_dump_data(FILE *stream, const h5tool_format_t *info, h5tools_context_t * } } else { + h5tools_context_t datactx = *ctx; /* print context */ H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print all the values"); + string_dataformat = *info; + if((datactx.display_char && H5Tget_size(f_type) == 1) && (H5Tget_class(f_type) == H5T_INTEGER)) { + H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print 1-byte integer data as an ASCII character string"); + /* + * Print 1-byte integer data as an ASCII character string + * instead of integers if the `-r' or `--string' command-line + * option was given. + * + * We don't want to modify the global dataformat, so make a + * copy of it instead. + */ + string_dataformat.idx_fmt = "\""; + datactx.indent_level++; + datactx.need_prefix = TRUE; + h5tools_simple_prefix(stream, &string_dataformat, &datactx, (hsize_t)0, 0); + + string_dataformat.line_multi_new = 1; + string_dataformat.str_repeat = 8; + string_dataformat.ascii = TRUE; + string_dataformat.elmt_suf1 = ""; + string_dataformat.elmt_suf2 = ""; + string_dataformat.line_suf = "\""; + } + else { + datactx.need_prefix = TRUE; + } /* Print all the values. */ if(obj_data) { - h5tools_context_t datactx = *ctx; /* print context */ - string_dataformat = *info; - - H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print all the dataset values file=%p", (void*)stream); - if((datactx.display_char && H5Tget_size(f_type) == 1) && (H5Tget_class(f_type) == H5T_INTEGER)) { - H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print 1-byte integer data as an ASCII character string"); - /* - * Print 1-byte integer data as an ASCII character string - * instead of integers if the `-r' or `--string' command-line - * option was given. - * - * We don't want to modify the global dataformat, so make a - * copy of it instead. - */ - string_dataformat.idx_fmt = "\""; - datactx.indent_level++; - datactx.need_prefix = TRUE; - h5tools_simple_prefix(stream, &string_dataformat, &datactx, (hsize_t)0, 0); - - string_dataformat.line_multi_new = 1; - string_dataformat.str_repeat = 8; - string_dataformat.ascii = TRUE; - string_dataformat.elmt_suf1 = ""; - string_dataformat.elmt_suf2 = ""; - string_dataformat.line_suf = "\""; - } - else { - datactx.need_prefix = TRUE; - } H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "h5tools_dump_dset"); status = h5tools_dump_dset(stream, &string_dataformat, &datactx, obj_id); - if((datactx.display_char && H5Tget_size(f_type) == 1) && (H5Tget_class(f_type) == H5T_INTEGER)) { - H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print 1-byte integer data as an ASCII character string eol=%s",string_dataformat.line_suf); - datactx.need_prefix = FALSE; - string_dataformat.arr_linebreak = 0; - string_dataformat.idx_fmt = ""; - string_dataformat.line_multi_new = 0; - string_dataformat.line_suf = ""; - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "\""); - h5tools_render_element(stream, &string_dataformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } } else { - H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print all the attribute values"); - - h5tools_context_t datactx = *ctx; /* print context */ /* need to call h5tools_dump_mem for the attribute data */ space_type = H5Sget_simple_extent_type(space); if(space_type == H5S_NULL || space_type == H5S_NO_CLASS) { status = SUCCEED; } else { - /* VL data special information */ - unsigned int vl_data = 0; /* contains VL datatypes */ - - p_type = H5Tget_native_type(f_type, H5T_DIR_DEFAULT); - - ndims = H5Sget_simple_extent_dims(space, size, NULL); - - /* Check if we have VL data in the dataset's datatype */ - if (h5tools_detect_vlen(p_type) == TRUE) - vl_data = TRUE; - - for (i = 0; i < ndims; i++) - nelmts *= size[i]; - - alloc_size = nelmts * MAX(H5Tget_size(f_type), H5Tget_size(p_type)); - HDassert(alloc_size == (hsize_t)((size_t)alloc_size)); /*check for overflow*/ - - if (alloc_size) { - buf = HDmalloc((size_t)alloc_size); - HDassert(buf); - - if (H5Aread(obj_id, p_type, buf) >= 0) { - string_dataformat = *info; - if (datactx.display_char && H5Tget_size(f_type) == 1 && H5Tget_class(f_type) == H5T_INTEGER) { - H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print 1-byte integer data as an ASCII character string"); - /* - * Print 1-byte integer data as an ASCII character string - * instead of integers if the `-r' or `--string' command-line - * option was given. - * - * We don't want to modify the global dataformat, so make a - * copy of it instead. - */ - string_dataformat.idx_fmt = "\""; - datactx.indent_level++; - datactx.need_prefix = TRUE; - h5tools_simple_prefix(stream, &string_dataformat, &datactx, (hsize_t)0, 0); - - string_dataformat.line_multi_new = 1; - string_dataformat.str_repeat = 8; - string_dataformat.ascii = TRUE; - string_dataformat.elmt_suf1 = ""; - string_dataformat.elmt_suf2 = ""; - string_dataformat.line_suf = "\""; - } - else - datactx.need_prefix = TRUE; - - H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "call h5tools_dump_mem"); - status = h5tools_dump_mem(stream, &string_dataformat, &datactx, obj_id, p_type, space, buf); - if (datactx.display_char && H5Tget_size(f_type) == 1 && H5Tget_class(f_type) == H5T_INTEGER) { - H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print 1-byte integer data as an ASCII character string eol=%s",string_dataformat.line_suf); - datactx.need_prefix = FALSE; - string_dataformat.arr_linebreak = 0; - string_dataformat.idx_fmt = ""; - string_dataformat.line_multi_new = 0; - string_dataformat.line_suf = ""; - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, "\""); - h5tools_render_element(stream, &string_dataformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); - } - } - else - H5TOOLS_ERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Aread failed"); - - /* Reclaim any VL memory, if necessary */ - if (vl_data) - H5Treclaim(p_type, space, H5P_DEFAULT, buf); - - HDfree(buf); - } - else { - status = SUCCEED; - } /* end if (alloc_size) */ - H5Tclose(p_type); + H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "call h5tools_dump_mem"); + status = h5tools_dump_mem(stream, &string_dataformat, &datactx, obj_id); } } + if (datactx.display_char && H5Tget_size(f_type) == 1 && H5Tget_class(f_type) == H5T_INTEGER) { + H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print 1-byte integer data as an ASCII character string eol=%s",string_dataformat.line_suf); + datactx.need_prefix = FALSE; + string_dataformat.arr_linebreak = 0; + string_dataformat.idx_fmt = ""; + string_dataformat.line_multi_new = 0; + string_dataformat.line_suf = ""; + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, "\""); + h5tools_render_element(stream, &string_dataformat, &datactx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0); + } H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Print all the values Complete"); if (status == FAIL) { diff --git a/tools/lib/h5tools_dump.h b/tools/lib/h5tools_dump.h index 5275565..2cd0bc1 100644 --- a/tools/lib/h5tools_dump.h +++ b/tools/lib/h5tools_dump.h @@ -39,8 +39,7 @@ H5TOOLS_DLL void h5tools_dump_init(void); H5TOOLS_DLL int h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, h5tools_context_t *ctx/*in,out*/, hid_t dset); H5TOOLS_DLL int h5tools_dump_mem(FILE *stream, const h5tool_format_t *info, - h5tools_context_t *ctx/*in,out*/, hid_t obj_id, - hid_t type, hid_t space, void *mem); + h5tools_context_t *ctx/*in,out*/, hid_t obj_id); H5TOOLS_DLL int h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t container, h5tools_context_t *ctx/*in,out*/, unsigned flags, hsize_t nelmts, hid_t type, void *_mem); diff --git a/tools/lib/h5tools_str.c b/tools/lib/h5tools_str.c index 23b7a0e..672e314 100644 --- a/tools/lib/h5tools_str.c +++ b/tools/lib/h5tools_str.c @@ -684,7 +684,7 @@ char * h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t *info, hid_t container, hid_t type, void *vp, h5tools_context_t *ctx) { - H5TOOLS_ERR_INIT(char*, NULL); + H5TOOLS_ERR_INIT(char*, NULL) size_t nsize, offset, size=0, nelmts, start; H5T_sign_t nsign; char *name = NULL; @@ -1357,7 +1357,7 @@ void h5tools_str_sprint_reference(h5tools_str_t *str, const h5tool_format_t *info, hid_t container, H5R_ref_t *ref_vp) { - H5TOOLS_ERR_INIT(int, SUCCEED); + H5TOOLS_ERR_INIT(int, SUCCEED) ssize_t buf_size, status; H5TOOLS_PUSH_STACK(); diff --git a/tools/src/h5dump/h5dump.c b/tools/src/h5dump/h5dump.c index 507a62f..0222c8b 100644 --- a/tools/src/h5dump/h5dump.c +++ b/tools/src/h5dump/h5dump.c @@ -1703,6 +1703,8 @@ main(int argc, const char *argv[]) /* To Do: clean up XML table */ + H5Eset_auto2(H5E_DEFAULT, func, edata); + leave(h5tools_getstatus()); done: diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index 0868467..b78cf00 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -1880,47 +1880,17 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t H5_ATTR_UNUSED *sset, status = xml_print_strs(obj_id, ATTRIBUTE_DATA); } else { /* all other data */ - /* VL data special information */ - unsigned int vl_data = 0; /* contains VL datatypes */ - - p_type = H5Tget_native_type(type, H5T_DIR_DEFAULT); - - /* Check if we have VL data in the dataset's datatype */ - if (h5tools_detect_vlen(p_type) == TRUE) - vl_data = TRUE; - - H5Tclose(type); - space = H5Aget_space(obj_id); if(space == H5S_NULL || space == H5S_NO_CLASS) { status = SUCCEED; } else { - ndims = H5Sget_simple_extent_dims(space, size, NULL); - - for (i = 0; i < ndims; i++) - nelmts *= size[i]; - - if((buf = HDmalloc((size_t)(nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type))))) == NULL) { - error_msg("unable to allocate buffer\n"); - h5tools_setstatus(EXIT_FAILURE); - status = FAIL; - } - else { - if (H5Aread(obj_id, p_type, buf) >= 0) { - h5tools_context_t datactx; - HDmemset(&datactx, 0, sizeof(datactx)); - datactx.need_prefix = TRUE; - datactx.indent_level = ctx.indent_level; - datactx.cur_column = ctx.cur_column; - status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id, p_type, space, buf); - } - /* Reclaim any VL memory, if necessary */ - if (vl_data) - H5Treclaim(p_type, space, H5P_DEFAULT, buf); - - HDfree(buf); - } + h5tools_context_t datactx; + HDmemset(&datactx, 0, sizeof(datactx)); + datactx.need_prefix = TRUE; + datactx.indent_level = ctx.indent_level; + datactx.cur_column = ctx.cur_column; + status = h5tools_dump_mem(rawoutstream, outputformat, &datactx, obj_id); } H5Tclose(p_type); H5Sclose(space); diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index 876b59e..416d5d2 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -132,7 +132,6 @@ static hbool_t no_dangling_link_g = FALSE; /* treat dangling link is error */ static hbool_t follow_elink_g = FALSE; /* follow external links */ static hbool_t grp_literal_g = FALSE; /* list group, not contents */ static hbool_t hexdump_g = FALSE; /* show data as raw hexadecimal */ -static hbool_t show_errors_g = FALSE; /* print HDF5 error messages */ static hbool_t simple_output_g = FALSE; /* make output more machine-readable */ static hbool_t show_file_name_g = FALSE; /* show file name for full names */ static hbool_t no_line_wrap_g = FALSE; /* show data content without line wrap */ @@ -193,7 +192,7 @@ usage (void) PRINTVALSTREAM(rawoutstream, " --no-dangling-links\n"); PRINTVALSTREAM(rawoutstream, " Must be used with --follow-symlinks option;\n"); PRINTVALSTREAM(rawoutstream, " otherwise, h5ls shows error message and returns an exit\n"); - PRINTVALSTREAM(rawoutstream, " code of 1. \n"); + PRINTVALSTREAM(rawoutstream, " code of 1.\n"); PRINTVALSTREAM(rawoutstream, " Check for any symbolic links (soft links or external links)\n"); PRINTVALSTREAM(rawoutstream, " that do not resolve to an existing object (dataset, group,\n"); PRINTVALSTREAM(rawoutstream, " or named datatype).\n"); @@ -228,11 +227,8 @@ usage (void) PRINTVALSTREAM(rawoutstream, " \"%%05d\" to open a file family.\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " Deprecated Options\n"); - PRINTVALSTREAM(rawoutstream, " The following options have been deprecated in HDF5. While they remain\n"); - PRINTVALSTREAM(rawoutstream, " available, they have been superseded as indicated and may be removed\n"); - PRINTVALSTREAM(rawoutstream, " from HDF5 in the future. Use the indicated replacement option in all\n"); - PRINTVALSTREAM(rawoutstream, " new work; where possible, existing scripts, et cetera, should also be\n"); - PRINTVALSTREAM(rawoutstream, " updated to use the replacement option.\n"); + PRINTVALSTREAM(rawoutstream, " The following options have been removed in HDF5 1.12. Use the indicated\n"); + PRINTVALSTREAM(rawoutstream, " replacement option in all work.\n"); PRINTVALSTREAM(rawoutstream, "\n"); PRINTVALSTREAM(rawoutstream, " -E or --external Follow external links.\n"); PRINTVALSTREAM(rawoutstream, " Replaced by --follow-symlinks.\n"); @@ -1530,6 +1526,7 @@ dump_dataset_values(hid_t dset) { H5TOOLS_ERR_INIT(herr_t, SUCCEED) hid_t f_type = H5I_INVALID_HID; + hid_t space = H5I_INVALID_HID; hid_t new_obj_id = H5I_INVALID_HID; hid_t new_obj_sid = H5I_INVALID_HID; hsize_t total_size[H5S_MAX_RANK]; @@ -1537,7 +1534,6 @@ dump_dataset_values(hid_t dset) hsize_t elmt_counter = 0; /*counts the # elements printed. */ int ndims; size_t i; - size_t size; char string_prefix[64]; static char fmt_double[16]; static char fmt_float[16]; @@ -1553,7 +1549,7 @@ dump_dataset_values(hid_t dset) H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "enter"); f_type = H5Dget_type(dset); - size = H5Tget_size(f_type); + space = H5Dget_space(dset); HDmemset(&ctx, 0, sizeof(ctx)); HDmemset(&buffer, 0, sizeof(h5tools_str_t)); @@ -1623,7 +1619,7 @@ dump_dataset_values(hid_t dset) * command line switch was given. */ outputformat.raw = TRUE; } - else if (string_g && 1 == size && H5T_INTEGER == H5Tget_class(f_type)) { + else if (string_g && H5Tget_size(f_type) == 1 && (H5Tget_class(f_type) == H5T_INTEGER)) { /* Print 1-byte integer data as an ASCI character string instead of * integers if the `-s' or `--string' command-line option was given. */ outputformat.ascii = TRUE; @@ -1640,11 +1636,12 @@ dump_dataset_values(hid_t dset) /* Print all the values. */ h5tools_str_reset(&buffer); h5tools_str_append(&buffer, " Data:\n"); + h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); + ctx.need_prefix = TRUE; ctx.cur_column = (size_t)curr_pos; if (H5Tget_class(f_type) == H5T_REFERENCE) { - hid_t space = H5Dget_space(dset); H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "reference class type"); if (!H5Tequal(f_type, H5T_STD_REF) && !H5Tequal(f_type, H5T_STD_REF_DSETREG) && !H5Tequal(f_type, H5T_STD_REF_OBJ)) { HGOTO_DONE(SUCCEED); @@ -1659,13 +1656,12 @@ dump_dataset_values(hid_t dset) ctx.p_min_idx[i] = 0; H5Sget_simple_extent_dims(space, total_size, NULL); - H5Sclose(space); if (ctx.ndims > 0) init_acc_pos(&ctx, total_size); ctx.need_prefix = TRUE; if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), ndims))) { - H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread reference read"); + H5TOOLS_DEBUG(H5E_tools_min_id_g, "H5Dread reference read"); if(H5Dread(dset, H5T_STD_REF, H5S_ALL, H5S_ALL, H5P_DEFAULT, ref_buf) < 0) { HDfree(ref_buf); H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dread reference failed"); @@ -1682,6 +1678,7 @@ dump_dataset_values(hid_t dset) } } done: + H5Sclose(space); H5Tclose(f_type); h5tools_str_close(&buffer); @@ -1843,10 +1840,11 @@ dump_attribute_values(hid_t attr, const char *attr_name) H5Sget_simple_extent_dims(space, total_size, NULL); if (ctx.ndims > 0) init_acc_pos(&ctx, total_size); + ctx.need_prefix = TRUE; if (NULL != (ref_buf = (H5R_ref_t *)HDcalloc(MAX(sizeof(unsigned), sizeof(H5R_ref_t)), ndims))) { - H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Attribute reference read"); - if(H5Aread(attr, H5T_STD_REF, ref_buf) >= 0) { + H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "H5Aread reference read"); + if(H5Aread(attr, H5T_STD_REF, ref_buf) < 0) { HDfree(ref_buf); H5TOOLS_GOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Aread reference failed"); } @@ -1858,40 +1856,13 @@ dump_attribute_values(hid_t attr, const char *attr_name) } else { H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Attribute data read"); - if (hexdump_g) - p_type = H5Tcopy(f_type); - else - p_type = H5Tget_native_type(f_type, H5T_DIR_DEFAULT); - - if (p_type >= 0) { - /* VL data special information */ - unsigned int vl_data = 0; /* contains VL datatypes */ - - /* Check if we have VL data in the dataset's datatype */ - if (h5tools_detect_vlen(p_type) == TRUE) - vl_data = TRUE; - - temp_need = nelmts * MAX(H5Tget_size(f_type), H5Tget_size(p_type)); - need = (size_t)temp_need; - if((buf = HDmalloc(need)) != NULL) { - if(H5Aread(attr, p_type, buf) >= 0) { - ctx.indent_level++; - if (h5tools_dump_mem(rawoutstream, info, &ctx, attr, p_type, space, buf) < 0) { - h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, " Unable to print data."); - h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); - } - ctx.indent_level--; - } - - /* Reclaim any VL memory, if necessary */ - if (vl_data) - H5Treclaim(p_type, space, H5P_DEFAULT, buf); - - HDfree(buf); - } - H5Tclose(p_type); - } /* end if */ + ctx.indent_level++; + if (h5tools_dump_mem(rawoutstream, info, &ctx, attr) < 0) { + h5tools_str_reset(&buffer); + h5tools_str_append(&buffer, " Unable to print data."); + h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); + } + ctx.indent_level--; H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Attribute data read complete"); } done: @@ -1919,7 +1890,7 @@ static herr_t list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ainfo, void H5_ATTR_UNUSED *op_data) { - H5TOOLS_ERR_INIT(herr_t, SUCCEED); + H5TOOLS_ERR_INIT(herr_t, SUCCEED) hid_t attr = H5I_INVALID_HID; hid_t space = H5I_INVALID_HID; hid_t type = H5I_INVALID_HID; @@ -1952,7 +1923,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain print_string(&buffer, attr_name, TRUE); H5TOOLS_DEBUG(H5E_tools_min_dbg_id_g, "Attribute name:%s", attr_name); - if ((attr = H5Aopen(obj, attr_name, H5P_DEFAULT)) < 0) { + if ((attr = H5Aopen(obj, attr_name, H5P_DEFAULT)) >= 0) { space = H5Aget_space(attr); type = H5Aget_type(attr); @@ -2344,7 +2315,7 @@ datatype_list2(hid_t type, const char H5_ATTR_UNUSED *name) static herr_t list_obj(const char *name, const H5O_info_t *oinfo, const char *first_seen, void *_iter) { - H5TOOLS_ERR_INIT(herr_t, SUCCEED); + H5TOOLS_ERR_INIT(herr_t, SUCCEED) H5O_type_t obj_type = oinfo->type; /* Type of the object */ iter_t *iter = (iter_t*)_iter; hsize_t curr_pos = 0; /* total data element position */ @@ -2892,6 +2863,10 @@ main(int argc, const char *argv[]) const char *preferred_driver = NULL; int err_exit = 0; hid_t fapl_id = H5P_DEFAULT; + H5E_auto2_t func; + H5E_auto2_t tools_func; + void *edata; + void *tools_edata; #ifdef H5_HAVE_ROS3_VFD /* default "anonymous" s3 configuration */ @@ -2919,9 +2894,17 @@ main(int argc, const char *argv[]) h5tools_setprogname(PROGRAMNAME); h5tools_setstatus(EXIT_SUCCESS); + /* Disable error reporting */ + H5Eget_auto2(H5E_DEFAULT, &func, &edata); + H5Eset_auto2(H5E_DEFAULT, NULL, NULL); + /* Initialize h5tools lib */ h5tools_init(); + /* Disable tools error reporting */ + H5Eget_auto2(H5tools_ERR_STACK_g, &tools_func, &tools_edata); + H5Eset_auto2(H5tools_ERR_STACK_g, NULL, NULL); + /* Build object display table */ DISPATCH(H5O_TYPE_GROUP, "Group", NULL, NULL); DISPATCH(H5O_TYPE_DATASET, "Dataset", dataset_list1, dataset_list2); @@ -2948,11 +2931,11 @@ main(int argc, const char *argv[]) data_g = TRUE; } else if (!HDstrcmp(argv[argno], "--enable-error-stack")) { - show_errors_g = TRUE; + enable_error_stack = 1; /* deprecated --errors */ } else if (!HDstrcmp(argv[argno], "--errors")) { - show_errors_g = TRUE; + enable_error_stack = 1; } else if (!HDstrcmp(argv[argno], "--follow-symlinks")) { follow_symlink_g = TRUE; @@ -3201,7 +3184,7 @@ main(int argc, const char *argv[]) /* deprecated -e */ case 'e': /* --errors */ - show_errors_g = TRUE; + enable_error_stack = 1; break; case 'E': /* --external */ @@ -3309,10 +3292,10 @@ main(int argc, const char *argv[]) } } /* preferred_driver defined */ - /* Turn off HDF5's automatic error printing unless you're debugging h5ls */ - if(!show_errors_g) - H5Eset_auto2(H5E_DEFAULT, NULL, NULL); - + if (enable_error_stack > 0) { + H5Eset_auto2(H5E_DEFAULT, func, edata); + H5Eset_auto2(H5tools_ERR_STACK_g, tools_func, tools_edata); + } /* Each remaining argument is an hdf5 file followed by an optional slash * and object name. @@ -3376,6 +3359,7 @@ main(int argc, const char *argv[]) x = oname; if (NULL == (oname = HDstrdup(oname))) { HDfprintf(rawerrorstream, "memory allocation failed\n"); + H5Eset_auto2(H5E_DEFAULT, func, edata); leave(EXIT_FAILURE); } *x = '\0'; @@ -3420,6 +3404,7 @@ main(int argc, const char *argv[]) h5tools_str_reset(&buffer); print_obj_name(&buffer, &iter, oname, "**NOT FOUND**"); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); + H5Eset_auto2(H5E_DEFAULT, func, edata); leave(EXIT_FAILURE); } /* end if */ } /* end if */ @@ -3428,8 +3413,10 @@ main(int argc, const char *argv[]) /* Open the object and display it's information */ if (li.type == H5L_TYPE_HARD) { - if (visit_obj(file, oname, &iter) < 0) + if (visit_obj(file, oname, &iter) < 0) { + H5Eset_auto2(H5E_DEFAULT, func, edata); leave(EXIT_FAILURE); + } } /* end if(li.type == H5L_TYPE_HARD) */ else { /* Specified name is not for object -- list that link */ @@ -3458,10 +3445,12 @@ main(int argc, const char *argv[]) if (fapl_id != H5P_DEFAULT) { if (0 < H5Pclose(fapl_id)) { HDfprintf(rawerrorstream, "Error: Unable to set close fapl entry\n\n"); + H5Eset_auto2(H5E_DEFAULT, func, edata); leave(EXIT_FAILURE); } } + H5Eset_auto2(H5E_DEFAULT, func, edata); if (err_exit) leave(EXIT_FAILURE); else diff --git a/tools/testfiles/help-1.ls b/tools/testfiles/help-1.ls index 396bed3..7409c16 100644 --- a/tools/testfiles/help-1.ls +++ b/tools/testfiles/help-1.ls @@ -20,7 +20,7 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] --no-dangling-links Must be used with --follow-symlinks option; otherwise, h5ls shows error message and returns an exit - code of 1. + code of 1. Check for any symbolic links (soft links or external links) that do not resolve to an existing object (dataset, group, or named datatype). @@ -55,11 +55,8 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] "%05d" to open a file family. Deprecated Options - The following options have been deprecated in HDF5. While they remain - available, they have been superseded as indicated and may be removed - from HDF5 in the future. Use the indicated replacement option in all - new work; where possible, existing scripts, et cetera, should also be - updated to use the replacement option. + The following options have been removed in HDF5 1.12. Use the indicated + replacement option in all work. -E or --external Follow external links. Replaced by --follow-symlinks. diff --git a/tools/testfiles/help-2.ls b/tools/testfiles/help-2.ls index 396bed3..7409c16 100644 --- a/tools/testfiles/help-2.ls +++ b/tools/testfiles/help-2.ls @@ -20,7 +20,7 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] --no-dangling-links Must be used with --follow-symlinks option; otherwise, h5ls shows error message and returns an exit - code of 1. + code of 1. Check for any symbolic links (soft links or external links) that do not resolve to an existing object (dataset, group, or named datatype). @@ -55,11 +55,8 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] "%05d" to open a file family. Deprecated Options - The following options have been deprecated in HDF5. While they remain - available, they have been superseded as indicated and may be removed - from HDF5 in the future. Use the indicated replacement option in all - new work; where possible, existing scripts, et cetera, should also be - updated to use the replacement option. + The following options have been removed in HDF5 1.12. Use the indicated + replacement option in all work. -E or --external Follow external links. Replaced by --follow-symlinks. diff --git a/tools/testfiles/help-3.ls b/tools/testfiles/help-3.ls index 396bed3..7409c16 100644 --- a/tools/testfiles/help-3.ls +++ b/tools/testfiles/help-3.ls @@ -20,7 +20,7 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] --no-dangling-links Must be used with --follow-symlinks option; otherwise, h5ls shows error message and returns an exit - code of 1. + code of 1. Check for any symbolic links (soft links or external links) that do not resolve to an existing object (dataset, group, or named datatype). @@ -55,11 +55,8 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] "%05d" to open a file family. Deprecated Options - The following options have been deprecated in HDF5. While they remain - available, they have been superseded as indicated and may be removed - from HDF5 in the future. Use the indicated replacement option in all - new work; where possible, existing scripts, et cetera, should also be - updated to use the replacement option. + The following options have been removed in HDF5 1.12. Use the indicated + replacement option in all work. -E or --external Follow external links. Replaced by --follow-symlinks. diff --git a/tools/testfiles/tattrreg_be.ls b/tools/testfiles/tattrreg_be.ls index 3962c93..0c9dc18 100644 --- a/tools/testfiles/tattrreg_be.ls +++ b/tools/testfiles/tattrreg_be.ls @@ -2,10 +2,19 @@ Opened "tattrreg.h5" with sec2 driver. Dataset1 Dataset {NULL} Attribute: Attribute1 {4} Type: dataset region reference - Data: DSET-/Dataset2 {Blk0: (2,2)-(7,7)} - DSET-/Dataset2 {Pt0: (6,9), Pt1: (2,2), Pt2: (8,4), Pt3: (1,6), - Pt4: (2,8), Pt5: (3,2), Pt6: (0,4), Pt7: (9,0), Pt8: (7,1), - Pt9: (3,3)} + Data: + DATASET tattrreg.h5/Dataset2 { + REGION_TYPE BLOCK Blk0: (2,2)-(7,7) + DATATYPE H5T_STD_U8BE + DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) } + } + DATASET tattrreg.h5/Dataset2 { + REGION_TYPE POINT Pt0: (6,9), Pt1: (2,2), Pt2: (8,4), + Pt3: (1,6), Pt4: (2,8), Pt5: (3,2), Pt6: (0,4), + Pt7: (9,0), Pt8: (7,1), Pt9: (3,3) + DATATYPE H5T_STD_U8BE + DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) } + } NULL NULL Location: 1:1400 diff --git a/tools/testfiles/tattrreg_le.ls b/tools/testfiles/tattrreg_le.ls index 13fb320..d44b7ed 100644 --- a/tools/testfiles/tattrreg_le.ls +++ b/tools/testfiles/tattrreg_le.ls @@ -2,10 +2,19 @@ Opened "tattrreg.h5" with sec2 driver. Dataset1 Dataset {NULL} Attribute: Attribute1 {4} Type: dataset region reference - Data: DSET-/Dataset2 {Blk0: (2,2)-(7,7)} - DSET-/Dataset2 {Pt0: (6,9), Pt1: (2,2), Pt2: (8,4), Pt3: (1,6), - Pt4: (2,8), Pt5: (3,2), Pt6: (0,4), Pt7: (9,0), Pt8: (7,1), - Pt9: (3,3)} + Data: + DATASET tattrreg.h5/Dataset2 { + REGION_TYPE BLOCK Blk0: (2,2)-(7,7) + DATATYPE H5T_STD_U8BE + DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) } + } + DATASET tattrreg.h5/Dataset2 { + REGION_TYPE POINT Pt0: (6,9), Pt1: (2,2), Pt2: (8,4), + Pt3: (1,6), Pt4: (2,8), Pt5: (3,2), Pt6: (0,4), + Pt7: (9,0), Pt8: (7,1), Pt9: (3,3) + DATATYPE H5T_STD_U8BE + DATASPACE SIMPLE { ( 10, 10 ) / ( 10, 10 ) } + } NULL NULL Location: 1:1400 diff --git a/tools/testfiles/textlinksrc-nodangle-1.ls b/tools/testfiles/textlinksrc-nodangle-1.ls index 396bed3..7409c16 100644 --- a/tools/testfiles/textlinksrc-nodangle-1.ls +++ b/tools/testfiles/textlinksrc-nodangle-1.ls @@ -20,7 +20,7 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] --no-dangling-links Must be used with --follow-symlinks option; otherwise, h5ls shows error message and returns an exit - code of 1. + code of 1. Check for any symbolic links (soft links or external links) that do not resolve to an existing object (dataset, group, or named datatype). @@ -55,11 +55,8 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] "%05d" to open a file family. Deprecated Options - The following options have been deprecated in HDF5. While they remain - available, they have been superseded as indicated and may be removed - from HDF5 in the future. Use the indicated replacement option in all - new work; where possible, existing scripts, et cetera, should also be - updated to use the replacement option. + The following options have been removed in HDF5 1.12. Use the indicated + replacement option in all work. -E or --external Follow external links. Replaced by --follow-symlinks. diff --git a/tools/testfiles/tgroup-1.ls b/tools/testfiles/tgroup-1.ls index 396bed3..7409c16 100644 --- a/tools/testfiles/tgroup-1.ls +++ b/tools/testfiles/tgroup-1.ls @@ -20,7 +20,7 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] --no-dangling-links Must be used with --follow-symlinks option; otherwise, h5ls shows error message and returns an exit - code of 1. + code of 1. Check for any symbolic links (soft links or external links) that do not resolve to an existing object (dataset, group, or named datatype). @@ -55,11 +55,8 @@ usage: h5ls [OPTIONS] file[/OBJECT] [file[/[OBJECT]...] "%05d" to open a file family. Deprecated Options - The following options have been deprecated in HDF5. While they remain - available, they have been superseded as indicated and may be removed - from HDF5 in the future. Use the indicated replacement option in all - new work; where possible, existing scripts, et cetera, should also be - updated to use the replacement option. + The following options have been removed in HDF5 1.12. Use the indicated + replacement option in all work. -E or --external Follow external links. Replaced by --follow-symlinks. -- cgit v0.12