summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-07-07 20:13:31 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-07-07 20:13:31 (GMT)
commitbcf649388cb246fecf5bac670c54c7c4d654eb44 (patch)
treee73f696a48020d756c3eeda3c633047ef2465bfa /src/H5.c
parent63be23d70dd9bb3d79d670bb94e26c829a4abc2e (diff)
downloadhdf5-bcf649388cb246fecf5bac670c54c7c4d654eb44.zip
hdf5-bcf649388cb246fecf5bac670c54c7c4d654eb44.tar.gz
hdf5-bcf649388cb246fecf5bac670c54c7c4d654eb44.tar.bz2
[svn-r460] Changes since 19980707
---------------------- ./bin/trace ./src/H5.c ./src/H5private.h ./src/H5A.c ./src/H5D.c ./src/H5F.c ./src/H5G.c ./src/H5P.c ./src/H5Pprivate.h ./src/H5S.c ./src/H5T.c Output-only arguments have their addresses printed during tracing and added symbolic output for the H5F_driver_t arguments. That's another reason that we should be careful to add `/*out*/' after arguments that are output-only and `/*in,out*/' after arguments that are used for both input and output values. No internal function calls H5Pget_class() anymore. ./src/H5T.c ./src/H5Tconv.c ./src/H5Tpkg.h ./src/H5Tpublic.h Added H5Tget_overflow() and H5Tset_overflow() so the application can query or set a function that will be called whenever an overflow occurs. Implemented as documented in previous e-mail except the overflow handler gets two buffers: one that contains the source value and one to receive the optional destination value. ./test/dtypes.c Tests overflow handler. ./src/H5.c We have to declare fdopen() because I'm getting errors when compiling on Irix64 even though we include <stdio.h> as documented in the fdopen() man page.
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/src/H5.c b/src/H5.c
index 8f770b9..dd185b1 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -42,6 +42,9 @@ static char RcsId[] = "@(#)$Revision$";
#include <sys/time.h>
#include <sys/resource.h>
+/* We need this on Irix64 even though we've included stdio.h as documented */
+FILE *fdopen(int fd, const char *mode);
+
/* private headers */
#include <H5private.h> /*library */
#include <H5ACprivate.h> /*cache */
@@ -95,7 +98,7 @@ H5_init_library(void)
const char *s = getenv ("HDF5_TRACE");
if (s && isdigit(*s)) {
int fd = HDstrtol (s, NULL, 0);
- H5_trace_g = fdopen (fd, "w");
+ H5_trace_g = HDfdopen (fd, "w");
}
}
#endif
@@ -1123,6 +1126,48 @@ H5_trace (hbool_t returning, const char *func, const char *type, ...)
}
break;
+ case 'F':
+ switch (type[1]) {
+ case 'd':
+ if (ptr) {
+ fprintf(out, "0x%lx", (unsigned long)vp);
+ } else {
+ H5F_driver_t driver = va_arg(ap, H5F_driver_t);
+ switch (driver) {
+ case H5F_LOW_ERROR:
+ fprintf(out, "H5F_LOW_ERROR");
+ break;
+ case H5F_LOW_STDIO:
+ fprintf(out, "H5F_LOW_STDIO");
+ break;
+ case H5F_LOW_SEC2:
+ fprintf(out, "H5F_LOW_SEC2");
+ break;
+ case H5F_LOW_MPIO:
+ fprintf(out, "H5F_LOW_MPIO");
+ break;
+ case H5F_LOW_CORE:
+ fprintf(out, "H5F_LOW_CORE");
+ break;
+ case H5F_LOW_SPLIT:
+ fprintf(out, "H5F_LOW_SPLIT");
+ break;
+ case H5F_LOW_FAMILY:
+ fprintf(out, "H5F_LOW_FAMILY");
+ break;
+ default:
+ fprintf(out, "%ld", (long)driver);
+ break;
+ }
+ }
+ break;
+
+ default:
+ fprintf(out, "BADTYPE(F%c)", type[1]);
+ goto error;
+ }
+ break;
+
case 'G':
switch (type[1]) {
case 'l':