diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-07-07 20:13:31 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-07-07 20:13:31 (GMT) |
commit | bcf649388cb246fecf5bac670c54c7c4d654eb44 (patch) | |
tree | e73f696a48020d756c3eeda3c633047ef2465bfa /src/H5Tpublic.h | |
parent | 63be23d70dd9bb3d79d670bb94e26c829a4abc2e (diff) | |
download | hdf5-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/H5Tpublic.h')
-rw-r--r-- | src/H5Tpublic.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h index 56ad7c3..89491fc 100644 --- a/src/H5Tpublic.h +++ b/src/H5Tpublic.h @@ -118,6 +118,19 @@ typedef struct H5T_cdata_t { typedef herr_t (*H5T_conv_t) (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, void *buf, void *bkg); +/* + * If an error occurs during a data type conversion then the function + * registered with H5Tset_overflow() is called. It's arguments are the + * source and destination data types, a buffer which has the source value, + * and a buffer to receive an optional result for the overflow conversion. + * If the overflow handler chooses a value for the result it should return + * non-negative; otherwise the hdf5 library will choose an appropriate + * result. + */ +typedef herr_t (*H5T_overflow_t)(hid_t src_id, hid_t dst_id, + void *src_buf, void *dst_buf); + + #ifdef __cplusplus extern "C" { #endif @@ -379,6 +392,8 @@ herr_t H5Tunregister (H5T_conv_t func); H5T_conv_t H5Tfind (hid_t src_id, hid_t dst_id, H5T_cdata_t **pcdata); herr_t H5Tconvert (hid_t src_id, hid_t dst_id, size_t nelmts, void *buf, void *background); +H5T_overflow_t H5Tget_overflow(void); +herr_t H5Tset_overflow(H5T_overflow_t func); #ifdef __cplusplus } |