summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_main.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2017-10-20 19:44:48 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2017-10-20 19:44:48 (GMT)
commit2249e39d128f3e0411d94c5ce2eada1dbab29947 (patch)
tree494c8d275acf3bb2fe076ebdcc90244c239f0efd /tools/h5repack/h5repack_main.c
parent9c8d0e1afce7d9d31115972902e9030a000daefa (diff)
parent21b0878f33f4613dc22934c673c91c28f14ad33a (diff)
downloadhdf5-2249e39d128f3e0411d94c5ce2eada1dbab29947.zip
hdf5-2249e39d128f3e0411d94c5ce2eada1dbab29947.tar.gz
hdf5-2249e39d128f3e0411d94c5ce2eada1dbab29947.tar.bz2
Merge pull request #708 in HDFFV/hdf5 from ~BYRN/hdf5_adb:hdf5_1_8 to hdf5_1_8
* commit '21b0878f33f4613dc22934c673c91c28f14ad33a': Avoid double free HDFFV-10297 merge from develop Fix VS2012,2008 declaration statements Update list of tools test files Added older tool change that was in last merge HDFFV-10297 merge from develop Also cleaned up some other non-merged changes
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r--tools/h5repack/h5repack_main.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index 1d09e20..0c5aac6 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -50,8 +50,8 @@ static struct long_options l_opts[] = {
{ "metadata_block_size", require_arg, 'M' },
{ "threshold", require_arg, 't' },
{ "alignment", require_arg, 'a' },
- { "infile", require_arg, 'i' }, /* -i for backward compability */
- { "outfile", require_arg, 'o' }, /* -o for backward compability */
+ { "infile", require_arg, 'i' }, /* -i for backward compability */
+ { "outfile", require_arg, 'o' }, /* -o for backward compability */
{ "sort_by", require_arg, 'q' },
{ "sort_order", require_arg, 'z' },
{ "enable-error-stack", no_arg, 'E' },
@@ -191,10 +191,6 @@ static void usage(const char *prog) {
* Purpose: Shutdown MPI & HDF5 and call exit()
*
* Return: Does not return
- *
- * Programmer: Quincey Koziol
- * Saturday, 31. January 2004
- *
*-------------------------------------------------------------------------
*/
static void leave(int ret)
@@ -209,11 +205,6 @@ static void leave(int ret)
* Purpose: read comp and chunk options from a file
*
* Return: void, exit on error
- *
- * Programmer: pvn@ncsa.uiuc.edu
- *
- * Date: September, 22, 2003
- *
*-------------------------------------------------------------------------
*/
static
@@ -395,7 +386,6 @@ set_sort_order(const char *form)
* Function: parse_command_line
*
* Purpose: parse command line input
- *
*-------------------------------------------------------------------------
*/
static
@@ -408,13 +398,13 @@ int parse_command_line(int argc, const char **argv, pack_opt_t* options)
while ((opt = get_option(argc, argv, s_opts, l_opts)) != EOF) {
switch ((char) opt) {
- /* -i for backward compability */
+ /* -i for backward compatibility */
case 'i':
infile = opt_arg;
has_i_o = 1;
break;
- /* -o for backward compability */
+ /* -o for backward compatibility */
case 'o':
outfile = opt_arg;
has_i_o = 1;
@@ -598,13 +588,6 @@ done:
* Return: Success: EXIT_SUCCESS(0)
*
* Failure: EXIT_FAILURE(1)
- *
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- *
- * Date: May 9, 2003
- *
- * Comments:
- *
*-------------------------------------------------------------------------
*/
int main(int argc, const char **argv)
@@ -636,8 +619,10 @@ int main(int argc, const char **argv)
}
/* initialize options */
- h5repack_init(&options, 0);
-
+ if (h5repack_init(&options, 0, FALSE) < 0) {
+ h5tools_setstatus(EXIT_FAILURE);
+ goto done;
+ }
/* Initialize default indexing options */
sort_by = H5_INDEX_CRT_ORDER;