diff options
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r-- | src/H5Tconv.c | 174 |
1 files changed, 87 insertions, 87 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 0317bbd..f08c510 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -147,15 +147,15 @@ H5FL_BLK_DEFINE_STATIC(array_seq); * * D_MAX: The maximum possible destination value. Source values which * are larger than D_MAX generate overflows. - * + * * The macros are implemented with a generic programming technique, similar * to templates in C++. The macro which defines the "core" part of the * conversion (which actually moves the data from the source to the destination) * is invoked inside the H5T_CONV "template" macro by "gluing" it together, * which allows the core conversion macro to be invoked as necessary. - * + * * The generic "core" macros are: (others are specific to particular conversion) - * + * * Suffix Description * ------ ----------- * xX: Generic Conversion where the destination is at least as @@ -578,7 +578,7 @@ H5T_conv_noop(hid_t UNUSED src_id, hid_t UNUSED dst_id, H5T_cdata_t *cdata, case H5T_CONV_FREE: break; - + default: HGOTO_ERROR (H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } @@ -675,43 +675,43 @@ H5T_conv_order_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, case 2: for (/*void*/; nelmts>=20; nelmts-=20) { H5_SWAP_BYTES(buf, 0, 1); /* 0 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 1 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 2 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 3 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 4 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 5 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 6 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 7 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 8 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 9 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 10 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 11 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 12 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 13 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 14 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 15 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 16 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 17 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 18 */ - buf += buf_stride; + buf += buf_stride; H5_SWAP_BYTES(buf, 0, 1); /* 19 */ buf += buf_stride; } @@ -1142,7 +1142,7 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, } else if (src->shared->size>=dst->shared->size) { double olap_d = HDceil((double)(dst->shared->size)/ (double)(src->shared->size-dst->shared->size)); - + olap = (size_t)olap_d; sp = dp = (uint8_t*)buf; direction = 1; @@ -1179,7 +1179,7 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, (sp<dp && sp+src->shared->size<=dp)); } #endif - + /* * Put the data in little endian order so our loops aren't so * complicated. We'll do all the conversion stuff assuming @@ -1266,7 +1266,7 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, dp += direction * dst->shared->size; } } - + break; default: @@ -1276,7 +1276,7 @@ H5T_conv_b_b(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, done: FUNC_LEAVE_NOAPI(ret_value); } - + /*------------------------------------------------------------------------- * Function: H5T_conv_struct_init @@ -1314,9 +1314,9 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, hid_t dxpl_id) H5T_t *type = NULL; hid_t tid; herr_t ret_value=SUCCEED; /* Return value */ - + FUNC_ENTER_NOAPI_NOINIT(H5T_conv_struct_init); - + if (!priv) { /* * Allocate private data structure and arrays. @@ -1411,7 +1411,7 @@ done: } -/*------------------------------------------------------------------------- +/*------------------------------------------------------------------------- * Function: H5T_conv_struct * * Purpose: Converts between compound data types. This is a soft @@ -1422,7 +1422,7 @@ done: * If sizeof detination type <= sizeof source type then * Convert member to destination type; * Move member as far left as possible; - * + * * For I=NELMTS..1 do * If not destination type then * Convert member to destination type; @@ -1625,7 +1625,7 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, /* Some other command we don't know about yet.*/ HGOTO_ERROR (H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } - + done: FUNC_LEAVE_NOAPI(ret_value); } @@ -1646,7 +1646,7 @@ done: * Move memb to BKG buffer for all elements * Else * Move member as far left as possible for all elements - * + * * For each member of the struct (in reverse order) * If not destination type then * Convert member to destination type for all elements @@ -1674,7 +1674,7 @@ done: * all of the field1's, then all field2's, etc. This can * drastically reduce the number of calls to H5T_convert() and * thereby eliminate most of the conversion constant overhead. - * + * * Robb Matzke, 2000-05-17 * Added the BKG_STRIDE argument to fix a design bug. If * BUF_STRIDE and BKG_STRIDE are both non-zero then each @@ -1726,7 +1726,7 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, HGOTO_ERROR (H5E_DATATYPE, H5E_CANTINIT, FAIL, "unable to initialize conversion data"); priv = (H5T_conv_struct_t *)(cdata->priv); src2dst = priv->src2dst; - + /* * If the destination type is not larger than the source type then * this conversion function is guaranteed to work (provided all @@ -1800,7 +1800,7 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, H5T_sort_value(src, NULL); H5T_sort_value(dst, NULL); - /* + /* * Calculate strides. If BUF_STRIDE is non-zero then convert one * data element at every BUF_STRIDE bytes through the main buffer * (BUF), leaving the result of each conversion at the same @@ -1892,7 +1892,7 @@ H5T_conv_struct_opt(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, /* Some other command we don't know about yet.*/ HGOTO_ERROR (H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } - + done: FUNC_LEAVE_NOAPI(ret_value); } @@ -1924,7 +1924,7 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) unsigned length; /*nelmts in map array */ unsigned i, j; /*counters */ herr_t ret_value=SUCCEED; /* Return value */ - + FUNC_ENTER_NOAPI_NOINIT(H5T_conv_enum_init); cdata->need_bkg = H5T_BKG_NO; @@ -1960,7 +1960,7 @@ H5T_conv_enum_init(H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata) * * A: The source data type size matches one of our native data type * sizes. - * + * * B: After casting the source value bit pattern to a native type * the size of the range of values is less than 20% larger than * the number of values. @@ -2067,7 +2067,7 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t i; /*counters */ H5T_enum_struct_t *priv = (H5T_enum_struct_t*)(cdata->priv); herr_t ret_value=SUCCEED; /* Return value */ - + FUNC_ENTER_NOAPI(H5T_conv_enum, FAIL); switch (cdata->command) { @@ -2115,7 +2115,7 @@ H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * conversion algorithm, which is turned on by non-zero priv->length */ H5T_sort_name(dst, NULL); if (!priv->length) H5T_sort_value(src, NULL); - + /* * Direction of conversion. */ @@ -2204,7 +2204,7 @@ done: * * For every VL struct in the main buffer: * 1. Allocate space for temporary dst VL data (reuse buffer - * if possible) + * if possible) * 2. Copy VL data from src buffer into dst buffer * 3. Convert VL data into dst representation * 4. Allocate buffer in dst heap @@ -2226,9 +2226,9 @@ done: * destination values are packed. * * Raymond Lu, 26 June, 2002 - * Background buffer is used for freeing heap objects storing - * old data. At this moment, it only frees the first level of - * VL datatype. It doesn't handle nested VL datatypes. + * Background buffer is used for freeing heap objects storing + * old data. At this moment, it only frees the first level of + * VL datatype. It doesn't handle nested VL datatypes. * *------------------------------------------------------------------------- */ @@ -2343,7 +2343,7 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, if ((tmp_buf=H5FL_BLK_MALLOC(vlen_seq,tmp_buf_size))==NULL) HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); } /* end if */ - + /* Get the allocation info */ if(H5T_vlen_get_alloc_info(dxpl_id,&vl_alloc_info)<0) HGOTO_ERROR(H5E_DATATYPE, H5E_CANTGET, FAIL, "unable to retrieve VL allocation info"); @@ -2416,7 +2416,7 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, dst_size=seq_len*dst_base_size; /* Check if conversion buffer is large enough, resize if - * necessary */ + * necessary */ if(conv_buf_size<MAX(src_size,dst_size)) { /* Only allocate conversion buffer in H5T_VLEN_MIN_CONF_BUF_SIZE increments */ conv_buf_size=((MAX(src_size,dst_size)/H5T_VLEN_MIN_CONF_BUF_SIZE)+1)*H5T_VLEN_MIN_CONF_BUF_SIZE; @@ -2439,7 +2439,7 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, HGOTO_ERROR (H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for type conversion"); } /* end if */ - /* If we are writing and there is a nested VL type, read + /* If we are writing and there is a nested VL type, read * the sequence into the background buffer */ if(nested) { uint8_t *tmp=b; @@ -2516,7 +2516,7 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, default: /* Some other command we don't know about yet.*/ HGOTO_ERROR (H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ - + done: /* If the conversion buffer doesn't need to be freed, reset its pointer */ if(write_to_file && noop_conv) @@ -2678,7 +2678,7 @@ H5T_conv_array(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, default: /* Some other command we don't know about yet.*/ HGOTO_ERROR (H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } /* end switch */ - + done: FUNC_LEAVE_NOAPI(ret_value); } /* end H5T_conv_array() */ @@ -2724,7 +2724,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, ssize_t sfirst; /*a signed version of `first' */ size_t i; /*Local index variables */ herr_t ret_value=SUCCEED; /* Return value */ - + FUNC_ENTER_NOAPI(H5T_conv_i_i, FAIL); switch (cdata->command) { @@ -2742,7 +2742,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, HGOTO_ERROR (H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "destination size is too large"); cdata->need_bkg = H5T_BKG_NO; break; - + case H5T_CONV_FREE: break; @@ -2764,7 +2764,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, } else if (src->shared->size>=dst->shared->size) { double olap_d = HDceil((double)(dst->shared->size)/ (double)(src->shared->size-dst->shared->size)); - + olap = (size_t)olap_d; sp = dp = (uint8_t*)buf; direction = 1; @@ -2799,7 +2799,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, assert ((dp<sp && dp+dst->shared->size<=sp) || (sp<dp && sp+src->shared->size<=dp)); } #endif - + /* * Put the data in little endian order so our loops aren't so * complicated. We'll do all the conversion stuff assuming @@ -2828,7 +2828,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, * Set the destination to zero. */ H5T_bit_set (d, dst->shared->u.atomic.offset, dst->shared->u.atomic.prec, FALSE); - + } else if (H5T_SGN_NONE==src->shared->u.atomic.u.i.sign && H5T_SGN_NONE==dst->shared->u.atomic.u.i.sign) { /* @@ -2851,7 +2851,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, H5T_bit_copy (d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset, dst->shared->u.atomic.prec); } - + } else if (H5T_SGN_2==src->shared->u.atomic.u.i.sign && H5T_SGN_NONE==dst->shared->u.atomic.u.i.sign) { /* @@ -2880,7 +2880,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, H5T_bit_copy (d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset, dst->shared->u.atomic.prec); } - + } else if (H5T_SGN_NONE==src->shared->u.atomic.u.i.sign && H5T_SGN_2==dst->shared->u.atomic.u.i.sign) { /* @@ -2914,7 +2914,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, ssize_t sfz = H5T_bit_find (s, src->shared->u.atomic.offset, src->shared->u.atomic.prec-1, H5T_BIT_MSB, FALSE); size_t fz = (size_t)sfz; - + if (sfz>=0 && fz+1>=dst->shared->u.atomic.prec) { /*overflow*/ if (!H5T_overflow_g || (H5T_overflow_g)(src_id, dst_id, s, d)<0) { @@ -2927,7 +2927,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, } else { H5T_bit_copy (d, dst->shared->u.atomic.offset, s, src->shared->u.atomic.offset, dst->shared->u.atomic.prec); } - + } else { /* * Source and destination are both signed but the source @@ -2993,7 +2993,7 @@ H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, dp += direction * dst->shared->size; } } - + break; default: @@ -3062,7 +3062,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t i; /*miscellaneous counters */ size_t implied; /*destination implied bits */ herr_t ret_value=SUCCEED; /*return value */ - + FUNC_ENTER_NOAPI(H5T_conv_f_f, FAIL); switch (cdata->command) { @@ -3142,7 +3142,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, (sp<dp && sp+src_p->shared->size<=dp)); } #endif - + /* * Put the data in little endian order so our loops aren't so * complicated. We'll do all the conversion stuff assuming @@ -3175,9 +3175,9 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, 1); H5T_bit_set (d, dst.u.f.epos, dst.u.f.esize, TRUE); H5T_bit_set (d, dst.u.f.mpos, dst.u.f.msize, FALSE); - /*If the destination no implied mantissa bit, we'll need to set + /*If the destination no implied mantissa bit, we'll need to set *the 1st bit of mantissa to 1. The Intel-Linux long double is - *this case.*/ + *this case.*/ if (H5T_NORM_NONE==dst.u.f.norm) H5T_bit_set (d, dst.u.f.mpos+dst.u.f.msize-1, 1, TRUE); goto padding; @@ -3186,14 +3186,14 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, H5T_BIT_LSB, TRUE)<0 && H5T_bit_find (s, src.u.f.epos, src.u.f.esize, H5T_BIT_LSB, FALSE)<0) { /*This is a special case for the source of no implied mantissa bit. - *If the exponent bits are all 1s and only the 1st bit of mantissa + *If the exponent bits are all 1s and only the 1st bit of mantissa *is set to 1. It's infinity. The Intel-Linux "long double" is this case.*/ /* +Inf or -Inf */ H5T_bit_copy (d, dst.u.f.sign, s, src.u.f.sign, 1); H5T_bit_set (d, dst.u.f.epos, dst.u.f.esize, TRUE); H5T_bit_set (d, dst.u.f.mpos, dst.u.f.msize, FALSE); - /*If the destination no implied mantissa bit, we'll need to set - *the 1st bit of mantissa to 1.*/ + /*If the destination no implied mantissa bit, we'll need to set + *the 1st bit of mantissa to 1.*/ if (H5T_NORM_NONE==dst.u.f.norm) H5T_bit_set (d, dst.u.f.mpos+dst.u.f.msize-1, 1, TRUE); goto padding; @@ -3218,7 +3218,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, if(expo==0) denormalized=TRUE; - + /* * Set markers for the source mantissa, excluding the leading `1' * (might be implied). @@ -3240,7 +3240,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, assert("normalization method not implemented yet" && 0); HDabort(); } - + /* * The sign for the destination is the same as the sign for the * source in all cases. @@ -3339,7 +3339,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, implied = 2; } } else if(H5T_bit_get_d(s, mpos+bitno-1, 1) && denormalized) - /*For either source or destination, denormalized value doesn't increment carry.*/ + /*For either source or destination, denormalized value doesn't increment carry.*/ H5T_bit_inc(s, mpos+bitno-1, 1+msize-bitno); } else @@ -3365,7 +3365,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, } if (mrsh+msize>=dst.u.f.msize) { H5T_bit_copy(d, dst.u.f.mpos, - s, (mpos+msize+mrsh-dst.u.f.msize), + s, (mpos+msize+mrsh-dst.u.f.msize), dst.u.f.msize-mrsh); } else { H5T_bit_copy(d, dst.u.f.mpos+dst.u.f.msize-(mrsh+msize), @@ -3374,7 +3374,7 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, FALSE); } } - + /* Write the exponent */ if (carry) { expo++; @@ -3452,9 +3452,9 @@ H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, dp += direction * dst_p->shared->size; } } - + break; - + default: HGOTO_ERROR (H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } @@ -3496,7 +3496,7 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, uint8_t *s, *sp, *d, *dp; /*src and dst traversal pointers*/ uint8_t *dbuf=NULL; /*temp buf for overlap convers. */ herr_t ret_value=SUCCEED; /* Return value */ - + FUNC_ENTER_NOAPI(H5T_conv_s_s, FAIL); switch (cdata->command) { @@ -3556,7 +3556,7 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, /* Allocate the overlap buffer */ if (NULL==(dbuf=H5MM_malloc(dst->shared->size))) HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "memory allocation failed for string conversion"); - + /* The conversion loop. */ for (elmtno=0; elmtno<nelmts; elmtno++) { @@ -3583,7 +3583,7 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, (sp<dp && sp+src->shared->size<=dp)); } #endif - + /* Copy characters from source to destination */ switch (src->shared->u.atomic.u.s.pad) { case H5T_STR_NULLTERM: @@ -3634,12 +3634,12 @@ H5T_conv_s_s (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, d[nchars++] = '\0'; d[dst->shared->size-1] = '\0'; break; - + case H5T_STR_NULLPAD: while (nchars<dst->shared->size) d[nchars++] = '\0'; break; - + case H5T_STR_SPACEPAD: while (nchars<dst->shared->size) d[nchars++] = ' '; @@ -4367,7 +4367,7 @@ H5T_conv_ushort_schar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5T_conv_ushort_schar, FAIL); - + H5T_CONV_Us(USHORT, SCHAR, unsigned short, signed char, -, SCHAR_MAX); done: @@ -4433,7 +4433,7 @@ H5T_conv_short_ushort(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5T_conv_short_ushort, FAIL); - + H5T_CONV_su(SHORT, USHORT, short, unsigned short, -, -); done: @@ -4994,7 +4994,7 @@ H5T_conv_uint_uchar(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, herr_t ret_value=SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(H5T_conv_uint_uchar, FAIL); - + H5T_CONV_Uu(UINT, UCHAR, unsigned, unsigned char, -, UCHAR_MAX); done: @@ -6757,7 +6757,7 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, if (NULL==(src=H5I_object(src_id)) || NULL==H5I_object(dst_id)) HGOTO_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a data type"); - + s = (uint8_t*)buf + (buf_stride?buf_stride:4)*(nelmts-1); d = (uint8_t*)buf + (buf_stride?buf_stride:8)*(nelmts-1); for (elmtno=0; elmtno<nelmts; elmtno++) { @@ -6792,7 +6792,7 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, default: HGOTO_ERROR (H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported integer sign method"); } - + /* * Where is the most significant bit that is set? We could do * this in a loop, but testing it this way might be faster. @@ -6845,7 +6845,7 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, exponent = (mbits - 1) + 1023; d[7] = (sign<<7) | ((exponent>>4) & 0x7f); d[6] = (exponent & 0x0f) << 4; - + /* * The mantissa. */ @@ -6997,7 +6997,7 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, d[5] = s[0]; d[4] = d[3] = d[2] = d[1] = d[0] = 0; break; - + case 12: d[6] |= ((s[1]<<1) | (s[0]>>7)) & 0x0f; d[5] = (s[0]<<1); @@ -7088,7 +7088,7 @@ H5T_conv_i32le_f64le (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, /* Some other command we don't know about yet.*/ HGOTO_ERROR (H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unknown conversion command"); } - + done: FUNC_LEAVE_NOAPI(ret_value); } |