summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-01-15 20:41:32 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-01-15 20:41:32 (GMT)
commitc516bc9a85b1d98ddb3bb728a79cb8b81f3e27ed (patch)
tree914b53147887607df6aafa3e7b73e74b822a3796 /tools
parent4a3be416432f60f81c54deb1b3b5e61e8af2c28a (diff)
downloadhdf5-c516bc9a85b1d98ddb3bb728a79cb8b81f3e27ed.zip
hdf5-c516bc9a85b1d98ddb3bb728a79cb8b81f3e27ed.tar.gz
hdf5-c516bc9a85b1d98ddb3bb728a79cb8b81f3e27ed.tar.bz2
[svn-r8071] Purpose: bug fix
Description: h5dump and h5ls cannot handle special characters when data is enum type. Platforms tested: h5committest
Diffstat (limited to 'tools')
-rw-r--r--tools/h5dump/h5dumpgentest.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c
index 002cf89..8eb50e1 100644
--- a/tools/h5dump/h5dumpgentest.c
+++ b/tools/h5dump/h5dumpgentest.c
@@ -1479,13 +1479,13 @@ static void gent_enum(void)
file = H5Fcreate(FILE15,H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT);
-
+ /* Try to test names with special characters */
type = H5Tcreate(H5T_ENUM, sizeof(enumtype));
H5Tenum_insert(type, "RED", (val = 0, &val));
- H5Tenum_insert(type, "GREEN", (val = 1, &val));
- H5Tenum_insert(type, "BLUE", (val = 2, &val));
- H5Tenum_insert(type, "WHITE", (val = 3, &val));
- H5Tenum_insert(type, "BLACK", (val = 4, &val));
+ H5Tenum_insert(type, "GREEN\ngreen", (val = 1, &val));
+ H5Tenum_insert(type, "BLUE blue", (val = 2, &val));
+ H5Tenum_insert(type, "WHITE \"white\"", (val = 3, &val));
+ H5Tenum_insert(type, "BLACK \'black\'", (val = 4, &val));
H5Tcommit(file, "enum normal", type);
space = H5Screate_simple(1,size,NULL);
@@ -3940,8 +3940,8 @@ static void write_dset_in(hid_t loc_id,
static void gent_attr_all(void)
{
- hid_t file_id;
- hid_t dset_id;
+ hid_t file_id;
+ hid_t dset_id;
hid_t group_id;
hid_t group2_id;
hid_t root_id;