Commit 30bca1f5 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

patch from Nathanael Huebbe: 0005-added-a-single-precision-version-of-streamReadVar.patch

parent 7a12fa2a
......@@ -1506,8 +1506,11 @@ void cdiStreamReadVar(int streamID, int varID, int memtype, void *data, int *nmi
case FILETYPE_NC4:
case FILETYPE_NC4C:
{
if ( memtype == MEMTYPE_FLOAT ) Error("cdfReadVar not implemented for memtype float!");
cdfReadVarDP(streamptr, varID, data, nmiss);
if ( memtype == MEMTYPE_FLOAT )
cdfReadVarSP(streamptr, varID, data, nmiss);
else
cdfReadVarDP(streamptr, varID, data, nmiss);
break;
}
#endif
......
......@@ -18,6 +18,8 @@ void cdfReadRecord(stream_t *streamptr, double *data, int *nmiss);
void cdf_write_record(stream_t *streamptr, int memtype, const void *data, int nmiss);
void cdfReadVarDP(stream_t *streamptr, int varID, double *data, int *nmiss);
void cdfReadVarSP(stream_t *streamptr, int varID, float *data, int *nmiss);
void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data, int nmiss);
void cdfReadVarSliceDP(stream_t *streamptr, int varID, int levelID, double *data, int *nmiss);
......
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