summaryrefslogtreecommitdiffstats
path: root/src/H5Pint.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Pint.c')
-rw-r--r--src/H5Pint.c663
1 files changed, 331 insertions, 332 deletions
diff --git a/src/H5Pint.c b/src/H5Pint.c
index 53030fa..ec78582 100644
--- a/src/H5Pint.c
+++ b/src/H5Pint.c
@@ -100,10 +100,10 @@ typedef herr_t (*H5P_do_pclass_op_t)(H5P_genplist_t *plist, const char *name, H5
/********************/
/* General helper routines */
-static H5P_genprop_t *H5P_dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type);
-static herr_t H5P_free_prop(H5P_genprop_t *prop);
-static int H5P_cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2);
-static herr_t H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op,
+static H5P_genprop_t *H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type);
+static herr_t H5P__free_prop(H5P_genprop_t *prop);
+static int H5P__cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2);
+static herr_t H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op,
H5P_do_pclass_op_t pclass_op, void *udata);
@@ -115,62 +115,62 @@ static herr_t H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist
* Predefined property list classes. These are initialized at runtime by
* H5P__init_package() in this source file.
*/
-hid_t H5P_CLS_ROOT_ID_g = FAIL;
+hid_t H5P_CLS_ROOT_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_ROOT_g = NULL;
-hid_t H5P_CLS_OBJECT_CREATE_ID_g = FAIL;
+hid_t H5P_CLS_OBJECT_CREATE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_OBJECT_CREATE_g = NULL;
-hid_t H5P_CLS_FILE_CREATE_ID_g = FAIL;
+hid_t H5P_CLS_FILE_CREATE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_FILE_CREATE_g = NULL;
-hid_t H5P_CLS_FILE_ACCESS_ID_g = FAIL;
+hid_t H5P_CLS_FILE_ACCESS_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_FILE_ACCESS_g = NULL;
-hid_t H5P_CLS_DATASET_CREATE_ID_g = FAIL;
+hid_t H5P_CLS_DATASET_CREATE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_DATASET_CREATE_g = NULL;
-hid_t H5P_CLS_DATASET_ACCESS_ID_g = FAIL;
+hid_t H5P_CLS_DATASET_ACCESS_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_DATASET_ACCESS_g = NULL;
-hid_t H5P_CLS_DATASET_XFER_ID_g = FAIL;
+hid_t H5P_CLS_DATASET_XFER_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_DATASET_XFER_g = NULL;
-hid_t H5P_CLS_FILE_MOUNT_ID_g = FAIL;
+hid_t H5P_CLS_FILE_MOUNT_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_FILE_MOUNT_g = NULL;
-hid_t H5P_CLS_GROUP_CREATE_ID_g = FAIL;
+hid_t H5P_CLS_GROUP_CREATE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_GROUP_CREATE_g = NULL;
-hid_t H5P_CLS_GROUP_ACCESS_ID_g = FAIL;
+hid_t H5P_CLS_GROUP_ACCESS_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_GROUP_ACCESS_g = NULL;
-hid_t H5P_CLS_DATATYPE_CREATE_ID_g = FAIL;
+hid_t H5P_CLS_DATATYPE_CREATE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_DATATYPE_CREATE_g = NULL;
-hid_t H5P_CLS_DATATYPE_ACCESS_ID_g = FAIL;
+hid_t H5P_CLS_DATATYPE_ACCESS_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_DATATYPE_ACCESS_g = NULL;
-hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g = FAIL;
+hid_t H5P_CLS_ATTRIBUTE_CREATE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_ATTRIBUTE_CREATE_g = NULL;
-hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g = FAIL;
+hid_t H5P_CLS_ATTRIBUTE_ACCESS_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_ATTRIBUTE_ACCESS_g = NULL;
-hid_t H5P_CLS_OBJECT_COPY_ID_g = FAIL;
+hid_t H5P_CLS_OBJECT_COPY_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_OBJECT_COPY_g = NULL;
-hid_t H5P_CLS_LINK_CREATE_ID_g = FAIL;
+hid_t H5P_CLS_LINK_CREATE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_LINK_CREATE_g = NULL;
-hid_t H5P_CLS_LINK_ACCESS_ID_g = FAIL;
+hid_t H5P_CLS_LINK_ACCESS_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_LINK_ACCESS_g = NULL;
-hid_t H5P_CLS_STRING_CREATE_ID_g = FAIL;
+hid_t H5P_CLS_STRING_CREATE_ID_g = H5I_INVALID_HID;
H5P_genclass_t *H5P_CLS_STRING_CREATE_g = NULL;
/*
* Predefined property lists for each predefined class. These are initialized
* at runtime by H5P__init_package() in this source file.
*/
-hid_t H5P_LST_FILE_CREATE_ID_g = FAIL;
-hid_t H5P_LST_FILE_ACCESS_ID_g = FAIL;
-hid_t H5P_LST_DATASET_CREATE_ID_g = FAIL;
-hid_t H5P_LST_DATASET_ACCESS_ID_g = FAIL;
-hid_t H5P_LST_DATASET_XFER_ID_g = FAIL;
-hid_t H5P_LST_FILE_MOUNT_ID_g = FAIL;
-hid_t H5P_LST_GROUP_CREATE_ID_g = FAIL;
-hid_t H5P_LST_GROUP_ACCESS_ID_g = FAIL;
-hid_t H5P_LST_DATATYPE_CREATE_ID_g = FAIL;
-hid_t H5P_LST_DATATYPE_ACCESS_ID_g = FAIL;
-hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g = FAIL;
-hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g = FAIL;
-hid_t H5P_LST_OBJECT_COPY_ID_g = FAIL;
-hid_t H5P_LST_LINK_CREATE_ID_g = FAIL;
-hid_t H5P_LST_LINK_ACCESS_ID_g = FAIL;
+hid_t H5P_LST_FILE_CREATE_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_FILE_ACCESS_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_DATASET_CREATE_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_DATASET_ACCESS_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_DATASET_XFER_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_FILE_MOUNT_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_GROUP_CREATE_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_GROUP_ACCESS_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_DATATYPE_CREATE_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_DATATYPE_ACCESS_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_ATTRIBUTE_CREATE_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_ATTRIBUTE_ACCESS_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_OBJECT_COPY_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_LINK_CREATE_ID_g = H5I_INVALID_HID;
+hid_t H5P_LST_LINK_ACCESS_ID_g = H5I_INVALID_HID;
/* Root property list class library initialization object */
const H5P_libclass_t H5P_CLS_ROOT[1] = {{
@@ -336,7 +336,7 @@ static const H5I_class_t H5I_GENPROPCLS_CLS[1] = {{
H5I_GENPROP_CLS, /* ID class value */
0, /* Class flags */
0, /* # of reserved IDs for class */
- (H5I_free_t)H5P_close_class /* Callback routine for closing objects of this class */
+ (H5I_free_t)H5P__close_class /* Callback routine for closing objects of this class */
}};
/* Generic Property List ID class */
@@ -403,8 +403,8 @@ H5P__init_package(void)
HGOTO_ERROR(H5E_ATOM, H5E_CANTINIT, FAIL, "unable to initialize ID group")
/* Repeatedly pass over the list of property list classes for the library,
- * initializing each class if it's parent class is initialized, until no
- * more progress is made.
+ * initializing each class if its parent class is initialized, until no
+ * more progress is made.
*/
tot_init = 0;
do {
@@ -425,7 +425,7 @@ H5P__init_package(void)
HDassert(lib_class->par_pclass || lib_class == H5P_CLS_ROOT);
/* Allocate the new class */
- if(NULL == (*lib_class->pclass = H5P_create_class(lib_class->par_pclass ? *lib_class->par_pclass : NULL, lib_class->name, lib_class->type, lib_class->create_func, lib_class->create_data, lib_class->copy_func, lib_class->copy_data, lib_class->close_func, lib_class->close_data)))
+ if(NULL == (*lib_class->pclass = H5P__create_class(lib_class->par_pclass ? *lib_class->par_pclass : NULL, lib_class->name, lib_class->type, lib_class->create_func, lib_class->create_data, lib_class->copy_func, lib_class->copy_data, lib_class->close_func, lib_class->close_data)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "class initialization failed")
/* Call routine to register properties for class */
@@ -513,7 +513,7 @@ H5P_term_package(void)
H5P_LST_OBJECT_COPY_ID_g =
H5P_LST_LINK_CREATE_ID_g =
H5P_LST_LINK_ACCESS_ID_g =
- H5P_LST_FILE_MOUNT_ID_g = (-1);
+ H5P_LST_FILE_MOUNT_ID_g = H5I_INVALID_HID;
} /* end if */
} /* end if */
@@ -559,7 +559,7 @@ H5P_term_package(void)
H5P_CLS_OBJECT_COPY_ID_g =
H5P_CLS_LINK_CREATE_ID_g =
H5P_CLS_LINK_ACCESS_ID_g =
- H5P_CLS_FILE_MOUNT_ID_g = (-1);
+ H5P_CLS_FILE_MOUNT_ID_g = H5I_INVALID_HID;
} /* end if */
} /* end if */
@@ -626,14 +626,14 @@ H5P__do_prop_cb1(H5SL_t *slist, H5P_genprop_t *prop, H5P_prp_cb1_t cb)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL,"Property callback failed")
/* Make a copy of the class's property */
- if(NULL == (pcopy = H5P_dup_prop(prop, H5P_PROP_WITHIN_LIST)))
+ if(NULL == (pcopy = H5P__dup_prop(prop, H5P_PROP_WITHIN_LIST)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property")
/* Copy the changed value into the new property */
H5MM_memcpy(pcopy->value, tmp_value, prop->size);
/* Insert the changed property into the property list */
- if(H5P_add_prop(slist, pcopy) < 0)
+ if(H5P__add_prop(slist, pcopy) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into skip list")
done:
@@ -644,7 +644,7 @@ done:
/* Cleanup on failure */
if(ret_value < 0)
if(pcopy)
- H5P_free_prop(pcopy);
+ H5P__free_prop(pcopy);
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5P__do_prop_cb1() */
@@ -652,11 +652,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_copy_pclass
+ H5P__copy_pclass
PURPOSE
Internal routine to copy a generic property class
USAGE
- hid_t H5P_copy_pclass(pclass)
+ hid_t H5P__copy_pclass(pclass)
H5P_genclass_t *pclass; IN: Property class to copy
RETURNS
Success: valid property class ID on success (non-negative)
@@ -671,13 +671,13 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
H5P_genclass_t *
-H5P_copy_pclass(H5P_genclass_t *pclass)
+H5P__copy_pclass(H5P_genclass_t *pclass)
{
H5P_genclass_t *new_pclass = NULL; /* Property list class copied */
H5P_genprop_t *pcopy; /* Copy of property to insert into class */
H5P_genclass_t *ret_value=NULL; /* return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(pclass);
@@ -686,7 +686,7 @@ H5P_copy_pclass(H5P_genclass_t *pclass)
*/
/* Create the new property list class */
- if(NULL == (new_pclass = H5P_create_class(pclass->parent, pclass->name, pclass->type, pclass->create_func, pclass->create_data, pclass->copy_func, pclass->copy_data, pclass->close_func, pclass->close_data)))
+ if(NULL == (new_pclass = H5P__create_class(pclass->parent, pclass->name, pclass->type, pclass->create_func, pclass->create_data, pclass->copy_func, pclass->copy_data, pclass->close_func, pclass->close_data)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, NULL, "unable to create property list class")
/* Copy the properties registered for this class */
@@ -697,11 +697,11 @@ H5P_copy_pclass(H5P_genclass_t *pclass)
curr_node=H5SL_first(pclass->props);
while(curr_node!=NULL) {
/* Make a copy of the class's property */
- if(NULL == (pcopy = H5P_dup_prop((H5P_genprop_t *)H5SL_item(curr_node), H5P_PROP_WITHIN_CLASS)))
+ if(NULL == (pcopy = H5P__dup_prop((H5P_genprop_t *)H5SL_item(curr_node), H5P_PROP_WITHIN_CLASS)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL,"Can't copy property")
/* Insert the initialized property into the property list */
- if(H5P_add_prop(new_pclass->props,pcopy) < 0)
+ if(H5P__add_prop(new_pclass->props,pcopy) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, NULL,"Can't insert property into class")
/* Increment property count for class */
@@ -716,11 +716,11 @@ H5P_copy_pclass(H5P_genclass_t *pclass)
ret_value=new_pclass;
done:
- if(ret_value==NULL && new_pclass)
- H5P_close_class(new_pclass);
+ if(NULL == ret_value && new_pclass)
+ H5P__close_class(new_pclass);
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_copy_pclass() */
+} /* H5P__copy_pclass() */
/*--------------------------------------------------------------------------
@@ -733,7 +733,7 @@ done:
hid_t old_plist_id; IN: Property list ID to copy
RETURNS
Success: valid property list ID on success (non-negative)
- Failure: negative
+ Failure: H5I_INVALID_HID
DESCRIPTION
Copy a property list and return the ID. This routine calls the
class 'copy' callback after any property 'copy' callbacks are called
@@ -756,9 +756,9 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
H5SL_t *seen=NULL; /* Skip list containing properties already seen */
size_t nseen; /* Number of items 'seen' */
hbool_t has_parent_class; /* Flag to indicate that this property list's class has a parent */
- hid_t ret_value=FAIL; /* return value */
+ hid_t ret_value = H5I_INVALID_HID; /* return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
HDassert(old_plist);
@@ -768,7 +768,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
/* Allocate room for the property list */
if(NULL==(new_plist = H5FL_CALLOC(H5P_genplist_t)))
- HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,"memory allocation failed")
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed")
/* Set class state */
new_plist->pclass = old_plist->pclass;
@@ -777,80 +777,80 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
/* Initialize the skip list to hold the changed properties */
if((new_plist->props = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
- HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for changed properties")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "can't create skip list for changed properties")
/* Create the skip list for deleted properties */
if((new_plist->del = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
- HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for deleted properties")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "can't create skip list for deleted properties")
/* Create the skip list to hold names of properties already seen
* (This prevents a property in the class hierarchy from having it's
* 'create' callback called, if a property in the class hierarchy has
* already been seen)
*/
- if((seen = H5SL_create(H5SL_TYPE_STR, NULL))== NULL)
- HGOTO_ERROR(H5E_PLIST,H5E_CANTCREATE,FAIL,"can't create skip list for seen properties")
+ if((seen = H5SL_create(H5SL_TYPE_STR, NULL)) == NULL)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "can't create skip list for seen properties")
nseen = 0;
/* Cycle through the deleted properties & copy them into the new list's deleted section */
- if(H5SL_count(old_plist->del)>0) {
- curr_node=H5SL_first(old_plist->del);
+ if(H5SL_count(old_plist->del) > 0) {
+ curr_node = H5SL_first(old_plist->del);
while(curr_node) {
char *new_name; /* Pointer to new name */
/* Duplicate string for insertion into new deleted property skip list */
- if((new_name=H5MM_xstrdup((char *)H5SL_item(curr_node))) == NULL)
- HGOTO_ERROR(H5E_RESOURCE,H5E_NOSPACE,FAIL,"memory allocation failed")
+ if((new_name = H5MM_xstrdup((char *)H5SL_item(curr_node))) == NULL)
+ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, H5I_INVALID_HID, "memory allocation failed")
/* Insert property name into deleted list */
if(H5SL_insert(new_plist->del,new_name,new_name) < 0)
- HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into deleted skip list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert property into deleted skip list")
/* Add property name to "seen" list */
if(H5SL_insert(seen,new_name,new_name) < 0)
- HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert property into seen skip list")
nseen++;
/* Get the next property node in the skip list */
- curr_node=H5SL_next(curr_node);
+ curr_node = H5SL_next(curr_node);
} /* end while */
} /* end if */
/* Cycle through the properties and copy them also */
- if(H5SL_count(old_plist->props)>0) {
- curr_node=H5SL_first(old_plist->props);
+ if(H5SL_count(old_plist->props) > 0) {
+ curr_node = H5SL_first(old_plist->props);
while(curr_node) {
/* Get a pointer to the node's property */
tmp = (H5P_genprop_t *)H5SL_item(curr_node);
/* Make a copy of the list's property */
- if(NULL == (new_prop = H5P_dup_prop(tmp, H5P_PROP_WITHIN_LIST)))
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property")
+ if(NULL == (new_prop = H5P__dup_prop(tmp, H5P_PROP_WITHIN_LIST)))
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "Can't copy property")
/* Call property copy callback, if it exists */
if(new_prop->copy) {
if((new_prop->copy)(new_prop->name,new_prop->size,new_prop->value) < 0) {
- H5P_free_prop(new_prop);
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property")
+ H5P__free_prop(new_prop);
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "Can't copy property")
} /* end if */
} /* end if */
/* Insert the initialized property into the property list */
- if(H5P_add_prop(new_plist->props,new_prop) < 0) {
- H5P_free_prop(new_prop);
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into list")
+ if(H5P__add_prop(new_plist->props,new_prop) < 0) {
+ H5P__free_prop(new_prop);
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, "Can't insert property into list")
} /* end if */
/* Add property name to "seen" list */
if(H5SL_insert(seen,new_prop->name,new_prop->name) < 0)
- HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert property into seen skip list")
nseen++;
/* Increment the number of properties in list */
new_plist->nprops++;
/* Get the next property node in the skip list */
- curr_node=H5SL_next(curr_node);
+ curr_node = H5SL_next(curr_node);
} /* end while */
} /* end if */
@@ -860,27 +860,27 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
*/
tclass=old_plist->pclass;
has_parent_class = (hbool_t)(tclass != NULL && tclass->parent != NULL && tclass->parent->nprops > 0);
- while(tclass!=NULL) {
+ while(tclass != NULL) {
if(tclass->nprops>0) {
/* Walk through the properties in the old class */
- curr_node=H5SL_first(tclass->props);
+ curr_node = H5SL_first(tclass->props);
while(curr_node!=NULL) {
/* Get pointer to property from node */
tmp = (H5P_genprop_t *)H5SL_item(curr_node);
/* Only "copy" properties we haven't seen before */
- if(nseen==0 || H5SL_search(seen,tmp->name) == NULL) {
+ if(nseen == 0 || H5SL_search(seen,tmp->name) == NULL) {
/* Call property copy callback, if it exists */
if(tmp->copy) {
/* Call the callback & insert changed value into skip list (if necessary) */
if(H5P__do_prop_cb1(new_plist->props, tmp, tmp->copy) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't create property")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, H5I_INVALID_HID, "Can't create property")
} /* end if */
/* Add property name to "seen" list, if we have other classes to work on */
if(has_parent_class) {
if(H5SL_insert(seen,tmp->name,tmp->name) < 0)
- HGOTO_ERROR(H5E_PLIST,H5E_CANTINSERT,FAIL,"can't insert property into seen skip list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, H5I_INVALID_HID, "can't insert property into seen skip list")
nseen++;
} /* end if */
@@ -889,24 +889,24 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
} /* end if */
/* Get the next property node in the skip list */
- curr_node=H5SL_next(curr_node);
+ curr_node = H5SL_next(curr_node);
} /* end while */
} /* end if */
/* Go up to parent class */
- tclass=tclass->parent;
+ tclass = tclass->parent;
} /* end while */
/* Increment the number of property lists derived from class */
- if(H5P_access_class(new_plist->pclass, H5P_MOD_INC_LST) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Can't increment class ref count")
+ if(H5P__access_class(new_plist->pclass, H5P_MOD_INC_LST) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't increment class ref count")
/* Get an atom for the property list */
if((new_plist_id = H5I_register(H5I_GENPROP_LST, new_plist, app_ref)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize property list")
/* Save the property list ID in the property list struct, for use in the property class's 'close' callback */
- new_plist->plist_id=new_plist_id;
+ new_plist->plist_id = new_plist_id;
/* Call the class callback (if it exists) now that we have the property list ID
* (up through chain of parent classes also)
@@ -917,7 +917,7 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
if((tclass->copy_func)(new_plist_id, old_plist->plist_id, old_plist->pclass->copy_data) < 0) {
/* Delete ID, ignore return value */
H5I_remove(new_plist_id);
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL,"Can't initialize property")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't initialize property")
} /* end if */
} /* end if */
@@ -933,10 +933,10 @@ H5P_copy_plist(const H5P_genplist_t *old_plist, hbool_t app_ref)
done:
/* Release the list of 'seen' properties */
- if(seen!=NULL)
+ if(seen != NULL)
H5SL_close(seen);
- if(ret_value<0 && new_plist)
+ if(H5I_INVALID_HID == ret_value && new_plist)
H5P_close(new_plist);
FUNC_LEAVE_NOAPI(ret_value)
@@ -945,11 +945,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_dup_prop
+ H5P__dup_prop
PURPOSE
Internal routine to duplicate a property
USAGE
- H5P_genprop_t *H5P_dup_prop(oprop)
+ H5P_genprop_t *H5P__dup_prop(oprop)
H5P_genprop_t *oprop; IN: Pointer to property to copy
H5P_prop_within_t type; IN: Type of object the property will be inserted into
RETURNS
@@ -963,12 +963,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5P_genprop_t *
-H5P_dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
+H5P__dup_prop(H5P_genprop_t *oprop, H5P_prop_within_t type)
{
H5P_genprop_t *prop = NULL; /* Pointer to new property copied */
H5P_genprop_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(oprop);
HDassert(type != H5P_PROP_WITHIN_UNKNOWN);
@@ -1037,16 +1037,16 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_dup_prop() */
+} /* H5P__dup_prop() */
/*--------------------------------------------------------------------------
NAME
- H5P_create_prop
+ H5P__create_prop
PURPOSE
Internal routine to create a new property
USAGE
- H5P_genprop_t *H5P_create_prop(name,size,type,value,prp_create,prp_set,
+ H5P_genprop_t *H5P__create_prop(name,size,type,value,prp_create,prp_set,
prp_get,prp_delete,prp_close, prp_encode, prp_decode)
const char *name; IN: Name of property to register
size_t size; IN: Size of property in bytes
@@ -1074,7 +1074,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5P_genprop_t *
-H5P_create_prop(const char *name, size_t size, H5P_prop_within_t type,
+H5P__create_prop(const char *name, size_t size, H5P_prop_within_t type,
const void *value, H5P_prp_create_func_t prp_create,
H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
H5P_prp_encode_func_t prp_encode, H5P_prp_decode_func_t prp_decode,
@@ -1085,7 +1085,7 @@ H5P_create_prop(const char *name, size_t size, H5P_prop_within_t type,
H5P_genprop_t *prop = NULL; /* Pointer to new property copied */
H5P_genprop_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(name);
HDassert((size > 0 && value != NULL) || (size == 0));
@@ -1141,16 +1141,16 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_create_prop() */
+} /* H5P__create_prop() */
/*--------------------------------------------------------------------------
NAME
- H5P_add_prop
+ H5P__add_prop
PURPOSE
Internal routine to insert a property into a property skip list
USAGE
- herr_t H5P_add_prop(slist, prop)
+ herr_t H5P__add_prop(slist, prop)
H5SL_t *slist; IN/OUT: Pointer to skip list of properties
H5P_genprop_t *prop; IN: Pointer to property to insert
RETURNS
@@ -1163,11 +1163,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_add_prop(H5SL_t *slist, H5P_genprop_t *prop)
+H5P__add_prop(H5SL_t *slist, H5P_genprop_t *prop)
{
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
HDassert(slist);
HDassert(prop);
@@ -1179,7 +1179,7 @@ H5P_add_prop(H5SL_t *slist, H5P_genprop_t *prop)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_add_prop() */
+} /* H5P__add_prop() */
/*--------------------------------------------------------------------------
@@ -1244,11 +1244,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_find_prop_pclass
+ H5P__find_prop_pclass
PURPOSE
Internal routine to check for a property in a class skip list
USAGE
- H5P_genprop_t *H5P_find_prop_class(pclass, name)
+ H5P_genprop_t *H5P__find_prop_class(pclass, name)
H5P_genclass *pclass; IN: Pointer generic property class to check
const char *name; IN: Name of property to check for
RETURNS
@@ -1261,11 +1261,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5P_genprop_t *
-H5P_find_prop_pclass(H5P_genclass_t *pclass, const char *name)
+H5P__find_prop_pclass(H5P_genclass_t *pclass, const char *name)
{
H5P_genprop_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(pclass);
HDassert(name);
@@ -1276,16 +1276,16 @@ H5P_find_prop_pclass(H5P_genclass_t *pclass, const char *name)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_find_prop_pclass() */
+} /* H5P__find_prop_pclass() */
/*--------------------------------------------------------------------------
NAME
- H5P_free_prop
+ H5P__free_prop
PURPOSE
Internal routine to destroy a property node
USAGE
- herr_t H5P_free_prop(prop)
+ herr_t H5P__free_prop(prop)
H5P_genprop_t *prop; IN: Pointer to property to destroy
RETURNS
Returns non-negative on success, negative on failure.
@@ -1298,9 +1298,9 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P_free_prop(H5P_genprop_t *prop)
+H5P__free_prop(H5P_genprop_t *prop)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(prop);
@@ -1315,16 +1315,16 @@ H5P_free_prop(H5P_genprop_t *prop)
prop = H5FL_FREE(H5P_genprop_t, prop);
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5P_free_prop() */
+} /* H5P__free_prop() */
/*--------------------------------------------------------------------------
NAME
- H5P_free_prop_cb
+ H5P__free_prop_cb
PURPOSE
Internal routine to properties from a property skip list
USAGE
- herr_t H5P_free_prop_cb(item, key, op_data)
+ herr_t H5P__free_prop_cb(item, key, op_data)
void *item; IN/OUT: Pointer to property
void *key; IN/OUT: Pointer to property key
void *_make_cb; IN: Whether to make property callbacks or not
@@ -1339,12 +1339,12 @@ H5P_free_prop(H5P_genprop_t *prop)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P_free_prop_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
+H5P__free_prop_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
{
H5P_genprop_t *tprop=(H5P_genprop_t *)item; /* Temporary pointer to property */
hbool_t make_cb = *(hbool_t *)op_data; /* Whether to make property 'close' callback */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(tprop);
@@ -1353,19 +1353,19 @@ H5P_free_prop_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
(tprop->close)(tprop->name, tprop->size, tprop->value);
/* Free the property, ignoring return value, nothing we can do */
- H5P_free_prop(tprop);
+ H5P__free_prop(tprop);
FUNC_LEAVE_NOAPI(0)
-} /* H5P_free_prop_cb() */
+} /* H5P__free_prop_cb() */
/*--------------------------------------------------------------------------
NAME
- H5P_free_del_name_cb
+ H5P__free_del_name_cb
PURPOSE
Internal routine to free 'deleted' property name
USAGE
- herr_t H5P_free_del_name_cb(item, key, op_data)
+ herr_t H5P__free_del_name_cb(item, key, op_data)
void *item; IN/OUT: Pointer to deleted name
void *key; IN/OUT: Pointer to key
void *op_data; IN: Operator callback data (unused)
@@ -1379,11 +1379,11 @@ H5P_free_prop_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data)
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P_free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *op_data)
+H5P__free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *op_data)
{
char *del_name=(char *)item; /* Temporary pointer to deleted name */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(del_name);
@@ -1391,17 +1391,17 @@ H5P_free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
H5MM_xfree(del_name);
FUNC_LEAVE_NOAPI(0)
-} /* H5P_free_del_name_cb() */
+} /* H5P__free_del_name_cb() */
/*--------------------------------------------------------------------------
NAME
- H5P_access_class
+ H5P__access_class
PURPOSE
Internal routine to increment or decrement list & class dependencies on a
property list class
USAGE
- herr_t H5P_access_class(pclass,mod)
+ herr_t H5P__access_class(pclass,mod)
H5P_genclass_t *pclass; IN: Pointer to class to modify
H5P_class_mod_t mod; IN: Type of modification to class
RETURNS
@@ -1417,9 +1417,9 @@ H5P_free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
+H5P__access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(pclass);
HDassert(mod > H5P_MOD_ERR && mod < H5P_MOD_MAX);
@@ -1473,27 +1473,27 @@ H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
if(pclass->props) {
hbool_t make_cb = FALSE;
- H5SL_destroy(pclass->props, H5P_free_prop_cb, &make_cb);
+ H5SL_destroy(pclass->props, H5P__free_prop_cb, &make_cb);
} /* end if */
pclass = H5FL_FREE(H5P_genclass_t, pclass);
/* Reduce the number of dependent classes on parent class also */
if(par_class != NULL)
- H5P_access_class(par_class, H5P_MOD_DEC_CLS);
+ H5P__access_class(par_class, H5P_MOD_DEC_CLS);
} /* end if */
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5P_access_class() */
+} /* H5P__access_class() */
/*--------------------------------------------------------------------------
NAME
- H5P_open_class_path_cb
+ H5P__open_class_path_cb
PURPOSE
Internal callback routine to check for duplicated names in parent class.
USAGE
- int H5P_open_class_path_cb(obj, id, key)
+ int H5P__open_class_path_cb(obj, id, key)
H5P_genclass_t *obj; IN: Pointer to class
hid_t id; IN: ID of object being looked at
const void *key; IN: Pointer to information used to compare
@@ -1509,13 +1509,13 @@ H5P_access_class(H5P_genclass_t *pclass, H5P_class_mod_t mod)
REVISION LOG
--------------------------------------------------------------------------*/
static int
-H5P_open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key)
+H5P__open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key)
{
H5P_genclass_t *obj = (H5P_genclass_t *)_obj; /* Pointer to the class for this ID */
H5P_check_class_t *key = (H5P_check_class_t *)_key; /* Pointer to key information for comparison */
int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(obj);
HDassert(H5I_GENPROP_CLS == H5I_get_type(id));
@@ -1531,16 +1531,16 @@ H5P_open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key)
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* end H5P_open_class_path_cb() */
+} /* end H5P__open_class_path_cb() */
/*--------------------------------------------------------------------------
NAME
- H5P_create_class
+ H5P__create_class
PURPOSE
Internal routine to create a new property list class.
USAGE
- H5P_genclass_t H5P_create_class(par_class, name, type,
+ H5P_genclass_t H5P__create_class(par_class, name, type,
cls_create, create_data, cls_close, close_data)
H5P_genclass_t *par_class; IN: Pointer to parent class
const char *name; IN: Name of class we are creating
@@ -1568,7 +1568,7 @@ H5P_open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key)
REVISION LOG
--------------------------------------------------------------------------*/
H5P_genclass_t *
-H5P_create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t type,
+H5P__create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t type,
H5P_cls_create_func_t cls_create, void *create_data,
H5P_cls_copy_func_t cls_copy, void *copy_data,
H5P_cls_close_func_t cls_close, void *close_data)
@@ -1576,7 +1576,7 @@ H5P_create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t t
H5P_genclass_t *pclass = NULL; /* Property list class created */
H5P_genclass_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI(NULL)
+ FUNC_ENTER_PACKAGE
HDassert(name);
/* Allow internal classes to break some rules */
@@ -1614,7 +1614,7 @@ H5P_create_class(H5P_genclass_t *par_class, const char *name, H5P_plist_type_t t
/* Increment parent class's derived class value */
if(par_class != NULL) {
- if(H5P_access_class(par_class, H5P_MOD_INC_CLS) < 0)
+ if(H5P__access_class(par_class, H5P_MOD_INC_CLS) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, NULL, "Can't increment parent class ref count")
} /* end if */
@@ -1630,22 +1630,22 @@ done:
if(pclass->props) {
hbool_t make_cb = FALSE;
- H5SL_destroy(pclass->props, H5P_free_prop_cb, &make_cb);
+ H5SL_destroy(pclass->props, H5P__free_prop_cb, &make_cb);
} /* end if */
pclass = H5FL_FREE(H5P_genclass_t, pclass);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_create_class() */
+} /* H5P__create_class() */
/*--------------------------------------------------------------------------
NAME
- H5P_create
+ H5P__create
PURPOSE
Internal routine to create a new property list of a property list class.
USAGE
- H5P_genplist_t *H5P_create(class)
+ H5P_genplist_t *H5P__create(class)
H5P_genclass_t *class; IN: Property list class create list from
RETURNS
Returns a pointer to the newly created property list on success,
@@ -1665,7 +1665,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5P_genplist_t *
-H5P_create(H5P_genclass_t *pclass)
+H5P__create(H5P_genclass_t *pclass)
{
H5P_genclass_t *tclass; /* Temporary class pointer */
H5P_genplist_t *plist = NULL; /* New property list created */
@@ -1673,7 +1673,7 @@ H5P_create(H5P_genclass_t *pclass)
H5SL_t *seen = NULL; /* Skip list to hold names of properties already seen */
H5P_genplist_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_STATIC
HDassert(pclass);
@@ -1748,7 +1748,7 @@ H5P_create(H5P_genclass_t *pclass)
} /* end while */
/* Increment the number of property lists derived from class */
- if(H5P_access_class(plist->pclass,H5P_MOD_INC_LST) < 0)
+ if(H5P__access_class(plist->pclass,H5P_MOD_INC_LST) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, NULL,"Can't increment class ref count")
/* Set return value */
@@ -1766,7 +1766,7 @@ done:
if(plist->props) {
unsigned make_cb=1;
- H5SL_destroy(plist->props,H5P_free_prop_cb,&make_cb);
+ H5SL_destroy(plist->props, H5P__free_prop_cb, &make_cb);
} /* end if */
/* Close the deleted property skip list */
@@ -1779,7 +1779,7 @@ done:
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_create() */
+} /* H5P__create() */
/*--------------------------------------------------------------------------
@@ -1791,7 +1791,7 @@ done:
hid_t H5P_create_id(pclass)
H5P_genclass_t *pclass; IN: Property list class create list from
RETURNS
- Returns a valid property list ID on success, FAIL on failure.
+ Returns a valid property list ID on success, H5I_INVALID_HID on failure.
DESCRIPTION
Creates a property list of a given class. If a 'create' callback
exists for the property list class, it is called before the
@@ -1812,20 +1812,20 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref)
hid_t plist_id = FAIL; /* Property list ID */
hid_t ret_value = H5I_INVALID_HID; /* return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_NOAPI(H5I_INVALID_HID)
HDassert(pclass);
/* Create the new property list */
- if((plist=H5P_create(pclass)) == NULL)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list")
+ if((plist = H5P__create(pclass)) == NULL)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list")
/* Get an atom for the property list */
if((plist_id = H5I_register(H5I_GENPROP_LST, plist, app_ref)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to atomize property list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to atomize property list")
/* Save the property list ID in the property list struct, for use in the property class's 'close' callback */
- plist->plist_id=plist_id;
+ plist->plist_id = plist_id;
/* Call the class callback (if it exists) now that we have the property list ID
* (up through chain of parent classes also)
@@ -1836,7 +1836,7 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref)
if((tclass->create_func)(plist_id, tclass->create_data) < 0) {
/* Delete ID, ignore return value */
H5I_remove(plist_id);
- HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL,"Can't initialize property")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, H5I_INVALID_HID, "Can't initialize property")
} /* end if */
} /* end if */
@@ -1848,10 +1848,10 @@ H5P_create_id(H5P_genclass_t *pclass, hbool_t app_ref)
plist->class_init = TRUE;
/* Set the return value */
- ret_value=plist_id;
+ ret_value = plist_id;
done:
- if(ret_value<0 && plist)
+ if(H5I_INVALID_HID == ret_value && plist)
H5P_close(plist);
FUNC_LEAVE_NOAPI(ret_value)
@@ -1860,11 +1860,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_register_real
+ H5P__register_real
PURPOSE
Internal routine to register a new property in a property list class.
USAGE
- herr_t H5P_register_real(class, name, size, default, prp_create, prp_set,
+ herr_t H5P__register_real(class, name, size, default, prp_create, prp_set,
prp_get, prp_close, prp_encode, prp_decode)
H5P_genclass_t *class; IN: Property list class to modify
const char *name; IN: Name of property to register
@@ -1998,7 +1998,7 @@ done:
The 'encode' callback is called when a property list with this
property is being encoded. H5P_prp_encode_func_t is defined as:
- typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
+ typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
void *value, void *plist, uint8_t **buf);
where the parameters to the callback function are:
void *f; IN: A fake file structure used to encode.
@@ -2007,12 +2007,12 @@ done:
void *plist; IN: The property list structure.
uint8_t **buf; OUT: The buffer that holds the encoded property;
The 'encode' routine returns the size needed to encode the property value
- if the buffer passed in is NULL or the size is zero. Otherwise it encodes
+ if the buffer passed in is NULL or the size is zero. Otherwise it encodes
the property value into binary in buf.
The 'decode' callback is called when a property list with this
property is being decoded. H5P_prp_encode_func_t is defined as:
- typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
+ typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
void *value, void *plist, uint8_t **buf);
where the parameters to the callback function are:
void *f; IN: A fake file structure used to decode.
@@ -2043,7 +2043,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size,
+H5P__register_real(H5P_genclass_t *pclass, const char *name, size_t size,
const void *def_value, H5P_prp_create_func_t prp_create,
H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
H5P_prp_encode_func_t prp_encode, H5P_prp_decode_func_t prp_decode,
@@ -2054,7 +2054,7 @@ H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size,
H5P_genprop_t *new_prop = NULL; /* Temporary property pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
HDassert(pclass);
HDassert(0 == pclass->plists);
@@ -2067,13 +2067,13 @@ H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size,
HGOTO_ERROR(H5E_PLIST, H5E_EXISTS, FAIL, "property already exists")
/* Create property object from parameters */
- if(NULL == (new_prop = H5P_create_prop(name, size, H5P_PROP_WITHIN_CLASS,
+ if(NULL == (new_prop = H5P__create_prop(name, size, H5P_PROP_WITHIN_CLASS,
def_value, prp_create, prp_set, prp_get, prp_encode, prp_decode,
prp_delete, prp_copy, prp_cmp, prp_close)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL,"Can't create property")
/* Insert property into property list class */
- if(H5P_add_prop(pclass->props, new_prop) < 0)
+ if(H5P__add_prop(pclass->props, new_prop) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class")
/* Increment property count for class */
@@ -2084,20 +2084,20 @@ H5P_register_real(H5P_genclass_t *pclass, const char *name, size_t size,
done:
if(ret_value < 0)
- if(new_prop && H5P_free_prop(new_prop) < 0)
+ if(new_prop && H5P__free_prop(new_prop) < 0)
HDONE_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close property")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_register_real() */
+} /* H5P__register_real() */
/*--------------------------------------------------------------------------
NAME
- H5P_register
+ H5P__register
PURPOSE
Internal routine to register a new property in a property list class.
USAGE
- herr_t H5P_register(class, name, size, default, prp_create, prp_set, prp_get, prp_close)
+ herr_t H5P__register(class, name, size, default, prp_create, prp_set, prp_get, prp_close)
H5P_genclass_t **class; IN: Property list class to modify
const char *name; IN: Name of property to register
size_t size; IN: Size of property in bytes
@@ -2176,7 +2176,7 @@ done:
The 'encode' callback is called when a property list with this
property is being encoded. H5P_prp_encode_func_t is defined as:
- typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
+ typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
void *value, void *plist, uint8_t **buf);
where the parameters to the callback function are:
void *f; IN: A fake file structure used to encode.
@@ -2185,12 +2185,12 @@ done:
void *plist; IN: The property list structure.
uint8_t **buf; OUT: The buffer that holds the encoded property;
The 'encode' routine returns the size needed to encode the property value
- if the buffer passed in is NULL or the size is zero. Otherwise it encodes
+ if the buffer passed in is NULL or the size is zero. Otherwise it encodes
the property value into binary in buf.
The 'decode' callback is called when a property list with this
property is being decoded. H5P_prp_encode_func_t is defined as:
- typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
+ typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
void *value, void *plist, uint8_t **buf);
where the parameters to the callback function are:
void *f; IN: A fake file structure used to decode.
@@ -2275,7 +2275,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_register(H5P_genclass_t **ppclass, const char *name, size_t size,
+H5P__register(H5P_genclass_t **ppclass, const char *name, size_t size,
const void *def_value, H5P_prp_create_func_t prp_create,
H5P_prp_set_func_t prp_set, H5P_prp_get_func_t prp_get,
H5P_prp_encode_func_t prp_encode, H5P_prp_decode_func_t prp_decode,
@@ -2287,7 +2287,7 @@ H5P_register(H5P_genclass_t **ppclass, const char *name, size_t size,
H5P_genclass_t *new_class = NULL; /* New class pointer */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(FAIL)
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(ppclass);
@@ -2297,7 +2297,7 @@ H5P_register(H5P_genclass_t **ppclass, const char *name, size_t size,
* been created since the last modification was made to the class.
*/
if(pclass->plists > 0 || pclass->classes > 0) {
- if(NULL == (new_class = H5P_create_class(pclass->parent, pclass->name,
+ if(NULL == (new_class = H5P__create_class(pclass->parent, pclass->name,
pclass->type, pclass->create_func, pclass->create_data,
pclass->copy_func, pclass->copy_data,
pclass->close_func, pclass->close_data)))
@@ -2313,11 +2313,11 @@ H5P_register(H5P_genclass_t **ppclass, const char *name, size_t size,
H5P_genprop_t *pcopy; /* Property copy */
/* Make a copy of the class's property */
- if(NULL == (pcopy = H5P_dup_prop((H5P_genprop_t *)H5SL_item(curr_node), H5P_PROP_WITHIN_CLASS)))
+ if(NULL == (pcopy = H5P__dup_prop((H5P_genprop_t *)H5SL_item(curr_node), H5P_PROP_WITHIN_CLASS)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property")
/* Insert the initialized property into the property class */
- if(H5P_add_prop(new_class->props, pcopy) < 0)
+ if(H5P__add_prop(new_class->props, pcopy) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class")
/* Increment property count for class */
@@ -2333,7 +2333,7 @@ H5P_register(H5P_genclass_t **ppclass, const char *name, size_t size,
} /* end if */
/* Really register the property in the class */
- if(H5P_register_real(pclass, name, size, def_value, prp_create, prp_set, prp_get,
+ if(H5P__register_real(pclass, name, size, def_value, prp_create, prp_set, prp_get,
prp_encode, prp_decode, prp_delete, prp_copy, prp_cmp, prp_close) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "can't register property")
@@ -2343,11 +2343,11 @@ H5P_register(H5P_genclass_t **ppclass, const char *name, size_t size,
done:
if(ret_value < 0)
- if(new_class && H5P_close_class(new_class) < 0)
+ if(new_class && H5P__close_class(new_class) < 0)
HDONE_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close new property class")
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_register() */
+} /* H5P__register() */
/*--------------------------------------------------------------------------
@@ -2356,7 +2356,7 @@ done:
PURPOSE
Internal routine to insert a new property in a property list.
USAGE
- herr_t H5P_insert(plist, name, size, value, prp_set, prp_get, prp_close,
+ herr_t H5P_insert(plist, name, size, value, prp_set, prp_get, prp_close,
prp_encode, prp_decode)
H5P_genplist_t *plist; IN: Property list to add property to
const char *name; IN: Name of property to add
@@ -2417,7 +2417,7 @@ done:
The 'encode' callback is called when a property list with this
property is being encoded. H5P_prp_encode_func_t is defined as:
- typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
+ typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
void *value, void *plist, uint8_t **buf);
where the parameters to the callback function are:
void *f; IN: A fake file structure used to encode.
@@ -2426,12 +2426,12 @@ done:
void *plist; IN: The property list structure.
uint8_t **buf; OUT: The buffer that holds the encoded property;
The 'encode' routine returns the size needed to encode the property value
- if the buffer passed in is NULL or the size is zero. Otherwise it encodes
+ if the buffer passed in is NULL or the size is zero. Otherwise it encodes
the property value into binary in buf.
The 'decode' callback is called when a property list with this
property is being decoded. H5P_prp_encode_func_t is defined as:
- typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
+ typedef herr_t (*H5P_prp_encode_func_t)(void *f, size_t *size,
void *value, void *plist, uint8_t **buf);
where the parameters to the callback function are:
void *f; IN: A fake file structure used to decode.
@@ -2570,13 +2570,13 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size,
/* Ok to add to property list */
/* Create property object from parameters */
- if(NULL == (new_prop = H5P_create_prop(name, size, H5P_PROP_WITHIN_LIST, value, NULL,
- prp_set, prp_get, prp_encode, prp_decode, prp_delete, prp_copy,
+ if(NULL == (new_prop = H5P__create_prop(name, size, H5P_PROP_WITHIN_LIST, value, NULL,
+ prp_set, prp_get, prp_encode, prp_decode, prp_delete, prp_copy,
prp_cmp, prp_close)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "Can't create property")
/* Insert property into property list class */
- if(H5P_add_prop(plist->props, new_prop) < 0)
+ if(H5P__add_prop(plist->props, new_prop) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL, "Can't insert property into class")
/* Increment property count for class */
@@ -2584,7 +2584,7 @@ H5P_insert(H5P_genplist_t *plist, const char *name, size_t size,
done:
if(ret_value < 0)
- if(new_prop && H5P_free_prop(new_prop) < 0)
+ if(new_prop && H5P__free_prop(new_prop) < 0)
HDONE_ERROR(H5E_PLIST, H5E_CANTRELEASE, FAIL, "unable to close property")
FUNC_LEAVE_NOAPI(ret_value)
@@ -2615,7 +2615,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op,
+H5P__do_prop(H5P_genplist_t *plist, const char *name, H5P_do_plist_op_t plist_op,
H5P_do_pclass_op_t pclass_op, void *udata)
{
H5P_genclass_t *tclass; /* Temporary class pointer */
@@ -2697,8 +2697,8 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__poke_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
- void *_udata)
+H5P__poke_plist_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDEBUG_UNUSED *name,
+ H5P_genprop_t *prop, void *_udata)
{
H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
@@ -2744,7 +2744,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__poke_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
+H5P__poke_pclass_cb(H5P_genplist_t *plist, const char H5_ATTR_NDEBUG_UNUSED *name, H5P_genprop_t *prop,
void *_udata)
{
H5P_prop_set_ud_t *udata = (H5P_prop_set_ud_t *)_udata; /* User data for callback */
@@ -2764,20 +2764,20 @@ H5P__poke_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop
HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "property has zero size")
/* Make a copy of the class's property */
- if(NULL == (pcopy = H5P_dup_prop(prop, H5P_PROP_WITHIN_LIST)))
+ if(NULL == (pcopy = H5P__dup_prop(prop, H5P_PROP_WITHIN_LIST)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property")
H5MM_memcpy(pcopy->value, udata->value, pcopy->size);
/* Insert the changed property into the property list */
- if(H5P_add_prop(plist->props, pcopy) < 0)
+ if(H5P__add_prop(plist->props, pcopy) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert changed property into skip list")
done:
/* Cleanup on failure */
if(ret_value < 0)
if(pcopy)
- H5P_free_prop(pcopy);
+ H5P__free_prop(pcopy);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5P__poke_pclass_cb() */
@@ -2970,13 +2970,13 @@ H5P__set_pclass_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
prp_value = udata->value;
/* Make a copy of the class's property */
- if(NULL == (pcopy = H5P_dup_prop(prop, H5P_PROP_WITHIN_LIST)))
+ if(NULL == (pcopy = H5P__dup_prop(prop, H5P_PROP_WITHIN_LIST)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "Can't copy property")
H5MM_memcpy(pcopy->value, prp_value, pcopy->size);
/* Insert the changed property into the property list */
- if(H5P_add_prop(plist->props, pcopy) < 0)
+ if(H5P__add_prop(plist->props, pcopy) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert changed property into skip list")
done:
@@ -2987,7 +2987,7 @@ done:
/* Cleanup on failure */
if(ret_value < 0)
if(pcopy)
- H5P_free_prop(pcopy);
+ H5P__free_prop(pcopy);
FUNC_LEAVE_NOAPI(ret_value)
} /* H5P__set_pclass_cb() */
@@ -3109,11 +3109,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_exist_pclass
+ H5P__exist_pclass
PURPOSE
Internal routine to query the existance of a property in a property class.
USAGE
- herr_t H5P_exist_pclass(pclass, name)
+ herr_t H5P__exist_pclass(pclass, name)
H5P_genclass_t *pclass; IN: Property class to check
const char *name; IN: Name of property to check for
RETURNS
@@ -3129,11 +3129,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
htri_t
-H5P_exist_pclass(H5P_genclass_t *pclass, const char *name)
+H5P__exist_pclass(H5P_genclass_t *pclass, const char *name)
{
htri_t ret_value = FAIL; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(pclass);
HDassert(name);
@@ -3159,16 +3159,16 @@ H5P_exist_pclass(H5P_genclass_t *pclass, const char *name)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_exist_pclass() */
+} /* H5P__exist_pclass() */
/*--------------------------------------------------------------------------
NAME
- H5P_get_size_plist
+ H5P__get_size_plist
PURPOSE
Internal routine to query the size of a property in a property list.
USAGE
- herr_t H5P_get_size_plist(plist, name)
+ herr_t H5P__get_size_plist(plist, name)
const H5P_genplist_t *plist; IN: Property list to check
const char *name; IN: Name of property to query
size_t *size; OUT: Size of property
@@ -3185,12 +3185,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_get_size_plist(const H5P_genplist_t *plist, const char *name, size_t *size)
+H5P__get_size_plist(const H5P_genplist_t *plist, const char *name, size_t *size)
{
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(plist);
HDassert(name);
@@ -3205,16 +3205,16 @@ H5P_get_size_plist(const H5P_genplist_t *plist, const char *name, size_t *size)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_get_size_plist() */
+} /* H5P__get_size_plist() */
/*--------------------------------------------------------------------------
NAME
- H5P_get_size_pclass
+ H5P__get_size_pclass
PURPOSE
Internal routine to query the size of a property in a property class.
USAGE
- herr_t H5P_get_size_pclass(pclass, name)
+ herr_t H5P__get_size_pclass(pclass, name)
H5P_genclass_t *pclass; IN: Property class to check
const char *name; IN: Name of property to query
size_t *size; OUT: Size of property
@@ -3231,36 +3231,36 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_get_size_pclass(H5P_genclass_t *pclass, const char *name, size_t *size)
+H5P__get_size_pclass(H5P_genclass_t *pclass, const char *name, size_t *size)
{
H5P_genprop_t *prop; /* Temporary property pointer */
- herr_t ret_value=SUCCEED; /* return value */
+ herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(pclass);
HDassert(name);
HDassert(size);
/* Find property */
- if((prop=H5P_find_prop_pclass(pclass,name)) == NULL)
+ if((prop = H5P__find_prop_pclass(pclass,name)) == NULL)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "property doesn't exist")
/* Get property size */
- *size=prop->size;
+ *size = prop->size;
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_get_size_pclass() */
+} /* H5P__get_size_pclass() */
/*--------------------------------------------------------------------------
NAME
- H5P_get_nprops_plist
+ H5P__get_nprops_plist
PURPOSE
Internal routine to query the number of properties in a property list
USAGE
- herr_t H5P_get_nprops_plist(plist, nprops)
+ herr_t H5P__get_nprops_plist(plist, nprops)
H5P_genplist_t *plist; IN: Property list to check
size_t *nprops; OUT: Number of properties in the property list
RETURNS
@@ -3275,9 +3275,9 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops)
+H5P__get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops)
{
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(plist);
HDassert(nprops);
@@ -3286,7 +3286,7 @@ H5P_get_nprops_plist(const H5P_genplist_t *plist, size_t *nprops)
*nprops = plist->nprops;
FUNC_LEAVE_NOAPI(SUCCEED)
-} /* H5P_get_nprops_plist() */
+} /* H5P__get_nprops_plist() */
/*--------------------------------------------------------------------------
@@ -3337,11 +3337,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_cmp_prop
+ H5P__cmp_prop
PURPOSE
Internal routine to compare two generic properties
USAGE
- int H5P_cmp_prop(prop1, prop2)
+ int H5P__cmp_prop(prop1, prop2)
H5P_genprop_t *prop1; IN: 1st property to compare
H5P_genprop_t *prop1; IN: 2nd property to compare
RETURNS
@@ -3358,12 +3358,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static int
-H5P_cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2)
+H5P__cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2)
{
int cmp_value; /* Value from comparison */
int ret_value = 0; /* return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_STATIC_NOERR
HDassert(prop1);
HDassert(prop2);
@@ -3432,16 +3432,16 @@ H5P_cmp_prop(const H5P_genprop_t *prop1, const H5P_genprop_t *prop2)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_cmp_prop() */
+} /* H5P__cmp_prop() */
/*--------------------------------------------------------------------------
NAME
- H5P_cmp_class
+ H5P__cmp_class
PURPOSE
Internal routine to compare two generic property classes
USAGE
- int H5P_cmp_class(pclass1, pclass2)
+ int H5P__cmp_class(pclass1, pclass2)
H5P_genclass_t *pclass1; IN: 1st property class to compare
H5P_genclass_t *pclass2; IN: 2nd property class to compare
RETURNS
@@ -3458,13 +3458,13 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
int
-H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
+H5P__cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
{
H5SL_node_t *tnode1, *tnode2; /* Temporary pointer to property nodes */
int cmp_value; /* Value from comparison */
int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(pclass1);
HDassert(pclass2);
@@ -3528,7 +3528,7 @@ H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
/* Compare the two properties */
prop1 = (H5P_genprop_t *)H5SL_item(tnode1);
prop2 = (H5P_genprop_t *)H5SL_item(tnode2);
- if((cmp_value = H5P_cmp_prop(prop1, prop2)) != 0)
+ if((cmp_value = H5P__cmp_prop(prop1, prop2)) != 0)
HGOTO_DONE(cmp_value);
/* Advance the pointers */
@@ -3538,7 +3538,7 @@ H5P_cmp_class(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_cmp_class() */
+} /* H5P__cmp_class() */
/*--------------------------------------------------------------------------
@@ -3588,7 +3588,7 @@ H5P__cmp_plist_cb(H5P_genprop_t *prop, void *_udata)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, H5_ITER_ERROR, "property doesn't exist")
/* Compare the two properties */
- if((udata->cmp_value = H5P_cmp_prop(prop, prop2)) != 0)
+ if((udata->cmp_value = H5P__cmp_prop(prop, prop2)) != 0)
HGOTO_DONE(H5_ITER_STOP);
} /* end if */
else {
@@ -3604,11 +3604,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_cmp_plist
+ H5P__cmp_plist
PURPOSE
Internal routine to compare two generic property lists
USAGE
- herr_t H5P_cmp_plist(plist1, plist2, cmp_ret)
+ herr_t H5P__cmp_plist(plist1, plist2, cmp_ret)
H5P_genplist_t *plist1; IN: 1st property list to compare
H5P_genplist_t *plist2; IN: 2nd property list to compare
int *cmp_ret; OUT: Comparison value for two property lists
@@ -3627,14 +3627,14 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2,
+H5P__cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2,
int *cmp_ret)
{
H5P_plist_cmp_ud_t udata; /* User data for callback */
int idx = 0; /* Index of property to begin with */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(plist1);
HDassert(plist2);
@@ -3665,7 +3665,7 @@ H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2,
udata.plist2 = plist2;
/* Iterate over properties in first property list */
- if((ret_value = H5P_iterate_plist(plist1, TRUE, &idx, H5P__cmp_plist_cb, &udata)) < 0)
+ if((ret_value = H5P__iterate_plist(plist1, TRUE, &idx, H5P__cmp_plist_cb, &udata)) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTREGISTER, FAIL, "unable to iterate over list")
if(ret_value != 0) {
*cmp_ret = udata.cmp_value;
@@ -3673,7 +3673,7 @@ H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2,
} /* end if */
/* Check the parent classes */
- if((*cmp_ret = H5P_cmp_class(plist1->pclass, plist2->pclass)) != 0)
+ if((*cmp_ret = H5P__cmp_class(plist1->pclass, plist2->pclass)) != 0)
HGOTO_DONE(SUCCEED);
/* Property lists must be equal, set comparison value to 0 */
@@ -3681,7 +3681,7 @@ H5P_cmp_plist(const H5P_genplist_t *plist1, const H5P_genplist_t *plist2,
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_cmp_plist() */
+} /* H5P__cmp_plist() */
/*--------------------------------------------------------------------------
@@ -3718,7 +3718,7 @@ H5P_class_isa(const H5P_genclass_t *pclass1, const H5P_genclass_t *pclass2)
HDassert(pclass2);
/* Compare property classes */
- if(H5P_cmp_class(pclass1, pclass2) == 0) {
+ if(H5P__cmp_class(pclass1, pclass2) == 0) {
HGOTO_DONE(TRUE);
} else {
/* Check if the class is derived, and walk up the chain, if so */
@@ -3931,11 +3931,11 @@ H5P__iterate_plist_pclass_cb(void *_item, void *_key, void *_udata)
/*--------------------------------------------------------------------------
NAME
- H5P_iterate_plist
+ H5P__iterate_plist
PURPOSE
Internal routine to iterate over the properties in a property list
USAGE
- int H5P_iterate_plist(plist, iter_all_prop, idx, cb_func, iter_data)
+ int H5P__iterate_plist(plist, iter_all_prop, idx, cb_func, iter_data)
const H5P_genplist_t *plist; IN: Property list to iterate over
hbool_t iter_all_prop; IN: Whether to iterate over all properties
(TRUE), or just non-default (i.e. changed)
@@ -3984,7 +3984,7 @@ iteration, the function's behavior is undefined.
REVISION LOG
--------------------------------------------------------------------------*/
int
-H5P_iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop, int *idx,
+H5P__iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop, int *idx,
H5P_iterate_int_t cb_func, void *udata)
{
H5P_genclass_t *tclass; /* Temporary class pointer */
@@ -3993,7 +3993,7 @@ H5P_iterate_plist(const H5P_genplist_t *plist, hbool_t iter_all_prop, int *idx,
int curr_idx = 0; /* Current iteration index */
int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(plist);
@@ -4042,7 +4042,7 @@ done:
H5SL_close(seen);
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_iterate_plist() */
+} /* H5P__iterate_plist() */
/*--------------------------------------------------------------------------
@@ -4067,10 +4067,9 @@ property list class.
REVISION LOG
--------------------------------------------------------------------------*/
static int
-H5P__iterate_pclass_cb(void *_item, void *_key, void *_udata)
+H5P__iterate_pclass_cb(void *_item, void H5_ATTR_NDEBUG_UNUSED *_key, void *_udata)
{
H5P_genprop_t *item = (H5P_genprop_t *)_item; /* Pointer to the property */
- char *key = (char *)_key; /* Pointer to the property's name */
H5P_iter_pclass_ud_t *udata = (H5P_iter_pclass_ud_t *)_udata; /* Pointer to user data */
int ret_value = 0; /* Return value */
@@ -4078,7 +4077,7 @@ H5P__iterate_pclass_cb(void *_item, void *_key, void *_udata)
/* Sanity check */
HDassert(item);
- HDassert(key);
+ HDassert((char *)_key);
/* Check if we've found the correctly indexed property */
if(*udata->curr_idx_ptr >= udata->prev_idx) {
@@ -4098,11 +4097,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_iterate_pclass
+ H5P__iterate_pclass
PURPOSE
Internal routine to iterate over the properties in a property class
USAGE
- herr_t H5P_iterate_pclass(pclass, idx, cb_func, iter_data)
+ herr_t H5P__iterate_pclass(pclass, idx, cb_func, iter_data)
const H5P_genpclass_t *pclass; IN: Property list class to iterate over
int *idx; IN/OUT: Index of the property to begin with
H5P_iterate_t cb_func; IN: Function pointer to function to be
@@ -4148,14 +4147,14 @@ iteration, the function's behavior is undefined.
REVISION LOG
--------------------------------------------------------------------------*/
int
-H5P_iterate_pclass(const H5P_genclass_t *pclass, int *idx,
+H5P__iterate_pclass(const H5P_genclass_t *pclass, int *idx,
H5P_iterate_int_t cb_func, void *udata)
{
H5P_iter_pclass_ud_t udata_int; /* User data for skip list iterator */
int curr_idx = 0; /* Current iteration index */
int ret_value = 0; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
/* Sanity check */
HDassert(pclass);
@@ -4178,7 +4177,7 @@ done:
*idx = curr_idx;
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_iterate_pclass() */
+} /* H5P__iterate_pclass() */
/*--------------------------------------------------------------------------
@@ -4204,8 +4203,8 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5P__peek_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
- void *_udata)
+H5P__peek_cb(H5P_genplist_t H5_ATTR_NDEBUG_UNUSED *plist, const char H5_ATTR_NDEBUG_UNUSED *name,
+ H5P_genprop_t *prop, void *_udata)
{
H5P_prop_get_ud_t *udata = (H5P_prop_get_ud_t *)_udata; /* User data for callback */
herr_t ret_value = SUCCEED; /* Return value */
@@ -4450,7 +4449,7 @@ H5P__del_plist_cb(H5P_genplist_t *plist, const char *name, H5P_genprop_t *prop,
HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "can't remove property from skip list")
/* Free the property, ignoring return value, nothing we can do */
- H5P_free_prop(prop);
+ H5P__free_prop(prop);
/* Decrement the number of properties in list */
plist->nprops--;
@@ -4586,11 +4585,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_copy_prop_plist
+ H5P__copy_prop_plist
PURPOSE
Internal routine to copy a property from one list to another
USAGE
- herr_t H5P_copy_prop_plist(dst_plist, src_plist, name)
+ herr_t H5P__copy_prop_plist(dst_plist, src_plist, name)
hid_t dst_id; IN: ID of destination property list or class
hid_t src_id; IN: ID of source property list or class
const char *name; IN: Name of property to copy
@@ -4616,7 +4615,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
+H5P__copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
{
H5P_genplist_t *dst_plist; /* Pointer to destination property list */
H5P_genplist_t *src_plist; /* Pointer to source property list */
@@ -4624,7 +4623,7 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
H5P_genprop_t *new_prop=NULL; /* Pointer to new property */
herr_t ret_value=SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(name);
@@ -4642,7 +4641,7 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
prop = H5P__find_prop_plist(src_plist, name);
/* Make a copy of the source property */
- if((new_prop=H5P_dup_prop(prop,H5P_PROP_WITHIN_LIST)) == NULL)
+ if((new_prop = H5P__dup_prop(prop,H5P_PROP_WITHIN_LIST)) == NULL)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL,"Can't copy property")
/* Call property copy callback, if it exists */
@@ -4652,7 +4651,7 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
} /* end if */
/* Insert the initialized property into the property list */
- if(H5P_add_prop(dst_plist->props,new_prop) < 0)
+ if(H5P__add_prop(dst_plist->props,new_prop) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into list")
/* Increment the number of properties in list */
@@ -4664,7 +4663,7 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
prop = H5P__find_prop_plist(src_plist, name);
/* Create property object from parameters */
- if(NULL == (new_prop = H5P_create_prop(prop->name, prop->size, H5P_PROP_WITHIN_LIST, prop->value,
+ if(NULL == (new_prop = H5P__create_prop(prop->name, prop->size, H5P_PROP_WITHIN_LIST, prop->value,
prop->create, prop->set, prop->get, prop->encode, prop->decode,
prop->del, prop->copy, prop->cmp, prop->close)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL,"Can't create property")
@@ -4676,7 +4675,7 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
} /* end if */
/* Insert property into property list class */
- if(H5P_add_prop(dst_plist->props, new_prop) < 0)
+ if(H5P__add_prop(dst_plist->props, new_prop) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINSERT, FAIL,"Can't insert property into class")
/* Increment property count for class */
@@ -4685,22 +4684,22 @@ H5P_copy_prop_plist(hid_t dst_id, hid_t src_id, const char *name)
done:
/* Cleanup, if necessary */
- if(ret_value<0) {
- if(new_prop!=NULL)
- H5P_free_prop(new_prop);
+ if(ret_value < 0) {
+ if(new_prop != NULL)
+ H5P__free_prop(new_prop);
} /* end if */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_copy_prop_plist() */
+} /* H5P__copy_prop_plist() */
/*--------------------------------------------------------------------------
NAME
- H5P_copy_prop_pclass
+ H5P__copy_prop_pclass
PURPOSE
Internal routine to copy a property from one class to another
USAGE
- herr_t H5P_copy_prop_pclass(dst_pclass, src_pclass, name)
+ herr_t H5P__copy_prop_pclass(dst_pclass, src_pclass, name)
H5P_genclass_t *dst_pclass; IN: Pointer to destination class
H5P_genclass_t *src_pclass; IN: Pointer to source class
const char *name; IN: Name of property to copy
@@ -4724,7 +4723,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
+H5P__copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
{
H5P_genclass_t *src_pclass; /* Source property class, containing property to copy */
H5P_genclass_t *dst_pclass; /* Destination property class */
@@ -4732,7 +4731,7 @@ H5P_copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value = SUCCEED; /* return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
/* Sanity check */
HDassert(name);
@@ -4744,19 +4743,19 @@ H5P_copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "destination property class object doesn't exist")
/* Get the property from the source */
- if(NULL == (prop = H5P_find_prop_pclass(src_pclass, name)))
+ if(NULL == (prop = H5P__find_prop_pclass(src_pclass, name)))
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "unable to locate property")
/* If the property exists in the destination already */
- if(H5P_exist_pclass(dst_pclass, name)) {
+ if(H5P__exist_pclass(dst_pclass, name)) {
/* Delete the old property from the destination class */
- if(H5P_unregister(dst_pclass, name) < 0)
+ if(H5P__unregister(dst_pclass, name) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property")
} /* end if */
/* Register the property into the destination */
orig_dst_pclass = dst_pclass;
- if(H5P_register(&dst_pclass, name, prop->size, prop->value, prop->create, prop->set, prop->get,
+ if(H5P__register(&dst_pclass, name, prop->size, prop->value, prop->create, prop->set, prop->get,
prop->encode, prop->decode, prop->del, prop->copy, prop->cmp, prop->close) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTDELETE, FAIL, "unable to remove property")
@@ -4770,7 +4769,7 @@ H5P_copy_prop_pclass(hid_t dst_id, hid_t src_id, const char *name)
HDassert(old_dst_pclass == orig_dst_pclass);
/* Close the previous class */
- if(H5P_close_class(old_dst_pclass) < 0)
+ if(H5P__close_class(old_dst_pclass) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "unable to close original property class after substitution")
} /* end if */
@@ -4778,16 +4777,16 @@ done:
/* Cleanup, if necessary */
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_copy_prop_pclass() */
+} /* H5P__copy_prop_pclass() */
/*--------------------------------------------------------------------------
NAME
- H5P_unregister
+ H5P__unregister
PURPOSE
Internal routine to remove a property from a property list class.
USAGE
- herr_t H5P_unregister(pclass, name)
+ herr_t H5P__unregister(pclass, name)
H5P_genclass_t *pclass; IN: Property list class to modify
const char *name; IN: Name of property to remove
RETURNS
@@ -4803,12 +4802,12 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_unregister(H5P_genclass_t *pclass, const char *name)
+H5P__unregister(H5P_genclass_t *pclass, const char *name)
{
H5P_genprop_t *prop; /* Temporary property pointer */
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(pclass);
HDassert(name);
@@ -4822,7 +4821,7 @@ H5P_unregister(H5P_genclass_t *pclass, const char *name)
HGOTO_ERROR(H5E_PLIST,H5E_CANTDELETE,FAIL,"can't remove property from skip list")
/* Free the property, ignoring return value, nothing we can do */
- H5P_free_prop(prop);
+ H5P__free_prop(prop);
/* Decrement the number of registered properties in class */
pclass->nprops--;
@@ -4832,7 +4831,7 @@ H5P_unregister(H5P_genclass_t *pclass, const char *name)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_unregister() */
+} /* H5P__unregister() */
/*--------------------------------------------------------------------------
@@ -4982,18 +4981,18 @@ H5P_close(void *_plist)
} /* end while */
/* Decrement class's dependent property list value! */
- if(H5P_access_class(plist->pclass,H5P_MOD_DEC_LST) < 0)
+ if(H5P__access_class(plist->pclass,H5P_MOD_DEC_LST) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "Can't decrement class ref count")
/* Free the list of 'seen' properties */
H5SL_close(seen);
- seen=NULL;
+ seen = NULL;
/* Free the list of deleted property names */
- H5SL_destroy(plist->del,H5P_free_del_name_cb,NULL);
+ H5SL_destroy(plist->del, H5P__free_del_name_cb, NULL);
/* Free the properties */
- H5SL_destroy(plist->props,H5P_free_prop_cb,&make_cb);
+ H5SL_destroy(plist->props, H5P__free_prop_cb, &make_cb);
/* Destroy property list object */
plist = H5FL_FREE(H5P_genplist_t, plist);
@@ -5046,11 +5045,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5P_get_class_path
+ H5P__get_class_path
PURPOSE
Internal routine to query the full path of a generic property list class
USAGE
- char *H5P_get_class_name(pclass)
+ char *H5P__get_class_name(pclass)
H5P_genclass_t *pclass; IN: Property list class to check
RETURNS
Success: Pointer to a malloc'ed string containing the full path of class
@@ -5066,11 +5065,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
char *
-H5P_get_class_path(H5P_genclass_t *pclass)
+H5P__get_class_path(H5P_genclass_t *pclass)
{
char *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(pclass);
@@ -5079,14 +5078,14 @@ H5P_get_class_path(H5P_genclass_t *pclass)
char *par_path; /* Parent class's full path */
/* Get the parent class's path */
- par_path = H5P_get_class_path(pclass->parent);
+ par_path = H5P__get_class_path(pclass->parent);
if(par_path != NULL) {
size_t ret_str_len;
/* Allocate enough space for the parent class's path, plus the '/'
* separator, this class's name and the string terminator
*/
- ret_str_len = HDstrlen(par_path) + 1 + HDstrlen(pclass->name) + 1;
+ ret_str_len = HDstrlen(par_path) + HDstrlen(pclass->name) + 1 + 3; /* Extra "+3" to quiet GCC warning - 2019/07/05, QAK */
if(NULL == (ret_value = (char *)H5MM_malloc(ret_str_len)))
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for class name")
@@ -5104,16 +5103,16 @@ H5P_get_class_path(H5P_genclass_t *pclass)
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_get_class_path() */
+} /* H5P__get_class_path() */
/*--------------------------------------------------------------------------
NAME
- H5P_open_class_path
+ H5P__open_class_path
PURPOSE
Internal routine to open [a copy of] a class with its full path name
USAGE
- H5P_genclass_t *H5P_open_class_path(path)
+ H5P_genclass_t *H5P__open_class_path(path)
const char *path; IN: Full path name of class to open [copy of]
RETURNS
Success: Pointer to a generic property class object
@@ -5127,7 +5126,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
H5P_genclass_t *
-H5P_open_class_path(const char *path)
+H5P__open_class_path(const char *path)
{
char *tmp_path = NULL; /* Temporary copy of the path */
char *curr_name; /* Pointer to current component of path name */
@@ -5136,7 +5135,7 @@ H5P_open_class_path(const char *path)
H5P_check_class_t check_info; /* Structure to hold the information for checking duplicate names */
H5P_genclass_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT
+ FUNC_ENTER_PACKAGE
HDassert(path);
@@ -5157,8 +5156,8 @@ H5P_open_class_path(const char *path)
check_info.new_class = NULL;
/* Find the class with this name & parent by iterating over the open classes */
- if(H5I_iterate(H5I_GENPROP_CLS, H5P_open_class_path_cb, &check_info, FALSE) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_BADITER, NULL, "can't iterate over classes")
+ if(H5I_iterate(H5I_GENPROP_CLS, H5P__open_class_path_cb, &check_info, FALSE) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_BADITER, NULL, "can't iterate over classes")
else if(NULL == check_info.new_class)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class")
@@ -5175,13 +5174,13 @@ H5P_open_class_path(const char *path)
check_info.new_class = NULL;
/* Find the class with this name & parent by iterating over the open classes */
- if(H5I_iterate(H5I_GENPROP_CLS, H5P_open_class_path_cb, &check_info, FALSE) < 0)
+ if(H5I_iterate(H5I_GENPROP_CLS, H5P__open_class_path_cb, &check_info, FALSE) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_BADITER, NULL, "can't iterate over classes")
else if(NULL == check_info.new_class)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, NULL, "can't locate class")
/* Copy it */
- if(NULL == (ret_value = H5P_copy_pclass(check_info.new_class)))
+ if(NULL == (ret_value = H5P__copy_pclass(check_info.new_class)))
HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, NULL, "can't copy property class")
done:
@@ -5189,16 +5188,16 @@ done:
H5MM_xfree(tmp_path);
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_open_class_path() */
+} /* H5P__open_class_path() */
/*--------------------------------------------------------------------------
NAME
- H5P_get_class_parent
+ H5P__get_class_parent
PURPOSE
Internal routine to query the parent class of a generic property class
USAGE
- H5P_genclass_t *H5P_get_class_parent(pclass)
+ H5P_genclass_t *H5P__get_class_parent(pclass)
H5P_genclass_t *pclass; IN: Property class to check
RETURNS
Success: Pointer to the parent class of a property class
@@ -5212,11 +5211,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
H5P_genclass_t *
-H5P_get_class_parent(const H5P_genclass_t *pclass)
+H5P__get_class_parent(const H5P_genclass_t *pclass)
{
H5P_genclass_t *ret_value = NULL; /* Return value */
- FUNC_ENTER_NOAPI_NOINIT_NOERR
+ FUNC_ENTER_PACKAGE_NOERR
HDassert(pclass);
@@ -5224,16 +5223,16 @@ H5P_get_class_parent(const H5P_genclass_t *pclass)
ret_value = pclass->parent;
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_get_class_parent() */
+} /* H5P__get_class_parent() */
/*--------------------------------------------------------------------------
NAME
- H5P_close_class
+ H5P__close_class
PURPOSE
Internal routine to close a property list class.
USAGE
- herr_t H5P_close_class(class)
+ herr_t H5P__close_class(class)
H5P_genclass_t *class; IN: Property list class to close
RETURNS
Returns non-negative on success, negative on failure.
@@ -5245,7 +5244,7 @@ H5P_get_class_parent(const H5P_genclass_t *pclass)
REVISION LOG
--------------------------------------------------------------------------*/
herr_t
-H5P_close_class(void *_pclass)
+H5P__close_class(void *_pclass)
{
H5P_genclass_t *pclass = (H5P_genclass_t *)_pclass;
herr_t ret_value = SUCCEED; /* Return value */
@@ -5255,12 +5254,12 @@ H5P_close_class(void *_pclass)
HDassert(pclass);
/* Decrement the reference count & check if the object should go away */
- if(H5P_access_class(pclass, H5P_MOD_DEC_REF) < 0)
+ if(H5P__access_class(pclass, H5P_MOD_DEC_REF) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_NOTFOUND, FAIL, "can't decrement ID ref count")
done:
FUNC_LEAVE_NOAPI(ret_value)
-} /* H5P_close_class() */
+} /* H5P__close_class() */
/*-------------------------------------------------------------------------
@@ -5269,7 +5268,7 @@ done:
* Purpose: Create a new property list, of a given type
*
* Return: Success: ID of new property list
- * Failure: Negative
+ * Failure: H5I_INVALID_HID
*
* Programmer: Quincey Koziol
* Thursday, August 2, 2012
@@ -5291,9 +5290,9 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
/* Check arguments */
if(type == H5P_TYPE_USER)
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "can't create user property list");
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, H5I_INVALID_HID, "can't create user property list");
if(type == H5P_TYPE_ROOT)
- HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "shouldn't be creating root class property list");
+ HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, H5I_INVALID_HID, "shouldn't be creating root class property list");
/* Instantiate a property list of the proper type */
switch(type) {
@@ -5374,11 +5373,11 @@ H5P__new_plist_of_type(H5P_plist_type_t type)
/* Get the class object */
if(NULL == (pclass = (H5P_genclass_t *)H5I_object(class_id)))
- HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "not a property class")
+ HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, H5I_INVALID_HID, "not a property class")
/* Create the new property list */
if((ret_value = H5P_create_id(pclass, TRUE)) < 0)
- HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create property list")
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, H5I_INVALID_HID, "unable to create property list")
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -5394,7 +5393,7 @@ done:
* H5P_genplist_t data structure)
*
* Return: Success: Non-negative ID of property list.
- * Failure: negative.
+ * Failure: H5I_INVALID_HID
*
* Programmer: Quincey Koziol <koziol@hdfgroup.org>
* April 22, 2014