summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_opttable.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-20 19:21:03 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-20 19:21:03 (GMT)
commit4cb6c01d7f59be968649e36a61346be044f76345 (patch)
treee0a0b81e542768b75d5bbb2de8afc1abfb8c4370 /tools/h5repack/h5repack_opttable.c
parent00909f278d64017c21c8348537231daba97be9dd (diff)
downloadhdf5-4cb6c01d7f59be968649e36a61346be044f76345.zip
hdf5-4cb6c01d7f59be968649e36a61346be044f76345.tar.gz
hdf5-4cb6c01d7f59be968649e36a61346be044f76345.tar.bz2
[svn-r8904] Purpose:
h5diff and h5repack changes Description: h5diff introduced the following four modes of output: Normal mode: print the number of differences found and where they occured Report mode: print the above plus the differences Verbose mode: print the above plus a list of objects and warnings Quiet mode: do not print output (h5diff always returns an exit code of 1 when differences are found) h5repack added an extra parameter for SZIP filter (coding method) the new syntax is -f SZIP=<pixels per block,coding> (pixels per block is a even number in 2-32 and coding method is 'EC' or 'NN') Example of use: ./h5repack -i file1 -o file2 -f SZIP=8,NN -v updated usage messages, test scripts and files accordingly Solution: Platforms tested: linux AIX solaris Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_opttable.c')
-rw-r--r--tools/h5repack/h5repack_opttable.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c
index 71cf1a8..cf76e82 100644
--- a/tools/h5repack/h5repack_opttable.c
+++ b/tools/h5repack/h5repack_opttable.c
@@ -35,7 +35,8 @@ void init_packobject(pack_info_t *obj)
strcpy(obj->path,"\0");
for ( j=0; j<H5_REPACK_MAX_NFILTERS; j++)
{
- obj->filter[j].filtn = -1;
+ obj->filter[j].filtn = -1;
+ obj->filter[j].szip_coding = -1;
for ( k=0; k<CDVALUES; k++)
obj->filter[j].cd_values[k] = -1;
}
@@ -109,7 +110,7 @@ static void aux_tblinsert_layout(pack_opttbl_t *table,
static int aux_inctable(pack_opttbl_t *table, int n_objs )
{
- int i, j, k;
+ int i;
table->size += n_objs;
table->objs = (pack_info_t*)realloc(table->objs, table->size * sizeof(pack_info_t));
@@ -119,17 +120,7 @@ static int aux_inctable(pack_opttbl_t *table, int n_objs )
}
for (i = table->nelems; i < table->size; i++)
{
- strcpy(table->objs[i].path,"\0");
- for ( j=0; j<H5_REPACK_MAX_NFILTERS; j++)
- {
- table->objs[i].filter[j].filtn = -1;
- for ( k=0; k<CDVALUES; k++)
- table->objs[i].filter[j].cd_values[k] = -1;
- }
- table->objs[i].chunk.rank = -1;
- table->objs[i].refobj_id = -1;
- table->objs[i].layout = H5D_LAYOUT_ERROR;
- table->objs[i].nfilters = 0;
+ init_packobject(&table->objs[i]);
}
return 0;
}
@@ -146,7 +137,7 @@ static int aux_inctable(pack_opttbl_t *table, int n_objs )
int options_table_init( pack_opttbl_t **tbl )
{
- int i, j, k;
+ int i;
pack_opttbl_t* table = (pack_opttbl_t*) malloc(sizeof(pack_opttbl_t));
if (table==NULL) {
printf("Error: not enough memory for options table\n");
@@ -163,17 +154,7 @@ int options_table_init( pack_opttbl_t **tbl )
for ( i=0; i<table->size; i++)
{
- strcpy(table->objs[i].path,"\0");
- for ( j=0; j<H5_REPACK_MAX_NFILTERS; j++)
- {
- table->objs[i].filter[j].filtn = -1;
- for ( k=0; k<CDVALUES; k++)
- table->objs[i].filter[j].cd_values[k] = -1;
- }
- table->objs[i].chunk.rank = -1;
- table->objs[i].refobj_id = -1;
- table->objs[i].layout = H5D_LAYOUT_ERROR;
- table->objs[i].nfilters = 0;
+ init_packobject(&table->objs[i]);
}
*tbl = table;