diff options
Diffstat (limited to 'src/H5Pdapl.c')
-rw-r--r-- | src/H5Pdapl.c | 96 |
1 files changed, 49 insertions, 47 deletions
diff --git a/src/H5Pdapl.c b/src/H5Pdapl.c index a7a541c..c8a97c2 100644 --- a/src/H5Pdapl.c +++ b/src/H5Pdapl.c @@ -15,7 +15,7 @@ * * Created: H5Pdapl.c * October 27, 2008 - * Neil Fortner <nfortne2@hdfgroup.org> + * Neil Fortner * * Purpose: Dataset access property list class routines * @@ -36,7 +36,7 @@ #include "H5Eprivate.h" /* Error handling */ #include "H5Fprivate.h" /* Files */ #include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ +#include "H5MMprivate.h" /* Memory management */ #include "H5Ppkg.h" /* Property lists */ /****************/ @@ -320,7 +320,7 @@ H5P__dapl_vds_file_pref_enc(const void *value, void **_pp, size_t *size) uint64_t enc_value; unsigned enc_size; - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); @@ -371,7 +371,7 @@ H5P__dapl_vds_file_pref_dec(const void **_pp, void *_value) unsigned enc_size; /* Size of encoded property */ herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC HDassert(pp); HDassert(*pp); @@ -414,7 +414,7 @@ static herr_t H5P__dapl_vds_file_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR HDassert(value); @@ -434,7 +434,7 @@ H5P__dapl_vds_file_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNU static herr_t H5P__dapl_vds_file_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR HDassert(value); @@ -460,7 +460,7 @@ H5P__dapl_vds_file_pref_cmp(const void *value1, const void *value2, size_t H5_AT const char *pref2 = *(const char *const *)value2; int ret_value = 0; - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR if (NULL == pref1 && NULL != pref2) HGOTO_DONE(1); @@ -484,7 +484,7 @@ done: static herr_t H5P__dapl_vds_file_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR HDassert(value); @@ -560,7 +560,7 @@ H5P__dapl_efile_pref_enc(const void *value, void **_pp, size_t *size) uint64_t enc_value; unsigned enc_size; - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); @@ -611,7 +611,7 @@ H5P__dapl_efile_pref_dec(const void **_pp, void *_value) unsigned enc_size; /* Size of encoded property */ herr_t ret_value = SUCCEED; - FUNC_ENTER_NOAPI_NOINIT + FUNC_ENTER_STATIC HDassert(pp); HDassert(*pp); @@ -654,7 +654,7 @@ static herr_t H5P__dapl_efile_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR HDassert(value); @@ -674,7 +674,7 @@ H5P__dapl_efile_pref_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED static herr_t H5P__dapl_efile_pref_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR HDassert(value); @@ -700,7 +700,7 @@ H5P__dapl_efile_pref_cmp(const void *value1, const void *value2, size_t H5_ATTR_ const char *pref2 = *(const char *const *)value2; int ret_value = 0; - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR if (NULL == pref1 && NULL != pref2) HGOTO_DONE(1); @@ -724,7 +724,7 @@ done: static herr_t H5P__dapl_efile_pref_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { - FUNC_ENTER_NOAPI_NOINIT_NOERR + FUNC_ENTER_STATIC_NOERR HDassert(value); @@ -775,7 +775,7 @@ H5Pset_chunk_cache(hid_t dapl_id, size_t rdcc_nslots, size_t rdcc_nbytes, double /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Set sizes */ if (H5P_set(plist, H5D_ACS_DATA_CACHE_NUM_SLOTS_NAME, &rdcc_nslots) < 0) @@ -804,22 +804,23 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots, size_t *rdcc_nbytes, double *rdcc_w0) +H5Pget_chunk_cache(hid_t dapl_id, size_t *rdcc_nslots /*out*/, size_t *rdcc_nbytes /*out*/, + double *rdcc_w0 /*out*/) { H5P_genplist_t *plist; /* Property list pointer */ H5P_genplist_t *def_plist; /* Default file access property list */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) - H5TRACE4("e", "i*z*z*d", dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0); + H5TRACE4("e", "ixxx", dapl_id, rdcc_nslots, rdcc_nbytes, rdcc_w0); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(dapl_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID"); + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID"); /* Get default file access plist */ if (NULL == (def_plist = (H5P_genplist_t *)H5I_object(H5P_FILE_ACCESS_DEFAULT))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for default fapl ID"); + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for default fapl ID"); /* Get the properties. If a property is set to the default value, the value * from the default fapl is used. */ @@ -865,11 +866,11 @@ done: static herr_t H5P__encode_chunk_cache_nslots(const void *value, void **_pp, size_t *size) { - uint64_t enc_value; /* Property value to encode */ - uint8_t **pp = (uint8_t **)_pp; + uint64_t enc_value = 0; /* Property value to encode */ + uint8_t **pp = (uint8_t **)_pp; unsigned enc_size; /* Size of encoded property */ - FUNC_ENTER_PACKAGE_NOERR + FUNC_ENTER_STATIC_NOERR /* Sanity checks */ HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); @@ -924,7 +925,7 @@ H5P__decode_chunk_cache_nslots(const void **_pp, void *_value) uint64_t enc_value; /* Decoded property value */ unsigned enc_size; /* Size of encoded property */ - FUNC_ENTER_PACKAGE_NOERR + FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); @@ -965,11 +966,11 @@ H5P__decode_chunk_cache_nslots(const void **_pp, void *_value) static herr_t H5P__encode_chunk_cache_nbytes(const void *value, void **_pp, size_t *size) { - uint64_t enc_value; /* Property value to encode */ - uint8_t **pp = (uint8_t **)_pp; + uint64_t enc_value = 0; /* Property value to encode */ + uint8_t **pp = (uint8_t **)_pp; unsigned enc_size; /* Size of encoded property */ - FUNC_ENTER_PACKAGE_NOERR + FUNC_ENTER_STATIC_NOERR /* Sanity checks */ HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); @@ -1024,7 +1025,7 @@ H5P__decode_chunk_cache_nbytes(const void **_pp, void *_value) uint64_t enc_value; /* Decoded property value */ unsigned enc_size; /* Size of encoded property */ - FUNC_ENTER_PACKAGE_NOERR + FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); @@ -1081,7 +1082,7 @@ H5Pset_virtual_view(hid_t plist_id, H5D_vds_view_t view) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Update property list */ if (H5P_set(plist, H5D_ACS_VDS_VIEW_NAME, &view) < 0) @@ -1103,17 +1104,17 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view) +H5Pget_virtual_view(hid_t plist_id, H5D_vds_view_t *view /*out*/) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE2("e", "i*Dv", plist_id, view); + H5TRACE2("e", "ix", plist_id, view); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Get value from property list */ if (view) @@ -1223,7 +1224,7 @@ H5Pset_virtual_printf_gap(hid_t plist_id, hsize_t gap_size) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Update property list */ if (H5P_set(plist, H5D_ACS_VDS_PRINTF_GAP_NAME, &gap_size) < 0) @@ -1246,17 +1247,17 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size) +H5Pget_virtual_printf_gap(hid_t plist_id, hsize_t *gap_size /*out*/) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE2("e", "i*h", plist_id, gap_size); + H5TRACE2("e", "ix", plist_id, gap_size); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Get value from property list */ if (gap_size) @@ -1309,7 +1310,7 @@ H5Pset_append_flush(hid_t plist_id, unsigned ndims, const hsize_t *boundary, H5D /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Set up values */ info.ndims = ndims; @@ -1345,7 +1346,8 @@ done: *------------------------------------------------------------------------- */ herr_t -H5Pget_append_flush(hid_t plist_id, unsigned ndims, hsize_t boundary[], H5D_append_cb_t *func, void **udata) +H5Pget_append_flush(hid_t plist_id, unsigned ndims, hsize_t boundary[], H5D_append_cb_t *func /*out*/, + void **udata /*out*/) { H5P_genplist_t * plist; /* property list pointer */ H5D_append_flush_t info; @@ -1353,11 +1355,11 @@ H5Pget_append_flush(hid_t plist_id, unsigned ndims, hsize_t boundary[], H5D_appe herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) - H5TRACE5("e", "iIu*h*DA**x", plist_id, ndims, boundary, func, udata); + H5TRACE5("e", "iIu*hxx", plist_id, ndims, boundary, func, udata); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Retrieve info for append flush */ if (H5P_get(plist, H5D_ACS_APPEND_FLUSH_NAME, &info) < 0) @@ -1407,7 +1409,7 @@ H5Pset_efile_prefix(hid_t plist_id, const char *prefix) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Set prefix */ if (H5P_set(plist, H5D_ACS_EFILE_PREFIX_NAME, &prefix) < 0) @@ -1428,7 +1430,7 @@ done: *------------------------------------------------------------------------- */ ssize_t -H5Pget_efile_prefix(hid_t plist_id, char *prefix, size_t size) +H5Pget_efile_prefix(hid_t plist_id, char *prefix /*out*/, size_t size) { H5P_genplist_t *plist; /* Property list pointer */ char * my_prefix; /* Library's copy of the prefix */ @@ -1436,11 +1438,11 @@ H5Pget_efile_prefix(hid_t plist_id, char *prefix, size_t size) ssize_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE3("Zs", "i*sz", plist_id, prefix, size); + H5TRACE3("Zs", "ixz", plist_id, prefix, size); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Get the current prefix */ if (H5P_peek(plist, H5D_ACS_EFILE_PREFIX_NAME, &my_prefix) < 0) @@ -1495,7 +1497,7 @@ H5Pset_virtual_prefix(hid_t plist_id, const char *prefix) /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Set prefix */ if (H5P_set(plist, H5D_ACS_VDS_PREFIX_NAME, &prefix) < 0) @@ -1518,7 +1520,7 @@ done: *------------------------------------------------------------------------- */ ssize_t -H5Pget_virtual_prefix(hid_t plist_id, char *prefix, size_t size) +H5Pget_virtual_prefix(hid_t plist_id, char *prefix /*out*/, size_t size) { H5P_genplist_t *plist; /* Property list pointer */ char * my_prefix; /* Library's copy of the prefix */ @@ -1526,11 +1528,11 @@ H5Pget_virtual_prefix(hid_t plist_id, char *prefix, size_t size) ssize_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) - H5TRACE3("Zs", "i*sz", plist_id, prefix, size); + H5TRACE3("Zs", "ixz", plist_id, prefix, size); /* Get the plist structure */ if (NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_ACCESS))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") + HGOTO_ERROR(H5E_ID, H5E_BADID, FAIL, "can't find object for ID") /* Get the current prefix */ if (H5P_peek(plist, H5D_ACS_VDS_PREFIX_NAME, &my_prefix) < 0) |