diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2004-04-12 20:49:36 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2004-04-12 20:49:36 (GMT) |
commit | dfe9639c9bd2ec7a331a35a2d6de6dde833621c5 (patch) | |
tree | c2133b5c3bad3037483d69692a2709d07c6cff4d /src/H5Tconv.c | |
parent | 7a73740dfd87a69b960992907a317c5d12e2cc55 (diff) | |
download | hdf5-dfe9639c9bd2ec7a331a35a2d6de6dde833621c5.zip hdf5-dfe9639c9bd2ec7a331a35a2d6de6dde833621c5.tar.gz hdf5-dfe9639c9bd2ec7a331a35a2d6de6dde833621c5.tar.bz2 |
[svn-r8344] Purpose: Internal function change
Description: H5T_bit_shift wasn't general enough to handle arbitory start, length.
Solution: Make it be so.
Platforms tested: h5committest
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r-- | src/H5Tconv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 23c5adc..0cd615b 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -8600,7 +8600,7 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, * Shift mantissa part by exponent minus mantissa size(right shift), * or by mantissa size minus exponent(left shift). */ - H5T_bit_shift(int_buf, (ssize_t)(expo-src.u.f.msize), buf_size); + H5T_bit_shift(int_buf, (ssize_t)(expo-src.u.f.msize), 0, buf_size*8); /* Convert to integer representation if negative. * equivalent to ~(value - 1). @@ -8969,7 +8969,7 @@ H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, } /* Right shift to drop off extra bits */ - H5T_bit_shift(int_buf, (ssize_t)(dst.u.f.msize-first), buf_size); + H5T_bit_shift(int_buf, (ssize_t)(dst.u.f.msize-first), 0, buf_size*8); if(do_round) { H5T_bit_inc(int_buf, 0, buf_size*8); @@ -8989,7 +8989,7 @@ H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, /* Right shift 1 bit to let the carried 1 fit in the mantissa, * and increment exponent by 1. */ - H5T_bit_shift(int_buf, -1, buf_size); + H5T_bit_shift(int_buf, -1, 0, buf_size*8); expo++; } } @@ -8997,7 +8997,7 @@ H5T_conv_i_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, } else { /* The bit sequence can fit mantissa part. Left shift to fit in from high-order of * bit position. */ - H5T_bit_shift(int_buf, (ssize_t)(dst.u.f.msize-first), buf_size); + H5T_bit_shift(int_buf, (ssize_t)(dst.u.f.msize-first), 0, buf_size*8); } |