Commit 1f9f5dfc authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Record: changed iegp to void* exsep

parent 4016225e
......@@ -126,15 +126,7 @@ typedef struct
int sec2[4096];
int sec3[2];
int sec4[512];
#if defined (HAVE_LIBSERVICE)
srvrec_t *srvp;
#endif
#if defined (HAVE_LIBEXTRA)
void *exsep;
#endif
#if defined (HAVE_LIBIEG)
iegrec_t *iegp;
#endif
void *exsep;
}
Record;
......
......@@ -476,7 +476,7 @@ void streamDefByteorder(int streamID, int byteorder)
#if defined (HAVE_LIBIEG)
case FILETYPE_IEG:
{
iegrec_t *iegp = streamptr->record->iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
iegp->byteswap = getByteswap(byteorder);
break;
......@@ -690,7 +690,7 @@ int cdiStreamOpenDefaultDelegate(const char *filename, const char *filemode,
{
streamptr->record = (Record *) malloc(sizeof(Record));
streamptr->record->buffer = NULL;
streamptr->record->iegp = iegNew();
streamptr->record->exsep = iegNew();
}
break;
}
......@@ -1092,7 +1092,7 @@ cdiStreamCloseDefaultDelegate(stream_t *streamptr, int recordBufIsToBeDeleted)
{
fileClose(fileID);
if (recordBufIsToBeDeleted)
iegDelete(streamptr->record->iegp);
iegDelete(streamptr->record->exsep);
break;
}
#endif
......
......@@ -69,11 +69,10 @@ int iegInqRecord(stream_t *streamptr, int *varID, int *levelID)
int icode, ilevel;
int zaxisID = -1;
int vlistID;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
vlistID = streamptr->vlistID;
fileID = streamptr->fileID;
iegp = streamptr->record->iegp;
*varID = -1;
*levelID = -1;
......@@ -108,7 +107,7 @@ int iegReadRecord(stream_t *streamptr, double *data, int *nmiss)
int varID, gridID;
int i, size;
double missval;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
vlistID = streamptr->vlistID;
fileID = streamptr->fileID;
......@@ -117,7 +116,6 @@ int iegReadRecord(stream_t *streamptr, double *data, int *nmiss)
recID = streamptr->tsteps[tsID].recIDs[vrecID];
recpos = streamptr->tsteps[tsID].records[recID].position;
varID = streamptr->tsteps[tsID].records[recID].varID;
iegp = streamptr->record->iegp;
fileSetPos(fileID, recpos, SEEK_SET);
......@@ -569,10 +567,9 @@ int iegDefRecord(stream_t *streamptr)
int param, pdis, pcat, pnum;
int varID, levelID, tsID, zaxisID;
int byteorder;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
vlistID = streamptr->vlistID;
iegp = streamptr->record->iegp;
byteorder = streamptr->byteorder;
varID = streamptr->record->varID;
......@@ -612,10 +609,9 @@ int iegWriteRecord(stream_t *streamptr, const double *data)
int status = 0;
int i, gridsize, gridID;
double refval;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
fileID = streamptr->fileID;
iegp = streamptr->record->iegp;
gridID = streamptr->record->gridID;
gridsize = gridInqSize(gridID);
......@@ -849,11 +845,10 @@ void iegScanTimestep1(stream_t *streamptr)
taxis_t *taxis;
int vlistID;
IEGCOMPVAR compVar, compVar0;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
streamptr->curTsID = 0;
iegp = streamptr->record->iegp;
tsID = tstepsNewEntry(streamptr);
taxis = &streamptr->tsteps[tsID].taxis;
......@@ -986,13 +981,12 @@ int iegScanTimestep2(stream_t *streamptr)
taxis_t *taxis;
int vlistID;
IEGCOMPVAR compVar, compVar0;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
streamptr->curTsID = 1;
vlistID = streamptr->vlistID;
fileID = streamptr->fileID;
iegp = streamptr->record->iegp;
tsID = streamptr->rtsteps;
if ( tsID != 1 )
......@@ -1166,7 +1160,7 @@ int iegScanTimestep(stream_t *streamptr)
taxis_t *taxis;
int rindex, nrecs = 0;
IEGCOMPVAR compVar, compVar0;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
if ( CDI_Debug )
{
......@@ -1179,7 +1173,6 @@ int iegScanTimestep(stream_t *streamptr)
if ( streamptr->rtsteps == 0 )
Error("Internal problem! Missing contents.");
iegp = streamptr->record->iegp;
tsID = streamptr->rtsteps;
taxis = &streamptr->tsteps[tsID].taxis;
......@@ -1317,9 +1310,8 @@ void iegReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss)
int recID;
int i;
double missval;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
iegp = streamptr->record->iegp;
vlistID = streamptr->vlistID;
fileID = streamptr->fileID;
nlevs = streamptr->vars[varID].nlevs;
......@@ -1362,9 +1354,8 @@ void iegReadVarSliceDP(stream_t *streamptr, int varID, int levID, double *data,
int recID;
int i;
double missval;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
iegp = streamptr->record->iegp;
vlistID = streamptr->vlistID;
fileID = streamptr->fileID;
nlevs = streamptr->vars[varID].nlevs;
......@@ -1409,13 +1400,11 @@ void iegWriteVarDP(stream_t *streamptr, int varID, const double *data)
int date, time;
int param, pdis, pcat, pnum;
double refval;
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
if ( CDI_Debug )
Message("streamID = %d varID = %d", streamptr->self, varID);
iegp = streamptr->record->iegp;
iegInitMem(iegp);
for ( i = 0; i < 37; i++ ) iegp->ipdb[i] = -1;
......@@ -1470,9 +1459,8 @@ void iegWriteVarSliceDP(stream_t *streamptr, int varID, int levID, const double
/* int tsID; */
int vlistID;
/* int param, date, time, datasize; */
iegrec_t *iegp;
iegrec_t *iegp = (iegrec_t*) streamptr->record->exsep;
iegp = streamptr->record->iegp;
vlistID = streamptr->vlistID;
fileID = streamptr->fileID;
/* tsID = streamptr->curTsID; */
......
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