summaryrefslogtreecommitdiffstats
path: root/src/H5Z.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Z.c')
-rw-r--r--src/H5Z.c163
1 files changed, 81 insertions, 82 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index 07389ed..863364e 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -80,29 +80,29 @@ H5Z_init_interface (void)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOINIT(H5Z_init_interface);
+ FUNC_ENTER_NOINIT(H5Z_init_interface)
#ifdef H5_HAVE_FILTER_DEFLATE
if (H5Z_register (H5Z_DEFLATE)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter");
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register deflate filter")
#endif /* H5_HAVE_FILTER_DEFLATE */
#ifdef H5_HAVE_FILTER_SHUFFLE
if (H5Z_register (H5Z_SHUFFLE)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter");
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register shuffle filter")
#endif /* H5_HAVE_FILTER_SHUFFLE */
#ifdef H5_HAVE_FILTER_FLETCHER32
if (H5Z_register (H5Z_FLETCHER32)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter");
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register fletcher32 filter")
#endif /* H5_HAVE_FILTER_FLETCHER32 */
#ifdef H5_HAVE_FILTER_SZIP
if (H5Z_register (H5Z_SZIP)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter");
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register szip filter")
#endif /* H5_HAVE_FILTER_SZIP */
#if (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP)
done:
#endif /* (defined H5_HAVE_FILTER_DEFLATE | defined H5_HAVE_FILTER_FLETCHER32 | defined H5_HAVE_FILTER_SHUFFLE | defined H5_HAVE_FILTER_SZIP) */
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -211,24 +211,24 @@ H5Zregister(const H5Z_class_t *cls)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Zregister, FAIL);
+ FUNC_ENTER_API(H5Zregister, FAIL)
/* Check args */
if (cls==NULL)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter class");
+ HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter class")
if (cls->id<0 || cls->id>H5Z_FILTER_MAX)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number");
+ HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number")
if (cls->id<H5Z_FILTER_RESERVED)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters");
+ HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters")
if (cls->filter==NULL)
- HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no filter function specified");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no filter function specified")
/* Do it */
if (H5Z_register (cls)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter");
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to register filter")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
}
@@ -253,7 +253,7 @@ H5Z_register (const H5Z_class_t *cls)
size_t i;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_register, FAIL);
+ FUNC_ENTER_NOAPI(H5Z_register, FAIL)
assert (cls);
assert (cls->id>=0 && cls->id<=H5Z_FILTER_MAX);
@@ -274,11 +274,11 @@ H5Z_register (const H5Z_class_t *cls)
n*sizeof(H5Z_stats_t));
#endif /* H5Z_DEBUG */
if (!table)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter table");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter table")
H5Z_table_g = table;
#ifdef H5Z_DEBUG
if (!stat_table)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter statistics table");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to extend filter statistics table")
H5Z_stat_table_g = stat_table;
#endif /* H5Z_DEBUG */
H5Z_table_alloc_g = n;
@@ -298,7 +298,7 @@ H5Z_register (const H5Z_class_t *cls)
} /* end else */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -321,21 +321,21 @@ H5Zunregister(H5Z_filter_t id)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Zunregister, FAIL);
+ FUNC_ENTER_API(H5Zunregister, FAIL)
H5TRACE1("e","Zf",id);
/* Check args */
if (id<0 || id>H5Z_FILTER_MAX)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number");
+ HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number")
if (id<H5Z_FILTER_RESERVED)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters");
+ HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "unable to modify predefined filters")
/* Do it */
if (H5Z_unregister (id)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to unregister filter");
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTINIT, FAIL, "unable to unregister filter")
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Zunregister() */
@@ -360,7 +360,7 @@ H5Z_unregister (H5Z_filter_t id)
size_t i; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_unregister,FAIL);
+ FUNC_ENTER_NOAPI(H5Z_unregister,FAIL)
assert (id>=0 && id<=H5Z_FILTER_MAX);
@@ -371,7 +371,7 @@ H5Z_unregister (H5Z_filter_t id)
/* Fail if filter not found */
if (i>=H5Z_table_used_g)
- HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter is not registered");
+ HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter is not registered")
/* Remove filter from table */
/* Don't worry about shrinking table size (for now) */
@@ -382,7 +382,7 @@ H5Z_unregister (H5Z_filter_t id)
H5Z_table_used_g--;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_unregister() */
@@ -406,12 +406,12 @@ H5Zfilter_avail(H5Z_filter_t id)
size_t i; /* Local index variable */
htri_t ret_value=FALSE; /* Return value */
- FUNC_ENTER_API(H5Zfilter_avail, FAIL);
+ FUNC_ENTER_API(H5Zfilter_avail, FAIL)
H5TRACE1("b","Zf",id);
/* Check args */
if(id<0 || id>H5Z_FILTER_MAX)
- HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number");
+ HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid filter identification number")
/* Is the filter already registered? */
for(i=0; i<H5Z_table_used_g; i++)
@@ -421,7 +421,7 @@ H5Zfilter_avail(H5Z_filter_t id)
} /* end if */
done:
- FUNC_LEAVE_API(ret_value);
+ FUNC_LEAVE_API(ret_value)
} /* end H5Zfilter_avail() */
@@ -450,7 +450,7 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOINIT(H5Z_prelude_callback);
+ FUNC_ENTER_NOINIT(H5Z_prelude_callback)
assert (H5I_GENPROP_LST==H5I_get_type(dcpl_id));
assert (H5I_DATATYPE==H5I_get_type(type_id));
@@ -462,11 +462,11 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty
/* Get dataset creation property list object */
if (NULL == (dc_plist = H5I_object(dcpl_id)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list");
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "can't get dataset creation property list")
/* Get layout information */
if(H5P_get(dc_plist, H5D_CRT_LAYOUT_NAME, &dcpl_layout) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve layout")
/* Check if the dataset is chunked */
if(H5D_CHUNKED == dcpl_layout) {
@@ -474,7 +474,7 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty
/* Get I/O pipeline information */
if(H5P_get(dc_plist, H5D_CRT_DATA_PIPELINE_NAME, &dcpl_pline) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve pipeline filter")
/* Check if the chunks have filters */
if(dcpl_pline.nfilters > 0) {
@@ -486,18 +486,18 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty
/* Get chunk information */
if(H5P_get(dc_plist, H5D_CRT_CHUNK_DIM_NAME, &chunk_ndims) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve chunk dimensions");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve chunk dimensions")
if(H5P_get(dc_plist, H5D_CRT_CHUNK_SIZE_NAME, chunk_size) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve chunk size");
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't retrieve chunk size")
/* Create a data space for a chunk & set the extent */
if(NULL == (space = H5S_create_simple(chunk_ndims,chunk_size,NULL)))
- HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace");
+ HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, FAIL, "can't create simple dataspace")
/* Get ID for dataspace to pass to filter routines */
if ((space_id=H5I_register (H5I_DATASPACE, space))<0) {
- H5S_close(space);
- HGOTO_ERROR (H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID");
+ (void)H5S_close(space);
+ HGOTO_ERROR (H5E_ATOM, H5E_CANTREGISTER, FAIL, "unable to register dataspace ID")
} /* end if */
/* Iterate over filters */
@@ -510,7 +510,7 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty
if (dcpl_pline.filter[u].flags & H5Z_FLAG_OPTIONAL)
H5E_clear();
else
- HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "required filter was not located");
+ HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "required filter was not located")
} /* end if */
else {
/* Make correct callback */
@@ -525,15 +525,15 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty
if(status<=0) {
/* We're leaving, so close dataspace */
if(H5Sclose(space_id)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTRELEASE, FAIL, "unable to close dataspace");
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTRELEASE, FAIL, "unable to close dataspace")
/* Indicate filter can't apply to this combination of parameters */
if(status==0) {
- HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "filter parameters not appropriate");
+ HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "filter parameters not appropriate")
} /* end if */
/* Indicate error during filter callback */
else {
- HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "error during user callback");
+ HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "error during user callback")
} /* end if */
} /* end if */
} /* end if */
@@ -546,10 +546,10 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty
if((fclass->set_local)(dcpl_id, type_id, space_id)<0) {
/* We're leaving, so close dataspace */
if(H5Sclose(space_id)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTRELEASE, FAIL, "unable to close dataspace");
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTRELEASE, FAIL, "unable to close dataspace")
/* Indicate error during filter callback */
- HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "error during user callback");
+ HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "error during user callback")
} /* end if */
} /* end if */
break;
@@ -562,13 +562,13 @@ H5Z_prelude_callback(hid_t dcpl_id, hid_t type_id, H5Z_prelude_type_t prelude_ty
/* Close dataspace */
if(H5Sclose(space_id)<0)
- HGOTO_ERROR (H5E_PLINE, H5E_CANTRELEASE, FAIL, "unable to close dataspace");
+ HGOTO_ERROR (H5E_PLINE, H5E_CANTRELEASE, FAIL, "unable to close dataspace")
} /* end if */
} /* end if */
} /* end if */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_prelude_callback() */
@@ -598,17 +598,17 @@ H5Z_can_apply (hid_t dcpl_id, hid_t type_id)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_can_apply,FAIL);
+ FUNC_ENTER_NOAPI(H5Z_can_apply,FAIL)
assert (H5I_GENPROP_LST==H5I_get_type(dcpl_id));
assert (H5I_DATATYPE==H5I_get_type(type_id));
/* Make "can apply" callbacks for filters in pipeline */
if(H5Z_prelude_callback(dcpl_id, type_id, H5Z_PRELUDE_CAN_APPLY)<0)
- HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "filter parameters not appropriate");
+ HGOTO_ERROR(H5E_PLINE, H5E_CANAPPLY, FAIL, "filter parameters not appropriate")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_can_apply() */
@@ -638,17 +638,17 @@ H5Z_set_local (hid_t dcpl_id, hid_t type_id)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_set_local,FAIL);
+ FUNC_ENTER_NOAPI(H5Z_set_local,FAIL)
assert (H5I_GENPROP_LST==H5I_get_type(dcpl_id));
assert (H5I_DATATYPE==H5I_get_type(type_id));
/* Make "set local" callbacks for filters in pipeline */
if(H5Z_prelude_callback(dcpl_id, type_id, H5Z_PRELUDE_SET_LOCAL)<0)
- HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set");
+ HGOTO_ERROR(H5E_PLINE, H5E_SETLOCAL, FAIL, "local filter parameters not set")
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_set_local() */
@@ -667,14 +667,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Z_modify(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
+H5Z_modify(const H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
size_t cd_nelmts, const unsigned int cd_values[/*cd_nelmts*/])
{
size_t idx; /* Index of filter in pipeline */
size_t i; /* Local index variable */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_modify, FAIL);
+ FUNC_ENTER_NOAPI(H5Z_modify, FAIL)
assert(pline);
assert(filter>=0 && filter<=H5Z_FILTER_MAX);
@@ -688,7 +688,7 @@ H5Z_modify(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
/* Check if the filter was not already in the pipeline */
if(idx>pline->nfilters)
- HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline");
+ HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, FAIL, "filter not in pipeline")
/* Change parameters for filter */
pline->filter[idx].flags = flags;
@@ -702,7 +702,7 @@ H5Z_modify(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
if (cd_nelmts>0) {
pline->filter[idx].cd_values = H5MM_malloc(cd_nelmts*sizeof(unsigned));
if (NULL==pline->filter[idx].cd_values)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter parameters");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter parameters")
for (i=0; i<cd_nelmts; i++)
pline->filter[idx].cd_values[i] = cd_values[i];
} /* end if */
@@ -710,7 +710,7 @@ H5Z_modify(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
pline->filter[idx].cd_values = NULL;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_modify() */
@@ -735,7 +735,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
size_t idx, i;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_append, FAIL);
+ FUNC_ENTER_NOAPI(H5Z_append, FAIL)
assert(pline);
assert(filter>=0 && filter<=H5Z_FILTER_MAX);
@@ -747,7 +747,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
* decide to relax this restriction in the future.
*/
if (pline->nfilters>=H5Z_MAX_NFILTERS)
- HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline");
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "too many filters in pipeline")
/* Allocate additional space in the pipeline if it's full */
if (pline->nfilters>=pline->nalloc) {
@@ -755,7 +755,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
x.nalloc = MAX(H5Z_MAX_NFILTERS, 2*pline->nalloc);
x.filter = H5MM_realloc(pline->filter, x.nalloc*sizeof(x.filter[0]));
if (NULL==x.filter)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter pipeline");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter pipeline")
pline->nalloc = x.nalloc;
pline->filter = x.filter;
}
@@ -769,7 +769,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
if (cd_nelmts>0) {
pline->filter[idx].cd_values = H5MM_malloc(cd_nelmts*sizeof(unsigned));
if (NULL==pline->filter[idx].cd_values)
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter");
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for filter")
for (i=0; i<cd_nelmts; i++)
pline->filter[idx].cd_values[i] = cd_values[i];
} else {
@@ -778,7 +778,7 @@ H5Z_append(H5O_pline_t *pline, H5Z_filter_t filter, unsigned flags,
pline->nfilters++;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -804,14 +804,14 @@ H5Z_find_idx(H5Z_filter_t id)
size_t i; /* Local index variable */
int ret_value=FAIL; /* Return value */
- FUNC_ENTER_NOINIT(H5Z_find_idx);
+ FUNC_ENTER_NOINIT(H5Z_find_idx)
for (i=0; i<H5Z_table_used_g; i++)
if (H5Z_table_g[i].id == id)
- HGOTO_DONE((int)i);
+ HGOTO_DONE((int)i)
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_find_idx() */
@@ -839,17 +839,17 @@ H5Z_find(H5Z_filter_t id)
int idx; /* Filter index in global table */
H5Z_class_t *ret_value=NULL; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_find, NULL);
+ FUNC_ENTER_NOAPI(H5Z_find, NULL)
/* Get the index in the global table */
if((idx=H5Z_find_idx(id))<0)
- HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "required filter is not registered");
+ HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "required filter is not registered")
/* Set return value */
ret_value=H5Z_table_g+idx;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5Z_find() */
@@ -898,7 +898,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
unsigned tmp_flags;
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_pipeline, FAIL);
+ FUNC_ENTER_NOAPI(H5Z_pipeline, FAIL)
assert(0==(flags & ~((unsigned)H5Z_FLAG_INVMASK)));
assert(filter_mask);
@@ -916,7 +916,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
continue;/*filter excluded*/
}
if ((fclass_idx=H5Z_find_idx(pline->filter[idx].id))<0) {
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter is not registered");
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "required filter is not registered")
}
fclass=&H5Z_table_g[fclass_idx];
#ifdef H5Z_DEBUG
@@ -937,7 +937,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
if(0==new_nbytes) {
if((cb_struct.func && (H5Z_CB_FAIL==cb_struct.func(pline->filter[idx].id, *buf, *buf_size, cb_struct.op_data)))
|| !cb_struct.func)
- HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "filter returned failure during read");
+ HGOTO_ERROR(H5E_PLINE, H5E_READERROR, FAIL, "filter returned failure during read")
*nbytes = *buf_size;
failed |= (unsigned)1 << idx;
@@ -955,8 +955,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
if ((fclass_idx=H5Z_find_idx(pline->filter[idx].id))<0) {
/* Check if filter is optional -- If it isn't, then error */
if ((pline->filter[idx].flags & H5Z_FLAG_OPTIONAL) == 0)
- HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL,
- "required filter is not registered");
+ HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "required filter is not registered")
failed |= (unsigned)1 << idx;
H5E_clear();
@@ -978,7 +977,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
if (0==(pline->filter[idx].flags & H5Z_FLAG_OPTIONAL)) {
if((cb_struct.func && (H5Z_CB_FAIL==cb_struct.func(pline->filter[idx].id, *buf, *nbytes, cb_struct.op_data)))
|| !cb_struct.func)
- HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "filter returned failure");
+ HGOTO_ERROR(H5E_PLINE, H5E_WRITEERROR, FAIL, "filter returned failure")
*nbytes = *buf_size;
}
@@ -994,7 +993,7 @@ H5Z_pipeline(const H5O_pline_t *pline, unsigned flags,
*filter_mask = failed;
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
}
@@ -1013,12 +1012,12 @@ done:
*-------------------------------------------------------------------------
*/
H5Z_filter_info_t *
-H5Z_filter_info(H5O_pline_t *pline, H5Z_filter_t filter)
+H5Z_filter_info(const H5O_pline_t *pline, H5Z_filter_t filter)
{
size_t idx; /* Index of filter in pipeline */
H5Z_filter_info_t *ret_value; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_filter_info, NULL);
+ FUNC_ENTER_NOAPI(H5Z_filter_info, NULL)
assert(pline);
assert(filter>=0 && filter<=H5Z_FILTER_MAX);
@@ -1030,13 +1029,13 @@ H5Z_filter_info(H5O_pline_t *pline, H5Z_filter_t filter)
/* Check if the filter was not already in the pipeline */
if(idx>pline->nfilters)
- HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "filter not in pipeline");
+ HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "filter not in pipeline")
/* Set return value */
ret_value=&pline->filter[idx];
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_filter_info() */
@@ -1056,12 +1055,12 @@ done:
*-------------------------------------------------------------------------
*/
htri_t
-H5Z_all_filters_avail(H5O_pline_t *pline)
+H5Z_all_filters_avail(const H5O_pline_t *pline)
{
size_t i,j; /* Local index variable */
htri_t ret_value=TRUE; /* Return value */
- FUNC_ENTER_NOAPI(H5Z_all_filters_avail, UFAIL);
+ FUNC_ENTER_NOAPI(H5Z_all_filters_avail, FAIL)
/* Check args */
assert(pline);
@@ -1076,10 +1075,10 @@ H5Z_all_filters_avail(H5O_pline_t *pline)
/* Check if we didn't find the filter */
if(j==H5Z_table_used_g)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(FALSE)
} /* end for */
done:
- FUNC_LEAVE_NOAPI(ret_value);
+ FUNC_LEAVE_NOAPI(ret_value)
} /* end H5Z_all_filters_avail() */