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
5f81f713
Commit
5f81f713
authored
Feb 27, 2017
by
Thomas Jahns
🤸
Browse files
Adjust scopes to limit shadowing.
parent
02a952a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_o.c
View file @
5f81f713
...
...
@@ -2069,14 +2069,13 @@ void cdfDefHistory(stream_t *streamptr, int size, const char *history)
void
cdfDefVars
(
stream_t
*
streamptr
)
{
int
index
=
0
;
int
vlistID
=
streamptr
->
vlistID
;
if
(
vlistID
==
CDI_UNDEFID
)
Error
(
"Internal problem! vlist undefined for streamptr %p"
,
streamptr
);
int
ngrids
=
vlistNgrids
(
vlistID
);
if
(
2
*
ngrids
>
MAX_GRIDS_PS
)
Error
(
"Internal problem! Too many grids per stream (max=%d)
\n
"
,
MAX_GRIDS_PS
);
for
(
index
=
0
;
index
<
2
*
ngrids
;
++
index
)
for
(
int
index
=
0
;
index
<
2
*
ngrids
;
++
index
)
{
streamptr
->
ncgrid
[
index
].
gridID
=
CDI_UNDEFID
;
streamptr
->
ncgrid
[
index
].
xdimID
=
CDI_UNDEFID
;
...
...
@@ -2086,19 +2085,20 @@ void cdfDefVars(stream_t *streamptr)
streamptr
->
ncgrid
[
index
].
avarID
=
CDI_UNDEFID
;
}
for
(
index
=
0
;
index
<
ngrids
;
++
index
)
for
(
int
index
=
0
;
index
<
ngrids
;
++
index
)
{
int
gridID
=
vlistGrid
(
vlistID
,
index
);
cdfDefGrid
(
streamptr
,
gridID
,
index
);
}
index
=
ngrids
-
1
;
for
(
int
i
=
0
;
i
<
ngrids
;
++
i
)
{
int
gridID
=
vlistGrid
(
vlistID
,
i
);
int
projID
=
gridInqProj
(
gridID
);
if
(
projID
!=
CDI_UNDEFID
)
cdfDefGrid
(
streamptr
,
projID
,
++
index
);
}
{
int
index
=
ngrids
-
1
;
for
(
int
i
=
0
;
i
<
ngrids
;
++
i
)
{
int
gridID
=
vlistGrid
(
vlistID
,
i
);
int
projID
=
gridInqProj
(
gridID
);
if
(
projID
!=
CDI_UNDEFID
)
cdfDefGrid
(
streamptr
,
projID
,
++
index
);
}
}
int
nzaxis
=
vlistNzaxis
(
vlistID
);
for
(
int
index
=
0
;
index
<
nzaxis
;
++
index
)
{
...
...
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