summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_opttable.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-01-08 15:53:32 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-01-08 15:53:32 (GMT)
commitbe7ebb248fbe7d887b44b4aecbfe80f2517d53b1 (patch)
treedf693260fe94f6a8d47968d4cbac66a9476ba841 /tools/h5repack/h5repack_opttable.c
parentfeaa5bb9d54017961e325f4bc2c366fc023c2443 (diff)
downloadhdf5-be7ebb248fbe7d887b44b4aecbfe80f2517d53b1.zip
hdf5-be7ebb248fbe7d887b44b4aecbfe80f2517d53b1.tar.gz
hdf5-be7ebb248fbe7d887b44b4aecbfe80f2517d53b1.tar.bz2
[svn-r8040] Purpose:
bug fix, code improvment Description: fixed a bug in the parse of chunking function added some auxiliary functions to avoid repeated parts of the code in several places Solution: Platforms tested: linux solaris AIX Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_opttable.c')
-rw-r--r--tools/h5repack/h5repack_opttable.c34
1 files changed, 32 insertions, 2 deletions
diff --git a/tools/h5repack/h5repack_opttable.c b/tools/h5repack/h5repack_opttable.c
index 9449556..fa7fd11 100644
--- a/tools/h5repack/h5repack_opttable.c
+++ b/tools/h5repack/h5repack_opttable.c
@@ -17,6 +17,36 @@
#include "h5repack.h"
+
+/*-------------------------------------------------------------------------
+ * Function: init_packobject
+ *
+ * Purpose: initialize a pack_info_t structure
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void init_packobject(pack_info_t *obj)
+{
+ int j, k;
+
+ strcpy(obj->path,"\0");
+ for ( j=0; j<H5_REPACK_MAX_NFILTERS; j++)
+ {
+ obj->filter[j].filtn = -1;
+ for ( k=0; k<CDVALUES; k++)
+ obj->filter[j].cd_values[k] = -1;
+ }
+ obj->chunk.rank = -1;
+ obj->refobj_id = -1;
+ obj->layout = -1;
+ obj->nfilters = 0;
+
+
+}
+
/*-------------------------------------------------------------------------
* Function: aux_tblinsert_filter
*
@@ -28,8 +58,8 @@
*/
static void aux_tblinsert_filter(pack_opttbl_t *table,
- int I,
- filter_info_t filt)
+ int I,
+ filter_info_t filt)
{
if (table->objs[ I ].nfilters<H5_REPACK_MAX_NFILTERS)
{