diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-04-10 20:19:35 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2012-04-10 20:19:35 (GMT) |
commit | 45f6d4c1eed29c45476970a9703304378a5a1073 (patch) | |
tree | 667240a5ea57e8a072bc8ffb59ecb7281867164c /tools/h5repack/h5repack_main.c | |
parent | ad4b4b2b90c340bb408ddf32dd5cae780547bad2 (diff) | |
parent | 09fa6e9c54380362f6f283ad60daef679ec91b25 (diff) | |
download | hdf5-45f6d4c1eed29c45476970a9703304378a5a1073.zip hdf5-45f6d4c1eed29c45476970a9703304378a5a1073.tar.gz hdf5-45f6d4c1eed29c45476970a9703304378a5a1073.tar.bz2 |
[svn-r22274] merge from trunk, resolve conflicts
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r-- | tools/h5repack/h5repack_main.c | 34 |
1 files changed, 11 insertions, 23 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c index e1697ab..6004084 100644 --- a/tools/h5repack/h5repack_main.c +++ b/tools/h5repack/h5repack_main.c @@ -35,7 +35,7 @@ const char *outfile = NULL; * Command-line options: The user can specify short or long-named * parameters. */ -static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:t:a:i:o:S:T:"; +static const char *s_opts = "hVvf:l:m:e:nLc:d:s:u:b:M:t:a:i:o:S:T:"; static struct long_options l_opts[] = { { "help", no_arg, 'h' }, { "version", no_arg, 'V' }, @@ -51,6 +51,7 @@ static struct long_options l_opts[] = { { "ssize", require_arg, 's' }, { "ublock", require_arg, 'u' }, { "block", require_arg, 'b' }, + { "metadata_block_size", require_arg, 'M' }, { "threshold", require_arg, 't' }, { "alignment", require_arg, 'a' }, { "infile", require_arg, 'i' }, /* -i for backward compability */ @@ -78,24 +79,6 @@ static struct long_options l_opts[] = { * * Comments: * - * Modifications: - * July 2004: Introduced the extra EC or NN option for SZIP - * October 2006: Added a new switch -n, that allows to write the dataset - * using a native type. The default to write is the file type. - * - * Modification: - * Peter Cao, June 13, 2007 - * Add "-L, --latest" option to pack a file with the latest file format - * PVN, November 19, 2007 - * adopted the syntax h5repack [OPTIONS] file1 file2 - * PVN, November 28, 2007 - * added support for multiple global filters - * PVN, May 16, 2008 - * added backward compatibility for -i infile -o outfile - * PVN, August 20, 2008 - * add a user block to repacked file (switches -u -b) - * PVN, August 28, 2008 - * add options to set alignment (H5Pset_alignment) (switches -t -a) *------------------------------------------------------------------------- */ int main(int argc, const char **argv) @@ -115,7 +98,7 @@ int main(int argc, const char **argv) HDexit(EXIT_FAILURE); /* initialize options */ - h5repack_init(&options, 0, 0, (hsize_t)0); + h5repack_init(&options, 0, H5F_FILE_SPACE_DEFAULT, (hsize_t)0); parse_command_line(argc, argv, &options); @@ -187,6 +170,7 @@ static void usage(const char *prog) printf(" -e E, --file=E Name of file E with the -f and -l options\n"); printf(" -u U, --ublock=U Name of file U with user block data to be added\n"); printf(" -b B, --block=B Size of user block to be added\n"); + printf(" -M A, --metadata_block_size=A Metadata block size for H5Pset_meta_block_size\n"); printf(" -t T, --threshold=T Threshold value for H5Pset_alignment\n"); printf(" -a A, --alignment=A Alignment value for H5Pset_alignment\n"); printf(" -f FILT, --filter=FILT Filter type\n"); @@ -428,7 +412,6 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options) break; - case 'u': options->ublock_filename = opt_arg; @@ -439,6 +422,11 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options) options->ublock_size = (hsize_t)HDatol( opt_arg ); break; + case 'M': + + options->meta_block_size = (hsize_t)HDatol( opt_arg ); + break; + case 't': options->threshold = (hsize_t)HDatol( opt_arg ); @@ -455,7 +443,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options) break; case 'S': - { + { char strategy[MAX_NC_NAME]; HDstrcpy(strategy, opt_arg); @@ -472,7 +460,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options) HDexit(EXIT_FAILURE); } break; - } + } case 'T': |