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

stream_cdf: changed argument type of stream from int to stream_t

parent f0dc1e2c
......@@ -1626,7 +1626,7 @@ void streamReadVar(int streamID, int varID, double *data, int *nmiss)
case FILETYPE_NC4:
case FILETYPE_NC4C:
{
cdfReadVarDP(streamID, varID, data, nmiss);
cdfReadVarDP(streamptr, varID, data, nmiss);
break;
}
#endif
......@@ -1850,7 +1850,7 @@ void streamReadVarSlice(int streamID, int varID, int levelID, double *data, int
case FILETYPE_NC4C:
{
/* FIXME: status value ignored */
int ierr = cdfReadVarSliceDP(streamID, varID, levelID, data, nmiss);
int ierr = cdfReadVarSliceDP(streamptr, varID, levelID, data, nmiss);
break;
}
#endif
......@@ -1921,7 +1921,7 @@ void stream_write_var_slice(int streamID, int varID, int levelID, int memtype, c
{
int ierr = 0;
if ( streamptr->accessmode == 0 ) cdfEndDef(streamID);
ierr = cdf_write_var_slice(streamID, varID, levelID, memtype, data, nmiss);
ierr = cdf_write_var_slice(streamptr, varID, levelID, memtype, data, nmiss);
break;
}
#endif
......@@ -2214,15 +2214,14 @@ void streamDefVlist(int streamID, int vlistID)
vlistDefVarMissval(streamptr->vlistID, varID, vlistInqVarMissval(vlistID, varID));
}
if (namespaceHasLocalFile(namespaceGetActive())
&& streamptr->filemode == 'w' )
if ( namespaceHasLocalFile(namespaceGetActive()) && streamptr->filemode == 'w' )
{
if ( streamptr->filetype == FILETYPE_NC ||
streamptr->filetype == FILETYPE_NC2 ||
streamptr->filetype == FILETYPE_NC4 ||
streamptr->filetype == FILETYPE_NC4C )
{
cdfDefVars(streamID);
cdfDefVars(streamptr);
}
else if ( streamptr->filetype == FILETYPE_GRB ||
streamptr->filetype == FILETYPE_GRB2 )
......
This diff is collapsed.
#ifndef _STREAM_CDF_H
#define _STREAM_CDF_H
void cdfDefVars(int streamID);
void cdfDefVars(stream_t *streamptr);
void cdfDefTimestep(stream_t *streamptr, int tsID);
int cdfInqTimestep(int streamID, int tsID);
int cdfInqContents(int streamID);
......@@ -12,16 +12,16 @@ void cdfInqHistoryString(int streamID, char *history);
void cdfEndDef(int streamID);
int cdfDefRecord(int streamID);
int cdfCopyRecord(int streamIDdest, int streamIDsrc);
int cdfCopyRecord(stream_t *streamptr2, stream_t *streamptr1);
int cdfReadRecord(int streamID, double *data, int *nmiss);
void cdf_write_record(int streamID, int memtype, const void *data, int nmiss);
int cdfReadRecord(stream_t *streamptr, double *data, int *nmiss);
void cdf_write_record(stream_t *streamptr, int memtype, const void *data, int nmiss);
void cdfReadVarDP(int streamID, int varID, double *data, int *nmiss);
void cdfReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss);
void cdf_write_var(int streamID, int varID, int memtype, const void *data, int nmiss);
int cdfReadVarSliceDP(int streamID, int varID, int levelID, double *data, int *nmiss);
int cdf_write_var_slice(int streamID, int varID, int levelID, int memtype, const void *data, int nmiss);
int cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, int *nmiss);
int cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtype, const void *data, int nmiss);
#endif
/*
......
......@@ -340,7 +340,7 @@ void streamReadRecord(int streamID, double *data, int *nmiss)
case FILETYPE_NC4:
case FILETYPE_NC4C:
{
status = cdfReadRecord(streamID, data, nmiss);
status = cdfReadRecord(streamptr, data, nmiss);
break;
}
#endif
......@@ -408,7 +408,7 @@ void stream_write_record(int streamID, int memtype, const void *data, int nmiss)
case FILETYPE_NC4:
case FILETYPE_NC4C:
{
cdf_write_record(streamID, memtype, data, nmiss);
cdf_write_record(streamptr, memtype, data, nmiss);
break;
}
#endif
......@@ -483,7 +483,7 @@ void streamCopyRecord(int streamID2, int streamID1)
#endif
default:
{
status = cdfCopyRecord(streamID2, streamID1);
status = cdfCopyRecord(streamptr2, streamptr1);
break;
}
}
......
Supports Markdown
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