From e45e85190bf33ce8f49e4b919cab6fa60d4ff967 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Thu, 18 Mar 2004 13:48:02 -0500 Subject: [svn-r8265] Purpose: Code cleanup Description: Some printing commands left there for debugging. Solution: Took them out. Platforms tested: fuss(RH8). Simple change --- src/H5Tbit.c | 42 --------------------------------- src/H5Tconv.c | 75 +++++++++-------------------------------------------------- src/H5Tpkg.h | 1 - 3 files changed, 11 insertions(+), 107 deletions(-) diff --git a/src/H5Tbit.c b/src/H5Tbit.c index c986cfa..d5fbdcb 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -547,48 +547,6 @@ H5T_bit_inc(uint8_t *buf, size_t start, size_t size) /*------------------------------------------------------------------------- - * Function: H5T_bit_dec2 - * - * Purpose: decrement part of a bit field by 1. - * At this moment, START is always 0 and SIZE is a multiply - * of 8(in bit). This is different from H5T_bit_inc. - * - * Return: void - * - * - * Programmer: Raymond Lu - * Wednesday, Jan 28, 2004 - * - * Modifications: - * - * Need to generalize it to handle random START and SIZE like - * H5T_bit_inc. - * - * Older algorithm. Take it out!!! - * - *------------------------------------------------------------------------- - */ -void -H5T_bit_dec2(uint8_t *buf, size_t start, size_t size) -{ - size_t idx; - - assert(buf); - assert(size); - assert(start==0); - - for(idx=0; idx < size/8; idx++) { - if(buf[idx] != 0x00) { - buf[idx] -= 1; - break; - } else if(buf[idx]==0x00) { - buf[idx] -= 1; - } - } -} - - -/*------------------------------------------------------------------------- * Function: H5T_bit_dec * * Purpose: decrement part of a bit field by substracting 1. The bit diff --git a/src/H5Tconv.c b/src/H5Tconv.c index e686faa..bb66141 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -8399,14 +8399,13 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, int direction; /*forward or backward traversal */ hsize_t elmtno; /*element number */ size_t half_size; /*half the type size */ - hsize_t olap; /*num overlapping elements */ ssize_t bitno; /*bit number */ + hsize_t olap; /*num overlapping elements */ uint8_t *s, *sp, *d, *dp; /*source and dest traversal ptrs*/ uint8_t dbuf[64]; /*temp destination buffer */ /* Conversion-related variables */ hssize_t expo; /*source exponent */ - hssize_t mant; /*source mantissa */ hssize_t sign; /*source sign bit value */ uint8_t *int_buf; /*buffer for temporary value */ size_t buf_size; /*buffer size for temporary value */ @@ -8597,37 +8596,19 @@ H5T_conv_f_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, } else msize = src.u.f.msize; - /* Keep the print commands for future debugging */ - /*fprintf(stderr, "expo=%ld ", expo); - fprintf(stderr, "src.u.f.msize=%d ", src.u.f.msize); - fprintf(stderr, "mant=0x%016x\n", mant);*/ - /* * Shift mantissa part by exponent minus mantissa size(right shift), * or by mantissa size minus exponent(left shift). */ - H5T_bit_shift(int_buf, expo - src.u.f.msize, buf_size); - - /*fprintf(stderr, "int_buf="); - for(i=0; i