From 6d71eaefe8b6e91e5568b8c99acba0d35380aeb1 Mon Sep 17 00:00:00 2001 From: schnetter Date: Sat, 29 Jan 2005 18:07:22 +0000 Subject: Use CCTK_BYTE instead of CCTK_CHAR. Add support for CCTK_INT1. CCTK_BYTE as UCHAR instead of CHAR. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOPanda/trunk@76 38c3d835-c875-442e-b0fe-21c19ce1d001 --- src/Output.c | 7 ++++++- src/Write.c | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Output.c b/src/Output.c index 2b3bc75..d04cf49 100644 --- a/src/Output.c +++ b/src/Output.c @@ -484,7 +484,7 @@ static int DumpVar (const cGH *GH, const ioRequest *request, const char *alias) switch (request->hdatatype) { - case CCTK_VARIABLE_CHAR: ainfo.esize_ = CHAR; break; + case CCTK_VARIABLE_BYTE: ainfo.esize_ = UCHAR; break; case CCTK_VARIABLE_INT: #ifdef CCTK_INTEGER_PRECISION_8 @@ -493,6 +493,8 @@ static int DumpVar (const cGH *GH, const ioRequest *request, const char *alias) ainfo.esize_ = INT32; break; #elif CCTK_INTEGER_PRECISION_2 ainfo.esize_ = INT16; break; +#elif CCTK_INTEGER_PRECISION_1 + ainfo.esize_ = INT8; break; #endif case CCTK_VARIABLE_REAL: @@ -502,6 +504,9 @@ static int DumpVar (const cGH *GH, const ioRequest *request, const char *alias) ainfo.esize_ = FLOAT64; break; #endif +#ifdef CCTK_INT1 + case CCTK_VARIABLE_INT1: ainfo.esize_ = INT8; break; +#endif #ifdef CCTK_INT2 case CCTK_VARIABLE_INT2: ainfo.esize_ = INT16; break; #endif diff --git a/src/Write.c b/src/Write.c index 9900d96..2566377 100644 --- a/src/Write.c +++ b/src/Write.c @@ -153,7 +153,7 @@ void IOPanda_getDumpData (const cGH *GH, int vindex, int timelevel, but that way produces much more efficient code */ l = 0; switch (CCTK_VarTypeI (vindex)) { - case CCTK_VARIABLE_CHAR: + case CCTK_VARIABLE_BYTE: char_ptr = (CCTK_BYTE *) *outme; for (k = start [2]; k <= end [2]; k += ioUtilGH->downsample [2]) for (j = start [1]; j <= end [1]; j += ioUtilGH->downsample [1]) -- cgit v1.2.3