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
798f3182
Commit
798f3182
authored
Nov 26, 2014
by
Thomas Jahns
🤸
Browse files
Conditionally compile internal functions only conditionally used.
parent
a6a5f1f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cgribex.c
View file @
798f3182
...
...
@@ -547,9 +547,9 @@ int cgribexVarCompare(compvar_t compVar, record_t record, int flag)
#define gribWarning(text, nrecs, timestep, paramstr, level1, level2) \
Warning("Record %2d (id=%s lev1=%d lev2=%d) timestep %d: %s", nrecs, paramstr, level1, level2, timestep, text)
#if defined (HAVE_LIBCGRIBEX)
int
cgribexScanTimestep1
(
stream_t
*
streamptr
)
{
#if defined (HAVE_LIBCGRIBEX)
int
*
isec0
,
*
isec1
,
*
isec2
,
*
isec3
,
*
isec4
;
double
fsec2
[
512
],
fsec3
[
2
],
*
fsec4
=
NULL
;
int
lmv
=
0
,
iret
=
0
;
...
...
@@ -791,18 +791,16 @@ int cgribexScanTimestep1(stream_t * streamptr)
}
}
}
#else
Error
(
"CGRIBEX support not compiled in!"
);
#endif
return
(
0
);
}
#endif
#if defined (HAVE_LIBCGRIBEX)
int
cgribexScanTimestep2
(
stream_t
*
streamptr
)
{
int
rstatus
=
0
;
#if defined (HAVE_LIBCGRIBEX)
int
*
isec0
,
*
isec1
,
*
isec2
,
*
isec3
,
*
isec4
;
double
fsec2
[
512
],
fsec3
[
2
],
*
fsec4
=
NULL
;
int
lmv
=
0
,
iret
=
0
;
...
...
@@ -1055,16 +1053,16 @@ int cgribexScanTimestep2(stream_t * streamptr)
streamptr
->
record
->
buffer
=
gribbuffer
;
streamptr
->
record
->
buffersize
=
buffersize
;
#endif
return
(
rstatus
);
}
#endif
#if defined (HAVE_LIBCGRIBEX)
int
cgribexScanTimestep
(
stream_t
*
streamptr
)
{
int
rstatus
=
0
;
#if defined (HAVE_LIBCGRIBEX)
double
fsec2
[
512
],
fsec3
[
2
],
*
fsec4
=
NULL
;
int
lmv
=
0
,
iret
=
0
;
long
recsize
=
0
;
...
...
@@ -1321,20 +1319,20 @@ int cgribexScanTimestep(stream_t * streamptr)
}
rstatus
=
(
int
)
streamptr
->
ntsteps
;
#endif
return
(
rstatus
);
}
#endif
#ifdef gribWarning
#undef gribWarning
#endif
#if defined (HAVE_LIBCGRIBEX)
int
cgribexDecode
(
unsigned
char
*
gribbuffer
,
int
gribsize
,
double
*
data
,
int
gridsize
,
int
unreduced
,
int
*
nmiss
,
double
missval
)
{
int
status
=
0
;
#if defined (HAVE_LIBCGRIBEX)
int
iret
=
0
,
iword
=
0
;
int
isec0
[
2
],
isec1
[
4096
],
isec2
[
4096
],
isec3
[
2
],
isec4
[
512
];
double
fsec2
[
512
],
fsec3
[
2
];
...
...
@@ -1367,12 +1365,11 @@ int cgribexDecode(unsigned char *gribbuffer, int gribsize, double *data, int gri
(
*
nmiss
)
++
;
}
}
#else
Error
(
"CGRIBEX support not compiled in!"
);
#endif
return
(
status
);
}
#endif
#if defined (HAVE_LIBCGRIBEX)
static
...
...
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