summaryrefslogtreecommitdiffstats
path: root/tools/h5jam/getub.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2012-02-27 20:10:18 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2012-02-27 20:10:18 (GMT)
commit009522483ee23aabc44ca5bed03ff5288ea7048c (patch)
tree566a4da61e496f4325685554ca74d8d69344ad60 /tools/h5jam/getub.c
parent3a713f80759f030279fce816b524880dd5c77752 (diff)
downloadhdf5-009522483ee23aabc44ca5bed03ff5288ea7048c.zip
hdf5-009522483ee23aabc44ca5bed03ff5288ea7048c.tar.gz
hdf5-009522483ee23aabc44ca5bed03ff5288ea7048c.tar.bz2
[svn-r21994] Add tools_init to main
Diffstat (limited to 'tools/h5jam/getub.c')
-rw-r--r--tools/h5jam/getub.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/tools/h5jam/getub.c b/tools/h5jam/getub.c
index 293aa17..39a78ae 100644
--- a/tools/h5jam/getub.c
+++ b/tools/h5jam/getub.c
@@ -32,9 +32,9 @@ void parse_command_line (int argc, const char *argv[]);
#define PROGRAMNAME "getub"
char *nbytes = NULL;
-static const char *s_opts = "c:"; /* add more later ? */
+static const char *s_opts = "c:"; /* add more later ? */
static struct long_options l_opts[] = {
- {"c", require_arg, 'c'}, /* input file */
+ {"c", require_arg, 'c'}, /* input file */
{NULL, 0, '\0'}
};
@@ -84,15 +84,15 @@ parse_command_line (int argc, const char *argv[])
while ((opt = get_option (argc, argv, s_opts, l_opts)) != EOF)
{
switch ((char) opt)
- {
- case 'c':
- nbytes = HDstrdup (opt_arg);
- break;
- case '?':
- default:
- usage (h5tools_getprogname());
- exit (EXIT_FAILURE);
- }
+ {
+ case 'c':
+ nbytes = HDstrdup (opt_arg);
+ break;
+ case '?':
+ default:
+ usage (h5tools_getprogname());
+ exit (EXIT_FAILURE);
+ }
}
if (argc <= opt_ind)
@@ -115,6 +115,9 @@ main (int argc, const char *argv[])
h5tools_setprogname(PROGRAMNAME);
h5tools_setstatus(EXIT_SUCCESS);
+ /* Initialize h5tools lib */
+ h5tools_init();
+
parse_command_line (argc, argv);
if (nbytes == NULL)
@@ -161,7 +164,7 @@ main (int argc, const char *argv[])
if (res < (long)size)
{
if (buf)
- free (buf);
+ free (buf);
HDclose (fd);
exit (EXIT_FAILURE);
}