netCDF  4.2.1.1
 All Data Structures Files Functions Variables Typedefs Macros Groups Pages
dvlen.c
Go to the documentation of this file.
1 
7 #include "ncdispatch.h"
8  /* All these functions are part of this named group... */
13 
34 int
36 {
37  free(vl->p);
38  return NC_NOERR;
39 }
40 
59 int
60 nc_free_vlens(size_t len, nc_vlen_t vlens[])
61 {
62  int ret;
63  size_t i;
64 
65  for(i = 0; i < len; i++)
66  if ((ret = nc_free_vlen(&vlens[i])))
67  return ret;
68 
69  return NC_NOERR;
70 }
71 
97 int
98 nc_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *xtypep)
99 {
100  NC* ncp;
101  int stat = NC_check_id(ncid,&ncp);
102  if(stat != NC_NOERR) return stat;
103  return ncp->dispatch->def_vlen(ncid,name,base_typeid,xtypep);
104 }
105 
125 int
126 nc_inq_vlen(int ncid, nc_type xtype, char *name, size_t *datum_sizep, nc_type *base_nc_typep)
127 {
128  int class = 0;
129  int stat = nc_inq_user_type(ncid,xtype,name,datum_sizep,base_nc_typep,NULL,&class);
130  if(stat != NC_NOERR) return stat;
131  if(class != NC_VLEN) stat = NC_EBADTYPE;
132  return stat;
133 } /* End of named group ...*/
135 
155 int
156 nc_put_vlen_element(int ncid, int typeid1, void *vlen_element, size_t len, const void *data)
157 {
158  NC* ncp;
159  int stat = NC_check_id(ncid,&ncp);
160  if(stat != NC_NOERR) return stat;
161  return ncp->dispatch->put_vlen_element(ncid,typeid1,vlen_element,len,data);
162 }
163 
183 int
184 nc_get_vlen_element(int ncid, int typeid1, const void *vlen_element,
185  size_t *len, void *data)
186 {
187  NC *ncp;
188  int stat = NC_check_id(ncid,&ncp);
189  if(stat != NC_NOERR) return stat;
190  return ncp->dispatch->get_vlen_element(ncid, typeid1, vlen_element,
191  len, data);
192 }

Generated on Wed Aug 22 2012 14:39:39 for netCDF. NetCDF is a Unidata library.