summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-10-21 16:04:08 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-10-21 16:04:08 (GMT)
commitcacc8fa4c6bd301339ce78e8ab41a31ab8bdf654 (patch)
treef364eb370caa3dff914522121a67cc8f4e297c20 /src/H5Tconv.c
parent229d19bc72ee1775c19428a46ac8e89618cfdb0b (diff)
downloadhdf5-cacc8fa4c6bd301339ce78e8ab41a31ab8bdf654.zip
hdf5-cacc8fa4c6bd301339ce78e8ab41a31ab8bdf654.tar.gz
hdf5-cacc8fa4c6bd301339ce78e8ab41a31ab8bdf654.tar.bz2
[svn-r9445] Purpose: Bug fix
Description: "char" was considered as always "signed char" in data type conversion. However, ISO C leaves the definition of "char" to individual implementation. i.e. for IBM AIX C compiler, it's treated as "unsigned char". Solution: Changed all "char" to "signed char". Don't even do "char" anymore because its definition is up to each vendor. Platforms tested: h5committest
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 30f41fe..871e8e1 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -6976,9 +6976,9 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_conv_char_float
+ * Function: H5T_conv_schar_float
*
- * Purpose: Convert native char to native float using hardware.
+ * Purpose: Convert native signed char to native float using hardware.
* This is a fast special case.
*
* Return: Non-negative on success/Negative on failure
@@ -6991,16 +6991,16 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5T_conv_char_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+H5T_conv_schar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_char_float, FAIL);
+ FUNC_ENTER_NOAPI(H5T_conv_schar_float, FAIL);
- H5T_CONV_xF(SCHAR, FLOAT, char, float, -, -);
+ H5T_CONV_xF(SCHAR, FLOAT, signed char, float, -, -);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -7008,9 +7008,9 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_conv_char_double
+ * Function: H5T_conv_schar_double
*
- * Purpose: Convert native char to native double using hardware.
+ * Purpose: Convert native signed char to native double using hardware.
* This is a fast special case.
*
* Return: Non-negative on success/Negative on failure
@@ -7023,16 +7023,16 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5T_conv_char_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+H5T_conv_schar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_char_double, FAIL);
+ FUNC_ENTER_NOAPI(H5T_conv_schar_double, FAIL);
- H5T_CONV_xF(SCHAR, DOUBLE, char, double, -, -);
+ H5T_CONV_xF(SCHAR, DOUBLE, signed char, double, -, -);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -7619,9 +7619,9 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_conv_float_char
+ * Function: H5T_conv_float_schar
*
- * Purpose: Convert native float to native char using
+ * Purpose: Convert native float to native signed char using
* hardware. This is a fast special case.
*
* Return: Non-negative on success/Negative on failure
@@ -7634,16 +7634,16 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5T_conv_float_char (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+H5T_conv_float_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_float_char, FAIL);
+ FUNC_ENTER_NOAPI(H5T_conv_float_schar, FAIL);
- H5T_CONV_Fx(FLOAT, SCHAR, float, char, CHAR_MIN, CHAR_MAX);
+ H5T_CONV_Fx(FLOAT, SCHAR, float, signed char, SCHAR_MIN, SCHAR_MAX);
done:
FUNC_LEAVE_NOAPI(ret_value);
@@ -7683,9 +7683,9 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5T_conv_double_char
+ * Function: H5T_conv_double_schar
*
- * Purpose: Convert native float to native char using
+ * Purpose: Convert native float to native signed char using
* hardware. This is a fast special case.
*
* Return: Non-negative on success/Negative on failure
@@ -7698,16 +7698,16 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5T_conv_double_char (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+H5T_conv_double_schar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg,
hid_t UNUSED dxpl_id)
{
herr_t ret_value=SUCCEED; /* Return value */
- FUNC_ENTER_NOAPI(H5T_conv_double_char, FAIL);
+ FUNC_ENTER_NOAPI(H5T_conv_double_schar, FAIL);
- H5T_CONV_Fx(DOUBLE, SCHAR, double, char, CHAR_MIN, CHAR_MAX);
+ H5T_CONV_Fx(DOUBLE, SCHAR, double, signed char, SCHAR_MIN, SCHAR_MAX);
done:
FUNC_LEAVE_NOAPI(ret_value);