diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-07-27 20:43:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-27 20:43:30 (GMT) |
commit | 1e91d96fa02466ffe451319bdac1005f84dc7993 (patch) | |
tree | 4de04ef502c313dfd766497b20235188761146c0 /test/chunk_info.c | |
parent | 95e5349089b95dfb95f0f8ce2d6db1bc04ba6c82 (diff) | |
download | hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.zip hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.gz hdf5-1e91d96fa02466ffe451319bdac1005f84dc7993.tar.bz2 |
Brings over most of the HD prefix removal (#3293)
Diffstat (limited to 'test/chunk_info.c')
-rw-r--r-- | test/chunk_info.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/test/chunk_info.c b/test/chunk_info.c index 77d2b8a..a2eab94 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -323,7 +323,7 @@ verify_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsiz hsize_t ii, jj; /* Array indices */ int n; - HDmemset(&read_buf, 0, sizeof(read_buf)); + memset(&read_buf, 0, sizeof(read_buf)); /* Initialize the array of chunk data for all NUM_CHUNKS chunks, this is the same as the written data and will be used to verify the read data */ @@ -345,10 +345,10 @@ verify_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsiz TEST_ERROR; /* Verify that read chunk is the same as the corresponding written one */ - if (HDmemcmp(expected_buf[chk_index], read_buf, CHUNK_NX * CHUNK_NY) != 0) { - HDfprintf(stderr, - "Read chunk differs from written chunk at offset (%" PRIuHSIZE ",%" PRIuHSIZE ")\n", - offset[0], offset[1]); + if (memcmp(expected_buf[chk_index], read_buf, CHUNK_NX * CHUNK_NY) != 0) { + fprintf(stderr, + "Read chunk differs from written chunk at offset (%" PRIuHSIZE ",%" PRIuHSIZE ")\n", + offset[0], offset[1]); return FAIL; } } @@ -555,7 +555,7 @@ test_get_chunk_info_highest_v18(hid_t fapl) #ifdef H5_HAVE_FILTER_DEFLATE /* Allocate input (compressed) buffer */ - inbuf = HDcalloc(1, z_dst_nbytes); + inbuf = calloc(1, z_dst_nbytes); /* zlib-friendly alias for the input buffer */ z_dst = (Bytef *)inbuf; @@ -568,22 +568,22 @@ test_get_chunk_info_highest_v18(hid_t fapl) /* Check for various zlib errors */ if (Z_BUF_ERROR == ret) { - HDfprintf(stderr, "overflow"); + fprintf(stderr, "overflow"); TEST_ERROR; } else if (Z_MEM_ERROR == ret) { - HDfprintf(stderr, "deflate memory error"); + fprintf(stderr, "deflate memory error"); TEST_ERROR; } else if (Z_OK != ret) { - HDfprintf(stderr, "other deflate error"); + fprintf(stderr, "other deflate error"); TEST_ERROR; } #else /* Allocate input (non-compressed) buffer */ - if (NULL == (inbuf = HDcalloc(1, CHK_SIZE))) + if (NULL == (inbuf = calloc(1, CHK_SIZE))) TEST_ERROR; - HDmemcpy(inbuf, direct_buf, CHK_SIZE); + memcpy(inbuf, direct_buf, CHK_SIZE); #endif /* end H5_HAVE_FILTER_DEFLATE */ /* Write only NUM_CHUNKS_WRITTEN chunks at the following logical coords: @@ -600,7 +600,7 @@ test_get_chunk_info_highest_v18(hid_t fapl) /* Free the input buffer */ if (inbuf) - HDfree(inbuf); + free(inbuf); if (H5Fflush(dset, H5F_SCOPE_LOCAL) < 0) TEST_ERROR; @@ -1923,7 +1923,7 @@ test_get_chunk_info_v110(hid_t fapl) H5F_libver_t low, high; /* File format bounds */ TESTING("getting chunk information in file with versions 1.10 and later"); - HDprintf("\n"); /* to list sub-tests */ + printf("\n"); /* to list sub-tests */ /* Set high bound to the current latest version */ high = H5F_LIBVER_LATEST; @@ -2099,9 +2099,9 @@ test_flt_msk_with_skip_compress(hid_t fapl) for (ii = 0; ii < CHUNK_NX; ii++) for (jj = 0; jj < CHUNK_NY; jj++) if (direct_buf[ii][jj] != check_chunk[ii][jj]) { - HDprintf(" 1. Read different values than written."); - HDprintf(" At index %d,%d\n", ii, jj); - HDprintf(" direct_buf=%d, check_chunk=%d\n", direct_buf[ii][jj], check_chunk[ii][jj]); + printf(" 1. Read different values than written."); + printf(" At index %d,%d\n", ii, jj); + printf(" direct_buf=%d, check_chunk=%d\n", direct_buf[ii][jj], check_chunk[ii][jj]); TEST_ERROR; } @@ -2112,7 +2112,7 @@ test_flt_msk_with_skip_compress(hid_t fapl) TEST_ERROR; /* Read the raw chunk back with H5Dread_chunk */ - HDmemset(&read_direct_buf, 0, sizeof(read_direct_buf)); + memset(&read_direct_buf, 0, sizeof(read_direct_buf)); if (H5Dread_chunk(dset, H5P_DEFAULT, offset, &read_flt_msk, read_direct_buf) < 0) TEST_ERROR; if (read_flt_msk != flt_msk) @@ -2122,10 +2122,10 @@ test_flt_msk_with_skip_compress(hid_t fapl) for (ii = 0; ii < CHUNK_NX; ii++) for (jj = 0; jj < CHUNK_NY; jj++) if (direct_buf[ii][jj] != read_direct_buf[ii][jj]) { - HDprintf(" 1. Read different values than written."); - HDprintf(" At index %d,%d\n", ii, jj); - HDprintf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[ii][jj], - read_direct_buf[ii][jj]); + printf(" 1. Read different values than written."); + printf(" At index %d,%d\n", ii, jj); + printf(" direct_buf=%d, read_direct_buf=%d\n", direct_buf[ii][jj], + read_direct_buf[ii][jj]); TEST_ERROR; } @@ -2221,7 +2221,7 @@ main(void) if (nerrors) goto error; - HDprintf("All chunk query tests passed.\n"); + printf("All chunk query tests passed.\n"); h5_cleanup(FILENAME, fapl); @@ -2229,7 +2229,7 @@ main(void) error: nerrors = MAX(1, nerrors); - HDprintf("***** %d QUERY CHUNK INFO TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); + printf("***** %d QUERY CHUNK INFO TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); return EXIT_FAILURE; } |