From 80f27eb1f44b6f5ccd47b4ad15b17e618683b859 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Thu, 23 Apr 2015 15:13:12 -0500 Subject: [svn-r26909] Convert layout to switch and add virtual. Print number of maps and file names only. Tested: local linux --- tools/h5ls/h5ls.c | 143 +++++++++++++++++++++++++++++++++--------------------- 1 file changed, 87 insertions(+), 56 deletions(-) diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index d0dd216..46999b6 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -1764,6 +1764,7 @@ dataset_list2(hid_t dset, const char UNUSED *name) double utilization; /* percent utilization of storage */ H5T_class_t tclass; /* datatype class identifier */ int i; + H5D_layout_t stl; hsize_t curr_pos = 0; /* total data element position */ h5tools_str_t buffer; /* string into which to render */ h5tools_context_t ctx; /* print context */ @@ -1779,20 +1780,93 @@ dataset_list2(hid_t dset, const char UNUSED *name) space = H5Dget_space(dset); type = H5Dget_type(dset); - /* Print information about chunked storage */ - if (H5D_CHUNKED==H5Pget_layout(dcpl)) { - hsize_t chsize[64]; /* chunk size in elements */ - - ndims = H5Pget_chunk(dcpl, (int)NELMTS(chsize), chsize/*out*/); - h5tools_str_append(&buffer, " %-10s {", "Chunks:"); - total = H5Tget_size(type); - for (i=0; i 0) { + for(i = 0, max_len = 0; i < nf; i++) { + if(H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL) < 0) + continue; + n = print_string(NULL, f_name, TRUE); + max_len = MAX(max_len, n); + } /* end for */ + h5tools_str_append(&buffer, " %-10s %d external file%s\n", + "Extern:", nf, 1==nf?"":"s"); + h5tools_str_append(&buffer, " %4s %10s %10s %10s %s\n", + "ID", "DSet-Addr", "File-Addr", "Bytes", "File"); + h5tools_str_append(&buffer, " %4s %10s %10s %10s ", + "----", "----------", "----------", "----------"); + for (i=0; i 0) { - for(i = 0, max_len = 0; i < nf; i++) { - if(H5Pget_external(dcpl, (unsigned)i, sizeof(f_name), f_name, NULL, NULL) < 0) - continue; - n = print_string(NULL, f_name, TRUE); - max_len = MAX(max_len, n); - } /* end for */ - h5tools_str_append(&buffer, " %-10s %d external file%s\n", - "Extern:", nf, 1==nf?"":"s"); - h5tools_str_append(&buffer, " %4s %10s %10s %10s %s\n", - "ID", "DSet-Addr", "File-Addr", "Bytes", "File"); - h5tools_str_append(&buffer, " %4s %10s %10s %10s ", - "----", "----------", "----------", "----------"); - for (i=0; i 0) { for(i = 0; i < nf; i++) { -- cgit v0.12