diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-06-05 20:03:56 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2008-06-05 20:03:56 (GMT) |
commit | 5d5a9e0eddd73beb435b78d53bad4c0ce3a31b99 (patch) | |
tree | e8214fb594f8b0583f69453db37a9b9ed37e2656 | |
parent | 125b83fc5f3873f8f2d9242ae6b5db29e36b2763 (diff) | |
download | hdf5-5d5a9e0eddd73beb435b78d53bad4c0ce3a31b99.zip hdf5-5d5a9e0eddd73beb435b78d53bad4c0ce3a31b99.tar.gz hdf5-5d5a9e0eddd73beb435b78d53bad4c0ce3a31b99.tar.bz2 |
[svn-r15155]
Fix for #1169
http://bugzilla.hdfgroup.uiuc.edu/show_bug.cgi?id=1169
don't print attributes to stdout when doing binary output
added an attribute to the file run on the binary output test
tested: windows, linux
-rw-r--r-- | tools/h5dump/h5dump.c | 11 | ||||
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 5 | ||||
-rw-r--r-- | tools/testfiles/tbinary.h5 | bin | 4368 -> 4368 bytes |
3 files changed, 12 insertions, 4 deletions
diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 4a2727d..168f74d 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -1858,9 +1858,14 @@ dump_dataset(hid_t did, const char *name, struct subset_t *sset) break; } - indent += COL; - H5Aiterate(did, NULL, dump_attr, NULL); - indent -= COL; + if ( !bin_output ) + { + + indent += COL; + H5Aiterate(did, NULL, dump_attr, NULL); + indent -= COL; + + } H5Tclose(type); H5Sclose(space); H5Pclose(dcpl_id); diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 9bea256..20a6d9d 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -5359,7 +5359,7 @@ error: static void gent_binary(void) { - hid_t fid, sid, did; + hid_t fid, sid, did, aid; hsize_t dims[1] = {6}; int ibuf[6] = {1,2,3,4,5,6}; float fbuf[6] = {1,2,3,4,5,6}; @@ -5391,6 +5391,9 @@ gent_binary(void) */ did = H5Dcreate(fid, "double", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT); H5Dwrite(did, H5T_NATIVE_DOUBLE, H5S_ALL, H5S_ALL, H5P_DEFAULT, dbuf); + /* create an attribute */ + aid = H5Acreate(did, "attr", H5T_NATIVE_DOUBLE, sid, H5P_DEFAULT); + H5Aclose(aid); H5Dclose(did); diff --git a/tools/testfiles/tbinary.h5 b/tools/testfiles/tbinary.h5 Binary files differindex 67d9364..ae0e160 100644 --- a/tools/testfiles/tbinary.h5 +++ b/tools/testfiles/tbinary.h5 |