summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_main.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-03-04 16:55:07 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-03-04 16:55:07 (GMT)
commit2a93f993174ed44a85a2d8fca7b3c68e5bb41389 (patch)
treee01e6c3fed50707030b1051ea6f83e6e89b39ec7 /tools/h5repack/h5repack_main.c
parent931efcb5ebd4099d18d93e7dcdaf296ea4991d73 (diff)
downloadhdf5-2a93f993174ed44a85a2d8fca7b3c68e5bb41389.zip
hdf5-2a93f993174ed44a85a2d8fca7b3c68e5bb41389.tar.gz
hdf5-2a93f993174ed44a85a2d8fca7b3c68e5bb41389.tar.bz2
[svn-r8232] Purpose:
new feature Description: added a check for the return value of the tools h5repack and h5diff in the run script. the return value is used to print PASSED (tool returns 0) or FAILED Solution: Platforms tested: linux Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r--tools/h5repack/h5repack_main.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index 71308d9..05a9c1e 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -15,24 +15,22 @@
#include <stdlib.h>
#include "h5repack.h"
-
-
static void usage(void);
-
/*
+h5repack main program
+
Examples of use:
-v -i file1.h5 -o file2.h5 -f "dataset:GZIP 6" -l "dataset:CHUNK 2x2"
-v -i file1.h5 -o file2.h5 -f "GZIP 6"
*/
-
int main(int argc, char **argv)
{
char *infile = NULL;
char *outfile = NULL;
pack_opt_t options; /*the global options */
- int i;
+ int i, ret;
/* initialize options */
h5repack_init (&options,0);
@@ -87,20 +85,17 @@ int main(int argc, char **argv)
usage();
/* pack it */
- h5repack(infile,outfile,&options);
-
-#if defined(H5_REPACK_DEBUG)
- if (h5repack_verify(outfile,&options)<=0)
- printf("Warning: Output file does not have some of the requested filters\n");
-#endif
+ ret=h5repack(infile,outfile,&options);
/* free tables */
h5repack_end(&options);
- return 0;
+ if (ret==-1)
+ return 1;
+ else
+ return 0;
}
-
/*-------------------------------------------------------------------------
* Function: usage
*