From 059d7cec79787b2c5081399ce75a49bad2733039 Mon Sep 17 00:00:00 2001 From: schnetter Date: Sat, 29 Jan 2005 18:06:31 +0000 Subject: Use CCTK_BYTE instead of CCTK_CHAR. Store CCTK_BYTE as HDF5_NATIVE_UCHAR instead of HDF5_NATIVE_CHAR. Store CCTK_INT1 as HDF5_NATIVE_SCHAR instead of HDF5_NATIVE_CHAR. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5Util/trunk@126 7842ec3a-9562-4be5-9c5b-06ba18f2b668 --- src/DumpUtils.c | 2 +- src/RecoverVar.c | 2 +- src/ioHDF5UtilGH.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/DumpUtils.c b/src/DumpUtils.c index 9ee3ad9..fcf3d82 100644 --- a/src/DumpUtils.c +++ b/src/DumpUtils.c @@ -466,7 +466,7 @@ hid_t IOHDF5Util_DataType (const ioHDF5UtilGH *myGH, int cctk_type) switch (cctk_type) { - case CCTK_VARIABLE_CHAR: retval = HDF5_CHAR; break; + case CCTK_VARIABLE_BYTE: retval = HDF5_BYTE; break; case CCTK_VARIABLE_INT: retval = HDF5_INT; break; case CCTK_VARIABLE_REAL: retval = HDF5_REAL; break; case CCTK_VARIABLE_COMPLEX: retval = myGH->HDF5_COMPLEX; break; diff --git a/src/RecoverVar.c b/src/RecoverVar.c index f8e63da..593dda4 100644 --- a/src/RecoverVar.c +++ b/src/RecoverVar.c @@ -454,7 +454,7 @@ static int GetCommonAttributes (const cGH *GH, (strncmp (CCTK_VarTypeName (group_static_data.vartype), "CCTK_VARIABLE_INT", 17) == 0 || strcmp (CCTK_VarTypeName (group_static_data.vartype), - "CCTK_VARIABLE_CHAR") == 0)) || + "CCTK_VARIABLE_BYTE") == 0)) || (H5Tget_class (datatype) == H5T_COMPOUND && strncmp (CCTK_VarTypeName (group_static_data.vartype), "CCTK_VARIABLE_COMPLEX", 21) == 0); diff --git a/src/ioHDF5UtilGH.h b/src/ioHDF5UtilGH.h index 45e4ea7..3f68e94 100644 --- a/src/ioHDF5UtilGH.h +++ b/src/ioHDF5UtilGH.h @@ -115,8 +115,8 @@ /*** Define the different datatypes used for HDF5 I/O NOTE: the complex datatype is defined dynamically at runtime in Startup.c ***/ -/* char type is easy */ -#define HDF5_CHAR H5T_NATIVE_CHAR +/* byte type is easy */ +#define HDF5_BYTE H5T_NATIVE_UCHAR /* floating point types are architecture-independent, ie. a float has always 4 bytes, and a double has 8 bytes @@ -165,7 +165,7 @@ #endif #ifdef CCTK_INT1 -#define HDF5_INT1 H5T_NATIVE_CHAR +#define HDF5_INT1 H5T_NATIVE_SCHAR #endif #ifdef CCTK_INTEGER_PRECISION_8 -- cgit v1.2.3