diff options
author | Robb Matzke <matzke@llnl.gov> | 1998-06-30 21:30:28 (GMT) |
---|---|---|
committer | Robb Matzke <matzke@llnl.gov> | 1998-06-30 21:30:28 (GMT) |
commit | 1b3a1f8014b630208013c7a18cfe8e7c0539e161 (patch) | |
tree | 442600fb6f75f8dbde490f48d2a8ccba7c823164 /src/H5T.c | |
parent | 030d46c078b7ef61468703dabb4861212ecb13ca (diff) | |
download | hdf5-1b3a1f8014b630208013c7a18cfe8e7c0539e161.zip hdf5-1b3a1f8014b630208013c7a18cfe8e7c0539e161.tar.gz hdf5-1b3a1f8014b630208013c7a18cfe8e7c0539e161.tar.bz2 |
[svn-r437] Changes since 19980612
----------------------
./src/H5Tbit.c
./src/H5Tpkg.h
Fixed a bug in H5T_bit_copy(). Added H5T_bit_get_d() and
H5T_bit_set_d() which treat portions of a bit vector as an
unsigned integer. Added H5T_bit_inc() that increments part of
a bit vector and returns an indication of overflow.
./src/H5Tconv.c
./src/H5Tpkg.h
./test/dtypes.c
Added a slow general floating point conversion which works so
far on Intel, MIPS, and DEC but the test is turned off because
a cast from double to float will cause a SIGFPE on some
systems if an overflow occurs.
Added fast hardware conversions between native floating point
types. This function is also subject to the SIGFPE problem.
./src/H5detect.c
Removed the exponent bias adjustment when the significand
isn't normalized. This is now handled in the conversion
functions instead.
./src/H5T.c
Register new conversion functions.
Plugged a memory leak in the library termination code.
./RELEASE
Added a list of major changes since the first alpha.
./src/H5.c
./src/H5private.h
./src/H5A.c
./src/H5AC.c
./src/H5D.c
./src/H5Ffamily.c
./src/H5Fistore.c
./src/H5G.c
./src/H5Gprivate.h
./src/H5HG.c
./src/H5O.c
./src/H5T.c
./src/H5Tbit.c
./src/H5Tconv.c
Fixed various compiler warnings on Irix64.
./src/H5MM.c
Added PABLO_MASK to this file.
./test/chunk.c
Removed a warning about memcpy().
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -572,6 +572,11 @@ H5T_init_interface(void) HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to register conversion function"); } + if (H5Tregister_soft ("f_f", H5T_FLOAT, H5T_FLOAT, + H5T_conv_f_f) < 0) { + HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, + "unable to register conversion function"); + } if (H5Tregister_soft("ibo", H5T_INTEGER, H5T_INTEGER, H5T_conv_order) < 0) { HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, @@ -597,7 +602,16 @@ H5T_init_interface(void) HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to register conversion function"); } - + if (H5Tregister_hard("flt_dbl", H5T_NATIVE_FLOAT, H5T_NATIVE_DOUBLE, + H5T_conv_float_double)<0) { + HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, + "unable to register conversion function"); + } + if (H5Tregister_hard("dbl_flt", H5T_NATIVE_DOUBLE, H5T_NATIVE_FLOAT, + H5T_conv_double_float)<0) { + HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, + "unable to register conversion function"); + } FUNC_LEAVE(ret_value); } @@ -2879,7 +2893,7 @@ H5Tregister_soft (const char *name, H5T_class_t src_cls, H5T_class_t dst_cls, HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } - H5T_asoft_g = na; + H5T_asoft_g = (intn)na; H5T_soft_g = x; } HDstrncpy (H5T_soft_g[H5T_nsoft_g].name, name, H5T_NAMELEN); @@ -3697,7 +3711,7 @@ H5T_insert(H5T_t *parent, const char *name, size_t offset, const H5T_t *member) HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed"); } - parent->u.compnd.nalloc = na; + parent->u.compnd.nalloc = (intn)na; parent->u.compnd.memb = x; } @@ -4197,7 +4211,7 @@ H5T_path_find(const char *name, const H5T_t *src, const H5T_t *dst, HRETURN_ERROR (H5E_RESOURCE, H5E_NOSPACE, NULL, "memory allocation failed"); } - H5T_apath_g = na; + H5T_apath_g = (intn)na; H5T_path_g = x; } if (cmp > 0) md++; @@ -4266,6 +4280,7 @@ H5T_path_find(const char *name, const H5T_t *src, const H5T_t *dst, } if ((H5T_soft_g[i].func) (src_id, dst_id, &(path->cdata), H5T_CONV_INIT, NULL, NULL) < 0) { + H5MM_xfree(path->cdata.stats); HDmemset (&(path->cdata), 0, sizeof(H5T_cdata_t)); H5E_clear(); /*ignore the error*/ } else { |