diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-09-15 22:13:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 22:13:18 (GMT) |
commit | 44a00ef876ad3e1922847e93feac57c479217fbe (patch) | |
tree | 5e9fc677913a06a71eba1342633f92e93bd07a6c /test/lheap.c | |
parent | 59a90368cdb696205bdf15040d1a48b4f69af97f (diff) | |
download | hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.zip hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.gz hdf5-44a00ef876ad3e1922847e93feac57c479217fbe.tar.bz2 |
Strip HD prefix from string/char C API calls (#3540)
* Strip HD prefix from string/char C API calls
* HD(f)(put|get)(s|c)
* HDstr*
* HDv*printf
* HD(s)(print|scan)f
* HDperror
But NOT:
* HDstrcase*
* HDvasprintf
* HDstrtok_r
* HDstrndup
As those are not C99 and have portability work-around
implementations. They will be handled later.
* Fix th5_system.c screwup
Diffstat (limited to 'test/lheap.c')
-rw-r--r-- | test/lheap.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/lheap.c b/test/lheap.c index 182966b..7b98634 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -91,13 +91,13 @@ main(void) goto error; } for (i = 0; i < NOBJS; i++) { - HDsnprintf(buf, sizeof(buf), "%03d-", i); + snprintf(buf, sizeof(buf), "%03d-", i); for (j = 4; j < i; j++) buf[j] = (char)('0' + j % 10); if (j > 4) buf[j] = '\0'; - if (H5HL_insert(f, heap, HDstrlen(buf) + 1, buf, &obj[i]) < 0) { + if (H5HL_insert(f, heap, strlen(buf) + 1, buf, &obj[i]) < 0) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; @@ -131,7 +131,7 @@ main(void) goto error; } for (i = 0; i < NOBJS; i++) { - HDsnprintf(buf, sizeof(buf), "%03d-", i); + snprintf(buf, sizeof(buf), "%03d-", i); for (j = 4; j < i; j++) buf[j] = (char)('0' + j % 10); if (j > 4) @@ -149,7 +149,7 @@ main(void) goto error; } - if (HDstrcmp(s, buf) != 0) { + if (strcmp(s, buf) != 0) { H5_FAILED(); printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i])); printf(" got: \"%s\"\n", s); @@ -204,13 +204,13 @@ main(void) FAIL_STACK_ERROR; api_ctx_pushed = false; - HDputs("All local heap tests passed."); + puts("All local heap tests passed."); h5_cleanup(FILENAME, fapl); return EXIT_SUCCESS; error: - HDputs("*** TESTS FAILED ***"); + puts("*** TESTS FAILED ***"); H5E_BEGIN_TRY { H5Fclose(file); |