summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2018-03-18 23:38:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2018-03-18 23:38:21 (GMT)
commitc31460c1b76c8d11534b57f025c57bdff9321f44 (patch)
tree2b61f09f4077ca7e464ec7a9c22408d3a965c783
parentf38864920d4e0bc8adaf9a23fd3f775ad90cb3f7 (diff)
parent2f0566208ed0e5b654e619df6f9d7ebee16a0bd4 (diff)
downloadhdf5-c31460c1b76c8d11534b57f025c57bdff9321f44.zip
hdf5-c31460c1b76c8d11534b57f025c57bdff9321f44.tar.gz
hdf5-c31460c1b76c8d11534b57f025c57bdff9321f44.tar.bz2
Merge branch 'develop' of https://bitbucket.hdfgroup.org/scm/hdffv/hdf5 into merge_func_enter_vol
-rw-r--r--release_docs/RELEASE.txt39
-rw-r--r--test/ohdr.c112
2 files changed, 92 insertions, 59 deletions
diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt
index e6fd8d3..e18b43a 100644
--- a/release_docs/RELEASE.txt
+++ b/release_docs/RELEASE.txt
@@ -174,8 +174,7 @@ New Features
C++ Library:
------------
- - The following wrappers are added:
-
+ - The following C++ API wrappers have been added to the C++ Library:
+ H5Lcreate_soft:
// Creates a soft link from link_name to target_name.
void link(const char *target_name, const char *link_name,...)
@@ -219,18 +218,46 @@ New Features
void unlink(const H5std_string& link_name,
const LinkAccPropList& lapl = LinkAccPropList::DEFAULT)
- - Added class LinkCreatPropList
+ Note: additional parameter is added to previous H5Location::unlink.
+
+ + H5Tencode and H5Tdecode:
+ // Creates a binary object description of this datatype.
+ void DataType::encode() - C API H5Tencode()
+
+ // Returns the decoded type from the binary object description.
+ DataType::decode() - C API H5Tdecode()
+ ArrayType::decode() - C API H5Tdecode()
+ CompType::decode() - C API H5Tdecode()
+ DataType::decode() - C API H5Tdecode()
+ EnumType::decode() - C API H5Tdecode()
+ FloatType::decode() - C API H5Tdecode()
+ IntType::decode() - C API H5Tdecode()
+ StrType::decode() - C API H5Tdecode()
+ VarLenType::decode() - C API H5Tdecode()
+
+ + H5Lget_info:
+ // Returns the information of the named link.
+ H5L_info_t getLinkInfo(const H5std_string& link_name,...)
+
+ (BMR - 2018/03/11, HDFFV-10149)
+
+ - Added class LinkCreatPropList for link create property list.
+
+ (BMR - 2018/03/11, HDFFV-10149)
- Added overloaded functions H5Location::createGroup to take a link
creation property list
Group createGroup(const char* name, const LinkCreatPropList& lcpl)
Group createGroup(const H5std_string& name, const LinkCreatPropList& lcpl)
- - Added wrapper for H5Lget_info() to H5Location
- // Returns the information of the named link.
- H5L_info_t getLinkInfo(const H5std_string& link_name,...)
(BMR - 2018/03/11, HDFFV-10149)
+ - A document is added to the HDF5 C++ API Reference Manual to show the
+ mapping from a C API to C++ wrappers. It can be found from the main
+ page of the C++ API Reference Manual.
+
+ (BMR - 2017/10/17, HDFFV-10151)
+
Java Library:
----------------
diff --git a/test/ohdr.c b/test/ohdr.c
index 84338c3..5821357 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -21,14 +21,14 @@
* This file needs to access private datatypes from the H5O package.
* This file also needs to access the object header testing code.
*/
-#define H5O_FRIEND /*suppress error about including H5Opkg */
+#define H5O_FRIEND /*suppress error about including H5Opkg */
#define H5O_TESTING
#include "H5Opkg.h"
/*
* This file needs to access private datatypes from the H5G package.
*/
-#define H5G_FRIEND /*suppress error about including H5Gpkg */
+#define H5G_FRIEND /*suppress error about including H5Gpkg */
#include "H5Gpkg.h"
#include "H5CXprivate.h" /* API Contexts */
@@ -51,24 +51,24 @@ const char *FILENAME[] = {
/*
* Verify that messages are moved forward into a "continuation message":
- * Create an object header with several continuation chunks
- * Remove a message in the last chunk
- * The remaining message(s) in the last chunk should be moved forward into the continuation message
- * The process will repeat when the continuation message is big enough to hold all the
- * messages in the last chunk.
- * Result: the number of chunks should be reduced
+ * Create an object header with several continuation chunks
+ * Remove a message in the last chunk
+ * The remaining message(s) in the last chunk should be moved forward into the continuation message
+ * The process will repeat when the continuation message is big enough to hold all the
+ * messages in the last chunk.
+ * Result: the number of chunks should be reduced
*/
static herr_t
test_cont(char *filename, hid_t fapl)
{
- hid_t file=-1;
- H5F_t *f = NULL;
+ hid_t file=-1;
+ H5F_t *f = NULL;
H5O_hdr_info_t hdr_info;
- H5O_loc_t oh_locA, oh_locB;
- time_t time_new;
- const char *short_name = "T";
- const char *long_name = "This is the message";
- size_t nchunks;
+ H5O_loc_t oh_locA, oh_locB;
+ time_t time_new;
+ const char *short_name = "T";
+ const char *long_name = "This is the message";
+ size_t nchunks;
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
TESTING("object header continuation block");
@@ -174,14 +174,14 @@ if(api_ctx_pushed) H5CX_pop();
static herr_t
test_ohdr_cache(char *filename, hid_t fapl)
{
- hid_t file = -1; /* File ID */
+ hid_t file = -1; /* File ID */
hid_t my_fapl; /* FAPL ID */
H5AC_cache_config_t mdc_config; /* Metadata cache configuration info */
- H5F_t *f = NULL; /* File handle */
+ H5F_t *f = NULL; /* File handle */
H5HL_t *lheap, *lheap2, *lheap3; /* Pointer to local heaps */
haddr_t lheap_addr, lheap_addr2, lheap_addr3; /* Local heap addresses */
- H5O_loc_t oh_loc; /* Object header location */
- time_t time_new; /* Time value for modification time message */
+ H5O_loc_t oh_loc; /* Object header location */
+ time_t time_new; /* Time value for modification time message */
unsigned rc; /* Refcount for object */
TESTING("object header creation in cache");
@@ -309,17 +309,17 @@ error:
static herr_t
test_ohdr_swmr(hbool_t new_format)
{
- hid_t fid = -1; /* File ID */
- hid_t fapl = -1; /* File access property list */
- hid_t did = -1; /* Dataset ID */
+ hid_t fid = -1; /* File ID */
+ hid_t fapl = -1; /* File access property list */
+ hid_t did = -1; /* Dataset ID */
hid_t sid = -1; /* Dataspace ID */
- hid_t plist = -1; /* Dataset creation property list */
- size_t compact_size = 1024; /* The size of compact dataset */
- int *wbuf = NULL; /* Buffer for writing */
- hsize_t dims[1]; /* Dimension sizes */
- size_t u; /* Iterator */
+ hid_t plist = -1; /* Dataset creation property list */
+ size_t compact_size = 1024; /* The size of compact dataset */
+ int *wbuf = NULL; /* Buffer for writing */
+ hsize_t dims[1]; /* Dimension sizes */
+ size_t u; /* Iterator */
int n; /* Data variable */
- H5O_info_t obj_info; /* Information for the object */
+ H5O_info_t obj_info; /* Information for the object */
if(new_format) {
TESTING("exercise the coding for the re-read of the object header for SWMR access: latest-format");
@@ -355,7 +355,7 @@ test_ohdr_swmr(hbool_t new_format)
dims[0] = (hsize_t)compact_size;
if((sid = H5Screate_simple(1, dims, NULL)) < 0)
FAIL_STACK_ERROR
-
+
/* Create property list for compact dataset creation */
if((plist = H5Pcreate(H5P_DATASET_CREATE)) < 0)
FAIL_STACK_ERROR
@@ -448,10 +448,10 @@ error:
/*
* To test objects with unknown messages in a file with:
- * a) H5O_BOGUS_VALID_ID:
- * --the bogus_id is within the range of H5O_msg_class_g[]
- * b) H5O_BOGUS_INVALID_ID:
- * --the bogus_id is outside the range of H5O_msg_class_g[]
+ * a) H5O_BOGUS_VALID_ID:
+ * --the bogus_id is within the range of H5O_msg_class_g[]
+ * b) H5O_BOGUS_INVALID_ID:
+ * --the bogus_id is outside the range of H5O_msg_class_g[]
*
* The test file is FILE_BOGUS: "tbogus.h5" generated with gen_bogus.c
* --objects that have unknown header messages with H5O_BOGUS_VALID_ID in "/"
@@ -462,15 +462,15 @@ error:
static herr_t
test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
{
- hid_t fid = -1; /* file ID */
- hid_t gid = -1; /* group ID */
- hid_t did = -1; /* Dataset ID */
+ hid_t fid = -1; /* file ID */
+ hid_t gid = -1; /* group ID */
+ hid_t did = -1; /* Dataset ID */
hid_t sid = -1; /* Dataspace ID */
hid_t aid = -1; /* Attribute ID */
- hid_t loc = -1; /* location: file or group ID */
- hid_t fid_bogus = -1; /* bogus file ID */
- hid_t gid_bogus = -1; /* bogus group ID */
- hid_t loc_bogus = -1; /* location: bogus file or group ID */
+ hid_t loc = -1; /* location: file or group ID */
+ hid_t fid_bogus = -1; /* bogus file ID */
+ hid_t gid_bogus = -1; /* bogus group ID */
+ hid_t loc_bogus = -1; /* location: bogus file or group ID */
char testfile[256];
/* create a different name for a local copy of the data file to be
@@ -497,7 +497,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* Set up location ID depending on bogus_id */
if(bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in FILE_BOGUS */
- if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
+ if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc_bogus = gid_bogus;
@@ -562,7 +562,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* Set up location ID depending on bogus_id */
if(bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in filename */
- if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
+ if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
} else
@@ -596,7 +596,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* Set up location ID depending on bogus_id */
if(bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in filename */
- if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
+ if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
} else
@@ -642,7 +642,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* Set up location ID depending on bogus_id */
if(bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in filename */
- if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
+ if((gid = H5Gopen2(fid, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc = gid;
} else
@@ -660,7 +660,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
if(H5Dclose(did) < 0)
FAIL_STACK_ERROR
- /* Closing: filename */
+ /* Closing: filename */
if(bogus_id == H5O_BOGUS_INVALID_ID)
if(H5Gclose(gid) < 0)
FAIL_STACK_ERROR
@@ -685,7 +685,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* Set up location ID */
if(bogus_id == H5O_BOGUS_INVALID_ID) {
/* Open "group" in FILE_BOGUS */
- if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
+ if((gid_bogus = H5Gopen2(fid_bogus, "group", H5P_DEFAULT)) < 0)
FAIL_STACK_ERROR
loc_bogus = gid_bogus;
} else
@@ -716,7 +716,7 @@ test_unknown(unsigned bogus_id, char *filename, hid_t fapl)
/* Closing: FILE_BOGUS */
if(bogus_id == H5O_BOGUS_INVALID_ID)
if(H5Gclose(gid_bogus) < 0)
- FAIL_STACK_ERROR
+ FAIL_STACK_ERROR
if(H5Fclose(fid_bogus) < 0)
FAIL_STACK_ERROR
@@ -772,21 +772,21 @@ static char *version_string(H5F_libver_t libver)
sprintf(str, "%ld", (long)libver);
break;
} /* end switch */
-
+
/* Return the formed version bound string */
return(str);
} /* end of version_string */
-
+
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
* Purpose: Exercise private object header behavior and routines
*
* Return: Success: 0
* Failure: 1
*
- * Programmer: Robb Matzke
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*
* Modification:
@@ -819,6 +819,8 @@ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
/* Loop through all the combinations of low/high library format bounds */
for(low = H5F_LIBVER_EARLIEST; low < H5F_LIBVER_NBOUNDS; low++) {
for(high = H5F_LIBVER_EARLIEST; high < H5F_LIBVER_NBOUNDS; high++) {
+ char *low_string = NULL;
+ char *high_string = NULL;
/* Set version bounds before opening the file */
H5E_BEGIN_TRY {
@@ -829,9 +831,13 @@ hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
continue;
/* Display info about testing */
- sprintf(msg, "Using file format version: (%s, %s)", version_string(low),
- version_string(high));
+ low_string = version_string(low);
+ high_string = version_string(high);
+ sprintf(msg, "Using file format version: (%s, %s)", low_string,
+ high_string);
HDputs(msg);
+ HDfree(high_string);
+ HDfree(low_string);
/* test on object continuation block */
if(test_cont(filename, fapl) < 0)