summaryrefslogtreecommitdiffstats
path: root/tools/h5ls
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/h5ls
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/h5ls')
-rw-r--r--tools/h5ls/h5ls.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c
index ab3a110..c856642 100644
--- a/tools/h5ls/h5ls.c
+++ b/tools/h5ls/h5ls.c
@@ -29,6 +29,9 @@
#include "h5tools_utils.h"
#include "h5trav.h"
+/* Name of tool */
+#define PROGRAMNAME "h5ls"
+
#define NAME_BUF_SIZE 2048
/* Struct to keep track of external link targets visited */
@@ -88,9 +91,6 @@ static struct dispatch_t {
static void display_type(hid_t type, int ind);
static herr_t visit_obj(hid_t file, const char *oname, iter_t *iter);
-const char *progname="h5ls";
-int d_status;
-
/*-------------------------------------------------------------------------
* Function: usage
@@ -135,7 +135,7 @@ usage: %s [OPTIONS] [OBJECTS...]\n\
within the file then the contents of the root group are displayed).\n\
The file name may include a printf(3C) integer format such as\n\
\"%%05d\" to open a file family.\n",
- progname);
+ h5tools_getprogname());
}
@@ -2182,6 +2182,9 @@ main(int argc, const char *argv[])
const char *preferred_driver = NULL;
int err_openfile = 0;
+ h5tools_setprogname(PROGRAMNAME);
+ h5tools_setstatus(EXIT_SUCCESS);
+
/* Initialize h5tools lib */
h5tools_init();
@@ -2249,7 +2252,7 @@ main(int argc, const char *argv[])
} else if(!HDstrcmp(argv[argno], "--verbose")) {
verbose_g++;
} else if(!HDstrcmp(argv[argno], "--version")) {
- print_version(progname);
+ print_version(h5tools_getprogname());
leave(EXIT_SUCCESS);
} else if(!HDstrcmp(argv[argno], "--hexdump")) {
hexdump_g = TRUE;
@@ -2325,7 +2328,7 @@ main(int argc, const char *argv[])
break;
case 'V': /* --version */
- print_version(progname);
+ print_version(h5tools_getprogname());
leave(EXIT_SUCCESS);
case 'x': /* --hexdump */