summaryrefslogtreecommitdiffstats
path: root/test/mtime.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2023-09-15 22:13:18 (GMT)
committerGitHub <noreply@github.com>2023-09-15 22:13:18 (GMT)
commit44a00ef876ad3e1922847e93feac57c479217fbe (patch)
tree5e9fc677913a06a71eba1342633f92e93bd07a6c /test/mtime.c
parent59a90368cdb696205bdf15040d1a48b4f69af97f (diff)
downloadhdf5-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/mtime.c')
-rw-r--r--test/mtime.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/test/mtime.c b/test/mtime.c
index 252eebf..60bfaaa 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -96,26 +96,26 @@ main(void)
/* Compare object tokens & times from the two ways of calling H5Oget_info() */
if (token_cmp || oi1.ctime != oi2.ctime) {
H5_FAILED();
- HDputs(" Calling H5Oget_info() with the dataset ID returned");
- HDputs(" different values than calling it with a file and dataset");
- HDputs(" name.");
+ puts(" Calling H5Oget_info() with the dataset ID returned");
+ puts(" different values than calling it with a file and dataset");
+ puts(" name.");
goto error;
}
/* Compare times -- they must be within 60 seconds of one another */
if (0 == oi1.ctime) {
SKIPPED();
- HDputs(" The modification time could not be decoded on this OS.");
- HDputs(" Modification times will be maintained in the file but");
- HDputs(" cannot be queried on this system. See H5O_mtime_decode().");
+ puts(" The modification time could not be decoded on this OS.");
+ puts(" Modification times will be maintained in the file but");
+ puts(" cannot be queried on this system. See H5O_mtime_decode().");
return 0;
}
else if (fabs(HDdifftime(now, oi1.ctime)) > 60.0) {
H5_FAILED();
tm = HDlocaltime(&(oi1.ctime));
- HDstrftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
+ strftime((char *)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
tm = HDlocaltime(&now);
- HDstrftime((char *)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
+ strftime((char *)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
printf(" got: %s\n ans: %s\n", buf1, buf2);
goto error;
}
@@ -138,7 +138,7 @@ main(void)
H5_FAILED();
/* If this fails, examine H5Omtime.c. Modification time is very
* system dependent (e.g., on Windows DST must be hardcoded). */
- HDputs(" Old modification time incorrect");
+ puts(" Old modification time incorrect");
goto error;
}
if (H5Fclose(file) < 0)
@@ -168,7 +168,7 @@ main(void)
TEST_ERROR;
if (oi2.ctime != MTIME2) {
H5_FAILED();
- HDputs(" Modification time incorrect.");
+ puts(" Modification time incorrect.");
goto error;
}
if (H5Fclose(file) < 0)
@@ -188,7 +188,7 @@ main(void)
TEST_ERROR;
/* All looks good */
- HDputs("All modification time tests passed.");
+ puts("All modification time tests passed.");
h5_cleanup(FILENAME, fapl);
return EXIT_SUCCESS;