Commit 39366b0c authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

Changed boolean ints to stdbool.

parent a8e62ebc
2017-09-16 Uwe Schulzweida
* using CGRIBEX library version 1.8.1
* Version 1.9.0 released
2017-06-06 Uwe Schulzweida
* Changed boolean ints to stdbool
2017-05-16 Uwe Schulzweida 2017-05-16 Uwe Schulzweida
* Version 1.8.2 released * Version 1.8.2 released
......
...@@ -24,7 +24,7 @@ case "${HOSTNAME}" in ...@@ -24,7 +24,7 @@ case "${HOSTNAME}" in
--enable-iso-c-interface \ --enable-iso-c-interface \
--enable-swig \ --enable-swig \
--enable-python \ --enable-python \
--with-grib_api=$HOME/local/gribapi-1.12.3 \ --with-grib_api=$HOME/local/grib_api-1.14.7 \
--with-netcdf=$HOME/local \ --with-netcdf=$HOME/local \
--with-szlib=$HOME/local \ --with-szlib=$HOME/local \
CC=icc CFLAGS="-g -D_REENTRANT -Wall -Wwrite-strings -O3 -march=native -fp-model source" CC=icc CFLAGS="-g -D_REENTRANT -Wall -Wwrite-strings -O3 -march=native -fp-model source"
...@@ -35,7 +35,7 @@ case "${HOSTNAME}" in ...@@ -35,7 +35,7 @@ case "${HOSTNAME}" in
--enable-iso-c-interface \ --enable-iso-c-interface \
--enable-swig \ --enable-swig \
--enable-python \ --enable-python \
--with-grib_api=$HOME/local/grib_api-1.13.1 \ --with-grib_api=$HOME/local/grib_api-1.14.7 \
--with-netcdf=$HOME/local/netcdf-c-4.3.3.1-threadsafe \ --with-netcdf=$HOME/local/netcdf-c-4.3.3.1-threadsafe \
--with-szlib=$HOME/local \ --with-szlib=$HOME/local \
CC=gcc CFLAGS="-g -pipe -D_REENTRANT -Wall -Wwrite-strings -W -Wfloat-equal -pedantic -O3 -march=native" CC=gcc CFLAGS="-g -pipe -D_REENTRANT -Wall -Wwrite-strings -W -Wfloat-equal -pedantic -O3 -march=native"
......
...@@ -945,8 +945,8 @@ distclean-generic: ...@@ -945,8 +945,8 @@ distclean-generic:
maintainer-clean-generic: maintainer-clean-generic:
@echo "This command is intended for maintainers to use" @echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild." @echo "it deletes files that may require special tools to rebuild."
@ENABLE_CDI_LIB_FALSE@install-exec-local:
@ENABLE_CDI_LIB_FALSE@uninstall-local: @ENABLE_CDI_LIB_FALSE@uninstall-local:
@ENABLE_CDI_LIB_FALSE@install-exec-local:
clean: clean-am clean: clean-am
clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
......
...@@ -163,15 +163,15 @@ int cdfOpen(const char *filename, const char *mode) ...@@ -163,15 +163,15 @@ int cdfOpen(const char *filename, const char *mode)
int cdfOpen64(const char *filename, const char *mode) int cdfOpen64(const char *filename, const char *mode)
{ {
int fileID = -1; int fileID = -1;
int open_file = TRUE;
int filetype = CDI_FILETYPE_NC2; int filetype = CDI_FILETYPE_NC2;
bool open_file = true;
if ( CDF_Debug ) if ( CDF_Debug )
Message("Open %s with mode %c", filename, *mode); Message("Open %s with mode %c", filename, *mode);
#if defined (HAVE_LIBNETCDF) #if defined (HAVE_LIBNETCDF)
#if ! defined (NC_64BIT_OFFSET) #if ! defined (NC_64BIT_OFFSET)
open_file = FALSE; open_file = false;
#endif #endif
#endif #endif
...@@ -194,13 +194,13 @@ int cdfOpen64(const char *filename, const char *mode) ...@@ -194,13 +194,13 @@ int cdfOpen64(const char *filename, const char *mode)
int cdf4Open(const char *filename, const char *mode, int *filetype) int cdf4Open(const char *filename, const char *mode, int *filetype)
{ {
int fileID = -1; int fileID = -1;
int open_file = FALSE; bool open_file = false;
if ( CDF_Debug ) if ( CDF_Debug )
Message("Open %s with mode %c", filename, *mode); Message("Open %s with mode %c", filename, *mode);
#if defined (HAVE_NETCDF4) #if defined (HAVE_NETCDF4)
open_file = TRUE; open_file = true;
#endif #endif
if ( open_file ) if ( open_file )
......
...@@ -76,12 +76,12 @@ void cdf_create(const char *path, int cmode, int *ncidp) ...@@ -76,12 +76,12 @@ void cdf_create(const char *path, int cmode, int *ncidp)
int cdf_open(const char *path, int omode, int *ncidp) int cdf_open(const char *path, int omode, int *ncidp)
{ {
int status = 0; int status = 0;
int dapfile = FALSE; bool dapfile = false;
struct stat filestat; struct stat filestat;
size_t chunksizehint = 0; size_t chunksizehint = 0;
#if defined (HAVE_LIBNC_DAP) #if defined (HAVE_LIBNC_DAP)
if ( strncmp(path, "http:", 5) == 0 || strncmp(path, "https:", 6) == 0 ) dapfile = TRUE; if ( strncmp(path, "http:", 5) == 0 || strncmp(path, "https:", 6) == 0 ) dapfile = true;
#endif #endif
if ( dapfile ) if ( dapfile )
......
...@@ -32,9 +32,9 @@ int cdiNcChunksizehint = CDI_UNDEFID; ...@@ -32,9 +32,9 @@ int cdiNcChunksizehint = CDI_UNDEFID;
int cdiChunkType = CDI_CHUNK_GRID; int cdiChunkType = CDI_CHUNK_GRID;
int cdiSplitLtype105 = CDI_UNDEFID; int cdiSplitLtype105 = CDI_UNDEFID;
int cdiIgnoreAttCoordinates = FALSE; bool cdiIgnoreAttCoordinates = false;
int cdiCoordinatesLonLat = FALSE; bool cdiCoordinatesLonLat = false;
int cdiIgnoreValidRange = FALSE; bool cdiIgnoreValidRange = false;
int cdiSkipRecords = 0; int cdiSkipRecords = 0;
int cdiConvention = CDI_CONVENTION_ECHAM; int cdiConvention = CDI_CONVENTION_ECHAM;
int cdiInventoryMode = 1; int cdiInventoryMode = 1;
...@@ -314,13 +314,13 @@ void cdiSetChunk(const char *chunkAlgo) ...@@ -314,13 +314,13 @@ void cdiSetChunk(const char *chunkAlgo)
void cdiInitialize(void) void cdiInitialize(void)
{ {
static int Init_CDI = FALSE; static bool Init_CDI = false;
char *envstr;
long value;
if ( ! Init_CDI ) if ( ! Init_CDI )
{ {
Init_CDI = TRUE; Init_CDI = true;
char *envstr;
long value;
#if defined (HAVE_LIBCGRIBEX) #if defined (HAVE_LIBCGRIBEX)
gribFixZSE(1); // 1: Fix ZeroShiftError of simple packed spherical harmonics gribFixZSE(1); // 1: Fix ZeroShiftError of simple packed spherical harmonics
...@@ -370,13 +370,13 @@ void cdiInitialize(void) ...@@ -370,13 +370,13 @@ void cdiInitialize(void)
if ( envstr ) cdiSplitLtype105 = atoi(envstr); if ( envstr ) cdiSplitLtype105 = atoi(envstr);
envstr = getenv("IGNORE_ATT_COORDINATES"); envstr = getenv("IGNORE_ATT_COORDINATES");
if ( envstr ) cdiIgnoreAttCoordinates = atoi(envstr); if ( envstr ) cdiIgnoreAttCoordinates = atoi(envstr) > 0;
envstr = getenv("CDI_COORDINATES_LONLAT"); envstr = getenv("CDI_COORDINATES_LONLAT");
if ( envstr ) cdiCoordinatesLonLat = atoi(envstr); if ( envstr ) cdiCoordinatesLonLat = atoi(envstr) > 0;
envstr = getenv("IGNORE_VALID_RANGE"); envstr = getenv("IGNORE_VALID_RANGE");
if ( envstr ) cdiIgnoreValidRange = atoi(envstr); if ( envstr ) cdiIgnoreValidRange = atoi(envstr) > 0;
envstr = getenv("CDI_SKIP_RECORDS"); envstr = getenv("CDI_SKIP_RECORDS");
if ( envstr ) if ( envstr )
......
...@@ -160,9 +160,9 @@ typedef struct ...@@ -160,9 +160,9 @@ typedef struct
// (181; 105, 0, timeRangeIndicator=0) .. instantanous rain // (181; 105, 0, timeRangeIndicator=0) .. instantanous rain
// (181; 105, 0, timeRangeIndicator=4) .. accumulated rain .. both can be in the same grib file // (181; 105, 0, timeRangeIndicator=4) .. accumulated rain .. both can be in the same grib file
#endif // HIRLAM_EXTENSIONS #endif // HIRLAM_EXTENSIONS
short used;
short varID; short varID;
short levelID; short levelID;
short used;
char varname[32]; /* needed for grib decoding with GRIB_API */ char varname[32]; /* needed for grib decoding with GRIB_API */
var_tile_t tiles; /* tile-related meta-data, currently for GRIB-API only. */ var_tile_t tiles; /* tile-related meta-data, currently for GRIB-API only. */
} }
...@@ -178,7 +178,7 @@ typedef struct { ...@@ -178,7 +178,7 @@ typedef struct {
/* tsID>0 number of non constant records */ /* tsID>0 number of non constant records */
int nallrecs; /* number of all records */ int nallrecs; /* number of all records */
int curRecID; /* current record ID */ int curRecID; /* current record ID */
long next; bool next;
off_t position; /* timestep file position */ off_t position; /* timestep file position */
taxis_t taxis; taxis_t taxis;
} }
...@@ -297,7 +297,7 @@ typedef enum { ...@@ -297,7 +297,7 @@ typedef enum {
typedef struct typedef struct
{ {
char* keyword; /* keyword string */ char* keyword; /* keyword string */
int update; bool update;
key_val_pair_datatype data_type; /* data type of this key/value pair */ key_val_pair_datatype data_type; /* data type of this key/value pair */
double dbl_val; /* double value (data_type == t_double) */ double dbl_val; /* double value (data_type == t_double) */
int int_val; /* integer value (data_type == t_int) */ int int_val; /* integer value (data_type == t_int) */
...@@ -333,9 +333,9 @@ extern int cdiDataUnreduced; ...@@ -333,9 +333,9 @@ extern int cdiDataUnreduced;
extern int cdiSortName; extern int cdiSortName;
extern int cdiSortParam; extern int cdiSortParam;
extern int cdiHaveMissval; extern int cdiHaveMissval;
extern int cdiIgnoreAttCoordinates; extern bool cdiIgnoreAttCoordinates;
extern int cdiCoordinatesLonLat; extern bool cdiCoordinatesLonLat;
extern int cdiIgnoreValidRange; extern bool cdiIgnoreValidRange;
extern int cdiSkipRecords; extern int cdiSkipRecords;
extern int cdiConvention; extern int cdiConvention;
extern int cdiInventoryMode; extern int cdiInventoryMode;
......
#ifndef _CGRIBEX_H #ifndef CGRIBEX_H
#define _CGRIBEX_H #define CGRIBEX_H
#include <stdio.h> #include <stdio.h>
#include <stdbool.h>
#include <sys/types.h> #include <sys/types.h>
#define GRIB_MISSVAL -9.E33 #define GRIB_MISSVAL -9.E33
...@@ -206,7 +207,7 @@ void gribSetCalendar(int calendar); ...@@ -206,7 +207,7 @@ void gribSetCalendar(int calendar);
void gribDateTime(int *isec1, int *date, int *time); void gribDateTime(int *isec1, int *date, int *time);
int gribRefDate(int *isec1); int gribRefDate(int *isec1);
int gribRefTime(int *isec1); int gribRefTime(int *isec1);
int gribTimeIsFC(int *isec1); bool gribTimeIsFC(int *isec1);
void gribPrintSec0(int *isec0); void gribPrintSec0(int *isec0);
void gribPrintSec1(int *isec0, int *isec1); void gribPrintSec1(int *isec0, int *isec1);
...@@ -254,5 +255,5 @@ double calculate_pfactor_double(const double* spectralField, long fieldTruncatio ...@@ -254,5 +255,5 @@ double calculate_pfactor_double(const double* spectralField, long fieldTruncatio
} }
#endif #endif
#endif /* _CGRIBEX_H */ #endif /* CGRIBEX_H */
This diff is collapsed.
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
static char gribapi_libvers[64] = ""; static char gribapi_libvers[64] = "";
#if defined (HAVE_LIBGRIB_API) #if defined (HAVE_LIBGRIB_API)
static int gribapi_libvers_init; static bool gribapi_libvers_init;
#endif #endif
...@@ -43,7 +43,7 @@ const char *gribapiLibraryVersionString(void) ...@@ -43,7 +43,7 @@ const char *gribapiLibraryVersionString(void)
gribapiLibraryVersion(&major_version, &minor_version, &revision_version); gribapiLibraryVersion(&major_version, &minor_version, &revision_version);
sprintf(gribapi_libvers, "%d.%d.%d", major_version, minor_version, revision_version); sprintf(gribapi_libvers, "%d.%d.%d", major_version, minor_version, revision_version);
gribapi_libvers_init = 1; gribapi_libvers_init = true;
} }
#endif #endif
...@@ -76,7 +76,7 @@ void gribContainersNew(stream_t * streamptr) ...@@ -76,7 +76,7 @@ void gribContainersNew(stream_t * streamptr)
for ( int levelID = 0; levelID < nlevs; ++levelID ) for ( int levelID = 0; levelID < nlevs; ++levelID )
{ {
gribContainers[varID][levelID].gribHandle = gribHandleNew(editionNumber); gribContainers[varID][levelID].gribHandle = gribHandleNew(editionNumber);
gribContainers[varID][levelID].init = FALSE; gribContainers[varID][levelID].init = false;
} }
} }
...@@ -88,7 +88,7 @@ void gribContainersNew(stream_t * streamptr) ...@@ -88,7 +88,7 @@ void gribContainersNew(stream_t * streamptr)
for ( int varID = 0; varID < nvars; ++varID ) for ( int varID = 0; varID < nvars; ++varID )
{ {
gribContainers[varID].gribHandle = gribHandleNew(editionNumber); gribContainers[varID].gribHandle = gribHandleNew(editionNumber);
gribContainers[varID].init = FALSE; gribContainers[varID].init = false;
} }
streamptr->gribContainers = (void *) gribContainers; streamptr->gribContainers = (void *) gribContainers;
......
...@@ -110,7 +110,7 @@ static inline void gribHandleDelete(void *gh) ...@@ -110,7 +110,7 @@ static inline void gribHandleDelete(void *gh)
#endif #endif
typedef struct { typedef struct {
int init; bool init;
void *gribHandle; void *gribHandle;
} }
gribContainer_t; gribContainer_t;
......
...@@ -427,7 +427,7 @@ int gribapiGetTsteptype(grib_handle *gh) ...@@ -427,7 +427,7 @@ int gribapiGetTsteptype(grib_handle *gh)
{ {
if (CDI_Debug) if (CDI_Debug)
Warning("timeRangeIND = %d; stepType= %s; tsteptype=%d unsupported timeRangeIND at the moment, set to instant!", timeRangeIND, stepType, tsteptype); Warning("timeRangeIND = %d; stepType= %s; tsteptype=%d unsupported timeRangeIND at the moment, set to instant!", timeRangeIND, stepType, tsteptype);
lprint = FALSE; lprint = false;
} }
break; break;
} }
......
...@@ -1329,7 +1329,7 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi ...@@ -1329,7 +1329,7 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi
if ( status == NC_NOERR ) if ( status == NC_NOERR )
{ {
cdf_set_var(ncvars, dimvarid, FALSE); cdf_set_var(ncvars, dimvarid, FALSE);
if ( cdiIgnoreAttCoordinates == false ) if ( !cdiIgnoreAttCoordinates )
{ {
ncvars[ncvarid].coordvarids[i] = dimvarid; ncvars[ncvarid].coordvarids[i] = dimvarid;
ncvars[ncvarid].ncoordvars++; ncvars[ncvarid].ncoordvars++;
...@@ -1372,7 +1372,7 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi ...@@ -1372,7 +1372,7 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi
if ( status == NC_NOERR ) if ( status == NC_NOERR )
{ {
cdf_set_var(ncvars, dimvarid, FALSE); cdf_set_var(ncvars, dimvarid, FALSE);
// if ( cdiIgnoreAttCoordinates == FALSE ) // if ( !cdiIgnoreAttCoordinates )
{ {
ncvars[ncvarid].auxvarids[i] = dimvarid; ncvars[ncvarid].auxvarids[i] = dimvarid;
ncvars[ncvarid].nauxvars++; ncvars[ncvarid].nauxvars++;
...@@ -1430,9 +1430,8 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi ...@@ -1430,9 +1430,8 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi
{ {
if ( ncvars[ncvarid].lvalidrange == false ) if ( ncvars[ncvarid].lvalidrange == false )
{ {
extern int cdiIgnoreValidRange;
bool lignore = xtypeIsFloat(atttype) != xtypeIsFloat(xtype); bool lignore = xtypeIsFloat(atttype) != xtypeIsFloat(xtype);
if ( cdiIgnoreValidRange == FALSE && lignore == false ) if ( !cdiIgnoreValidRange && lignore == false )
{ {
cdfGetAttDouble(ncid, ncvarid, attname, 2, ncvars[ncvarid].validrange); cdfGetAttDouble(ncid, ncvarid, attname, 2, ncvars[ncvarid].validrange);
ncvars[ncvarid].lvalidrange = true; ncvars[ncvarid].lvalidrange = true;
...@@ -1450,9 +1449,8 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi ...@@ -1450,9 +1449,8 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi
{ {
if ( ncvars[ncvarid].lvalidrange == false ) if ( ncvars[ncvarid].lvalidrange == false )
{ {
extern int cdiIgnoreValidRange;
bool lignore = xtypeIsFloat(atttype) != xtypeIsFloat(xtype); bool lignore = xtypeIsFloat(atttype) != xtypeIsFloat(xtype);
if ( cdiIgnoreValidRange == FALSE && lignore == false ) if ( !cdiIgnoreValidRange && lignore == false )
{ {
cdfGetAttDouble(ncid, ncvarid, attname, 1, &(ncvars[ncvarid].validrange)[0]); cdfGetAttDouble(ncid, ncvarid, attname, 1, &(ncvars[ncvarid].validrange)[0]);
ncvars[ncvarid].lvalidrange = true; ncvars[ncvarid].lvalidrange = true;
...@@ -1467,9 +1465,8 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi ...@@ -1467,9 +1465,8 @@ void cdf_scan_var_attr(int nvars, ncvar_t *ncvars, ncdim_t *ncdims, int timedimi
{ {
if ( ncvars[ncvarid].lvalidrange == false ) if ( ncvars[ncvarid].lvalidrange == false )
{ {
extern int cdiIgnoreValidRange;
bool lignore = xtypeIsFloat(atttype) != xtypeIsFloat(xtype); bool lignore = xtypeIsFloat(atttype) != xtypeIsFloat(xtype);
if ( cdiIgnoreValidRange == FALSE && lignore == false ) if ( !cdiIgnoreValidRange && lignore == false )
{ {
cdfGetAttDouble(ncid, ncvarid, attname, 1, &(ncvars[ncvarid].validrange)[1]); cdfGetAttDouble(ncid, ncvarid, attname, 1, &(ncvars[ncvarid].validrange)[1]);
ncvars[ncvarid].lvalidrange = true; ncvars[ncvarid].lvalidrange = true;
......
...@@ -1906,8 +1906,7 @@ void cdfDefGrid(stream_t *streamptr, int gridID, int gridindex) ...@@ -1906,8 +1906,7 @@ void cdfDefGrid(stream_t *streamptr, int gridID, int gridindex)
} }
else else
{ {
int ndims = !( gridtype == GRID_LONLAT && size == 1 int ndims = !(gridtype == GRID_LONLAT && size == 1 && !gridInqHasDims(gridID));
&& gridInqHasDims(gridID) == FALSE );
if ( gridInqXsize(gridID) > 0 ) cdfDefXaxis(streamptr, gridID, gridindex, ndims); if ( gridInqXsize(gridID) > 0 ) cdfDefXaxis(streamptr, gridID, gridindex, ndims);
if ( gridInqYsize(gridID) > 0 ) cdfDefYaxis(streamptr, gridID, gridindex, ndims); if ( gridInqYsize(gridID) > 0 ) cdfDefYaxis(streamptr, gridID, gridindex, ndims);
......
...@@ -577,7 +577,7 @@ cgribexScanTsFixNtsteps(stream_t *streamptr, off_t recpos) ...@@ -577,7 +577,7 @@ cgribexScanTsFixNtsteps(stream_t *streamptr, off_t recpos)
if ( tsID != streamptr->rtsteps ) if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID); Error("Internal error. tsID = %d", tsID);
streamptr->tsteps[tsID-1].next = TRUE; streamptr->tsteps[tsID-1].next = true;
streamptr->tsteps[tsID].position = recpos; streamptr->tsteps[tsID].position = recpos;
} }
} }
...@@ -652,7 +652,7 @@ int cgribexScanTimestep1(stream_t *streamptr) ...@@ -652,7 +652,7 @@ int cgribexScanTimestep1(stream_t *streamptr)
} }
unsigned nrecs = 0; unsigned nrecs = 0;
while ( TRUE ) while ( true )
{ {
recsize = gribGetSize(fileID); recsize = gribGetSize(fileID);
recpos = fileGetPos(fileID); recpos = fileGetPos(fileID);
...@@ -871,7 +871,7 @@ int cgribexScanTimestep2(stream_t * streamptr) ...@@ -871,7 +871,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
int nrecs_scanned = nrecords; int nrecs_scanned = nrecords;
int rindex = 0; int rindex = 0;
while ( TRUE ) while ( true )
{ {
if ( rindex > nrecords ) break; if ( rindex > nrecords ) break;
...@@ -976,7 +976,7 @@ int cgribexScanTimestep2(stream_t * streamptr) ...@@ -976,7 +976,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
} }
else else
{ {
streamptr->tsteps[tsID].records[recID].used = TRUE; streamptr->tsteps[tsID].records[recID].used = true;
streamptr->tsteps[tsID].recIDs[rindex] = recID; streamptr->tsteps[tsID].recIDs[rindex] = recID;
} }
} }
...@@ -991,7 +991,7 @@ int cgribexScanTimestep2(stream_t * streamptr) ...@@ -991,7 +991,7 @@ int cgribexScanTimestep2(stream_t * streamptr)
} }
else else
{ {
streamptr->tsteps[tsID].records[recID].used = TRUE; streamptr->tsteps[tsID].records[recID].used = true;
streamptr->tsteps[tsID].recIDs[rindex] = recID; streamptr->tsteps[tsID].recIDs[rindex] = recID;
} }
} }
...@@ -1114,7 +1114,7 @@ int cgribexScanTimestep(stream_t * streamptr) ...@@ -1114,7 +1114,7 @@ int cgribexScanTimestep(stream_t * streamptr)
nrecs_scanned = streamptr->tsteps[0].nallrecs + streamptr->tsteps[1].nrecs*(tsID-1); nrecs_scanned = streamptr->tsteps[0].nallrecs + streamptr->tsteps[1].nrecs*(tsID-1);
rindex = 0; rindex = 0;
while ( TRUE ) while ( true )
{ {
if ( rindex > nrecs ) break; if ( rindex > nrecs ) break;
...@@ -1227,7 +1227,7 @@ int cgribexScanTimestep(stream_t * streamptr) ...@@ -1227,7 +1227,7 @@ int cgribexScanTimestep(stream_t * streamptr)
if ( cdiInventoryMode == 1 ) if ( cdiInventoryMode == 1 )
{ {
streamptr->tsteps[tsID].records[recID].used = TRUE; streamptr->tsteps[tsID].records[recID].used = true;
streamptr->tsteps[tsID].recIDs[rindex] = recID; streamptr->tsteps[tsID].recIDs[rindex] = recID;
} }
else else
...@@ -1246,7 +1246,7 @@ int cgribexScanTimestep(stream_t * streamptr) ...@@ -1246,7 +1246,7 @@ int cgribexScanTimestep(stream_t * streamptr)
} }
else else
{ {
streamptr->tsteps[tsID].records[recID].used = TRUE; streamptr->tsteps[tsID].records[recID].used = true;
streamptr->tsteps[tsID].recIDs[rindex] = recID; streamptr->tsteps[tsID].recIDs[rindex] = recID;
} }
} }
...@@ -1291,7 +1291,7 @@ int cgribexScanTimestep(stream_t * streamptr) ...@@ -1291,7 +1291,7 @@ int cgribexScanTimestep(stream_t * streamptr)
if ( tsID != streamptr->rtsteps ) if ( tsID != streamptr->rtsteps )
Error("Internal error. tsID = %d", tsID); Error("Internal error. tsID = %d", tsID);
streamptr->tsteps[tsID-1].next = 1; streamptr->tsteps[tsID-1].next = true;
streamptr->tsteps[tsID].position = recpos; streamptr->tsteps[tsID].position = recpos;
} }
...@@ -1672,7 +1672,7 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI ...@@ -1672,7 +1672,7 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI
} }
} }
ISEC2_Reduced = FALSE; ISEC2_Reduced = false;
ISEC2_ScanFlag = 0; ISEC2_ScanFlag = 0;
switch (gridtype) switch (gridtype)
...@@ -1697,7 +1697,7 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI ...@@ -1697,7 +1697,7 @@ void cgribexDefGrid(int *isec1, int *isec2, double *fsec2, int *isec4, int gridI
if ( gridtype == GRID_GAUSSIAN_REDUCED ) if ( gridtype == GRID_GAUSSIAN_REDUCED )
{ {
ISEC2_Reduced = TRUE; ISEC2_Reduced = true;
nlon = 0; nlon = 0;