summaryrefslogtreecommitdiffstats
path: root/tools/src/h5ls/h5ls.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5ls/h5ls.c')
-rw-r--r--tools/src/h5ls/h5ls.c52
1 files changed, 23 insertions, 29 deletions
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index 1ce6ee8..bffd12b 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, March 23, 1998
*/
@@ -432,11 +432,6 @@ print_native_type(h5tools_str_t *buffer, hid_t type, int ind)
else if (H5Tequal(type, H5T_NATIVE_DOUBLE) == TRUE) {
h5tools_str_append(buffer, "native double");
}
-#if H5_SIZEOF_LONG_DOUBLE != 0
- else if (H5Tequal(type, H5T_NATIVE_LDOUBLE) == TRUE) {
- h5tools_str_append(buffer, "native long double");
- }
-#endif
else if (H5Tequal(type, H5T_NATIVE_INT8) == TRUE) {
h5tools_str_append(buffer, "native int8_t");
}
@@ -969,7 +964,7 @@ print_enum_type(h5tools_str_t *buffer, hid_t type, int ind)
/*On SGI Altix(cobalt), wrong values were printed out with "value+i*dst_size"
*strangely, unless use another pointer "copy".*/
copy = value + i * dst_size;
- h5tools_str_append(buffer, "%" H5_PRINTF_LL_WIDTH "d", *((long long *)((void *)copy)));
+ h5tools_str_append(buffer, "%lld", *((long long *)((void *)copy)));
}
}
@@ -1324,7 +1319,7 @@ dump_dataset_values(hid_t dset)
h5tool_format_t * info = &ls_dataformat;
H5R_ref_t * ref_buf = NULL;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
f_type = H5Dget_type(dset);
space = H5Dget_space(dset);
@@ -1467,7 +1462,7 @@ done:
PRINTVALSTREAM(rawoutstream, "\n");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -1495,7 +1490,7 @@ dump_attribute_values(hid_t attr)
h5tool_format_t * info = &ls_dataformat;
H5R_ref_t * ref_buf = NULL;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
f_type = H5Aget_type(attr);
space = H5Aget_space(attr);
@@ -1643,7 +1638,7 @@ done:
PRINTVALSTREAM(rawoutstream, "\n");
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
}
/*-------------------------------------------------------------------------
@@ -1672,7 +1667,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
h5tools_context_t ctx; /* print context */
h5tool_format_t * info = &ls_dataformat;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
HDmemset(&ctx, 0, sizeof(ctx));
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
@@ -1751,7 +1746,7 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t H5_ATTR_UNUSED *ain
H5TOOLS_DEBUG("Attribute open failed");
h5tools_str_close(&buffer);
}
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return 0;
}
@@ -1914,10 +1909,9 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
print_string(&buffer, f_name, TRUE);
}
else {
- h5tools_str_append(&buffer,
- " #%03d %10" H5_PRINTF_LL_WIDTH
- "u %10" H5_PRINTF_LL_WIDTH "u %10" H5_PRINTF_LL_WIDTH "u ",
- i, total, (hsize_t)f_offset, f_size);
+ h5tools_str_append(
+ &buffer, " #%03d %10" PRIuHSIZE " %10" PRIuHSIZE " %10" PRIuHSIZE " ",
+ i, total, (hsize_t)f_offset, f_size);
print_string(&buffer, f_name, TRUE);
}
h5tools_str_append(&buffer, "\n");
@@ -1995,7 +1989,7 @@ dataset_list2(hid_t dset, const char H5_ATTR_UNUSED *name)
HSIZE_T_FORMAT " logical byte%s, " HSIZE_T_FORMAT " allocated byte%s",
total, 1 == total ? "" : "s", used, 1 == used ? "" : "s");
if (used > 0) {
- utilization = ((double)total * (double)100.0f) / (double)used;
+ utilization = ((double)total * 100.0) / (double)used;
h5tools_str_append(&buffer, ", %1.2f%% utilization", utilization);
}
}
@@ -2100,7 +2094,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
h5tools_context_t ctx; /* print context */
h5tool_format_t * info = &ls_dataformat;
- H5TOOLS_START_DEBUG("");
+ H5TOOLS_START_DEBUG(" ");
HDmemset(&ctx, 0, sizeof(ctx));
HDmemset(&buffer, 0, sizeof(h5tools_str_t));
@@ -2164,11 +2158,11 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
/* Show detailed information about the object, beginning with information
* which is common to all objects. */
if (verbose_g > 0) {
- size_t buf_size = 0;
- char * comment = NULL;
- char * obj_tok_str = NULL;
- ssize_t cmt_bufsize = -1;
- hbool_t supported = FALSE;
+ size_t buf_size = 0;
+ char * comment = NULL;
+ char * obj_tok_str = NULL;
+ ssize_t cmt_bufsize = -1;
+ uint64_t supported = 0;
/* Display attributes */
H5TOOLS_DEBUG("Display attributes");
@@ -2207,7 +2201,7 @@ list_obj(const char *name, const H5O_info2_t *oinfo, const char *first_seen, voi
/* Only emit comments if the VOL connector supports that */
H5VLquery_optional(obj_id, H5VL_SUBCLS_OBJECT, H5VL_NATIVE_OBJECT_GET_COMMENT, &supported);
- if (supported) {
+ if (supported & H5VL_OPT_QUERY_SUPPORTED) {
/* Object comment */
cmt_bufsize = H5Oget_comment(obj_id, comment, buf_size);
@@ -2254,7 +2248,7 @@ done:
}
h5tools_str_close(&buffer);
- H5TOOLS_ENDDEBUG("");
+ H5TOOLS_ENDDEBUG(" ");
return 0;
} /* end list_obj() */
@@ -2655,7 +2649,7 @@ int
main(int argc, const char *argv[])
{
hid_t file_id = H5I_INVALID_HID;
- char * fname = NULL, *oname = NULL, *x;
+ char * fname = NULL, *oname = NULL, *x = NULL;
const char * s = NULL;
char * rest;
int argno, times;
@@ -2672,7 +2666,7 @@ main(int argc, const char *argv[])
/* Default "anonymous" S3 configuration */
H5FD_ros3_fapl_t ros3_fa = {
1, /* Structure Version */
- false, /* Authenticate? */
+ FALSE, /* Authenticate? */
"", /* AWS Region */
"", /* Access Key ID */
"", /* Secret Access Key */
@@ -3124,7 +3118,7 @@ main(int argc, const char *argv[])
symlink_list.objs = NULL;
/* Check for root group as object name */
- if (HDstrcmp(oname, root_name)) {
+ if (HDstrcmp(oname, root_name) != 0) {
/* Check the type of link given */
if (H5Lget_info2(file_id, oname, &li, H5P_DEFAULT) < 0) {
hsize_t curr_pos = 0; /* total data element position */