Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
b371a080
Commit
b371a080
authored
Jun 16, 2014
by
Uwe Schulzweida
Browse files
added cdf__enddef()
parent
35dfdb48
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cdf_int.c
View file @
b371a080
...
...
@@ -148,6 +148,20 @@ void cdf_enddef(int ncid)
}
void
cdf__enddef
(
const
int
ncid
,
const
size_t
hdr_pad
)
{
int
status
;
const
size_t
v_align
=
4UL
;
/* [B] Alignment of beginning of data section for fixed variables */
const
size_t
v_minfree
=
0UL
;
/* [B] Pad at end of data section for fixed size variables */
const
size_t
r_align
=
4UL
;
/* [B] Alignment of beginning of data section for record variables */
/* nc_enddef(ncid) is equivalent to nc__enddef(ncid, 0, 4, 0, 4) */
status
=
nc__enddef
(
ncid
,
hdr_pad
,
v_align
,
v_minfree
,
r_align
);
if
(
status
!=
NC_NOERR
)
Error
(
"%s"
,
nc_strerror
(
status
));
}
void
cdf_sync
(
int
ncid
)
{
int
status
;
...
...
src/cdf_int.h
View file @
b371a080
...
...
@@ -10,9 +10,10 @@ void cdf_create (const char *path, int cmode, int *idp);
int
cdf_open
(
const
char
*
path
,
int
omode
,
int
*
idp
);
void
cdf_close
(
int
ncid
);
void
cdf_redef
(
int
ncid
);
void
cdf_enddef
(
int
ncid
);
void
cdf_sync
(
int
ncid
);
void
cdf_redef
(
int
ncid
);
void
cdf_enddef
(
int
ncid
);
void
cdf__enddef
(
const
int
ncid
,
const
size_t
hdr_pad
);
void
cdf_sync
(
int
ncid
);
void
cdf_inq
(
int
ncid
,
int
*
ndimsp
,
int
*
nvarsp
,
int
*
ngattsp
,
int
*
unlimdimidp
);
...
...
src/stream_cdf.c
View file @
b371a080
...
...
@@ -7819,7 +7819,15 @@ void cdfEndDef(stream_t *streamptr)
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
cdfDefVar
(
streamptr
,
varID
);
if
(
streamptr
->
ncmode
==
2
)
cdf_enddef
(
fileID
);
if
(
streamptr
->
ncmode
==
2
)
{
size_t
hdr_pad
=
0UL
;
if
(
hdr_pad
==
0UL
)
cdf_enddef
(
fileID
);
else
cdf__enddef
(
fileID
,
hdr_pad
);
}
streamptr
->
accessmode
=
1
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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