summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-08-19 22:46:31 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-08-19 22:46:31 (GMT)
commite455040749ca1d47fb218b9bb35d78247fb9561d (patch)
tree2d26f2ae1fea1ff393f00eb36e3f2155dec690b6 /src/H5F.c
parent4322bfe90ab7de7245ff770155867fa5da78147c (diff)
downloadhdf5-e455040749ca1d47fb218b9bb35d78247fb9561d.zip
hdf5-e455040749ca1d47fb218b9bb35d78247fb9561d.tar.gz
hdf5-e455040749ca1d47fb218b9bb35d78247fb9561d.tar.bz2
[svn-r606] Debugging can be enabled/disabled at runtime though code is still
conditionally included at compile time. Tracing and debugging share the same environment variable. All is documented in Debugging.html.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c31
1 files changed, 17 insertions, 14 deletions
diff --git a/src/H5F.c b/src/H5F.c
index b218931..fe04b9d 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1062,11 +1062,10 @@ H5F_open(const char *name, uintn flags,
* hdf5 data.
*/
#ifdef H5F_DEBUG
- fprintf(stderr, "H5F: resetting EOF from ");
- H5F_addr_print(stderr, &addr1);
- fprintf(stderr, " to ");
- H5F_addr_print(stderr, &addr2);
- fprintf(stderr, " (abs)\n");
+ if (H5DEBUG(F)) {
+ HDfprintf(H5DEBUG(F), "H5F: resetting EOF from %a to %a (abs)\n",
+ &addr1, &addr2);
+ }
#endif
H5F_low_seteof(f->shared->lf, &addr2);
}
@@ -1531,19 +1530,23 @@ H5F_close(H5F_t *f)
* forgetting to close everything is not a major problem.
*/
if (f->nopen>0) {
-#ifndef NDEBUG
- fprintf(stderr, "H5F: H5F_close(%s): %u object header%s still "
- "open (file close will complete when %s closed)\n",
- f->name,
- f->nopen,
- 1 == f->nopen ? " is" : "s are",
- 1 == f->nopen ? "that header is" : "those headers are");
+#ifdef H5F_DEBUG
+ if (H5DEBUG(F)) {
+ fprintf(H5DEBUG(F), "H5F: H5F_close(%s): %u object header%s still "
+ "open (file close will complete when %s closed)\n",
+ f->name,
+ f->nopen,
+ 1 == f->nopen ? " is" : "s are",
+ 1 == f->nopen ? "that header is" : "those headers are");
+ }
#endif
f->close_pending = TRUE;
HRETURN(SUCCEED);
} else if (f->close_pending) {
-#ifndef NDEBUG
- fprintf(stderr, "H5F: H5F_close: operation completed\n");
+#ifdef H5F_DEBUG
+ if (H5DEBUG(F)) {
+ fprintf(H5DEBUG(F), "H5F: H5F_close: operation completed\n");
+ }
#endif
}