diff options
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/h5dump_ddl.c | 6 | ||||
-rw-r--r-- | tools/h5dump/h5dump_defines.h | 31 |
2 files changed, 21 insertions, 16 deletions
diff --git a/tools/h5dump/h5dump_ddl.c b/tools/h5dump/h5dump_ddl.c index 11052fb..43d397c 100644 --- a/tools/h5dump/h5dump_ddl.c +++ b/tools/h5dump/h5dump_ddl.c @@ -1269,8 +1269,9 @@ dump_fcontents(hid_t fid) unsigned u; for (u = 0; u < type_table->nobjs; u++) { - if (!type_table->objs[u].recorded) + if (!type_table->objs[u].recorded) { PRINTSTREAM(rawoutstream, " %-10s /#"H5_PRINTF_HADDR_FMT"\n", "datatype", type_table->objs[u].objno); + } } } @@ -1874,8 +1875,9 @@ handle_links(hid_t fid, const char *links, void H5_ATTR_UNUSED * data, int H5_AT begin_obj(h5tools_dump_header_format->softlinkbegin, links, h5tools_dump_header_format->softlinkblockbegin); PRINTVALSTREAM(rawoutstream, "\n"); indentation(COL); - if(H5Lget_val(fid, links, buf, linfo.u.val_size, H5P_DEFAULT) >= 0) + if(H5Lget_val(fid, links, buf, linfo.u.val_size, H5P_DEFAULT) >= 0) { PRINTSTREAM(rawoutstream, "LINKTARGET \"%s\"\n", buf); + } else { error_msg("h5dump error: unable to get link value for \"%s\"\n", links); h5tools_setstatus(EXIT_FAILURE); diff --git a/tools/h5dump/h5dump_defines.h b/tools/h5dump/h5dump_defines.h index 5f2df43..f1c4451 100644 --- a/tools/h5dump/h5dump_defines.h +++ b/tools/h5dump/h5dump_defines.h @@ -23,23 +23,26 @@ #define COL 3 /* Macros for displaying objects */ -#define begin_obj(obj,name,begin) \ - do { \ - if ((name)) \ +#define begin_obj(obj,name,begin) \ + do { \ + if ((name)) { \ PRINTSTREAM(rawoutstream, "%s \"%s\" %s", (obj), (name), (begin)); \ - else \ - PRINTSTREAM(rawoutstream, "%s %s", (obj), (begin)); \ + } else { \ + PRINTSTREAM(rawoutstream, "%s %s", (obj), (begin)); \ + } \ } while(0); -#define end_obj(obj,end) \ - do { \ - if(HDstrlen(end)) { \ - PRINTSTREAM(rawoutstream, "%s", end); \ - if(HDstrlen(obj)) \ - PRINTVALSTREAM(rawoutstream, " "); \ - } \ - if(HDstrlen(obj)) \ - PRINTSTREAM(rawoutstream, "%s", obj); \ +#define end_obj(obj,end) \ + do { \ + if(HDstrlen(end)) { \ + PRINTSTREAM(rawoutstream, "%s", end); \ + if(HDstrlen(obj)) { \ + PRINTVALSTREAM(rawoutstream, " "); \ + } \ + } \ + if(HDstrlen(obj)) { \ + PRINTSTREAM(rawoutstream, "%s", obj); \ + } \ } while(0); |