Commit eec19359 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Change datatype of *nmiss to *size_t.

parent 70087c9c
...@@ -488,7 +488,7 @@ void cdfGetSliceSlapDescription(stream_t *streamptr, int varId, int levelId, boo ...@@ -488,7 +488,7 @@ void cdfGetSliceSlapDescription(stream_t *streamptr, int varId, int levelId, boo
} }
static static
void cdfReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss) void cdfReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss)
{ {
if ( CDI_Debug ) Message("streamID = %d varID = %d", streamptr->self, varID); if ( CDI_Debug ) Message("streamID = %d varID = %d", streamptr->self, varID);
...@@ -520,7 +520,7 @@ void cdfReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss) ...@@ -520,7 +520,7 @@ void cdfReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
} }
static static
void cdfReadVarSP(stream_t *streamptr, int varID, float *data, int *nmiss) void cdfReadVarSP(stream_t *streamptr, int varID, float *data, size_t *nmiss)
{ {
if ( CDI_Debug ) Message("streamID = %d varID = %d", streamptr->self, varID); if ( CDI_Debug ) Message("streamID = %d varID = %d", streamptr->self, varID);
...@@ -552,7 +552,7 @@ void cdfReadVarSP(stream_t *streamptr, int varID, float *data, int *nmiss) ...@@ -552,7 +552,7 @@ void cdfReadVarSP(stream_t *streamptr, int varID, float *data, int *nmiss)
} }
void cdf_read_var(stream_t *streamptr, int varID, int memtype, void *data, int *nmiss) void cdf_read_var(stream_t *streamptr, int varID, int memtype, void *data, size_t *nmiss)
{ {
if ( memtype == MEMTYPE_DOUBLE ) if ( memtype == MEMTYPE_DOUBLE )
cdfReadVarDP(streamptr, varID, (double*) data, nmiss); cdfReadVarDP(streamptr, varID, (double*) data, nmiss);
...@@ -561,7 +561,7 @@ void cdf_read_var(stream_t *streamptr, int varID, int memtype, void *data, int * ...@@ -561,7 +561,7 @@ void cdf_read_var(stream_t *streamptr, int varID, int memtype, void *data, int *
} }
static static
void cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, int *nmiss) void cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, size_t *nmiss)
{ {
if ( CDI_Debug ) if ( CDI_Debug )
Message("streamID = %d varID = %d levelID = %d", streamptr->self, varID, levelID); Message("streamID = %d varID = %d levelID = %d", streamptr->self, varID, levelID);
...@@ -618,7 +618,7 @@ void cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data ...@@ -618,7 +618,7 @@ void cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data
} }
static static
void cdfReadVarSliceSP(stream_t *streamptr, int varID, int levelID, float *data, int *nmiss) void cdfReadVarSliceSP(stream_t *streamptr, int varID, int levelID, float *data, size_t *nmiss)
{ {
if ( CDI_Debug ) if ( CDI_Debug )
Message("streamID = %d varID = %d levelID = %d", streamptr->self, varID, levelID); Message("streamID = %d varID = %d levelID = %d", streamptr->self, varID, levelID);
...@@ -675,7 +675,7 @@ void cdfReadVarSliceSP(stream_t *streamptr, int varID, int levelID, float *data, ...@@ -675,7 +675,7 @@ void cdfReadVarSliceSP(stream_t *streamptr, int varID, int levelID, float *data,
} }
void cdf_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, int *nmiss) void cdf_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, size_t *nmiss)
{ {
if ( memtype == MEMTYPE_DOUBLE ) if ( memtype == MEMTYPE_DOUBLE )
cdfReadVarSliceDP(streamptr, varID, levelID, (double*) data, nmiss); cdfReadVarSliceDP(streamptr, varID, levelID, (double*) data, nmiss);
...@@ -684,7 +684,7 @@ void cdf_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype ...@@ -684,7 +684,7 @@ void cdf_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype
} }
void cdf_read_record(stream_t *streamptr, int memtype, void *data, int *nmiss) void cdf_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss)
{ {
if ( CDI_Debug ) Message("streamID = %d", streamptr->self); if ( CDI_Debug ) Message("streamID = %d", streamptr->self);
......
...@@ -395,16 +395,16 @@ void streamWriteVar(int streamID, int varID, const double data[], size_t nmis ...@@ -395,16 +395,16 @@ void streamWriteVar(int streamID, int varID, const double data[], size_t nmis
void streamWriteVarF(int streamID, int varID, const float data[], size_t nmiss); void streamWriteVarF(int streamID, int varID, const float data[], size_t nmiss);
/* streamReadVar: Read a variable */ /* streamReadVar: Read a variable */
void streamReadVar(int streamID, int varID, double data[], int *nmiss); void streamReadVar(int streamID, int varID, double data[], size_t *nmiss);
void streamReadVarF(int streamID, int varID, float data[], int *nmiss); void streamReadVarF(int streamID, int varID, float data[], size_t *nmiss);
/* streamWriteVarSlice: Write a horizontal slice of a variable */ /* streamWriteVarSlice: Write a horizontal slice of a variable */
void streamWriteVarSlice(int streamID, int varID, int levelID, const double data[], size_t nmiss); void streamWriteVarSlice(int streamID, int varID, int levelID, const double data[], size_t nmiss);
void streamWriteVarSliceF(int streamID, int varID, int levelID, const float data[], size_t nmiss); void streamWriteVarSliceF(int streamID, int varID, int levelID, const float data[], size_t nmiss);
/* streamReadVarSlice: Read a horizontal slice of a variable */ /* streamReadVarSlice: Read a horizontal slice of a variable */
void streamReadVarSlice(int streamID, int varID, int levelID, double data[], int *nmiss); void streamReadVarSlice(int streamID, int varID, int levelID, double data[], size_t *nmiss);
void streamReadVarSliceF(int streamID, int varID, int levelID, float data[], int *nmiss); void streamReadVarSliceF(int streamID, int varID, int levelID, float data[], size_t *nmiss);
void streamWriteVarChunk(int streamID, int varID, const int rect[3][2], const double data[], size_t nmiss); void streamWriteVarChunk(int streamID, int varID, const int rect[3][2], const double data[], size_t nmiss);
...@@ -415,8 +415,8 @@ void streamDefRecord(int streamID, int varID, int levelID); ...@@ -415,8 +415,8 @@ void streamDefRecord(int streamID, int varID, int levelID);
void streamInqRecord(int streamID, int *varID, int *levelID); void streamInqRecord(int streamID, int *varID, int *levelID);
void streamWriteRecord(int streamID, const double data[], size_t nmiss); void streamWriteRecord(int streamID, const double data[], size_t nmiss);
void streamWriteRecordF(int streamID, const float data[], size_t nmiss); void streamWriteRecordF(int streamID, const float data[], size_t nmiss);
void streamReadRecord(int streamID, double data[], int *nmiss); void streamReadRecord(int streamID, double data[], size_t *nmiss);
void streamReadRecordF(int streamID, float data[], int *nmiss); void streamReadRecordF(int streamID, float data[], size_t *nmiss);
void streamCopyRecord(int streamIDdest, int streamIDsrc); void streamCopyRecord(int streamIDdest, int streamIDsrc);
void streamInqGRIBinfo(int streamID, int *intnum, float *fltnum, off_t *bignum); void streamInqGRIBinfo(int streamID, int *intnum, float *fltnum, off_t *bignum);
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
static static
int grbDecode(int filetype, int memtype, void *gribbuffer, size_t gribsize, void *data, size_t datasize, int grbDecode(int filetype, int memtype, void *gribbuffer, size_t gribsize, void *data, size_t datasize,
int unreduced, int *nmiss, double missval, int vlistID, int varID) int unreduced, size_t *nmiss, double missval, int vlistID, int varID)
{ {
int status = 0; int status = 0;
...@@ -111,7 +111,7 @@ int grbUnzipRecord(void *gribbuffer, size_t *gribsize) ...@@ -111,7 +111,7 @@ int grbUnzipRecord(void *gribbuffer, size_t *gribsize)
} }
void grb_read_record(stream_t * streamptr, int memtype, void *data, int *nmiss) void grb_read_record(stream_t * streamptr, int memtype, void *data, size_t *nmiss)
{ {
int filetype = streamptr->filetype; int filetype = streamptr->filetype;
...@@ -144,7 +144,7 @@ void grb_read_record(stream_t * streamptr, int memtype, void *data, int *nmiss) ...@@ -144,7 +144,7 @@ void grb_read_record(stream_t * streamptr, int memtype, void *data, int *nmiss)
} }
void grb_read_var(stream_t * streamptr, int varID, int memtype, void *data, int *nmiss) void grb_read_var(stream_t * streamptr, int varID, int memtype, void *data, size_t *nmiss)
{ {
int filetype = streamptr->filetype; int filetype = streamptr->filetype;
...@@ -196,7 +196,7 @@ void grb_read_var(stream_t * streamptr, int varID, int memtype, void *data, int ...@@ -196,7 +196,7 @@ void grb_read_var(stream_t * streamptr, int varID, int memtype, void *data, int
} }
void grb_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, int *nmiss) void grb_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, size_t *nmiss)
{ {
int filetype = streamptr->filetype; int filetype = streamptr->filetype;
......
...@@ -172,7 +172,7 @@ void grbCopyRecord(stream_t * streamptr2, stream_t * streamptr1) ...@@ -172,7 +172,7 @@ void grbCopyRecord(stream_t * streamptr2, stream_t * streamptr1)
// memtype: MEMTYPE_FLOAT or MEMTYPE_DOUBLE // memtype: MEMTYPE_FLOAT or MEMTYPE_DOUBLE
//int statusDC = grbDecode(filetype, MEMTYPE_DOUBLE, gribbuffer, recsize, data, gridsize, streamptr1->unreduced, &nmiss, missval, vlistID, varID); //int statusDC = grbDecode(filetype, MEMTYPE_DOUBLE, gribbuffer, recsize, data, gridsize, streamptr1->unreduced, &nmiss, missval, vlistID, varID);
//int grbDecode(int filetype, int memtype, void *gribbuffer, int gribsize, void *data, size_t datasize, //int grbDecode(int filetype, int memtype, void *gribbuffer, int gribsize, void *data, size_t datasize,
// int unreduced, int *nmiss, double missval, int vlistID, int varID); // int unreduced, size_t *nmiss, double missval, int vlistID, int varID);
//streamptr1->tsteps[tsID].records[recID].zip = zip; //streamptr1->tsteps[tsID].records[recID].zip = zip;
//gribapiSetScanningMode(gh, cdoGribDataScanningMode); // T.B.D. this will be done by grbDecode.. //gribapiSetScanningMode(gh, cdoGribDataScanningMode); // T.B.D. this will be done by grbDecode..
......
...@@ -18,13 +18,13 @@ void cdfCopyRecord(stream_t *streamptr2, stream_t *streamptr1); ...@@ -18,13 +18,13 @@ void cdfCopyRecord(stream_t *streamptr2, stream_t *streamptr1);
void cdfDefineAttributes(int vlistID, int varID, int fileID, int ncvarID); void cdfDefineAttributes(int vlistID, int varID, int fileID, int ncvarID);
void cdf_read_record(stream_t *streamptr, int memtype, void *data, int *nmiss); void cdf_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss);
void cdf_write_record(stream_t *streamptr, int memtype, const void *data, size_t nmiss); void cdf_write_record(stream_t *streamptr, int memtype, const void *data, size_t nmiss);
void cdf_read_var(stream_t *streamptr, int varID, int memtype, void *data, int *nmiss); void cdf_read_var(stream_t *streamptr, int varID, int memtype, void *data, size_t *nmiss);
void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data, size_t nmiss); void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data, size_t nmiss);
void cdf_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, int *nmiss); void cdf_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, size_t *nmiss);
void cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, size_t nmiss); void cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, size_t nmiss);
void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype, void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
......
...@@ -1324,7 +1324,7 @@ int cgribexScanTimestep(stream_t * streamptr) ...@@ -1324,7 +1324,7 @@ int cgribexScanTimestep(stream_t * streamptr)
#if defined (HAVE_LIBCGRIBEX) #if defined (HAVE_LIBCGRIBEX)
int cgribexDecode(int memtype, void *gribbuffer, size_t gribsize, void *data, size_t datasize, int cgribexDecode(int memtype, void *gribbuffer, size_t gribsize, void *data, size_t datasize,
int unreduced, int *nmiss, double missval) int unreduced, size_t *nmiss, double missval)
{ {
int status = 0; int status = 0;
int iret = 0, iword = 0; int iret = 0, iword = 0;
......
...@@ -6,7 +6,7 @@ int cgribexScanTimestep2(stream_t * streamptr); ...@@ -6,7 +6,7 @@ int cgribexScanTimestep2(stream_t * streamptr);
int cgribexScanTimestep(stream_t * streamptr); int cgribexScanTimestep(stream_t * streamptr);
int cgribexDecode(int memtype, void *gribbuffer, size_t gribsize, void *data, size_t datasize, int cgribexDecode(int memtype, void *gribbuffer, size_t gribsize, void *data, size_t datasize,
int unreduced, int *nmiss, double missval); int unreduced, size_t *nmiss, double missval);
size_t cgribexEncode(int memtype, int varID, int levelID, int vlistID, int gridID, int zaxisID, size_t cgribexEncode(int memtype, int varID, int levelID, int vlistID, int gridID, int zaxisID,
int vdate, int vtime, int tsteptype, int numavg, int vdate, int vtime, int tsteptype, int numavg,
......
...@@ -86,7 +86,7 @@ int extInqRecord(stream_t *streamptr, int *varID, int *levelID) ...@@ -86,7 +86,7 @@ int extInqRecord(stream_t *streamptr, int *varID, int *levelID)
} }
*/ */
void extReadRecord(stream_t *streamptr, double *data, int *nmiss) void extReadRecord(stream_t *streamptr, double *data, size_t *nmiss)
{ {
int vlistID = streamptr->vlistID; int vlistID = streamptr->vlistID;
int fileID = streamptr->fileID; int fileID = streamptr->fileID;
...@@ -637,7 +637,7 @@ int extInqTimestep(stream_t *streamptr, int tsID) ...@@ -637,7 +637,7 @@ int extInqTimestep(stream_t *streamptr, int tsID)
} }
void extReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, int *nmiss) void extReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, size_t *nmiss)
{ {
if ( CDI_Debug ) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID); if ( CDI_Debug ) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID);
...@@ -685,7 +685,7 @@ void extReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, ...@@ -685,7 +685,7 @@ void extReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data,
} }
void extReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss) void extReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss)
{ {
if ( CDI_Debug ) Message("streamID = %d varID = %d", streamptr->self, varID); if ( CDI_Debug ) Message("streamID = %d varID = %d", streamptr->self, varID);
......
...@@ -11,13 +11,13 @@ int extInqTimestep(stream_t *streamptr, int tsID); ...@@ -11,13 +11,13 @@ int extInqTimestep(stream_t *streamptr, int tsID);
int extInqRecord(stream_t *streamptr, int *varID, int *levelID); int extInqRecord(stream_t *streamptr, int *varID, int *levelID);
void extDefRecord(stream_t *streamptr); void extDefRecord(stream_t *streamptr);
void extCopyRecord(stream_t *streamptr2, stream_t *streamptr1); void extCopyRecord(stream_t *streamptr2, stream_t *streamptr1);
void extReadRecord(stream_t *streamptr, double *data, int *nmiss); void extReadRecord(stream_t *streamptr, double *data, size_t *nmiss);
void extWriteRecord(stream_t *streamptr, const double *data); void extWriteRecord(stream_t *streamptr, const double *data);
void extReadVarDP (stream_t *streamptr, int varID, double *data, int *nmiss); void extReadVarDP (stream_t *streamptr, int varID, double *data, size_t *nmiss);
void extWriteVarDP(stream_t *streamptr, int varID, const double *data); void extWriteVarDP(stream_t *streamptr, int varID, const double *data);
void extReadVarSliceDP (stream_t *streamptr, int varID, int levelID, double *data, int *nmiss); void extReadVarSliceDP (stream_t *streamptr, int varID, int levelID, double *data, size_t *nmiss);
void extWriteVarSliceDP(stream_t *streamptr, int varID, int levelID, const double *data); void extWriteVarSliceDP(stream_t *streamptr, int varID, int levelID, const double *data);
#endif /* _STREAM_EXT_H */ #endif /* _STREAM_EXT_H */
......
...@@ -12,14 +12,14 @@ int grbInqTimestep(stream_t *streamptr, int tsID); ...@@ -12,14 +12,14 @@ int grbInqTimestep(stream_t *streamptr, int tsID);
int grbInqRecord(stream_t *streamptr, int *varID, int *levelID); int grbInqRecord(stream_t *streamptr, int *varID, int *levelID);
void grbDefRecord(stream_t *streamptr); void grbDefRecord(stream_t *streamptr);
void grb_read_record(stream_t *streamptr, int memtype, void *data, int *nmiss); void grb_read_record(stream_t *streamptr, int memtype, void *data, size_t *nmiss);
void grb_write_record(stream_t *streamptr, int memtype, const void *data, size_t nmiss); void grb_write_record(stream_t *streamptr, int memtype, const void *data, size_t nmiss);
void grbCopyRecord(stream_t *streamptr2, stream_t *streamptr1); void grbCopyRecord(stream_t *streamptr2, stream_t *streamptr1);
void grb_read_var(stream_t *streamptr, int varID, int memtype, void *data, int *nmiss); void grb_read_var(stream_t *streamptr, int varID, int memtype, void *data, size_t *nmiss);
void grb_write_var(stream_t *streamptr, int varID, int memtype, const void *data, size_t nmiss); void grb_write_var(stream_t *streamptr, int varID, int memtype, const void *data, size_t nmiss);
void grb_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, int *nmiss); void grb_read_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, void *data, size_t *nmiss);
void grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, size_t nmiss); void grb_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, size_t nmiss);
int grib1ltypeToZaxisType(int grib_ltype); int grib1ltypeToZaxisType(int grib_ltype);
......
...@@ -1468,7 +1468,7 @@ int gribapiScanTimestep(stream_t * streamptr) ...@@ -1468,7 +1468,7 @@ int gribapiScanTimestep(stream_t * streamptr)
#endif #endif
int gribapiDecode(void *gribbuffer, size_t gribsize, double *data, size_t gridsize, int gribapiDecode(void *gribbuffer, size_t gribsize, double *data, size_t gridsize,
int unreduced, int *nmiss, double missval, int vlistID, int varID) int unreduced, size_t *nmiss, double missval, int vlistID, int varID)
{ {
int status = 0; int status = 0;
long lpar; long lpar;
......
...@@ -10,7 +10,7 @@ int gribapiScanTimestep2(stream_t * streamptr); ...@@ -10,7 +10,7 @@ int gribapiScanTimestep2(stream_t * streamptr);
int gribapiScanTimestep(stream_t * streamptr); int gribapiScanTimestep(stream_t * streamptr);
int gribapiDecode(void *gribbuffer, size_t gribsize, double *data, size_t datasize, int gribapiDecode(void *gribbuffer, size_t gribsize, double *data, size_t datasize,
int unreduced, int *nmiss, double missval, int vlistID, int varID); int unreduced, size_t *nmiss, double missval, int vlistID, int varID);
size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisID, size_t gribapiEncode(int varID, int levelID, int vlistID, int gridID, int zaxisID,
int vdate, int vtime, int tsteptype, int numavg, int vdate, int vtime, int tsteptype, int numavg,
......
...@@ -81,7 +81,7 @@ int iegInqRecord(stream_t *streamptr, int *varID, int *levelID) ...@@ -81,7 +81,7 @@ int iegInqRecord(stream_t *streamptr, int *varID, int *levelID)
} }
*/ */
void iegReadRecord(stream_t *streamptr, double *data, int *nmiss) void iegReadRecord(stream_t *streamptr, double *data, size_t *nmiss)
{ {
int vlistID = streamptr->vlistID; int vlistID = streamptr->vlistID;
int fileID = streamptr->fileID; int fileID = streamptr->fileID;
...@@ -1162,7 +1162,7 @@ int iegInqTimestep(stream_t *streamptr, int tsID) ...@@ -1162,7 +1162,7 @@ int iegInqTimestep(stream_t *streamptr, int tsID)
} }
void iegReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, int *nmiss) void iegReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, size_t *nmiss)
{ {
if ( CDI_Debug ) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID); if ( CDI_Debug ) Message("streamID = %d varID = %d levID = %d", streamptr->self, varID, levID);
...@@ -1196,7 +1196,7 @@ void iegReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data, ...@@ -1196,7 +1196,7 @@ void iegReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data,
} }
void iegReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss) void iegReadVarDP(stream_t *streamptr, int varID, double *data, size_t *nmiss)
{ {
if ( CDI_Debug ) Message("streamID = %d varID = %d", streamptr->self, varID); if ( CDI_Debug ) Message("streamID = %d varID = %d", streamptr->self, varID);
......
...@@ -11,13 +11,13 @@ int iegInqTimestep(stream_t *streamptr, int tsID); ...@@ -11,13 +11,13 @@ int iegInqTimestep(stream_t *streamptr, int tsID);
int iegInqRecord(stream_t *streamptr, int *varID, int *levelID); int iegInqRecord(stream_t *streamptr, int *varID, int *levelID);
void iegDefRecord(stream_t *streamptr); void iegDefRecord(stream_t *streamptr);
void iegCopyRecord(stream_t *streamptr2, stream_t *streamptr1); void iegCopyRecord(stream_t *streamptr2, stream_t *streamptr1);
void iegReadRecord(stream_t *streamptr, double *data, int *nmiss); void iegReadRecord(stream_t *streamptr, double *data, size_t *nmiss);
void iegWriteRecord(stream_t *streamptr, const double *data); void iegWriteRecord(stream_t *streamptr, const double *data);
void iegReadVarDP (stream_t *streamptr, int varID, double *data, int *nmiss); void iegReadVarDP (stream_t *streamptr, int varID, double *data, size_t *nmiss);
void iegWriteVarDP(stream_t *streamptr, int varID, const double *data); void iegWriteVarDP(stream_t *streamptr, int varID, const double *data);
void iegReadVarSliceDP (stream_t *streamptr, int varID, int levelID, double *data, int *nmiss); void iegReadVarSliceDP (stream_t *streamptr, int varID, int levelID, double *data, size_t *nmiss);
void iegWriteVarSliceDP(stream_t *streamptr, int varID, int levelID, const double *data); void iegWriteVarSliceDP(stream_t *streamptr, int varID, int levelID, const double *data);
#endif /* _STREAM_IEG_H */ #endif /* _STREAM_IEG_H */
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
/* the single image implementation */ /* the single image implementation */
static static
int cdiStreamReadVar(int streamID, int varID, int memtype, void *data, int *nmiss) int cdiStreamReadVar(int streamID, int varID, int memtype, void *data, size_t *nmiss)
{ {
// May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision reading. // May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision reading.
// A value > 0 is returned in this case, otherwise it returns zero. // A value > 0 is returned in this case, otherwise it returns zero.
...@@ -89,7 +89,7 @@ int cdiStreamReadVar(int streamID, int varID, int memtype, void *data, int *nmis ...@@ -89,7 +89,7 @@ int cdiStreamReadVar(int streamID, int varID, int memtype, void *data, int *nmis
@Function streamReadVar @Function streamReadVar
@Title Read a variable @Title Read a variable
@Prototype void streamReadVar(int streamID, int varID, double *data, int *nmiss) @Prototype void streamReadVar(int streamID, int varID, double *data, size_t *nmiss)
@Parameter @Parameter
@Item streamID Stream ID, from a previous call to @fref{streamOpenRead}. @Item streamID Stream ID, from a previous call to @fref{streamOpenRead}.
@Item varID Variable identifier. @Item varID Variable identifier.
...@@ -102,7 +102,7 @@ The function streamReadVar reads all the values of one time step of a variable ...@@ -102,7 +102,7 @@ The function streamReadVar reads all the values of one time step of a variable
from an open dataset. from an open dataset.
@EndFunction @EndFunction
*/ */
void streamReadVar(int streamID, int varID, double *data, int *nmiss) void streamReadVar(int streamID, int varID, double *data, size_t *nmiss)
{ {
cdiStreamReadVar(streamID, varID, MEMTYPE_DOUBLE, data, nmiss); cdiStreamReadVar(streamID, varID, MEMTYPE_DOUBLE, data, nmiss);
} }
...@@ -111,7 +111,7 @@ void streamReadVar(int streamID, int varID, double *data, int *nmiss) ...@@ -111,7 +111,7 @@ void streamReadVar(int streamID, int varID, double *data, int *nmiss)
@Function streamReadVarF @Function streamReadVarF
@Title Read a variable @Title Read a variable
@Prototype void streamReadVar(int streamID, int varID, float *data, int *nmiss) @Prototype void streamReadVar(int streamID, int varID, float *data, size_t *nmiss)
@Parameter @Parameter
@Item streamID Stream ID, from a previous call to @fref{streamOpenRead}. @Item streamID Stream ID, from a previous call to @fref{streamOpenRead}.
@Item varID Variable identifier. @Item varID Variable identifier.
...@@ -124,7 +124,7 @@ The function streamReadVar reads all the values of one time step of a variable ...@@ -124,7 +124,7 @@ The function streamReadVar reads all the values of one time step of a variable
from an open dataset. from an open dataset.
@EndFunction @EndFunction
*/ */
void streamReadVarF(int streamID, int varID, float *data, int *nmiss) void streamReadVarF(int streamID, int varID, float *data, size_t *nmiss)
{ {
if ( cdiStreamReadVar(streamID, varID, MEMTYPE_FLOAT, data, nmiss) ) if ( cdiStreamReadVar(streamID, varID, MEMTYPE_FLOAT, data, nmiss) )
{ {
...@@ -141,7 +141,7 @@ void streamReadVarF(int streamID, int varID, float *data, int *nmiss) ...@@ -141,7 +141,7 @@ void streamReadVarF(int streamID, int varID, float *data, int *nmiss)
static static
int cdiStreamReadVarSlice(int streamID, int varID, int levelID, int memtype, void *data, int *nmiss) int cdiStreamReadVarSlice(int streamID, int varID, int levelID, int memtype, void *data, size_t *nmiss)
{ {
// May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision reading. // May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision reading.
// A value > 0 is returned in this case, otherwise it returns zero. // A value > 0 is returned in this case, otherwise it returns zero.
...@@ -216,7 +216,7 @@ int cdiStreamReadVarSlice(int streamID, int varID, int levelID, int memtype, voi ...@@ -216,7 +216,7 @@ int cdiStreamReadVarSlice(int streamID, int varID, int levelID, int memtype, voi
@Function streamReadVarSlice @Function streamReadVarSlice
@Title Read a horizontal slice of a variable @Title Read a horizontal slice of a variable
@Prototype void streamReadVarSlice(int streamID, int varID, int levelID, double *data, int *nmiss) @Prototype void streamReadVarSlice(int streamID, int varID, int levelID, double *data, size_t *nmiss)
@Parameter @Parameter
@Item streamID Stream ID, from a previous call to @fref{streamOpenRead}. @Item streamID Stream ID, from a previous call to @fref{streamOpenRead}.
@Item varID Variable identifier. @Item varID Variable identifier.
...@@ -230,7 +230,7 @@ The function streamReadVarSlice reads all the values of a horizontal slice of a ...@@ -230,7 +230,7 @@ The function streamReadVarSlice reads all the values of a horizontal slice of a
from an open dataset. from an open dataset.
@EndFunction @EndFunction
*/ */
void streamReadVarSlice(int streamID, int varID, int levelID, double *data, int *nmiss) void streamReadVarSlice(int streamID, int varID, int levelID, double *data, size_t *nmiss)
{ {
if ( cdiStreamReadVarSlice(streamID, varID, levelID, MEMTYPE_DOUBLE, data, nmiss) ) if ( cdiStreamReadVarSlice(streamID, varID, levelID, MEMTYPE_DOUBLE, data, nmiss) )
{ {
...@@ -244,7 +244,7 @@ void streamReadVarSlice(int streamID, int varID, int levelID, double *data, int ...@@ -244,7 +244,7 @@ void streamReadVarSlice(int streamID, int varID, int levelID, double *data, int
@Function streamReadVarSliceF @Function streamReadVarSliceF
@Title Read a horizontal slice of a variable @Title Read a horizontal slice of a variable
@Prototype void streamReadVarSliceF(int streamID, int varID, int levelID, float *data, int *nmiss) @Prototype void streamReadVarSliceF(int streamID, int varID, int levelID, float *data, size_t *nmiss)
@Parameter @Parameter
@Item streamID Stream ID, from a previous call to @fref{streamOpenRead}. @Item streamID Stream ID, from a previous call to @fref{streamOpenRead}.
@Item varID Variable identifier. @Item varID Variable identifier.
...@@ -258,7 +258,7 @@ The function streamReadVarSliceF reads all the values of a horizontal slice of a ...@@ -258,7 +258,7 @@ The function streamReadVarSliceF reads all the values of a horizontal slice of a
from an open dataset. from an open dataset.
@EndFunction @EndFunction
*/ */
void streamReadVarSliceF(int streamID, int varID, int levelID, float *data, int *nmiss) void streamReadVarSliceF(int streamID, int varID, int levelID, float *data, size_t *nmiss)
{ {
if ( cdiStreamReadVarSlice(streamID, varID, levelID, MEMTYPE_FLOAT, data, nmiss) ) if ( cdiStreamReadVarSlice(streamID, varID, levelID, MEMTYPE_FLOAT, data, nmiss) )
{ {
...@@ -273,7 +273,7 @@ void streamReadVarSliceF(int streamID, int varID, int levelID, float *data, int ...@@ -273,7 +273,7 @@ void streamReadVarSliceF(int streamID, int varID, int levelID, float *data, int
} }
static static
int stream_read_record(int streamID, int memtype, void *data, int *nmiss) int stream_read_record(int streamID, int memtype, void *data, size_t *nmiss)
{ {
// May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision reading. // May fail if memtype == MEMTYPE_FLOAT and the file format does not support single precision reading.
// A value > 0 is returned in this case, otherwise it returns zero. // A value > 0 is returned in this case, otherwise it returns zero.
...@@ -331,13 +331,13 @@ int stream_read_record(int streamID, int memtype, void *data, int *nmiss) ...@@ -331,13 +331,13 @@ int stream_read_record(int streamID, int memtype, void *data, int *nmiss)