summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2010-05-11 17:49:41 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2010-05-11 17:49:41 (GMT)
commit05d75af8b88cc13232eda2b1660c1bb9ae0bb831 (patch)
tree6f103b56a01c45a3b98bd914f4cccb996bbc931e /tools/lib/h5tools.c
parent9e595dec197d2812b13c4b86cf3389549c54fbb5 (diff)
downloadhdf5-05d75af8b88cc13232eda2b1660c1bb9ae0bb831.zip
hdf5-05d75af8b88cc13232eda2b1660c1bb9ae0bb831.tar.gz
hdf5-05d75af8b88cc13232eda2b1660c1bb9ae0bb831.tar.bz2
[svn-r18757] Enable tools lib to be built as a dll on windows. Added two get/set functions for progname and d_status.
Also add windows import/export declarations to functions. Updated windows - H5pubconf.h for packed bits function Tested: Windows, linux
Diffstat (limited to 'tools/lib/h5tools.c')
-rw-r--r--tools/lib/h5tools.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/lib/h5tools.c b/tools/lib/h5tools.c
index 654cca9..ddfccf8 100644
--- a/tools/lib/h5tools.c
+++ b/tools/lib/h5tools.c
@@ -42,6 +42,8 @@ FILE *rawdatastream; /* should initialize to stdout but gcc moans about it
int bin_output; /* binary output */
int bin_form; /* binary form */
int region_output; /* region output */
+static int h5tools_d_status = 0;
+static const char *h5tools_progname = "h5tools";
#ifdef H5_HAVE_H5DUMP_PACKED_BITS
int packed_output; /* number of packed bits to display */
int packed_normalize; /* number of bits to shift right to display normalized */
@@ -288,6 +290,34 @@ enum {
/*-------------------------------------------------------------------------
* Audience: Public
* Chapter: H5Tools Library
+ * Purpose: Initialize the name and operation status of the H5 Tools library
+ * Description:
+ * These are utility functions to set/get the program name and operation status.
+ *-------------------------------------------------------------------------
+ */
+void h5tools_setprogname(const char *Progname)
+{
+ h5tools_progname = Progname;
+}
+
+void h5tools_setstatus(int D_status)
+{
+ h5tools_d_status = D_status;
+}
+
+const char*h5tools_getprogname()
+{
+ return h5tools_progname;
+}
+
+int h5tools_getstatus()
+{
+ return h5tools_d_status;
+}
+
+/*-------------------------------------------------------------------------
+ * Audience: Public
+ * Chapter: H5Tools Library
* Purpose: Initialize the H5 Tools library
* Description:
* This should be called before any other h5tools function is called.