diff options
author | David Young <dyoung@hdfgroup.org> | 2019-10-03 22:34:05 (GMT) |
---|---|---|
committer | David Young <dyoung@hdfgroup.org> | 2019-10-03 22:34:05 (GMT) |
commit | 743c9358d146d3d28e6cb023166763f0846442b9 (patch) | |
tree | 0c56d6996590ff2c6433b4f36461d8c9641b2f9f /tools/src | |
parent | 82f647534c309ff97e4827fb95949954aeed4a26 (diff) | |
download | hdf5-743c9358d146d3d28e6cb023166763f0846442b9.zip hdf5-743c9358d146d3d28e6cb023166763f0846442b9.tar.gz hdf5-743c9358d146d3d28e6cb023166763f0846442b9.tar.bz2 |
Introduce PRI*HADDR and PRI*HSIZE for printing haddr_t and hsize_t.
Diffstat (limited to 'tools/src')
-rw-r--r-- | tools/src/h5dump/h5dump_ddl.c | 6 | ||||
-rw-r--r-- | tools/src/h5dump/h5dump_xml.c | 12 | ||||
-rw-r--r-- | tools/src/h5ls/h5ls.c | 6 |
3 files changed, 12 insertions, 12 deletions
diff --git a/tools/src/h5dump/h5dump_ddl.c b/tools/src/h5dump/h5dump_ddl.c index 5c47abd..9b3a4ca 100644 --- a/tools/src/h5dump/h5dump_ddl.c +++ b/tools/src/h5dump/h5dump_ddl.c @@ -864,7 +864,7 @@ dump_group(hid_t gid, const char *name) if(!type_table->objs[u].recorded) { dset = H5Dopen2(gid, type_table->objs[u].objname, H5P_DEFAULT); type = H5Dget_type(dset); - sprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno); + sprintf(type_name, "#%" PRIuHADDR, type_table->objs[u].objno); dump_function_table->dump_named_datatype_function(type, type_name); H5Tclose(type); H5Dclose(dset); @@ -1313,7 +1313,7 @@ dump_fcontents(hid_t fid) for (u = 0; u < type_table->nobjs; u++) { if (!type_table->objs[u].recorded) - PRINTSTREAM(rawoutstream, " %-10s /#"H5_PRINTF_HADDR_FMT"\n", "datatype", type_table->objs[u].objno); + PRINTSTREAM(rawoutstream, " %-10s /#%" PRIuHADDR "\n", "datatype", type_table->objs[u].objno); } } @@ -2022,7 +2022,7 @@ handle_datatypes(hid_t fid, const char *type, void H5_ATTR_UNUSED * data, int pe if(!type_table->objs[idx].recorded) { /* unamed datatype */ - sprintf(name, "/#"H5_PRINTF_HADDR_FMT, type_table->objs[idx].objno); + sprintf(name, "/#%" PRIuHADDR, type_table->objs[idx].objno); if(!HDstrcmp(name, real_name)) break; diff --git a/tools/src/h5dump/h5dump_xml.c b/tools/src/h5dump/h5dump_xml.c index e399d8f..854f4a5 100644 --- a/tools/src/h5dump/h5dump_xml.c +++ b/tools/src/h5dump/h5dump_xml.c @@ -93,7 +93,7 @@ static h5tool_format_t xml_dataformat = { 1, /*skip_first */ 1, /*obj_hidefileno */ - " "H5_PRINTF_HADDR_FMT, /*obj_format */ + " %" PRIuHADDR, /*obj_format */ 1, /*dset_hidefileno */ "DATASET %s ", /*dset_format */ @@ -587,7 +587,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen) if (objno == HADDR_UNDEF) { if (gen) { objno = ref_path_table_gen_fake(str); - sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno); + sprintf(outstr, "xid_%" PRIuHADDR, objno); return 0; } else { @@ -598,7 +598,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen) else { if (gen) { objno = ref_path_table_gen_fake(str); - sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno); + sprintf(outstr, "xid_%" PRIuHADDR, objno); return 0; } else { @@ -607,7 +607,7 @@ xml_name_to_XID(const char *str , char *outstr, int outlen, int gen) } } - sprintf(outstr, "xid_"H5_PRINTF_HADDR_FMT, objno); + sprintf(outstr, "xid_%" PRIuHADDR, objno); return(0); } @@ -2685,7 +2685,7 @@ xml_dump_group(hid_t gid, const char *name) if(!type_table->objs[u].recorded) { dset = H5Dopen2(gid, type_table->objs[u].objname, H5P_DEFAULT); type = H5Dget_type(dset); - sprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno); + sprintf(type_name, "#%" PRIuHADDR, type_table->objs[u].objno); dump_function_table->dump_named_datatype_function(type, type_name); H5Tclose(type); H5Dclose(dset); @@ -2767,7 +2767,7 @@ xml_dump_group(hid_t gid, const char *name) if(!type_table->objs[u].recorded) { dset = H5Dopen2(gid, type_table->objs[u].objname, H5P_DEFAULT); type = H5Dget_type(dset); - sprintf(type_name, "#"H5_PRINTF_HADDR_FMT, type_table->objs[u].objno); + sprintf(type_name, "#%" PRIuHADDR, type_table->objs[u].objno); dump_function_table->dump_named_datatype_function(type, type_name); H5Tclose(type); H5Dclose(dset); diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c index cf03b30..0a69550 100644 --- a/tools/src/h5ls/h5ls.c +++ b/tools/src/h5ls/h5ls.c @@ -95,7 +95,7 @@ static h5tool_format_t ls_dataformat = { 0, /*skip_first */ 0, /*obj_hidefileno */ - "-%lu:"H5_PRINTF_HADDR_FMT, /*obj_format */ + "-%lu:%" PRIuHADDR, /*obj_format */ 0, /*dset_hidefileno */ "DSET-%s ", /*dset_format */ @@ -1323,7 +1323,7 @@ print_type(h5tools_str_t *buffer, hid_t type, int ind) H5O_info_t oi; if(H5Oget_info2(type, &oi, H5O_INFO_BASIC) >= 0) - h5tools_str_append(buffer,"shared-%lu:"H5_PRINTF_HADDR_FMT" ", + h5tools_str_append(buffer,"shared-%lu:%" PRIuHADDR " ", oi.fileno, oi.addr); else h5tools_str_append(buffer,"shared "); @@ -2098,7 +2098,7 @@ list_obj(const char *name, const H5O_info_t *oinfo, const char *first_seen, void /* Object location & reference count */ h5tools_str_reset(&buffer); - h5tools_str_append(&buffer, " %-10s %lu:"H5_PRINTF_HADDR_FMT"\n", "Location:", oinfo->fileno, oinfo->addr); + h5tools_str_append(&buffer, " %-10s %lu:%" PRIuHADDR "\n", "Location:", oinfo->fileno, oinfo->addr); h5tools_str_append(&buffer, " %-10s %u\n", "Links:", (unsigned)oinfo->rc); h5tools_render_element(rawoutstream, info, &ctx, &buffer, &curr_pos, (size_t)info->line_ncols, (hsize_t)0, (hsize_t)0); |