summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2011-03-14 21:03:20 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2011-03-14 21:03:20 (GMT)
commit5ed4eda59ea4004850ac8ca720b67ddac6b2d7f9 (patch)
treef27c616619cd4b1de24f41807fb1a47db3bccbac /tools
parent92f79b673474773db58debd66c3c0d9a58949937 (diff)
downloadhdf5-5ed4eda59ea4004850ac8ca720b67ddac6b2d7f9.zip
hdf5-5ed4eda59ea4004850ac8ca720b67ddac6b2d7f9.tar.gz
hdf5-5ed4eda59ea4004850ac8ca720b67ddac6b2d7f9.tar.bz2
[svn-r20247] Change name of new VLEN function from H5Tdetect_vlen_str to h5tools_detect_vlen_str to match other functions in tools lib.
Added back test for H5Tdetect_class of H5T_VLEN after each instance of above function to catch all VLEN types in h5dump. Tested: local linux
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/h5dump.c8
-rw-r--r--tools/h5ls/h5ls.c4
-rw-r--r--tools/lib/h5tools.c16
-rw-r--r--tools/lib/h5tools.h2
4 files changed, 20 insertions, 10 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index 571a05a..817f1cf 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -2559,7 +2559,9 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int display_index)
ndims = H5Sget_simple_extent_dims(space, size, NULL);
/* Check if we have VL data in the dataset's datatype */
- if (H5Tdetect_vlen_str(p_type) == TRUE)
+ if (h5tools_detect_vlen_str(p_type) == TRUE)
+ vl_data = TRUE;
+ if (H5Tdetect_class(p_type, H5T_VLEN) == TRUE)
vl_data = TRUE;
for (i = 0; i < ndims; i++)
@@ -5525,7 +5527,9 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU
p_type = h5tools_get_native_type(type);
/* Check if we have VL data in the dataset's datatype */
- if (H5Tdetect_vlen_str(p_type) == TRUE)
+ if (h5tools_detect_vlen_str(p_type) == TRUE)
+ vl_data = TRUE;
+ if (H5Tdetect_class(p_type, H5T_VLEN) == TRUE)
vl_data = TRUE;
H5Tclose(type);
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index e670470..d288f4b 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1457,8 +1457,10 @@ list_attr(hid_t obj, const char *attr_name, const H5A_info_t UNUSED *ainfo,
unsigned int vl_data = 0; /* contains VL datatypes */
/* Check if we have VL data in the dataset's datatype */
- if (H5Tdetect_vlen_str(p_type) == TRUE)
+ if (h5tools_detect_vlen_str(p_type) == TRUE)
vl_data = TRUE;
+ if (H5Tdetect_class(p_type, H5T_VLEN) == TRUE)
+ vl_data = TRUE;
temp_need= nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type));
assert(temp_need == (hsize_t)((size_t)temp_need));
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index eb37fac..1982bad 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -622,7 +622,7 @@ h5tools_ncols(const char *s)
}
/*-------------------------------------------------------------------------
- * Function: H5Tdetect_vlen_str
+ * Function: h5tools_detect_vlen_str
*
* Purpose: Recursive check for variable length string of a datatype.
*
@@ -631,7 +631,7 @@ h5tools_ncols(const char *s)
*-------------------------------------------------------------------------
*/
htri_t
-H5Tdetect_vlen_str(hid_t tid)
+h5tools_detect_vlen_str(hid_t tid)
{
int i = 0;
int n = 0;
@@ -644,7 +644,7 @@ H5Tdetect_vlen_str(hid_t tid)
tclass = H5Tget_class(tid);
if (tclass == H5T_ARRAY) {
hid_t btid = H5Tget_super(tid);
- has_vlen_str = H5Tdetect_vlen_str(btid);
+ has_vlen_str = h5tools_detect_vlen_str(btid);
H5Tclose(btid);
return has_vlen_str;
}
@@ -652,7 +652,7 @@ H5Tdetect_vlen_str(hid_t tid)
n = H5Tget_nmembers(tid);
for (i = 0; i < n; i++) {
hid_t mtid = H5Tget_member_type(tid, i);
- has_vlen_str = H5Tdetect_vlen_str(mtid);
+ has_vlen_str = h5tools_detect_vlen_str(mtid);
if (has_vlen_str == TRUE) {
H5Tclose(mtid);
return TRUE;
@@ -2030,7 +2030,9 @@ h5tools_print_simple_subset(FILE *stream, const h5tool_format_t *info, h5tools_c
size_row_block = sset->block.data[row_dim];
/* Check if we have VL data in the dataset's datatype */
- if (H5Tdetect_vlen_str(p_type) == TRUE)
+ if (h5tools_detect_vlen_str(p_type) == TRUE)
+ vl_data = TRUE;
+ if (H5Tdetect_class(p_type, H5T_VLEN) == TRUE)
vl_data = TRUE;
/* display loop */
@@ -2468,7 +2470,9 @@ h5tools_dump_simple_dset(FILE *stream, const h5tool_format_t *info,
}
/* Check if we have VL data in the dataset's datatype */
- if (H5Tdetect_vlen_str(p_type) == TRUE)
+ if (h5tools_detect_vlen_str(p_type) == TRUE)
+ vl_data = TRUE;
+ if (H5Tdetect_class(p_type, H5T_VLEN) == TRUE)
vl_data = TRUE;
/*
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 9c100ea..6d054b8 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -553,7 +553,7 @@ H5TOOLS_DLL hid_t h5tools_get_native_type(hid_t type);
H5TOOLS_DLL hid_t h5tools_get_little_endian_type(hid_t type);
H5TOOLS_DLL hid_t h5tools_get_big_endian_type(hid_t type);
-H5TOOLS_DLL htri_t H5Tdetect_vlen_str(hid_t tid);
+H5TOOLS_DLL htri_t h5tools_detect_vlen_str(hid_t tid);
H5TOOLS_DLL void h5tools_dump_simple_data(FILE *stream, const h5tool_format_t *info, hid_t container,
h5tools_context_t *ctx/*in,out*/, unsigned flags,