Commit 7a6f6fe3 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Replaced UNDEFID by CDI_UNDEFID.

parent 5f01cbca
......@@ -9,18 +9,16 @@
#include "cdi.h"
#include "basetime.h"
#undef UNDEFID
#define UNDEFID CDI_UNDEFID
void basetimeInit(basetime_t *basetime)
{
if ( basetime == NULL )
Error("Internal problem! Basetime not allocated.");
basetime->ncvarid = UNDEFID;
basetime->ncdimid = UNDEFID;
basetime->ncvarboundsid = UNDEFID;
basetime->leadtimeid = UNDEFID;
basetime->ncvarid = CDI_UNDEFID;
basetime->ncdimid = CDI_UNDEFID;
basetime->ncvarboundsid = CDI_UNDEFID;
basetime->leadtimeid = CDI_UNDEFID;
basetime->lwrf = false;
basetime->timevar_cache = NULL;
}
......
......@@ -16,10 +16,6 @@
#include "vlist.h"
#undef UNDEFID
#define UNDEFID CDI_UNDEFID
static
void cdfReadGridTraj(stream_t *streamptr, int gridID)
{
......@@ -53,7 +49,7 @@ void cdfGetSlapDescription(stream_t *streamptr, int varID, size_t (*start)[4], s
if ( CDI_Debug ) Message("tsID = %d", tsID);
int xid = UNDEFID, yid = UNDEFID;
int xid = CDI_UNDEFID, yid = CDI_UNDEFID;
if ( gridInqType(gridID) == GRID_TRAJECTORY )
{
cdfReadGridTraj(streamptr, gridID);
......@@ -74,9 +70,9 @@ void cdfGetSlapDescription(stream_t *streamptr, int varID, size_t (*start)[4], s
ndims++; \
} while(0)
if ( tsteptype != TSTEP_CONSTANT ) addDimension((size_t)tsID, 1);
if ( zid != UNDEFID ) addDimension(0, (size_t)zaxisInqSize(zaxisID));
if ( yid != UNDEFID ) addDimension(0, (size_t)gridInqYsize(gridID));
if ( xid != UNDEFID ) addDimension(0, (size_t)gridInqXsize(gridID));
if ( zid != CDI_UNDEFID ) addDimension(0, (size_t)zaxisInqSize(zaxisID));
if ( yid != CDI_UNDEFID ) addDimension(0, (size_t)gridInqYsize(gridID));
if ( xid != CDI_UNDEFID ) addDimension(0, (size_t)gridInqXsize(gridID));
#undef addDimension
assert(ndims <= (int)(sizeof(*start)/sizeof(**start)));
......@@ -365,7 +361,7 @@ void cdfInqDimIds(stream_t *streamptr, int varId, int (*outDimIds)[3])
int gridId = vlistInqVarGrid(streamptr->vlistID, varId);
int gridindex = vlistGridIndex(streamptr->vlistID, gridId);
(*outDimIds)[0] = (*outDimIds)[1] = (*outDimIds)[2] = UNDEFID;
(*outDimIds)[0] = (*outDimIds)[1] = (*outDimIds)[2] = CDI_UNDEFID;
switch ( gridInqType(gridId) )
{
case GRID_TRAJECTORY:
......@@ -390,8 +386,8 @@ void cdfInqDimIds(stream_t *streamptr, int varId, int (*outDimIds)[3])
static
int cdfGetSkipDim(int fileId, int ncvarid, int (*dimIds)[3])
{
if((*dimIds)[0] != UNDEFID) return 0;
if((*dimIds)[1] != UNDEFID) return 0;
if((*dimIds)[0] != CDI_UNDEFID) return 0;
if((*dimIds)[1] != CDI_UNDEFID) return 0;
int nvdims;
cdf_inq_varndims(fileId, ncvarid, &nvdims);
if(nvdims != 3) return 0;
......@@ -436,7 +432,7 @@ void cdfGetSliceSlapDescription(stream_t *streamptr, int varId, int levelId, boo
int dimorder[3];
vlistInqVarDimorder(vlistId, varId, &dimorder);
*outSwapXY = (dimorder[2] == 2 || dimorder[0] == 1) && dimIds[0] != UNDEFID && dimIds[1] != UNDEFID ;
*outSwapXY = (dimorder[2] == 2 || dimorder[0] == 1) && dimIds[0] != CDI_UNDEFID && dimIds[1] != CDI_UNDEFID ;
int ndims = 0;
......@@ -453,7 +449,7 @@ void cdfGetSliceSlapDescription(stream_t *streamptr, int varId, int levelId, boo
{
size_t size;
int curDimId = dimIds[dimorder[id]-1];
if ( curDimId == UNDEFID ) continue;
if ( curDimId == CDI_UNDEFID ) continue;
switch ( dimorder[id] )
{
Error("Internal errror: Malformed dimension order encountered. Please report this bug.\n");
......
......@@ -13,10 +13,6 @@
#include "vlist.h"
#undef UNDEFID
#define UNDEFID CDI_UNDEFID
void cdfDefVarDeflate(int ncid, int ncvarid, int deflate_level)
{
#if defined(HAVE_NETCDF4)
......@@ -113,7 +109,7 @@ void cdfDefInstitut(stream_t *streamptr)
int fileID = streamptr->fileID;
int instID = vlistInqInstitut(vlistID);
if ( instID != UNDEFID )
if ( instID != CDI_UNDEFID )
{
const char *longname = institutInqLongnamePtr(instID);
if ( longname )
......@@ -136,7 +132,7 @@ void cdfDefSource(stream_t *streamptr)
int fileID = streamptr->fileID;
int modelID = vlistInqModel(vlistID);
if ( modelID != UNDEFID )
if ( modelID != CDI_UNDEFID )
{
const char *longname = modelInqNamePtr(modelID);
if ( longname )
......@@ -257,7 +253,7 @@ void cdfDefLocalAtts(stream_t *streamptr)
int fileID = streamptr->fileID;
if ( streamptr->localatts ) return;
if ( vlistInqInstitut(vlistID) != UNDEFID ) return;
if ( vlistInqInstitut(vlistID) != CDI_UNDEFID ) return;
streamptr->localatts = 1;
......@@ -266,7 +262,7 @@ void cdfDefLocalAtts(stream_t *streamptr)
for ( int varID = 0; varID < streamptr->nvars; varID++ )
{
int instID = vlistInqVarInstitut(vlistID, varID);
if ( instID != UNDEFID )
if ( instID != CDI_UNDEFID )
{
int ncvarid = streamptr->vars[varID].ncvarid;
const char *name = institutInqNamePtr(instID);
......@@ -320,7 +316,7 @@ static
int cdfDefVar(stream_t *streamptr, int varID)
{
int ncvarid = -1;
int xid = UNDEFID, yid = UNDEFID;
int xid = CDI_UNDEFID, yid = CDI_UNDEFID;
size_t xsize = 0, ysize = 0;
char varname[CDI_MAX_NAME];
int dims[4];
......@@ -338,7 +334,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
if ( CDI_Debug )
Message("streamID = %d, fileID = %d, varID = %d", streamptr->self, fileID, varID);
if ( streamptr->vars[varID].ncvarid != UNDEFID )
if ( streamptr->vars[varID].ncvarid != CDI_UNDEFID )
return streamptr->vars[varID].ncvarid;
int vlistID = streamptr->vlistID;
......@@ -362,18 +358,18 @@ int cdfDefVar(stream_t *streamptr, int varID)
{
xid = streamptr->ncgrid[gridindex].xdimID;
yid = streamptr->ncgrid[gridindex].ydimID;
if ( xid != UNDEFID ) cdf_inq_dimlen(fileID, xid, &xsize);
if ( yid != UNDEFID ) cdf_inq_dimlen(fileID, yid, &ysize);
if ( xid != CDI_UNDEFID ) cdf_inq_dimlen(fileID, xid, &xsize);
if ( yid != CDI_UNDEFID ) cdf_inq_dimlen(fileID, yid, &ysize);
}
int zaxisindex = vlistZaxisIndex(vlistID, zaxisID);
int zid = streamptr->zaxisID[zaxisindex];
bool zaxis_is_scalar = false;
if ( zid == UNDEFID ) zaxis_is_scalar = zaxisInqScalar(zaxisID) > 0;
if ( zid == CDI_UNDEFID ) zaxis_is_scalar = zaxisInqScalar(zaxisID) > 0;
if ( dimorder[0] != 3 ) lchunk = false; /* ZYX and ZXY */
if ( ((dimorder[0]>0)+(dimorder[1]>0)+(dimorder[2]>0)) < ((xid!=UNDEFID)+(yid!=UNDEFID)+(zid!=UNDEFID)) )
if ( ((dimorder[0]>0)+(dimorder[1]>0)+(dimorder[2]>0)) < ((xid!=CDI_UNDEFID)+(yid!=CDI_UNDEFID)+(zid!=CDI_UNDEFID)) )
{
printf("zid=%d yid=%d xid=%d\n", zid, yid, xid);
Error("Internal problem, dimension order missing!");
......@@ -383,32 +379,32 @@ int cdfDefVar(stream_t *streamptr, int varID)
if ( tsteptype != TSTEP_CONSTANT )
{
if ( tid == UNDEFID ) Error("Internal problem, time undefined!");
if ( tid == CDI_UNDEFID ) Error("Internal problem, time undefined!");
chunks[ndims] = 1;
dims[ndims++] = tid;
axis[iax++] = 'T';
}
/*
if ( zid != UNDEFID ) axis[iax++] = 'Z';
if ( zid != UNDEFID ) chunks[ndims] = 1;
if ( zid != UNDEFID ) dims[ndims++] = zid;
if ( zid != CDI_UNDEFID ) axis[iax++] = 'Z';
if ( zid != CDI_UNDEFID ) chunks[ndims] = 1;
if ( zid != CDI_UNDEFID ) dims[ndims++] = zid;
if ( yid != UNDEFID ) chunks[ndims] = ysize;
if ( yid != UNDEFID ) dims[ndims++] = yid;
if ( yid != CDI_UNDEFID ) chunks[ndims] = ysize;
if ( yid != CDI_UNDEFID ) dims[ndims++] = yid;
if ( xid != UNDEFID ) chunks[ndims] = xsize;
if ( xid != UNDEFID ) dims[ndims++] = xid;
if ( xid != CDI_UNDEFID ) chunks[ndims] = xsize;
if ( xid != CDI_UNDEFID ) dims[ndims++] = xid;
*/
for ( int id = 0; id < 3; ++id )
{
if ( dimorder[id] == 3 && zid != UNDEFID )
if ( dimorder[id] == 3 && zid != CDI_UNDEFID )
{
axis[iax++] = 'Z';
chunks[ndims] = 1;
dims[ndims] = zid;
ndims++;
}
else if ( dimorder[id] == 2 && yid != UNDEFID )
else if ( dimorder[id] == 2 && yid != CDI_UNDEFID )
{
if ( chunktype == CDI_CHUNK_LINES )
chunks[ndims] = 1;
......@@ -417,7 +413,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
dims[ndims] = yid;
ndims++;
}
else if ( dimorder[id] == 1 && xid != UNDEFID )
else if ( dimorder[id] == 1 && xid != CDI_UNDEFID )
{
chunks[ndims] = xsize;
dims[ndims] = xid;
......@@ -583,7 +579,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
cdf_put_att_text(fileID, ncvarid, "param", strlen(paramstr), paramstr);
}
if ( tableID != UNDEFID )
if ( tableID != CDI_UNDEFID )
{
tablenum = tableInqNum(tableID);
if ( tablenum > 0 )
......@@ -621,7 +617,7 @@ int cdfDefVar(stream_t *streamptr, int varID)
{
cdf_put_att_text(fileID, ncvarid, "coordinates", 9, "tlon tlat" );
}
else if ( gridtype == GRID_LONLAT && xid == UNDEFID && yid == UNDEFID && gridsize == 1 )
else if ( gridtype == GRID_LONLAT && xid == CDI_UNDEFID && yid == CDI_UNDEFID && gridsize == 1 )
{
int ncxvarID = streamptr->ncgrid[gridindex].xvarID;
int ncyvarID = streamptr->ncgrid[gridindex].yvarID;
......@@ -1009,7 +1005,7 @@ void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data
int zaxisID = vlistInqVarZaxis(vlistID, varID);
int tsteptype = vlistInqVarTsteptype(vlistID, varID);
int xid = UNDEFID, yid = UNDEFID;
int xid = CDI_UNDEFID, yid = CDI_UNDEFID;
if ( gridInqType(gridID) == GRID_TRAJECTORY )
{
cdfWriteGridTraj(streamptr, gridID);
......@@ -1031,14 +1027,14 @@ void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data
ndims++;
}
if ( zid != UNDEFID )
if ( zid != CDI_UNDEFID )
{
start[ndims] = 0;
count[ndims] = (size_t)zaxisInqSize(zaxisID);
ndims++;
}
if ( yid != UNDEFID )
if ( yid != CDI_UNDEFID )
{
start[ndims] = 0;
cdf_inq_dimlen(fileID, yid, &size);
......@@ -1047,7 +1043,7 @@ void cdf_write_var(stream_t *streamptr, int varID, int memtype, const void *data
ndims++;
}
if ( xid != UNDEFID )
if ( xid != CDI_UNDEFID )
{
start[ndims] = 0;
cdf_inq_dimlen(fileID, xid, &size);
......@@ -1081,7 +1077,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
{
if ( streamptr->accessmode == 0 ) cdfEndDef(streamptr);
int xid = UNDEFID, yid = UNDEFID;
int xid = CDI_UNDEFID, yid = CDI_UNDEFID;
size_t xsize = 0, ysize = 0;
size_t start[5];
size_t count[5];
......@@ -1128,7 +1124,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
count[ndims] = 1;
ndims++;
}
if ( zid != UNDEFID )
if ( zid != CDI_UNDEFID )
{
int size = zaxisInqSize(zaxisID);
xassert(rect[2][0] >= 0 && rect[2][0] <= rect[2][1]
......@@ -1137,7 +1133,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
count[ndims] = (size_t)rect[2][1] - (size_t)rect[2][0] + 1;
ndims++;
}
if ( yid != UNDEFID )
if ( yid != CDI_UNDEFID )
{
size_t size;
cdf_inq_dimlen(fileID, yid, &size);
......@@ -1147,7 +1143,7 @@ void cdf_write_var_chunk(stream_t *streamptr, int varID, int memtype,
count[ndims] = (size_t)rect[1][1] - (size_t)rect[1][0] + 1;
ndims++;
}
if ( xid != UNDEFID )
if ( xid != CDI_UNDEFID )
{
size_t size;
cdf_inq_dimlen(fileID, xid, &size);
......@@ -1187,7 +1183,7 @@ void cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtyp
size_t start[5];
size_t count[5];
int dimorder[3];
int xid = UNDEFID, yid = UNDEFID;
int xid = CDI_UNDEFID, yid = CDI_UNDEFID;
if ( CDI_Debug ) Message("streamID = %d varID = %d", streamptr->self, varID);
......@@ -1220,7 +1216,7 @@ void cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtyp
int zaxisindex = vlistZaxisIndex(vlistID, zaxisID);
int zid = streamptr->zaxisID[zaxisindex];
bool swapxy = (dimorder[2] == 2 || dimorder[0] == 1) && xid != UNDEFID && yid != UNDEFID;
bool swapxy = (dimorder[2] == 2 || dimorder[0] == 1) && xid != CDI_UNDEFID && yid != CDI_UNDEFID;
size_t ndims = 0;
if ( tsteptype != TSTEP_CONSTANT )
......@@ -1232,20 +1228,20 @@ void cdf_write_var_slice(stream_t *streamptr, int varID, int levelID, int memtyp
for ( int id = 0; id < 3; ++id )
{
if ( dimorder[id] == 3 && zid != UNDEFID )
if ( dimorder[id] == 3 && zid != CDI_UNDEFID )
{
start[ndims] = (size_t)levelID;
count[ndims] = 1;
ndims++;
}
else if ( dimorder[id] == 2 && yid != UNDEFID )
else if ( dimorder[id] == 2 && yid != CDI_UNDEFID )
{
start[ndims] = 0;
cdf_inq_dimlen(fileID, yid, &ysize);
count[ndims] = ysize;
ndims++;
}
else if ( dimorder[id] == 1 && xid != UNDEFID )
else if ( dimorder[id] == 1 && xid != CDI_UNDEFID )
{
start[ndims] = 0;
cdf_inq_dimlen(fileID, xid, &xsize);
......
......@@ -20,8 +20,6 @@
#include "serialize.h"
#include "vlist.h"
#undef UNDEFID
#define UNDEFID -1
/* the value in the second pair of brackets must match the length of
* the longest string (including terminating NUL) */
......@@ -4509,7 +4507,7 @@ struct addIfNewRes cdiVlistAddGridIfNew(int vlistID, grid_t *grid, int mode)
if ( mode == 0 )
for ( unsigned index = 0; index < ngrids; index++ )
{
if ( (gridID = vlistptr->gridIDs[index]) != UNDEFID )
if ( (gridID = vlistptr->gridIDs[index]) != CDI_UNDEFID )
{
if ( gridCompare(gridID, grid, false) == false )
{
......
......@@ -15,12 +15,10 @@
#include "serialize.h"
#include "institution.h"
#undef UNDEFID
#define UNDEFID -1
static int ECMWF = UNDEFID,
MPIMET = UNDEFID,
MCH = UNDEFID;
static int ECMWF = CDI_UNDEFID,
MPIMET = CDI_UNDEFID,
MCH = CDI_UNDEFID;
typedef struct
{
......@@ -53,10 +51,10 @@ static const resOps instituteOps = {
static
void instituteDefaultValue ( institute_t * instituteptr )
{
instituteptr->self = UNDEFID;
instituteptr->self = CDI_UNDEFID;
instituteptr->used = 0;
instituteptr->center = UNDEFID;
instituteptr->subcenter = UNDEFID;
instituteptr->center = CDI_UNDEFID;
instituteptr->subcenter = CDI_UNDEFID;
instituteptr->name = NULL;
instituteptr->longname = NULL;
}
......@@ -151,14 +149,14 @@ findInstitute(int id, void *res, void *data)
int institutInq(int center, int subcenter, const char *name, const char *longname)
{
institute_t * ip_ref = (institute_t *) Malloc(sizeof (*ip_ref));
ip_ref->self = UNDEFID;
ip_ref->self = CDI_UNDEFID;
ip_ref->used = 0;
ip_ref->center = center;
ip_ref->subcenter = subcenter;
ip_ref->name = name && name[0] ? (char *)name : NULL;
ip_ref->longname = longname && longname[0] ? (char *)longname : NULL;
struct instLoc state = { .ip = ip_ref, .id = UNDEFID };
struct instLoc state = { .ip = ip_ref, .id = CDI_UNDEFID };
cdiResHFilterApply(&instituteOps, findInstitute, &state);
Free(ip_ref);
......@@ -202,10 +200,10 @@ int institutInqCenter(int instID)
{
institute_t * instituteptr = NULL;
if ( instID != UNDEFID )
if ( instID != CDI_UNDEFID )
instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
return instituteptr ? instituteptr->center : UNDEFID;
return instituteptr ? instituteptr->center : CDI_UNDEFID;
}
......@@ -213,10 +211,10 @@ int institutInqSubcenter(int instID)
{
institute_t * instituteptr = NULL;
if ( instID != UNDEFID )
if ( instID != CDI_UNDEFID )
instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
return instituteptr ? instituteptr->subcenter: UNDEFID;
return instituteptr ? instituteptr->subcenter: CDI_UNDEFID;
}
......@@ -224,7 +222,7 @@ const char *institutInqNamePtr(int instID)
{
institute_t * instituteptr = NULL;
if ( instID != UNDEFID )
if ( instID != CDI_UNDEFID )
instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
return instituteptr ? instituteptr->name : NULL;
......@@ -235,7 +233,7 @@ const char *institutInqLongnamePtr(int instID)
{
institute_t * instituteptr = NULL;
if ( instID != UNDEFID )
if ( instID != CDI_UNDEFID )
instituteptr = ( institute_t * ) reshGetVal ( instID, &instituteOps );
return instituteptr ? instituteptr->longname : NULL;
......
......@@ -13,12 +13,12 @@
#include "resource_unpack.h"
#include "serialize.h"
#undef UNDEFID
#define UNDEFID -1
#undef CDI_UNDEFID
#define CDI_UNDEFID -1
static int ECHAM4 = UNDEFID,
ECHAM5 = UNDEFID,
COSMO = UNDEFID;
static int ECHAM4 = CDI_UNDEFID,
ECHAM5 = CDI_UNDEFID,
COSMO = CDI_UNDEFID;
typedef struct
{
......@@ -56,10 +56,10 @@ static const resOps modelOps = {
static
void modelDefaultValue ( model_t *modelptr )
{
modelptr->self = UNDEFID;
modelptr->self = CDI_UNDEFID;
modelptr->used = 0;
modelptr->instID = UNDEFID;
modelptr->modelgribID = UNDEFID;
modelptr->instID = CDI_UNDEFID;
modelptr->modelgribID = CDI_UNDEFID;
modelptr->name = NULL;
}
......@@ -186,7 +186,7 @@ int modelInq(int instID, int modelgribID, const char *name)
struct modelLoc searchState = { .name = name, .instID = instID,
.modelgribID = modelgribID,
.resID = UNDEFID };
.resID = CDI_UNDEFID };
if (name && *name)
cdiResHFilterApply(&modelOps, findModelByName, &searchState);
else
......@@ -213,10 +213,10 @@ int modelInqInstitut(int modelID)
modelInit ();
if ( modelID != UNDEFID )
if ( modelID != CDI_UNDEFID )
modelptr = ( model_t * ) reshGetVal ( modelID, &modelOps );
return modelptr ? modelptr->instID : UNDEFID;
return modelptr ? modelptr->instID : CDI_UNDEFID;
}
......@@ -226,10 +226,10 @@ int modelInqGribID(int modelID)
modelInit ();
if ( modelID != UNDEFID )
if ( modelID != CDI_UNDEFID )
modelptr = ( model_t * ) reshGetVal ( modelID, &modelOps );
return modelptr ? modelptr->modelgribID : UNDEFID;
return modelptr ? modelptr->modelgribID : CDI_UNDEFID;
}
......@@ -239,7 +239,7 @@ const char *modelInqNamePtr(int modelID)
modelInit ();
if ( modelID != UNDEFID )
if ( modelID != CDI_UNDEFID )
modelptr = ( model_t * ) reshGetVal ( modelID, &modelOps );
return modelptr ? modelptr->name : NULL;
......
This diff is collapsed.
......@@ -14,9 +14,6 @@
#include "zaxis.h"
#undef UNDEFID
#define UNDEFID CDI_UNDEFID
#define POSITIVE_UP 1
#define POSITIVE_DOWN 2
......
......@@ -20,13 +20,8 @@
#include "exse.h"
#undef UNDEFID
#define UNDEFID CDI_UNDEFID
#if defined (HAVE_LIBEXTRA)
typedef struct {
int param;
int level;
......@@ -85,7 +80,7 @@ int extInqRecord(stream_t *streamptr, int *varID, int *levelID)
*varID = vlistInqVarID(vlistID, icode);
if ( *varID == UNDEFID ) Error("Code %d undefined", icode);
if ( *varID == CDI_UNDEFID ) Error("Code %d undefined", icode);
zaxisID = vlistInqVarZaxis(vlistID, *varID);
......@@ -630,8 +625,8 @@ int extInqTimestep(stream_t *streamptr, int tsID)
if ( CDI_Debug )
Message("tsID = %d rtsteps = %d", tsID, streamptr->rtsteps);
long ntsteps = UNDEFID;
while ( ( tsID + 1 ) > streamptr->rtsteps && ntsteps == UNDEFID )
long ntsteps = CDI_UNDEFID;
while ( ( tsID + 1 ) > streamptr->rtsteps && ntsteps == CDI_UNDEFID )
ntsteps = extScanTimestep(streamptr);
int nrecs = 0;
......
......@@ -24,13 +24,8 @@
#include "exse.h"
#undef UNDEFID
#define UNDEFID CDI_UNDEFID
#if defined (HAVE_LIBIEG)
typedef struct {
int param;
int level;
......@@ -82,7 +77,7 @@ int iegInqRecord(stream_t *streamptr, int *varID, int *levelID)
*varID = vlistInqVarID(vlistID, icode);
if ( *varID == UNDEFID ) Error("Code %d undefined", icode);
if ( *varID == CDI_UNDEFID ) Error("Code %d undefined", icode);
zaxisID = vlistInqVarZaxis(vlistID, *varID);
......@@ -1156,8 +1151,8 @@ int iegInqTimestep(stream_t *streamptr, int tsID)
if ( CDI_Debug )
Message("tsID = %d rtsteps = %d", tsID, streamptr->rtsteps);
long ntsteps = UNDEFID;
while ( ( tsID + 1 ) > streamptr->rtsteps && ntsteps == UNDEFID )
long ntsteps = CDI_UNDEFID;
while ( ( tsID + 1 ) > streamptr->rtsteps && ntsteps == CDI_UNDEFID )
ntsteps = iegScanTimestep(streamptr);
int nrecs = 0;
......
......@@ -21,13 +21,8 @@
#include "exse.h"
#undef UNDEFID
#define UNDEFID CDI_UNDEFID
#if defined (HAVE_LIBSERVICE)
typedef struct {
int param;
int level;
......@@ -79,7 +74,7 @@ int srvInqRecord(stream_t *streamptr, int *varID, int *levelID)