mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-02-17 16:10:24 +08:00
[svn-r30224] Added HDprintf() macro that uses HDfprintf w/ stdout.
Tested on: 64-bit Ubuntu Linux 16.04 LTS w/ gcc 5.4.0 Autotools serial
This commit is contained in:
parent
4af66b09e0
commit
faea627254
@ -1142,7 +1142,9 @@ typedef off_t h5_stat_size_t;
|
|||||||
#ifndef HDpowf
|
#ifndef HDpowf
|
||||||
#define HDpowf(X,Y) powf(X,Y)
|
#define HDpowf(X,Y) powf(X,Y)
|
||||||
#endif /* HDpowf */
|
#endif /* HDpowf */
|
||||||
/* printf() variable arguments */
|
#ifndef HDprintf
|
||||||
|
#define HDprintf(...) HDfprintf(stdout, __VA_ARGS__)
|
||||||
|
#endif /* HDprintf */
|
||||||
#ifndef HDputc
|
#ifndef HDputc
|
||||||
#define HDputc(C,F) putc(C,F)
|
#define HDputc(C,F) putc(C,F)
|
||||||
#endif /* HDputc*/
|
#endif /* HDputc*/
|
||||||
|
12
test/lheap.c
12
test/lheap.c
@ -158,9 +158,9 @@ main(void)
|
|||||||
|
|
||||||
if (strcmp(s, buf)) {
|
if (strcmp(s, buf)) {
|
||||||
H5_FAILED();
|
H5_FAILED();
|
||||||
printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
|
HDprintf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
|
||||||
printf(" got: \"%s\"\n", s);
|
HDprintf(" got: \"%s\"\n", s);
|
||||||
printf(" ans: \"%s\"\n", buf);
|
HDprintf(" ans: \"%s\"\n", buf);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -191,7 +191,7 @@ main(void)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
H5_FAILED();
|
H5_FAILED();
|
||||||
printf("***cannot open the pre-created non-default sizes test file (%s)\n",
|
HDprintf("***cannot open the pre-created non-default sizes test file (%s)\n",
|
||||||
testfile);
|
testfile);
|
||||||
goto error;
|
goto error;
|
||||||
} /* end else */
|
} /* end else */
|
||||||
@ -201,13 +201,13 @@ main(void)
|
|||||||
/* Verify symbol table messages are cached */
|
/* Verify symbol table messages are cached */
|
||||||
if(h5_verify_cached_stabs(FILENAME, fapl) < 0) TEST_ERROR
|
if(h5_verify_cached_stabs(FILENAME, fapl) < 0) TEST_ERROR
|
||||||
|
|
||||||
puts("All local heap tests passed.");
|
HDputs("All local heap tests passed.");
|
||||||
h5_cleanup(FILENAME, fapl);
|
h5_cleanup(FILENAME, fapl);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
puts("*** TESTS FAILED ***");
|
HDputs("*** TESTS FAILED ***");
|
||||||
H5E_BEGIN_TRY {
|
H5E_BEGIN_TRY {
|
||||||
H5Fclose(file);
|
H5Fclose(file);
|
||||||
} H5E_END_TRY;
|
} H5E_END_TRY;
|
||||||
|
@ -173,11 +173,11 @@ main(void)
|
|||||||
|
|
||||||
/* Results */
|
/* Results */
|
||||||
if(nerrors) {
|
if(nerrors) {
|
||||||
printf("***** %d External Link (HDF5_EXT_PREFIX) test%s FAILED! *****\n",
|
HDprintf("***** %d External Link (HDF5_EXT_PREFIX) test%s FAILED! *****\n",
|
||||||
nerrors, 1 == nerrors ? "" : "s");
|
nerrors, 1 == nerrors ? "" : "s");
|
||||||
exit(1);
|
HDexit(1);
|
||||||
}
|
}
|
||||||
printf("All external Link (HDF5_EXT_PREFIX) tests passed.\n");
|
HDprintf("All external Link (HDF5_EXT_PREFIX) tests passed.\n");
|
||||||
|
|
||||||
/* clean up tmp directory created by external link tests */
|
/* clean up tmp directory created by external link tests */
|
||||||
HDrmdir(TMPDIR);
|
HDrmdir(TMPDIR);
|
||||||
@ -185,6 +185,6 @@ main(void)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
puts("*** TESTS FAILED ***");
|
HDputs("*** TESTS FAILED ***");
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user