mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-04-24 18:30:51 +08:00
Fix NCF-339, ncdump -x omits exponent char in XML double attribute value
This commit is contained in:
parent
58573722b6
commit
3d5be0b3f0
@ -1081,7 +1081,7 @@ pr_attx(
|
||||
default:
|
||||
att.vals = (double *) emalloc((att.len + 1) * sizeof(double));
|
||||
NC_CHECK( nc_get_att_double(ncid, varid, att.name, att.vals ) );
|
||||
attvalslen = 20*att.len; /* max 20 chars for each value and blank separator */
|
||||
attvalslen = PRIM_LEN * att.len; /* max chars for each value and blank separator */
|
||||
attvals = (char *) emalloc(attvalslen + 1);
|
||||
pr_att_valsx(att.type, att.len, att.vals, attvals, attvalslen);
|
||||
free(att.vals);
|
||||
|
@ -4,8 +4,10 @@
|
||||
<dimension name="t" length="0" isUnlimited="true" />
|
||||
<attribute name="gtatt" value="<, >, ', ", and &" />
|
||||
<attribute name="gnatt" type="int" value="3 4" />
|
||||
<attribute name="gdatt" type="double" value="-7.02788826649782e-09 7.02788826649782e-09" />
|
||||
<variable name="var" shape="t m" type="float">
|
||||
<attribute name="tatt" value="text attribute value" />
|
||||
<attribute name="natt" type="int" value="1 2" />
|
||||
<attribute name="datt" type="double" value="7.02788826649782e-09 -7.02788826649782e-09" />
|
||||
</variable>
|
||||
</netcdf>
|
||||
|
@ -6,6 +6,8 @@ variables:
|
||||
float var (t, m);
|
||||
var:tatt = "text attribute value" ;
|
||||
var:natt = 1, 2;
|
||||
var:datt = 7.02788826649782e-09, -7.02788826649782e-09 ;
|
||||
:gtatt = "<, >, \', \", and &" ;
|
||||
:gnatt = 3, 4;
|
||||
:gdatt = -7.02788826649782e-09, 7.02788826649782e-09 ;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user