netCDF  4.2.1.1
/usr/src/RPM/BUILD/libnetcdf7-mpi-4.2.1.1/libdispatch/dvlen.c
Go to the documentation of this file.
00001 
00007 #include "ncdispatch.h"
00008  /* All these functions are part of this named group... */
00013 
00034 int
00035 nc_free_vlen(nc_vlen_t *vl)
00036 {
00037    free(vl->p);
00038    return NC_NOERR;
00039 }
00040 
00059 int
00060 nc_free_vlens(size_t len, nc_vlen_t vlens[])
00061 {
00062    int ret;
00063    size_t i;
00064 
00065    for(i = 0; i < len; i++) 
00066       if ((ret = nc_free_vlen(&vlens[i])))
00067          return ret;
00068 
00069    return NC_NOERR;
00070 }
00071 
00097 int
00098 nc_def_vlen(int ncid, const char *name, nc_type base_typeid, nc_type *xtypep)
00099 {
00100     NC* ncp;
00101     int stat = NC_check_id(ncid,&ncp);
00102     if(stat != NC_NOERR) return stat;
00103     return ncp->dispatch->def_vlen(ncid,name,base_typeid,xtypep);
00104 }
00105 
00125 int
00126 nc_inq_vlen(int ncid, nc_type xtype, char *name, size_t *datum_sizep, nc_type *base_nc_typep)
00127 {
00128     int class = 0;
00129     int stat = nc_inq_user_type(ncid,xtype,name,datum_sizep,base_nc_typep,NULL,&class);
00130     if(stat != NC_NOERR) return stat;
00131     if(class != NC_VLEN) stat = NC_EBADTYPE;
00132     return stat;
00133 }  /* End of named group ...*/
00135 
00155 int
00156 nc_put_vlen_element(int ncid, int typeid1, void *vlen_element, size_t len, const void *data)
00157 {
00158     NC* ncp;
00159     int stat = NC_check_id(ncid,&ncp);
00160     if(stat != NC_NOERR) return stat;
00161     return ncp->dispatch->put_vlen_element(ncid,typeid1,vlen_element,len,data);
00162 }
00163 
00183 int
00184 nc_get_vlen_element(int ncid, int typeid1, const void *vlen_element, 
00185                     size_t *len, void *data)
00186 {
00187     NC *ncp;
00188     int stat = NC_check_id(ncid,&ncp);
00189     if(stat != NC_NOERR) return stat;
00190     return ncp->dispatch->get_vlen_element(ncid, typeid1, vlen_element, 
00191                                            len, data);
00192 }
 All Data Structures Files Functions Variables Typedefs Defines

Generated on Fri Sep 14 2012 07:36:39 for netCDF. NetCDF is a Unidata library.