NetCDF  4.8.1
dopaque.c
Go to the documentation of this file.
1 
7 #include "ncdispatch.h"
8  /* All these functions are part of this named group... */
12 
32 int
33 nc_def_opaque(int ncid, size_t size, const char *name, nc_type *xtypep)
34 {
35  NC* ncp;
36  int stat = NC_check_id(ncid,&ncp);
37  if(stat != NC_NOERR) return stat;
38  return ncp->dispatch->def_opaque(ncid,size,name,xtypep);
39 }
40 
60 int
61 nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep)
62 {
63  int class = 0;
64  int stat = nc_inq_user_type(ncid,xtype,name,sizep,NULL,NULL,&class);
65  if(stat != NC_NOERR) return stat;
66  if(class != NC_OPAQUE) stat = NC_EBADTYPE;
67  return stat;
68 }
69  /* End of named group ...*/
NC_NOERR
#define NC_NOERR
No Error.
Definition: netcdf.h:333
nc_inq_user_type
EXTERNL int nc_inq_user_type(int ncid, nc_type xtype, char *name, size_t *size, nc_type *base_nc_typep, size_t *nfieldsp, int *classp)
Definition: dtype.c:146
nc_def_opaque
int nc_def_opaque(int ncid, size_t size, const char *name, nc_type *xtypep)
Definition: dopaque.c:33
nc_inq_opaque
int nc_inq_opaque(int ncid, nc_type xtype, char *name, size_t *sizep)
Definition: dopaque.c:61
NC_OPAQUE
#define NC_OPAQUE
opaque types
Definition: netcdf.h:54
nc_type
int nc_type
The nc_type type is just an int.
Definition: netcdf.h:25
NC_EBADTYPE
#define NC_EBADTYPE
Not a netcdf data type.
Definition: netcdf.h:375