summaryrefslogtreecommitdiffstats
path: root/tools/h5dump
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-10-05 14:31:14 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-10-05 14:31:14 (GMT)
commit7ba45c05b3e9345bc8d77a5d205bb41086b78f1e (patch)
treee8b2ff9381a5c47415eee3941dc66ff6907d8354 /tools/h5dump
parent71737e02ec70bbfd85ae4eb3f9a16d31b0f9789f (diff)
downloadhdf5-7ba45c05b3e9345bc8d77a5d205bb41086b78f1e.zip
hdf5-7ba45c05b3e9345bc8d77a5d205bb41086b78f1e.tar.gz
hdf5-7ba45c05b3e9345bc8d77a5d205bb41086b78f1e.tar.bz2
[svn-r9364]
Purpose: change feature Description: Back up support bitfield and time datatypes in H5Tget_native_type.Leave it to future support. Let it return "not supported" error message for now. Platforms tested: h5committest and fuss. Misc. update: RELEASE.txt
Diffstat (limited to 'tools/h5dump')
-rw-r--r--tools/h5dump/h5dump.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c
index e370478..eabbd61 100644
--- a/tools/h5dump/h5dump.c
+++ b/tools/h5dump/h5dump.c
@@ -1948,8 +1948,15 @@ dump_data(hid_t obj_id, int obj_data, struct subset_t *sset, int pindex)
if(space_type == H5S_NULL || space_type == H5S_NO_CLASS || space_type == H5S_COMPLEX) {
status = SUCCEED;
} else {
+ H5T_class_t type_class;
+
type = H5Aget_type(obj_id);
- p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
+ type_class = H5Tget_class(type);
+ if(type_class==H5T_BITFIELD)
+ p_type=H5Tcopy(type);
+ else
+ p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
+
ndims = H5Sget_simple_extent_dims(space, size, NULL);
for (i = 0; i < ndims; i++)
@@ -2061,10 +2068,17 @@ static void dump_fill_value(hid_t dcpl,hid_t type_id, hid_t obj_id)
int nelmts=1;
h5dump_t *outputformat = &dataformat;
hid_t n_type;
+ H5T_class_t type_class;
memset(&ctx, 0, sizeof(ctx));
ctx.indent_level=2;
- n_type = H5Tget_native_type(type_id,H5T_DIR_DEFAULT);
+
+ type_class = H5Tget_class(type_id);
+ if(type_class==H5T_BITFIELD)
+ n_type=H5Tcopy(type_id);
+ else
+ n_type = H5Tget_native_type(type_id,H5T_DIR_DEFAULT);
+
size = H5Tget_size(n_type);
buf = malloc(size);
@@ -4835,7 +4849,14 @@ xml_dump_data(hid_t obj_id, int obj_data, struct subset_t UNUSED * sset, int UNU
status = xml_print_strs(obj_id, ATTRIBUTE_DATA);
} else {
/* all other data */
- p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
+ H5T_class_t type_class;
+
+ type_class = H5Tget_class(type);
+ if(type_class==H5T_BITFIELD)
+ p_type=H5Tcopy(type);
+ else
+ p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
+
H5Tclose(type);
space = H5Aget_space(obj_id);