diff options
Diffstat (limited to 'src/H5Pint.c')
-rw-r--r-- | src/H5Pint.c | 589 |
1 files changed, 286 insertions, 303 deletions
diff --git a/src/H5Pint.c b/src/H5Pint.c index 6a0cc14..179f883 100644 --- a/src/H5Pint.c +++ b/src/H5Pint.c @@ -100,11 +100,23 @@ 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 H5P_genplist_t *H5P__create(H5P_genclass_t *pclass); +static H5P_genprop_t *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, + H5P_prp_delete_func_t prp_delete, + H5P_prp_copy_func_t prp_copy, H5P_prp_compare_func_t prp_cmp, + H5P_prp_close_func_t prp_close); +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); +static int H5P__open_class_path_cb(void *_obj, hid_t H5_ATTR_UNUSED id, void *_key); +static H5P_genprop_t *H5P__find_prop_pclass(H5P_genclass_t *pclass, const char *name); +static herr_t H5P__free_prop_cb(void *item, void H5_ATTR_UNUSED *key, void *op_data); +static herr_t H5P__free_del_name_cb(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSED *op_data); /*********************/ @@ -336,7 +348,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 */ @@ -425,7 +437,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 */ @@ -626,14 +638,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 */ HDmemcpy(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 +656,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 +664,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 +683,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 +698,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 +709,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 +728,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 +745,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 +768,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 +780,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 +789,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 +872,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 +901,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 +929,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 +945,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 +957,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 +975,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 +1049,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 +1086,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 +1097,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 +1153,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 +1175,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 +1191,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 +1256,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 +1273,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 +1288,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 +1310,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 +1327,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 +1351,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 +1365,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 +1391,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 +1403,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 + Internal routine to increment or decrement list & class dependancies 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 +1429,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 +1485,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 +1521,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 +1543,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 +1580,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 +1588,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 +1626,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 +1642,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 +1677,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 +1685,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 +1760,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 +1778,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 +1791,7 @@ done: } /* end if */ FUNC_LEAVE_NOAPI(ret_value) -} /* H5P_create() */ +} /* H5P__create() */ /*-------------------------------------------------------------------------- @@ -1791,7 +1803,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 +1824,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 +1848,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 +1860,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 +1872,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 @@ -2043,7 +2055,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 +2066,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 +2079,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 +2096,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 @@ -2275,7 +2287,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 +2299,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 +2309,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 +2325,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 +2345,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 +2355,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() */ /*-------------------------------------------------------------------------- @@ -2570,13 +2582,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, + 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 +2596,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) @@ -2764,20 +2776,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") HDmemcpy(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 +2982,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") HDmemcpy(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 +2999,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 +3121,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 +3141,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 +3171,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 +3197,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 +3217,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 +3243,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 +3287,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 +3298,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 +3349,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 +3370,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 +3444,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 +3470,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 +3540,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 +3550,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 +3600,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 +3616,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 +3639,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 +3677,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 +3685,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 +3693,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 +3730,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 +3943,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 +3996,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 +4005,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 +4054,7 @@ done: H5SL_close(seen); FUNC_LEAVE_NOAPI(ret_value) -} /* H5P_iterate_plist() */ +} /* H5P__iterate_plist() */ /*-------------------------------------------------------------------------- @@ -4098,11 +4110,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 +4160,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 +4190,7 @@ done: *idx = curr_idx; FUNC_LEAVE_NOAPI(ret_value) -} /* H5P_iterate_pclass() */ +} /* H5P__iterate_pclass() */ /*-------------------------------------------------------------------------- @@ -4450,7 +4462,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 +4598,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 +4628,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 +4636,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 +4654,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 +4664,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 +4676,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 +4688,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 +4697,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 +4736,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 +4744,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 +4756,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 +4782,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 +4790,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 +4815,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 +4834,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 +4844,7 @@ H5P_unregister(H5P_genclass_t *pclass, const char *name) done: FUNC_LEAVE_NOAPI(ret_value) -} /* H5P_unregister() */ +} /* H5P__unregister() */ /*-------------------------------------------------------------------------- @@ -4982,18 +4994,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 +5058,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 +5078,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,7 +5091,7 @@ 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; @@ -5104,16 +5116,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 +5139,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 +5148,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 +5169,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 +5187,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 +5201,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 +5224,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 +5236,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 +5257,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 +5267,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 +5281,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 +5303,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 +5386,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 +5406,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 @@ -5440,32 +5452,3 @@ H5P_get_class(const H5P_genplist_t *plist) FUNC_LEAVE_NOAPI(plist->pclass) } /* end H5P_get_class() */ - -/*------------------------------------------------------------------------- - * Function: H5P_get_default - * - * Purpose: Get the default property list ID, for a property class. - * - * Return: Success: Non-negative ID of property list. - * Failure: negative. - * - * Programmer: Quincey Koziol <koziol@lbl.gov> - * December 29, 2017 - * - *------------------------------------------------------------------------- - */ -hid_t -H5P_get_default(const H5P_libclass_t *libclass) -{ - hid_t ret_value = H5I_INVALID_HID; /* Return value */ - - FUNC_ENTER_NOAPI(H5I_INVALID_HID) - - HDassert(libclass); - - ret_value = *libclass->def_plist_id; - -done: - FUNC_LEAVE_NOAPI(ret_value) -} /* end H5P_get_default() */ - |