summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack.c
diff options
context:
space:
mode:
authorPeter Cao <xcao@hdfgroup.org>2007-07-13 18:18:48 (GMT)
committerPeter Cao <xcao@hdfgroup.org>2007-07-13 18:18:48 (GMT)
commit2b89d6d73c71d4bd7d90bb8b564992fd8f8b4628 (patch)
treeb6dccd2f6eff0305f3f19a335347259d63bc17fc /tools/h5repack/h5repack.c
parentb566d21649d3286ace6aed1eaf73d5e3ade24f6a (diff)
downloadhdf5-2b89d6d73c71d4bd7d90bb8b564992fd8f8b4628.zip
hdf5-2b89d6d73c71d4bd7d90bb8b564992fd8f8b4628.tar.gz
hdf5-2b89d6d73c71d4bd7d90bb8b564992fd8f8b4628.tar.bz2
[svn-r13975] Add --latest, -compact=<size>, ... options to use the lastest file format.
Add test for the options to the daily test.
Diffstat (limited to 'tools/h5repack/h5repack.c')
-rw-r--r--tools/h5repack/h5repack.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/tools/h5repack/h5repack.c b/tools/h5repack/h5repack.c
index 2449c36..45409c4 100644
--- a/tools/h5repack/h5repack.c
+++ b/tools/h5repack/h5repack.c
@@ -243,6 +243,10 @@ int h5repack_addlayout(const char* str,
* Programmer: pvn@ncsa.uiuc.edu
*
* Date: September, 22, 2003
+ *
+ * Modification:
+ * Peter Cao, July 9, 2007
+ * Add "-L, --latest" and other options to pack a file with the latest file format
*
*-------------------------------------------------------------------------
*/
@@ -368,6 +372,25 @@ static int check_options(pack_opt_t *options)
return -1;
}
+ /* check options for the latest format */
+ if (options->grp_compact < 0) {
+ error_msg(progname, "invalid maximum number of links to store as header messages\n");
+ return -1;
+ }
+ if (options->grp_indexed < 0) {
+ error_msg(progname, "invalid minimum number of links to store in the indexed format\n");
+ return -1;
+ }
+ if (options->grp_indexed > options->grp_compact) {
+ error_msg(progname, "minimum indexed size is greater than the maximum compact size\n");
+ return -1;
+ }
+ for (i=0; i<8; i++) {
+ if (options->msg_size[i]<0) {
+ error_msg(progname, "invalid shared message size\n");
+ return -1;
+ }
+ }
return 0;
}
@@ -512,4 +535,4 @@ int have_request(pack_opt_t *options)
return 0;
-} \ No newline at end of file
+}