diff options
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r-- | tools/h5repack/h5repack_main.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index 40ddf45..03aaa46 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -103,33 +103,33 @@ static struct long_options l_opts[] = { */ int main(int argc, const char **argv) { - + pack_opt_t options; /*the global options */ int ret=-1; - + /* initialize options */ - h5repack_init (&options, 0, 0, (hsize_t)0); - + h5repack_init (&options, 0, 0, (hsize_t)0); + parse_command_line(argc, argv, &options); - + /* get file names if they were not yet got */ if ( has_i_o == 0 ) { - + if ( argv[ opt_ind ] != NULL && argv[ opt_ind + 1 ] != NULL ) { infile = argv[ opt_ind ]; outfile = argv[ opt_ind + 1 ]; - + if ( strcmp( infile, outfile ) == 0 ) { error_msg(progname, "file names cannot be the same\n"); usage(progname); exit(EXIT_FAILURE); - + } } - + else { error_msg(progname, "file names missing\n"); @@ -137,14 +137,14 @@ int main(int argc, const char **argv) exit(EXIT_FAILURE); } } - - + + /* pack it */ ret=h5repack(infile,outfile,&options); - + /* free tables */ h5repack_end(&options); - + if (ret==-1) return 1; else @@ -291,7 +291,7 @@ static void usage(const char *prog) *------------------------------------------------------------------------- */ -static +static void parse_command_line(int argc, const char **argv, pack_opt_t* options) { |