summaryrefslogtreecommitdiffstats
path: root/test/filter_plugin.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-07-27 20:43:30 (GMT)
committerGitHub <noreply@github.com>2023-07-27 20:43:30 (GMT)
commit1e91d96fa02466ffe451319bdac1005f84dc7993 (patch)
tree4de04ef502c313dfd766497b20235188761146c0 /test/filter_plugin.c
parent95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff)
downloadhdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz
hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'test/filter_plugin.c')
-rw-r--r--test/filter_plugin.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/test/filter_plugin.c b/test/filter_plugin.c
index 96e114a..3bedc57 100644
--- a/test/filter_plugin.c
+++ b/test/filter_plugin.c
@@ -84,9 +84,9 @@ free_2D_array(int ***arr)
{
if (arr && *arr && (*arr)[0])
- HDfree((*arr)[0]);
+ free((*arr)[0]);
if (arr && *arr)
- HDfree(*arr);
+ free(*arr);
*arr = NULL;
return SUCCEED;
@@ -114,9 +114,9 @@ allocate_and_init_2D_array(int ***arr, const hsize_t *sizes, int **initial_value
c = (size_t)sizes[1];
/* Allocate and set up pseudo-2D array */
- if (NULL == (*arr = (int **)HDcalloc(r, sizeof(int *))))
+ if (NULL == (*arr = (int **)calloc(r, sizeof(int *))))
TEST_ERROR;
- if (NULL == ((*arr)[0] = (int *)HDcalloc(r * c, sizeof(int))))
+ if (NULL == ((*arr)[0] = (int *)calloc(r * c, sizeof(int))))
TEST_ERROR;
for (i = 0; i < r; i++)
(*arr)[i] = (**arr + c * i);
@@ -124,7 +124,7 @@ allocate_and_init_2D_array(int ***arr, const hsize_t *sizes, int **initial_value
/* Copy over the data elements */
if (initial_values) {
n_bytes = r * c * sizeof(int);
- HDmemcpy((*arr)[0], initial_values[0], n_bytes);
+ memcpy((*arr)[0], initial_values[0], n_bytes);
}
return SUCCEED;
@@ -212,7 +212,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
*/
if ((dxpl_id = H5Pcreate(H5P_DATASET_XFER)) < 0)
TEST_ERROR;
- if (NULL == (tconv_buf = HDcalloc((size_t)1000, sizeof(char))))
+ if (NULL == (tconv_buf = calloc((size_t)1000, sizeof(char))))
TEST_ERROR;
if (H5Pset_buffer(dxpl_id, (size_t)1000, tconv_buf, NULL) < 0)
TEST_ERROR;
@@ -400,7 +400,7 @@ ensure_filter_works(hid_t fid, const char *name, hid_t dcpl_id)
free_2D_array(&orig);
free_2D_array(&read);
- HDfree(tconv_buf);
+ free(tconv_buf);
return SUCCEED;
@@ -420,7 +420,7 @@ error:
free_2D_array(&read);
if (tconv_buf)
- HDfree(tconv_buf);
+ free(tconv_buf);
return FAIL;
} /* end ensure_filter_works() */
@@ -984,7 +984,7 @@ test_path_api_calls(void)
/* Remove all existing paths */
for (u = n_paths; u > 0; u--)
if (H5PLremove(u - 1) < 0) {
- HDfprintf(stderr, " at %u: %s\n", u, path);
+ fprintf(stderr, " at %u: %s\n", u, path);
TEST_ERROR;
}
@@ -1019,7 +1019,7 @@ test_path_api_calls(void)
for (u = 0; u < n_starting_paths; u++) {
HDsnprintf(path, sizeof(path), "a_path_%u", u);
if (H5PLappend(path) < 0) {
- HDfprintf(stderr, " at %u: %s\n", u, path);
+ fprintf(stderr, " at %u: %s\n", u, path);
TEST_ERROR;
}
}
@@ -1052,7 +1052,7 @@ test_path_api_calls(void)
/* Get the path length by passing in NULL */
if ((path_len = H5PLget(0, NULL, 0)) <= 0) {
- HDfprintf(stderr, " get path 0 length failed\n");
+ fprintf(stderr, " get path 0 length failed\n");
TEST_ERROR;
}
if (path_len != 8)
@@ -1060,11 +1060,11 @@ test_path_api_calls(void)
/* Get the path */
if ((path_len = H5PLget(0, path, 256)) <= 0) {
- HDfprintf(stderr, " get 0 len: %zd : %s\n", path_len, path);
+ fprintf(stderr, " get 0 len: %zd : %s\n", path_len, path);
TEST_ERROR;
}
if (HDstrcmp(path, "a_path_0") != 0) {
- HDfprintf(stderr, " get 0: %s\n", path);
+ fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1076,7 +1076,7 @@ test_path_api_calls(void)
if ((path_len = H5PLget(1, path, 256)) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_1") != 0) {
- HDfprintf(stderr, " get 1: %s\n", path);
+ fprintf(stderr, " get 1: %s\n", path);
TEST_ERROR;
}
@@ -1085,7 +1085,7 @@ test_path_api_calls(void)
TEST_ERROR;
HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths - 1);
if (HDstrcmp(path, temp_name) != 0) {
- HDfprintf(stderr, " get %u: %s\n", n_starting_paths - 1, path);
+ fprintf(stderr, " get %u: %s\n", n_starting_paths - 1, path);
TEST_ERROR;
}
@@ -1122,7 +1122,7 @@ test_path_api_calls(void)
if ((path_len = H5PLget(8, path, 256)) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_9") != 0) {
- HDfprintf(stderr, " get 8: %s\n", path);
+ fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1139,7 +1139,7 @@ test_path_api_calls(void)
/* Prepend one path */
HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 1);
if (H5PLprepend(path) < 0) {
- HDfprintf(stderr, " prepend %u: %s\n", n_starting_paths + 1, path);
+ fprintf(stderr, " prepend %u: %s\n", n_starting_paths + 1, path);
TEST_ERROR;
}
@@ -1153,7 +1153,7 @@ test_path_api_calls(void)
if (H5PLget(8, path, 256) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_7") != 0) {
- HDfprintf(stderr, " get 8: %s\n", path);
+ fprintf(stderr, " get 8: %s\n", path);
TEST_ERROR;
}
@@ -1162,7 +1162,7 @@ test_path_api_calls(void)
TEST_ERROR;
HDsnprintf(temp_name, sizeof(temp_name), "a_path_%d", n_starting_paths + 1);
if (HDstrcmp(path, temp_name) != 0) {
- HDfprintf(stderr, " get 0: %s\n", path);
+ fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1177,7 +1177,7 @@ test_path_api_calls(void)
/* Replace one path at index 1 */
HDsnprintf(path, sizeof(path), "a_path_%u", n_starting_paths + 4);
if (H5PLreplace(path, 1) < 0) {
- HDfprintf(stderr, " replace 1: %s\n", path);
+ fprintf(stderr, " replace 1: %s\n", path);
TEST_ERROR;
}
@@ -1196,7 +1196,7 @@ test_path_api_calls(void)
TEST_ERROR;
HDsnprintf(temp_name, sizeof(temp_name), "a_path_%u", n_starting_paths + 1);
if (HDstrcmp(path, temp_name) != 0) {
- HDfprintf(stderr, " get 0: %s\n", path);
+ fprintf(stderr, " get 0: %s\n", path);
TEST_ERROR;
}
@@ -1204,7 +1204,7 @@ test_path_api_calls(void)
if (H5PLget(2, path, 256) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_1") != 0) {
- HDfprintf(stderr, " get 2: %s\n", path);
+ fprintf(stderr, " get 2: %s\n", path);
TEST_ERROR;
}
@@ -1228,7 +1228,7 @@ test_path_api_calls(void)
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_4") != 0) {
- HDfprintf(stderr, " get 4: %s\n", path);
+ fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1244,7 +1244,7 @@ test_path_api_calls(void)
/* Insert one path at index 3*/
HDsnprintf(path, sizeof(path), "a_path_%d", n_starting_paths + 5);
if (H5PLinsert(path, 3) < 0) {
- HDfprintf(stderr, " insert 3: %s\n", path);
+ fprintf(stderr, " insert 3: %s\n", path);
TEST_ERROR;
}
@@ -1252,7 +1252,7 @@ test_path_api_calls(void)
if (H5PLget(4, path, 256) <= 0)
TEST_ERROR;
if (HDstrcmp(path, "a_path_2") != 0) {
- HDfprintf(stderr, " get 4: %s\n", path);
+ fprintf(stderr, " get 4: %s\n", path);
TEST_ERROR;
}
@@ -1278,7 +1278,7 @@ test_path_api_calls(void)
/* Remove all existing paths */
for (u = n_paths; u > 0; u--)
if (H5PLremove(u - 1) < 0) {
- HDfprintf(stderr, " at %u: %s\n", u, path);
+ fprintf(stderr, " at %u: %s\n", u, path);
TEST_ERROR;
}
@@ -1617,9 +1617,9 @@ main(void)
if (nerrors)
TEST_ERROR;
- HDprintf("All plugin tests passed.\n");
+ printf("All plugin tests passed.\n");
- HDexit(EXIT_SUCCESS);
+ exit(EXIT_SUCCESS);
error:
H5E_BEGIN_TRY
@@ -1637,6 +1637,6 @@ error:
free_2D_array(&orig_dynlib4_g);
nerrors = MAX(1, nerrors);
- HDprintf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
- HDexit(EXIT_FAILURE);
+ printf("***** %d PLUGIN TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S");
+ exit(EXIT_FAILURE);
} /* end main() */