Commit 489f2410 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

tstepsNewEntry: changed argument type to stream_t

parent 1b2cdef4
......@@ -1409,7 +1409,7 @@ int streamDefTimestep(int streamID, int tsID)
}
}
newtsID = tstepsNewEntry(streamID);
newtsID = tstepsNewEntry(streamptr);
if ( tsID != newtsID )
Error("Internal problem: tsID = %d newtsID = %d", tsID, newtsID);
......
......@@ -560,7 +560,7 @@ int cgribexScanTimestep1(int streamID)
isec3 = streamptr->record->sec3;
isec4 = streamptr->record->sec4;
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
taxis = &streamptr->tsteps[tsID].taxis;
if ( tsID != 0 )
......@@ -751,7 +751,7 @@ int cgribexScanTimestep1(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -1039,7 +1039,7 @@ int cgribexScanTimestep2(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -1313,7 +1313,7 @@ int cgribexScanTimestep(int streamID)
if ( streamptr->ntsteps != streamptr->rtsteps )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......
......@@ -29,7 +29,7 @@
typedef struct {
int param;
int level;
} extcompvar_t;
} extcompvar_t;
static
int extInqDatatype(int prec, int number)
......@@ -379,7 +379,7 @@ void extScanTimestep1(int streamID)
streamptr->curTsID = 0;
extp = streamptr->record->extp;
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
taxis = &streamptr->tsteps[tsID].taxis;
if ( tsID != 0 )
......@@ -469,7 +469,7 @@ void extScanTimestep1(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -492,7 +492,7 @@ void extScanTimestep1(int streamID)
static
int extScanTimestep2(int streamID)
{
{
int header[4];
int status;
int fileID;
......@@ -643,7 +643,7 @@ int extScanTimestep2(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -790,7 +790,7 @@ int extScanTimestep(int streamID)
if ( streamptr->ntsteps != streamptr->rtsteps )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......
......@@ -1002,7 +1002,7 @@ int gribapiScanTimestep1(int streamID)
streamptr->curTsID = 0;
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
taxis = &streamptr->tsteps[tsID].taxis;
if ( tsID != 0 )
......@@ -1243,7 +1243,7 @@ int gribapiScanTimestep1(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -1557,7 +1557,7 @@ int gribapiScanTimestep2(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -1856,7 +1856,7 @@ int gribapiScanTimestep(int streamID)
if ( streamptr->ntsteps != streamptr->rtsteps )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......
......@@ -893,7 +893,7 @@ void iegScanTimestep1(int streamID)
streamptr->curTsID = 0;
iegp = streamptr->record->iegp;
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
taxis = &streamptr->tsteps[tsID].taxis;
if ( tsID != 0 )
......@@ -987,7 +987,7 @@ void iegScanTimestep1(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -1010,7 +1010,7 @@ void iegScanTimestep1(int streamID)
static
int iegScanTimestep2(int streamID)
{
{
int status;
int fileID;
int tabnum;
......@@ -1165,7 +1165,7 @@ int iegScanTimestep2(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -1312,7 +1312,7 @@ int iegScanTimestep(int streamID)
if ( streamptr->ntsteps != streamptr->rtsteps )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......
......@@ -287,7 +287,7 @@ int streamsNewEntry(int filetype);
void streamsInitEntry(int streamID);
int streamNewVar(int streamID, int gridID, int zaxisID);
int tstepsNewEntry(int streamID);
int tstepsNewEntry(stream_t *streamptr);
char *strfiletype(int filetype);
......
......@@ -381,7 +381,7 @@ void srvScanTimestep1(int streamID)
streamptr->curTsID = 0;
srvp = streamptr->record->srvp;
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
taxis = &streamptr->tsteps[tsID].taxis;
if ( tsID != 0 )
......@@ -473,7 +473,7 @@ void srvScanTimestep1(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -645,7 +645,7 @@ int srvScanTimestep2(int streamID)
if ( streamptr->ntsteps == -1 )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......@@ -793,7 +793,7 @@ int srvScanTimestep(int streamID)
if ( streamptr->ntsteps != streamptr->rtsteps )
{
tsID = tstepsNewEntry(streamID);
tsID = tstepsNewEntry(streamptr);
if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID);
......
......@@ -8,12 +8,9 @@
#include "stream_int.h"
static void tstepsInitEntry(int streamID, int tsID)
static
void tstepsInitEntry(stream_t *streamptr, int tsID)
{
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
streamptr->tsteps[tsID].curRecID = CDI_UNDEFID;
streamptr->tsteps[tsID].position = 0;
streamptr->tsteps[tsID].records = NULL;
......@@ -27,14 +24,11 @@ static void tstepsInitEntry(int streamID, int tsID)
}
int tstepsNewEntry(int streamID)
int tstepsNewEntry(stream_t *streamptr)
{
int tsID = 0;
int tstepsTableSize;
tsteps_t *tstepsTable;
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
tsID = streamptr->tstepsNextID++;
tstepsTableSize = streamptr->tstepsTableSize;
......@@ -58,7 +52,7 @@ int tstepsNewEntry(int streamID)
streamptr->tstepsTableSize = tstepsTableSize;
streamptr->tsteps = tstepsTable;
tstepsInitEntry(streamID, tsID);
tstepsInitEntry(streamptr, tsID);
streamptr->tsteps[tsID].taxis.used = TRUE;
......@@ -89,7 +83,7 @@ void cdiCreateTimesteps(int streamID)
for ( tsID = 0; tsID < ntsteps; tsID++ )
{
tstepsInitEntry(streamID, tsID);
tstepsInitEntry(streamptr, tsID);
streamptr->tsteps[tsID].taxis.used = TRUE;
}
}
......
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