Commit 7281514e authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

vlistDefVarDatatype: changed default missing values of signed integers to -TYPE_MAX

parent 4ffa6d67
2013-04-04 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* vlistDefVarDatatype: changed default missing values of signed integers to -TYPE_MAX
2013-04-02 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cdi.h: changed >char*< to >char *< (bug fix for fortran interface)
......
......@@ -854,16 +854,16 @@ void vlistDefVarDatatype(int vlistID, int varID, int datatype)
}
vlistptr->vars[varID].datatype = datatype;
if ( vlistptr->vars[varID].missvalused == FALSE )
switch (datatype)
{
case DATATYPE_INT8: vlistptr->vars[varID].missval = SCHAR_MIN; break;
case DATATYPE_UINT8: vlistptr->vars[varID].missval = UCHAR_MAX; break;
case DATATYPE_INT16: vlistptr->vars[varID].missval = SHRT_MIN; break;
case DATATYPE_UINT16: vlistptr->vars[varID].missval = USHRT_MAX; break;
case DATATYPE_INT32: vlistptr->vars[varID].missval = INT_MIN; break;
case DATATYPE_UINT32: vlistptr->vars[varID].missval = UINT_MAX; break;
case DATATYPE_INT8: vlistptr->vars[varID].missval = -SCHAR_MAX; break;
case DATATYPE_UINT8: vlistptr->vars[varID].missval = UCHAR_MAX; break;
case DATATYPE_INT16: vlistptr->vars[varID].missval = -SHRT_MAX; break;
case DATATYPE_UINT16: vlistptr->vars[varID].missval = USHRT_MAX; break;
case DATATYPE_INT32: vlistptr->vars[varID].missval = -INT_MAX; break;
case DATATYPE_UINT32: vlistptr->vars[varID].missval = UINT_MAX; break;
}
}
......
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