Commit 981b8736 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

cdi_create_records: changed argument type to stream_t

parent e0838ab1
......@@ -1438,7 +1438,7 @@ int streamDefTimestep(int streamID, int tsID)
&& time_is_varying )
cdfDefTimestep(streamID, tsID);
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
return (streamptr->ntsteps);
}
......
......@@ -833,7 +833,7 @@ int cgribexScanTimestep2(int streamID)
fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET);
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecords = streamptr->tsteps[tsID].nallrecs;
streamptr->tsteps[1].recIDs = (int *) malloc(nrecords*sizeof(int));
......@@ -1110,7 +1110,7 @@ int cgribexScanTimestep(int streamID)
gribbuffer = (unsigned char *) streamptr->record->buffer;
buffersize = streamptr->record->buffersize;
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecs = streamptr->tsteps[1].nrecs;
......
......@@ -529,7 +529,7 @@ int extScanTimestep2(int streamID)
fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET);
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecords = streamptr->tsteps[0].nallrecs;
streamptr->tsteps[1].recIDs = (int *) malloc(nrecords*sizeof(int));
......@@ -540,9 +540,9 @@ int extScanTimestep2(int streamID)
for ( recID = 0; recID < nrecords; recID++ )
{
varID = streamptr->tsteps[0].records[recID].varID;
streamptr->tsteps[tsID].records[recID].position =
streamptr->tsteps[tsID].records[recID].position =
streamptr->tsteps[0].records[recID].position;
streamptr->tsteps[tsID].records[recID].size =
streamptr->tsteps[tsID].records[recID].size =
streamptr->tsteps[0].records[recID].size;
}
......@@ -718,7 +718,7 @@ int extScanTimestep(int streamID)
if ( streamptr->tsteps[tsID].recordSize == 0 )
{
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecs = streamptr->tsteps[1].nrecs;
......
......@@ -1324,7 +1324,7 @@ int gribapiScanTimestep2(int streamID)
fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET);
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecords = streamptr->tsteps[tsID].nallrecs;
streamptr->tsteps[1].recIDs = (int *) malloc(nrecords*sizeof(int));
......@@ -1626,7 +1626,7 @@ int gribapiScanTimestep(int streamID)
gribbuffer = (unsigned char *) streamptr->record->buffer;
buffersize = streamptr->record->buffersize;
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecs = streamptr->tsteps[1].nrecs;
......
......@@ -1046,7 +1046,7 @@ int iegScanTimestep2(int streamID)
fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET);
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecords = streamptr->tsteps[0].nallrecs;
streamptr->tsteps[1].recIDs = (int *) malloc(nrecords*sizeof(int));
......@@ -1057,9 +1057,9 @@ int iegScanTimestep2(int streamID)
for ( recID = 0; recID < nrecords; recID++ )
{
varID = streamptr->tsteps[0].records[recID].varID;
streamptr->tsteps[tsID].records[recID].position =
streamptr->tsteps[tsID].records[recID].position =
streamptr->tsteps[0].records[recID].position;
streamptr->tsteps[tsID].records[recID].size =
streamptr->tsteps[tsID].records[recID].size =
streamptr->tsteps[0].records[recID].size;
}
......@@ -1239,7 +1239,7 @@ int iegScanTimestep(int streamID)
if ( streamptr->tsteps[tsID].recordSize == 0 )
{
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecs = streamptr->tsteps[1].nrecs;
......
......@@ -295,7 +295,7 @@ void cdi_generate_vars(stream_t *streamptr);
void vlist_check_contents(int vlistID);
void cdiCreateRecords(int streamID, int tsID);
void cdi_create_records(stream_t *streamptr, int tsID);
int recordNewEntry(stream_t *streamptr, int tsID);
......
......@@ -494,21 +494,16 @@ void streamCopyRecord(int streamID2, int streamID1)
}
void cdiCreateRecords(int streamID, int tsID)
void cdi_create_records(stream_t *streamptr, int tsID)
{
int nrecords, maxrecords;
int nvars, varID, recID;
record_t *records;
int vlistID;
stream_t *streamptr;
streamptr = stream_to_pointer(streamID);
stream_check_ptr(__func__, streamptr);
if ( streamptr->tsteps[tsID].records ) return;
vlistID = streamInqVlist(streamID);
vlistID = streamptr->vlistID;
if ( tsID == 0 )
{
......
......@@ -529,7 +529,7 @@ int srvScanTimestep2(int streamID)
fileSetPos(fileID, streamptr->tsteps[tsID].position, SEEK_SET);
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecords = streamptr->tsteps[0].nallrecs;
streamptr->tsteps[1].recIDs = (int *) malloc(nrecords*sizeof(int));
......@@ -717,7 +717,7 @@ int srvScanTimestep(int streamID)
if ( streamptr->tsteps[tsID].recordSize == 0 )
{
cdiCreateRecords(streamID, tsID);
cdi_create_records(streamptr, tsID);
nrecs = streamptr->tsteps[1].nrecs;
......
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