Skip to content

Commit

Permalink
Make h5dump spacing consistent when printing VLEN datatype (#3351)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhendersonHDF authored Aug 4, 2023
1 parent d6ada85 commit 915cadb
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion tools/lib/h5tools_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -2571,7 +2571,7 @@ h5tools_print_datatype(FILE *stream, h5tools_str_t *buffer, const h5tool_format_
if (H5Tclose(super) < 0)
H5TOOLS_ERROR((-1), "H5Tclose failed");

h5tools_str_append(buffer, "%s", h5tools_dump_header_format->vlenblockend);
h5tools_str_append(buffer, " %s", h5tools_dump_header_format->vlenblockend);

break;

Expand Down
2 changes: 1 addition & 1 deletion tools/testfiles/tarray6.ddl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HDF5 "tarray6.h5" {
GROUP "/" {
DATASET "Dataset1" {
DATATYPE H5T_ARRAY { [4] H5T_VLEN { H5T_STD_U32LE} }
DATATYPE H5T_ARRAY { [4] H5T_VLEN { H5T_STD_U32LE } }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): [ (0), (10, 11), (20, 21, 22), (30, 31, 32, 33) ],
Expand Down
2 changes: 1 addition & 1 deletion tools/testfiles/tarray7.ddl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HDF5 "tarray7.h5" {
GROUP "/" {
DATASET "Dataset1" {
DATATYPE H5T_ARRAY { [4] H5T_VLEN { H5T_ARRAY { [4] H5T_STD_U32LE }} }
DATATYPE H5T_ARRAY { [4] H5T_VLEN { H5T_ARRAY { [4] H5T_STD_U32LE } } }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): [ ([ 0, 1, 2, 3 ]),
Expand Down
2 changes: 1 addition & 1 deletion tools/testfiles/tempty.ddl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HDF5 "tempty.h5" {
GROUP "/" {
DATASET "Dataset1.0" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): (), (), (), ()
Expand Down
2 changes: 1 addition & 1 deletion tools/testfiles/tfill.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ GROUP "/" {
}
}
DATASET "fill_vlen" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
STORAGE_LAYOUT {
CONTIGUOUS
Expand Down
4 changes: 2 additions & 2 deletions tools/testfiles/tmultifile.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ DATASET "Dataset1" {
}
HDF5 "tarray6.h5" {
DATASET "Dataset1" {
DATATYPE H5T_ARRAY { [4] H5T_VLEN { H5T_STD_U32LE} }
DATATYPE H5T_ARRAY { [4] H5T_VLEN { H5T_STD_U32LE } }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
}
}
HDF5 "tarray7.h5" {
DATASET "Dataset1" {
DATATYPE H5T_ARRAY { [4] H5T_VLEN { H5T_ARRAY { [4] H5T_STD_U32LE }} }
DATATYPE H5T_ARRAY { [4] H5T_VLEN { H5T_ARRAY { [4] H5T_STD_U32LE } } }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
}
}
24 changes: 12 additions & 12 deletions tools/testfiles/treference.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,14 @@ GROUP "/" {
}
}
ATTRIBUTE "vlen" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
DATA {
(0): (1), (2, 3)
}
}
ATTRIBUTE "vlen2D" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 3, 2 ) / ( 3, 2 ) }
DATA {
(0,0): (0), (1),
Expand All @@ -443,7 +443,7 @@ GROUP "/" {
}
}
ATTRIBUTE "vlen3D" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 4, 3, 2 ) / ( 4, 3, 2 ) }
DATA {
(0,0,0): (0), (1),
Expand Down Expand Up @@ -1039,14 +1039,14 @@ GROUP "/" {
}
}
ATTRIBUTE "vlen" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
DATA {
(0): (1), (2, 3)
}
}
ATTRIBUTE "vlen2D" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 3, 2 ) / ( 3, 2 ) }
DATA {
(0,0): (0), (1),
Expand All @@ -1055,7 +1055,7 @@ GROUP "/" {
}
}
ATTRIBUTE "vlen3D" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 4, 3, 2 ) / ( 4, 3, 2 ) }
DATA {
(0,0,0): (0), (1),
Expand Down Expand Up @@ -1501,14 +1501,14 @@ GROUP "/" {
}
}
ATTRIBUTE "vlen" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
DATA {
(0): (1), (2, 3)
}
}
ATTRIBUTE "vlen2D" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 3, 2 ) / ( 3, 2 ) }
DATA {
(0,0): (0), (1),
Expand All @@ -1517,7 +1517,7 @@ GROUP "/" {
}
}
ATTRIBUTE "vlen3D" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 4, 3, 2 ) / ( 4, 3, 2 ) }
DATA {
(0,0,0): (0), (1),
Expand Down Expand Up @@ -2109,14 +2109,14 @@ GROUP "/" {
}
}
DATASET "vlen" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 2 ) / ( 2 ) }
DATA {
(0): (1), (2, 3)
}
}
DATASET "vlen2D" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 3, 2 ) / ( 3, 2 ) }
DATA {
(0,0): (0), (1),
Expand All @@ -2125,7 +2125,7 @@ GROUP "/" {
}
}
DATASET "vlen3D" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 4, 3, 2 ) / ( 4, 3, 2 ) }
DATA {
(0,0,0): (0), (1),
Expand Down
6 changes: 3 additions & 3 deletions tools/testfiles/tvldtypes1.ddl
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
HDF5 "tvldtypes1.h5" {
GROUP "/" {
DATASET "Dataset1.0" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): (0), (10, 11), (20, 21, 22), (30, 31, 32, 33)
}
}
DATASET "Dataset2.0" {
DATATYPE H5T_VLEN { H5T_IEEE_F32LE}
DATATYPE H5T_VLEN { H5T_IEEE_F32LE }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): (0), (10, 10.1), (20, 20.1, 20.2), (30, 30.1, 30.2, 30.3)
}
}
DATASET "Dataset3.0" {
DATATYPE H5T_VLEN { H5T_STD_I32LE}
DATATYPE H5T_VLEN { H5T_STD_I32LE }
DATASPACE SCALAR
DATA {
(0): (0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72)
Expand Down
2 changes: 1 addition & 1 deletion tools/testfiles/tvldtypes2.ddl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HDF5 "tvldtypes2.h5" {
GROUP "/" {
DATASET "Dataset1" {
DATATYPE H5T_VLEN { H5T_VLEN { H5T_STD_U32LE}}
DATATYPE H5T_VLEN { H5T_VLEN { H5T_STD_U32LE } }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): ((0)), ((100), (110, 111)), ((200), (210, 211), (220, 221, 222)),
Expand Down
2 changes: 1 addition & 1 deletion tools/testfiles/tvldtypes3.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GROUP "/" {
DATATYPE H5T_COMPOUND {
H5T_STD_I32LE "i";
H5T_IEEE_F32LE "f";
H5T_VLEN { H5T_STD_U32LE} "v";
H5T_VLEN { H5T_STD_U32LE } "v";
}
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
Expand Down
2 changes: 1 addition & 1 deletion tools/testfiles/tvldtypes4.ddl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ GROUP "/" {
DATATYPE H5T_VLEN { H5T_COMPOUND {
H5T_STD_I32LE "i";
H5T_IEEE_F32LE "f";
}}
} }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): ({
Expand Down
2 changes: 1 addition & 1 deletion tools/testfiles/tvldtypes5.ddl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HDF5 "tvldtypes5.h5" {
GROUP "/" {
DATASET "Dataset" {
DATATYPE H5T_VLEN { H5T_STD_U32LE}
DATATYPE H5T_VLEN { H5T_STD_U32LE }
DATASPACE SIMPLE { ( 4 ) / ( 4 ) }
DATA {
(0): (0, 2, 4, 6, 8), (), (0, 2, 4, 6, 8, 10, 12), ()
Expand Down

0 comments on commit 915cadb

Please sign in to comment.