summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-05-21 15:58:53 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-05-21 15:58:53 (GMT)
commit9e9bdad5e9b2e182264b3df446cc9534a87f783c (patch)
tree580edf31dd1b1616e73cbf53d3ed462a1ccb742f /tools
parentd77fc6af739944c0ebbc362d4710da4696dccad0 (diff)
downloadhdf5-9e9bdad5e9b2e182264b3df446cc9534a87f783c.zip
hdf5-9e9bdad5e9b2e182264b3df446cc9534a87f783c.tar.gz
hdf5-9e9bdad5e9b2e182264b3df446cc9534a87f783c.tar.bz2
[svn-r8563] *** empty log message ***
Diffstat (limited to 'tools')
-rw-r--r--tools/h5ls/h5ls.c172
-rw-r--r--tools/lib/h5tools.c8
-rw-r--r--tools/lib/h5tools.h5
-rw-r--r--tools/testfiles/tall-2A.h5.xml30
-rw-r--r--tools/testfiles/tall.h5bin8172 -> 11440 bytes
-rw-r--r--tools/testfiles/tall.h5.xml22
-rw-r--r--tools/testfiles/tattr-1.ddl6
-rw-r--r--tools/testfiles/tattr.h5bin1208 -> 3024 bytes
-rw-r--r--tools/testfiles/tattr.h5.xml17
-rw-r--r--tools/testfiles/tdset-1.ddl6
-rw-r--r--tools/testfiles/tdset-1.ls2
-rw-r--r--tools/testfiles/tdset-2.ddl8
-rw-r--r--tools/testfiles/tdset.h5bin7072 -> 9168 bytes
-rw-r--r--tools/testfiles/tdset.h5.xml27
-rw-r--r--tools/testfiles/tnamed_dtype_attr.h5bin1656 -> 1656 bytes
-rw-r--r--tools/testfiles/tnamed_dtype_attr.h5.xml2
16 files changed, 191 insertions, 114 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index d3c30ab..da0bca1 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -1320,86 +1320,101 @@ list_attr (hid_t obj, const char *attr_name, void UNUSED *op_data)
hsize_t temp_need;
void *buf;
h5dump_t info;
+ H5S_class_t space_type;
printf(" Attribute: ");
n = display_string(stdout, attr_name, TRUE);
printf("%*s", MAX(0, 9-n), "");
- if ((attr = H5Aopen_name(obj, attr_name))) {
- space = H5Aget_space(attr);
- type = H5Aget_type(attr);
- /* Data space */
- ndims = H5Sget_simple_extent_dims(space, size, NULL);
- if (0==ndims) {
- puts(" scalar");
- } else {
- printf(" {");
- for (i=0; i<ndims; i++) {
- HDfprintf(stdout, "%s%Hu", i?", ":"", size[i]);
- nelmts *= size[i];
- }
- puts("}");
- }
-
- /* Data type */
- printf(" Type: ");
- display_type(type, 15);
- putchar('\n');
-
- /* Data */
- memset(&info, 0, sizeof info);
- info.line_multi_new = 1;
- if (nelmts<5) {
- info.idx_fmt = "";
- info.line_1st = " Data: ";
- info.line_pre = " ";
- info.line_cont = " ";
- info.str_repeat = 8;
-
- } else {
- printf(" Data:\n");
- info.idx_fmt = "(%s)";
- info.line_pre = " %s ";
- info.line_cont = " %s ";
- info.str_repeat = 8;
- }
- info.line_ncols = width_g;
- if (label_g) info.cmpd_name = "%s=";
- if (string_g && 1==H5Tget_size(type) &&
- H5T_INTEGER==H5Tget_class(type)) {
- info.ascii = TRUE;
- info.elmt_suf1 = "";
- info.elmt_suf2 = "";
- info.idx_fmt = "(%s)";
- info.line_pre = " %s \"";
- info.line_suf = "\"";
- }
- /* values of type reference */
- info.obj_format = "-%lu:"H5_PRINTF_HADDR_FMT;
- info.obj_hidefileno = 0;
- if (hexdump_g) {
- p_type = H5Tcopy(type);
- } else {
- p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
- }
- if (p_type>=0) {
- temp_need= nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type));
- assert(temp_need==(hsize_t)((size_t)temp_need));
- need = (size_t)temp_need;
- buf = malloc(need);
- assert(buf);
- if (H5Aread(attr, p_type, buf)>=0) {
- h5tools_dump_mem(stdout, &info, attr, p_type, space, buf, -1);
- }
- free(buf);
- H5Tclose(p_type);
- }
-
- H5Sclose(space);
- H5Tclose(type);
- H5Aclose(attr);
+ if ((attr = H5Aopen_name(obj, attr_name))) {
+ space = H5Aget_space(attr);
+ type = H5Aget_type(attr);
+
+ /* Data space */
+ ndims = H5Sget_simple_extent_dims(space, size, NULL);
+ space_type = H5Sget_simple_extent_type(space);
+ switch (space_type) {
+ case H5S_SCALAR:
+ /* scalar dataspace */
+ puts(" scalar");
+ break;
+ case H5S_SIMPLE:
+ /* simple dataspace */
+ printf(" {");
+ for (i=0; i<ndims; i++) {
+ HDfprintf(stdout, "%s%Hu", i?", ":"", size[i]);
+ nelmts *= size[i];
+ }
+ puts("}");
+ break;
+ case H5S_NULL:
+ /* null dataspace */
+ puts(" null");
+ break;
+ }
+
+ /* Data type */
+ printf(" Type: ");
+ display_type(type, 15);
+ putchar('\n');
+
+ /* Data */
+ memset(&info, 0, sizeof info);
+ info.line_multi_new = 1;
+ if (nelmts<5) {
+ info.idx_fmt = "";
+ info.line_1st = " Data: ";
+ info.line_pre = " ";
+ info.line_cont = " ";
+ info.str_repeat = 8;
+
+ } else {
+ printf(" Data:\n");
+ info.idx_fmt = "(%s)";
+ info.line_pre = " %s ";
+ info.line_cont = " %s ";
+ info.str_repeat = 8;
+ }
+
+ info.line_ncols = width_g;
+ if (label_g) info.cmpd_name = "%s=";
+ if (string_g && 1==H5Tget_size(type) &&
+ H5T_INTEGER==H5Tget_class(type)) {
+ info.ascii = TRUE;
+ info.elmt_suf1 = "";
+ info.elmt_suf2 = "";
+ info.idx_fmt = "(%s)";
+ info.line_pre = " %s \"";
+ info.line_suf = "\"";
+ }
+
+ /* values of type reference */
+ info.obj_format = "-%lu:"H5_PRINTF_HADDR_FMT;
+ info.obj_hidefileno = 0;
+ if (hexdump_g) {
+ p_type = H5Tcopy(type);
+ } else {
+ p_type = H5Tget_native_type(type,H5T_DIR_DEFAULT);
+ }
+
+ if (p_type>=0) {
+ temp_need= nelmts * MAX(H5Tget_size(type), H5Tget_size(p_type));
+ assert(temp_need==(hsize_t)((size_t)temp_need));
+ need = (size_t)temp_need;
+ buf = malloc(need);
+ assert(buf);
+ if (H5Aread(attr, p_type, buf)>=0) {
+ h5tools_dump_mem(stdout, &info, attr, p_type, space, buf, -1);
+ }
+ free(buf);
+ H5Tclose(p_type);
+ }
+
+ H5Sclose(space);
+ H5Tclose(type);
+ H5Aclose(attr);
} else {
- putchar('\n');
+ putchar('\n');
}
return 0;
@@ -1430,13 +1445,15 @@ dataset_list1(hid_t dset)
{
hsize_t cur_size[64]; /* current dataset dimensions */
hsize_t max_size[64]; /* maximum dataset dimensions */
- hid_t space; /* data space */
- int ndims; /* dimensionality */
+ hid_t space; /* data space */
+ int ndims; /* dimensionality */
+ H5S_class_t space_type; /* type of dataspace */
int i;
/* Information that goes on the same row as the name. The name has
* already been printed. */
space = H5Dget_space(dset);
+ space_type = H5Sget_simple_extent_type(space);
ndims = H5Sget_simple_extent_dims(space, cur_size, max_size);
printf (" {");
for (i=0; i<ndims; i++) {
@@ -1447,7 +1464,8 @@ dataset_list1(hid_t dset)
HDfprintf(stdout, "/%Hu", max_size[i]);
}
}
- if (0==ndims) printf("SCALAR");
+ if (space_type==H5S_SCALAR) printf("SCALAR");
+ else if (space_type==H5S_NULL) printf("NULL");
putchar('}');
H5Sclose (space);
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 3a5b68a..6941c43 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -1098,6 +1098,7 @@ h5tools_dump_dset(FILE *stream, const h5dump_t *info, hid_t dset, hid_t _p_type,
hid_t f_space;
hid_t p_type = _p_type;
hid_t f_type;
+ H5S_class_t space_type;
int status = FAIL;
h5dump_t info_dflt;
@@ -1127,15 +1128,18 @@ h5tools_dump_dset(FILE *stream, const h5dump_t *info, hid_t dset, hid_t _p_type,
/* Check the data space */
f_space = H5Dget_space(dset);
+ space_type = H5Sget_simple_extent_type(f_space);
+
/* Print the data */
- if (H5Sis_simple(f_space) > 0) {
+ if (space_type == H5S_SIMPLE || space_type == H5S_SCALAR) {
if (!sset)
status = h5tools_dump_simple_dset(rawdatastream, info, dset, p_type,
indentlevel);
else
status = h5tools_dump_simple_subset(rawdatastream, info, dset, p_type,
sset, indentlevel);
- }
+ } else /* space is H5S_NULL */
+ status = SUCCEED;
/* Close the dataspace */
H5Sclose(f_space);
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 143685f..ce4b6f6 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -455,8 +455,9 @@ extern FILE *rawdatastream; /*output stream for raw data */
#define NLINK "NLINK"
#define OBJID "OBJECTID"
#define OBJNO "OBJNO"
-#define SCALAR "SCALAR"
-#define SIMPLE "SIMPLE"
+#define S_SCALAR "SCALAR"
+#define S_SIMPLE "SIMPLE"
+#define S_NULL "NULL"
#define SOFTLINK "SOFTLINK"
#define STORAGELAYOUT "STORAGELAYOUT"
#define START "START"
diff --git a/tools/testfiles/tall-2A.h5.xml b/tools/testfiles/tall-2A.h5.xml
index 8f2853d..dfa5c979 100644
--- a/tools/testfiles/tall-2A.h5.xml
+++ b/tools/testfiles/tall-2A.h5.xml
@@ -3,7 +3,7 @@ Expected output for 'h5dump --xml -A tall.h5'
#############################
<?xml version="1.0" encoding="UTF-8"?>
<hdf5:HDF5-File xmlns:hdf5="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hdf.ncsa.uiuc.edu/DTDs/HDF5File http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd">
-<hdf5:RootGroup OBJ-XID="xid_696" H5Path="/">
+<hdf5:RootGroup OBJ-XID="xid_928" H5Path="/">
<hdf5:Attribute Name="attr1">
<hdf5:Dataspace>
<hdf5:SimpleDataspace Ndims="1">
@@ -40,9 +40,9 @@ Expected output for 'h5dump --xml -A tall.h5'
</hdf5:DataFromFile>
</hdf5:Data>
</hdf5:Attribute>
- <hdf5:Group Name="g1" OBJ-XID="xid_1344" H5Path="/g1" Parents="xid_696" H5ParentPaths="/" >
- <hdf5:Group Name="g1.1" OBJ-XID="xid_2968" H5Path="/g1/g1.1" Parents="xid_1344" H5ParentPaths="/g1" >
- <hdf5:Dataset Name="dset1.1.1" OBJ-XID="xid_4968" H5Path= "/g1/g1.1/dset1.1.1" Parents="xid_2968" H5ParentPaths="/g1/g1.1">
+ <hdf5:Group Name="g1" OBJ-XID="xid_1576" H5Path="/g1" Parents="xid_928" H5ParentPaths="/" >
+ <hdf5:Group Name="g1.1" OBJ-XID="xid_3200" H5Path="/g1/g1.1" Parents="xid_1576" H5ParentPaths="/g1" >
+ <hdf5:Dataset Name="dset1.1.1" OBJ-XID="xid_5200" H5Path= "/g1/g1.1/dset1.1.1" Parents="xid_3200" H5ParentPaths="/g1/g1.1">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
@@ -99,10 +99,10 @@ Expected output for 'h5dump --xml -A tall.h5'
</hdf5:Data>
</hdf5:Attribute>
<hdf5:Data>
- <hdf5:NoData/>
+ <hdf5:NoData/>
</hdf5:Data>
</hdf5:Dataset>
- <hdf5:Dataset Name="dset1.1.2" OBJ-XID="xid_5968" H5Path= "/g1/g1.1/dset1.1.2" Parents="xid_2968" H5ParentPaths="/g1/g1.1">
+ <hdf5:Dataset Name="dset1.1.2" OBJ-XID="xid_5800" H5Path= "/g1/g1.1/dset1.1.2" Parents="xid_3200" H5ParentPaths="/g1/g1.1">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
@@ -122,18 +122,18 @@ Expected output for 'h5dump --xml -A tall.h5'
</hdf5:AtomicType>
</hdf5:DataType>
<hdf5:Data>
- <hdf5:NoData/>
+ <hdf5:NoData/>
</hdf5:Data>
</hdf5:Dataset>
</hdf5:Group>
- <hdf5:Group Name="g1.2" OBJ-XID="xid_3944" H5Path="/g1/g1.2" Parents="xid_1344" H5ParentPaths="/g1" >
- <hdf5:Group Name="g1.2.1" OBJ-XID="xid_4592" H5Path="/g1/g1.2/g1.2.1" Parents="xid_3944" H5ParentPaths="/g1/g1.2" >
- <hdf5:SoftLink LinkName="slink" OBJ-XID="xid_18446744073709551614" H5SourcePath="/g1/g1.2/g1.2.1/slink" TargetPath="somevalue" Parents="xid_4592" H5ParentPaths="/g1/g1.2/g1.2.1" />
+ <hdf5:Group Name="g1.2" OBJ-XID="xid_4176" H5Path="/g1/g1.2" Parents="xid_1576" H5ParentPaths="/g1" >
+ <hdf5:Group Name="g1.2.1" OBJ-XID="xid_4824" H5Path="/g1/g1.2/g1.2.1" Parents="xid_4176" H5ParentPaths="/g1/g1.2" >
+ <hdf5:SoftLink LinkName="slink" OBJ-XID="xid_18446744073709551614" H5SourcePath="/g1/g1.2/g1.2.1/slink" TargetPath="somevalue" Parents="xid_4824" H5ParentPaths="/g1/g1.2/g1.2.1" />
</hdf5:Group>
</hdf5:Group>
</hdf5:Group>
- <hdf5:Group Name="g2" OBJ-XID="xid_2320" H5Path="/g2" Parents="xid_696" H5ParentPaths="/" >
- <hdf5:Dataset Name="dset2.1" OBJ-XID="xid_6648" H5Path= "/g2/dset2.1" Parents="xid_2320" H5ParentPaths="/g2">
+ <hdf5:Group Name="g2" OBJ-XID="xid_2552" H5Path="/g2" Parents="xid_928" H5ParentPaths="/" >
+ <hdf5:Dataset Name="dset2.1" OBJ-XID="xid_8520" H5Path= "/g2/dset2.1" Parents="xid_2552" H5ParentPaths="/g2">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
@@ -153,10 +153,10 @@ Expected output for 'h5dump --xml -A tall.h5'
</hdf5:AtomicType>
</hdf5:DataType>
<hdf5:Data>
- <hdf5:NoData/>
+ <hdf5:NoData/>
</hdf5:Data>
</hdf5:Dataset>
- <hdf5:Dataset Name="dset2.2" OBJ-XID="xid_7288" H5Path= "/g2/dset2.2" Parents="xid_2320" H5ParentPaths="/g2">
+ <hdf5:Dataset Name="dset2.2" OBJ-XID="xid_9120" H5Path= "/g2/dset2.2" Parents="xid_2552" H5ParentPaths="/g2">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
@@ -177,7 +177,7 @@ Expected output for 'h5dump --xml -A tall.h5'
</hdf5:AtomicType>
</hdf5:DataType>
<hdf5:Data>
- <hdf5:NoData/>
+ <hdf5:NoData/>
</hdf5:Data>
</hdf5:Dataset>
</hdf5:Group>
diff --git a/tools/testfiles/tall.h5 b/tools/testfiles/tall.h5
index 82529d3..2bc4993 100644
--- a/tools/testfiles/tall.h5
+++ b/tools/testfiles/tall.h5
Binary files differ
diff --git a/tools/testfiles/tall.h5.xml b/tools/testfiles/tall.h5.xml
index dc31aad..22e6f51 100644
--- a/tools/testfiles/tall.h5.xml
+++ b/tools/testfiles/tall.h5.xml
@@ -3,7 +3,7 @@ Expected output for 'h5dump --xml tall.h5'
#############################
<?xml version="1.0" encoding="UTF-8"?>
<hdf5:HDF5-File xmlns:hdf5="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hdf.ncsa.uiuc.edu/DTDs/HDF5File http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd">
-<hdf5:RootGroup OBJ-XID="xid_696" H5Path="/">
+<hdf5:RootGroup OBJ-XID="xid_928" H5Path="/">
<hdf5:Attribute Name="attr1">
<hdf5:Dataspace>
<hdf5:SimpleDataspace Ndims="1">
@@ -40,9 +40,9 @@ Expected output for 'h5dump --xml tall.h5'
</hdf5:DataFromFile>
</hdf5:Data>
</hdf5:Attribute>
- <hdf5:Group Name="g1" OBJ-XID="xid_1344" H5Path="/g1" Parents="xid_696" H5ParentPaths="/" >
- <hdf5:Group Name="g1.1" OBJ-XID="xid_2968" H5Path="/g1/g1.1" Parents="xid_1344" H5ParentPaths="/g1" >
- <hdf5:Dataset Name="dset1.1.1" OBJ-XID="xid_4968" H5Path= "/g1/g1.1/dset1.1.1" Parents="xid_2968" H5ParentPaths="/g1/g1.1">
+ <hdf5:Group Name="g1" OBJ-XID="xid_1576" H5Path="/g1" Parents="xid_928" H5ParentPaths="/" >
+ <hdf5:Group Name="g1.1" OBJ-XID="xid_3200" H5Path="/g1/g1.1" Parents="xid_1576" H5ParentPaths="/g1" >
+ <hdf5:Dataset Name="dset1.1.1" OBJ-XID="xid_5200" H5Path= "/g1/g1.1/dset1.1.1" Parents="xid_3200" H5ParentPaths="/g1/g1.1">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
@@ -113,7 +113,7 @@ Expected output for 'h5dump --xml tall.h5'
</hdf5:DataFromFile>
</hdf5:Data>
</hdf5:Dataset>
- <hdf5:Dataset Name="dset1.1.2" OBJ-XID="xid_5968" H5Path= "/g1/g1.1/dset1.1.2" Parents="xid_2968" H5ParentPaths="/g1/g1.1">
+ <hdf5:Dataset Name="dset1.1.2" OBJ-XID="xid_5800" H5Path= "/g1/g1.1/dset1.1.2" Parents="xid_3200" H5ParentPaths="/g1/g1.1">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
@@ -139,14 +139,14 @@ Expected output for 'h5dump --xml tall.h5'
</hdf5:Data>
</hdf5:Dataset>
</hdf5:Group>
- <hdf5:Group Name="g1.2" OBJ-XID="xid_3944" H5Path="/g1/g1.2" Parents="xid_1344" H5ParentPaths="/g1" >
- <hdf5:Group Name="g1.2.1" OBJ-XID="xid_4592" H5Path="/g1/g1.2/g1.2.1" Parents="xid_3944" H5ParentPaths="/g1/g1.2" >
- <hdf5:SoftLink LinkName="slink" OBJ-XID="xid_18446744073709551614" H5SourcePath="/g1/g1.2/g1.2.1/slink" TargetPath="somevalue" Parents="xid_4592" H5ParentPaths="/g1/g1.2/g1.2.1" />
+ <hdf5:Group Name="g1.2" OBJ-XID="xid_4176" H5Path="/g1/g1.2" Parents="xid_1576" H5ParentPaths="/g1" >
+ <hdf5:Group Name="g1.2.1" OBJ-XID="xid_4824" H5Path="/g1/g1.2/g1.2.1" Parents="xid_4176" H5ParentPaths="/g1/g1.2" >
+ <hdf5:SoftLink LinkName="slink" OBJ-XID="xid_18446744073709551614" H5SourcePath="/g1/g1.2/g1.2.1/slink" TargetPath="somevalue" Parents="xid_4824" H5ParentPaths="/g1/g1.2/g1.2.1" />
</hdf5:Group>
</hdf5:Group>
</hdf5:Group>
- <hdf5:Group Name="g2" OBJ-XID="xid_2320" H5Path="/g2" Parents="xid_696" H5ParentPaths="/" >
- <hdf5:Dataset Name="dset2.1" OBJ-XID="xid_6648" H5Path= "/g2/dset2.1" Parents="xid_2320" H5ParentPaths="/g2">
+ <hdf5:Group Name="g2" OBJ-XID="xid_2552" H5Path="/g2" Parents="xid_928" H5ParentPaths="/" >
+ <hdf5:Dataset Name="dset2.1" OBJ-XID="xid_8520" H5Path= "/g2/dset2.1" Parents="xid_2552" H5ParentPaths="/g2">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
@@ -171,7 +171,7 @@ Expected output for 'h5dump --xml tall.h5'
</hdf5:DataFromFile>
</hdf5:Data>
</hdf5:Dataset>
- <hdf5:Dataset Name="dset2.2" OBJ-XID="xid_7288" H5Path= "/g2/dset2.2" Parents="xid_2320" H5ParentPaths="/g2">
+ <hdf5:Dataset Name="dset2.2" OBJ-XID="xid_9120" H5Path= "/g2/dset2.2" Parents="xid_2552" H5ParentPaths="/g2">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
diff --git a/tools/testfiles/tattr-1.ddl b/tools/testfiles/tattr-1.ddl
index b5b8afe..ad473af 100644
--- a/tools/testfiles/tattr-1.ddl
+++ b/tools/testfiles/tattr-1.ddl
@@ -44,5 +44,11 @@ GROUP "/" {
"string attribute"
}
}
+ ATTRIBUTE "attr6" {
+ DATATYPE H5T_STD_U32LE
+ DATASPACE NULL
+ DATA {
+ }
+ }
}
}
diff --git a/tools/testfiles/tattr.h5 b/tools/testfiles/tattr.h5
index 2c7e60a..4314cdf 100644
--- a/tools/testfiles/tattr.h5
+++ b/tools/testfiles/tattr.h5
Binary files differ
diff --git a/tools/testfiles/tattr.h5.xml b/tools/testfiles/tattr.h5.xml
index 0fe7642..0fbb833 100644
--- a/tools/testfiles/tattr.h5.xml
+++ b/tools/testfiles/tattr.h5.xml
@@ -3,7 +3,7 @@ Expected output for 'h5dump --xml tattr.h5'
#############################
<?xml version="1.0" encoding="UTF-8"?>
<hdf5:HDF5-File xmlns:hdf5="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hdf.ncsa.uiuc.edu/DTDs/HDF5File http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd">
-<hdf5:RootGroup OBJ-XID="xid_696" H5Path="/">
+<hdf5:RootGroup OBJ-XID="xid_928" H5Path="/">
<hdf5:Attribute Name="attr1">
<hdf5:Dataspace>
<hdf5:SimpleDataspace Ndims="1">
@@ -86,5 +86,20 @@ Expected output for 'h5dump --xml tattr.h5'
</hdf5:DataFromFile>
</hdf5:Data>
</hdf5:Attribute>
+ <hdf5:Attribute Name="attr6">
+ <hdf5:Dataspace>
+ <hdf5:NullDataspace />
+ </hdf5:Dataspace>
+ <hdf5:DataType>
+ <hdf5:AtomicType>
+ <hdf5:IntegerType ByteOrder="LE" Sign="false" Size="4" />
+ </hdf5:AtomicType>
+ </hdf5:DataType>
+ <hdf5:Data>
+ <hdf5:DataFromFile>
+ <hdf5:NoData/>
+ </hdf5:DataFromFile>
+ </hdf5:Data>
+ </hdf5:Attribute>
</hdf5:RootGroup>
</hdf5:HDF5-File>
diff --git a/tools/testfiles/tdset-1.ddl b/tools/testfiles/tdset-1.ddl
index cbec6aa..68dc8a8 100644
--- a/tools/testfiles/tdset-1.ddl
+++ b/tools/testfiles/tdset-1.ddl
@@ -122,5 +122,11 @@ GROUP "/" {
29.0016, 29.0017, 29.0018, 29.0019
}
}
+ DATASET "dset3" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE NULL
+ DATA {
+ }
+ }
}
}
diff --git a/tools/testfiles/tdset-1.ls b/tools/testfiles/tdset-1.ls
index 6853429..dad8ef6 100644
--- a/tools/testfiles/tdset-1.ls
+++ b/tools/testfiles/tdset-1.ls
@@ -99,3 +99,5 @@
(28,19) 28.0019, 29, 29.0001, 29.0002, 29.0003, 29.0004, 29.0005,
(29,6) 29.0006, 29.0007, 29.0008, 29.0009, 29.001, 29.0011, 29.0012,
(29,13) 29.0013, 29.0014, 29.0015, 29.0016, 29.0017, 29.0018, 29.0019
+/dset3 Dataset {NULL}
+ Data:
diff --git a/tools/testfiles/tdset-2.ddl b/tools/testfiles/tdset-2.ddl
index 93c961c..0ddcb33 100644
--- a/tools/testfiles/tdset-2.ddl
+++ b/tools/testfiles/tdset-2.ddl
@@ -1,5 +1,5 @@
#############################
-Expected output for 'h5dump -H -d dset1 -d /dset2 --dataset=dset3 tdset.h5'
+Expected output for 'h5dump -H -d dset1 -d /dset2 -d dset3 --dataset=dset4 tdset.h5'
#############################
HDF5 "tdset.h5" {
DATASET "dset1" {
@@ -11,6 +11,10 @@ DATASET "/dset2" {
DATASPACE SIMPLE { ( 30, 20 ) / ( 30, 20 ) }
}
DATASET "dset3" {
+ DATATYPE H5T_STD_I32BE
+ DATASPACE NULL
+}
+DATASET "dset4" {
}
}
-h5dump error: unable to open dataset "dset3"
+h5dump error: unable to open dataset "dset4"
diff --git a/tools/testfiles/tdset.h5 b/tools/testfiles/tdset.h5
index 9c6815e..c3b7c9c 100644
--- a/tools/testfiles/tdset.h5
+++ b/tools/testfiles/tdset.h5
Binary files differ
diff --git a/tools/testfiles/tdset.h5.xml b/tools/testfiles/tdset.h5.xml
index 7781d1d..2af4a8c 100644
--- a/tools/testfiles/tdset.h5.xml
+++ b/tools/testfiles/tdset.h5.xml
@@ -3,8 +3,8 @@ Expected output for 'h5dump --xml tdset.h5'
#############################
<?xml version="1.0" encoding="UTF-8"?>
<hdf5:HDF5-File xmlns:hdf5="http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://hdf.ncsa.uiuc.edu/DTDs/HDF5File http://hdf.ncsa.uiuc.edu/DTDs/HDF5-File.xsd">
-<hdf5:RootGroup OBJ-XID="xid_696" H5Path="/">
- <hdf5:Dataset Name="dset1" OBJ-XID="xid_744" H5Path= "/dset1" Parents="xid_696" H5ParentPaths="/">
+<hdf5:RootGroup OBJ-XID="xid_928" H5Path="/">
+ <hdf5:Dataset Name="dset1" OBJ-XID="xid_976" H5Path= "/dset1" Parents="xid_928" H5ParentPaths="/">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
@@ -39,7 +39,7 @@ Expected output for 'h5dump --xml tdset.h5'
</hdf5:DataFromFile>
</hdf5:Data>
</hdf5:Dataset>
- <hdf5:Dataset Name="dset2" OBJ-XID="xid_1984" H5Path= "/dset2" Parents="xid_696" H5ParentPaths="/">
+ <hdf5:Dataset Name="dset2" OBJ-XID="xid_1576" H5Path= "/dset2" Parents="xid_928" H5ParentPaths="/">
<hdf5:StorageLayout>
<hdf5:ContiguousLayout/>
</hdf5:StorageLayout>
@@ -144,5 +144,26 @@ Expected output for 'h5dump --xml tdset.h5'
</hdf5:DataFromFile>
</hdf5:Data>
</hdf5:Dataset>
+ <hdf5:Dataset Name="dset3" OBJ-XID="xid_8896" H5Path= "/dset3" Parents="xid_928" H5ParentPaths="/">
+ <hdf5:StorageLayout>
+ <hdf5:ContiguousLayout/>
+ </hdf5:StorageLayout>
+ <hdf5:FillValueInfo FillTime="FillIfSet" AllocationTime="Late">
+ <hdf5:FillValue>
+ <hdf5:NoFill/>
+ </hdf5:FillValue>
+ </hdf5:FillValueInfo>
+ <hdf5:Dataspace>
+ <hdf5:NullDataspace />
+ </hdf5:Dataspace>
+ <hdf5:DataType>
+ <hdf5:AtomicType>
+ <hdf5:IntegerType ByteOrder="BE" Sign="true" Size="4" />
+ </hdf5:AtomicType>
+ </hdf5:DataType>
+ <hdf5:Data>
+ <hdf5:NoData/>
+ </hdf5:Data>
+ </hdf5:Dataset>
</hdf5:RootGroup>
</hdf5:HDF5-File>
diff --git a/tools/testfiles/tnamed_dtype_attr.h5 b/tools/testfiles/tnamed_dtype_attr.h5
index 4e136e5..cb40ddc 100644
--- a/tools/testfiles/tnamed_dtype_attr.h5
+++ b/tools/testfiles/tnamed_dtype_attr.h5
Binary files differ
diff --git a/tools/testfiles/tnamed_dtype_attr.h5.xml b/tools/testfiles/tnamed_dtype_attr.h5.xml
index 38700db..329d3ac 100644
--- a/tools/testfiles/tnamed_dtype_attr.h5.xml
+++ b/tools/testfiles/tnamed_dtype_attr.h5.xml
@@ -36,7 +36,7 @@ Expected output for 'h5dump --xml tnamed_dtype_attr.h5'
</hdf5:Data>
</hdf5:Attribute>
<hdf5:Data>
- <hdf5:NoData/>
+ <hdf5:NoData/>
</hdf5:Data>
</hdf5:Dataset>
</hdf5:RootGroup>