summaryrefslogtreecommitdiffstats
path: root/tools/h5copy/h5copygentest.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5copy/h5copygentest.c')
-rw-r--r--tools/h5copy/h5copygentest.c65
1 files changed, 29 insertions, 36 deletions
diff --git a/tools/h5copy/h5copygentest.c b/tools/h5copy/h5copygentest.c
index 5c00966..e658e92 100644
--- a/tools/h5copy/h5copygentest.c
+++ b/tools/h5copy/h5copygentest.c
@@ -19,10 +19,6 @@
#include <stdlib.h>
#include "hdf5.h"
#include "H5private.h"
-#include "h5tools.h"
-
-/* Name of tool */
-#define PROGRAMNAME "h5copygentest"
/* HDF file names */
#define HDF_FILE1 "h5copytst.h5"
@@ -365,7 +361,7 @@ static void gent_empty_group(hid_t loc_id)
* Function: gent_nested_datasets
*
* Purpose: Generate a group in a location and populate it with the "standard"
- * datasets
+ * datasets
*
*-------------------------------------------------------------------------
*/
@@ -387,7 +383,7 @@ static void gent_nested_datasets(hid_t loc_id)
* Function: gent_nested_group
*
* Purpose: Generate a group in a location and populate it with another group
- * containing the "standard" datasets
+ * containing the "standard" datasets
*
*-------------------------------------------------------------------------
*/
@@ -432,7 +428,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
sid = H5Screate_simple(1, dims1, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -440,7 +436,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Dcreate2 (loc_id, OBJ_REF_DS, H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -448,7 +444,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Dwrite(oid, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -461,7 +457,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Gcreate2 (loc_id, OBJ_REF_GRP, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -470,14 +466,14 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Rcreate (&or_data[0], loc_id, OBJ_REF_DS, H5R_OBJECT, -1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
status = H5Rcreate (&or_data[1], loc_id, OBJ_REF_GRP, H5R_OBJECT, -1);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -485,7 +481,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
sid = H5Screate_simple (1, dims2, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -493,7 +489,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
oid = H5Dcreate2 (loc_id, "Dset_OBJREF", H5T_STD_REF_OBJ, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -501,7 +497,7 @@ static herr_t gen_obj_ref(hid_t loc_id)
status = H5Dwrite(oid, H5T_STD_REF_OBJ, H5S_ALL, H5S_ALL, H5P_DEFAULT, or_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -541,7 +537,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid = H5Screate_simple (2, dims2, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -550,7 +546,7 @@ static herr_t gen_region_ref(hid_t loc_id)
oid2 = H5Dcreate2 (loc_id, REG_REF_DS2, H5T_STD_I8LE, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid2 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -559,7 +555,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Dwrite (oid2, H5T_NATIVE_CHAR, H5S_ALL, H5S_ALL, H5P_DEFAULT, data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -568,7 +564,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_elements (sid, H5S_SELECT_SET, 4, coords[0]);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Sselect_elements failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -577,7 +573,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[0], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -586,7 +582,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Sselect_hyperslab (sid, H5S_SELECT_SET, start, stride, count, block);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Sselect_hyperslab failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -595,7 +591,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Rcreate (&rr_data[1], loc_id, REG_REF_DS2, H5R_DATASET_REGION, sid);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Rcreate failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -606,7 +602,7 @@ static herr_t gen_region_ref(hid_t loc_id)
sid = H5Screate_simple (1, dims1, NULL);
if (sid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Screate_simple failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -615,7 +611,7 @@ static herr_t gen_region_ref(hid_t loc_id)
oid1 = H5Dcreate2 (loc_id, REG_REF_DS1, H5T_STD_REF_DSETREG, sid, H5P_DEFAULT,H5P_DEFAULT,H5P_DEFAULT);
if (oid1 < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -624,7 +620,7 @@ static herr_t gen_region_ref(hid_t loc_id)
status = H5Dwrite (oid1, H5T_STD_REF_DSETREG, H5S_ALL, H5S_ALL, H5P_DEFAULT, rr_data);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Dwrite failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -728,7 +724,7 @@ static herr_t gen_extlink_trg(hid_t loc_id)
gid = H5Gcreate2(loc_id, "group", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -744,7 +740,7 @@ static herr_t gen_extlink_trg(hid_t loc_id)
status = H5Tcommit2(loc_id, "datatype", tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Tcommit2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -777,7 +773,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
gid = H5Gcreate2(loc_id, "/group_ext", H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT);
if (gid < 0)
{
- fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Gcreate2 failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -789,7 +785,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/simple", gid, "extlink_dset", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -798,7 +794,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/group", gid, "extlink_grp", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -807,7 +803,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "/datatype", gid, "extlink_datatype", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -816,7 +812,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external(HDF_EXT_TRG_FILE, "notyet", gid, "extlink_notyet1", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -825,7 +821,7 @@ static herr_t gen_extlink_src(hid_t loc_id)
status = H5Lcreate_external("notyet_file.h5", "notyet", gid, "extlink_notyet2", H5P_DEFAULT, H5P_DEFAULT);
if (status < 0)
{
- fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", __FUNCTION__, __LINE__);
+ fprintf(stderr, "Error: %s %d> H5Lcreate_external failed.\n", FUNC, __LINE__);
ret = FAIL;
goto out;
}
@@ -891,9 +887,6 @@ out:
int main(void)
{
- h5tools_setprogname(PROGRAMNAME);
- h5tools_setstatus(EXIT_SUCCESS);
-
Test_Obj_Copy();
Test_Ref_Copy();
Test_Extlink_Copy();