Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
5edadf95
Commit
5edadf95
authored
Jun 02, 2015
by
Thomas Jahns
🤸
Browse files
Do not compile delegate wrapper function if wrapped library is unavailable.
parent
76ff464a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/stream_grb.c
View file @
5edadf95
...
...
@@ -307,21 +307,20 @@ void grbReadRecord(stream_t * streamptr, double *data, int *nmiss)
static
int
grbScanTimestep1
(
stream_t
*
streamptr
)
{
int
status
;
int
filetype
;
filetype
=
streamptr
->
filetype
;
int
status
=
CDI_EUFTYPE
;
#if defined (HAVE_LIBCGRIBEX)
int
filetype
=
streamptr
->
filetype
;
if
(
filetype
==
FILETYPE_GRB
)
{
status
=
cgribexScanTimestep1
(
streamptr
);
}
status
=
cgribexScanTimestep1
(
streamptr
);
#endif
#if defined(HAVE_LIBCGRIBEX) && defined (HAVE_LIBGRIB_API)
else
#endif
{
status
=
gribapiScanTimestep1
(
streamptr
);
}
#ifdef HAVE_LIBGRIB_API
status
=
gribapiScanTimestep1
(
streamptr
);
#endif
return
(
status
);
}
...
...
@@ -329,12 +328,11 @@ int grbScanTimestep1(stream_t * streamptr)
static
int
grbScanTimestep2
(
stream_t
*
streamptr
)
{
int
status
=
0
;
int
filetype
;
filetype
=
streamptr
->
filetype
;
int
status
=
CDI_EUFTYPE
;
#if defined (HAVE_LIBCGRIBEX)
int
filetype
=
streamptr
->
filetype
;
if
(
filetype
==
FILETYPE_GRB
)
{
status
=
cgribexScanTimestep2
(
streamptr
);
...
...
@@ -375,6 +373,7 @@ int grbScanTimestep(stream_t * streamptr)
}
#if defined (HAVE_LIBGRIB)
int
grbInqContents
(
stream_t
*
streamptr
)
{
int
fileID
;
...
...
@@ -392,7 +391,7 @@ int grbInqContents(stream_t * streamptr)
return
(
status
);
}
#endif
int
grbInqTimestep
(
stream_t
*
streamptr
,
int
tsID
)
{
...
...
src/stream_gribapi.c
View file @
5edadf95
...
...
@@ -804,9 +804,9 @@ static checkTimeResult checkTime(stream_t* streamptr, compvar2_t compVar, const
} \
while(0)
#if defined (HAVE_LIBGRIB_API)
int
gribapiScanTimestep1
(
stream_t
*
streamptr
)
{
#if defined (HAVE_LIBGRIB_API)
off_t
recpos
=
0
;
unsigned
char
*
gribbuffer
=
NULL
;
size_t
buffersize
=
0
;
...
...
@@ -998,13 +998,10 @@ int gribapiScanTimestep1(stream_t * streamptr)
}
}
}
#else
(
void
)
streamptr
;
Error
(
"GRIB_API support not compiled in!"
);
#endif
return
(
0
);
}
#endif
#ifdef HAVE_LIBGRIB_API
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment