diff options
Diffstat (limited to 'src/H5Oint.c')
-rw-r--r-- | src/H5Oint.c | 693 |
1 files changed, 347 insertions, 346 deletions
diff --git a/src/H5Oint.c b/src/H5Oint.c index e37eea5..ecf347c 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -55,7 +55,7 @@ /* User data for recursive traversal over objects from a group */ typedef struct { hid_t obj_id; /* The ID for the starting group */ - H5G_loc_t *start_loc; /* Location of starting group */ + H5G_loc_t *start_loc; /* Location of starting group */ H5SL_t *visited; /* Skip list for tracking visited nodes */ H5O_iterate_t op; /* Application callback */ void *op_data; /* Application's op data */ @@ -94,36 +94,36 @@ hbool_t H5_PKG_INIT_VAR = FALSE; * message. */ const H5O_msg_class_t *const H5O_msg_class_g[] = { - H5O_MSG_NULL, /*0x0000 Null */ - H5O_MSG_SDSPACE, /*0x0001 Dataspace */ - H5O_MSG_LINFO, /*0x0002 Link information */ - H5O_MSG_DTYPE, /*0x0003 Datatype */ - H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */ - H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */ - H5O_MSG_LINK, /*0x0006 Link */ - H5O_MSG_EFL, /*0x0007 Data storage -- external data files */ - H5O_MSG_LAYOUT, /*0x0008 Data Layout */ + H5O_MSG_NULL, /*0x0000 Null */ + H5O_MSG_SDSPACE, /*0x0001 Dataspace */ + H5O_MSG_LINFO, /*0x0002 Link information */ + H5O_MSG_DTYPE, /*0x0003 Datatype */ + H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */ + H5O_MSG_FILL_NEW, /*0x0005 New data storage -- fill value */ + H5O_MSG_LINK, /*0x0006 Link */ + H5O_MSG_EFL, /*0x0007 Data storage -- external data files */ + H5O_MSG_LAYOUT, /*0x0008 Data Layout */ #ifdef H5O_ENABLE_BOGUS - H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */ + H5O_MSG_BOGUS_VALID, /*0x0009 "Bogus valid" (for testing) */ #else /* H5O_ENABLE_BOGUS */ - NULL, /*0x0009 "Bogus valid" (for testing) */ + NULL, /*0x0009 "Bogus valid" (for testing) */ #endif /* H5O_ENABLE_BOGUS */ - H5O_MSG_GINFO, /*0x000A Group information */ - H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ - H5O_MSG_ATTR, /*0x000C Attribute */ - H5O_MSG_NAME, /*0x000D Object name */ - H5O_MSG_MTIME, /*0x000E Object modification date and time */ - H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ - H5O_MSG_CONT, /*0x0010 Object header continuation */ - H5O_MSG_STAB, /*0x0011 Symbol table */ - H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ - H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ - H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ - H5O_MSG_AINFO, /*0x0015 Attribute information */ - H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ - H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ + H5O_MSG_GINFO, /*0x000A Group information */ + H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */ + H5O_MSG_ATTR, /*0x000C Attribute */ + H5O_MSG_NAME, /*0x000D Object name */ + H5O_MSG_MTIME, /*0x000E Object modification date and time */ + H5O_MSG_SHMESG, /*0x000F File-wide shared message table */ + H5O_MSG_CONT, /*0x0010 Object header continuation */ + H5O_MSG_STAB, /*0x0011 Symbol table */ + H5O_MSG_MTIME_NEW, /*0x0012 New Object modification date and time */ + H5O_MSG_BTREEK, /*0x0013 Non-default v1 B-tree 'K' values */ + H5O_MSG_DRVINFO, /*0x0014 Driver info settings */ + H5O_MSG_AINFO, /*0x0015 Attribute information */ + H5O_MSG_REFCOUNT, /*0x0016 Object's ref. count */ + H5O_MSG_FSINFO, /*0x0017 Free-space manager info */ H5O_MSG_MDCI, /*0x0018 Metadata cache image */ - H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ + H5O_MSG_UNKNOWN /*0x0019 Placeholder for unknown message */ }; /* Format version bounds for object header */ @@ -131,6 +131,7 @@ const unsigned H5O_obj_ver_bounds[] = { H5O_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5O_VERSION_2, /* H5F_LIBVER_V18 */ H5O_VERSION_2, /* H5F_LIBVER_V110 */ + H5O_VERSION_2, /* H5F_LIBVER_V112 */ H5O_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; @@ -172,20 +173,20 @@ H5FL_EXTERN(H5_obj_t); * datatype message is a datatype but only some of them are datasets. */ static const H5O_obj_class_t *const H5O_obj_class_g[] = { - H5O_OBJ_DATATYPE, /* Datatype object (H5O_TYPE_NAMED_DATATYPE - 2) */ - H5O_OBJ_DATASET, /* Dataset object (H5O_TYPE_DATASET - 1) */ - H5O_OBJ_GROUP, /* Group object (H5O_TYPE_GROUP - 0) */ + H5O_OBJ_DATATYPE, /* Datatype object (H5O_TYPE_NAMED_DATATYPE - 2) */ + H5O_OBJ_DATASET, /* Dataset object (H5O_TYPE_DATASET - 1) */ + H5O_OBJ_GROUP, /* Group object (H5O_TYPE_GROUP - 0) */ }; - + /*------------------------------------------------------------------------- - * Function: H5O__init_package + * Function: H5O__init_package * - * Purpose: Initialize information specific to H5O interface. + * Purpose: Initialize information specific to H5O interface. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, January 18, 2007 * *------------------------------------------------------------------------- @@ -204,7 +205,7 @@ H5O__init_package(void) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__init_package() */ - + /*------------------------------------------------------------------------- * Function: H5O_set_version * @@ -251,27 +252,27 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_set_version() */ - + /*------------------------------------------------------------------------- - * Function: H5O_create + * Function: H5O_create * - * Purpose: Creates a new object header. Allocates space for it and + * Purpose: Creates a new object header. Allocates space for it and * then calls an initialization function. The object header * is opened for write access and should eventually be * closed by calling H5O_close(). * - * Return: Success: Non-negative, the ENT argument contains - * information about the object header, - * including its address. + * Return: Success: Non-negative, the ENT argument contains + * information about the object header, + * including its address. * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Aug 5 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Aug 5 1997 * * Changes: 2018 August 17 - * Jacob Smith + * Jacob Smith * Refactor out the operations into two separate steps -- * preparation and application -- to facilitate overriding the * library-default size allocated for the object header. This @@ -311,7 +312,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_create() */ - + /*----------------------------------------------------------------------------- * Function: H5O__create_ohdr * @@ -321,7 +322,7 @@ done: * Failure: NULL * * Programmer: Jacob Smith - * 2018 August 17 + * 2018 August 17 * *----------------------------------------------------------------------------- */ @@ -368,7 +369,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5O__create_ohdr() */ - + /*----------------------------------------------------------------------------- * Function: H5O__apply_ohdr * @@ -543,17 +544,17 @@ done: FUNC_LEAVE_NOAPI(ret_value); } /* H5O__apply_ohdr() */ - + /*------------------------------------------------------------------------- - * Function: H5O_open + * Function: H5O_open * - * Purpose: Opens an object header which is described by the symbol table - * entry OBJ_ENT. + * Purpose: Opens an object header which is described by the symbol table + * entry OBJ_ENT. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Monday, January 5, 1998 + * Programmer: Robb Matzke + * Monday, January 5, 1998 * * Modification: * Raymond Lu @@ -580,7 +581,7 @@ H5O_open(H5O_loc_t *loc) /* Turn off the variable for holding file or increment open-lock counters */ if(loc->holding_file) - loc->holding_file = FALSE; + loc->holding_file = FALSE; else H5F_INCR_NOPEN_OBJS(loc->file); @@ -588,7 +589,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_open() */ - + /*------------------------------------------------------------------------- * Function: H5O_open_name * @@ -597,8 +598,8 @@ done: * Return: Success: Pointer to object data * Failure: NULL * - * Programmer: Quincey Koziol - * March 5 2007 + * Programmer: Quincey Koziol + * March 5 2007 * *------------------------------------------------------------------------- */ @@ -606,8 +607,8 @@ void * H5O_open_name(const H5G_loc_t *loc, const char *name, H5I_type_t *opened_type) { H5G_loc_t obj_loc; /* Location used to open group */ - H5G_name_t obj_path; /* Opened object group hier. path */ - H5O_loc_t obj_oloc; /* Opened object object location */ + H5G_name_t obj_path; /* Opened object group hier. path */ + H5O_loc_t obj_oloc; /* Opened object object location */ hbool_t loc_found = FALSE; /* Entry at 'name' found */ void *ret_value = NULL; /* Return value */ @@ -639,7 +640,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_open_name() */ - + /*------------------------------------------------------------------------- * Function: H5O_open_by_idx * @@ -648,8 +649,8 @@ done: * Return: Success: Pointer to object data * Failure: NULL * - * Programmer: Quincey Koziol - * December 28, 2017 + * Programmer: Quincey Koziol + * December 28, 2017 * *------------------------------------------------------------------------- */ @@ -658,8 +659,8 @@ H5O_open_by_idx(const H5G_loc_t *loc, const char *name, H5_index_t idx_type, H5_iter_order_t order, hsize_t n, H5I_type_t *opened_type) { H5G_loc_t obj_loc; /* Location used to open group */ - H5G_name_t obj_path; /* Opened object group hier. path */ - H5O_loc_t obj_oloc; /* Opened object object location */ + H5G_name_t obj_path; /* Opened object group hier. path */ + H5O_loc_t obj_oloc; /* Opened object object location */ hbool_t loc_found = FALSE; /* Entry at 'name' found */ void *ret_value = NULL; /* Return value */ @@ -691,7 +692,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_open_by_idx() */ - + /*------------------------------------------------------------------------- * Function: H5O_open_by_addr * @@ -700,8 +701,8 @@ done: * Return: Success: Pointer to object data * Failure: NULL * - * Programmer: Quincey Koziol - * December 28, 2017 + * Programmer: Quincey Koziol + * December 28, 2017 * *------------------------------------------------------------------------- */ @@ -709,8 +710,8 @@ void * H5O_open_by_addr(const H5G_loc_t *loc, haddr_t addr, H5I_type_t *opened_type) { H5G_loc_t obj_loc; /* Location used to open group */ - H5G_name_t obj_path; /* Opened object group hier. path */ - H5O_loc_t obj_oloc; /* Opened object object location */ + H5G_name_t obj_path; /* Opened object group hier. path */ + H5O_loc_t obj_oloc; /* Opened object object location */ void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -734,7 +735,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_open_by_addr() */ - + /*------------------------------------------------------------------------- * Function: H5O_open_by_loc * @@ -743,8 +744,8 @@ done: * Return: Success: Pointer to object data * Failure: NULL * - * Programmer: James Laird - * July 25 2006 + * Programmer: James Laird + * July 25 2006 * *------------------------------------------------------------------------- */ @@ -771,16 +772,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_open_by_loc() */ - + /*------------------------------------------------------------------------- - * Function: H5O_close + * Function: H5O_close * - * Purpose: Closes an object header that was previously open. + * Purpose: Closes an object header that was previously open. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Monday, January 5, 1998 + * Programmer: Robb Matzke + * Monday, January 5, 1998 * *------------------------------------------------------------------------- */ @@ -834,7 +835,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_close() */ - + /*------------------------------------------------------------------------- * Function: H5O__link_oh * @@ -845,9 +846,9 @@ done: * * Failure: -1 * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Aug 5 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Aug 5 1997 * *------------------------------------------------------------------------- */ @@ -855,7 +856,7 @@ int H5O__link_oh(H5F_t *f, int adjust, H5O_t *oh, hbool_t *deleted) { haddr_t addr = H5O_OH_GET_ADDR(oh); /* Object header address */ - int ret_value = -1; /* Return value */ + int ret_value = -1; /* Return value */ FUNC_ENTER_PACKAGE @@ -949,29 +950,29 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__link_oh() */ - + /*------------------------------------------------------------------------- - * Function: H5O_link + * Function: H5O_link * - * Purpose: Adjust the link count for an object header by adding - * ADJUST to the link count. + * Purpose: Adjust the link count for an object header by adding + * ADJUST to the link count. * - * Return: Success: New link count + * Return: Success: New link count * - * Failure: Negative + * Failure: Negative * - * Programmer: Robb Matzke - * matzke@llnl.gov - * Aug 5 1997 + * Programmer: Robb Matzke + * matzke@llnl.gov + * Aug 5 1997 * *------------------------------------------------------------------------- */ int H5O_link(const H5O_loc_t *loc, int adjust) { - H5O_t *oh = NULL; + H5O_t *oh = NULL; hbool_t deleted = FALSE; /* Whether the object was deleted */ - int ret_value = -1; /* Return value */ + int ret_value = -1; /* Return value */ FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL) @@ -997,21 +998,21 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5O_link() */ - + /*------------------------------------------------------------------------- - * Function: H5O_protect + * Function: H5O_protect * - * Purpose: Wrapper around H5AC_protect for use during a H5O_protect-> + * Purpose: Wrapper around H5AC_protect for use during a H5O_protect-> * H5O_msg_append->...->H5O_msg_append->H5O_unprotect sequence of calls * during an object's creation. * - * Return: Success: Pointer to the object header structure for the + * Return: Success: Pointer to the object header structure for the * object. - * Failure: NULL + * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Dec 31 2002 + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Dec 31 2002 * *------------------------------------------------------------------------- */ @@ -1183,21 +1184,21 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5O_protect() */ - + /*------------------------------------------------------------------------- - * Function: H5O_pin + * Function: H5O_pin * - * Purpose: Pin an object header down for use during a sequence of message + * Purpose: Pin an object header down for use during a sequence of message * operations, which prevents the object header from being * evicted from the cache. * - * Return: Success: Pointer to the object header structure for the + * Return: Success: Pointer to the object header structure for the * object. - * Failure: NULL + * Failure: NULL * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Jul 13 2008 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Jul 13 2008 * *------------------------------------------------------------------------- */ @@ -1232,19 +1233,19 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_pin() */ - + /*------------------------------------------------------------------------- - * Function: H5O_unpin + * Function: H5O_unpin * - * Purpose: Unpin an object header, allowing it to be evicted from the + * Purpose: Unpin an object header, allowing it to be evicted from the * metadata cache. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Jul 13 2008 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Jul 13 2008 * *------------------------------------------------------------------------- */ @@ -1267,20 +1268,20 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_unpin() */ - + /*------------------------------------------------------------------------- - * Function: H5O_unprotect + * Function: H5O_unprotect * - * Purpose: Wrapper around H5AC_unprotect for use during a H5O_protect-> + * Purpose: Wrapper around H5AC_unprotect for use during a H5O_protect-> * H5O_msg_append->...->H5O_msg_append->H5O_unprotect sequence of calls * during an object's creation. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Dec 31 2002 + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Dec 31 2002 * *------------------------------------------------------------------------- */ @@ -1324,17 +1325,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_unprotect() */ - + /*------------------------------------------------------------------------- - * Function: H5O_touch_oh + * Function: H5O_touch_oh * - * Purpose: If FORCE is non-zero then create a modification time message - * unless one already exists. Then update any existing - * modification time message with the current time. + * Purpose: If FORCE is non-zero then create a modification time message + * unless one already exists. Then update any existing + * modification time message with the current time. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, July 27, 1998 * *------------------------------------------------------------------------- @@ -1344,7 +1345,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) { H5O_chunk_proxy_t *chk_proxy = NULL; /* Chunk that message is in */ hbool_t chk_dirtied = FALSE; /* Flag for unprotecting chunk */ - time_t now; /* Current time */ + time_t now; /* Current time */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1359,7 +1360,7 @@ H5O_touch_oh(H5F_t *f, H5O_t *oh, hbool_t force) /* Check version, to determine how to store time information */ if(oh->version == H5O_VERSION_1) { - size_t idx; /* Index of modification time message to update */ + size_t idx; /* Index of modification time message to update */ /* Look for existing message */ for(idx = 0; idx < oh->nmesgs; idx++) @@ -1419,18 +1420,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_touch_oh() */ - + /*------------------------------------------------------------------------- - * Function: H5O_touch + * Function: H5O_touch * - * Purpose: Touch an object by setting the modification time to the - * current time and marking the object as dirty. Unless FORCE - * is non-zero, nothing happens if there is no MTIME message in - * the object header. + * Purpose: Touch an object by setting the modification time to the + * current time and marking the object as dirty. Unless FORCE + * is non-zero, nothing happens if there is no MTIME message in + * the object header. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Monday, July 27, 1998 * *------------------------------------------------------------------------- @@ -1438,8 +1439,8 @@ done: herr_t H5O_touch(const H5O_loc_t *loc, hbool_t force) { - H5O_t *oh = NULL; /* Object header to modify */ - unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */ + H5O_t *oh = NULL; /* Object header to modify */ + unsigned oh_flags = H5AC__NO_FLAGS_SET; /* Flags for unprotecting object header */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1466,15 +1467,15 @@ done: } /* end H5O_touch() */ #ifdef H5O_ENABLE_BOGUS - + /*------------------------------------------------------------------------- - * Function: H5O_bogus_oh + * Function: H5O_bogus_oh * - * Purpose: Create a "bogus" message unless one already exists. + * Purpose: Create a "bogus" message unless one already exists. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * <koziol@ncsa.uiuc.edu> * Tuesday, January 21, 2003 * @@ -1483,8 +1484,8 @@ done: herr_t H5O_bogus_oh(H5F_t *f, H5O_t *oh, unsigned bogus_id, unsigned mesg_flags) { - size_t idx; /* Local index variable */ - H5O_msg_class_t *type; /* Message class type */ + size_t idx; /* Local index variable */ + H5O_msg_class_t *type; /* Message class type */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1535,20 +1536,20 @@ done: } /* end H5O_bogus_oh() */ #endif /* H5O_ENABLE_BOGUS */ - + /*------------------------------------------------------------------------- - * Function: H5O_delete + * Function: H5O_delete * - * Purpose: Delete an object header from a file. This frees the file + * Purpose: Delete an object header from a file. This frees the file * space used for the object header (and it's continuation blocks) * and also walks through each header message and asks it to * remove all the pieces of the file referenced by the header. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 19 2003 + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Mar 19 2003 * *------------------------------------------------------------------------- */ @@ -1597,21 +1598,21 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5O_delete() */ - + /*------------------------------------------------------------------------- - * Function: H5O__delete_oh + * Function: H5O__delete_oh * - * Purpose: Internal function to: + * Purpose: Internal function to: * Delete an object header from a file. This frees the file * space used for the object header (and it's continuation blocks) * and also walks through each header message and asks it to * remove all the pieces of the file referenced by the header. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Mar 19 2003 + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Mar 19 2003 * *------------------------------------------------------------------------- */ @@ -1619,7 +1620,7 @@ static herr_t H5O__delete_oh(H5F_t *f, H5O_t *oh) { H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */ - unsigned u; + unsigned u; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -1641,16 +1642,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__delete_oh() */ - + /*------------------------------------------------------------------------- - * Function: H5O_obj_type + * Function: H5O_obj_type * - * Purpose: Retrieves the type of object pointed to by `loc'. + * Purpose: Retrieves the type of object pointed to by `loc'. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, November 4, 1998 * *------------------------------------------------------------------------- @@ -1658,7 +1659,7 @@ done: herr_t H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type) { - H5O_t *oh = NULL; /* Object header for location */ + H5O_t *oh = NULL; /* Object header for location */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_TAG(loc->addr, FAIL) @@ -1673,21 +1674,21 @@ H5O_obj_type(const H5O_loc_t *loc, H5O_type_t *obj_type) done: if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header") + HDONE_ERROR(H5E_OHDR, H5E_CANTUNPROTECT, FAIL, "unable to release object header") FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5O_obj_type() */ - + /*------------------------------------------------------------------------- - * Function: H5O__obj_type_real + * Function: H5O__obj_type_real * - * Purpose: Returns the type of object pointed to by `oh'. + * Purpose: Returns the type of object pointed to by `oh'. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, November 21, 2005 * *------------------------------------------------------------------------- @@ -1719,7 +1720,7 @@ H5O__obj_type_real(const H5O_t *oh, H5O_type_t *obj_type) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__obj_type_real() */ - + /*------------------------------------------------------------------------- * Function: H5O__obj_class * @@ -1728,7 +1729,7 @@ H5O__obj_type_real(const H5O_t *oh, H5O_type_t *obj_type) * Return: Success: An object class * Failure: NULL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, November 6, 2006 * *------------------------------------------------------------------------- @@ -1736,7 +1737,7 @@ H5O__obj_type_real(const H5O_t *oh, H5O_type_t *obj_type) const H5O_obj_class_t * H5O__obj_class(const H5O_loc_t *loc) { - H5O_t *oh = NULL; /* Object header for location */ + H5O_t *oh = NULL; /* Object header for location */ const H5O_obj_class_t *ret_value = NULL; /* Return value */ FUNC_ENTER_PACKAGE_TAG(loc->addr) @@ -1756,16 +1757,16 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5O__obj_class() */ - + /*------------------------------------------------------------------------- - * Function: H5O__obj_class_real + * Function: H5O__obj_class_real * - * Purpose: Returns the class of object pointed to by `oh'. + * Purpose: Returns the class of object pointed to by `oh'. * - * Return: Success: An object class - * Failure: NULL + * Return: Success: An object class + * Failure: NULL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, November 21, 2005 * *------------------------------------------------------------------------- @@ -1773,7 +1774,7 @@ done: static const H5O_obj_class_t * H5O__obj_class_real(const H5O_t *oh) { - size_t i; /* Local index variable */ + size_t i; /* Local index variable */ const H5O_obj_class_t *ret_value = NULL; /* Return value */ FUNC_ENTER_STATIC @@ -1784,7 +1785,7 @@ H5O__obj_class_real(const H5O_t *oh) /* Test whether entry qualifies as a particular type of object */ /* (Note: loop is in reverse order, to test specific objects first) */ for(i = NELMTS(H5O_obj_class_g); i > 0; --i) { - htri_t isa; /* Is entry a particular type? */ + htri_t isa; /* Is entry a particular type? */ if((isa = (H5O_obj_class_g[i - 1]->isa)(oh)) < 0) HGOTO_ERROR(H5E_OHDR, H5E_CANTINIT, NULL, "unable to determine object type") @@ -1799,17 +1800,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__obj_class_real() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_loc + * Function: H5O_get_loc * - * Purpose: Gets the object location for an object given its ID. + * Purpose: Gets the object location for an object given its ID. * - * Return: Success: Pointer to H5O_loc_t - * Failure: NULL + * Return: Success: Pointer to H5O_loc_t + * Failure: NULL * - * Programmer: James Laird - * July 25 2006 + * Programmer: James Laird + * July 25 2006 * *------------------------------------------------------------------------- */ @@ -1861,16 +1862,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_get_loc() */ - + /*------------------------------------------------------------------------- - * Function: H5O_loc_reset + * Function: H5O_loc_reset * - * Purpose: Reset a object location to an empty state + * Purpose: Reset a object location to an empty state * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, September 19, 2005 * *------------------------------------------------------------------------- @@ -1890,16 +1891,16 @@ H5O_loc_reset(H5O_loc_t *loc) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_loc_reset() */ - + /*------------------------------------------------------------------------- * Function: H5O_loc_copy * * Purpose: Copy object location information * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * koziol@ncsa.uiuc.edu * Monday, September 19, 2005 * @@ -1941,17 +1942,17 @@ H5O_loc_copy(H5O_loc_t *dst, H5O_loc_t *src, H5_copy_depth_t depth) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_loc_copy() */ - + /*------------------------------------------------------------------------- - * Function: H5O_loc_hold_file + * Function: H5O_loc_hold_file * - * Purpose: Have this object header hold a file open until it is + * Purpose: Have this object header hold a file open until it is * released. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: James Laird + * Programmer: James Laird * Wednesday, August 16, 2006 * *------------------------------------------------------------------------- @@ -1974,18 +1975,18 @@ H5O_loc_hold_file(H5O_loc_t *loc) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_loc_hold_file() */ - + /*------------------------------------------------------------------------- - * Function: H5O_loc_free + * Function: H5O_loc_free * - * Purpose: Release resources used by this object header location. + * Purpose: Release resources used by this object header location. * Not to be confused with H5O_close; this is used on * locations that don't correspond to open objects. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: James Laird + * Programmer: James Laird * Wednesday, August 16, 2006 * *------------------------------------------------------------------------- @@ -2014,17 +2015,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_loc_free() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_hdr_info + * Function: H5O_get_hdr_info * - * Purpose: Retrieve the object header information for an object + * Purpose: Retrieve the object header information for an object * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * September 22 2009 + * Programmer: Quincey Koziol + * September 22 2009 * *------------------------------------------------------------------------- */ @@ -2053,22 +2054,22 @@ H5O_get_hdr_info(const H5O_loc_t *loc, H5O_hdr_info_t *hdr) done: if(oh && H5O_unprotect(loc, oh, H5AC__NO_FLAGS_SET) < 0) - HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header") + HDONE_ERROR(H5E_OHDR, H5E_PROTECT, FAIL, "unable to release object header") FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_get_hdr_info() */ - + /*------------------------------------------------------------------------- - * Function: H5O__get_hdr_info_real + * Function: H5O__get_hdr_info_real * - * Purpose: Internal routine to retrieve the object header information for an object + * Purpose: Internal routine to retrieve the object header information for an object * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * September 22 2009 + * Programmer: Quincey Koziol + * September 22 2009 * *------------------------------------------------------------------------- */ @@ -2076,7 +2077,7 @@ static herr_t H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr) { const H5O_mesg_t *curr_msg; /* Pointer to current message being operated on */ - const H5O_chunk_t *curr_chunk; /* Pointer to current message being operated on */ + const H5O_chunk_t *curr_chunk; /* Pointer to current message being operated on */ unsigned u; /* Local index variable */ FUNC_ENTER_STATIC_NOERR @@ -2139,16 +2140,16 @@ H5O__get_hdr_info_real(const H5O_t *oh, H5O_hdr_info_t *hdr) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__get_hdr_info_real() */ - + /*------------------------------------------------------------------------- * Function: H5O_get_info * * Purpose: Retrieve the information for an object * * Note: Add a parameter "fields" to indicate selection of object info. - * - * Return: Success: Non-negative - * Failure: Negative + * + * Return: Success: Non-negative + * Failure: Negative * * Programmer: Quincey Koziol * November 21 2006 @@ -2269,7 +2270,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5O_get_info() */ - + /*------------------------------------------------------------------------- * Function: H5O__get_info_by_idx * @@ -2279,8 +2280,8 @@ done: * * Note: Add a parameter "fields" to indicate selection of object info. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * * Programmer: Quincey Koziol * December 28, 2017 @@ -2292,10 +2293,10 @@ H5O__get_info_by_idx(const H5G_loc_t *loc, const char *group_name, H5_index_t id H5_iter_order_t order, hsize_t n, H5O_info_t *oinfo, unsigned fields) { H5G_loc_t obj_loc; /* Location used to open group */ - H5G_name_t obj_path; /* Opened object group hier. path */ - H5O_loc_t obj_oloc; /* Opened object object location */ + H5G_name_t obj_path; /* Opened object group hier. path */ + H5O_loc_t obj_oloc; /* Opened object object location */ hbool_t loc_found = FALSE; /* Entry at 'name' found */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2326,17 +2327,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__get_info_by_idx() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_create_plist + * Function: H5O_get_create_plist * - * Purpose: Retrieve the object creation properties for an object + * Purpose: Retrieve the object creation properties for an object * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * November 28 2006 + * Programmer: Quincey Koziol + * November 28 2006 * *------------------------------------------------------------------------- */ @@ -2381,17 +2382,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_get_create_plist() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_nlinks + * Function: H5O_get_nlinks * - * Purpose: Retrieve the number of link messages read in from the file + * Purpose: Retrieve the number of link messages read in from the file * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * March 11 2007 + * Programmer: Quincey Koziol + * March 11 2007 * *------------------------------------------------------------------------- */ @@ -2421,17 +2422,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_get_nlinks() */ - + /*------------------------------------------------------------------------- - * Function: H5O_obj_create + * Function: H5O_obj_create * - * Purpose: Creates an object, in an abstract manner. + * Purpose: Creates an object, in an abstract manner. * - * Return: Success: Pointer to object opened - * Failure: NULL + * Return: Success: Pointer to object opened + * Failure: NULL * - * Programmer: Quincey Koziol - * April 9 2007 + * Programmer: Quincey Koziol + * April 9 2007 * *------------------------------------------------------------------------- */ @@ -2452,7 +2453,7 @@ H5O_obj_create(H5F_t *f, H5O_type_t obj_type, void *crt_info, H5G_loc_t *obj_loc /* Iterate through the object classes */ for(u = 0; u < NELMTS(H5O_obj_class_g); u++) { /* Check for correct type of object to create */ - if(H5O_obj_class_g[u]->type == obj_type) { + if(H5O_obj_class_g[u]->type == obj_type) { /* Call the object class's 'create' routine */ HDassert(H5O_obj_class_g[u]->create); if(NULL == (ret_value = H5O_obj_class_g[u]->create(f, crt_info, obj_loc))) @@ -2468,21 +2469,21 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_obj_create() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_oh_addr + * Function: H5O_get_oh_addr * - * Purpose: Retrieve the address of the object header + * Purpose: Retrieve the address of the object header * - * Note: This routine participates in the "Inlining C struct access" - * pattern, don't call it directly, use the appropriate macro - * defined in H5Oprivate.h. + * Note: This routine participates in the "Inlining C struct access" + * pattern, don't call it directly, use the appropriate macro + * defined in H5Oprivate.h. * - * Return: Success: Valid haddr_t - * Failure: HADDR_UNDEF + * Return: Success: Valid haddr_t + * Failure: HADDR_UNDEF * - * Programmer: Quincey Koziol - * March 15 2007 + * Programmer: Quincey Koziol + * March 15 2007 * *------------------------------------------------------------------------- */ @@ -2498,12 +2499,12 @@ H5O_get_oh_addr(const H5O_t *oh) FUNC_LEAVE_NOAPI(oh->chunk[0].addr) } /* end H5O_get_oh_addr() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_oh_flags + * Function: H5O_get_oh_flags * - * Programmer: Jacob Smith - * 2018 August 17 + * Programmer: Jacob Smith + * 2018 August 17 * *------------------------------------------------------------------------- */ @@ -2515,16 +2516,16 @@ H5O_get_oh_flags(const H5O_t *oh) FUNC_LEAVE_NOAPI(oh->flags); /* flags can be 0 */ } /* H5O_get_oh_flags() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_oh_mtime + * Function: H5O_get_oh_mtime * - * Purpose: Retrieve an object's modification time. Assumes that the + * Purpose: Retrieve an object's modification time. Assumes that the * caller has verified that accessing this variable is appropriate * to the header in question. * - * Programmer: Jacob Smith - * 2018 August 17 + * Programmer: Jacob Smith + * 2018 August 17 * *------------------------------------------------------------------------- */ @@ -2537,12 +2538,12 @@ H5O_get_oh_mtime(const H5O_t *oh) FUNC_LEAVE_NOAPI(oh->mtime); } /* H5O_get_oh_mtime() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_oh_version + * Function: H5O_get_oh_version * - * Programmer: Jacob Smith - * 2018 August 17 + * Programmer: Jacob Smith + * 2018 August 17 * *------------------------------------------------------------------------- */ @@ -2555,17 +2556,17 @@ H5O_get_oh_version(const H5O_t *oh) FUNC_LEAVE_NOAPI(oh->version); } /* H5O_get_oh_version() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_rc_and_type + * Function: H5O_get_rc_and_type * - * Purpose: Retrieve an object's reference count and type + * Purpose: Retrieve an object's reference count and type * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * November 4 2007 + * Programmer: Quincey Koziol + * November 4 2007 * *------------------------------------------------------------------------- */ @@ -2600,7 +2601,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_get_rc_and_type() */ - + /*------------------------------------------------------------------------- * Function: H5O__free_visit_visited * @@ -2609,7 +2610,7 @@ done: * Return: Non-negative on success, negative on failure * * Programmer: Quincey Koziol - * Nov 25, 2007 + * Nov 25, 2007 * *------------------------------------------------------------------------- */ @@ -2623,17 +2624,17 @@ H5O__free_visit_visited(void *item, void H5_ATTR_UNUSED *key, void H5_ATTR_UNUSE FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__free_visit_visited() */ - + /*------------------------------------------------------------------------- - * Function: H5O__visit_cb + * Function: H5O__visit_cb * * Purpose: Callback function for recursively visiting objects from a group * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * Nov 25, 2007 + * Programmer: Quincey Koziol + * Nov 25, 2007 * *------------------------------------------------------------------------- */ @@ -2643,8 +2644,8 @@ H5O__visit_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t *li { H5O_iter_visit_ud_t *udata = (H5O_iter_visit_ud_t *)_udata; /* User data for callback */ H5G_loc_t obj_loc; /* Location of object */ - H5G_name_t obj_path; /* Object's group hier. path */ - H5O_loc_t obj_oloc; /* Object's object location */ + H5G_name_t obj_path; /* Object's group hier. path */ + H5O_loc_t obj_oloc; /* Object's object location */ hbool_t obj_found = FALSE; /* Object at 'name' found */ herr_t ret_value = H5_ITER_CONT; /* Return value */ @@ -2715,7 +2716,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__visit_cb() */ - + /*------------------------------------------------------------------------- * Function: H5O__visit * @@ -2745,7 +2746,7 @@ done: * library, or the negative value returned by one * of the operators. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * November 24 2007 * *------------------------------------------------------------------------- @@ -2806,8 +2807,8 @@ H5O__visit(H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type, /* Check for object being a group */ if(oinfo.type == H5O_TYPE_GROUP) { - H5G_loc_t start_loc; /* Location of starting group */ - H5G_loc_t vis_loc; /* Location of visited group */ + H5G_loc_t start_loc; /* Location of starting group */ + H5G_loc_t vis_loc; /* Location of visited group */ /* Get the location of the starting group */ if(H5G_loc(obj_id, &start_loc) < 0) @@ -2866,17 +2867,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__visit() */ - + /*------------------------------------------------------------------------- - * Function: H5O__inc_rc + * Function: H5O__inc_rc * - * Purpose: Increments the reference count on an object header + * Purpose: Increments the reference count on an object header * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Jul 13 2008 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Jul 13 2008 * *------------------------------------------------------------------------- */ @@ -2902,17 +2903,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__inc_rc() */ - + /*------------------------------------------------------------------------- - * Function: H5O__dec_rc + * Function: H5O__dec_rc * - * Purpose: Decrements the reference count on an object header + * Purpose: Decrements the reference count on an object header * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Jul 13 2008 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Jul 13 2008 * *------------------------------------------------------------------------- */ @@ -2938,7 +2939,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__dec_rc() */ - + /*------------------------------------------------------------------------- * Function: H5O_dec_rc_by_loc * @@ -2981,16 +2982,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_dec_rc_by_loc() */ - + /*------------------------------------------------------------------------- - * Function: H5O_get_proxy + * Function: H5O_get_proxy * - * Purpose: Retrieve the proxy for the object header. + * Purpose: Retrieve the proxy for the object header. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * July 24 2016 + * Programmer: Quincey Koziol + * July 24 2016 * *------------------------------------------------------------------------- */ @@ -3005,24 +3006,24 @@ H5O_get_proxy(const H5O_t *oh) FUNC_LEAVE_NOAPI(oh->proxy) } /* end H5O_get_proxy() */ - + /*------------------------------------------------------------------------- - * Function: H5O__free + * Function: H5O__free * - * Purpose: Destroys an object header. + * Purpose: Destroys an object header. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@ncsa.uiuc.edu - * Jan 15 2003 + * Programmer: Quincey Koziol + * koziol@ncsa.uiuc.edu + * Jan 15 2003 * *------------------------------------------------------------------------- */ herr_t H5O__free(H5O_t *oh) { - unsigned u; /* Local index variable */ + unsigned u; /* Local index variable */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE |