summaryrefslogtreecommitdiffstats
path: root/tools/lib
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-06-28 19:34:08 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-06-28 19:34:08 (GMT)
commit7637b679337e4f8e6b260f6f94477ebd65622b5e (patch)
tree6b325ae157cb6c4110c46aa9d81384de6372cf24 /tools/lib
parent95a106f9fd78ce39ece6fef5e44de540b6bcd7a1 (diff)
downloadhdf5-7637b679337e4f8e6b260f6f94477ebd65622b5e.zip
hdf5-7637b679337e4f8e6b260f6f94477ebd65622b5e.tar.gz
hdf5-7637b679337e4f8e6b260f6f94477ebd65622b5e.tar.bz2
[svn-r12444] Purpose:
new feature Description: added support for h5dump to dump binary data using the file type format added one test to the test script that tests this Solution: Platforms tested: mir shanti copper Misc. update:
Diffstat (limited to 'tools/lib')
-rw-r--r--tools/lib/h5tools.c4
-rw-r--r--tools/lib/h5tools.h4
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 7fcfd3c..24d9f7e 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -47,6 +47,8 @@
int compound_data;
FILE *rawdatastream; /* should initialize to stdout but gcc moans about it */
int bin_output; /* binary output */
+int bin_form; /* binary form */
+
/* local prototypes */
static int do_bin_output(FILE *stream, hsize_t nelmts, hid_t tid, void *_mem);
@@ -1194,7 +1196,7 @@ h5tools_dump_dset(FILE *stream, const h5tool_format_t *info, hid_t dset, hid_t _
if (p_type < 0) {
f_type = H5Dget_type(dset);
- if (info->raw)
+ if (info->raw || bin_form == 1 )
p_type = H5Tcopy(f_type);
else
p_type = h5tools_get_native_type(f_type);
diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h
index 861c474..91f238f 100644
--- a/tools/lib/h5tools.h
+++ b/tools/lib/h5tools.h
@@ -353,7 +353,9 @@ struct subset_t {
};
extern FILE *rawdatastream; /* output stream for raw data */
-extern int bin_output; /* binary output */
+extern int bin_output; /* binary output */
+extern int bin_form; /* binary form */
+
/* Strings for output */