Skip to content
GitLab
Menu
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
bbc71adc
Commit
bbc71adc
authored
Jan 30, 2017
by
Uwe Schulzweida
Browse files
Removed function cdfGetAttLong().
parent
c21a10fb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/stream_cdf_i.c
View file @
bbc71adc
...
...
@@ -294,32 +294,6 @@ void cdfGetAttInt(int fileID, int ncvarid, const char *attname, int attlen, int
}
}
static
void
cdfGetAttLong
(
int
fileID
,
int
ncvarid
,
const
char
*
attname
,
int
attlen
,
long
*
attint
)
{
nc_type
atttype
;
size_t
nc_attlen
;
*
attint
=
0
;
cdf_inq_atttype
(
fileID
,
ncvarid
,
attname
,
&
atttype
);
cdf_inq_attlen
(
fileID
,
ncvarid
,
attname
,
&
nc_attlen
);
if
(
atttype
!=
NC_CHAR
)
{
long
*
pintatt
=
(
int
)
nc_attlen
>
attlen
?
(
long
*
)(
Malloc
(
nc_attlen
*
sizeof
(
long
)))
:
attint
;
cdf_get_att_long
(
fileID
,
ncvarid
,
attname
,
pintatt
);
if
(
(
int
)
nc_attlen
>
attlen
)
{
memcpy
(
attint
,
pintatt
,
(
size_t
)
attlen
*
sizeof
(
long
));
Free
(
pintatt
);
}
}
}
static
void
cdfGetAttDouble
(
int
fileID
,
int
ncvarid
,
char
*
attname
,
int
attlen
,
double
*
attdouble
)
{
...
...
@@ -455,18 +429,6 @@ bool xtypeIsInt(nc_type xtype)
return
isInt
;
}
static
bool
xtypeIsInt64
(
nc_type
xtype
)
{
#if defined (HAVE_NETCDF4)
bool
isInt
=
xtype
==
NC_INT64
||
xtype
==
NC_UINT64
;
#else
bool
isInt
=
false
;
#endif
return
isInt
;
}
static
int
cdfInqDatatype
(
int
xtype
,
bool
lunsigned
)
{
...
...
@@ -926,24 +888,6 @@ void cdf_set_cdi_attr(int ncid, int ncvarid, int attnum, int cdiID, int varID)
CDI_DATATYPE_INT32
;
cdiDefAttInt
(
cdiID
,
varID
,
attname
,
datatype
,
(
int
)
attlen
,
attint
);
}
/*
#if defined (HAVE_NETCDF4)
else if ( xtypeIsInt64(atttype) )
{
long attlong[attlen];
int attint[attlen];
cdfGetAttLong(ncid, ncvarid, attname, (int)attlen, attlong);
int datatype = (atttype == NC_UINT64) ? CDI_DATATYPE_UINT32 : CDI_DATATYPE_INT32;
if ( datatype == CDI_DATATYPE_UINT32 )
{
size_t i;
for ( i = 0; i < attlen; ++i )
if ( attlong[i] < 0 || attlong[i] > INT_MAX ) break;
if ( i = attlen ) cdiDefAttInt(cdiID, varID, attname, datatype, (int)attlen, attint);
}
}
#endif
*/
else
if
(
xtypeIsFloat
(
atttype
)
)
{
double
attflt
[
attlen
];
...
...
Write
Preview
Supports
Markdown
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