Commit e1b85556 authored by Thomas Jahns's avatar Thomas Jahns 🤸
Browse files

Move checksumming frontend to new files.

parent d71ee84f
......@@ -189,6 +189,8 @@ src/cdi.h -text
src/cdi.inc -text
src/cdiFortran.c -text
src/cdiFortran.h -text
src/cdi_cksum.c -text
src/cdi_cksum.h -text
src/cdi_error.c -text
src/cdi_int.c -text
src/cdi_int.h -text
......
......@@ -36,6 +36,8 @@ libcdi_la_SOURCES = \
dmemory.h \
cksum.c \
cksum.h \
cdi_cksum.c \
cdi_cksum.h \
pio_util.c \
pio_util.h \
dtypes.h \
......
......@@ -117,9 +117,9 @@ LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES)
libcdi_la_DEPENDENCIES =
am_libcdi_la_OBJECTS = basetime.lo binary.lo calendar.lo cdf.lo \
cdf_int.lo cdi_error.lo cdi_util.lo cdiFortran.lo \
cgribexlib.lo dmemory.lo cksum.lo pio_util.lo error.lo \
extralib.lo file.lo gaussgrid.lo gribapi.lo grid.lo ieglib.lo \
institution.lo model.lo namespace.lo serialize.lo \
cgribexlib.lo dmemory.lo cksum.lo cdi_cksum.lo pio_util.lo \
error.lo extralib.lo file.lo gaussgrid.lo gribapi.lo grid.lo \
ieglib.lo institution.lo model.lo namespace.lo serialize.lo \
resource_handle.lo servicelib.lo stream_cdf.lo \
stream_cgribex.lo stream_ext.lo stream_grb.lo \
stream_gribapi.lo stream_history.lo stream_ieg.lo cdi_int.lo \
......@@ -384,6 +384,8 @@ libcdi_la_SOURCES = \
dmemory.h \
cksum.c \
cksum.h \
cdi_cksum.c \
cdi_cksum.h \
pio_util.c \
pio_util.h \
dtypes.h \
......@@ -609,6 +611,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdf_int.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdiFortran.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_cksum.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_error.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_int.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cdi_util.Plo@am__quote@
......
#include "cdi_cksum.h"
double cdiCheckSum(int type, int count, void * buffer)
{
return 0.0;
}
#ifndef CDI_CKSUM_H_
#define CDI_CKSUM_H_
double cdiCheckSum(int type, int count, void *data);
#endif
......@@ -12,6 +12,7 @@
#include "dmemory.h"
#include "cdi.h"
#include "cdi_cksum.h"
#include "cdi_int.h"
#include "gribapi.h"
#ifdef HAVE_LIBNETCDF
......@@ -745,12 +746,12 @@ streamPack(void * streamptr, void * packBuffer, int packBufferSize,
intBuffer[10] = cdiHaveMissval;
serializePack(intBuffer, streamNint, DATATYPE_INT, packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_INT, streamNint, intBuffer);
d = cdiCheckSum(DATATYPE_INT, streamNint, intBuffer);
serializePack(&d, 1, DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context);
serializePack(&cdiDefaultMissval, 1, DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context);
serializePack(streamP->filename, intBuffer[2], DATATYPE_TXT, packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_TXT, intBuffer[2], &streamP->filename);
d = cdiCheckSum(DATATYPE_TXT, intBuffer[2], &streamP->filename);
serializePack(&d, 1, DATATYPE_FLT64, packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -766,7 +767,7 @@ streamUnpack(char * unpackBuffer, int unpackBufferSize,
intBuffer, streamNint, DATATYPE_INT, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_INT, streamNint, intBuffer ) == d);
xassert(cdiCheckSum(DATATYPE_INT, streamNint, intBuffer) == d);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&cdiDefaultMissval, 1, DATATYPE_FLT64, context);
......@@ -774,7 +775,7 @@ streamUnpack(char * unpackBuffer, int unpackBufferSize,
&filename, intBuffer[2], DATATYPE_TXT, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(d == xchecksum(DATATYPE_TXT, intBuffer[2], filename));
xassert(d == cdiCheckSum(DATATYPE_TXT, intBuffer[2], filename));
streamID = streamOpenWrite ( filename, intBuffer[1] );
xassert ( streamID >= 0 &&
namespaceAdaptKey ( intBuffer[0], nspTarget ) == streamID );
......
......@@ -8,6 +8,7 @@
#include "dmemory.h"
#include "cdi.h"
#include "cdi_cksum.h"
#include "cdi_int.h"
#include "grid.h"
#include "gaussgrid.h"
......@@ -4546,7 +4547,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_INT, gridNint, intBuffer) == d);
xassert(cdiCheckSum(DATATYPE_INT, gridNint, intBuffer) == d);
xassert(namespaceAdaptKey(intBuffer[0], nspTarget) == gridP->self);
gridP->type = intBuffer[1];
......@@ -4585,7 +4586,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->rowlon, gridP->nrowlon , DATATYPE_INT, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_INT, gridP->nrowlon, gridP->rowlon) == d);
xassert(cdiCheckSum(DATATYPE_INT, gridP->nrowlon, gridP->rowlon) == d);
}
{
......@@ -4593,7 +4594,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
doubleBuffer, gridNdouble, DATATYPE_FLT64, context);
xassert(doubleBuffer[24]
== xchecksum(DATATYPE_FLT, gridNdouble, doubleBuffer));
== cdiCheckSum(DATATYPE_FLT, gridNdouble, doubleBuffer));
gridP->xfirst = doubleBuffer[0];
gridP->yfirst = doubleBuffer[1];
......@@ -4633,7 +4634,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->xvals, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, gridP->xvals) == d );
xassert(cdiCheckSum(DATATYPE_FLT, size, gridP->xvals) == d );
}
if (memberMask & gridHasYValsFlag)
......@@ -4648,7 +4649,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->yvals, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, gridP->yvals ) == d);
xassert(cdiCheckSum(DATATYPE_FLT, size, gridP->yvals) == d);
}
if (memberMask & gridHasAreaFlag)
......@@ -4659,7 +4660,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->area, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, gridP->area) == d);
xassert(cdiCheckSum(DATATYPE_FLT, size, gridP->area) == d);
}
if (memberMask & gridHasXBoundsFlag)
......@@ -4675,7 +4676,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->xbounds, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, gridP->xbounds ) == d);
xassert(cdiCheckSum(DATATYPE_FLT, size, gridP->xbounds) == d);
}
if (memberMask & gridHasYBoundsFlag)
......@@ -4691,7 +4692,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->ybounds, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, gridP->ybounds ) == d);
xassert(cdiCheckSum(DATATYPE_FLT, size, gridP->ybounds) == d);
}
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
......@@ -4699,7 +4700,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(d == xchecksum(DATATYPE_TXT, gridNstrings * CDI_MAX_NAME, charBuffer));
xassert(d == cdiCheckSum(DATATYPE_TXT, gridNstrings * CDI_MAX_NAME, charBuffer));
memcpy ( gridP->xname , &charBuffer[CDI_MAX_NAME * 0], CDI_MAX_NAME );
memcpy ( gridP->yname , &charBuffer[CDI_MAX_NAME * 1], CDI_MAX_NAME );
......@@ -4720,7 +4721,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->reference, referenceSize, DATATYPE_TXT, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_TXT, referenceSize, gridP->reference ) == d );
xassert(cdiCheckSum(DATATYPE_TXT, referenceSize, gridP->reference) == d);
}
if (memberMask & gridHasMaskFlag)
......@@ -4731,7 +4732,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->mask, gridP->size, DATATYPE_UCHAR, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_TXT, gridP->size, gridP->mask ) == d);
xassert(cdiCheckSum(DATATYPE_TXT, gridP->size, gridP->mask) == d);
}
if (memberMask & gridHasGMEMaskFlag)
......@@ -4742,7 +4743,7 @@ gridUnpack(char * unpackBuffer, int unpackBufferSize,
gridP->mask_gme, gridP->size, DATATYPE_UCHAR, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_TXT, gridP->size, gridP->mask_gme ) == d);
xassert(cdiCheckSum(DATATYPE_TXT, gridP->size, gridP->mask_gme) == d);
}
}
......@@ -4789,7 +4790,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(intBuffer, gridNint, DATATYPE_INT,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_INT, gridNint, intBuffer);
d = cdiCheckSum(DATATYPE_INT, gridNint, intBuffer);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -4799,7 +4800,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
xassert((size = gridP->nrowlon));
serializePack(gridP->rowlon, size, DATATYPE_INT,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_INT , size, gridP->rowlon);
d = cdiCheckSum(DATATYPE_INT , size, gridP->rowlon);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -4831,7 +4832,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
doubleBuffer[21] = gridP->xpole;
doubleBuffer[22] = gridP->ypole;
doubleBuffer[23] = gridP->angle;
doubleBuffer[24] = xchecksum(DATATYPE_FLT, gridNdouble - 1, doubleBuffer);
doubleBuffer[24] = cdiCheckSum(DATATYPE_FLT, gridNdouble - 1, doubleBuffer);
serializePack(doubleBuffer, gridNdouble, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
......@@ -4847,7 +4848,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(gridP->xvals, size, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, size, gridP->xvals);
d = cdiCheckSum(DATATYPE_FLT, size, gridP->xvals);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -4861,7 +4862,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
xassert(size);
serializePack(gridP->yvals, size, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, size, gridP->yvals);
d = cdiCheckSum(DATATYPE_FLT, size, gridP->yvals);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -4872,7 +4873,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(gridP->area, gridP->size, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, gridP->size, gridP->area);
d = cdiCheckSum(DATATYPE_FLT, gridP->size, gridP->area);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -4888,7 +4889,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(gridP->xbounds, size, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, size, gridP->xbounds);
d = cdiCheckSum(DATATYPE_FLT, size, gridP->xbounds);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -4904,7 +4905,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(gridP->ybounds, size, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, size, gridP->ybounds);
d = cdiCheckSum(DATATYPE_FLT, size, gridP->ybounds);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -4920,7 +4921,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack( charBuffer, gridNstrings * CDI_MAX_NAME, DATATYPE_TXT,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_TXT, gridNstrings * CDI_MAX_NAME, charBuffer);
d = cdiCheckSum(DATATYPE_TXT, gridNstrings * CDI_MAX_NAME, charBuffer);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
......@@ -4931,7 +4932,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
packBuffer, packBufferSize, packBufferPos, context);
serializePack(gridP->reference, size, DATATYPE_TXT,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_TXT, size, gridP->reference);
d = cdiCheckSum(DATATYPE_TXT, size, gridP->reference);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -4941,7 +4942,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
xassert((size = gridP->size));
serializePack(gridP->mask, size, DATATYPE_UCHAR,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_TXT, size, gridP->mask);
d = cdiCheckSum(DATATYPE_TXT, size, gridP->mask);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -4952,7 +4953,7 @@ gridPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(gridP->mask_gme, size, DATATYPE_UCHAR,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_TXT, size, gridP->mask);
d = cdiCheckSum(DATATYPE_TXT, size, gridP->mask);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......
......@@ -95,6 +95,7 @@ EOR
c="dmemory.c \
dmemory.h \
cksum.c \
cdi_cksum.c \
taxis.c \
timebase.c \
calendar.c \
......@@ -142,7 +143,7 @@ c="dmemory.c \
h="cdi_limits.h resource_handle.h taxis.h dtypes.h file.h service.h extra.h \
ieg.h cdi.h timebase.h calendar.h basetime.h datetime.h namespace.h \
cksum.h error.c error.h cdi_int.h cgribex.h gribapi.h \
cksum.h cdi_cksum.h error.c error.h cdi_int.h cgribex.h gribapi.h \
stream_cgribex.h stream_gribapi.h stream_grb.h stream_cdf.h \
tablepar.h table.h gaussgrid.h grid.h zaxis.h varscan.h binary.h swap.h \
service.h stream_srv.h stream_ext.h stream_ieg.h cdf_int.h \
......
......@@ -171,14 +171,6 @@ void pcdiDebugMsg2 ( const char *filename, const char *functionname, int line,
#endif
/****************************************************/
double xchecksum ( int type, int count, void * buffer )
{
return 0.0;
}
/****************************************************/
void printArray ( const char * cdiPioDebugString, char * ps, const void * array, int n,
......
......@@ -125,8 +125,6 @@ sum_int(size_t n, int *a)
}
double xchecksum ( int, int, void * );
void printArray ( const char *, char *, const void *, int, int, const char *, const char *, int );
#define xprintArray(ps,array,n,datatype) \
if ( ddebug ) \
......
......@@ -9,6 +9,7 @@
#include "cdi.h"
#include "error.h"
#include "taxis.h"
#include "cdi_cksum.h"
#include "cdi_int.h"
#include "calendar.h"
#include "pio_util.h"
......@@ -1333,7 +1334,7 @@ taxisUnpack(char * unpackBuffer, int unpackBufferSize, int * unpackBufferPos,
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_INT, taxisNint, intBuffer) == d);
xassert(cdiCheckSum(DATATYPE_INT, taxisNint, intBuffer) == d);
taxisInit();
......@@ -1411,7 +1412,7 @@ taxisPack(void * voidP, void * packBuffer, int packBufferSize, int * packBufferP
serializePack(intBuffer, taxisNint, DATATYPE_INT,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_INT, taxisNint, intBuffer);
d = cdiCheckSum(DATATYPE_INT, taxisNint, intBuffer);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
if (taxisP->name)
......
......@@ -9,6 +9,7 @@
#include "dmemory.h"
#include "cdi.h"
#include "cdi_cksum.h"
#include "cdi_int.h"
#include "pio_util.h"
#include "resource_handle.h"
......@@ -1692,7 +1693,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert ( xchecksum ( DATATYPE_INT, zaxisNint, intBuffer ) == d );
xassert(cdiCheckSum(DATATYPE_INT, zaxisNint, intBuffer) == d);
zaxisInit ();
......@@ -1719,7 +1720,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
zaxisP->vals, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, zaxisP->vals) == d);
xassert(cdiCheckSum(DATATYPE_FLT, size, zaxisP->vals) == d);
}
if (memberMask & lbounds)
......@@ -1732,7 +1733,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
zaxisP->lbounds, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, zaxisP->lbounds) == d);
xassert(cdiCheckSum(DATATYPE_FLT, size, zaxisP->lbounds) == d);
}
if (memberMask & ubounds)
......@@ -1745,7 +1746,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
zaxisP->ubounds, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, zaxisP->ubounds) == d);
xassert(cdiCheckSum(DATATYPE_FLT, size, zaxisP->ubounds) == d);
}
if (memberMask & weights)
......@@ -1758,7 +1759,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
zaxisP->weights, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, zaxisP->weights) == d);
xassert(cdiCheckSum(DATATYPE_FLT, size, zaxisP->weights) == d);
}
if ( memberMask & vct )
......@@ -1771,7 +1772,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
zaxisP->vct, size, DATATYPE_FLT64, context);
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(xchecksum(DATATYPE_FLT, size, zaxisP->vct) == d);
xassert(cdiCheckSum(DATATYPE_FLT, size, zaxisP->vct) == d);
}
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
......@@ -1779,7 +1780,7 @@ zaxisUnpack(char * unpackBuffer, int unpackBufferSize,
serializeUnpack(unpackBuffer, unpackBufferSize, unpackBufferPos,
&d, 1, DATATYPE_FLT64, context);
xassert(d == xchecksum(DATATYPE_TXT, zaxisNstrings * CDI_MAX_NAME, charBuffer));
xassert(d == cdiCheckSum(DATATYPE_TXT, zaxisNstrings * CDI_MAX_NAME, charBuffer));
memcpy ( zaxisP->name, &charBuffer[CDI_MAX_NAME * 0], CDI_MAX_NAME );
memcpy ( zaxisP->longname, &charBuffer[CDI_MAX_NAME * 1], CDI_MAX_NAME );
......@@ -1810,7 +1811,7 @@ zaxisPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(intBuffer, zaxisNint, DATATYPE_INT,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum ( DATATYPE_INT, zaxisNint, intBuffer );
d = cdiCheckSum(DATATYPE_INT, zaxisNint, intBuffer);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
......@@ -1820,7 +1821,7 @@ zaxisPack(void * voidP, void * packBuffer, int packBufferSize,
xassert(zaxisP->size);
serializePack(zaxisP->vals, zaxisP->size, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, zaxisP->size, zaxisP->vals );
d = cdiCheckSum(DATATYPE_FLT, zaxisP->size, zaxisP->vals );
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -1830,7 +1831,7 @@ zaxisPack(void * voidP, void * packBuffer, int packBufferSize,
xassert(zaxisP->size);
serializePack(zaxisP->lbounds, zaxisP->size, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, zaxisP->size, zaxisP->lbounds);
d = cdiCheckSum(DATATYPE_FLT, zaxisP->size, zaxisP->lbounds);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -1841,7 +1842,7 @@ zaxisPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(zaxisP->ubounds, zaxisP->size, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, zaxisP->size, zaxisP->ubounds);
d = cdiCheckSum(DATATYPE_FLT, zaxisP->size, zaxisP->ubounds);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -1852,7 +1853,7 @@ zaxisPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(zaxisP->weights, zaxisP->size, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, zaxisP->size, zaxisP->weights);
d = cdiCheckSum(DATATYPE_FLT, zaxisP->size, zaxisP->weights);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -1863,7 +1864,7 @@ zaxisPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(zaxisP->vct, zaxisP->vctsize, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_FLT, zaxisP->vctsize, zaxisP->vct);
d = cdiCheckSum(DATATYPE_FLT, zaxisP->vctsize, zaxisP->vct);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
}
......@@ -1875,7 +1876,7 @@ zaxisPack(void * voidP, void * packBuffer, int packBufferSize,
serializePack(charBuffer, zaxisNstrings * CDI_MAX_NAME, DATATYPE_TXT,
packBuffer, packBufferSize, packBufferPos, context);
d = xchecksum(DATATYPE_TXT, zaxisNstrings * CDI_MAX_NAME, charBuffer);
d = cdiCheckSum(DATATYPE_TXT, zaxisNstrings * CDI_MAX_NAME, charBuffer);
serializePack(&d, 1, DATATYPE_FLT64,
packBuffer, packBufferSize, packBufferPos, context);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment