summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2000-04-15 20:28:12 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2000-04-15 20:28:12 (GMT)
commit2ec6fd667bb4c49539bb820cb2b6f426e6c4c10a (patch)
tree77e150c8e92dcc45e759cf1addc5d3b103401a32 /src/H5.c
parentf12e3316665d7ac89820cc9ccecfad8e5537ce44 (diff)
downloadhdf5-2ec6fd667bb4c49539bb820cb2b6f426e6c4c10a.zip
hdf5-2ec6fd667bb4c49539bb820cb2b6f426e6c4c10a.tar.gz
hdf5-2ec6fd667bb4c49539bb820cb2b6f426e6c4c10a.tar.bz2
[svn-r2151] Modified H5_term_library to not reported errors when H5Eset_auto(NULL,NULL)
has turned off error reporting in the library. Also, changed the way property lists are managed and closed so that they can be automatically closed when the library terminates.
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/H5.c b/src/H5.c
index c1a57c9..e4a6a88 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -144,10 +144,14 @@ H5_term_library(void)
intn pending, ntries=0, n;
uintn at=0;
char loop[1024];
+ H5E_auto_t func;
/* Don't do anything if the library is already closed */
if (!H5_libinit_g) return;
+ /* Check if we should display error output */
+ H5Eget_auto(&func,NULL);
+
/*
* Terminate each interface. The termination functions return a positive
* value if they do something that might affect some other interface in a
@@ -178,8 +182,11 @@ H5_term_library(void)
pending += DOWN(I);
} while (pending && ntries++<100);
if (pending) {
- fprintf(stderr, "HDF5: infinite loop closing library\n");
- fprintf(stderr, " %s...\n", loop);
+ /* Only display the error message if the user is interested in them. */
+ if (func) {
+ fprintf(stderr, "HDF5: infinite loop closing library\n");
+ fprintf(stderr, " %s...\n", loop);
+ }
}
/* Mark library as closed */