diff options
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r-- | tools/h5repack/h5repack_main.c | 21 |
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 * |