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
8fe9ec4a
Commit
8fe9ec4a
authored
Oct 27, 2011
by
Uwe Schulzweida
Browse files
cdilib.c::defineAttributes: bug fix atttxt
parent
02d1ac54
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
8fe9ec4a
2011-10-27 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* cdilib.c::defineAttributes: bug fix atttxt [report: Florian Prill]
2011-10-25 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added support for netcdf attribute valid_range [request: Etienne Tourigny]
...
...
src/stream_cdf.c
View file @
8fe9ec4a
...
...
@@ -446,7 +446,6 @@ void defineAttributes(int vlistID, int varID, int fileID, int ncvarID)
int
atttype
,
attlen
;
size_t
len
;
char
attname
[
1024
];
char
atttxt
[
8192
];
vlistInqNatts
(
vlistID
,
varID
,
&
natts
);
...
...
@@ -456,9 +455,12 @@ void defineAttributes(int vlistID, int varID, int fileID, int ncvarID)
if
(
atttype
==
DATATYPE_TXT
)
{
vlistInqAttTxt
(
vlistID
,
varID
,
attname
,
sizeof
(
atttxt
),
atttxt
);
char
*
atttxt
;
atttxt
=
(
char
*
)
malloc
(
attlen
*
sizeof
(
char
));
vlistInqAttTxt
(
vlistID
,
varID
,
attname
,
attlen
,
atttxt
);
len
=
attlen
;
cdf_put_att_text
(
fileID
,
ncvarID
,
attname
,
len
,
atttxt
);
free
(
atttxt
);
}
else
if
(
atttype
==
DATATYPE_INT16
||
atttype
==
DATATYPE_INT32
)
{
...
...
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