summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2015-02-25 20:20:31 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2015-02-25 20:20:31 (GMT)
commitaad4250bd6f90e914ab71ce85c7d9e8793554b96 (patch)
treeb48b5028fcda30d871e933f05a61b029e4bca937 /tools/lib
parentc4044e0c85778e6bd3eda61b7bfdf6bb0fd0a8e9 (diff)
downloadhdf5-aad4250bd6f90e914ab71ce85c7d9e8793554b96.zip
hdf5-aad4250bd6f90e914ab71ce85c7d9e8793554b96.tar.gz
hdf5-aad4250bd6f90e914ab71ce85c7d9e8793554b96.tar.bz2
[svn-r26305] convert dump_dcpl to use switch statement
Add default case refactor out start ctx and end ctx Tested: local linux
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools_dump.c430
1 files changed, 189 insertions, 241 deletions
diff --git a/tools/lib/h5tools_dump.c b/tools/lib/h5tools_dump.c
index ba1af19..26cac47 100644
--- a/tools/lib/h5tools_dump.c
+++ b/tools/lib/h5tools_dump.c
@@ -2468,7 +2468,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
/* Close array base type */
if(H5Tclose(super) < 0)
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tclose failed");
- }
+ }
else
HERROR(H5E_tools_g, H5E_tools_min_id_g, "H5Tget_super failed");
@@ -2842,17 +2842,13 @@ h5tools_dump_oid(FILE *stream, const h5tool_format_t *info,
}
+
/*-------------------------------------------------------------------------
* Function: dump_fill_value
*
* Purpose: prints the fill value
*
* Return: void
- *
- * Programmer: pvn
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
void
@@ -2883,15 +2879,11 @@ h5tools_print_fill_value(h5tools_str_t *buffer/*in,out*/, const h5tool_format_t
* Purpose: prints several dataset create property list properties
*
* Return: void
- *
- * Modifications: pvn, March 28, 2008
- * Add a COMPRESSION ratio information for cases when filters are present
- *
*-------------------------------------------------------------------------
*/
void
h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
- h5tools_context_t *ctx, hid_t dcpl_id,hid_t type_id, hid_t obj_id)
+ h5tools_context_t *ctx, hid_t dcpl_id, hid_t type_id, hid_t obj_id)
{
int nfilters; /* number of filters */
int rank; /* rank */
@@ -2905,16 +2897,18 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
H5D_fill_value_t fvstatus;
H5D_alloc_time_t at;
H5D_fill_time_t ft;
- size_t ncols = 80; /* available output width */
+ H5D_layout_t stl;
+ size_t ncols = 80; /* available output width */
size_t cd_nelmts; /* filter client number of values */
off_t offset; /* offset of external file */
char f_name[256]; /* filter name */
- char name[256]; /* external file name */
+ char name[256]; /* external or virtual file name */
+ char dsetname[256]; /* virtual datset name */
hsize_t chsize[64]; /* chunk size in elements */
hsize_t size; /* size of external file */
hsize_t storage_size;
- hsize_t curr_pos = 0; /* total data element position */
- h5tools_str_t buffer; /* string into which to render */
+ hsize_t curr_pos = 0; /* total data element position */
+ h5tools_str_t buffer; /* string into which to render */
/* setup */
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
@@ -2936,216 +2930,172 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_str_append(&buffer, "%s %s", STORAGE_LAYOUT, BEGIN);
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- if(H5D_CHUNKED == H5Pget_layout(dcpl_id)) {
- ctx->indent_level++;
+ ctx->indent_level++;
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s ", CHUNKED);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- rank = H5Pget_chunk(dcpl_id,(int)NELMTS(chsize),chsize);
- h5tools_str_append(&buffer, "%s " HSIZE_T_FORMAT, h5tools_dump_header_format->dataspacedimbegin, chsize[0]);
- for(i = 1; i < rank; i++)
- h5tools_str_append(&buffer, ", " HSIZE_T_FORMAT, chsize[i]);
- h5tools_str_append(&buffer, " %s", h5tools_dump_header_format->dataspacedimend);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ stl = H5Pget_layout(dcpl_id);
+ switch (stl) {
+ case H5D_CHUNKED:
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s ", CHUNKED);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
+ rank = H5Pget_chunk(dcpl_id, (int) NELMTS(chsize), chsize);
+ h5tools_str_append(&buffer, "%s " HSIZE_T_FORMAT, h5tools_dump_header_format->dataspacedimbegin, chsize[0]);
+ for(i = 1; i < rank; i++)
+ h5tools_str_append(&buffer, ", " HSIZE_T_FORMAT, chsize[i]);
+ h5tools_str_append(&buffer, " %s", h5tools_dump_header_format->dataspacedimend);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- /* if there are filters, print a compression ratio */
- if(nfilters) {
- hsize_t dims[H5S_MAX_RANK];
- hsize_t nelmts = 1;
- double ratio = 0;
- int ok = 0;
-
- hid_t tid = H5Dget_type(obj_id);
- hid_t sid = H5Dget_space(obj_id);
- size_t datum_size = H5Tget_size(tid);
- int ndims = H5Sget_simple_extent_dims(sid, dims, NULL);
-
- /* only print the compression ratio for these filters */
- for(i = 0; i < nfilters && !ok; i++) {
- cd_nelmts = NELMTS(cd_values);
- filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
- cd_values, sizeof(f_name), f_name, NULL);
- ok = (filtn>=0);
-
- /* this following code will not show compression ratio for
- user defined filter. For example, see HDFFV-8344 --xcao@hdfgroup.org
- switch(filtn) {
- case H5Z_FILTER_DEFLATE:
- case H5Z_FILTER_SZIP:
- case H5Z_FILTER_NBIT:
- case H5Z_FILTER_SCALEOFFSET:
- ok = 1;
- break;
- }
- */
- }
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- if(ndims && ok) {
- hsize_t uncomp_size;
+ h5tools_str_reset(&buffer);
- for(i = 0; i < ndims; i++) {
- nelmts *= dims[i];
+ /* if there are filters, print a compression ratio */
+ if (nfilters) {
+ hsize_t dims[H5S_MAX_RANK];
+ hsize_t nelmts = 1;
+ double ratio = 0;
+ int ok = 0;
+
+ hid_t tid = H5Dget_type(obj_id);
+ hid_t sid = H5Dget_space(obj_id);
+ size_t datum_size = H5Tget_size(tid);
+ int ndims = H5Sget_simple_extent_dims(sid, dims, NULL);
+
+ /* only print the compression ratio for these filters */
+ for (i = 0; i < nfilters && !ok; i++) {
+ cd_nelmts = NELMTS(cd_values);
+ filtn = H5Pget_filter2(dcpl_id, (unsigned) i, &filt_flags, &cd_nelmts, cd_values, sizeof(f_name),
+ f_name, NULL);
+ ok = (filtn >= 0);
}
- uncomp_size = nelmts * datum_size;
- /* compression ratio = uncompressed size / compressed size */
+ if(ndims && ok) {
+ hsize_t uncomp_size;
- if(storage_size != 0)
- ratio = (double) uncomp_size / (double) storage_size;
+ for(i = 0; i < ndims; i++) {
+ nelmts *= dims[i];
+ }
+ uncomp_size = nelmts * datum_size;
- h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT" (%.3f:1 COMPRESSION)", storage_size, ratio);
+ /* compression ratio = uncompressed size / compressed size */
- }
- else
- h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
+ if(storage_size != 0)
+ ratio = (double) uncomp_size / (double) storage_size;
- H5Sclose(sid);
- H5Tclose(tid);
+ h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT" (%.3f:1 COMPRESSION)", storage_size, ratio);
- }
- else {
- h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
- }
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ }
+ else
+ h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
- ctx->indent_level--;
+ H5Sclose(sid);
+ H5Tclose(tid);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- else if(H5D_COMPACT == H5Pget_layout(dcpl_id)) {
- ctx->indent_level++;
+ }
+ else {
+ h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
+ }
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ break;
+ case H5D_COMPACT:
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", COMPACT);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s", COMPACT);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "SIZE " HSIZE_T_FORMAT, storage_size);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ break;
+ case H5D_CONTIGUOUS:
+ {
+ int next;
- ctx->indent_level--;
+ next = H5Pget_external_count(dcpl_id);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- else if(H5D_CONTIGUOUS == H5Pget_layout(dcpl_id)) {
- int next;
+ /*-------------------------------------------------------------------------
+ * EXTERNAL_FILE
+ *-------------------------------------------------------------------------
+ */
+ if (next) {
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", CONTIGUOUS);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- next = H5Pget_external_count(dcpl_id);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- /*-------------------------------------------------------------------------
- * EXTERNAL_FILE
- *-------------------------------------------------------------------------
- */
- if(next) {
- ctx->indent_level++;
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s", CONTIGUOUS);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->indent_level++;
+ for (j = 0; j < (unsigned) next; j++) {
+ H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s %s", EXTERNAL, BEGIN);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->indent_level++;
- for(j = 0; j < (unsigned)next; j++) {
- H5Pget_external(dcpl_id, j, sizeof(name), name, &offset, &size);
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "FILENAME %s SIZE " HSIZE_T_FORMAT, name, size);
+ h5tools_str_append(&buffer, " OFFSET %ld", offset);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }
+ ctx->indent_level--;
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "FILENAME %s SIZE " HSIZE_T_FORMAT, name, size);
- h5tools_str_append(&buffer, " OFFSET %ld", offset);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- ctx->indent_level--;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }
+ else {
+ haddr_t ioffset;
- ctx->indent_level--;
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", CONTIGUOUS);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- else {
- haddr_t ioffset;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->indent_level++;
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s", CONTIGUOUS);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
+ h5tools_str_reset(&buffer);
+ ioffset = H5Dget_offset(obj_id);
+ h5tools_str_append(&buffer, "OFFSET "H5_PRINTF_HADDR_FMT, ioffset);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }
+ }
+ break;
+ default:
h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer,"SIZE " HSIZE_T_FORMAT, storage_size);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_append(&buffer, "%s", "Unknown layout");
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t) ncols, (hsize_t) 0, (hsize_t) 0);
+ }/*switch*/
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- ioffset = H5Dget_offset(obj_id);
- h5tools_str_append(&buffer,"OFFSET "H5_PRINTF_HADDR_FMT, ioffset);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->indent_level--;
- ctx->indent_level--;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
- }
- /*-------------------------------------------------------------------------
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+
+ /*-------------------------------------------------------------------------
* FILTERS
*-------------------------------------------------------------------------
*/
@@ -3165,7 +3115,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts,
cd_values, sizeof(f_name), f_name, NULL);
- if (filtn<0)
+ if (filtn < 0)
continue; /* nothing to print for invalid filter */
ctx->need_prefix = TRUE;
@@ -3186,70 +3136,68 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
break;
case H5Z_FILTER_SZIP:
- {
- szip_options_mask = cd_values[0];;
- szip_pixels_per_block = cd_values[1];
+ szip_options_mask = cd_values[0];;
+ szip_pixels_per_block = cd_values[1];
- h5tools_str_append(&buffer, "%s %s",SZIP, BEGIN);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_append(&buffer, "%s %s", SZIP, BEGIN);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->indent_level++;
+ ctx->indent_level++;
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block);
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- if(szip_options_mask & H5_SZIP_CHIP_OPTION_MASK)
- h5tools_str_append(&buffer, "MODE %s", "HARDWARE");
- else if(szip_options_mask & H5_SZIP_ALLOW_K13_OPTION_MASK)
- h5tools_str_append(&buffer, "MODE %s", "K13");
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "PIXELS_PER_BLOCK %d", szip_pixels_per_block);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- if(szip_options_mask & H5_SZIP_EC_OPTION_MASK)
- h5tools_str_append(&buffer, "CODING %s", "ENTROPY");
- else if(szip_options_mask & H5_SZIP_NN_OPTION_MASK)
- h5tools_str_append(&buffer, "CODING %s", "NEAREST NEIGHBOUR");
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- if(szip_options_mask & H5_SZIP_LSB_OPTION_MASK)
- h5tools_str_append(&buffer, "BYTE_ORDER %s", "LSB");
- else if(szip_options_mask & H5_SZIP_MSB_OPTION_MASK)
- h5tools_str_append(&buffer, "BYTE_ORDER %s", "MSB");
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+ h5tools_str_reset(&buffer);
+ if(szip_options_mask & H5_SZIP_CHIP_OPTION_MASK)
+ h5tools_str_append(&buffer, "MODE %s", "HARDWARE");
+ else if(szip_options_mask & H5_SZIP_ALLOW_K13_OPTION_MASK)
+ h5tools_str_append(&buffer, "MODE %s", "K13");
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) {
- ctx->need_prefix = TRUE;
- h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
-
- h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "HEADER %s", "RAW");
- h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- }
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ if(szip_options_mask & H5_SZIP_EC_OPTION_MASK)
+ h5tools_str_append(&buffer, "CODING %s", "ENTROPY");
+ else if(szip_options_mask & H5_SZIP_NN_OPTION_MASK)
+ h5tools_str_append(&buffer, "CODING %s", "NEAREST NEIGHBOUR");
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
- ctx->indent_level--;
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+ h5tools_str_reset(&buffer);
+ if(szip_options_mask & H5_SZIP_LSB_OPTION_MASK)
+ h5tools_str_append(&buffer, "BYTE_ORDER %s", "LSB");
+ else if(szip_options_mask & H5_SZIP_MSB_OPTION_MASK)
+ h5tools_str_append(&buffer, "BYTE_ORDER %s", "MSB");
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
+
+ if(szip_options_mask & H5_SZIP_RAW_OPTION_MASK) {
ctx->need_prefix = TRUE;
h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
h5tools_str_reset(&buffer);
- h5tools_str_append(&buffer, "%s",END);
+ h5tools_str_append(&buffer, "HEADER %s", "RAW");
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
}
+
+ ctx->indent_level--;
+
+ ctx->need_prefix = TRUE;
+ h5tools_simple_prefix(stream, info, ctx, curr_pos, 0);
+
+ h5tools_str_reset(&buffer);
+ h5tools_str_append(&buffer, "%s", END);
+ h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
break;
case H5Z_FILTER_NBIT:
h5tools_str_append(&buffer, "%s", NBIT);
@@ -3260,7 +3208,7 @@ h5tools_dump_dcpl(FILE *stream, const h5tool_format_t *info,
h5tools_render_element(stream, info, ctx, &buffer, &curr_pos, (size_t)ncols, (hsize_t)0, (hsize_t)0);
break;
default:
- /* filter do not have to be avaiable for showing registered filter info.
+ /* filters do not have to be available for showing registered filter info.
see HDFFV-8346 for details. --xcao@hdfgroup.org
if(H5Zfilter_avail(filtn))
h5tools_str_append(&buffer, "%s %s", "USER_REGISTERED_FILTER", BEGIN);