diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2019-09-25 22:28:17 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2019-09-25 22:28:17 (GMT) |
commit | b2f52d0b07083fd3c5a84252bb7a982342a6b063 (patch) | |
tree | c816272af9fdf0eb4e77e5ab71534a3954dbe6df /src | |
parent | 46f81a33dd2d4d0273d896792850b19111b4e945 (diff) | |
download | hdf5-b2f52d0b07083fd3c5a84252bb7a982342a6b063.zip hdf5-b2f52d0b07083fd3c5a84252bb7a982342a6b063.tar.gz hdf5-b2f52d0b07083fd3c5a84252bb7a982342a6b063.tar.bz2 |
Update versioning to next major version
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Aint.c | 425 | ||||
-rw-r--r-- | src/H5Dlayout.c | 49 | ||||
-rw-r--r-- | src/H5Fpublic.h | 81 | ||||
-rw-r--r-- | src/H5Fsuper.c | 137 | ||||
-rw-r--r-- | src/H5Ofill.c | 207 | ||||
-rw-r--r-- | src/H5Ofsinfo.c | 93 | ||||
-rw-r--r-- | src/H5Oint.c | 693 | ||||
-rw-r--r-- | src/H5Opline.c | 343 | ||||
-rw-r--r-- | src/H5S.c | 629 | ||||
-rw-r--r-- | src/H5Shyper.c | 429 | ||||
-rw-r--r-- | src/H5Spoint.c | 165 | ||||
-rw-r--r-- | src/H5T.c | 139 | ||||
-rw-r--r-- | src/H5trace.c | 14 |
13 files changed, 1710 insertions, 1694 deletions
diff --git a/src/H5Aint.c b/src/H5Aint.c index 808d9b3..c1c0078 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -13,11 +13,11 @@ /*------------------------------------------------------------------------- * - * Created: H5Aint.c - * Dec 18 2006 - * Quincey Koziol <koziol@hdfgroup.org> + * Created: H5Aint.c + * Dec 18 2006 + * Quincey Koziol <koziol@hdfgroup.org> * - * Purpose: Internal routines for managing attributes. + * Purpose: Internal routines for managing attributes. * *------------------------------------------------------------------------- */ @@ -27,7 +27,7 @@ /****************/ #include "H5Amodule.h" /* This source code file is part of the H5A module */ -#define H5O_FRIEND /*suppress error about including H5Opkg */ +#define H5O_FRIEND /*suppress error about including H5Opkg */ /***********/ @@ -109,6 +109,7 @@ const unsigned H5O_attr_ver_bounds[] = { H5O_ATTR_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5O_ATTR_VERSION_3, /* H5F_LIBVER_V18 */ H5O_ATTR_VERSION_3, /* H5F_LIBVER_V110 */ + H5O_ATTR_VERSION_3, /* H5F_LIBVER_V112 */ H5O_ATTR_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; @@ -121,19 +122,19 @@ const unsigned H5O_attr_ver_bounds[] = { /* Local Variables */ /*******************/ -typedef H5A_t* H5A_t_ptr; +typedef H5A_t* H5A_t_ptr; H5FL_SEQ_DEFINE(H5A_t_ptr); - + /*------------------------------------------------------------------------- - * Function: H5A__create + * Function: H5A__create * * Purpose: This is the guts of creating an attribute. * * Return: Attribute structure on success, NULL on Failure. * - * Programmer: Quincey Koziol - * April 2, 1998 + * Programmer: Quincey Koziol + * April 2, 1998 * *------------------------------------------------------------------------- */ @@ -141,11 +142,11 @@ H5A_t * H5A__create(const H5G_loc_t *loc, const char *attr_name, const H5T_t *type, const H5S_t *space, hid_t acpl_id) { - H5A_t *attr = NULL; /* Attribute created */ - hssize_t snelmts; /* elements in attribute */ - size_t nelmts; /* elements in attribute */ + H5A_t *attr = NULL; /* Attribute created */ + hssize_t snelmts; /* elements in attribute */ + size_t nelmts; /* elements in attribute */ htri_t exists; /* Whether attribute exists */ - H5A_t *ret_value = NULL; /* Return value */ + H5A_t *ret_value = NULL; /* Return value */ FUNC_ENTER_PACKAGE_TAG(loc->oloc->addr) @@ -286,16 +287,16 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* H5A__create() */ - + /*------------------------------------------------------------------------- - * Function: H5A__create_by_name + * Function: H5A__create_by_name * - * Purpose: Create an attribute on object, according to it's name + * Purpose: Create an attribute on object, according to it's name * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * December 6, 2017 + * Programmer: Quincey Koziol + * December 6, 2017 * *------------------------------------------------------------------------- */ @@ -304,8 +305,8 @@ H5A__create_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr const H5T_t *type, const H5S_t *space, hid_t acpl_id) { 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 'obj_name' found */ H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ @@ -347,9 +348,9 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__create_by_name() */ - + /*------------------------------------------------------------------------- - * Function: H5A__open_common + * Function: H5A__open_common * * Purpose: * Finishes initializing an attributes the open @@ -361,8 +362,8 @@ done: * * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * December 18, 2006 + * Programmer: Quincey Koziol + * December 18, 2006 * *------------------------------------------------------------------------- */ @@ -404,7 +405,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__open_common() */ - + /*------------------------------------------------------------------------- * Function: H5A__open * @@ -412,8 +413,8 @@ done: * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * December 9, 2017 + * Programmer: Quincey Koziol + * December 9, 2017 * *------------------------------------------------------------------------- */ @@ -449,16 +450,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__open() */ - + /*------------------------------------------------------------------------- - * Function: H5A__open_by_idx + * Function: H5A__open_by_idx * - * Purpose: Open an attribute according to its index order + * Purpose: Open an attribute according to its index order * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * April 2, 1998 + * Programmer: Quincey Koziol + * April 2, 1998 * *------------------------------------------------------------------------- */ @@ -467,8 +468,8 @@ H5A__open_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_type H5_iter_order_t order, hsize_t n) { 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 'obj_name' found */ H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ @@ -513,7 +514,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__open_by_idx() */ - + /*------------------------------------------------------------------------- * Function: H5A__open_by_name * @@ -521,8 +522,8 @@ done: * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * December 11, 2006 + * Programmer: Quincey Koziol + * December 11, 2006 * *------------------------------------------------------------------------- */ @@ -530,8 +531,8 @@ H5A_t * H5A__open_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_name) { 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 'obj_name' found */ H5A_t *attr = NULL; /* Attribute from object header */ H5A_t *ret_value = NULL; /* Return value */ @@ -577,7 +578,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__open_by_name() */ - + /*-------------------------------------------------------------------------- NAME H5A__read @@ -597,16 +598,16 @@ done: herr_t H5A__read(const H5A_t *attr, const H5T_t *mem_type, void *buf) { - uint8_t *tconv_buf = NULL; /* datatype conv buffer*/ - uint8_t *bkg_buf = NULL; /* background buffer */ - hssize_t snelmts; /* elements in attribute */ - size_t nelmts; /* elements in attribute*/ - H5T_path_t *tpath = NULL; /* type conversion info */ - hid_t src_id = -1, dst_id = -1;/* temporary type atoms*/ - size_t src_type_size; /* size of source type */ - size_t dst_type_size; /* size of destination type */ - size_t buf_size; /* desired buffer size */ - herr_t ret_value = SUCCEED; + uint8_t *tconv_buf = NULL; /* datatype conv buffer*/ + uint8_t *bkg_buf = NULL; /* background buffer */ + hssize_t snelmts; /* elements in attribute */ + size_t nelmts; /* elements in attribute*/ + H5T_path_t *tpath = NULL; /* type conversion info */ + hid_t src_id = -1, dst_id = -1;/* temporary type atoms*/ + size_t src_type_size; /* size of source type */ + size_t dst_type_size; /* size of destination type */ + size_t buf_size; /* desired buffer size */ + herr_t ret_value = SUCCEED; FUNC_ENTER_PACKAGE_TAG(attr->oloc.addr) @@ -675,12 +676,12 @@ done: if(tconv_buf) tconv_buf = H5FL_BLK_FREE(attr_buf, tconv_buf); if(bkg_buf) - bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf); + bkg_buf = H5FL_BLK_FREE(attr_buf, bkg_buf); FUNC_LEAVE_NOAPI_TAG(ret_value) } /* H5A__read() */ - + /*-------------------------------------------------------------------------- NAME H5A__write @@ -700,17 +701,17 @@ done: herr_t H5A__write(H5A_t *attr, const H5T_t *mem_type, const void *buf) { - uint8_t *tconv_buf = NULL; /* datatype conv buffer */ + uint8_t *tconv_buf = NULL; /* datatype conv buffer */ hbool_t tconv_owned = FALSE; /* Whether the datatype conv buffer is owned by attribute */ - uint8_t *bkg_buf = NULL; /* temp conversion buffer */ - hssize_t snelmts; /* elements in attribute */ - size_t nelmts; /* elements in attribute */ - H5T_path_t *tpath = NULL; /* conversion information*/ - hid_t src_id = -1, dst_id = -1;/* temporary type atoms */ - size_t src_type_size; /* size of source type */ - size_t dst_type_size; /* size of destination type*/ - size_t buf_size; /* desired buffer size */ - herr_t ret_value = SUCCEED; + uint8_t *bkg_buf = NULL; /* temp conversion buffer */ + hssize_t snelmts; /* elements in attribute */ + size_t nelmts; /* elements in attribute */ + H5T_path_t *tpath = NULL; /* conversion information*/ + hid_t src_id = -1, dst_id = -1;/* temporary type atoms */ + size_t src_type_size; /* size of source type */ + size_t dst_type_size; /* size of destination type*/ + size_t buf_size; /* desired buffer size */ + herr_t ret_value = SUCCEED; FUNC_ENTER_PACKAGE_TAG(attr->oloc.addr) @@ -794,7 +795,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* H5A__write() */ - + /*-------------------------------------------------------------------------- NAME H5A__get_name @@ -815,7 +816,7 @@ ssize_t H5A__get_name(H5A_t *attr, size_t buf_size, char *buf) { size_t copy_len, nbytes; - ssize_t ret_value = -1; /* Return value */ + ssize_t ret_value = -1; /* Return value */ FUNC_ENTER_PACKAGE_NOERR @@ -840,7 +841,7 @@ H5A__get_name(H5A_t *attr, size_t buf_size, char *buf) FUNC_LEAVE_NOAPI(ret_value) } /* H5A__get_name() */ - + /*------------------------------------------------------------------------- * Function: H5A_get_space * @@ -877,7 +878,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A_get_space() */ - + /*------------------------------------------------------------------------- * Function: H5A__get_type * @@ -885,7 +886,7 @@ done: * * Return: Success: A valid ID for the datatype of an attribute * - * Failure: H5I_INVALID_HID + * Failure: H5I_INVALID_HID * *------------------------------------------------------------------------- */ @@ -940,7 +941,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__get_type() */ - + /*-------------------------------------------------------------------------- NAME H5A__get_create_plist @@ -972,7 +973,7 @@ H5A__get_create_plist(H5A_t* attr) /* Create the property list object to return */ if((new_plist_id = H5P_copy_plist(plist, TRUE)) < 0) - HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties") + HGOTO_ERROR(H5E_PLIST, H5E_CANTINIT, FAIL, "unable to copy attribute creation properties") if(NULL == (new_plist = (H5P_genplist_t *)H5I_object(new_plist_id))) HGOTO_ERROR(H5E_PLIST, H5E_BADTYPE, FAIL, "can't get property list") @@ -986,16 +987,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__get_create_plist() */ - + /*------------------------------------------------------------------------- - * Function: H5A__get_info + * Function: H5A__get_info * - * Purpose: Retrieve information about an attribute. + * Purpose: Retrieve information about an attribute. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * February 6, 2007 * *------------------------------------------------------------------------- @@ -1027,7 +1028,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__get_info() */ - + /*------------------------------------------------------------------------- * Function: H5A__copy * @@ -1037,17 +1038,17 @@ done: * * Failure: NULL * - * Programmer: Robb Matzke - * Thursday, December 4, 1997 + * Programmer: Robb Matzke + * Thursday, December 4, 1997 * *------------------------------------------------------------------------- */ H5A_t * H5A__copy(H5A_t *_new_attr, const H5A_t *old_attr) { - H5A_t *new_attr = NULL; + H5A_t *new_attr = NULL; hbool_t allocated_attr = FALSE; /* Whether the attribute was allocated */ - H5A_t *ret_value = NULL; /* Return value */ + H5A_t *ret_value = NULL; /* Return value */ FUNC_ENTER_PACKAGE @@ -1090,7 +1091,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__copy() */ - + /*------------------------------------------------------------------------- * Function: H5A__shared_free * @@ -1142,7 +1143,7 @@ H5A__shared_free(H5A_t *attr) FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__shared_free() */ - + /*------------------------------------------------------------------------- * Function: H5A__close_cb * @@ -1174,7 +1175,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__close_cb() */ - + /*------------------------------------------------------------------------- * Function: H5A__close * @@ -1182,8 +1183,8 @@ done: * * Return: SUCCEED/FAIL * - * Programmer: Robb Matzke - * Monday, December 8, 1997 + * Programmer: Robb Matzke + * Monday, December 8, 1997 * *------------------------------------------------------------------------- */ @@ -1225,18 +1226,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__close() */ - + /*------------------------------------------------------------------------- - * Function: H5A_oloc + * Function: H5A_oloc * - * Purpose: Return the object location for an attribute. It's the - * object location for the object to which the attribute - * belongs, not the attribute itself. + * Purpose: Return the object location for an attribute. It's the + * object location for the object to which the attribute + * belongs, not the attribute itself. * - * Return: Success: Ptr to entry - * Failure: NULL + * Return: Success: Ptr to entry + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, August 6, 1998 * *------------------------------------------------------------------------- @@ -1257,18 +1258,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A_oloc() */ - + /*------------------------------------------------------------------------- - * Function: H5A_nameof + * Function: H5A_nameof * - * Purpose: Return the group hier. path for an attribute. It's the - * group hier. path for the object to which the attribute - * belongs, not the attribute itself. + * Purpose: Return the group hier. path for an attribute. It's the + * group hier. path for the object to which the attribute + * belongs, not the attribute itself. * - * Return: Success: Ptr to entry - * Failure: NULL + * Return: Success: Ptr to entry + * Failure: NULL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, September 12, 2005 * *------------------------------------------------------------------------- @@ -1289,7 +1290,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A_nameof() */ - + /*------------------------------------------------------------------------- * Function: H5A_type * @@ -1319,7 +1320,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A_type() */ - + /*------------------------------------------------------------------------- * Function: H5A__exists_by_name * @@ -1327,7 +1328,7 @@ done: * * Return: TRUE/FALSE/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, November 1, 2007 * *------------------------------------------------------------------------- @@ -1336,10 +1337,10 @@ htri_t H5A__exists_by_name(H5G_loc_t loc, const char *obj_name, const char *attr_name) { 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 'obj_name' found */ - htri_t ret_value = FAIL; /* Return value */ + htri_t ret_value = FAIL; /* Return value */ FUNC_ENTER_PACKAGE @@ -1365,18 +1366,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__exists_by_name() */ - + /*------------------------------------------------------------------------- - * Function: H5A__compact_build_table_cb + * Function: H5A__compact_build_table_cb * - * Purpose: Object header iterator callback routine to copy attribute + * Purpose: Object header iterator callback routine to copy attribute * into table. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 18 2006 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Dec 18 2006 * * Modification:Raymond Lu * 24 June 2008 @@ -1426,9 +1427,9 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__compact_build_table_cb() */ - + /*------------------------------------------------------------------------- - * Function: H5A__compact_build_table + * Function: H5A__compact_build_table * * Purpose: Builds a table containing a sorted list of attributes for * an object @@ -1438,8 +1439,8 @@ done: * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Dec 18, 2006 + * Programmer: Quincey Koziol + * Dec 18, 2006 * *------------------------------------------------------------------------- */ @@ -1489,19 +1490,19 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__compact_build_table() */ - + /*------------------------------------------------------------------------- - * Function: H5A__dense_build_table_cb + * Function: H5A__dense_build_table_cb * - * Purpose: Callback routine for building table of attributes from dense + * Purpose: Callback routine for building table of attributes from dense * attribute storage. * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 11 2006 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Dec 11 2006 * *------------------------------------------------------------------------- */ @@ -1533,7 +1534,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__dense_build_table_cb() */ - + /*------------------------------------------------------------------------- * Function: H5A__dense_build_table * @@ -1546,8 +1547,8 @@ done: * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Dec 11, 2006 + * Programmer: Quincey Koziol + * Dec 11, 2006 * *------------------------------------------------------------------------- */ @@ -1618,22 +1619,22 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__dense_build_table() */ - + /*------------------------------------------------------------------------- - * Function: H5A__attr_cmp_name_inc + * Function: H5A__attr_cmp_name_inc * - * Purpose: Callback routine for comparing two attribute names, in + * Purpose: Callback routine for comparing two attribute names, in * increasing alphabetic order * - * Return: An integer less than, equal to, or greater than zero if the + * Return: An integer less than, equal to, or greater than zero if the * first argument is considered to be respectively less than, * equal to, or greater than the second. If two members compare * as equal, their order in the sorted array is undefined. * (i.e. same as strcmp()) * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Dec 11 2006 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Dec 11 2006 * *------------------------------------------------------------------------- */ @@ -1646,22 +1647,22 @@ H5A__attr_cmp_name_inc(const void *attr1, const void *attr2) (*(const H5A_t * const *)attr2)->shared->name)) } /* end H5A__attr_cmp_name_inc() */ - + /*------------------------------------------------------------------------- - * Function: H5A__attr_cmp_name_dec + * Function: H5A__attr_cmp_name_dec * - * Purpose: Callback routine for comparing two attribute names, in + * Purpose: Callback routine for comparing two attribute names, in * decreasing alphabetic order * - * Return: An integer less than, equal to, or greater than zero if the + * Return: An integer less than, equal to, or greater than zero if the * second argument is considered to be respectively less than, * equal to, or greater than the first. If two members compare * as equal, their order in the sorted array is undefined. * (i.e. opposite of strcmp()) * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Feb 8 2007 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Feb 8 2007 * *------------------------------------------------------------------------- */ @@ -1674,21 +1675,21 @@ H5A__attr_cmp_name_dec(const void *attr1, const void *attr2) (*(const H5A_t * const *)attr1)->shared->name)) } /* end H5A__attr_cmp_name_dec() */ - + /*------------------------------------------------------------------------- - * Function: H5A__attr_cmp_corder_inc + * Function: H5A__attr_cmp_corder_inc * - * Purpose: Callback routine for comparing two attributes, in + * Purpose: Callback routine for comparing two attributes, in * increasing creation order * - * Return: An integer less than, equal to, or greater than zero if the + * Return: An integer less than, equal to, or greater than zero if the * first argument is considered to be respectively less than, * equal to, or greater than the second. If two members compare * as equal, their order in the sorted array is undefined. * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Feb 8 2007 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Feb 8 2007 * *------------------------------------------------------------------------- */ @@ -1709,21 +1710,21 @@ H5A__attr_cmp_corder_inc(const void *attr1, const void *attr2) FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__attr_cmp_corder_inc() */ - + /*------------------------------------------------------------------------- - * Function: H5A__attr_cmp_corder_dec + * Function: H5A__attr_cmp_corder_dec * - * Purpose: Callback routine for comparing two attributes, in + * Purpose: Callback routine for comparing two attributes, in * decreasing creation order * - * Return: An integer less than, equal to, or greater than zero if the + * Return: An integer less than, equal to, or greater than zero if the * second argument is considered to be respectively less than, * equal to, or greater than the first. If two members compare * as equal, their order in the sorted array is undefined. * - * Programmer: Quincey Koziol - * koziol@hdfgroup.org - * Feb 8 2007 + * Programmer: Quincey Koziol + * koziol@hdfgroup.org + * Feb 8 2007 * *------------------------------------------------------------------------- */ @@ -1744,17 +1745,17 @@ H5A__attr_cmp_corder_dec(const void *attr1, const void *attr2) FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__attr_cmp_corder_dec() */ - + /*------------------------------------------------------------------------- - * Function: H5A__attr_sort_table + * Function: H5A__attr_sort_table * * Purpose: Sort table containing a list of attributes for an object * - * Return: Success: Non-negative - * Failure: Negative + * Return: Success: Non-negative + * Failure: Negative * - * Programmer: Quincey Koziol - * Dec 11, 2006 + * Programmer: Quincey Koziol + * Dec 11, 2006 * *------------------------------------------------------------------------- */ @@ -1789,7 +1790,7 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5A__attr_sort_table() */ - + /*------------------------------------------------------------------------- * Function: H5A__attr_iterate_table * @@ -1798,8 +1799,8 @@ H5A__attr_sort_table(H5A_attr_table_t *atable, H5_index_t idx_type, * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Dec 18, 2006 + * Programmer: Quincey Koziol + * Dec 18, 2006 * *------------------------------------------------------------------------- */ @@ -1871,7 +1872,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__attr_iterate_table() */ - + /*------------------------------------------------------------------------- * Function: H5A__attr_release_table * @@ -1879,15 +1880,15 @@ done: * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol - * Dec 11, 2006 + * Programmer: Quincey Koziol + * Dec 11, 2006 * *------------------------------------------------------------------------- */ herr_t H5A__attr_release_table(H5A_attr_table_t *atable) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1912,7 +1913,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__attr_release_table() */ - + /*------------------------------------------------------------------------- * Function: H5A__get_ainfo * @@ -1943,11 +1944,11 @@ H5A__get_ainfo(H5F_t *f, H5O_t *oh, H5O_ainfo_t *ainfo) /* Check if the "attribute info" message exists */ if((ret_value = H5O_msg_exists_oh(oh, H5O_AINFO_ID)) < 0) - HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header") + HGOTO_ERROR(H5E_ATTR, H5E_NOTFOUND, FAIL, "unable to check object header") if(ret_value > 0) { /* Retrieve the "attribute info" structure */ if(NULL == H5O_msg_read_oh(f, oh, H5O_AINFO_ID, ainfo)) - HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message") + HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't read AINFO message") /* Check if we don't know how many attributes there are */ if(ainfo->nattrs == HSIZET_MAX) { @@ -1976,7 +1977,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5A__get_ainfo() */ - + /*------------------------------------------------------------------------- * Function: H5A__set_version * @@ -2038,7 +2039,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__set_version() */ - + /*------------------------------------------------------------------------- * Function: H5A__attr_copy_file * @@ -2069,11 +2070,11 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s hid_t tid_mem = -1; /* Datatype ID for memory datatype */ void *buf = NULL; /* Buffer for copying data */ void *reclaim_buf = NULL; /* Buffer for reclaiming data */ - void *bkg_buf = NULL; /* Background buffer */ + void *bkg_buf = NULL; /* Background buffer */ hid_t buf_sid = -1; /* ID for buffer dataspace */ - hssize_t sdst_nelmts; /* # of elements in destination attribute (signed) */ - size_t dst_nelmts; /* # of elements in destination attribute */ - size_t dst_dt_size; /* Size of destination attribute datatype */ + hssize_t sdst_nelmts; /* # of elements in destination attribute (signed) */ + size_t dst_nelmts; /* # of elements in destination attribute */ + size_t dst_dt_size; /* Size of destination attribute datatype */ H5A_t *ret_value = NULL; /* Return value */ FUNC_ENTER_PACKAGE @@ -2248,10 +2249,10 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s H5MM_memcpy(buf, attr_src->shared->data, attr_src->shared->data_size); - /* Allocate background memory */ - if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst)) - if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size))) - HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed") + /* Allocate background memory */ + if(H5T_path_bkg(tpath_src_mem) || H5T_path_bkg(tpath_mem_dst)) + if(NULL == (bkg_buf = H5FL_BLK_CALLOC(attr_buf, buf_size))) + HGOTO_ERROR(H5E_ATTR, H5E_CANTALLOC, NULL, "memory allocation failed") /* Convert from source file to memory */ if(H5T_convert(tpath_src_mem, tid_src, tid_mem, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0) @@ -2259,9 +2260,9 @@ H5A__attr_copy_file(const H5A_t *attr_src, H5F_t *file_dst, hbool_t *recompute_s H5MM_memcpy(reclaim_buf, buf, buf_size); - /* Set background buffer to all zeros */ - if(bkg_buf) - HDmemset(bkg_buf, 0, buf_size); + /* Set background buffer to all zeros */ + if(bkg_buf) + HDmemset(bkg_buf, 0, buf_size); /* Convert from memory to destination file */ if(H5T_convert(tpath_mem_dst, tid_mem, tid_dst, nelmts, (size_t)0, (size_t)0, buf, bkg_buf) < 0) @@ -2321,7 +2322,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__attr_copy_file() */ - + /*------------------------------------------------------------------------- * Function: H5A__attr_post_copy_file * @@ -2422,7 +2423,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__attr_post_copy_file() */ - + /*------------------------------------------------------------------------- * Function: H5A__dense_post_copy_file_cb * @@ -2480,7 +2481,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__dense_post_copy_file_cb() */ - + /*------------------------------------------------------------------------- * Function: H5A__dense_post_copy_file_all * @@ -2527,7 +2528,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5A__dense_post_copy_file_all */ - + /*------------------------------------------------------------------------- * Function: H5A__rename_by_name * @@ -2535,7 +2536,7 @@ done: * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * February 20, 2007 * *------------------------------------------------------------------------- @@ -2545,10 +2546,10 @@ H5A__rename_by_name(H5G_loc_t loc, const char *obj_name, const char *old_attr_na const char *new_attr_name) { 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 'obj_name' found */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -2577,7 +2578,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__rename_by_name() */ - + /*------------------------------------------------------------------------- * Function: H5A__iterate_common * @@ -2585,7 +2586,7 @@ done: * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * December 6, 2017 * *------------------------------------------------------------------------- @@ -2612,7 +2613,7 @@ H5A__iterate_common(hid_t loc_id, H5_index_t idx_type, H5_iter_order_t order, FUNC_LEAVE_NOAPI(ret_value) } /* H5A__iterate_common() */ - + /*------------------------------------------------------------------------- * Function: H5A__iterate * @@ -2677,7 +2678,7 @@ done: } /* end H5A__iterate() */ #ifndef H5_NO_DEPRECATED_SYMBOLS - + /*------------------------------------------------------------------------- * Function: H5A__iterate_old * @@ -2685,7 +2686,7 @@ done: * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * December 6, 2017 * *------------------------------------------------------------------------- @@ -2719,15 +2720,15 @@ H5A__iterate_old(hid_t loc_id, unsigned *attr_num, H5A_operator1_t op, } /* H5A__iterate_old() */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ - + /*------------------------------------------------------------------------- - * Function: H5A__delete_by_name + * Function: H5A__delete_by_name * * Purpose: Private version of H5Adelete_by_name * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * December 6, 2017 * *------------------------------------------------------------------------- @@ -2736,8 +2737,8 @@ herr_t H5A__delete_by_name(const H5G_loc_t *loc, const char *obj_name, const char *attr_name) { 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 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ @@ -2765,15 +2766,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5A__delete_by_name() */ - + /*------------------------------------------------------------------------- - * Function: H5A__delete_by_idx + * Function: H5A__delete_by_idx * * Purpose: Private version of H5Adelete_by_idx * * Return: SUCCEED/FAIL * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * December 6, 2017 * *------------------------------------------------------------------------- @@ -2783,8 +2784,8 @@ H5A__delete_by_idx(const H5G_loc_t *loc, const char *obj_name, H5_index_t idx_ty H5_iter_order_t order, hsize_t n) { 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 'obj_name' found */ herr_t ret_value = SUCCEED; /* Return value */ diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index fb28489..b882578 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -51,6 +51,7 @@ const unsigned H5O_layout_ver_bounds[] = { H5O_LAYOUT_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5O_LAYOUT_VERSION_3, /* H5F_LIBVER_V18 */ /* H5O_LAYOUT_VERSION_DEFAULT */ H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V110 */ + H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V112 */ H5O_LAYOUT_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; @@ -65,7 +66,7 @@ const unsigned H5O_layout_ver_bounds[] = { - + /*------------------------------------------------------------------------- * Function: H5D__layout_set_io_ops * @@ -82,7 +83,7 @@ const unsigned H5O_layout_ver_bounds[] = { herr_t H5D__layout_set_io_ops(const H5D_t *dataset) { - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -152,7 +153,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__layout_set_io_ops() */ - + /*------------------------------------------------------------------------- * Function: H5D__layout_meta_size * @@ -283,7 +284,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__layout_meta_size() */ - + /*------------------------------------------------------------------------- * Function: H5D__layout_set_version * @@ -321,7 +322,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__layout_set_version() */ - + /*------------------------------------------------------------------------- * Function: H5D__layout_set_latest_indexing * @@ -335,7 +336,7 @@ done: *------------------------------------------------------------------------- */ herr_t -H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, +H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, const H5D_dcpl_cache_t *dcpl_cache) { herr_t ret_value = SUCCEED; /* Return value */ @@ -361,9 +362,9 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, if(ndims > 0) { hsize_t max_dims[H5O_LAYOUT_NDIMS]; /* Maximum dimension sizes */ hsize_t cur_dims[H5O_LAYOUT_NDIMS]; /* Current dimension sizes */ - unsigned unlim_count = 0; /* Count of unlimited max. dimensions */ + unsigned unlim_count = 0; /* Count of unlimited max. dimensions */ hbool_t single = TRUE; /* Fulfill single chunk indexing */ - unsigned u; /* Local index variable */ + unsigned u; /* Local index variable */ /* Query the dataspace's dimensions */ if(H5S_get_simple_extent_dims(space, cur_dims, max_dims) < 0) @@ -417,7 +418,7 @@ H5D__layout_set_latest_indexing(H5O_layout_t *layout, const H5S_t *space, layout->storage.u.chunk.idx_type = H5D_CHUNK_IDX_SINGLE; layout->storage.u.chunk.ops = H5D_COPS_SINGLE; } /* end if */ - else if(!dcpl_cache->pline.nused && + else if(!dcpl_cache->pline.nused && dcpl_cache->fill.alloc_time == H5D_ALLOC_TIME_EARLY) { /* Set the chunk index type to "none" Index */ @@ -445,7 +446,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__layout_set_latest_indexing() */ - + /*------------------------------------------------------------------------- * Function: H5D__layout_oh_create * @@ -586,17 +587,17 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5D__layout_oh_create() */ - + /*------------------------------------------------------------------------- - * Function: H5D__layout_oh_read + * Function: H5D__layout_oh_read * - * Purpose: Read layout/pline/efl information for dataset + * Purpose: Read layout/pline/efl information for dataset * - * Return: Success: SUCCEED - * Failure: FAIL + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * Monday, July 27, 2009 + * Programmer: Quincey Koziol + * Monday, July 27, 2009 * *------------------------------------------------------------------------- */ @@ -680,17 +681,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5D__layout_oh_read() */ - + /*------------------------------------------------------------------------- - * Function: H5D__layout_oh_write + * Function: H5D__layout_oh_write * - * Purpose: Write layout information for dataset + * Purpose: Write layout information for dataset * - * Return: Success: SUCCEED - * Failure: FAIL + * Return: Success: SUCCEED + * Failure: FAIL * - * Programmer: Quincey Koziol - * Monday, July 27, 2009 + * Programmer: Quincey Koziol + * Monday, July 27, 2009 * *------------------------------------------------------------------------- */ diff --git a/src/H5Fpublic.h b/src/H5Fpublic.h index dd794e4..8338fb2 100644 --- a/src/H5Fpublic.h +++ b/src/H5Fpublic.h @@ -47,13 +47,13 @@ * We're assuming that these constants are used rather early in the hdf5 * session. */ -#define H5F_ACC_RDONLY (H5CHECK H5OPEN 0x0000u) /*absence of rdwr => rd-only */ -#define H5F_ACC_RDWR (H5CHECK H5OPEN 0x0001u) /*open for read and write */ -#define H5F_ACC_TRUNC (H5CHECK H5OPEN 0x0002u) /*overwrite existing files */ -#define H5F_ACC_EXCL (H5CHECK H5OPEN 0x0004u) /*fail if file already exists*/ +#define H5F_ACC_RDONLY (H5CHECK H5OPEN 0x0000u) /*absence of rdwr => rd-only */ +#define H5F_ACC_RDWR (H5CHECK H5OPEN 0x0001u) /*open for read and write */ +#define H5F_ACC_TRUNC (H5CHECK H5OPEN 0x0002u) /*overwrite existing files */ +#define H5F_ACC_EXCL (H5CHECK H5OPEN 0x0004u) /*fail if file already exists*/ /* NOTE: 0x0008u was H5F_ACC_DEBUG, now deprecated */ -#define H5F_ACC_CREAT (H5CHECK H5OPEN 0x0010u) /*create non-existing files */ -#define H5F_ACC_SWMR_WRITE (H5CHECK 0x0020u) /*indicate that this file is +#define H5F_ACC_CREAT (H5CHECK H5OPEN 0x0010u) /*create non-existing files */ +#define H5F_ACC_SWMR_WRITE (H5CHECK 0x0020u) /*indicate that this file is * open for writing in a * single-writer/multi-reader (SWMR) * scenario. Note that the @@ -62,7 +62,7 @@ * with RDONLY access, and use * the special "SWMR_READ" access * flag. */ -#define H5F_ACC_SWMR_READ (H5CHECK 0x0040u) /*indicate that this file is +#define H5F_ACC_SWMR_READ (H5CHECK 0x0040u) /*indicate that this file is * open for reading in a * single-writer/multi-reader (SWMR) * scenario. Note that the @@ -73,15 +73,15 @@ /* Value passed to H5Pset_elink_acc_flags to cause flags to be taken from the * parent file. */ -#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /*ignore setting on lapl */ +#define H5F_ACC_DEFAULT (H5CHECK H5OPEN 0xffffu) /*ignore setting on lapl */ /* Flags for H5Fget_obj_count() & H5Fget_obj_ids() calls */ -#define H5F_OBJ_FILE (0x0001u) /* File objects */ -#define H5F_OBJ_DATASET (0x0002u) /* Dataset objects */ -#define H5F_OBJ_GROUP (0x0004u) /* Group objects */ +#define H5F_OBJ_FILE (0x0001u) /* File objects */ +#define H5F_OBJ_DATASET (0x0002u) /* Dataset objects */ +#define H5F_OBJ_GROUP (0x0004u) /* Group objects */ #define H5F_OBJ_DATATYPE (0x0008u) /* Named datatype objects */ #define H5F_OBJ_ATTR (0x0010u) /* Attribute objects */ -#define H5F_OBJ_ALL (H5F_OBJ_FILE|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_DATATYPE|H5F_OBJ_ATTR) +#define H5F_OBJ_ALL (H5F_OBJ_FILE|H5F_OBJ_DATASET|H5F_OBJ_GROUP|H5F_OBJ_DATATYPE|H5F_OBJ_ATTR) #define H5F_OBJ_LOCAL (0x0020u) /* Restrict search to objects opened through current file ID */ /* (as opposed to objects opened through any file ID accessing this file) */ @@ -99,20 +99,20 @@ /* The difference between a single file and a set of mounted files */ typedef enum H5F_scope_t { - H5F_SCOPE_LOCAL = 0, /*specified file handle only */ - H5F_SCOPE_GLOBAL = 1 /*entire virtual file */ + H5F_SCOPE_LOCAL = 0, /*specified file handle only */ + H5F_SCOPE_GLOBAL = 1 /*entire virtual file */ } H5F_scope_t; /* Unlimited file size for H5Pset_external() */ -#define H5F_UNLIMITED ((hsize_t)(-1L)) +#define H5F_UNLIMITED ((hsize_t)(-1L)) /* How does file close behave? * H5F_CLOSE_DEFAULT - Use the degree pre-defined by underlining VFL * H5F_CLOSE_WEAK - file closes only after all opened objects are closed * H5F_CLOSE_SEMI - if no opened objects, file is close; otherwise, file - close fails + close fails * H5F_CLOSE_STRONG - if there are opened objects, close them first, then - close file + close file */ typedef enum H5F_close_degree_t { H5F_CLOSE_DEFAULT = 0, @@ -124,19 +124,19 @@ typedef enum H5F_close_degree_t { /* Current "global" information about file */ typedef struct H5F_info2_t { struct { - unsigned version; /* Superblock version # */ - hsize_t super_size; /* Superblock size */ - hsize_t super_ext_size; /* Superblock extension size */ + unsigned version; /* Superblock version # */ + hsize_t super_size; /* Superblock size */ + hsize_t super_ext_size; /* Superblock extension size */ } super; struct { - unsigned version; /* Version # of file free space management */ - hsize_t meta_size; /* Free space manager metadata size */ - hsize_t tot_space; /* Amount of free space in the file */ + unsigned version; /* Version # of file free space management */ + hsize_t meta_size; /* Free space manager metadata size */ + hsize_t tot_space; /* Amount of free space in the file */ } free; struct { - unsigned version; /* Version # of shared object header info */ - hsize_t hdr_size; /* Shared object header message header size */ - H5_ih_info_t msgs_info; /* Shared object header message index & heap size */ + unsigned version; /* Version # of shared object header info */ + hsize_t hdr_size; /* Shared object header message header size */ + H5_ih_info_t msgs_info; /* Shared object header message index & heap size */ } sohm; } H5F_info2_t; @@ -180,10 +180,11 @@ typedef enum H5F_libver_t { H5F_LIBVER_V18 = 1, /* Use the latest v18 format for storing objects */ H5F_LIBVER_V110 = 2, /* Use the latest v110 format for storing objects */ H5F_LIBVER_V112 = 3, /* Use the latest v112 format for storing objects */ + H5F_LIBVER_V114 = 4, /* Use the latest v112 format for storing objects */ H5F_LIBVER_NBOUNDS } H5F_libver_t; -#define H5F_LIBVER_LATEST H5F_LIBVER_V112 +#define H5F_LIBVER_LATEST H5F_LIBVER_V114 /* File space handling strategy */ typedef enum H5F_fspace_strategy_t { @@ -200,16 +201,16 @@ typedef enum H5F_fspace_strategy_t { typedef enum H5F_file_space_type_t { H5F_FILE_SPACE_DEFAULT = 0, /* Default (or current) free space strategy setting */ H5F_FILE_SPACE_ALL_PERSIST = 1, /* Persistent free space managers, aggregators, virtual file driver */ - H5F_FILE_SPACE_ALL = 2, /* Non-persistent free space managers, aggregators, virtual file driver */ - /* This is the library default */ + H5F_FILE_SPACE_ALL = 2, /* Non-persistent free space managers, aggregators, virtual file driver */ + /* This is the library default */ H5F_FILE_SPACE_AGGR_VFD = 3, /* Aggregators, Virtual file driver */ - H5F_FILE_SPACE_VFD = 4, /* Virtual file driver */ - H5F_FILE_SPACE_NTYPES /* must be last */ + H5F_FILE_SPACE_VFD = 4, /* Virtual file driver */ + H5F_FILE_SPACE_NTYPES /* must be last */ } H5F_file_space_type_t; /* Data structure to report the collection of read retries for metadata items with checksum */ /* Used by public routine H5Fget_metadata_read_retry_info() */ -#define H5F_NUM_METADATA_READ_RETRY_TYPES 21 +#define H5F_NUM_METADATA_READ_RETRY_TYPES 21 typedef struct H5F_retry_info_t { unsigned nbins; uint32_t *retries[H5F_NUM_METADATA_READ_RETRY_TYPES]; @@ -227,9 +228,9 @@ extern "C" { H5_DLL htri_t H5Fis_accessible(const char *container_name, hid_t fapl_id); H5_DLL hid_t H5Fcreate(const char *filename, unsigned flags, - hid_t create_plist, hid_t access_plist); + hid_t create_plist, hid_t access_plist); H5_DLL hid_t H5Fopen(const char *filename, unsigned flags, - hid_t access_plist); + hid_t access_plist); H5_DLL hid_t H5Freopen(hid_t file_id); H5_DLL herr_t H5Fflush(hid_t object_id, H5F_scope_t scope); H5_DLL herr_t H5Fclose(hid_t file_id); @@ -249,9 +250,9 @@ H5_DLL herr_t H5Fget_eoa(hid_t file_id, haddr_t *eoa); H5_DLL herr_t H5Fincrement_filesize(hid_t file_id, hsize_t increment); H5_DLL ssize_t H5Fget_file_image(hid_t file_id, void * buf_ptr, size_t buf_len); H5_DLL herr_t H5Fget_mdc_config(hid_t file_id, - H5AC_cache_config_t * config_ptr); + H5AC_cache_config_t * config_ptr); H5_DLL herr_t H5Fset_mdc_config(hid_t file_id, - H5AC_cache_config_t * config_ptr); + H5AC_cache_config_t * config_ptr); H5_DLL herr_t H5Fget_mdc_hit_rate(hid_t file_id, double * hit_rate_ptr); H5_DLL herr_t H5Fget_mdc_size(hid_t file_id, size_t * max_size_ptr, @@ -292,16 +293,16 @@ H5_DLL herr_t H5Fget_mpi_atomicity(hid_t file_id, hbool_t *flag); #ifndef H5_NO_DEPRECATED_SYMBOLS /* Macros */ -#define H5F_ACC_DEBUG (H5CHECK H5OPEN 0x0000u) /*print debug info (deprecated)*/ +#define H5F_ACC_DEBUG (H5CHECK H5OPEN 0x0000u) /*print debug info (deprecated)*/ /* Typedefs */ /* Current "global" information about file */ typedef struct H5F_info1_t { - hsize_t super_ext_size; /* Superblock extension size */ + hsize_t super_ext_size; /* Superblock extension size */ struct { - hsize_t hdr_size; /* Shared object header message header size */ - H5_ih_info_t msgs_info; /* Shared object header message index & heap size */ + hsize_t hdr_size; /* Shared object header message header size */ + H5_ih_info_t msgs_info; /* Shared object header message index & heap size */ } sohm; } H5F_info1_t; diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 5334c51..f8e8f3f 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -77,10 +77,11 @@ static const unsigned HDF5_superblock_ver_bounds[] = { HDF5_SUPERBLOCK_VERSION_DEF, /* H5F_LIBVER_EARLIEST */ HDF5_SUPERBLOCK_VERSION_2, /* H5F_LIBVER_V18 */ HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V110 */ + HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V112 */ HDF5_SUPERBLOCK_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; - + /*------------------------------------------------------------------------- * Function: H5F__super_ext_create * @@ -133,7 +134,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F__super_ext_create() */ - + /*------------------------------------------------------------------------- * Function: H5F__super_ext_open * @@ -171,7 +172,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F__super_ext_open() */ - + /*------------------------------------------------------------------------- * Function: H5F__super_ext_close * @@ -224,14 +225,14 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F__super_ext_close() */ - + /*------------------------------------------------------------------------- * Function: H5F__update_super_ext_driver_msg * - * Purpose: Update the superblock extension file driver info message if + * Purpose: Update the superblock extension file driver info message if * we are using a V 2 superblock. Observe that the function * is a NO-OP if the file driver info message does not exist. - * This is necessary, as the function is called whenever the + * This is necessary, as the function is called whenever the * EOA is updated, and were it to create the file driver info * message, it would find itself in an infinite recursion. * @@ -271,8 +272,8 @@ H5F__update_super_ext_driver_msg(H5F_t *f) /* Check for driver info */ H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t); - /* Nothing to do unless there is both driver info and - * the driver info superblock extension message has + /* Nothing to do unless there is both driver info and + * the driver info superblock extension message has * already been created. */ if(driver_size > 0) { @@ -288,7 +289,7 @@ H5F__update_super_ext_driver_msg(H5F_t *f) /* Write the message to the superblock extension. * - * Note that the superblock extension and the + * Note that the superblock extension and the * file driver info message must already exist. */ drvinfo.len = driver_size; @@ -304,7 +305,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5F__update_super_ext_driver_msg() */ - + /*------------------------------------------------------------------------- * Function: H5F__super_read * @@ -343,7 +344,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) FUNC_ENTER_PACKAGE_TAG(H5AC__SUPERBLOCK_TAG) /* initialize the drvinfo to NULL -- we will overwrite this if there - * is a driver information block + * is a driver information block */ f->shared->drvinfo = NULL; @@ -435,7 +436,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) HGOTO_ERROR(H5E_FILE, H5E_BADTYPE, FAIL, "can't get property list") /* Make certain we can read the fixed-size portion of the superblock */ - if(H5F__set_eoa(f, H5FD_MEM_SUPER, + if(H5F__set_eoa(f, H5FD_MEM_SUPER, (haddr_t)(H5F_SUPERBLOCK_FIXED_SIZE + H5F_SUPERBLOCK_MINIMAL_VARLEN_SIZE)) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTSET, FAIL, "set end of space allocation request failed") @@ -455,12 +456,12 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) if(NULL == (sblock = (H5F_super_t *)H5AC_protect(f, H5AC_SUPERBLOCK, (haddr_t)0, &udata, rw_flags))) HGOTO_ERROR(H5E_FILE, H5E_CANTPROTECT, FAIL, "unable to load superblock") - /* + /* * When opening a file with SWMR-write access, the library will first - * check to ensure that superblock version 3 is used. Otherwise fail + * check to ensure that superblock version 3 is used. Otherwise fail * file open. * - * Then the library will upgrade the file's low_bound depending on + * Then the library will upgrade the file's low_bound depending on * superblock version as follows: * --version 0 or 1: no change to low_bound * --version 2: upgrade low_bound to at least V18 @@ -590,8 +591,8 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) * as the file can appear truncated if only part of it has been * been flushed to disk by the SWMR writer process. */ - /* The EOF check is also skipped when the private property - * H5F_ACS_SKIP_EOF_CHECK_NAME exists in the fapl. + /* The EOF check is also skipped when the private property + * H5F_ACS_SKIP_EOF_CHECK_NAME exists in the fapl. * This property is enabled by the tool h5clear with these * two options: (1) --filesize (2) --increment */ @@ -602,7 +603,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get skip EOF check value") if(H5F_INTENT(f) & H5F_ACC_SWMR_READ) { - /* + /* * When the file is opened for SWMR read access, skip the check if: * --the file is already marked for SWMR writing and * --the file has version 3 superblock for SWMR support @@ -644,10 +645,10 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) drvrinfo_udata.f = f; drvrinfo_udata.driver_addr = sblock->driver_addr; - /* extend EOA so we can read at least the fixed sized - * portion of the driver info block + /* extend EOA so we can read at least the fixed sized + * portion of the driver info block */ - if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) /* will extend eoa later if required */ + if(H5FD_set_eoa(f->shared->lf, H5FD_MEM_SUPER, sblock->driver_addr + H5F_DRVINFOBLOCK_HDR_SIZE) < 0) /* will extend eoa later if required */ HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "set end of space allocation request failed") /* Look up the driver info block */ @@ -660,7 +661,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) if(((rw_flags & H5AC__READ_ONLY_FLAG) == 0) && H5F_HAS_FEATURE(f, H5FD_FEAT_DIRTY_DRVRINFO_LOAD)) drvinfo_flags |= H5AC__DIRTIED_FLAG; - /* set the pin entry flag so that the driver information block + /* set the pin entry flag so that the driver information block * cache entry will be pinned in the cache. */ drvinfo_flags |= H5AC__PIN_ENTRY_FLAG; @@ -826,7 +827,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) if(f->shared->eoa_fsm_fsalloc != fsinfo.eoa_pre_fsm_fsalloc) f->shared->eoa_fsm_fsalloc = fsinfo.eoa_pre_fsm_fsalloc; - /* + /* * If the following two conditions are true: * (1) skipping EOF check (skip_eof_check) * (2) dropping free-space to the floor (f->shared->null_fsm_addr) @@ -838,9 +839,9 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) if(!skip_eof_check && !f->shared->null_fsm_addr) HDassert((!f->shared->fs_persist) || (f->shared->eoa_fsm_fsalloc != HADDR_UNDEF)); - /* + /* * A crashed file with persistent free-space managers may have - * undefined f->shared->eoa_fsm_fsalloc. + * undefined f->shared->eoa_fsm_fsalloc. * eoa_fsm_fsalloc is the final eoa which is saved in the free-space * info message's eoa_pre_fsm_fsalloc field for backward compatibility. * If the tool h5clear sets to dropping free-space to the floor @@ -856,7 +857,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) * Because: * --there is no more f->shared->eoa_pre_fsm_fsalloc and * f->shared->first_alloc_dealloc - * --the check for null_fsm_addr is directly done in H5MF_settle_meta_data_fsm() + * --the check for null_fsm_addr is directly done in H5MF_settle_meta_data_fsm() * and H5MF_settle_raw_data_fsm() */ @@ -865,9 +866,9 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) f->shared->fs_addr[u] = fsinfo.fs_addr[u - 1]; /* If the following two conditions are true: - * (1) file is persisting free-space + * (1) file is persisting free-space * (2) dropping free-space to the floor (f->shared->null_fsm_addr) - * nullify the addresses of the FSMs + * nullify the addresses of the FSMs */ if(f->shared->fs_persist && f->shared->null_fsm_addr) for(u = 0; u < NELMTS(fsinfo.fs_addr); u++) @@ -882,7 +883,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) #if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */ /* KLUGE ALERT!! * - * H5F__super_ext_write_msg() expects f->shared->sblock to + * H5F__super_ext_write_msg() expects f->shared->sblock to * be set -- verify that it is NULL, and then set it. * Set it back to NULL when we are done. */ @@ -919,12 +920,12 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) /* if the metadata cache image superblock extension message exists, * read its contents and pass the data on to the metadata cache. * Given this data, the cache will load and decode the metadata - * cache image block, decoded it and load its contents into the - * the cache on the test protect call. + * cache image block, decoded it and load its contents into the + * the cache on the test protect call. * - * Further, if the file is opened R/W, the metadata cache will + * Further, if the file is opened R/W, the metadata cache will * delete the metadata cache image superblock extension and free - * the cache image block. Don't do this now as f->shared + * the cache image block. Don't do this now as f->shared * is not fully setup, which complicates matters. */ @@ -975,7 +976,7 @@ H5F__super_read(H5F_t *f, H5P_genplist_t *fa_plist, hbool_t initial_read) #if 1 /* bug fix test code -- tidy this up if all goes well */ /* JRM */ /* KLUGE ALERT!! * - * H5F__super_ext_write_msg() expects f->shared->sblock to + * H5F__super_ext_write_msg() expects f->shared->sblock to * be set -- verify that it is NULL, and then set it. * Set it back to NULL when we are done. */ @@ -1019,10 +1020,10 @@ done: if(sblock && H5AC_unprotect(f, H5AC_SUPERBLOCK, (haddr_t)0, sblock, sblock_flags) < 0) HDONE_ERROR(H5E_FILE, H5E_CANTUNPROTECT, FAIL, "unable to close superblock") - /* If we have failed, make sure no entries are left in the + /* If we have failed, make sure no entries are left in the * metadata cache, so that it can be shut down and discarded. */ - if(ret_value < 0) { + if(ret_value < 0) { /* Unpin and discard drvinfo cache entry */ if(f->shared->drvinfo) { if(H5AC_unpin_entry(f->shared->drvinfo) < 0) @@ -1048,7 +1049,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5F__super_read() */ - + /*------------------------------------------------------------------------- * Function: H5F__super_init * @@ -1112,10 +1113,10 @@ H5F__super_init(H5F_t *f) if(!(f->shared->fs_strategy == H5F_FILE_SPACE_STRATEGY_DEF && f->shared->fs_persist == H5F_FREE_SPACE_PERSIST_DEF && f->shared->fs_threshold == H5F_FREE_SPACE_THRESHOLD_DEF && - f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF)) + f->shared->fs_page_size == H5F_FILE_SPACE_PAGE_SIZE_DEF)) non_default_fs_settings = TRUE; - /* + /* * When creating a file with write access, the library will: * -- set superblock version to 0, 1 or 2 based on feature enabled * -- no change to low_bound @@ -1124,9 +1125,9 @@ H5F__super_init(H5F_t *f) * -- set superblock version to 3 * -- upgrade low_bound to at least V110 * - * Then the library will finalize superblock version to that allowed by + * Then the library will finalize superblock version to that allowed by * low_bound if that is higher. - * Lastly, the library will check to ensure the superblock version does not + * Lastly, the library will check to ensure the superblock version does not * exceed the version allowed by high_bound. Otherwise fail file open. * * For details, please see RFC:Setting Bounds for Object Creation in HDF5 1.10.0. @@ -1136,12 +1137,12 @@ H5F__super_init(H5F_t *f) * the status_flags field in the superblock. The problem is discussed in * jira issue SWMR-79 and also in the RFC: File Format Changes in HDF5 1.10.0. * The file's low_bound is upgraded for SWMR so that the library will - * use the best format versions available in 1.10. - * Due to the possible upgrade, the fapl returned from H5Fget_access_plist() + * use the best format versions available in 1.10. + * Due to the possible upgrade, the fapl returned from H5Fget_access_plist() * might indicate a low_bound higher than what the user originally set. */ - /* + /* * Creating a file with SWMR-write access will * upgrade superblock version and low_bound */ @@ -1152,10 +1153,10 @@ H5F__super_init(H5F_t *f) /* Bump superblock version to create superblock extension for SOHM info */ } else if(f->shared->sohm_nindexes > 0) super_vers = HDF5_SUPERBLOCK_VERSION_2; - /* - * Bump superblock version to create superblock extension for: - * -- non-default file space strategy or - * -- non-default persisting free-space or + /* + * Bump superblock version to create superblock extension for: + * -- non-default file space strategy or + * -- non-default persisting free-space or * -- non-default free-space threshold or * -- non-default page_size */ @@ -1232,7 +1233,7 @@ H5F__super_init(H5F_t *f) /* Compute the size of the driver information block */ H5_CHECKED_ASSIGN(driver_size, size_t, H5FD_sb_size(f->shared->lf), hsize_t); - /* The following code sets driver_size to the valued needed + /* The following code sets driver_size to the valued needed * for the driver info block, and sets the driver info block * address regardless of the version of the superblock. */ @@ -1273,7 +1274,7 @@ H5F__super_init(H5F_t *f) /* Allocate space for the superblock */ if(HADDR_UNDEF == H5MF_alloc(f, H5FD_MEM_SUPER, superblock_size)) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for superblock") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "file allocation failed for superblock") /* set the drvinfo filed to NULL -- will overwrite this later if needed */ f->shared->drvinfo = NULL; @@ -1324,7 +1325,7 @@ H5F__super_init(H5F_t *f) * be tuned if more information is added to the superblock * extension. */ - if(H5F__super_ext_create(f, &ext_loc) < 0) + if(H5F__super_ext_create(f, &ext_loc) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTCREATE, FAIL, "unable to create superblock extension") ext_created = TRUE; @@ -1398,7 +1399,7 @@ H5F__super_init(H5F_t *f) if(H5O_msg_create(&ext_loc, H5O_FSINFO_ID, H5O_MSG_FLAG_DONTSHARE | H5O_MSG_FLAG_MARK_IF_UNKNOWN, H5O_UPDATE_TIME, &fsinfo) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTINIT, FAIL, "unable to update free-space info header message") - } /* end if */ + } /* end if */ } /* end if */ else { /* Check for creating an "old-style" driver info block */ @@ -1481,7 +1482,7 @@ done: FUNC_LEAVE_NOAPI_TAG(ret_value) } /* end H5F__super_init() */ - + /*------------------------------------------------------------------------- * Function: H5F_eoa_dirty * @@ -1511,8 +1512,8 @@ H5F_eoa_dirty(H5F_t *f) if(H5F_super_dirty(f) < 0) HGOTO_ERROR(H5E_FILE, H5E_CANTMARKDIRTY, FAIL, "unable to mark superblock as dirty") - /* If the driver information block exists, mark it dirty as well - * so that the change in eoa will be reflected there as well if + /* If the driver information block exists, mark it dirty as well + * so that the change in eoa will be reflected there as well if * appropriate. */ if(f->shared->drvinfo) { @@ -1529,7 +1530,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_eoa_dirty() */ - + /*------------------------------------------------------------------------- * Function: H5F_super_dirty * @@ -1563,7 +1564,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F_super_dirty() */ - + /*------------------------------------------------------------------------- * Function: H5F__super_free * @@ -1594,7 +1595,7 @@ H5F__super_free(H5F_super_t *sblock) FUNC_LEAVE_NOAPI(SUCCEED) } /* H5F__super_free() */ - + /*------------------------------------------------------------------------- * Function: H5F__super_size * @@ -1623,7 +1624,7 @@ H5F__super_size(H5F_t *f, hsize_t *super_size, hsize_t *super_ext_size) /* Set the superblock size */ if(super_size) - *super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock); + *super_size = (hsize_t)H5F_SUPERBLOCK_SIZE(f->shared->sblock); /* Set the superblock extension size */ if(super_ext_size) { @@ -1659,7 +1660,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F__super_size() */ - + /*------------------------------------------------------------------------- * Function: H5F__super_ext_write_msg() * @@ -1678,9 +1679,9 @@ H5F__super_ext_write_msg(H5F_t *f, unsigned id, void *mesg, H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ hbool_t ext_created = FALSE; /* Whether superblock extension was created */ hbool_t ext_opened = FALSE; /* Whether superblock extension was opened */ - H5O_loc_t ext_loc; /* "Object location" for superblock extension */ - htri_t status; /* Indicate whether the message exists or not */ - herr_t ret_value = SUCCEED; /* Return value */ + H5O_loc_t ext_loc; /* "Object location" for superblock extension */ + htri_t status; /* Indicate whether the message exists or not */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1744,7 +1745,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5F__super_ext_write_msg() */ - + /*------------------------------------------------------------------------- * Function: H5F__super_ext_remove_msg * @@ -1760,11 +1761,11 @@ herr_t H5F__super_ext_remove_msg(H5F_t *f, unsigned id) { H5AC_ring_t orig_ring = H5AC_RING_INV; /* Original ring value */ - H5O_loc_t ext_loc; /* "Object location" for superblock extension */ + H5O_loc_t ext_loc; /* "Object location" for superblock extension */ hbool_t ext_opened = FALSE; /* Whether the superblock extension was opened */ - int null_count = 0; /* # of null messages */ + int null_count = 0; /* # of null messages */ htri_t status; /* Indicate whether the message exists or not */ - herr_t ret_value = SUCCEED; /* Return value */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_PACKAGE @@ -1784,7 +1785,7 @@ H5F__super_ext_remove_msg(H5F_t *f, unsigned id) HGOTO_ERROR(H5E_OHDR, H5E_CANTGET, FAIL, "unable to check object header for message") else if(status) { /* message exists */ - H5O_hdr_info_t hdr_info; /* Object header info for superblock extension */ + H5O_hdr_info_t hdr_info; /* Object header info for superblock extension */ /* Remove the message */ if(H5O_msg_remove(&ext_loc, id, H5O_ALL, TRUE) < 0) diff --git a/src/H5Ofill.c b/src/H5Ofill.c index 53abff3..df39d19 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -14,15 +14,15 @@ /* Programmer: Robb Matzke <matzke@llnl.gov> * Wednesday, September 30, 1998 * - * Purpose: The fill message indicates a bit pattern to use for - * uninitialized data points of a dataset. + * Purpose: The fill message indicates a bit pattern to use for + * uninitialized data points of a dataset. */ #include "H5Omodule.h" /* This source code file is part of the H5O module */ #include "H5private.h" /* Generic Functions */ -#include "H5Dprivate.h" /* Datasets */ +#include "H5Dprivate.h" /* Datasets */ #include "H5Eprivate.h" /* Error handling */ #include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* IDs */ @@ -49,61 +49,61 @@ static herr_t H5O__fill_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth); /* Set up & include shared message "interface" info */ -#define H5O_SHARED_TYPE H5O_MSG_FILL -#define H5O_SHARED_DECODE H5O_fill_shared_decode -#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode -#define H5O_SHARED_ENCODE H5O_fill_shared_encode -#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode -#define H5O_SHARED_SIZE H5O_fill_shared_size -#define H5O_SHARED_SIZE_REAL H5O_fill_old_size -#define H5O_SHARED_DELETE H5O__fill_shared_delete +#define H5O_SHARED_TYPE H5O_MSG_FILL +#define H5O_SHARED_DECODE H5O_fill_shared_decode +#define H5O_SHARED_DECODE_REAL H5O_fill_old_decode +#define H5O_SHARED_ENCODE H5O_fill_shared_encode +#define H5O_SHARED_ENCODE_REAL H5O_fill_old_encode +#define H5O_SHARED_SIZE H5O_fill_shared_size +#define H5O_SHARED_SIZE_REAL H5O_fill_old_size +#define H5O_SHARED_DELETE H5O__fill_shared_delete #undef H5O_SHARED_DELETE_REAL -#define H5O_SHARED_LINK H5O__fill_shared_link +#define H5O_SHARED_LINK H5O__fill_shared_link #undef H5O_SHARED_LINK_REAL -#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file +#define H5O_SHARED_COPY_FILE H5O__fill_shared_copy_file #undef H5O_SHARED_COPY_FILE_REAL -#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file +#define H5O_SHARED_POST_COPY_FILE H5O_fill_shared_post_copy_file #undef H5O_SHARED_POST_COPY_FILE_REAL #undef H5O_SHARED_POST_COPY_FILE_UPD -#define H5O_SHARED_DEBUG H5O_fill_shared_debug -#define H5O_SHARED_DEBUG_REAL H5O__fill_debug -#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ +#define H5O_SHARED_DEBUG H5O_fill_shared_debug +#define H5O_SHARED_DEBUG_REAL H5O__fill_debug +#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ /* Set up & include shared message "interface" info */ /* (Kludgy 'undef's in order to re-include the H5Oshared.h header) */ #undef H5O_SHARED_TYPE -#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW +#define H5O_SHARED_TYPE H5O_MSG_FILL_NEW #undef H5O_SHARED_DECODE -#define H5O_SHARED_DECODE H5O_fill_new_shared_decode +#define H5O_SHARED_DECODE H5O_fill_new_shared_decode #undef H5O_SHARED_DECODE_REAL -#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode +#define H5O_SHARED_DECODE_REAL H5O_fill_new_decode #undef H5O_SHARED_ENCODE -#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode +#define H5O_SHARED_ENCODE H5O_fill_new_shared_encode #undef H5O_SHARED_ENCODE_REAL -#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode +#define H5O_SHARED_ENCODE_REAL H5O_fill_new_encode #undef H5O_SHARED_SIZE -#define H5O_SHARED_SIZE H5O_fill_new_shared_size +#define H5O_SHARED_SIZE H5O_fill_new_shared_size #undef H5O_SHARED_SIZE_REAL -#define H5O_SHARED_SIZE_REAL H5O_fill_new_size +#define H5O_SHARED_SIZE_REAL H5O_fill_new_size #undef H5O_SHARED_DELETE -#define H5O_SHARED_DELETE H5O__fill_new_shared_delete +#define H5O_SHARED_DELETE H5O__fill_new_shared_delete #undef H5O_SHARED_DELETE_REAL #undef H5O_SHARED_LINK -#define H5O_SHARED_LINK H5O__fill_new_shared_link +#define H5O_SHARED_LINK H5O__fill_new_shared_link #undef H5O_SHARED_LINK_REAL #undef H5O_SHARED_COPY_FILE -#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file +#define H5O_SHARED_COPY_FILE H5O__fill_new_shared_copy_file #undef H5O_SHARED_COPY_FILE_REAL #undef H5O_SHARED_POST_COPY_FILE -#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file +#define H5O_SHARED_POST_COPY_FILE H5O_fill_new_shared_post_copy_file #undef H5O_SHARED_POST_COPY_FILE_REAL #undef H5O_SHARED_POST_COPY_FILE_UPD #undef H5O_SHARED_DEBUG -#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug +#define H5O_SHARED_DEBUG H5O_fill_new_shared_debug #undef H5O_SHARED_DEBUG_REAL -#define H5O_SHARED_DEBUG_REAL H5O__fill_debug +#define H5O_SHARED_DEBUG_REAL H5O__fill_debug #undef H5Oshared_H -#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ +#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ /* This message derives from H5O message class, for old fill value before version 1.5 */ const H5O_msg_class_t H5O_MSG_FILL[1] = {{ @@ -150,7 +150,7 @@ const H5O_msg_class_t H5O_MSG_FILL_NEW[1] = {{ H5O_fill_new_shared_post_copy_file, /* post copy native value to file */ NULL, /* get creation index */ NULL, /* set creation index */ - H5O_fill_new_shared_debug /*debug the message */ + H5O_fill_new_shared_debug /*debug the message */ }}; /* Format version bounds for fill value */ @@ -158,6 +158,7 @@ const unsigned H5O_fill_ver_bounds[] = { H5O_FILL_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5O_FILL_VERSION_3, /* H5F_LIBVER_V18 */ H5O_FILL_VERSION_3, /* H5F_LIBVER_V110 */ + H5O_FILL_VERSION_3, /* H5F_LIBVER_V112 */ H5O_FILL_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; @@ -176,15 +177,15 @@ H5FL_DEFINE(H5O_fill_t); /* Declare extern the free list to manage blocks of type conversion data */ H5FL_BLK_EXTERN(type_conv); - + /*------------------------------------------------------------------------- - * Function: H5O_fill_new_decode + * Function: H5O_fill_new_decode * - * Purpose: Decode a new fill value message. The new fill value + * Purpose: Decode a new fill value message. The new fill value * message is fill value plus space allocation time and * fill value writing time and whether fill value is defined. * - * Return: Success: Ptr to new message in native struct. + * Return: Success: Ptr to new message in native struct. * Failure: NULL * * Programmer: Raymond Lu @@ -197,7 +198,7 @@ H5O_fill_new_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t p_size, const uint8_t *p) { - H5O_fill_t *fill = NULL; + H5O_fill_t *fill = NULL; void *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -295,7 +296,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fill_new_decode() */ - + /*------------------------------------------------------------------------- * Function: H5O_fill_old_decode * @@ -314,7 +315,7 @@ H5O_fill_old_decode(H5F_t *f, H5O_t *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t p_size, const uint8_t *p) { - H5O_fill_t *fill = NULL; /* Decoded fill value message */ + H5O_fill_t *fill = NULL; /* Decoded fill value message */ htri_t exists = FALSE; H5T_t *dt = NULL; void *ret_value = NULL; /* Return value */ @@ -376,15 +377,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fill_old_decode() */ - + /*------------------------------------------------------------------------- - * Function: H5O_fill_new_encode + * Function: H5O_fill_new_encode * - * Purpose: Encode a new fill value message. The new fill value + * Purpose: Encode a new fill value message. The new fill value * message is fill value plus space allocation time and * fill value writing time and whether fill value is defined. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * * Programmer: Raymond Lu * Feb 26, 2002 @@ -394,7 +395,7 @@ done: static herr_t H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) { - const H5O_fill_t *fill = (const H5O_fill_t *)_fill; + const H5O_fill_t *fill = (const H5O_fill_t *)_fill; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -474,7 +475,7 @@ H5O_fill_new_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_fill_new_encode() */ - + /*------------------------------------------------------------------------- * Function: H5O_fill_old_encode * @@ -505,17 +506,17 @@ H5O_fill_old_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p, const void *_fill) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_fill_old_encode() */ - + /*------------------------------------------------------------------------- - * Function: H5O_fill_copy + * Function: H5O_fill_copy * - * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if - * necessary. The new fill value message is fill value plus - * space allocation time and fill value writing time and - * whether fill value is defined. + * Purpose: Copies a message from _MESG to _DEST, allocating _DEST if + * necessary. The new fill value message is fill value plus + * space allocation time and fill value writing time and + * whether fill value is defined. * - * Return: Success: Ptr to _DEST - * Failure: NULL + * Return: Success: Ptr to _DEST + * Failure: NULL * * Programmer: Raymond Lu * Feb 26, 2002 @@ -622,18 +623,18 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fill_copy() */ - + /*------------------------------------------------------------------------- - * Function: H5O_fill_new_size + * Function: H5O_fill_new_size * - * Purpose: Returns the size of the raw message in bytes not counting the + * Purpose: Returns the size of the raw message in bytes not counting the * message type or size fields, but only the data fields. This * function doesn't take into account alignment. The new fill * value message is fill value plus space allocation time and * fill value writing time and whether fill value is defined. * - * Return: Success: Message data size in bytes w/o alignment. - * Failure: 0 + * Return: Success: Message data size in bytes w/o alignment. + * Failure: 0 * * Programmer: Raymond Lu * Feb 26, 2002 @@ -653,26 +654,26 @@ H5O_fill_new_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill) /* Determine size for different versions */ if(fill->version < H5O_FILL_VERSION_3) { - ret_value = 1 + /* Version number */ - 1 + /* Space allocation time */ - 1 + /* Fill value write time */ - 1; /* Fill value defined */ + ret_value = 1 + /* Version number */ + 1 + /* Space allocation time */ + 1 + /* Fill value write time */ + 1; /* Fill value defined */ if(fill->fill_defined) - ret_value += 4 + /* Fill value size */ - (fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */ + ret_value += 4 + /* Fill value size */ + (fill->size > 0 ? (size_t)fill->size : 0); /* Size of fill value */ } /* end if */ else { - ret_value = 1 + /* Version number */ - 1; /* Status flags */ + ret_value = 1 + /* Version number */ + 1; /* Status flags */ if(fill->size > 0) - ret_value += 4 + /* Fill value size */ - (size_t)fill->size; /* Size of fill value */ + ret_value += 4 + /* Fill value size */ + (size_t)fill->size; /* Size of fill value */ } /* end else */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fill_new_size() */ - + /*------------------------------------------------------------------------- * Function: H5O_fill_old_size * @@ -700,15 +701,15 @@ H5O_fill_old_size(const H5F_t H5_ATTR_UNUSED *f, const void *_fill) FUNC_LEAVE_NOAPI(4 + (size_t)fill->size) } /* end H5O_fill_old_size() */ - + /*------------------------------------------------------------------------- - * Function: H5O_fill_reset_dyn + * Function: H5O_fill_reset_dyn * - * Purpose: Resets dynamic fill value fields + * Purpose: Resets dynamic fill value fields * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, January 22, 2007 * *------------------------------------------------------------------------- @@ -766,15 +767,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fill_reset_dyn() */ - + /*------------------------------------------------------------------------- - * Function: H5O__fill_reset + * Function: H5O__fill_reset * - * Purpose: Resets a message to an initial state. + * Purpose: Resets a message to an initial state. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, October 1, 1998 * *------------------------------------------------------------------------- @@ -782,7 +783,7 @@ done: static herr_t H5O__fill_reset(void *_fill) { - H5O_fill_t *fill = (H5O_fill_t *)_fill; + H5O_fill_t *fill = (H5O_fill_t *)_fill; FUNC_ENTER_STATIC_NOERR @@ -799,15 +800,15 @@ H5O__fill_reset(void *_fill) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__fill_reset() */ - + /*------------------------------------------------------------------------- - * Function: H5O__fill_free + * Function: H5O__fill_free * - * Purpose: Frees the message + * Purpose: Frees the message * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, December 5, 2002 * *------------------------------------------------------------------------- @@ -824,7 +825,7 @@ H5O__fill_free(void *fill) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__fill_free() */ - + /*------------------------------------------------------------------------- * Function: H5O__fill_pre_copy_file * @@ -842,7 +843,7 @@ static herr_t H5O__fill_pre_copy_file(H5F_t H5_ATTR_UNUSED *file_src, const void *mesg_src, hbool_t H5_ATTR_UNUSED *deleted, const H5O_copy_t *cpy_info, void H5_ATTR_UNUSED *udata) { - const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */ + const H5O_fill_t *fill_src = (const H5O_fill_t *)mesg_src; /* Source fill value */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC @@ -860,15 +861,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__fill_pre_copy_file() */ - + /*------------------------------------------------------------------------- - * Function: H5O__fill_debug + * Function: H5O__fill_debug * - * Purpose: Prints debugging info for the message. + * Purpose: Prints debugging info for the message. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, October 1, 1998 * *------------------------------------------------------------------------- @@ -950,7 +951,7 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, } /* end switch */ HDfprintf(stream, "%*s%-*s %Zd\n", indent, "", fwidth, - "Size:", fill->size); + "Size:", fill->size); HDfprintf(stream, "%*s%-*s ", indent, "", fwidth, "Data type:"); if(fill->type) { H5T_debug(fill->type, stream); @@ -962,18 +963,18 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__fill_debug() */ - + /*------------------------------------------------------------------------- - * Function: H5O_fill_convert + * Function: H5O_fill_convert * - * Purpose: Convert a fill value from whatever data type it currently has + * Purpose: Convert a fill value from whatever data type it currently has * to the specified dataset type. The `type' field of the fill * value struct will be set to NULL to indicate that it has the * same type as the dataset. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, October 1, 1998 * *------------------------------------------------------------------------- @@ -981,10 +982,10 @@ H5O__fill_debug(H5F_t H5_ATTR_UNUSED *f, const void *_fill, FILE *stream, herr_t H5O_fill_convert(H5O_fill_t *fill, H5T_t *dset_type, hbool_t *fill_changed) { - H5T_path_t *tpath; /* Type conversion info */ - void *buf = NULL, *bkg = NULL; /* Conversion buffers */ - hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */ - herr_t ret_value = SUCCEED; /* Return value */ + H5T_path_t *tpath; /* Type conversion info */ + void *buf = NULL, *bkg = NULL; /* Conversion buffers */ + hid_t src_id = -1, dst_id = -1; /* Datatype identifiers */ + herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI_NOINIT @@ -1065,7 +1066,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fill_convert() */ - + /*------------------------------------------------------------------------- * Function: H5O_fill_set_version * diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index 2a71b05..72edf11 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -15,7 +15,7 @@ * * Created: H5Ofsinfo.c * Feb 2009 - * Vailin Choi + * Vailin Choi * * Purpose: File space info message. * @@ -25,11 +25,11 @@ #include "H5Omodule.h" /* This source code file is part of the H5O module */ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ #include "H5Fpkg.h" /* File access */ -#include "H5FLprivate.h" /* Free lists */ -#include "H5Opkg.h" /* Object headers */ +#include "H5FLprivate.h" /* Free lists */ +#include "H5Opkg.h" /* Object headers */ /* PRIVATE PROTOTYPES */ static void *H5O_fsinfo_decode(H5F_t *f, H5O_t *open_oh, unsigned mesg_flags, @@ -43,26 +43,26 @@ static herr_t H5O__fsinfo_debug(H5F_t *f, const void *_mesg, FILE * stream, /* This message derives from H5O message class */ const H5O_msg_class_t H5O_MSG_FSINFO[1] = {{ - H5O_FSINFO_ID, /* message id number */ - "fsinfo", /* message name for debugging */ - sizeof(H5O_fsinfo_t), /* native message size */ - 0, /* messages are sharable? */ - H5O_fsinfo_decode, /* decode message */ - H5O_fsinfo_encode, /* encode message */ - H5O_fsinfo_copy, /* copy the native value */ - H5O_fsinfo_size, /* size of free-space manager info message */ - NULL, /* default reset method */ - H5O__fsinfo_free, /* free method */ - NULL, /* file delete method */ - NULL, /* link method */ - NULL, /* set share method */ - NULL, /* can share method */ - NULL, /* pre copy native value to file */ - NULL, /* copy native value to file */ - NULL, /* post copy native value to file */ - NULL, /* get creation index */ - NULL, /* set creation index */ - H5O__fsinfo_debug /* debug the message */ + H5O_FSINFO_ID, /* message id number */ + "fsinfo", /* message name for debugging */ + sizeof(H5O_fsinfo_t), /* native message size */ + 0, /* messages are sharable? */ + H5O_fsinfo_decode, /* decode message */ + H5O_fsinfo_encode, /* encode message */ + H5O_fsinfo_copy, /* copy the native value */ + H5O_fsinfo_size, /* size of free-space manager info message */ + NULL, /* default reset method */ + H5O__fsinfo_free, /* free method */ + NULL, /* file delete method */ + NULL, /* link method */ + NULL, /* set share method */ + NULL, /* can share method */ + NULL, /* pre copy native value to file */ + NULL, /* copy native value to file */ + NULL, /* post copy native value to file */ + NULL, /* get creation index */ + NULL, /* set creation index */ + H5O__fsinfo_debug /* debug the message */ }}; /* Format version bounds for fsinfo message */ @@ -71,6 +71,7 @@ static const unsigned H5O_fsinfo_ver_bounds[] = { H5O_INVALID_VERSION, /* H5F_LIBVER_EARLIEST */ H5O_INVALID_VERSION, /* H5F_LIBVER_V18 */ H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V110 */ + H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V112 */ H5O_FSINFO_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; #define N_FSINFO_VERSION_BOUNDS 4 @@ -78,7 +79,7 @@ static const unsigned H5O_fsinfo_ver_bounds[] = { /* Declare a free list to manage the H5O_fsinfo_t struct */ H5FL_DEFINE_STATIC(H5O_fsinfo_t); - + /*------------------------------------------------------------------------- * Function: H5O_fsinfo_decode * @@ -109,7 +110,7 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, /* Allocate space for message */ if(NULL == (fsinfo = H5FL_CALLOC(H5O_fsinfo_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") for(ptype = H5F_MEM_PAGE_SUPER; ptype < H5F_MEM_PAGE_NTYPES; H5_INC_ENUM(H5F_mem_page_t, ptype)) fsinfo->fs_addr[ptype - 1] = HADDR_UNDEF; @@ -165,7 +166,7 @@ H5O_fsinfo_decode(H5F_t *f, H5O_t H5_ATTR_UNUSED *open_oh, fsinfo->version = H5O_FSINFO_VERSION_1; fsinfo->mapped = TRUE; - + } else { HDassert(vers >= H5O_FSINFO_VERSION_1); @@ -197,7 +198,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fsinfo_decode() */ - + /*------------------------------------------------------------------------- * Function: H5O_fsinfo_encode * @@ -213,7 +214,7 @@ static herr_t H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, const void *_mesg) { const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *)_mesg; - H5F_mem_page_t ptype; /* Memory type for iteration */ + H5F_mem_page_t ptype; /* Memory type for iteration */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -223,12 +224,12 @@ H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c HDassert(fsinfo); *p++ = (uint8_t)fsinfo->version; /* message version */ - *p++ = fsinfo->strategy; /* File space strategy */ - *p++ = (unsigned char)fsinfo->persist; /* Free-space persist or not */ + *p++ = fsinfo->strategy; /* File space strategy */ + *p++ = (unsigned char)fsinfo->persist; /* Free-space persist or not */ H5F_ENCODE_LENGTH(f, p, fsinfo->threshold); /* Free-space section size threshold */ - H5F_ENCODE_LENGTH(f, p, fsinfo->page_size); /* File space page size */ - UINT16ENCODE(p, fsinfo->pgend_meta_thres); /* Page end metadata threshold */ + H5F_ENCODE_LENGTH(f, p, fsinfo->page_size); /* File space page size */ + UINT16ENCODE(p, fsinfo->pgend_meta_thres); /* Page end metadata threshold */ H5F_addr_encode(f, &p, fsinfo->eoa_pre_fsm_fsalloc); /* EOA before free-space header and section info */ /* Store addresses of free-space managers, if persisting */ @@ -241,7 +242,7 @@ H5O_fsinfo_encode(H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, uint8_t *p, c FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_fsinfo_encode() */ - + /*------------------------------------------------------------------------- * Function: H5O_fsinfo_copy * @@ -279,7 +280,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fsinfo_copy() */ - + /*------------------------------------------------------------------------- * Function: H5O_fsinfo_size * @@ -303,11 +304,11 @@ H5O_fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi FUNC_ENTER_NOAPI_NOINIT_NOERR ret_value = 3 /* Version, strategy & persist */ - + (size_t)H5F_SIZEOF_SIZE(f) /* Free-space section threshold */ - + (size_t)H5F_SIZEOF_SIZE(f) /* File space page size */ - + 2 /* Page end meta threshold */ - + (size_t)H5F_SIZEOF_ADDR(f); - + + (size_t)H5F_SIZEOF_SIZE(f) /* Free-space section threshold */ + + (size_t)H5F_SIZEOF_SIZE(f) /* File space page size */ + + 2 /* Page end meta threshold */ + + (size_t)H5F_SIZEOF_ADDR(f); + /* Free-space manager addresses */ if(fsinfo->persist) ret_value += (H5F_MEM_PAGE_NTYPES - 1) * (size_t)H5F_SIZEOF_ADDR(f); @@ -315,7 +316,7 @@ H5O_fsinfo_size(const H5F_t *f, hbool_t H5_ATTR_UNUSED disable_shared, const voi FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fsinfo_size() */ - + /*------------------------------------------------------------------------- * Function: H5O__fsinfo_free * @@ -339,7 +340,7 @@ H5O__fsinfo_free(void *mesg) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__fsinfo_free() */ - + /*------------------------------------------------------------------------- * Function: H5O_fsinfo_set_version * @@ -380,7 +381,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fsinfo_set_version() */ - + /*------------------------------------------------------------------------- * Function: H5O_fsinfo_check_version * @@ -412,7 +413,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_fsinfo_check_version() */ - + /*------------------------------------------------------------------------- * Function: H5O__fsinfo_debug * @@ -428,7 +429,7 @@ static herr_t H5O__fsinfo_debug(H5F_t H5_ATTR_UNUSED *f, const void *_mesg, FILE * stream, int indent, int fwidth) { - const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *) _mesg; + const H5O_fsinfo_t *fsinfo = (const H5O_fsinfo_t *) _mesg; H5F_mem_page_t ptype; /* Free-space types for iteration */ FUNC_ENTER_STATIC_NOERR 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 diff --git a/src/H5Opline.c b/src/H5Opline.c index eae7cd6..a956725 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -12,23 +12,23 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke <matzke@llnl.gov> - * Wednesday, April 15, 1998 + * Programmer: Robb Matzke <matzke@llnl.gov> + * Wednesday, April 15, 1998 * - * Purpose: Data filter pipeline message. + * Purpose: Data filter pipeline message. */ #include "H5Omodule.h" /* This source code file is part of the H5O module */ -#define H5Z_FRIEND /*suppress error about including H5Zpkg */ +#define H5Z_FRIEND /*suppress error about including H5Zpkg */ -#include "H5private.h" /* Generic Functions */ -#include "H5Dprivate.h" /* Datasets */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Opkg.h" /* Object headers */ -#include "H5Zpkg.h" /* Data filters */ +#include "H5private.h" /* Generic Functions */ +#include "H5Dprivate.h" /* Datasets */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Opkg.h" /* Object headers */ +#include "H5Zpkg.h" /* Data filters */ /* PRIVATE PROTOTYPES */ @@ -45,48 +45,48 @@ static herr_t H5O__pline_debug(H5F_t *f, const void *_mesg, FILE * stream, int indent, int fwidth); /* Set up & include shared message "interface" info */ -#define H5O_SHARED_TYPE H5O_MSG_PLINE -#define H5O_SHARED_DECODE H5O_pline_shared_decode -#define H5O_SHARED_DECODE_REAL H5O__pline_decode -#define H5O_SHARED_ENCODE H5O_pline_shared_encode -#define H5O_SHARED_ENCODE_REAL H5O_pline_encode -#define H5O_SHARED_SIZE H5O_pline_shared_size -#define H5O_SHARED_SIZE_REAL H5O_pline_size -#define H5O_SHARED_DELETE H5O__pline_shared_delete +#define H5O_SHARED_TYPE H5O_MSG_PLINE +#define H5O_SHARED_DECODE H5O_pline_shared_decode +#define H5O_SHARED_DECODE_REAL H5O__pline_decode +#define H5O_SHARED_ENCODE H5O_pline_shared_encode +#define H5O_SHARED_ENCODE_REAL H5O_pline_encode +#define H5O_SHARED_SIZE H5O_pline_shared_size +#define H5O_SHARED_SIZE_REAL H5O_pline_size +#define H5O_SHARED_DELETE H5O__pline_shared_delete #undef H5O_SHARED_DELETE_REAL -#define H5O_SHARED_LINK H5O__pline_shared_link +#define H5O_SHARED_LINK H5O__pline_shared_link #undef H5O_SHARED_LINK_REAL -#define H5O_SHARED_COPY_FILE H5O__pline_shared_copy_file +#define H5O_SHARED_COPY_FILE H5O__pline_shared_copy_file #undef H5O_SHARED_COPY_FILE_REAL -#define H5O_SHARED_POST_COPY_FILE H5O_pline_shared_post_copy_file +#define H5O_SHARED_POST_COPY_FILE H5O_pline_shared_post_copy_file #undef H5O_SHARED_POST_COPY_FILE_REAL #undef H5O_SHARED_POST_COPY_FILE_UPD -#define H5O_SHARED_DEBUG H5O_pline_shared_debug -#define H5O_SHARED_DEBUG_REAL H5O__pline_debug -#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ +#define H5O_SHARED_DEBUG H5O_pline_shared_debug +#define H5O_SHARED_DEBUG_REAL H5O__pline_debug +#include "H5Oshared.h" /* Shared Object Header Message Callbacks */ /* This message derives from H5O message class */ const H5O_msg_class_t H5O_MSG_PLINE[1] = {{ - H5O_PLINE_ID, /* message id number */ - "filter pipeline", /* message name for debugging */ - sizeof(H5O_pline_t), /* native message size */ - H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */ - H5O_pline_shared_decode, /* decode message */ - H5O_pline_shared_encode, /* encode message */ - H5O_pline_copy, /* copy the native value */ - H5O_pline_shared_size, /* size of raw message */ - H5O__pline_reset, /* reset method */ - H5O__pline_free, /* free method */ - H5O__pline_shared_delete, /* file delete method */ - H5O__pline_shared_link, /* link method */ - NULL, /* set share method */ - NULL, /*can share method */ - H5O_pline_pre_copy_file, /* pre copy native value to file */ - H5O__pline_shared_copy_file, /* copy native value to file */ - H5O_pline_shared_post_copy_file, /* post copy native value to file */ - NULL, /* get creation index */ - NULL, /* set creation index */ - H5O_pline_shared_debug /* debug the message */ + H5O_PLINE_ID, /* message id number */ + "filter pipeline", /* message name for debugging */ + sizeof(H5O_pline_t), /* native message size */ + H5O_SHARE_IS_SHARABLE|H5O_SHARE_IN_OHDR, /* messages are sharable? */ + H5O_pline_shared_decode, /* decode message */ + H5O_pline_shared_encode, /* encode message */ + H5O_pline_copy, /* copy the native value */ + H5O_pline_shared_size, /* size of raw message */ + H5O__pline_reset, /* reset method */ + H5O__pline_free, /* free method */ + H5O__pline_shared_delete, /* file delete method */ + H5O__pline_shared_link, /* link method */ + NULL, /* set share method */ + NULL, /*can share method */ + H5O_pline_pre_copy_file, /* pre copy native value to file */ + H5O__pline_shared_copy_file, /* copy native value to file */ + H5O_pline_shared_post_copy_file, /* post copy native value to file */ + NULL, /* get creation index */ + NULL, /* set creation index */ + H5O_pline_shared_debug /* debug the message */ }}; /* Format version bounds for filter pipleline */ @@ -94,22 +94,23 @@ const unsigned H5O_pline_ver_bounds[] = { H5O_PLINE_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5O_PLINE_VERSION_2, /* H5F_LIBVER_V18 */ H5O_PLINE_VERSION_2, /* H5F_LIBVER_V110 */ + H5O_PLINE_VERSION_2, /* H5F_LIBVER_V112 */ H5O_PLINE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; /* Declare a free list to manage the H5O_pline_t struct */ H5FL_DEFINE(H5O_pline_t); - + /*------------------------------------------------------------------------- - * Function: H5O__pline_decode + * Function: H5O__pline_decode * - * Purpose: Decodes a filter pipeline message. + * Purpose: Decodes a filter pipeline message. * - * Return: Success: Ptr to the native message. - * Failure: NULL + * Return: Success: Ptr to the native message. + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * *------------------------------------------------------------------------- @@ -119,12 +120,12 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, size_t p_size, const uint8_t *p) { - H5O_pline_t *pline = NULL; /* Pipeline message */ + H5O_pline_t *pline = NULL; /* Pipeline message */ H5Z_filter_info_t *filter; /* Filter to decode */ - size_t name_length; /* Length of filter name */ - size_t i; /* Local index variable */ + size_t name_length; /* Length of filter name */ + size_t i; /* Local index variable */ const uint8_t *p_end = p + p_size - 1; /* End of the p buffer */ - void *ret_value = NULL; /* Return value */ + void *ret_value = NULL; /* Return value */ FUNC_ENTER_STATIC @@ -204,7 +205,7 @@ H5O__pline_decode(H5F_t H5_ATTR_UNUSED *f, H5O_t H5_ATTR_UNUSED *open_oh, /* Filter parameters */ if(filter->cd_nelmts) { - size_t j; /* Local index variable */ + size_t j; /* Local index variable */ /* Allocate space for the client data elements, or use the internal buffer */ if(filter->cd_nelmts > H5Z_COMMON_CD_VALUES) { @@ -243,15 +244,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O__pline_decode() */ - + /*------------------------------------------------------------------------- - * Function: H5O_pline_encode + * Function: H5O_pline_encode * - * Purpose: Encodes message MESG into buffer P. + * Purpose: Encodes message MESG into buffer P. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * *------------------------------------------------------------------------- @@ -259,9 +260,9 @@ done: static herr_t H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg) { - const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message to encode */ + const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message to encode */ const H5Z_filter_info_t *filter; /* Filter to encode */ - size_t i, j; /* Local index variables */ + size_t i, j; /* Local index variables */ FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -273,21 +274,21 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg) *p++ = (uint8_t)pline->version; *p++ = (uint8_t)(pline->nused); if(pline->version == H5O_PLINE_VERSION_1) { - *p++ = 0; /*reserved 1*/ - *p++ = 0; /*reserved 2*/ - *p++ = 0; /*reserved 3*/ - *p++ = 0; /*reserved 4*/ - *p++ = 0; /*reserved 5*/ - *p++ = 0; /*reserved 6*/ + *p++ = 0; /*reserved 1*/ + *p++ = 0; /*reserved 2*/ + *p++ = 0; /*reserved 3*/ + *p++ = 0; /*reserved 4*/ + *p++ = 0; /*reserved 5*/ + *p++ = 0; /*reserved 6*/ } /* end if */ /* Encode filters */ for(i = 0, filter = &pline->filter[0]; i < pline->nused; i++, filter++) { - const char *name; /* Filter name */ - size_t name_length; /* Length of filter name */ + const char *name; /* Filter name */ + size_t name_length; /* Length of filter name */ /* Filter ID */ - UINT16ENCODE(p, filter->id); + UINT16ENCODE(p, filter->id); /* Skip writing the name length & name if the filter is an internal filter */ if(pline->version > H5O_PLINE_VERSION_1 && filter->id < H5Z_FILTER_RESERVED) { @@ -295,7 +296,7 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg) name = NULL; } /* end if */ else { - H5Z_class2_t *cls; /* Filter class */ + H5Z_class2_t *cls; /* Filter class */ /* * Get the filter name. If the pipeline message has a name in it then @@ -311,26 +312,26 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg) } /* end else */ /* Filter flags */ - UINT16ENCODE(p, filter->flags); + UINT16ENCODE(p, filter->flags); /* # of filter parameters */ - UINT16ENCODE(p, filter->cd_nelmts); + UINT16ENCODE(p, filter->cd_nelmts); /* Encode name, if there is one to encode */ - if(name_length > 0) { + if(name_length > 0) { /* Store name, with null terminator */ - H5MM_memcpy(p, name, name_length); - p += name_length; + H5MM_memcpy(p, name, name_length); + p += name_length; /* Pad out name to alignment, in older versions */ if(pline->version == H5O_PLINE_VERSION_1) while(name_length++ % 8) *p++ = 0; - } /* end if */ + } /* end if */ /* Filter parameters */ - for(j = 0; j < filter->cd_nelmts; j++) - UINT32ENCODE(p, filter->cd_values[j]); + for(j = 0; j < filter->cd_nelmts; j++) + UINT32ENCODE(p, filter->cd_values[j]); /* Align the parameters for older versions of the format */ if(pline->version == H5O_PLINE_VERSION_1) @@ -341,19 +342,19 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O_pline_encode() */ - + /*------------------------------------------------------------------------- - * Function: H5O_pline_copy + * Function: H5O_pline_copy * - * Purpose: Copies a filter pipeline message from SRC to DST allocating - * DST if necessary. If DST is already allocated then we assume - * that it isn't initialized. + * Purpose: Copies a filter pipeline message from SRC to DST allocating + * DST if necessary. If DST is already allocated then we assume + * that it isn't initialized. * - * Return: Success: Ptr to DST or allocated result. + * Return: Success: Ptr to DST or allocated result. * - * Failure: NULL + * Failure: NULL * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * *------------------------------------------------------------------------- @@ -361,16 +362,16 @@ H5O_pline_encode(H5F_t H5_ATTR_UNUSED *f, uint8_t *p/*out*/, const void *mesg) static void * H5O_pline_copy(const void *_src, void *_dst/*out*/) { - const H5O_pline_t *src = (const H5O_pline_t *)_src; /* Source pipeline message */ - H5O_pline_t *dst = (H5O_pline_t *)_dst; /* Destination pipeline message */ - size_t i; /* Local index variable */ - H5O_pline_t *ret_value = NULL; /* Return value */ + const H5O_pline_t *src = (const H5O_pline_t *)_src; /* Source pipeline message */ + H5O_pline_t *dst = (H5O_pline_t *)_dst; /* Destination pipeline message */ + size_t i; /* Local index variable */ + H5O_pline_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI_NOINIT /* Allocate pipeline message, if not provided */ if(!dst && NULL == (dst = H5FL_MALLOC(H5O_pline_t))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Shallow copy basic fields */ *dst = *src; @@ -379,8 +380,8 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/) dst->nalloc = dst->nused; if(dst->nalloc) { /* Allocate array to hold filters */ - if(NULL == (dst->filter = (H5Z_filter_info_t *)H5MM_calloc(dst->nalloc * sizeof(dst->filter[0])))) - HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") + if(NULL == (dst->filter = (H5Z_filter_info_t *)H5MM_calloc(dst->nalloc * sizeof(dst->filter[0])))) + HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed") /* Deep-copy filters */ for(i = 0; i < src->nused; i++) { @@ -419,7 +420,7 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/) } /* end for */ } /* end if */ else - dst->filter = NULL; + dst->filter = NULL; /* Set return value */ ret_value = dst; @@ -427,24 +428,24 @@ H5O_pline_copy(const void *_src, void *_dst/*out*/) done: if(!ret_value && dst) { H5O__pline_reset(dst); - if(!_dst) + if(!_dst) H5O__pline_free(dst); } /* end if */ FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_pline_copy() */ - + /*------------------------------------------------------------------------- - * Function: H5O_pline_size + * Function: H5O_pline_size * - * Purpose: Determines the size of a raw filter pipeline message. + * Purpose: Determines the size of a raw filter pipeline message. * - * Return: Success: Size of message. + * Return: Success: Size of message. * - * Failure: zero + * Failure: zero * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * *------------------------------------------------------------------------- @@ -452,27 +453,27 @@ done: static size_t H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg) { - const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message */ + const H5O_pline_t *pline = (const H5O_pline_t*)mesg; /* Pipeline message */ size_t i; /* Local index variable */ size_t ret_value = 0; /* Return value */ FUNC_ENTER_NOAPI_NOINIT_NOERR /* Message header */ - ret_value = (size_t)(1 + /*version */ - 1 + /*number of filters */ - (pline->version == H5O_PLINE_VERSION_1 ? 6 : 0)); /*reserved */ + ret_value = (size_t)(1 + /*version */ + 1 + /*number of filters */ + (pline->version == H5O_PLINE_VERSION_1 ? 6 : 0)); /*reserved */ /* Calculate size of each filter in pipeline */ for(i = 0; i < pline->nused; i++) { - size_t name_len; /* Length of filter name */ + size_t name_len; /* Length of filter name */ const char *name; /* Filter name */ /* Don't write the name length & name if the filter is an internal filter */ if(pline->version > H5O_PLINE_VERSION_1 && pline->filter[i].id < H5Z_FILTER_RESERVED) name_len = 0; else { - H5Z_class2_t *cls; /* Filter class */ + H5Z_class2_t *cls; /* Filter class */ /* Get the name of the filter, same as done with H5O_pline_encode() */ if(NULL == (name = pline->filter[i].name) && (cls = H5Z_find(pline->filter[i].id))) @@ -480,13 +481,13 @@ H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg) name_len = name ? HDstrlen(name) + 1 : 0; } /* end else */ - ret_value += 2 + /*filter identification number */ - (size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */ - 2 + /*flags */ - 2 + /*number of client data values */ - (pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len) : name_len); /*length of the filter name */ + ret_value += 2 + /*filter identification number */ + (size_t)((pline->version == H5O_PLINE_VERSION_1 || pline->filter[i].id >= H5Z_FILTER_RESERVED) ? 2 : 0) + /*name length */ + 2 + /*flags */ + 2 + /*number of client data values */ + (pline->version == H5O_PLINE_VERSION_1 ? (size_t)H5O_ALIGN_OLD(name_len) : name_len); /*length of the filter name */ - ret_value += pline->filter[i].cd_nelmts * 4; + ret_value += pline->filter[i].cd_nelmts * 4; if(pline->version == H5O_PLINE_VERSION_1) if(pline->filter[i].cd_nelmts % 2) ret_value += 4; @@ -495,16 +496,16 @@ H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg) FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_pline_size() */ - + /*------------------------------------------------------------------------- - * Function: H5O__pline_reset + * Function: H5O__pline_reset * - * Purpose: Resets a filter pipeline message by clearing all filters. - * The MESG buffer is not freed. + * Purpose: Resets a filter pipeline message by clearing all filters. + * The MESG buffer is not freed. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * *------------------------------------------------------------------------- @@ -512,8 +513,8 @@ H5O_pline_size(const H5F_t H5_ATTR_UNUSED *f, const void *mesg) static herr_t H5O__pline_reset(void *mesg) { - H5O_pline_t *pline = (H5O_pline_t*)mesg; /* Pipeline message */ - size_t i; /* Local index variable */ + H5O_pline_t *pline = (H5O_pline_t*)mesg; /* Pipeline message */ + size_t i; /* Local index variable */ FUNC_ENTER_STATIC_NOERR @@ -551,15 +552,15 @@ H5O__pline_reset(void *mesg) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__pline_reset() */ - + /*------------------------------------------------------------------------- - * Function: H5O__pline_free + * Function: H5O__pline_free * - * Purpose: Frees the message + * Purpose: Frees the message * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, March 11, 2000 * *------------------------------------------------------------------------- @@ -576,7 +577,7 @@ H5O__pline_free(void *mesg) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__pline_free() */ - + /*------------------------------------------------------------------------- * Function: H5O_pline_pre_copy_file * @@ -624,17 +625,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5O_pline_pre_copy_file() */ - + /*------------------------------------------------------------------------- - * Function: H5O__pline_debug + * Function: H5O__pline_debug * - * Purpose: Prints debugging information for filter pipeline message MESG - * on output stream STREAM. Each line is indented INDENT - * characters and the field name takes up FWIDTH characters. + * Purpose: Prints debugging information for filter pipeline message MESG + * on output stream STREAM. Each line is indented INDENT + * characters and the field name takes up FWIDTH characters. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, April 15, 1998 * *------------------------------------------------------------------------- @@ -643,8 +644,8 @@ static herr_t H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, int indent, int fwidth) { - const H5O_pline_t *pline = (const H5O_pline_t *)mesg; - size_t i, j; + const H5O_pline_t *pline = (const H5O_pline_t *)mesg; + size_t i, j; FUNC_ENTER_STATIC_NOERR @@ -656,48 +657,48 @@ H5O__pline_debug(H5F_t H5_ATTR_UNUSED *f, const void *mesg, FILE *stream, HDassert(fwidth >= 0); HDfprintf(stream, "%*s%-*s %Zu/%Zu\n", indent, "", fwidth, - "Number of filters:", - pline->nused, - pline->nalloc); + "Number of filters:", + pline->nused, + pline->nalloc); /* Loop over all the filters */ for(i = 0; i < pline->nused; i++) { - char name[32]; - - HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i); - HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name); - HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), - "Filter identification:", - (unsigned)(pline->filter[i].id)); - if(pline->filter[i].name) - HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3), - "Filter name:", - pline->filter[i].name); - else - HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), - "Filter name:"); - HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), - "Flags:", - pline->filter[i].flags); - HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3), - "Num CD values:", - pline->filter[i].cd_nelmts); + char name[32]; + + HDsnprintf(name, sizeof(name), "Filter at position %u", (unsigned)i); + HDfprintf(stream, "%*s%-*s\n", indent, "", fwidth, name); + HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), + "Filter identification:", + (unsigned)(pline->filter[i].id)); + if(pline->filter[i].name) + HDfprintf(stream, "%*s%-*s \"%s\"\n", indent + 3, "", MAX(0, fwidth - 3), + "Filter name:", + pline->filter[i].name); + else + HDfprintf(stream, "%*s%-*s NONE\n", indent + 3, "", MAX(0, fwidth - 3), + "Filter name:"); + HDfprintf(stream, "%*s%-*s 0x%04x\n", indent + 3, "", MAX(0, fwidth - 3), + "Flags:", + pline->filter[i].flags); + HDfprintf(stream, "%*s%-*s %Zu\n", indent + 3, "", MAX(0, fwidth - 3), + "Num CD values:", + pline->filter[i].cd_nelmts); /* Filter parameters */ - for(j = 0; j < pline->filter[i].cd_nelmts; j++) { - char field_name[32]; - - HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j); - HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), - field_name, - pline->filter[i].cd_values[j]); - } /* end for */ + for(j = 0; j < pline->filter[i].cd_nelmts; j++) { + char field_name[32]; + + HDsnprintf(field_name, sizeof(field_name), "CD value %lu", (unsigned long)j); + HDfprintf(stream, "%*s%-*s %u\n", indent + 6, "", MAX(0, fwidth - 6), + field_name, + pline->filter[i].cd_values[j]); + } /* end for */ } /* end for */ FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5O__pline_debug() */ - + /*------------------------------------------------------------------------- * Function: H5O_pline_set_version * @@ -21,15 +21,15 @@ /***********/ /* Headers */ /***********/ -#include "H5private.h" /* Generic Functions */ -#include "H5Eprivate.h" /* Error handling */ +#include "H5private.h" /* Generic Functions */ +#include "H5Eprivate.h" /* Error handling */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Fprivate.h" /* Files */ -#include "H5FLprivate.h" /* Free lists */ -#include "H5Iprivate.h" /* IDs */ -#include "H5MMprivate.h" /* Memory management */ -#include "H5Oprivate.h" /* Object headers */ -#include "H5Spkg.h" /* Dataspaces */ +#include "H5Fprivate.h" /* Files */ +#include "H5FLprivate.h" /* Free lists */ +#include "H5Iprivate.h" /* IDs */ +#include "H5MMprivate.h" /* Memory management */ +#include "H5Oprivate.h" /* Object headers */ +#include "H5Spkg.h" /* Dataspaces */ /****************/ @@ -68,6 +68,7 @@ const unsigned H5O_sdspace_ver_bounds[] = { H5O_SDSPACE_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V18 */ H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V110 */ + H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V112 */ H5O_SDSPACE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; @@ -87,18 +88,18 @@ H5FL_ARR_DEFINE(hsize_t, H5S_MAX_RANK); /* Dataspace ID class */ static const H5I_class_t H5I_DATASPACE_CLS[1] = {{ - H5I_DATASPACE, /* ID class value */ - 0, /* Class flags */ - 2, /* # of reserved IDs for class */ - (H5I_free_t)H5S_close /* Callback routine for closing objects of this class */ + H5I_DATASPACE, /* ID class value */ + 0, /* Class flags */ + 2, /* # of reserved IDs for class */ + (H5I_free_t)H5S_close /* Callback routine for closing objects of this class */ }}; /* Dataspace selection iterator ID class */ static const H5I_class_t H5I_SPACE_SEL_ITER_CLS[1] = {{ - H5I_SPACE_SEL_ITER, /* ID class value */ - 0, /* Class flags */ - 0, /* # of reserved IDs for class */ - (H5I_free_t)H5S_sel_iter_close /* Callback routine for closing objects of this class */ + H5I_SPACE_SEL_ITER, /* ID class value */ + 0, /* Class flags */ + 0, /* # of reserved IDs for class */ + (H5I_free_t)H5S_sel_iter_close /* Callback routine for closing objects of this class */ }}; @@ -106,7 +107,7 @@ static const H5I_class_t H5I_SPACE_SEL_ITER_CLS[1] = {{ static hbool_t H5S_top_package_initialize_s = FALSE; - + /*-------------------------------------------------------------------------- NAME H5S__init_package -- Initialize interface-specific information @@ -126,11 +127,11 @@ H5S__init_package(void) /* Initialize the atom group for the dataspace IDs */ if(H5I_register_type(H5I_DATASPACE_CLS) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace ID class") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace ID class") /* Initialize the atom group for the dataspace selction iterator IDs */ if(H5I_register_type(H5I_SPACE_SEL_ITER_CLS) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace selection iterator ID class") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to initialize dataspace selection iterator ID class") /* Mark "top" of interface as initialized, too */ H5S_top_package_initialize_s = TRUE; @@ -139,7 +140,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__init_package() */ - + /*-------------------------------------------------------------------------- NAME H5S_top_term_package @@ -161,22 +162,22 @@ done: int H5S_top_term_package(void) { - int n = 0; + int n = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR if(H5S_top_package_initialize_s) { - if(H5I_nmembers(H5I_DATASPACE) > 0) { - (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE); + if(H5I_nmembers(H5I_DATASPACE) > 0) { + (void)H5I_clear_type(H5I_DATASPACE, FALSE, FALSE); n++; /*H5I*/ - } /* end if */ + } /* end if */ - if(H5I_nmembers(H5I_SPACE_SEL_ITER) > 0) { - (void)H5I_clear_type(H5I_SPACE_SEL_ITER, FALSE, FALSE); + if(H5I_nmembers(H5I_SPACE_SEL_ITER) > 0) { + (void)H5I_clear_type(H5I_SPACE_SEL_ITER, FALSE, FALSE); n++; /*H5I*/ - } /* end if */ + } /* end if */ - /* Mark "top" of interface as closed */ + /* Mark "top" of interface as closed */ if(0 == n) H5S_top_package_initialize_s = FALSE; } /* end if */ @@ -184,7 +185,7 @@ H5S_top_term_package(void) FUNC_LEAVE_NOAPI(n) } /* end H5S_top_term_package() */ - + /*-------------------------------------------------------------------------- NAME H5S_term_package @@ -208,7 +209,7 @@ H5S_top_term_package(void) int H5S_term_package(void) { - int n = 0; + int n = 0; FUNC_ENTER_NOAPI_NOINIT_NOERR @@ -224,7 +225,7 @@ H5S_term_package(void) /* Destroy the dataspace selection iterator object id group */ n += (H5I_dec_type_ref(H5I_SPACE_SEL_ITER) > 0); - /* Mark interface as closed */ + /* Mark interface as closed */ if(0 == n) H5_PKG_INIT_VAR = FALSE; } /* end if */ @@ -233,7 +234,7 @@ H5S_term_package(void) } /* end H5S_term_package() */ - + /*-------------------------------------------------------------------------- NAME H5S_get_validiated_dataspace @@ -265,7 +266,7 @@ H5S_get_validated_dataspace(hid_t space_id, const H5S_t **space) /* Check for invalid ID */ if(space_id < 0) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "invalid space_id (ID cannot be a negative number)") - + /* No special dataspace struct for H5S_ALL */ if(H5S_ALL == space_id) *space = NULL; @@ -283,7 +284,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_get_validated_dataspace() */ - + /*-------------------------------------------------------------------------- NAME H5S_create @@ -361,7 +362,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_create() */ - + /*-------------------------------------------------------------------------- NAME H5Screate @@ -408,16 +409,16 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Screate() */ - + /*------------------------------------------------------------------------- - * Function: H5S__extent_release + * Function: H5S__extent_release * - * Purpose: Releases all memory associated with a dataspace extent. + * Purpose: Releases all memory associated with a dataspace extent. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Thursday, July 23, 1998 + * Programmer: Quincey Koziol + * Thursday, July 23, 1998 * *------------------------------------------------------------------------- */ @@ -439,16 +440,16 @@ H5S__extent_release(H5S_extent_t *extent) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__extent_release() */ - + /*------------------------------------------------------------------------- - * Function: H5S_close + * Function: H5S_close * - * Purpose: Releases all memory associated with a dataspace. + * Purpose: Releases all memory associated with a dataspace. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * *------------------------------------------------------------------------- */ @@ -480,16 +481,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_close() */ - + /*------------------------------------------------------------------------- - * Function: H5Sclose + * Function: H5Sclose * - * Purpose: Release access to a dataspace object. + * Purpose: Release access to a dataspace object. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * *------------------------------------------------------------------------- */ @@ -513,26 +514,26 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sclose() */ - + /*------------------------------------------------------------------------- - * Function: H5Scopy + * Function: H5Scopy * - * Purpose: Copies a dataspace. + * Purpose: Copies a dataspace. * - * Return: Success: ID of the new dataspace - * Failure: Negative + * Return: Success: ID of the new dataspace + * Failure: Negative * - * Programmer: Robb Matzke - * Friday, January 30, 1998 + * Programmer: Robb Matzke + * Friday, January 30, 1998 * *------------------------------------------------------------------------- */ hid_t H5Scopy(hid_t space_id) { - H5S_t *src; - H5S_t *dst = NULL; - hid_t ret_value; + H5S_t *src; + H5S_t *dst = NULL; + hid_t ret_value; FUNC_ENTER_API(FAIL) H5TRACE1("i", "i", space_id); @@ -557,25 +558,25 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Scopy() */ - + /*------------------------------------------------------------------------- - * Function: H5Sextent_copy + * Function: H5Sextent_copy * - * Purpose: Copies a dataspace extent. + * Purpose: Copies a dataspace extent. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Thursday, July 23, 1998 + * Programmer: Quincey Koziol + * Thursday, July 23, 1998 * *------------------------------------------------------------------------- */ herr_t H5Sextent_copy(hid_t dst_id,hid_t src_id) { - H5S_t *src; - H5S_t *dst; - herr_t ret_value = SUCCEED; + H5S_t *src; + H5S_t *dst; + herr_t ret_value = SUCCEED; FUNC_ENTER_API(FAIL) H5TRACE2("e", "ii", dst_id, src_id); @@ -594,7 +595,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sextent_copy() */ - + /*------------------------------------------------------------------------- * Function: H5S_extent_copy * @@ -631,16 +632,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_extent_copy() */ - + /*------------------------------------------------------------------------- - * Function: H5S__extent_copy_real + * Function: H5S__extent_copy_real * - * Purpose: Copies a dataspace extent + * Purpose: Copies a dataspace extent * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Wednesday, June 3, 1998 + * Programmer: Quincey Koziol + * Wednesday, June 3, 1998 * *------------------------------------------------------------------------- */ @@ -700,29 +701,29 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__extent_copy_real() */ - + /*------------------------------------------------------------------------- - * Function: H5S_copy + * Function: H5S_copy * - * Purpose: Copies a dataspace, by copying the extent and selection through + * Purpose: Copies a dataspace, by copying the extent and selection through * H5S_extent_copy and H5S_select_copy. If the SHARE_SELECTION flag * is set, then the selection can be shared between the source and * destination dataspaces. (This should only occur in situations * where the destination dataspace will immediately change to a new * selection) * - * Return: Success: A pointer to a new copy of SRC - * Failure: NULL + * Return: Success: A pointer to a new copy of SRC + * Failure: NULL * - * Programmer: Robb Matzke - * Thursday, December 4, 1997 + * Programmer: Robb Matzke + * Thursday, December 4, 1997 * *------------------------------------------------------------------------- */ H5S_t * H5S_copy(const H5S_t *src, hbool_t share_selection, hbool_t copy_max) { - H5S_t *dst = NULL; + H5S_t *dst = NULL; H5S_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -749,17 +750,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_copy() */ - + /*------------------------------------------------------------------------- - * Function: H5S_get_simple_extent_npoints + * Function: H5S_get_simple_extent_npoints * - * Purpose: Determines how many data points a dataset extent has. + * Purpose: Determines how many data points a dataset extent has. * - * Return: Success: Number of data points in the dataset extent. - * Failure: negative + * Return: Success: Number of data points in the dataset extent. + * Failure: negative * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * * Note: This routine participates in the "Inlining C function pointers" * pattern, don't call it directly, use the appropriate macro @@ -784,25 +785,25 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_get_simple_extent_npoints() */ - + /*------------------------------------------------------------------------- - * Function: H5Sget_simple_extent_npoints + * Function: H5Sget_simple_extent_npoints * - * Purpose: Determines how many data points a dataset extent has. + * Purpose: Determines how many data points a dataset extent has. * - * Return: Success: Number of data points in the dataset. - * Failure: negative + * Return: Success: Number of data points in the dataset. + * Failure: negative * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * *------------------------------------------------------------------------- */ hssize_t H5Sget_simple_extent_npoints(hid_t space_id) { - H5S_t *ds; - hssize_t ret_value; + H5S_t *ds; + hssize_t ret_value; FUNC_ENTER_API(FAIL) H5TRACE1("Hs", "i", space_id); @@ -817,30 +818,30 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sget_simple_extent_npoints() */ - + /*------------------------------------------------------------------------- - * Function: H5S_get_npoints_max + * Function: H5S_get_npoints_max * - * Purpose: Determines the maximum number of data points a dataspace may - * have. If the `max' array is null then the maximum number of - * data points is the same as the current number of data points - * without regard to the hyperslab. If any element of the `max' - * array is zero then the maximum possible size is returned. + * Purpose: Determines the maximum number of data points a dataspace may + * have. If the `max' array is null then the maximum number of + * data points is the same as the current number of data points + * without regard to the hyperslab. If any element of the `max' + * array is zero then the maximum possible size is returned. * - * Return: Success: Maximum number of data points the dataspace - * may have. - * Failure: 0 + * Return: Success: Maximum number of data points the dataspace + * may have. + * Failure: 0 * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * *------------------------------------------------------------------------- */ hsize_t H5S_get_npoints_max(const H5S_t *ds) { - unsigned u; - hsize_t ret_value = 0; /* Return value */ + unsigned u; + hsize_t ret_value = 0; /* Return value */ FUNC_ENTER_NOAPI(0) @@ -882,17 +883,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_get_npoints_max() */ - + /*------------------------------------------------------------------------- - * Function: H5Sget_simple_extent_ndims + * Function: H5Sget_simple_extent_ndims * - * Purpose: Determines the dimensionality of a dataspace. + * Purpose: Determines the dimensionality of a dataspace. * - * Return: Success: The number of dimensions in a dataspace. - * Failure: Negative + * Return: Success: The number of dimensions in a dataspace. + * Failure: Negative * - * Programmer: Robb Matzke - * Thursday, December 11, 1997 + * Programmer: Robb Matzke + * Thursday, December 11, 1997 * *------------------------------------------------------------------------- */ @@ -900,7 +901,7 @@ int H5Sget_simple_extent_ndims(hid_t space_id) { H5S_t *ds; - int ret_value; /* Return value */ + int ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE1("Is", "i", space_id); @@ -915,18 +916,18 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sget_simple_extent_ndims() */ - + /*------------------------------------------------------------------------- - * Function: H5S_get_simple_extent_ndims + * Function: H5S_get_simple_extent_ndims * - * Purpose: Returns the number of dimensions in a dataspace. + * Purpose: Returns the number of dimensions in a dataspace. * - * Return: Success: Non-negative number of dimensions. Zero - * implies a scalar. - * Failure: Negative + * Return: Success: Non-negative number of dimensions. Zero + * implies a scalar. + * Failure: Negative * - * Programmer: Robb Matzke - * Thursday, December 11, 1997 + * Programmer: Robb Matzke + * Thursday, December 11, 1997 * * Note: This routine participates in the "Inlining C function pointers" * pattern, don't call it directly, use the appropriate macro @@ -937,7 +938,7 @@ done: int H5S_get_simple_extent_ndims(const H5S_t *ds) { - int ret_value = -1; /* Return value */ + int ret_value = -1; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -961,19 +962,19 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_get_simple_extent_ndims() */ - + /*------------------------------------------------------------------------- - * Function: H5Sget_simple_extent_dims + * Function: H5Sget_simple_extent_dims * - * Purpose: Returns the size and maximum sizes in each dimension of - * a dataspace DS through the DIMS and MAXDIMS arguments. + * Purpose: Returns the size and maximum sizes in each dimension of + * a dataspace DS through the DIMS and MAXDIMS arguments. * - * Return: Success: Number of dimensions, the same value as - * returned by H5Sget_simple_extent_ndims(). - * Failure: Negative + * Return: Success: Number of dimensions, the same value as + * returned by H5Sget_simple_extent_ndims(). + * Failure: Negative * - * Programmer: Robb Matzke - * Thursday, December 11, 1997 + * Programmer: Robb Matzke + * Thursday, December 11, 1997 * *------------------------------------------------------------------------- */ @@ -982,7 +983,7 @@ H5Sget_simple_extent_dims(hid_t space_id, hsize_t dims[]/*out*/, hsize_t maxdims[]/*out*/) { H5S_t *ds; - int ret_value; /* Return value */ + int ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE3("Is", "ixx", space_id, dims, maxdims); @@ -997,26 +998,26 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sget_simple_extent_dims() */ - + /*------------------------------------------------------------------------- - * Function: H5S_extent_get_dims + * Function: H5S_extent_get_dims * - * Purpose: Returns the size in each dimension of a dataspace. This - * function may not be meaningful for all types of dataspaces. + * Purpose: Returns the size in each dimension of a dataspace. This + * function may not be meaningful for all types of dataspaces. * - * Return: Success: Number of dimensions. Zero implies scalar. - * Failure: Negative + * Return: Success: Number of dimensions. Zero implies scalar. + * Failure: Negative * - * Programmer: Quincey Koziol - * Tuesday, June 30, 2009 + * Programmer: Quincey Koziol + * Tuesday, June 30, 2009 * *------------------------------------------------------------------------- */ int H5S_extent_get_dims(const H5S_extent_t *ext, hsize_t dims[], hsize_t max_dims[]) { - int i; /* Local index variable */ - int ret_value = -1; /* Return value */ + int i; /* Local index variable */ + int ret_value = -1; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1053,25 +1054,25 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_extent_get_dims() */ - + /*------------------------------------------------------------------------- - * Function: H5S_get_simple_extent_dims + * Function: H5S_get_simple_extent_dims * - * Purpose: Returns the size in each dimension of a dataspace. This - * function may not be meaningful for all types of dataspaces. + * Purpose: Returns the size in each dimension of a dataspace. This + * function may not be meaningful for all types of dataspaces. * - * Return: Success: Number of dimensions. Zero implies scalar. - * Failure: Negative + * Return: Success: Number of dimensions. Zero implies scalar. + * Failure: Negative * - * Programmer: Robb Matzke - * Thursday, December 11, 1997 + * Programmer: Robb Matzke + * Thursday, December 11, 1997 * *------------------------------------------------------------------------- */ int H5S_get_simple_extent_dims(const H5S_t *ds, hsize_t dims[], hsize_t max_dims[]) { - int ret_value = -1; /* Return value */ + int ret_value = -1; /* Return value */ FUNC_ENTER_NOAPI(FAIL) @@ -1086,17 +1087,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_get_simple_extent_dims() */ - + /*------------------------------------------------------------------------- - * Function: H5S_write + * Function: H5S_write * - * Purpose: Updates a dataspace by writing a message to an object - * header. + * Purpose: Updates a dataspace by writing a message to an object + * header. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * *------------------------------------------------------------------------- */ @@ -1120,17 +1121,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_write() */ - + /*------------------------------------------------------------------------- - * Function: H5S_append + * Function: H5S_append * - * Purpose: Updates a dataspace by adding a message to an object - * header. + * Purpose: Updates a dataspace by adding a message to an object + * header. * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol - * Tuesday, December 31, 2002 + * Programmer: Quincey Koziol + * Tuesday, December 31, 2002 * *------------------------------------------------------------------------- */ @@ -1154,24 +1155,24 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_append() */ - + /*------------------------------------------------------------------------- - * Function: H5S_read + * Function: H5S_read * - * Purpose: Reads the dataspace from an object header. + * Purpose: Reads the dataspace from an object header. * - * Return: Success: Pointer to a new dataspace. - * Failure: NULL + * Return: Success: Pointer to a new dataspace. + * Failure: NULL * - * Programmer: Robb Matzke - * Tuesday, December 9, 1997 + * Programmer: Robb Matzke + * Tuesday, December 9, 1997 * *------------------------------------------------------------------------- */ H5S_t * H5S_read(const H5O_loc_t *loc) { - H5S_t *ds = NULL; /* Dataspace to return */ + H5S_t *ds = NULL; /* Dataspace to return */ H5S_t *ret_value = NULL; /* Return value */ FUNC_ENTER_NOAPI(NULL) @@ -1200,7 +1201,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_read() */ - + /*-------------------------------------------------------------------------- NAME H5S__is_simple @@ -1208,11 +1209,11 @@ done: Check if a dataspace is simple (internal) USAGE htri_t H5S__is_simple(sdim) - H5S_t *sdim; IN: Pointer to dataspace object to query + H5S_t *sdim; IN: Pointer to dataspace object to query RETURNS TRUE/FALSE/FAIL DESCRIPTION - This function determines the if a dataspace is "simple". ie. if it + This function determines the if a dataspace is "simple". ie. if it has orthogonal, evenly spaced dimensions. --------------------------------------------------------------------------*/ static htri_t @@ -1232,7 +1233,7 @@ H5S__is_simple(const H5S_t *sdim) FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__is_simple() */ - + /*-------------------------------------------------------------------------- NAME H5Sis_simple @@ -1240,17 +1241,17 @@ H5S__is_simple(const H5S_t *sdim) Check if a dataspace is simple USAGE htri_t H5Sis_simple(space_id) - hid_t space_id; IN: ID of dataspace object to query + hid_t space_id; IN: ID of dataspace object to query RETURNS TRUE/FALSE/FAIL DESCRIPTION - This function determines the if a dataspace is "simple". ie. if it + This function determines the if a dataspace is "simple". ie. if it has orthogonal, evenly spaced dimensions. --------------------------------------------------------------------------*/ htri_t H5Sis_simple(hid_t space_id) { - H5S_t *space; /* Dataspace to check */ + H5S_t *space; /* Dataspace to check */ htri_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) @@ -1258,7 +1259,7 @@ H5Sis_simple(hid_t space_id) /* Check args and all the boring stuff. */ if(NULL == (space = (H5S_t *)H5I_object_verify(space_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "not a dataspace") ret_value = H5S__is_simple(space); @@ -1266,7 +1267,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sis_simple() */ - + /*-------------------------------------------------------------------------- NAME H5Sset_extent_simple @@ -1274,11 +1275,11 @@ done: Sets the size of a simple dataspace USAGE herr_t H5Sset_extent_simple(space_id, rank, dims, max) - hid_t space_id; IN: Dataspace object to query - int rank; IN: # of dimensions for the dataspace + hid_t space_id; IN: Dataspace object to query + int rank; IN: # of dimensions for the dataspace const size_t *dims; IN: Size of each dimension for the dataspace - const size_t *max; IN: Maximum size of each dimension for the - dataspace + const size_t *max; IN: Maximum size of each dimension for the + dataspace RETURNS Non-negative on success/Negative on failure DESCRIPTION @@ -1297,8 +1298,8 @@ herr_t H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[/*rank*/], const hsize_t max[/*rank*/]) { - H5S_t *space; /* Dataspace to modify */ - int u; /* Local counting variable */ + H5S_t *space; /* Dataspace to modify */ + int u; /* Local counting variable */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -1325,22 +1326,22 @@ H5Sset_extent_simple(hid_t space_id, int rank, const hsize_t dims[/*rank*/], /* Do it */ if(H5S_set_extent_simple(space, (unsigned)rank, dims, max) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set simple extent") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to set simple extent") done: FUNC_LEAVE_API(ret_value) } /* end H5Sset_extent_simple() */ - + /*------------------------------------------------------------------------- - * Function: H5S_set_extent_simple + * Function: H5S_set_extent_simple * - * Purpose: This is where the real work happens for - * H5Sset_extent_simple(). + * Purpose: This is where the real work happens for + * H5Sset_extent_simple(). * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Wednesday, July 8, 1998 * *------------------------------------------------------------------------- @@ -1362,10 +1363,10 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, if(H5S__extent_release(&space->extent) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTFREE, FAIL, "failed to release previous dataspace extent") - if(rank == 0) { /* scalar variable */ + if(rank == 0) { /* scalar variable */ space->extent.type = H5S_SCALAR; space->extent.nelem = 1; - space->extent.rank = 0; /* set to scalar rank */ + space->extent.rank = 0; /* set to scalar rank */ } /* end if */ else { hsize_t nelem; /* Number of elements in extent */ @@ -1383,7 +1384,7 @@ H5S_set_extent_simple(H5S_t *space, unsigned rank, const hsize_t *dims, } /* end for */ space->extent.nelem = nelem; - /* Copy the maximum dimensions if specified. Otherwise, the maximal dimensions are the + /* Copy the maximum dimensions if specified. Otherwise, the maximal dimensions are the * same as the dimension */ space->extent.max = (hsize_t *)H5FL_ARR_MALLOC(hsize_t, (size_t)rank); if(max != NULL) @@ -1408,24 +1409,24 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_set_extent_simple() */ - + /*------------------------------------------------------------------------- - * Function: H5Screate_simple + * Function: H5Screate_simple * - * Purpose: Creates a new simple dataspace object and opens it for - * access. The DIMS argument is the size of the simple dataset - * and the MAXDIMS argument is the upper limit on the size of - * the dataset. MAXDIMS may be the null pointer in which case - * the upper limit is the same as DIMS. If an element of - * MAXDIMS is H5S_UNLIMITED then the corresponding dimension is - * unlimited, otherwise no element of MAXDIMS should be smaller - * than the corresponding element of DIMS. + * Purpose: Creates a new simple dataspace object and opens it for + * access. The DIMS argument is the size of the simple dataset + * and the MAXDIMS argument is the upper limit on the size of + * the dataset. MAXDIMS may be the null pointer in which case + * the upper limit is the same as DIMS. If an element of + * MAXDIMS is H5S_UNLIMITED then the corresponding dimension is + * unlimited, otherwise no element of MAXDIMS should be smaller + * than the corresponding element of DIMS. * - * Return: Success: The ID for the new simple dataspace object. - * Failure: Negative + * Return: Success: The ID for the new simple dataspace object. + * Failure: Negative * - * Programmer: Quincey Koziol - * Tuesday, January 27, 1998 + * Programmer: Quincey Koziol + * Tuesday, January 27, 1998 * *------------------------------------------------------------------------- */ @@ -1433,9 +1434,9 @@ hid_t H5Screate_simple(int rank, const hsize_t dims[/*rank*/], const hsize_t maxdims[/*rank*/]) { - H5S_t *space = NULL; - int i; - hid_t ret_value; /* Return value */ + H5S_t *space = NULL; + int i; + hid_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE3("i", "Is*[a0]h*[a0]h", rank, dims, maxdims); @@ -1476,17 +1477,17 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Screate_simple() */ - + /*------------------------------------------------------------------------- - * Function: H5S_create_simple + * Function: H5S_create_simple * - * Purpose: Internal function to create simple dataspace + * Purpose: Internal function to create simple dataspace * - * Return: Success: The ID for the new simple dataspace object. - * Failure: Negative + * Return: Success: The ID for the new simple dataspace object. + * Failure: Negative * - * Programmer: Quincey Koziol - * Thursday, April 3, 2003 + * Programmer: Quincey Koziol + * Thursday, April 3, 2003 * *------------------------------------------------------------------------- */ @@ -1511,19 +1512,19 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_create_simple() */ - + /*------------------------------------------------------------------------- - * Function: H5Sencode2 + * Function: H5Sencode2 * - * Purpose: Given a dataspace ID, converts the object description + * Purpose: Given a dataspace ID, converts the object description * (including selection) into binary in a buffer. - * The selection will be encoded according to the file + * The selection will be encoded according to the file * format setting in fapl. * - * Return: Success: non-negative + * Return: Success: non-negative * Failure: negative * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * slu@ncsa.uiuc.edu * July 14, 2004 * @@ -1554,18 +1555,18 @@ done: FUNC_LEAVE_API(ret_value) } /* H5Sencode2() */ - + /*------------------------------------------------------------------------- - * Function: H5S_encode + * Function: H5S_encode * - * Purpose: Private function for H5Sencode. Converts an object + * Purpose: Private function for H5Sencode. Converts an object * description for dataspace and its selection into binary * in a buffer. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * slu@ncsa.uiuc.edu * July 14, 2004 * @@ -1584,15 +1585,15 @@ H5S_encode(H5S_t *obj, unsigned char **p, size_t *nalloc) /* Allocate "fake" file structure */ if(NULL == (f = H5F_fake_alloc((uint8_t)0))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate fake file struct") /* Find out the size of buffer needed for extent */ if((extent_size = H5O_msg_raw_size(f, H5O_SDSPACE_ID, TRUE, obj)) == 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace size") /* Find out the size of buffer needed for selection */ if((sselect_size = H5S_SELECT_SERIAL_SIZE(obj)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADSIZE, FAIL, "can't find dataspace selection size") H5_CHECKED_ASSIGN(select_size, size_t, sselect_size, hssize_t); /* Verify the size of buffer. If it's not big enough, simply return the @@ -1633,17 +1634,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_encode() */ - + /*------------------------------------------------------------------------- - * Function: H5Sdecode + * Function: H5Sdecode * - * Purpose: Decode a binary object description of dataspace and + * Purpose: Decode a binary object description of dataspace and * return a new object handle. * - * Return: Success: dataspace ID(non-negative) - * Failure: negative + * Return: Success: dataspace ID(non-negative) + * Failure: negative * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * slu@ncsa.uiuc.edu * July 14, 2004 * @@ -1659,30 +1660,30 @@ H5Sdecode(const void *buf) H5TRACE1("i", "*x", buf); if(buf == NULL) - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty buffer") + HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "empty buffer") if((ds = H5S_decode((const unsigned char **)&buf)) == NULL) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, FAIL, "can't decode object") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, FAIL, "can't decode object") /* Register the type and return the ID */ if((ret_value = H5I_register(H5I_DATASPACE, ds, TRUE)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTREGISTER, FAIL, "unable to register dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTREGISTER, FAIL, "unable to register dataspace") done: FUNC_LEAVE_API(ret_value) } /* end H5Sdecode() */ - + /*------------------------------------------------------------------------- - * Function: H5S_decode + * Function: H5S_decode * - * Purpose: Private function for H5Sdecode. Reconstructs a binary + * Purpose: Private function for H5Sdecode. Reconstructs a binary * description of dataspace and returns a new object handle. * - * Return: Success: dataspace ID(non-negative) - * Failure: negative + * Return: Success: dataspace ID(non-negative) + * Failure: negative * - * Programmer: Raymond Lu + * Programmer: Raymond Lu * slu@ncsa.uiuc.edu * July 14, 2004 * @@ -1703,18 +1704,18 @@ H5S_decode(const unsigned char **p) /* Decode the type of the information */ if(*pp++ != H5O_SDSPACE_ID) - HGOTO_ERROR(H5E_DATASPACE, H5E_BADMESG, NULL, "not an encoded dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_BADMESG, NULL, "not an encoded dataspace") /* Decode the version of the dataspace information */ if(*pp++ != H5S_ENCODE_VERSION) - HGOTO_ERROR(H5E_DATASPACE, H5E_VERSION, NULL, "unknown version of encoded dataspace") + HGOTO_ERROR(H5E_DATASPACE, H5E_VERSION, NULL, "unknown version of encoded dataspace") /* Decode the "size of size" information */ sizeof_size = *pp++; /* Allocate "fake" file structure */ if(NULL == (f = H5F_fake_alloc(sizeof_size))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, NULL, "can't allocate fake file struct") /* Decode size of extent information */ UINT32DECODE(pp, extent_size); @@ -1729,7 +1730,7 @@ H5S_decode(const unsigned char **p) if(NULL == (ds = H5FL_CALLOC(H5S_t))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed for dataspace conversion path table") if(NULL == H5O_msg_copy(H5O_SDSPACE_ID, extent, &(ds->extent))) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy object") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "can't copy object") if(H5S__extent_release(extent) < 0) HGOTO_ERROR(H5E_RESOURCE, H5E_CANTDELETE, NULL, "can't release previous dataspace") extent = H5FL_FREE(H5S_extent_t, extent); @@ -1754,17 +1755,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_decode() */ - + /*------------------------------------------------------------------------- - * Function: H5S_get_simple_extent_type + * Function: H5S_get_simple_extent_type * - * Purpose: Internal function for retrieving the type of extent for a dataspace object + * Purpose: Internal function for retrieving the type of extent for a dataspace object * - * Return: Success: The class of the dataspace object - * Failure: N5S_NO_CLASS + * Return: Success: The class of the dataspace object + * Failure: N5S_NO_CLASS * - * Programmer: Quincey Koziol - * Thursday, September 28, 2000 + * Programmer: Quincey Koziol + * Thursday, September 28, 2000 * * Note: This routine participates in the "Inlining C function pointers" * pattern, don't call it directly, use the appropriate macro @@ -1775,7 +1776,7 @@ done: H5S_class_t H5S_get_simple_extent_type(const H5S_t *space) { - H5S_class_t ret_value = H5S_NO_CLASS; /* Return value */ + H5S_class_t ret_value = H5S_NO_CLASS; /* Return value */ FUNC_ENTER_NOAPI(H5S_NO_CLASS) @@ -1787,25 +1788,25 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_get_simple_extent_type() */ - + /*------------------------------------------------------------------------- - * Function: H5Sget_simple_extent_type + * Function: H5Sget_simple_extent_type * - * Purpose: Retrieves the type of extent for a dataspace object + * Purpose: Retrieves the type of extent for a dataspace object * - * Return: Success: The class of the dataspace object - * Failure: N5S_NO_CLASS + * Return: Success: The class of the dataspace object + * Failure: N5S_NO_CLASS * - * Programmer: Quincey Koziol - * Thursday, July 23, 1998 + * Programmer: Quincey Koziol + * Thursday, July 23, 1998 * *------------------------------------------------------------------------- */ H5S_class_t H5Sget_simple_extent_type(hid_t sid) { - H5S_t *space; - H5S_class_t ret_value; /* Return value */ + H5S_t *space; + H5S_class_t ret_value; /* Return value */ FUNC_ENTER_API(H5S_NO_CLASS) H5TRACE1("Sc", "i", sid); @@ -1820,7 +1821,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sget_simple_extent_type() */ - + /*-------------------------------------------------------------------------- NAME H5Sset_extent_none @@ -1828,17 +1829,17 @@ done: Resets the extent of a dataspace back to "none" USAGE herr_t H5Sset_extent_none(space_id) - hid_t space_id; IN: Dataspace object to reset + hid_t space_id; IN: Dataspace object to reset RETURNS Non-negative on success/Negative on failure DESCRIPTION - This function resets the type of a dataspace back to "none" with no + This function resets the type of a dataspace back to "none" with no extent information stored for the dataspace. --------------------------------------------------------------------------*/ herr_t H5Sset_extent_none(hid_t space_id) { - H5S_t *space; /* Dataspace to modify */ + H5S_t *space; /* Dataspace to modify */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -1858,7 +1859,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sset_extent_none() */ - + /*------------------------------------------------------------------------- * Function: H5S_set_extent * @@ -1905,7 +1906,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_set_extent() */ - + /*------------------------------------------------------------------------- * Function: H5S_has_extent * @@ -1938,7 +1939,7 @@ H5S_has_extent(const H5S_t *ds) FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_has_extent() */ - + /*------------------------------------------------------------------------- * Function: H5S_set_extent_real * @@ -1985,25 +1986,25 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_set_extent_real() */ - + /*------------------------------------------------------------------------- - * Function: H5Sextent_equal + * Function: H5Sextent_equal * - * Purpose: Determines if two dataspace extents are equal. + * Purpose: Determines if two dataspace extents are equal. * - * Return: Success: TRUE if equal, FALSE if unequal - * Failure: Negative + * Return: Success: TRUE if equal, FALSE if unequal + * Failure: Negative * - * Programmer: Quincey Koziol - * Monday, October 24, 2005 + * Programmer: Quincey Koziol + * Monday, October 24, 2005 * *------------------------------------------------------------------------- */ htri_t H5Sextent_equal(hid_t space1_id, hid_t space2_id) { - const H5S_t *ds1, *ds2; /* Dataspaces to compare */ - htri_t ret_value; /* Return value */ + const H5S_t *ds1, *ds2; /* Dataspaces to compare */ + htri_t ret_value; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("t", "ii", space1_id, space2_id); @@ -2011,17 +2012,17 @@ H5Sextent_equal(hid_t space1_id, hid_t space2_id) /* check args */ if(NULL == (ds1 = (const H5S_t *)H5I_object_verify(space1_id, H5I_DATASPACE)) || NULL == (ds2 = (const H5S_t *)H5I_object_verify(space2_id, H5I_DATASPACE))) - HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") + HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace") /* Check dataspaces for extent's equality */ if((ret_value = H5S_extent_equal(ds1, ds2)) < 0) - HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "dataspace comparison failed") + HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOMPARE, FAIL, "dataspace comparison failed") done: FUNC_LEAVE_API(ret_value) } /* end H5Sextent_equal() */ - + /*-------------------------------------------------------------------------- NAME H5S_extent_equal @@ -2029,11 +2030,11 @@ done: Check if two dataspaces have equal extents USAGE htri_t H5S_extent_equal(ds1, ds2) - H5S_t *ds1, *ds2; IN: Dataspace objects to compare + H5S_t *ds1, *ds2; IN: Dataspace objects to compare RETURNS TRUE if equal, FALSE if unequal on succeess/Negative on failure DESCRIPTION - Compare two dataspaces if their extents are identical. + Compare two dataspaces if their extents are identical. --------------------------------------------------------------------------*/ H5_ATTR_PURE htri_t H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2) @@ -2082,17 +2083,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_extent_equal() */ - + /*------------------------------------------------------------------------- - * Function: H5S_extent_nelem + * Function: H5S_extent_nelem * - * Purpose: Determines how many elements a dataset extent describes. + * Purpose: Determines how many elements a dataset extent describes. * - * Return: Success: Number of data points in the dataset extent. - * Failure: negative + * Return: Success: Number of data points in the dataset extent. + * Failure: negative * - * Programmer: Quincey Koziol - * Thursday, November 30, 2006 + * Programmer: Quincey Koziol + * Thursday, November 30, 2006 * *------------------------------------------------------------------------- */ @@ -2108,7 +2109,7 @@ H5S_extent_nelem(const H5S_extent_t *ext) FUNC_LEAVE_NOAPI(ext->nelem) } /* end H5S_extent_nelem() */ - + /*------------------------------------------------------------------------- * Function: H5S_set_version * diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 153f4be..9d19056 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -15,7 +15,7 @@ * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> * Thursday, June 18, 1998 * - * Purpose: Hyperslab selection dataspace I/O functions. + * Purpose: Hyperslab selection dataspace I/O functions. */ /****************/ @@ -30,8 +30,8 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* ID Functions */ #include "H5MMprivate.h" /* Memory management */ #include "H5Spkg.h" /* Dataspace functions */ @@ -246,6 +246,7 @@ const unsigned H5O_sds_hyper_ver_bounds[] = { H5S_HYPER_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5S_HYPER_VERSION_1, /* H5F_LIBVER_V18 */ H5S_HYPER_VERSION_2, /* H5F_LIBVER_V110 */ + H5S_HYPER_VERSION_2, /* H5F_LIBVER_V112 */ H5S_HYPER_VERSION_3 /* H5F_LIBVER_LATEST */ }; @@ -378,7 +379,7 @@ H5S__hyper_print_diminfo(FILE *f, const H5S_t *space) FUNC_LEAVE_NOAPI(SUCCEED) } - + /*-------------------------------------------------------------------------- NAME H5S__hyper_print_spans_dfs @@ -451,7 +452,7 @@ H5S__hyper_print_spans_dfs(FILE *f, const H5S_hyper_span_info_t *span_lst, FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_print_spans_dfs() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_print_space_dfs @@ -524,15 +525,15 @@ H5S__hyper_print_space_dfs(FILE *f, const H5S_t *space) } /* end H5S__hyper_print_space_dfs() */ #endif /* H5S_HYPER_DEBUG */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_get_op_gen + * Function: H5S__hyper_get_op_gen * - * Purpose: Acquire a unique operation generation value + * Purpose: Acquire a unique operation generation value * - * Return: Operation generation value (can't fail) + * Return: Operation generation value (can't fail) * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, January 19, 2019 * * Notes: Assumes that a 64-bit value will not wrap around during @@ -548,15 +549,15 @@ H5S__hyper_get_op_gen(void) FUNC_LEAVE_NOAPI(H5S_hyper_op_gen_g++); } /* end H5S__hyper_op_gen() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_iter_init + * Function: H5S__hyper_iter_init * - * Purpose: Initializes iteration information for hyperslab selection. + * Purpose: Initializes iteration information for hyperslab selection. * - * Return: Non-negative on success, negative on failure. + * Return: Non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, February 24, 2001 * * Notes: If the 'iter->elmt_size' field is set to zero, the regular @@ -721,14 +722,14 @@ H5S__hyper_iter_init(const H5S_t *space, H5S_sel_iter_t *iter) /* If this iterator is created from an API call, by default we clone the * selection now, as the dataspace could be modified or go out of scope. - * + * * However, if the H5S_SEL_ITER_SHARE_WITH_DATASPACE flag is given, * the selection is shared between the selection iterator and the * dataspace. In this case, the application _must_not_ modify or * close the dataspace that the iterator is operating on, or undefined * behavior will occur. */ - if((iter->flags & H5S_SEL_ITER_API_CALL) && + if((iter->flags & H5S_SEL_ITER_API_CALL) && !(iter->flags & H5S_SEL_ITER_SHARE_WITH_DATASPACE)) { /* Copy the span tree */ if(NULL == (iter->u.hyp.spans = H5S__hyper_copy_span(space->select.sel_info.hslab->span_lst, space->extent.rank))) @@ -787,16 +788,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_iter_init() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_iter_coords + * Function: H5S__hyper_iter_coords * - * Purpose: Retrieve the current coordinates of iterator for current + * Purpose: Retrieve the current coordinates of iterator for current * selection * - * Return: Non-negative on success, negative on failure + * Return: Non-negative on success, negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 22, 2003 * *------------------------------------------------------------------------- @@ -872,16 +873,16 @@ H5S__hyper_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_iter_coords() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_iter_block + * Function: H5S__hyper_iter_block * - * Purpose: Retrieve the current block of iterator for current + * Purpose: Retrieve the current block of iterator for current * selection * - * Return: Non-negative on success, negative on failure + * Return: Non-negative on success, negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, June 2, 2003 * * Notes: This routine assumes that the iterator is always located at @@ -922,15 +923,15 @@ H5S__hyper_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_iter_block() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_iter_nelmts + * Function: H5S__hyper_iter_nelmts * - * Purpose: Return number of elements left to process in iterator + * Purpose: Return number of elements left to process in iterator * - * Return: Non-negative number of elements on success, zero on failure + * Return: Non-negative number of elements on success, zero on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 16, 1998 * *------------------------------------------------------------------------- @@ -946,7 +947,7 @@ H5S__hyper_iter_nelmts(const H5S_sel_iter_t *iter) FUNC_LEAVE_NOAPI(iter->elmt_left) } /* end H5S__hyper_iter_nelmts() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_iter_has_next_block @@ -1002,17 +1003,17 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_iter_has_next_block() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_iter_next + * Function: H5S__hyper_iter_next * - * Purpose: Moves a hyperslab iterator to the beginning of the next sequence + * Purpose: Moves a hyperslab iterator to the beginning of the next sequence * of elements to read. Handles walking off the end in all dimensions. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, September 8, 2000 * *------------------------------------------------------------------------- @@ -1209,17 +1210,17 @@ H5S__hyper_iter_next(H5S_sel_iter_t *iter, size_t nelem) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_iter_next() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_iter_next_block + * Function: H5S__hyper_iter_next_block * - * Purpose: Moves a hyperslab iterator to the beginning of the next sequence + * Purpose: Moves a hyperslab iterator to the beginning of the next sequence * of elements to read. Handles walking off the end in all dimensions. * - * Return: Success: non-negative - * Failure: negative + * Return: Success: non-negative + * Failure: negative * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 3, 2003 * *------------------------------------------------------------------------- @@ -1384,7 +1385,7 @@ H5S__hyper_iter_next_block(H5S_sel_iter_t *iter) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_iter_next_block() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_iter_get_seq_list_gen @@ -1701,9 +1702,9 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max /* Set the location of the last span's end */ last_span_end = loc_off + span_size; - /* Move to next span in fastest changing dimension */ + /* Move to next span in fastest changing dimension */ prev_span = curr_span; - curr_span = curr_span->next; + curr_span = curr_span->next; } /* end while */ /* Check if we are done */ @@ -1749,7 +1750,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max /* Work back up through the dimensions */ while(curr_dim >= 0) { /* Reset the current span */ - curr_span = ispan[curr_dim]; + curr_span = ispan[curr_dim]; /* Increment absolute position */ abs_arr[curr_dim]++; @@ -1836,7 +1837,7 @@ H5S__hyper_iter_get_seq_list_gen(H5S_sel_iter_t *iter, size_t maxseq, size_t max FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_iter_get_seq_list_gen() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_iter_get_seq_list_opt @@ -2103,15 +2104,15 @@ H5S__hyper_iter_get_seq_list_opt(H5S_sel_iter_t *iter, size_t maxseq, size_t max /* Read in data until an entire sequence can't be written out any longer */ while(curr_rows > 0) { -#define DUFF_GUTS \ -/* Store the sequence information */ \ -off[curr_seq] = loc; \ -len[curr_seq] = actual_bytes; \ +#define DUFF_GUTS \ +/* Store the sequence information */ \ +off[curr_seq] = loc; \ +len[curr_seq] = actual_bytes; \ \ -/* Increment sequence count */ \ -curr_seq++; \ +/* Increment sequence count */ \ +curr_seq++; \ \ -/* Increment information to reflect block just processed */ \ +/* Increment information to reflect block just processed */ \ loc += fast_dim_buf_off; #ifdef NO_DUFFS_DEVICE @@ -2280,7 +2281,7 @@ loc += fast_dim_buf_off; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_iter_get_seq_list_opt() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_iter_get_seq_list_single @@ -2558,7 +2559,7 @@ H5S__hyper_iter_get_seq_list_single(H5S_sel_iter_t *iter, size_t maxseq, size_t FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_iter_get_seq_list_single() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_iter_get_seq_list @@ -2720,7 +2721,7 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_iter_get_seq_list() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_iter_release @@ -2753,7 +2754,7 @@ H5S__hyper_iter_release(H5S_sel_iter_t *iter) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_iter_release() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_new_span @@ -2801,7 +2802,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_new_span() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_new_span_info @@ -2844,7 +2845,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_new_span_info() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_copy_span_helper @@ -2939,7 +2940,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_copy_span_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_copy_span @@ -2982,7 +2983,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_copy_span() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_cmp_spans @@ -3078,7 +3079,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_cmp_spans() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_free_span_info @@ -3135,7 +3136,7 @@ H5S__hyper_free_span_info(H5S_hyper_span_info_t *span_info) FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_free_span_info() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_free_span @@ -3173,7 +3174,7 @@ H5S__hyper_free_span(H5S_hyper_span_t *span) FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_free_span() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_copy @@ -3248,7 +3249,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_copy() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_is_valid @@ -3307,7 +3308,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_is_valid() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_span_nblocks_helper @@ -3373,7 +3374,7 @@ H5S__hyper_span_nblocks_helper(H5S_hyper_span_info_t *spans, uint64_t op_gen) FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_span_nblocks_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_span_nblocks @@ -3411,7 +3412,7 @@ H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans) FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_span_nblocks() */ - + /*-------------------------------------------------------------------------- NAME H5S__get_select_hyper_nblocks @@ -3456,7 +3457,7 @@ H5S__get_select_hyper_nblocks(const H5S_t *space, hbool_t app_ref) FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__get_select_hyper_nblocks() */ - + /*-------------------------------------------------------------------------- NAME H5Sget_select_hyper_nblocks @@ -3497,7 +3498,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sget_select_hyper_nblocks() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_get_enc_size_real @@ -3533,7 +3534,7 @@ H5S__hyper_get_enc_size_real(hsize_t max_size) FUNC_LEAVE_NOAPI(ret_value) } /* H5S__hyper_get_enc_size_real() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_get_version_enc_size @@ -3544,7 +3545,7 @@ H5S__hyper_get_enc_size_real(hsize_t max_size) const H5S_t *space: IN: The dataspace hsize_t block_count: IN: The number of blocks in the selection uint32_t *version: OUT: The version to use for encoding - uint8_t *enc_size: OUT: The encoded size to use + uint8_t *enc_size: OUT: The encoded size to use RETURNS The version and the size to encode hyperslab selection info @@ -3557,7 +3558,7 @@ H5S__hyper_get_enc_size_real(hsize_t max_size) Determine the encoded size based on version: For version 3, the encoded size is determined according to: (a) regular hyperslab - (1) The maximum needed to store start/stride/count/block + (1) The maximum needed to store start/stride/count/block (2) Special handling for count/block: need to provide room for H5S_UNLIMITED (b) irregular hyperslab The maximum size needed to store: @@ -3698,7 +3699,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S__hyper_get_version_enc_size() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_serial_size @@ -3746,14 +3747,14 @@ H5S__hyper_serial_size(const H5S_t *space) * 14 + (4 * enc_size * rank) bytes */ if(H5S__hyper_is_regular(space)) - ret_value = (hssize_t)14 + + ret_value = (hssize_t)14 + ((hssize_t)4 * (hssize_t)enc_size * (hssize_t)space->extent.rank); else { /* Version 3: irregular */ /* Size required is always: * <type (4 bytes)> + <version (4 bytes)> + <flags (1 byte)> + * <size of offset info (1 byte)> + <rank (4 bytes)> + - * < # of blocks (depend on enc_size) > + + * < # of blocks (depend on enc_size) > + * (2 (starting/ending offset) * <rank> * <enc_size> * <# of blocks) = * = 14 bytes + enc_size (block_count) + (2 * enc_size * rank * block_count) bytes */ @@ -3792,7 +3793,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_serial_size() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_serialize_helper @@ -3876,7 +3877,7 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, /* Encode previous ending points */ for(u=0; u<rank; u++) UINT32ENCODE(pp, (uint32_t)end[u]); - + /* Encode starting point for this span */ UINT32ENCODE(pp, (uint32_t)curr->high); break; @@ -3913,7 +3914,7 @@ H5S__hyper_serialize_helper(const H5S_hyper_span_info_t *spans, FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_serialize_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_serialize @@ -4066,7 +4067,7 @@ H5S__hyper_serialize(const H5S_t *space, uint8_t **p) } /* end if */ else { HDassert(version == H5S_HYPER_VERSION_1); - + /* Set some convienence values */ fast_dim = ndims - 1; @@ -4100,7 +4101,7 @@ H5S__hyper_serialize(const H5S_t *space, uint8_t **p) /* Move the offset to the next sequence to start */ offset[fast_dim]+=diminfo[fast_dim].stride; - + /* Decrement the block count */ tmp_count[fast_dim]--; } /* end while */ @@ -4189,7 +4190,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_serialize() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_deserialize @@ -4350,7 +4351,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p) HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown offset info size for hyperslab") break; } /* end switch */ - + /* Select the hyperslab to the current selection */ if((ret_value = H5S_select_hyperslab(tmp_space, H5S_SELECT_SET, start, stride, count, block)) < 0) HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't change selection") @@ -4370,7 +4371,7 @@ H5S__hyper_deserialize(H5S_t **space, const uint8_t **p) case H5S_SELECT_INFO_ENC_SIZE_2: UINT16DECODE(pp, num_elem); break; - + case H5S_SELECT_INFO_ENC_SIZE_4: UINT32DECODE(pp, num_elem); break; @@ -4443,7 +4444,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_deserialize() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_span_blocklist @@ -4548,7 +4549,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_span_blocklist() */ - + /*-------------------------------------------------------------------------- NAME H5S__get_select_hyper_blocklist @@ -4730,7 +4731,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__get_select_hyper_blocklist() */ - + /*-------------------------------------------------------------------------- NAME H5Sget_select_hyper_blocklist @@ -4791,7 +4792,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sget_select_hyper_blocklist() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_bounds @@ -4872,7 +4873,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_bounds() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_offset @@ -4981,7 +4982,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_offset() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_unlim_dim @@ -5008,7 +5009,7 @@ H5S__hyper_unlim_dim(const H5S_t *space) FUNC_LEAVE_NOAPI(space->select.sel_info.hslab->unlim_dim); } /* end H5S__hyper_unlim_dim() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_num_elem_non_unlim @@ -5050,7 +5051,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_num_elem_non_unlim() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_is_contiguous @@ -5100,8 +5101,8 @@ H5S__hyper_is_contiguous(const H5S_t *space) */ /* Initialize flags */ - large_contiguous = TRUE; /* assume true and reset if the dimensions don't match */ - small_contiguous = FALSE; /* assume false initially */ + large_contiguous = TRUE; /* assume true and reset if the dimensions don't match */ + small_contiguous = FALSE; /* assume false initially */ /* Check for a "large contigous" block */ for(u = 0; u < space->extent.rank; u++) { @@ -5146,8 +5147,8 @@ H5S__hyper_is_contiguous(const H5S_t *space) * block size must be 1 in all but the fastest changing dimension. */ /* Initialize flags */ - large_contiguous = TRUE; /* assume true and reset if the dimensions don't match */ - small_contiguous = FALSE; /* assume false initially */ + large_contiguous = TRUE; /* assume true and reset if the dimensions don't match */ + small_contiguous = FALSE; /* assume false initially */ /* Get information for slowest changing information */ spans = space->select.sel_info.hslab->span_lst; @@ -5236,7 +5237,7 @@ H5S__hyper_is_contiguous(const H5S_t *space) FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_is_contiguous() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_is_single @@ -5309,7 +5310,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_is_single() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_is_regular @@ -5354,7 +5355,7 @@ H5S__hyper_is_regular(const H5S_t *space) FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_is_regular() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_spans_shape_same_helper @@ -5463,7 +5464,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_spans_shape_same_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_spans_shape_same @@ -5560,7 +5561,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_spans_shape_same() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_shape_same @@ -5706,7 +5707,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_shape_same() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_release @@ -5747,7 +5748,7 @@ H5S__hyper_release(H5S_t *space) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_release() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_coord_to_span @@ -5810,7 +5811,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_coord_to_span() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_add_span_element_helper @@ -6041,7 +6042,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_add_span_element_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_add_span_element @@ -6151,7 +6152,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_add_span_element() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_intersect_block_helper @@ -6239,7 +6240,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_intersect_block_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_intersect_block @@ -6369,7 +6370,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_intersect_block() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_adjust_u_helper @@ -6435,7 +6436,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_adjust_u_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_adjust_u @@ -6492,16 +6493,16 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_adjust_u() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_project_scalar + * Function: H5S__hyper_project_scalar * - * Purpose: Projects a single element hyperslab selection into a scalar + * Purpose: Projects a single element hyperslab selection into a scalar * dataspace * - * Return: Non-negative on success, negative on failure. + * Return: Non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -6568,16 +6569,16 @@ H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_project_scalar() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_project_simple_lower + * Function: H5S__hyper_project_simple_lower * - * Purpose: Projects a hyperslab selection onto/into a simple dataspace + * Purpose: Projects a hyperslab selection onto/into a simple dataspace * of a lower rank * - * Return: Non-negative on success, negative on failure. + * Return: Non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -6615,16 +6616,16 @@ H5S__hyper_project_simple_lower(const H5S_t *base_space, H5S_t *new_space) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__hyper_project_simple_lower() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_project_simple_higher + * Function: H5S__hyper_project_simple_higher * - * Purpose: Projects a hyperslab selection onto/into a simple dataspace + * Purpose: Projects a hyperslab selection onto/into a simple dataspace * of a higher rank * - * Return: Non-negative on success, negative on failure. + * Return: Non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -6715,16 +6716,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_project_simple_higher() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_project_simple + * Function: H5S__hyper_project_simple * - * Purpose: Projects a hyperslab selection onto/into a simple dataspace + * Purpose: Projects a hyperslab selection onto/into a simple dataspace * of a different rank * - * Return: Non-negative on success, negative on failure. + * Return: Non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -6889,7 +6890,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_project_simple() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_adjust_s_helper @@ -6955,7 +6956,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_adjust_s_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_adjust_s @@ -7066,7 +7067,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Shyper_adjust_s() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_normalize_offset @@ -7124,7 +7125,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_normalize_offset() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_denormalize_offset @@ -7168,7 +7169,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_denormalize_offset() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_append_span @@ -7306,7 +7307,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_append_span() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_clip_spans @@ -7902,7 +7903,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_clip_spans() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_merge_spans_helper @@ -8218,7 +8219,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_merge_spans_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_merge_spans @@ -8273,7 +8274,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_merge_spans() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_spans_nelem_helper @@ -8344,7 +8345,7 @@ H5S__hyper_spans_nelem_helper(H5S_hyper_span_info_t *spans, uint64_t op_gen) FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_spans_nelem_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_spans_nelem @@ -8382,7 +8383,7 @@ H5S__hyper_spans_nelem(H5S_hyper_span_info_t *spans) FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_spans_nelem() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_add_disjoint_spans @@ -8431,7 +8432,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_add_disjoint_spans */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_make_spans @@ -8580,7 +8581,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_make_spans() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_update_diminfo @@ -8798,7 +8799,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_update_diminfo() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_rebuild_helper @@ -8909,7 +8910,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_rebuild_helper() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_rebuild @@ -8959,7 +8960,7 @@ H5S__hyper_rebuild(H5S_t *space) FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_rebuild() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_generate_spans @@ -9018,7 +9019,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_generate_spans() */ - + /*-------------------------------------------------------------------------- NAME H5S__check_spans_overlap @@ -9099,7 +9100,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__check_spans_overlap() */ - + /*-------------------------------------------------------------------------- NAME H5S__fill_in_new_space @@ -9398,15 +9399,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__fill_in_new_space() */ - + /*------------------------------------------------------------------------- - * Function: H5S__generate_hyperlab + * Function: H5S__generate_hyperlab * - * Purpose: Generate hyperslab information from H5S_select_hyperslab() + * Purpose: Generate hyperslab information from H5S_select_hyperslab() * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, September 12, 2000 * *------------------------------------------------------------------------- @@ -9488,15 +9489,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__generate_hyperslab() */ - + /*------------------------------------------------------------------------- - * Function: H5S__set_regular_hyperslab + * Function: H5S__set_regular_hyperslab * - * Purpose: Set a regular hyperslab + * Purpose: Set a regular hyperslab * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Thursday, October 2, 2014 * *------------------------------------------------------------------------- @@ -9584,19 +9585,19 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__set_regular_hyperslab() */ - + /*------------------------------------------------------------------------- - * Function: H5S__hyper_regular_and_single_block + * Function: H5S__hyper_regular_and_single_block * - * Purpose: Optimized routine to perform "AND" operation of a single - * block against a regular hyperslab selection. + * Purpose: Optimized routine to perform "AND" operation of a single + * block against a regular hyperslab selection. * - * Note: This algorithm is invoked when constructing the chunk map + * Note: This algorithm is invoked when constructing the chunk map * and a regular hyperslab is selected in the file's dataspace. * - * Return: Non-negative on success / Negative on failure + * Return: Non-negative on success / Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, February 9, 2019 * *------------------------------------------------------------------------- @@ -9818,15 +9819,15 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_regular_and_single_block() */ - + /*------------------------------------------------------------------------- - * Function: H5S_select_hyperslab + * Function: H5S_select_hyperslab * - * Purpose: Internal version of H5Sselect_hyperslab(). + * Purpose: Internal version of H5Sselect_hyperslab(). * - * Return: Non-negative on success/Negative on failure + * Return: Non-negative on success/Negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Wednesday, January 10, 2001 * *------------------------------------------------------------------------- @@ -10136,7 +10137,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_hyperslab() */ - + /*-------------------------------------------------------------------------- NAME H5Sselect_hyperslab @@ -10200,7 +10201,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sselect_hyperslab() */ - + /*-------------------------------------------------------------------------- NAME H5S_combine_hyperslab @@ -10406,16 +10407,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_combine_hyperslab() */ - + /*------------------------------------------------------------------------- - * Function: H5S__fill_in_select + * Function: H5S__fill_in_select * - * Purpose: Combines two hyperslabs with an operation, putting the + * Purpose: Combines two hyperslabs with an operation, putting the * result into a third hyperslab selection * - * Return: Non-negative on success/negative on failure + * Return: Non-negative on success/negative on failure * - * Programmer: Chao Mei + * Programmer: Chao Mei * Tuesday, July 5, 2011 * *------------------------------------------------------------------------- @@ -10459,7 +10460,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__fill_in_select() */ - + /*-------------------------------------------------------------------------- NAME H5Scombine_hyperslab @@ -10493,9 +10494,9 @@ hid_t H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], const hsize_t stride[], const hsize_t count[], const hsize_t block[]) { - H5S_t *space; /* Dataspace to modify selection of */ - H5S_t *new_space = NULL; /* New dataspace created */ - hid_t ret_value; /* Return value */ + H5S_t *space; /* Dataspace to modify selection of */ + H5S_t *new_space = NULL; /* New dataspace created */ + hid_t ret_value; /* Return value */ FUNC_ENTER_API(H5I_INVALID_HID) H5TRACE6("i", "iSs*h*h*h*h", space_id, op, start, stride, count, block); @@ -10523,15 +10524,15 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Scombine_hyperslab() */ - + /*------------------------------------------------------------------------- - * Function: H5S__combine_select + * Function: H5S__combine_select * - * Purpose: Internal version of H5Scombine_select(). + * Purpose: Internal version of H5Scombine_select(). * - * Return: New dataspace on success/NULL on failure + * Return: New dataspace on success/NULL on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, October 30, 2001 * *------------------------------------------------------------------------- @@ -10591,7 +10592,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__combine_select() */ - + /*-------------------------------------------------------------------------- NAME H5Scombine_select @@ -10617,10 +10618,10 @@ done: hid_t H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id) { - H5S_t *space1; /* First Dataspace */ - H5S_t *space2; /* Second Dataspace */ - H5S_t *new_space = NULL; /* New Dataspace */ - hid_t ret_value; /* Return value */ + H5S_t *space1; /* First Dataspace */ + H5S_t *space2; /* Second Dataspace */ + H5S_t *new_space = NULL; /* New Dataspace */ + hid_t ret_value; /* Return value */ FUNC_ENTER_API(H5I_INVALID_HID) H5TRACE3("i", "iSsi", space1_id, op, space2_id); @@ -10666,15 +10667,15 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Scombine_select() */ - + /*------------------------------------------------------------------------- - * Function: H5S__modify_select + * Function: H5S__modify_select * - * Purpose: Internal version of H5Smodify_select(). + * Purpose: Internal version of H5Smodify_select(). * - * Return: New dataspace on success/NULL on failure + * Return: New dataspace on success/NULL on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, October 30, 2001 * *------------------------------------------------------------------------- @@ -10726,7 +10727,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__modify_select() */ - + /*-------------------------------------------------------------------------- NAME H5Smodify_select @@ -10752,8 +10753,8 @@ done: herr_t H5Smodify_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id) { - H5S_t *space1; /* First Dataspace */ - H5S_t *space2; /* Second Dataspace */ + H5S_t *space1; /* First Dataspace */ + H5S_t *space2; /* Second Dataspace */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) @@ -10808,7 +10809,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Smodify_select() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_proj_int_build_proj @@ -11130,7 +11131,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_proj_int_build_proj() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_proj_int_iterate @@ -11381,7 +11382,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_proj_int_iterate() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_project_intersection @@ -11567,7 +11568,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_project_intersection() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_get_clip_diminfo @@ -11622,7 +11623,7 @@ H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, FUNC_LEAVE_NOAPI_VOID } /* end H5S__hyper_get_clip_diminfo() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_clip_unlim @@ -11748,7 +11749,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_clip_unlim() */ - + /*-------------------------------------------------------------------------- NAME H5S__hyper_get_clip_extent_real @@ -11830,7 +11831,7 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__hyper_get_clip_extent_real() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_get_clip_extent @@ -11893,7 +11894,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_clip_extent() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_get_clip_extent_match @@ -11983,7 +11984,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_clip_extent_match() */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_get_unlim_block @@ -12066,7 +12067,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_unlim_block */ - + /*-------------------------------------------------------------------------- NAME H5S_hyper_get_first_inc_block @@ -12134,7 +12135,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_hyper_get_first_inc_block */ - + /*-------------------------------------------------------------------------- NAME H5Sis_regular_hyperslab @@ -12176,7 +12177,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sis_regular_hyperslab() */ - + /*-------------------------------------------------------------------------- NAME H5Sget_regular_hyperslab diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 8e1175a..1a2cbff 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -15,7 +15,7 @@ * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu> * Tuesday, June 16, 1998 * - * Purpose: Point selection dataspace I/O functions. + * Purpose: Point selection dataspace I/O functions. */ /****************/ @@ -30,8 +30,8 @@ /***********/ #include "H5private.h" /* Generic Functions */ #include "H5CXprivate.h" /* API Contexts */ -#include "H5Eprivate.h" /* Error handling */ -#include "H5FLprivate.h" /* Free Lists */ +#include "H5Eprivate.h" /* Error handling */ +#include "H5FLprivate.h" /* Free Lists */ #include "H5Iprivate.h" /* ID Functions */ #include "H5MMprivate.h" /* Memory management */ #include "H5Spkg.h" /* Dataspace functions */ @@ -138,6 +138,7 @@ const unsigned H5O_sds_point_ver_bounds[] = { H5S_POINT_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5S_POINT_VERSION_1, /* H5F_LIBVER_V18 */ H5S_POINT_VERSION_1, /* H5F_LIBVER_V110 */ + H5S_POINT_VERSION_1, /* H5F_LIBVER_V112 */ H5S_POINT_VERSION_2 /* H5F_LIBVER_LATEST */ }; @@ -167,15 +168,15 @@ H5FL_BARR_DEFINE_STATIC(H5S_pnt_node_t, hcoords_t, H5S_MAX_RANK); H5FL_DEFINE_STATIC(H5S_pnt_list_t); - + /*------------------------------------------------------------------------- - * Function: H5S__point_iter_init + * Function: H5S__point_iter_init * - * Purpose: Initializes iteration information for point selection. + * Purpose: Initializes iteration information for point selection. * - * Return: Non-negative on success, negative on failure. + * Return: Non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 16, 1998 * *------------------------------------------------------------------------- @@ -193,14 +194,14 @@ H5S__point_iter_init(const H5S_t *space, H5S_sel_iter_t *iter) /* If this iterator is created from an API call, by default we clone the * selection now, as the dataspace could be modified or go out of scope. - * + * * However, if the H5S_SEL_ITER_SHARE_WITH_DATASPACE flag is given, * the selection is shared between the selection iterator and the * dataspace. In this case, the application _must_not_ modify or * close the dataspace that the iterator is operating on, or undefined * behavior will occur. */ - if((iter->flags & H5S_SEL_ITER_API_CALL) && + if((iter->flags & H5S_SEL_ITER_API_CALL) && !(iter->flags & H5S_SEL_ITER_SHARE_WITH_DATASPACE)) { /* Copy the point list */ if(NULL == (iter->u.pnt.pnt_lst = H5S__copy_pnt_list(space->select.sel_info.pnt_lst, space->extent.rank))) @@ -220,16 +221,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_iter_init() */ - + /*------------------------------------------------------------------------- - * Function: H5S__point_iter_coords + * Function: H5S__point_iter_coords * - * Purpose: Retrieve the current coordinates of iterator for current + * Purpose: Retrieve the current coordinates of iterator for current * selection * - * Return: Non-negative on success, negative on failure + * Return: Non-negative on success, negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, April 22, 2003 * *------------------------------------------------------------------------- @@ -249,16 +250,16 @@ H5S__point_iter_coords(const H5S_sel_iter_t *iter, hsize_t *coords) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__point_iter_coords() */ - + /*------------------------------------------------------------------------- - * Function: H5S__point_iter_block + * Function: H5S__point_iter_block * - * Purpose: Retrieve the current block of iterator for current + * Purpose: Retrieve the current block of iterator for current * selection * - * Return: Non-negative on success, negative on failure + * Return: Non-negative on success, negative on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Monday, June 2, 2003 * *------------------------------------------------------------------------- @@ -280,15 +281,15 @@ H5S__point_iter_block(const H5S_sel_iter_t *iter, hsize_t *start, hsize_t *end) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__point_iter_block() */ - + /*------------------------------------------------------------------------- - * Function: H5S__point_iter_nelmts + * Function: H5S__point_iter_nelmts * - * Purpose: Return number of elements left to process in iterator + * Purpose: Return number of elements left to process in iterator * - * Return: Non-negative number of elements on success, zero on failure + * Return: Non-negative number of elements on success, zero on failure * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, June 16, 1998 * *------------------------------------------------------------------------- @@ -304,7 +305,7 @@ H5S__point_iter_nelmts(const H5S_sel_iter_t *iter) FUNC_LEAVE_NOAPI(iter->elmt_left) } /* end H5S__point_iter_nelmts() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_iter_has_next_block @@ -340,7 +341,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_iter_has_next_block() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_iter_next @@ -377,7 +378,7 @@ H5S__point_iter_next(H5S_sel_iter_t *iter, size_t nelem) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__point_iter_next() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_iter_next_block @@ -409,7 +410,7 @@ H5S__point_iter_next_block(H5S_sel_iter_t *iter) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__point_iter_next_block() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_iter_get_seq_list @@ -446,9 +447,9 @@ H5S__point_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem size_t io_left; /* The number of bytes left in the selection */ size_t start_io_left; /* The initial number of bytes left in the selection */ H5S_pnt_node_t *node; /* Point node */ - unsigned ndims; /* Dimensionality of dataspace*/ - hsize_t acc; /* Coordinate accumulator */ - hsize_t loc; /* Coordinate offset */ + unsigned ndims; /* Dimensionality of dataspace*/ + hsize_t acc; /* Coordinate accumulator */ + hsize_t loc; /* Coordinate offset */ size_t curr_seq; /* Current sequence being operated on */ int i; /* Local index variable */ herr_t ret_value = SUCCEED; /* return value */ @@ -540,7 +541,7 @@ H5S__point_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_iter_get_seq_list() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_iter_release @@ -567,14 +568,14 @@ H5S__point_iter_release(H5S_sel_iter_t * iter) HDassert(iter); /* If this iterator copied the point list, we must free it */ - if((iter->flags & H5S_SEL_ITER_API_CALL) && + if((iter->flags & H5S_SEL_ITER_API_CALL) && !(iter->flags & H5S_SEL_ITER_SHARE_WITH_DATASPACE)) H5S__free_pnt_list(iter->u.pnt.pnt_lst); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__point_iter_release() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_add @@ -691,7 +692,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_add() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_release @@ -729,7 +730,7 @@ H5S__point_release(H5S_t *space) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__point_release() */ - + /*-------------------------------------------------------------------------- NAME H5S_select_elements @@ -799,7 +800,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S_select_elements() */ - + /*-------------------------------------------------------------------------- NAME H5S__copy_pnt_list @@ -875,7 +876,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__copy_pnt_list() */ - + /*-------------------------------------------------------------------------- NAME H5S__free_pnt_list @@ -917,7 +918,7 @@ H5S__free_pnt_list(H5S_pnt_list_t *pnt_lst) FUNC_LEAVE_NOAPI_VOID } /* end H5S__free_pnt_list() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_copy @@ -957,7 +958,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_copy() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_is_valid @@ -1001,7 +1002,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_is_valid() */ - + /*-------------------------------------------------------------------------- NAME H5Sget_select_elem_npoints @@ -1040,7 +1041,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sget_select_elem_npoints() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_get_version_enc_size @@ -1060,7 +1061,7 @@ done: (2) whether the number of points or selection high bounds exceeds H5S_UINT32_MAX or not Determine the encoded size based on version: - --For version 2, the encoded size of point selection info is determined + --For version 2, the encoded size of point selection info is determined by the maximum size for: (a) storing the number of points (b) storing the selection high bounds @@ -1158,7 +1159,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* H5S__point_get_version_enc_size() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_serial_size @@ -1196,19 +1197,19 @@ H5S__point_serial_size(const H5S_t *space) /* Basic number of bytes required to serialize point selection: */ if(version >= H5S_POINT_VERSION_2) /* - * <type (4 bytes)> + <version (4 bytes)> + + * <type (4 bytes)> + <version (4 bytes)> + * <size of point info (1 byte)> + rank (4 bytes)> */ ret_value=13; - else + else /* * <type (4 bytes)> + <version (4 bytes)> + <padding (4 bytes)> + - * <length (4 bytes)> + <rank (4 bytes)> + * <length (4 bytes)> + <rank (4 bytes)> */ ret_value = 20; /* <num points (depend on enc_size)> */ - ret_value += enc_size; + ret_value += enc_size; /* Count points in selection */ ret_value += (hssize_t) (enc_size * space->extent.rank * space->select.num_elem); @@ -1217,7 +1218,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_serial_size() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_serialize @@ -1350,7 +1351,7 @@ done: } /* H5S__point_serialize() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_deserialize @@ -1440,13 +1441,13 @@ H5S__point_deserialize(H5S_t **space, const uint8_t **p) /* decode the number of points */ switch(enc_size) { case H5S_SELECT_INFO_ENC_SIZE_2: - UINT16DECODE(pp, num_elem); + UINT16DECODE(pp, num_elem); break; case H5S_SELECT_INFO_ENC_SIZE_4: UINT32DECODE(pp, num_elem); break; case H5S_SELECT_INFO_ENC_SIZE_8: - UINT64DECODE(pp, num_elem); + UINT64DECODE(pp, num_elem); break; default: HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL, "unknown point info size") @@ -1502,7 +1503,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_deserialize() */ - + /*-------------------------------------------------------------------------- NAME H5S__get_select_elem_pointlist @@ -1567,7 +1568,7 @@ H5S__get_select_elem_pointlist(const H5S_t *space, hsize_t startpoint, FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__get_select_elem_pointlist() */ - + /*-------------------------------------------------------------------------- NAME H5Sget_select_elem_pointlist @@ -1621,7 +1622,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Sget_select_elem_pointlist() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_bounds @@ -1679,7 +1680,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_bounds() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_offset @@ -1743,7 +1744,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_offset() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_unlim_dim @@ -1772,7 +1773,7 @@ H5S__point_unlim_dim(const H5S_t H5_ATTR_UNUSED *space) FUNC_LEAVE_NOAPI(-1) } /* end H5S__point_unlim_dim() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_is_contiguous @@ -1805,14 +1806,14 @@ H5S__point_is_contiguous(const H5S_t *space) /* One point is definitely contiguous */ if(space->select.num_elem == 1) - ret_value = TRUE; - else /* More than one point might be contiguous, but it's complex to check and we don't need it right now */ - ret_value = FALSE; + ret_value = TRUE; + else /* More than one point might be contiguous, but it's complex to check and we don't need it right now */ + ret_value = FALSE; FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_is_contiguous() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_is_single @@ -1842,14 +1843,14 @@ H5S__point_is_single(const H5S_t *space) /* One point is definitely 'single' :-) */ if(space->select.num_elem == 1) - ret_value = TRUE; + ret_value = TRUE; else - ret_value = FALSE; + ret_value = FALSE; FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_is_single() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_is_regular @@ -1883,14 +1884,14 @@ H5S__point_is_regular(const H5S_t *space) /* Only simple check for regular points for now... */ if(space->select.num_elem == 1) - ret_value = TRUE; + ret_value = TRUE; else - ret_value = FALSE; + ret_value = FALSE; FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_is_regular() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_shape_same @@ -1998,7 +1999,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_shape_same() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_intersect_block @@ -2055,7 +2056,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_intersect_block() */ - + /*-------------------------------------------------------------------------- NAME H5S__point_adjust_u @@ -2112,16 +2113,16 @@ H5S__point_adjust_u(H5S_t *space, const hsize_t *offset) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5S__point_adjust_u() */ - + /*------------------------------------------------------------------------- - * Function: H5S__point_project_scalar + * Function: H5S__point_project_scalar * - * Purpose: Projects a single element point selection into a scalar + * Purpose: Projects a single element point selection into a scalar * dataspace * - * Return: Non-negative on success, negative on failure. + * Return: Non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -2152,16 +2153,16 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_project_scalar() */ - + /*------------------------------------------------------------------------- - * Function: H5S__point_project_simple + * Function: H5S__point_project_simple * - * Purpose: Projects a point selection onto/into a simple dataspace + * Purpose: Projects a point selection onto/into a simple dataspace * of a different rank * - * Return: Non-negative on success, negative on failure. + * Return: Non-negative on success, negative on failure. * - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Sunday, July 18, 2010 * *------------------------------------------------------------------------- @@ -2288,7 +2289,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5S__point_project_simple() */ - + /*-------------------------------------------------------------------------- NAME H5Sselect_elements @@ -514,6 +514,7 @@ const unsigned H5O_dtype_ver_bounds[] = { H5O_DTYPE_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V18 */ H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V110 */ + H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V112 */ H5O_DTYPE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; @@ -550,7 +551,7 @@ static const H5I_class_t H5I_DATATYPE_CLS[1] = {{ static hbool_t H5T_top_package_initialize_s = FALSE; - + /*------------------------------------------------------------------------- * Function: H5T_init * @@ -576,7 +577,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_init() */ - + /*------------------------------------------------------------------------- * Function: H5T__init_inf * @@ -689,7 +690,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__init_inf() */ - + /*-------------------------------------------------------------------------- NAME H5T__init_package -- Initialize interface-specific information @@ -1313,7 +1314,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__init_package() */ - + /*------------------------------------------------------------------------- * Function: H5T__unlock_cb * @@ -1346,7 +1347,7 @@ H5T__unlock_cb(void *_dt, hid_t H5_ATTR_UNUSED id, void *_udata) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5T__unlock_cb() */ - + /*------------------------------------------------------------------------- * Function: H5T_top_term_package * @@ -1547,7 +1548,7 @@ H5T_top_term_package(void) FUNC_LEAVE_NOAPI(n) } /* end H5T_top_term_package() */ - + /*------------------------------------------------------------------------- * Function: H5T_term_package * @@ -1589,7 +1590,7 @@ H5T_term_package(void) FUNC_LEAVE_NOAPI(n) } /* end H5T_term_package() */ - + /*------------------------------------------------------------------------- * Function: H5T__close_cb * @@ -1632,7 +1633,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__close_cb() */ - + /*------------------------------------------------------------------------- * Function: H5Tcreate * @@ -1677,7 +1678,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tcreate() */ - + /*------------------------------------------------------------------------- * Function: H5Tcopy * @@ -1777,7 +1778,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tcopy() */ - + /*------------------------------------------------------------------------- * Function: H5Tclose * @@ -1812,7 +1813,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tclose() */ - + /*------------------------------------------------------------------------- * Function: H5Tequal * @@ -1849,7 +1850,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tequal() */ - + /*------------------------------------------------------------------------- * Function: H5Tlock * @@ -1896,7 +1897,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tlock() */ - + /*------------------------------------------------------------------------- * Function: H5Tget_class * @@ -1931,7 +1932,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tget_class() */ - + /*------------------------------------------------------------------------- * Function: H5T_get_class * @@ -1973,7 +1974,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_get_class() */ - + /*------------------------------------------------------------------------- * Function: H5Tdetect_class * @@ -2009,7 +2010,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tdetect_class() */ - + /*------------------------------------------------------------------------- * Function: H5T_detect_class * @@ -2085,7 +2086,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_detect_class() */ - + /*------------------------------------------------------------------------- * Function: H5Tis_variable_str * @@ -2119,7 +2120,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tis_variable_str() */ - + /*------------------------------------------------------------------------- * Function: H5T_is_variable_str * @@ -2140,7 +2141,7 @@ H5T_is_variable_str(const H5T_t *dt) FUNC_LEAVE_NOAPI(H5T_IS_VL_STRING(dt->shared)) } /* end H5T_is_variable_str() */ - + /*------------------------------------------------------------------------- * Function: H5Tget_size * @@ -2177,7 +2178,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tget_size() */ - + /*------------------------------------------------------------------------- * Function: H5Tset_size * @@ -2233,7 +2234,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tset_size() */ - + /*------------------------------------------------------------------------- * Function: H5Tget_super * @@ -2273,7 +2274,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tget_super() */ - + /*------------------------------------------------------------------------- * Function: H5T_get_super * @@ -2307,7 +2308,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_get_super() */ - + /*------------------------------------------------------------------------- * Function: H5T__register_int * @@ -2347,7 +2348,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__register_int() */ - + /*------------------------------------------------------------------------- * Function: H5T__register * @@ -2531,7 +2532,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__register() */ - + /*------------------------------------------------------------------------- * Function: H5Tregister * @@ -2587,7 +2588,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tregister() */ - + /*------------------------------------------------------------------------- * Function: H5T__unregister * @@ -2691,7 +2692,7 @@ H5T__unregister(H5T_pers_t pers, const char *name, H5T_t *src, H5T_t *dst, FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5T__unregister() */ - + /*------------------------------------------------------------------------- * Function: H5Tunregister * @@ -2731,7 +2732,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tunregister() */ - + /*------------------------------------------------------------------------- * Function: H5Tfind * @@ -2781,7 +2782,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tfind() */ - + /*------------------------------------------------------------------------- * Function: H5Tcompiler_conv * @@ -2821,7 +2822,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tcompiler_conv() */ - + /*------------------------------------------------------------------------- * Function: H5Tconvert * @@ -2880,7 +2881,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tconvert() */ - + /*------------------------------------------------------------------------- * Function: H5Tencode * @@ -2919,7 +2920,7 @@ done: FUNC_LEAVE_API(ret_value) } /* end H5Tencode() */ - + /*------------------------------------------------------------------------- * Function: H5Tdecode * @@ -2974,7 +2975,7 @@ done: *------------------------------------------------------------------------- */ - + /*------------------------------------------------------------------------- * Function: H5T_encode * @@ -3030,7 +3031,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_encode() */ - + /*------------------------------------------------------------------------- * Function: H5T_decode * @@ -3084,7 +3085,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_decode() */ - + /*------------------------------------------------------------------------- * Function: H5T__create * @@ -3216,7 +3217,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__create() */ - + /*------------------------------------------------------------------------- * Function: H5T_copy * @@ -3506,7 +3507,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_copy() */ - + /*------------------------------------------------------------------------- * Function: H5T_lock * @@ -3553,7 +3554,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5T__alloc * @@ -3603,7 +3604,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__alloc() */ - + /*------------------------------------------------------------------------- * Function: H5T__free * @@ -3683,7 +3684,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__free() */ - + /*------------------------------------------------------------------------- * Function: H5T_close_real * @@ -3727,7 +3728,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_close_real() */ - + /*------------------------------------------------------------------------- * Function: H5T_close * @@ -3812,7 +3813,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_close() */ - + /*------------------------------------------------------------------------- * Function: H5T__set_size * @@ -4012,7 +4013,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__set_size() */ - + /*------------------------------------------------------------------------- * Function: H5T_get_size * @@ -4040,7 +4041,7 @@ H5T_get_size(const H5T_t *dt) FUNC_LEAVE_NOAPI(dt->shared->size) } /* end H5T_get_size() */ - + /*------------------------------------------------------------------------- * Function: H5T_cmp * @@ -4502,7 +4503,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_cmp() */ - + /*------------------------------------------------------------------------- * Function: H5T_path_find * @@ -4549,7 +4550,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_path_find() */ - + /*------------------------------------------------------------------------- * Function: H5T__path_find_real * @@ -4856,7 +4857,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__path_find_real() */ - + /*------------------------------------------------------------------------- * Function: H5T_path_noop * @@ -4881,7 +4882,7 @@ H5T_path_noop(const H5T_path_t *p) FUNC_LEAVE_NOAPI(p->is_noop || (p->is_hard && 0==H5T_cmp(p->src, p->dst, FALSE))) } /* end H5T_path_noop() */ - + /*------------------------------------------------------------------------- * Function: H5T_path_compound_subset * @@ -4925,7 +4926,7 @@ H5T_path_compound_subset(const H5T_path_t *p) FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_path_compound_subset */ - + /*------------------------------------------------------------------------- * Function: H5T_path_bkg * @@ -4947,7 +4948,7 @@ H5T_path_bkg(const H5T_path_t *p) FUNC_LEAVE_NOAPI(p->cdata.need_bkg) } /* end H5T_path_bkg() */ - + /*------------------------------------------------------------------------- * Function: H5T__compiler_conv * @@ -4981,7 +4982,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__compiler_conv() */ - + /*------------------------------------------------------------------------- * Function: H5T_convert * @@ -5032,7 +5033,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_convert() */ - + /*------------------------------------------------------------------------- * Function: H5T_oloc * @@ -5073,7 +5074,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_oloc() */ - + /*------------------------------------------------------------------------- * Function: H5T_nameof * @@ -5113,7 +5114,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_nameof() */ - + /*------------------------------------------------------------------------- * Function: H5T_is_immutable * @@ -5143,7 +5144,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*------------------------------------------------------------------------- * Function: H5T_is_named * @@ -5228,7 +5229,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_convert_committed_datatype() */ - + /*-------------------------------------------------------------------------- * Function: H5T_get_ref_type * @@ -5257,7 +5258,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_get_ref_type() */ - + /*------------------------------------------------------------------------- * Function: H5T_is_sensible * @@ -5319,7 +5320,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } - + /*-------------------------------------------------------------------------- NAME H5T_set_loc @@ -5485,7 +5486,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_set_loc() */ - + /*------------------------------------------------------------------------- * Function: H5T_is_relocatable * @@ -5524,7 +5525,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_is_relocatable() */ - + /*------------------------------------------------------------------------- * Function: H5T_detect_reg_ref * @@ -5532,7 +5533,7 @@ done: * datatype. * * Return: TRUE (1) or FALSE (0) on success - * (Can't fail) + * (Can't fail) * * Programmer: Quincey Koziol * Saturday, January 5, 2019 @@ -5587,7 +5588,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__detect_reg_ref() */ - + /*------------------------------------------------------------------------- * Function: H5T_is_vl_storage * @@ -5629,7 +5630,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_is_vl_storage() */ - + /*------------------------------------------------------------------------- * Function: H5T_upgrade_version_cb * @@ -5687,7 +5688,7 @@ H5T_upgrade_version_cb(H5T_t *dt, void *op_value) FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5T_upgrade_version_cb() */ - + /*------------------------------------------------------------------------- * Function: H5T__upgrade_version * @@ -5720,12 +5721,12 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T__upgrade_version() */ - + /*------------------------------------------------------------------------- * Function: H5T_set_version * * Purpose: Set the encoding for a datatype to the version indicated by - * the file's low bound if that is higher than the datatype's + * the file's low bound if that is higher than the datatype's * version. * * Return: Non-negative on success/Negative on failure @@ -5752,7 +5753,7 @@ H5T_set_version(H5F_t *f, H5T_t *dt) if(H5T__upgrade_version(dt, vers) < 0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTSET, FAIL, "can't upgrade datatype encoding") } - + /* Version bounds check */ if(dt->shared->version > H5O_dtype_ver_bounds[H5F_HIGH_BOUND(f)]) HGOTO_ERROR(H5E_DATATYPE, H5E_BADRANGE, FAIL, "Datatype version out of bounds") @@ -5761,7 +5762,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_set_version() */ - + /*------------------------------------------------------------------------- * Function: H5T_patch_file * @@ -5797,7 +5798,7 @@ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5T_patch_file() */ - + /*------------------------------------------------------------------------- * Function: H5T_patch_vlen_file * diff --git a/src/H5trace.c b/src/H5trace.c index de761f8..b1301dd 100644 --- a/src/H5trace.c +++ b/src/H5trace.c @@ -25,7 +25,7 @@ /****************/ /* Module Setup */ /****************/ -#define H5I_FRIEND /*suppress error about including H5Ipkg */ +#define H5I_FRIEND /*suppress error about including H5Ipkg */ /***********/ /* Headers */ @@ -79,7 +79,7 @@ /*******************/ - + /*------------------------------------------------------------------------- * Function: H5_trace * @@ -134,7 +134,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) /* FUNC_ENTER() should not be called */ if(!out) - return 0.0F; /*tracing is off*/ + return 0.0F; /*tracing is off*/ HDva_start(ap, type); if(H5_debug_g.ttop) { @@ -767,7 +767,7 @@ H5_trace(const double *returning, const char *func, const char *type, ...) if(status >= 0) HDfprintf(out, "SUCCEED"); - else + else HDfprintf(out, "FAIL"); } /* end else */ break; @@ -1058,7 +1058,11 @@ H5_trace(const double *returning, const char *func, const char *type, ...) break; case H5F_LIBVER_V112: - HDcompile_assert(H5F_LIBVER_LATEST == H5F_LIBVER_V112); + HDfprintf(out, "H5F_LIBVER_V112"); + break; + + case H5F_LIBVER_V114: + HDcompile_assert(H5F_LIBVER_LATEST == H5F_LIBVER_V114); HDfprintf(out, "H5F_LIBVER_LATEST"); break; |