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
48448174
Commit
48448174
authored
May 02, 2008
by
Uwe Schulzweida
Browse files
No commit message
No commit message
parent
86ee95ca
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/cdf.c
View file @
48448174
...
...
@@ -103,6 +103,18 @@ int cdfOpenFile(const char *filename, const char *mode, int version)
fmode
=
'r'
;
status
=
cdf_open
(
filename
,
readmode
,
&
ncid
);
if
(
status
>
0
&&
ncid
<
0
)
ncid
=
CDI_ESYSTEM
;
#if defined (NC_NETCDF4)
else
{
int
format
;
(
void
)
nc_inq_format
(
ncid
,
&
format
);
if
(
format
==
NC_FORMAT_NETCDF4
)
{
cdf_close
(
ncid
);
ncid
=
CDI_EUNC4
;
}
}
#endif
break
;
case
'w'
:
case
'W'
:
...
...
src/cdi.h
View file @
48448174
...
...
@@ -23,6 +23,7 @@ extern "C" {
#define CDI_EUFTYPE -21
/* Unsupported file type */
#define CDI_ELIBNAVAIL -22
/* xxx library not available */
#define CDI_EUFSTRUCT -23
/* Unsupported file structure */
#define CDI_EUNC4 -24
/* Unsupported netCDF4 structure */
/* File types */
...
...
src/cdi_error.c
View file @
48448174
...
...
@@ -10,6 +10,7 @@ static char UnknownError[] = "Unknown Error";
static
char
_EUFTYPE
[]
=
"Unsupported file type"
;
static
char
_ELIBNAVAIL
[]
=
"Unsupported file type (library support not compiled in)"
;
static
char
_EUFSTRUCT
[]
=
"Unsupported file structure"
;
static
char
_EUNC4
[]
=
"Unsupported netCDF4 structure"
;
char
*
cdiStringError
(
int
cdiErrno
)
{
...
...
@@ -23,6 +24,7 @@ char *cdiStringError(int cdiErrno)
case
CDI_EUFTYPE
:
return
_EUFTYPE
;
case
CDI_ELIBNAVAIL
:
return
_ELIBNAVAIL
;
case
CDI_EUFSTRUCT
:
return
_EUFSTRUCT
;
case
CDI_EUNC4
:
return
_EUNC4
;
}
return
UnknownError
;
...
...
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