summaryrefslogtreecommitdiffstats
path: root/test/err_compat.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/err_compat.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/err_compat.c')
-rw-r--r--test/err_compat.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/test/err_compat.c b/test/err_compat.c
index 1f7eb45..73cc797 100644
--- a/test/err_compat.c
+++ b/test/err_compat.c
@@ -22,7 +22,7 @@
int
main(void)
{
- HDprintf("Test skipped because backward compatibility with v1.6 is NOT configured in\n");
+ printf("Test skipped because backward compatibility with v1.6 is NOT configured in\n");
return 0;
}
#else /* H5_NO_DEPRECATED_SYMBOLS */
@@ -60,7 +60,7 @@ static herr_t
user_print1(FILE *stream)
{
/* Customized way to print errors */
- HDfprintf(stderr, "\n********* Print error stack in customized way *********\n");
+ fprintf(stderr, "\n********* Print error stack in customized way *********\n");
if (H5Ewalk1(H5E_WALK_UPWARD, (H5E_walk1_t)custom_print_cb1, stream) < 0)
TEST_ERROR;
@@ -88,7 +88,7 @@ static herr_t
user_print2(hid_t err_stack, FILE *stream)
{
/* Customized way to print errors */
- HDfprintf(stderr, "\n********* Print error stack in customized way *********\n");
+ fprintf(stderr, "\n********* Print error stack in customized way *********\n");
if (H5Ewalk2(err_stack, H5E_WALK_UPWARD, (H5E_walk2_t)custom_print_cb2, stream) < 0)
TEST_ERROR;
@@ -125,11 +125,11 @@ custom_print_cb1(int n, H5E_error1_t *err_desc, void *client_data)
if (NULL == (maj = H5Eget_major(err_desc->maj_num)))
TEST_ERROR;
- HDfprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
- err_desc->func_name, err_desc->line);
+ fprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
+ err_desc->func_name, err_desc->line);
- HDfprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
- HDfprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
+ fprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
+ fprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
H5free_memory(maj);
H5free_memory(min);
@@ -172,11 +172,11 @@ custom_print_cb2(int n, H5E_error2_t *err_desc, void *client_data)
if (NULL == (maj = H5Eget_major(err_desc->maj_num)))
TEST_ERROR;
- HDfprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
- err_desc->func_name, err_desc->line);
+ fprintf(stream, "%*serror #%03d: %s in %s(): line %u\n", indent, "", n, err_desc->file_name,
+ err_desc->func_name, err_desc->line);
- HDfprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
- HDfprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
+ fprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
+ fprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
H5free_memory(maj);
H5free_memory(min);
@@ -218,8 +218,8 @@ test_error_compat(void)
TESTING("error API H5Eset/get_auto");
/* Add a newline and flush so the output file looks nicer */
- HDprintf("\n");
- HDfflush(stdout);
+ printf("\n");
+ fflush(stdout);
/* Create the dataspace */
dims[0] = DIM0;
@@ -351,8 +351,8 @@ test_h5epush1(hid_t file)
TESTING("error API based on data I/O");
/* Add a newline and flush so the output file looks nicer */
- HDprintf("\n");
- HDfflush(stdout);
+ printf("\n");
+ fflush(stdout);
/* Create the dataspace */
dims[0] = DIM0;
@@ -430,12 +430,12 @@ static herr_t
dump_error(void)
{
/* Print errors in library default way */
- HDfprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
+ fprintf(stderr, "********* Print error stack in HDF5 default way *********\n");
if (H5Eprint1(stderr) < 0)
TEST_ERROR;
/* Customized way to print errors */
- HDfprintf(stderr, "\n********* Print error stack in customized way *********\n");
+ fprintf(stderr, "\n********* Print error stack in customized way *********\n");
if (H5Ewalk1(H5E_WALK_UPWARD, custom_print_cb1, stderr) < 0)
TEST_ERROR;
@@ -464,21 +464,21 @@ main(void)
const char *FUNC_main = "main";
int i;
- HDfprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There are supposed to "
- "be some error messages\n");
+ fprintf(stderr, " This program tests the Error API compatible with HDF5 v1.6. There are supposed to "
+ "be some error messages\n");
fapl_id = h5_fileaccess();
/* Set up data arrays */
- if (NULL == (ipoints2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ if (NULL == (ipoints2_data = (int *)calloc(DIM0 * DIM1, sizeof(int))))
TEST_ERROR;
- if (NULL == (ipoints2 = (int **)HDcalloc(DIM0, sizeof(ipoints2_data))))
+ if (NULL == (ipoints2 = (int **)calloc(DIM0, sizeof(ipoints2_data))))
TEST_ERROR;
for (i = 0; i < DIM0; i++)
ipoints2[i] = ipoints2_data + (i * DIM1);
- if (NULL == (icheck2_data = (int *)HDcalloc(DIM0 * DIM1, sizeof(int))))
+ if (NULL == (icheck2_data = (int *)calloc(DIM0 * DIM1, sizeof(int))))
TEST_ERROR;
- if (NULL == (icheck2 = (int **)HDcalloc(DIM0, sizeof(icheck2_data))))
+ if (NULL == (icheck2 = (int **)calloc(DIM0, sizeof(icheck2_data))))
TEST_ERROR;
for (i = 0; i < DIM0; i++)
icheck2[i] = icheck2_data + (i * DIM1);
@@ -518,19 +518,19 @@ main(void)
TEST_ERROR;
h5_clean_files(FILENAME, fapl_id);
- HDfree(ipoints2);
- HDfree(ipoints2_data);
- HDfree(icheck2);
- HDfree(icheck2_data);
+ free(ipoints2);
+ free(ipoints2_data);
+ free(icheck2);
+ free(icheck2_data);
- HDprintf("All error API tests passed.\n");
+ printf("All error API tests passed.\n");
return EXIT_SUCCESS;
error:
- HDfree(ipoints2);
- HDfree(ipoints2_data);
- HDfree(icheck2);
- HDfree(icheck2_data);
+ free(ipoints2);
+ free(ipoints2_data);
+ free(icheck2);
+ free(icheck2_data);
H5E_BEGIN_TRY
{
@@ -539,7 +539,7 @@ error:
}
H5E_END_TRY
- HDprintf("***** ERROR TEST FAILED! *****\n");
+ printf("***** ERROR TEST FAILED! *****\n");
return EXIT_FAILURE;
}
#endif /* H5_NO_DEPRECATED_SYMBOLS */