mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
renamed NC_HDF5_FILE_INFO to NC_FILE_INFO
This commit is contained in:
parent
ad40215ef1
commit
697f033823
@ -277,7 +277,7 @@ typedef struct NC_GRP_INFO
|
||||
{
|
||||
NC_OBJ hdr;
|
||||
hid_t hdf_grpid;
|
||||
struct NC_HDF5_FILE_INFO *nc4_info;
|
||||
struct NC_FILE_INFO *nc4_info;
|
||||
struct NC_GRP_INFO *parent;
|
||||
int atts_not_read;
|
||||
NCindex* children; /* NCindex<struct NC_GRP_INFO*> */
|
||||
@ -299,7 +299,7 @@ typedef struct NC_GRP_INFO
|
||||
|
||||
/* This is the metadata we need to keep track of for each
|
||||
netcdf-4/HDF5 file. */
|
||||
typedef struct NC_HDF5_FILE_INFO
|
||||
typedef struct NC_FILE_INFO
|
||||
{
|
||||
NC* controller;
|
||||
hid_t hdfid;
|
||||
@ -340,13 +340,13 @@ typedef struct NC_HDF5_FILE_INFO
|
||||
size_t initialsize;
|
||||
int created; /* 1 => create, 0 => open */
|
||||
} mem;
|
||||
} NC_HDF5_FILE_INFO_T;
|
||||
} NC_FILE_INFO_T;
|
||||
|
||||
|
||||
extern char* nc4_atomic_name[NC_MAX_ATOMIC_TYPE+1];
|
||||
|
||||
/* These functions convert between netcdf and HDF5 types. */
|
||||
int nc4_get_typelen_mem(NC_HDF5_FILE_INFO_T *h5, nc_type xtype, size_t *len);
|
||||
int nc4_get_typelen_mem(NC_FILE_INFO_T *h5, nc_type xtype, size_t *len);
|
||||
int nc4_convert_type(const void *src, void *dest, const nc_type src_type,
|
||||
const nc_type dest_type, const size_t len, int *range_error,
|
||||
const void *fill_value, int strict_nc3);
|
||||
@ -366,7 +366,7 @@ int nc4_rec_match_dimscales(NC_GRP_INFO_T *grp);
|
||||
int nc4_rec_detect_need_to_preserve_dimids(NC_GRP_INFO_T *grp, nc_bool_t *bad_coord_orderp);
|
||||
int nc4_rec_write_metadata(NC_GRP_INFO_T *grp, nc_bool_t bad_coord_order);
|
||||
int nc4_rec_write_groups_types(NC_GRP_INFO_T *grp);
|
||||
int nc4_enddef_netcdf4_file(NC_HDF5_FILE_INFO_T *h5);
|
||||
int nc4_enddef_netcdf4_file(NC_FILE_INFO_T *h5);
|
||||
int nc4_reopen_dataset(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var);
|
||||
int nc4_adjust_var_cache(NC_GRP_INFO_T *grp, NC_VAR_INFO_T * var);
|
||||
int nc4_read_grp_atts(NC_GRP_INFO_T *grp);
|
||||
@ -375,18 +375,18 @@ int nc4_read_var_atts(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var);
|
||||
/* The following functions manipulate the in-memory linked list of
|
||||
metadata, without using HDF calls. */
|
||||
int nc4_find_nc_grp_h5(int ncid, NC **nc, NC_GRP_INFO_T **grp,
|
||||
NC_HDF5_FILE_INFO_T **h5);
|
||||
int nc4_find_grp_h5(int ncid, NC_GRP_INFO_T **grp, NC_HDF5_FILE_INFO_T **h5);
|
||||
NC_FILE_INFO_T **h5);
|
||||
int nc4_find_grp_h5(int ncid, NC_GRP_INFO_T **grp, NC_FILE_INFO_T **h5);
|
||||
int nc4_find_nc4_grp(int ncid, NC_GRP_INFO_T **grp);
|
||||
NC_GRP_INFO_T *nc4_find_nc_grp(int ncid);
|
||||
NC_GRP_INFO_T *nc4_rec_find_grp(NC_HDF5_FILE_INFO_T *h5, int target_nc_grpid);
|
||||
NC *nc4_find_nc_file(int ncid, NC_HDF5_FILE_INFO_T**);
|
||||
NC_GRP_INFO_T *nc4_rec_find_grp(NC_FILE_INFO_T *h5, int target_nc_grpid);
|
||||
NC *nc4_find_nc_file(int ncid, NC_FILE_INFO_T**);
|
||||
int nc4_find_dim(NC_GRP_INFO_T *grp, int dimid, NC_DIM_INFO_T **dim, NC_GRP_INFO_T **dim_grp);
|
||||
int nc4_find_var(NC_GRP_INFO_T *grp, const char *name, NC_VAR_INFO_T **var);
|
||||
int nc4_find_dim_len(NC_GRP_INFO_T *grp, int dimid, size_t **len);
|
||||
int nc4_find_type(const NC_HDF5_FILE_INFO_T *h5, int typeid1, NC_TYPE_INFO_T **type);
|
||||
NC_TYPE_INFO_T *nc4_rec_find_nc_type(NC_HDF5_FILE_INFO_T *h5, nc_type target_nc_typeid);
|
||||
NC_TYPE_INFO_T *nc4_rec_find_hdf_type(NC_HDF5_FILE_INFO_T* h5, hid_t target_hdf_typeid);
|
||||
int nc4_find_type(const NC_FILE_INFO_T *h5, int typeid1, NC_TYPE_INFO_T **type);
|
||||
NC_TYPE_INFO_T *nc4_rec_find_nc_type(NC_FILE_INFO_T *h5, nc_type target_nc_typeid);
|
||||
NC_TYPE_INFO_T *nc4_rec_find_hdf_type(NC_FILE_INFO_T* h5, hid_t target_hdf_typeid);
|
||||
NC_TYPE_INFO_T *nc4_rec_find_named_type(NC_GRP_INFO_T *start_grp, char *name);
|
||||
NC_TYPE_INFO_T *nc4_rec_find_equal_type(NC_GRP_INFO_T *start_grp, int ncid1, NC_TYPE_INFO_T *type);
|
||||
int nc4_find_nc_att(int ncid, int varid, const char *name, int attnum,
|
||||
@ -395,9 +395,9 @@ int nc4_find_g_var_nc(NC *nc, int ncid, int varid,
|
||||
NC_GRP_INFO_T **grp, NC_VAR_INFO_T **var);
|
||||
int nc4_find_grp_att(NC_GRP_INFO_T *grp, int varid, const char *name, int attnum,
|
||||
NC_ATT_INFO_T **att);
|
||||
int nc4_get_hdf_typeid(NC_HDF5_FILE_INFO_T *h5, nc_type xtype,
|
||||
int nc4_get_hdf_typeid(NC_FILE_INFO_T *h5, nc_type xtype,
|
||||
hid_t *hdf_typeid, int endianness);
|
||||
int nc4_get_typeclass(const NC_HDF5_FILE_INFO_T *h5, nc_type xtype,
|
||||
int nc4_get_typeclass(const NC_FILE_INFO_T *h5, nc_type xtype,
|
||||
int *type_class);
|
||||
|
||||
/* Free various types */
|
||||
@ -423,7 +423,7 @@ int nc4_att_list_add(NCindex* list, const char* name, NC_ATT_INFO_T **att);
|
||||
int nc4_att_list_del(NCindex* list, NC_ATT_INFO_T *att);
|
||||
int nc4_att_free(NC_ATT_INFO_T *att);
|
||||
int nc4_grp_list_add(NC_GRP_INFO_T *parent, char *name, NC_GRP_INFO_T **grp);
|
||||
int nc4_build_root_grp(NC_HDF5_FILE_INFO_T* h5);
|
||||
int nc4_build_root_grp(NC_FILE_INFO_T* h5);
|
||||
int nc4_rec_grp_del(NC_GRP_INFO_T *grp);
|
||||
int nc4_enum_member_add(NC_TYPE_INFO_T *type, size_t size,
|
||||
const char *name, const void *value);
|
||||
@ -449,7 +449,7 @@ int log_metadata_nc(NC *nc);
|
||||
#endif
|
||||
|
||||
/* Define accessors for the dispatchdata */
|
||||
#define NC4_DATA(nc) ((NC_HDF5_FILE_INFO_T*)(nc)->dispatchdata)
|
||||
#define NC4_DATA(nc) ((NC_FILE_INFO_T*)(nc)->dispatchdata)
|
||||
#define NC4_DATA_SET(nc,data) ((nc)->dispatchdata = (void*)(data))
|
||||
|
||||
/* Reserved Attributes Info */
|
||||
@ -513,12 +513,12 @@ struct NCFILEINFO {
|
||||
extern struct NCPROPINFO globalpropinfo;
|
||||
|
||||
extern int NC4_fileinfo_init(void); /*libsrc4/ncinfo.c*/
|
||||
extern int NC4_get_fileinfo(struct NC_HDF5_FILE_INFO* info, struct NCPROPINFO*); /*libsrc4/ncinfo.c*/
|
||||
extern int NC4_put_propattr(struct NC_HDF5_FILE_INFO* info); /*libsrc4/ncinfo.c*/
|
||||
extern int NC4_get_fileinfo(struct NC_FILE_INFO* info, struct NCPROPINFO*); /*libsrc4/ncinfo.c*/
|
||||
extern int NC4_put_propattr(struct NC_FILE_INFO* info); /*libsrc4/ncinfo.c*/
|
||||
extern int NC4_buildpropinfo(struct NCPROPINFO* info,char** propdatap);
|
||||
|
||||
extern int NC4_hdf5get_libversion(unsigned*,unsigned*,unsigned*);/*libsrc4/nc4hdf.c*/
|
||||
extern int NC4_hdf5get_superblock(struct NC_HDF5_FILE_INFO*, int*);/*libsrc4/nc4hdf.c*/
|
||||
extern int NC4_isnetcdf4(struct NC_HDF5_FILE_INFO*); /*libsrc4/nc4hdf.c*/
|
||||
extern int NC4_hdf5get_superblock(struct NC_FILE_INFO*, int*);/*libsrc4/nc4hdf.c*/
|
||||
extern int NC4_isnetcdf4(struct NC_FILE_INFO*); /*libsrc4/nc4hdf.c*/
|
||||
|
||||
#endif /* _NETCDF4_ */
|
||||
|
@ -90,7 +90,7 @@ hdf4_rec_grp_del(NC_GRP_INFO_T *grp)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
hdf4_type_info(NC_HDF5_FILE_INFO_T *h5, int32 hdf4_typeid, nc_type* xtypep,
|
||||
hdf4_type_info(NC_FILE_INFO_T *h5, int32 hdf4_typeid, nc_type* xtypep,
|
||||
int *endiannessp, size_t *type_sizep, char *type_name)
|
||||
{
|
||||
int t = 0;
|
||||
@ -263,7 +263,7 @@ nc4_set_var_type(nc_type xtype, int endianness, size_t type_size, char *type_nam
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
hdf4_read_att(NC_HDF5_FILE_INFO_T *h5, NC_VAR_INFO_T *var, int a)
|
||||
hdf4_read_att(NC_FILE_INFO_T *h5, NC_VAR_INFO_T *var, int a)
|
||||
{
|
||||
NC_HDF4_FILE_INFO_T *hdf4_file;
|
||||
NC_ATT_INFO_T *att;
|
||||
@ -342,7 +342,7 @@ hdf4_read_att(NC_HDF5_FILE_INFO_T *h5, NC_VAR_INFO_T *var, int a)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
hdf4_read_dim(NC_HDF5_FILE_INFO_T *h5, NC_VAR_INFO_T *var, int rec_dim_len, int d)
|
||||
hdf4_read_dim(NC_FILE_INFO_T *h5, NC_VAR_INFO_T *var, int rec_dim_len, int d)
|
||||
{
|
||||
NC_VAR_HDF4_INFO_T *hdf4_var;
|
||||
NC_DIM_INFO_T *dim = NULL;
|
||||
@ -464,7 +464,7 @@ nc4_var_list_add_full(NC_GRP_INFO_T* grp, const char* name, int ndims, nc_type x
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
hdf4_read_var(NC_HDF5_FILE_INFO_T *h5, int v)
|
||||
hdf4_read_var(NC_FILE_INFO_T *h5, int v)
|
||||
{
|
||||
NC_HDF4_FILE_INFO_T *hdf4_file;
|
||||
NC_VAR_INFO_T *var;
|
||||
@ -599,12 +599,12 @@ NC_HDF4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
|
||||
int use_parallel, void *parameters, NC_Dispatch *dispatch,
|
||||
NC *nc_file)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_HDF4_FILE_INFO_T *hdf4_file;
|
||||
int32 num_datasets, num_gatts;
|
||||
int32 sdid;
|
||||
int v, a;
|
||||
NC_HDF5_FILE_INFO_T* nc4_info = NULL;
|
||||
NC_FILE_INFO_T* nc4_info = NULL;
|
||||
int retval = NC_NOERR;
|
||||
|
||||
/* Check inputs. */
|
||||
@ -679,7 +679,7 @@ NC_HDF4_close(int ncid)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_HDF4_FILE_INFO_T *hdf4_file;
|
||||
int retval;
|
||||
|
||||
|
@ -50,7 +50,7 @@ int
|
||||
NC_HDF4_inq_format_extended(int ncid, int *formatp, int *modep)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T* h5;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x", __func__, ncid));
|
||||
|
||||
|
@ -34,7 +34,7 @@ NC_HDF4_get_vara(int ncid, int varid, const size_t *startp,
|
||||
const size_t *countp, void *ip, int memtype)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T* h5;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_VAR_HDF4_INFO_T *hdf4_var;
|
||||
NC_VAR_INFO_T *var;
|
||||
|
@ -84,7 +84,7 @@ NC4_rename_att(int ncid, int varid, const char *name, const char *newname)
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var = NULL;
|
||||
NC_ATT_INFO_T *att;
|
||||
NCindex *list;
|
||||
@ -194,7 +194,7 @@ NC4_del_att(int ncid, int varid, const char *name)
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_VAR_INFO_T *var;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_ATT_INFO_T *att;
|
||||
NCindex* attlist = NULL;
|
||||
hid_t locid = 0, datasetid = 0;
|
||||
@ -302,7 +302,7 @@ NC4_put_att(int ncid, int varid, const char *name, nc_type file_type,
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var = NULL;
|
||||
NCindex* attlist = NULL;
|
||||
NC_ATT_INFO_T* att;
|
||||
|
@ -42,7 +42,7 @@ NC4_def_dim(int ncid, const char *name, size_t len, int *idp)
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_DIM_INFO_T *dim;
|
||||
char norm_name[NC_MAX_NAME + 1];
|
||||
int retval = NC_NOERR;
|
||||
@ -131,7 +131,7 @@ int
|
||||
NC4_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_GRP_INFO_T *grp, *dim_grp;
|
||||
NC_DIM_INFO_T *dim;
|
||||
int ret = NC_NOERR;
|
||||
@ -205,7 +205,7 @@ NC4_rename_dim(int ncid, int dimid, const char *name)
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_DIM_INFO_T *dim, *tmpdim;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
char norm_name[NC_MAX_NAME + 1];
|
||||
int retval;
|
||||
|
||||
|
@ -25,9 +25,9 @@
|
||||
extern int nc4_vararray_add(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var);
|
||||
|
||||
/* From nc4mem.c */
|
||||
extern int NC4_open_image_file(NC_HDF5_FILE_INFO_T* h5);
|
||||
extern int NC4_create_image_file(NC_HDF5_FILE_INFO_T* h5, size_t);
|
||||
extern int NC4_extract_file_image(NC_HDF5_FILE_INFO_T* h5);
|
||||
extern int NC4_open_image_file(NC_FILE_INFO_T* h5);
|
||||
extern int NC4_create_image_file(NC_FILE_INFO_T* h5, size_t);
|
||||
extern int NC4_extract_file_image(NC_FILE_INFO_T* h5);
|
||||
|
||||
/** @internal When we have open objects at file close, should
|
||||
we log them or print to stdout. Default is to log. */
|
||||
@ -123,7 +123,7 @@ NC_findreserved(const char* name)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
get_netcdf_type(NC_HDF5_FILE_INFO_T *h5, hid_t native_typeid,
|
||||
get_netcdf_type(NC_FILE_INFO_T *h5, hid_t native_typeid,
|
||||
nc_type *xtype)
|
||||
{
|
||||
NC_TYPE_INFO_T *type;
|
||||
@ -528,7 +528,7 @@ typedef struct NC4_rec_read_metadata_ud
|
||||
/* Forward */
|
||||
static int NC4_enddef(int ncid);
|
||||
static int nc4_rec_read_metadata(NC_GRP_INFO_T *grp);
|
||||
static void dumpopenobjects(NC_HDF5_FILE_INFO_T* h5);
|
||||
static void dumpopenobjects(NC_FILE_INFO_T* h5);
|
||||
|
||||
/**
|
||||
* @internal This function will write all changed metadata, and
|
||||
@ -540,7 +540,7 @@ static void dumpopenobjects(NC_HDF5_FILE_INFO_T* h5);
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
sync_netcdf4_file(NC_HDF5_FILE_INFO_T *h5)
|
||||
sync_netcdf4_file(NC_FILE_INFO_T *h5)
|
||||
{
|
||||
int retval;
|
||||
|
||||
@ -599,7 +599,7 @@ sync_netcdf4_file(NC_HDF5_FILE_INFO_T *h5)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
close_netcdf4_file(NC_HDF5_FILE_INFO_T *h5, int abort, int extractmem)
|
||||
close_netcdf4_file(NC_FILE_INFO_T *h5, int abort, int extractmem)
|
||||
{
|
||||
int retval = NC_NOERR;
|
||||
|
||||
@ -663,7 +663,7 @@ exit:
|
||||
}
|
||||
|
||||
static void
|
||||
dumpopenobjects(NC_HDF5_FILE_INFO_T* h5)
|
||||
dumpopenobjects(NC_FILE_INFO_T* h5)
|
||||
{
|
||||
int nobjs;
|
||||
|
||||
@ -872,7 +872,7 @@ nc4_create_file(const char *path, int cmode, size_t initialsz, void* parameters,
|
||||
unsigned flags;
|
||||
FILE *fp;
|
||||
int retval = NC_NOERR;
|
||||
NC_HDF5_FILE_INFO_T* nc4_info = NULL;
|
||||
NC_FILE_INFO_T* nc4_info = NULL;
|
||||
|
||||
#ifdef USE_PARALLEL4
|
||||
NC_MPI_INFO* mpiinfo = NULL;
|
||||
@ -1369,7 +1369,7 @@ dimscale_visitor(hid_t did, unsigned dim, hid_t dsid,
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
get_type_info2(NC_HDF5_FILE_INFO_T *h5, hid_t datasetid,
|
||||
get_type_info2(NC_FILE_INFO_T *h5, hid_t datasetid,
|
||||
NC_TYPE_INFO_T **type_info)
|
||||
{
|
||||
htri_t is_str, equal = 0;
|
||||
@ -2423,7 +2423,7 @@ nc4_rec_read_metadata(NC_GRP_INFO_T *grp)
|
||||
iter_index = H5_INDEX_CRT_ORDER;
|
||||
else
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T *h5 = grp->nc4_info;
|
||||
NC_FILE_INFO_T *h5 = grp->nc4_info;
|
||||
|
||||
/* Without creation ordering, file must be read-only. */
|
||||
if (!h5->no_write)
|
||||
@ -2542,7 +2542,7 @@ nc4_open_file(const char *path, int mode, void* parameters, NC *nc)
|
||||
hid_t fapl_id = H5P_DEFAULT;
|
||||
int retval;
|
||||
unsigned flags;
|
||||
NC_HDF5_FILE_INFO_T *nc4_info = NULL;
|
||||
NC_FILE_INFO_T *nc4_info = NULL;
|
||||
int is_classic;
|
||||
|
||||
#ifdef USE_PARALLEL4
|
||||
@ -2785,7 +2785,7 @@ int
|
||||
NC4_set_fill(int ncid, int fillmode, int *old_modep)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T* nc4_info;
|
||||
NC_FILE_INFO_T* nc4_info;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x fillmode %d", __func__, ncid, fillmode));
|
||||
|
||||
@ -2823,7 +2823,7 @@ NC4_set_fill(int ncid, int fillmode, int *old_modep)
|
||||
int
|
||||
NC4_redef(int ncid)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T* nc4_info;
|
||||
NC_FILE_INFO_T* nc4_info;
|
||||
|
||||
LOG((1, "%s: ncid 0x%x", __func__, ncid));
|
||||
|
||||
@ -2885,7 +2885,7 @@ NC4__enddef(int ncid, size_t h_minfree, size_t v_align,
|
||||
static int NC4_enddef(int ncid)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T* nc4_info;
|
||||
NC_FILE_INFO_T* nc4_info;
|
||||
NC_GRP_INFO_T *grp;
|
||||
int i;
|
||||
|
||||
@ -2923,7 +2923,7 @@ NC4_sync(int ncid)
|
||||
{
|
||||
NC *nc;
|
||||
int retval;
|
||||
NC_HDF5_FILE_INFO_T* nc4_info;
|
||||
NC_FILE_INFO_T* nc4_info;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x", __func__, ncid));
|
||||
|
||||
@ -2963,7 +2963,7 @@ NC4_abort(int ncid)
|
||||
int delete_file = 0;
|
||||
char path[NC_MAX_NAME + 1];
|
||||
int retval = NC_NOERR;
|
||||
NC_HDF5_FILE_INFO_T* nc4_info;
|
||||
NC_FILE_INFO_T* nc4_info;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x", __func__, ncid));
|
||||
|
||||
@ -3007,7 +3007,7 @@ NC4_close(int ncid, void* params)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
int retval;
|
||||
int inmemory;
|
||||
|
||||
@ -3057,7 +3057,7 @@ int
|
||||
NC4_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_GRP_INFO_T *grp;
|
||||
int retval;
|
||||
int i;
|
||||
@ -3120,7 +3120,7 @@ NC4_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
nc4_enddef_netcdf4_file(NC_HDF5_FILE_INFO_T *h5)
|
||||
nc4_enddef_netcdf4_file(NC_FILE_INFO_T *h5)
|
||||
{
|
||||
assert(h5);
|
||||
LOG((3, "%s", __func__));
|
||||
|
@ -32,7 +32,7 @@ int
|
||||
NC4_def_grp(int parent_ncid, const char *name, int *new_ncid)
|
||||
{
|
||||
NC_GRP_INFO_T *grp, *g;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
char norm_name[NC_MAX_NAME + 1];
|
||||
int retval;
|
||||
|
||||
@ -90,7 +90,7 @@ int
|
||||
NC4_rename_grp(int grpid, const char *name)
|
||||
{
|
||||
NC_GRP_INFO_T *grp, *parent;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
char norm_name[NC_MAX_NAME + 1];
|
||||
int retval;
|
||||
|
||||
|
@ -173,7 +173,7 @@ exit:
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
NC_TYPE_INFO_T *
|
||||
nc4_rec_find_hdf_type(NC_HDF5_FILE_INFO_T* h5, hid_t target_hdf_typeid)
|
||||
nc4_rec_find_hdf_type(NC_FILE_INFO_T *h5, hid_t target_hdf_typeid)
|
||||
{
|
||||
NC_TYPE_INFO_T *type;
|
||||
htri_t equal;
|
||||
@ -185,7 +185,8 @@ nc4_rec_find_hdf_type(NC_HDF5_FILE_INFO_T* h5, hid_t target_hdf_typeid)
|
||||
type = (NC_TYPE_INFO_T*)nclistget(h5->alltypes,i);
|
||||
if(type == NULL) continue;
|
||||
/* Is this the type we are searching for? */
|
||||
if ((equal = H5Tequal(type->native_hdf_typeid ? type->native_hdf_typeid : type->hdf_typeid, target_hdf_typeid)) < 0)
|
||||
if ((equal = H5Tequal(type->native_hdf_typeid ? type->native_hdf_typeid :
|
||||
type->hdf_typeid, target_hdf_typeid)) < 0)
|
||||
return NULL;
|
||||
if (equal)
|
||||
return type;
|
||||
|
@ -110,7 +110,7 @@ NC4_inq_typeid(int ncid, const char *name, nc_type *typeidp)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_GRP_INFO_T *grptwo;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_TYPE_INFO_T *type = NULL;
|
||||
char *norm_name;
|
||||
int i, retval;
|
||||
@ -193,7 +193,7 @@ static int
|
||||
add_user_type(int ncid, size_t size, const char *name, nc_type base_typeid,
|
||||
nc_type type_class, nc_type *typeidp)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_TYPE_INFO_T *type;
|
||||
char norm_name[NC_MAX_NAME + 1];
|
||||
|
@ -292,7 +292,7 @@ nc4_get_default_fill_value(const NC_TYPE_INFO_T *type_info, void *fill_value)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
get_fill_value(NC_HDF5_FILE_INFO_T *h5, NC_VAR_INFO_T *var, void **fillp)
|
||||
get_fill_value(NC_FILE_INFO_T *h5, NC_VAR_INFO_T *var, void **fillp)
|
||||
{
|
||||
size_t size;
|
||||
int retval;
|
||||
@ -375,7 +375,7 @@ get_fill_value(NC_HDF5_FILE_INFO_T *h5, NC_VAR_INFO_T *var, void **fillp)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
nc4_get_hdf_typeid(NC_HDF5_FILE_INFO_T *h5, nc_type xtype,
|
||||
nc4_get_hdf_typeid(NC_FILE_INFO_T *h5, nc_type xtype,
|
||||
hid_t *hdf_typeid, int endianness)
|
||||
{
|
||||
NC_TYPE_INFO_T *type;
|
||||
@ -552,7 +552,7 @@ exit:
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
check_for_vara(nc_type *mem_nc_type, NC_VAR_INFO_T *var, NC_HDF5_FILE_INFO_T *h5)
|
||||
check_for_vara(nc_type *mem_nc_type, NC_VAR_INFO_T *var, NC_FILE_INFO_T *h5)
|
||||
{
|
||||
int retval;
|
||||
|
||||
@ -615,7 +615,7 @@ log_dim_info(NC_VAR_INFO_T *var, hsize_t *fdims, hsize_t *fmaxdims,
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
static int
|
||||
set_par_access(NC_HDF5_FILE_INFO_T *h5, NC_VAR_INFO_T *var, hid_t xfer_plistid)
|
||||
set_par_access(NC_FILE_INFO_T *h5, NC_VAR_INFO_T *var, hid_t xfer_plistid)
|
||||
{
|
||||
/* If netcdf is built with parallel I/O, then parallel access can
|
||||
* be used, and, if this file was opened or created for parallel
|
||||
@ -3152,7 +3152,7 @@ nc4_rec_match_dimscales(NC_GRP_INFO_T *grp)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
nc4_get_typelen_mem(NC_HDF5_FILE_INFO_T *h5, nc_type xtype, size_t *len)
|
||||
nc4_get_typelen_mem(NC_FILE_INFO_T *h5, nc_type xtype, size_t *len)
|
||||
{
|
||||
NC_TYPE_INFO_T *type;
|
||||
int retval;
|
||||
@ -3218,7 +3218,7 @@ nc4_get_typelen_mem(NC_HDF5_FILE_INFO_T *h5, nc_type xtype, size_t *len)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
nc4_get_typeclass(const NC_HDF5_FILE_INFO_T *h5, nc_type xtype, int *type_class)
|
||||
nc4_get_typeclass(const NC_FILE_INFO_T *h5, nc_type xtype, int *type_class)
|
||||
{
|
||||
int retval = NC_NOERR;
|
||||
|
||||
@ -3376,13 +3376,13 @@ reportopenobjects(int uselog, hid_t fid)
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal Report open objects given a pointer to NC_HDF5_FILE_INFO_T object
|
||||
* @internal Report open objects given a pointer to NC_FILE_INFO_T object
|
||||
*
|
||||
* @param h5 file object
|
||||
*
|
||||
*/
|
||||
void
|
||||
showopenobjects5(NC_HDF5_FILE_INFO_T* h5)
|
||||
showopenobjects5(NC_FILE_INFO_T* h5)
|
||||
{
|
||||
fprintf(stderr,"===== begin showopenobjects =====\n");
|
||||
reportopenobjects(0,h5->hdfid);
|
||||
@ -3400,7 +3400,7 @@ showopenobjects5(NC_HDF5_FILE_INFO_T* h5)
|
||||
void
|
||||
showopenobjects(int ncid)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T* h5 = NULL;
|
||||
NC_FILE_INFO_T* h5 = NULL;
|
||||
|
||||
/* Find our metadata for this file. */
|
||||
if (nc4_find_nc_grp_h5(ncid, NULL, NULL, &h5) != NC_NOERR)
|
||||
@ -3440,7 +3440,7 @@ NC4_hdf5get_libversion(unsigned* major,unsigned* minor,unsigned* release)
|
||||
* @author Dennis Heimbigner
|
||||
*/
|
||||
int
|
||||
NC4_hdf5get_superblock(struct NC_HDF5_FILE_INFO* h5, int* idp)
|
||||
NC4_hdf5get_superblock(struct NC_FILE_INFO* h5, int* idp)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
unsigned super;
|
||||
@ -3455,7 +3455,7 @@ done:
|
||||
return stat;
|
||||
}
|
||||
|
||||
static int NC4_get_strict_att(NC_HDF5_FILE_INFO_T*);
|
||||
static int NC4_get_strict_att(NC_FILE_INFO_T*);
|
||||
static int NC4_walk(hid_t, int*);
|
||||
|
||||
/**
|
||||
@ -3483,7 +3483,7 @@ static int NC4_walk(hid_t, int*);
|
||||
* @author Dennis Heimbigner.
|
||||
*/
|
||||
int
|
||||
NC4_isnetcdf4(struct NC_HDF5_FILE_INFO* h5)
|
||||
NC4_isnetcdf4(struct NC_FILE_INFO* h5)
|
||||
{
|
||||
int stat;
|
||||
int isnc4 = 0;
|
||||
@ -3515,7 +3515,7 @@ done:
|
||||
* @author Dennis Heimbigner.
|
||||
*/
|
||||
static int
|
||||
NC4_get_strict_att(NC_HDF5_FILE_INFO_T* h5)
|
||||
NC4_get_strict_att(NC_FILE_INFO_T* h5)
|
||||
{
|
||||
hid_t grp = -1;
|
||||
hid_t attid = -1;
|
||||
@ -3626,7 +3626,7 @@ nc4_put_vars(NC *nc, int ncid, int varid, const size_t *startp,
|
||||
nc_type mem_nc_type, void *data)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var;
|
||||
NC_DIM_INFO_T *dim;
|
||||
hid_t file_spaceid = 0, mem_spaceid = 0, xfer_plistid = 0;
|
||||
@ -3956,7 +3956,7 @@ nc4_get_vars(NC *nc, int ncid, int varid, const size_t *startp,
|
||||
nc_type mem_nc_type, void *data)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var;
|
||||
NC_DIM_INFO_T *dim;
|
||||
hid_t file_spaceid = 0, mem_spaceid = 0;
|
||||
|
@ -120,7 +120,7 @@ done:
|
||||
* @author Dennis Heimbigner
|
||||
*/
|
||||
static int
|
||||
NC4_get_propattr(NC_HDF5_FILE_INFO_T* h5)
|
||||
NC4_get_propattr(NC_FILE_INFO_T* h5)
|
||||
{
|
||||
int ncstat = NC_NOERR;
|
||||
size_t size;
|
||||
@ -172,7 +172,7 @@ done:
|
||||
* @author Dennis Heimbigner
|
||||
*/
|
||||
int
|
||||
NC4_put_propattr(NC_HDF5_FILE_INFO_T* h5)
|
||||
NC4_put_propattr(NC_FILE_INFO_T* h5)
|
||||
{
|
||||
int ncstat = NC_NOERR;
|
||||
hid_t grp = -1;
|
||||
@ -219,7 +219,7 @@ NC4_put_propattr(NC_HDF5_FILE_INFO_T* h5)
|
||||
* @author Dennis Heimbigner
|
||||
*/
|
||||
int
|
||||
NC4_get_fileinfo(NC_HDF5_FILE_INFO_T* h5, struct NCPROPINFO* init)
|
||||
NC4_get_fileinfo(NC_FILE_INFO_T* h5, struct NCPROPINFO* init)
|
||||
{
|
||||
int ncstat = NC_NOERR;
|
||||
|
||||
|
@ -39,7 +39,7 @@
|
||||
* @author Dennis Heimbigner
|
||||
*/
|
||||
static int
|
||||
nc4_get_att_special(NC_HDF5_FILE_INFO_T* h5, const char* name,
|
||||
nc4_get_att_special(NC_FILE_INFO_T* h5, const char* name,
|
||||
nc_type* filetypep, nc_type mem_type, size_t* lenp,
|
||||
int* attnump, void* data)
|
||||
{
|
||||
@ -114,7 +114,7 @@ nc4_get_att(int ncid, int varid, const char *name, nc_type *xtype,
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_ATT_INFO_T *att = NULL;
|
||||
NC_VAR_INFO_T *var;
|
||||
int my_attnum = -1;
|
||||
@ -350,7 +350,7 @@ NC4_inq_attname(int ncid, int varid, int attnum, char *name)
|
||||
{
|
||||
NC *nc;
|
||||
NC_ATT_INFO_T *att;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
int retval = NC_NOERR;
|
||||
|
||||
LOG((2, "nc_inq_attname: ncid 0x%x varid %d attnum %d",
|
||||
|
@ -34,7 +34,7 @@ NC4_inq_unlimdim(int ncid, int *unlimdimidp)
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp, *g;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_DIM_INFO_T *dim;
|
||||
int found = 0;
|
||||
int retval;
|
||||
@ -88,7 +88,7 @@ NC4_inq_dimid(int ncid, const char *name, int *idp)
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp, *g;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_DIM_INFO_T *dim;
|
||||
char norm_name[NC_MAX_NAME + 1];
|
||||
int retval;
|
||||
@ -144,7 +144,7 @@ NC4_inq_unlimdims(int ncid, int *nunlimdimsp, int *unlimdimidsp)
|
||||
NC_DIM_INFO_T *dim;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
int num_unlim = 0;
|
||||
int retval;
|
||||
int i;
|
||||
|
@ -32,7 +32,7 @@ int
|
||||
NC4_inq_ncid(int ncid, const char *name, int *grp_ncid)
|
||||
{
|
||||
NC_GRP_INFO_T *grp, *g;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
char norm_name[NC_MAX_NAME + 1];
|
||||
int retval;
|
||||
|
||||
@ -75,7 +75,7 @@ int
|
||||
NC4_inq_grps(int ncid, int *numgrps, int *ncids)
|
||||
{
|
||||
NC_GRP_INFO_T *grp, *g;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
int num = 0;
|
||||
int retval;
|
||||
int i;
|
||||
@ -124,7 +124,7 @@ int
|
||||
NC4_inq_grpname(int ncid, char *name)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
int retval;
|
||||
|
||||
LOG((2, "nc_inq_grpname: ncid 0x%x", ncid));
|
||||
@ -227,7 +227,7 @@ int
|
||||
NC4_inq_grp_parent(int ncid, int *parent_ncid)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
int retval;
|
||||
|
||||
LOG((2, "nc_inq_grp_parent: ncid 0x%x", ncid));
|
||||
@ -267,7 +267,7 @@ int
|
||||
NC4_inq_grp_full_ncid(int ncid, const char *full_name, int *grp_ncid)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
int id1 = ncid, id2;
|
||||
char *cp, *full_name_cpy;
|
||||
int ret;
|
||||
@ -336,7 +336,7 @@ int
|
||||
NC4_inq_varids(int ncid, int *nvars, int *varids)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var;
|
||||
int num_vars = 0;
|
||||
int retval;
|
||||
@ -405,7 +405,7 @@ int
|
||||
NC4_inq_dimids(int ncid, int *ndims, int *dimids, int include_parents)
|
||||
{
|
||||
NC_GRP_INFO_T *grp, *g;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_DIM_INFO_T *dim;
|
||||
int num = 0;
|
||||
int retval;
|
||||
|
@ -103,13 +103,13 @@ nc4_check_name(const char *name, char *norm_name)
|
||||
int
|
||||
nc4_nc4f_list_add(NC *nc, const char *path, int mode)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
|
||||
assert(nc && !NC4_DATA(nc) && path);
|
||||
|
||||
/* We need to malloc and
|
||||
initialize the substructure NC_HDF_FILE_INFO_T. */
|
||||
if (!(h5 = calloc(1, sizeof(NC_HDF5_FILE_INFO_T))))
|
||||
if (!(h5 = calloc(1, sizeof(NC_FILE_INFO_T))))
|
||||
return NC_ENOMEM;
|
||||
NC4_DATA_SET(nc,h5);
|
||||
h5->controller = nc;
|
||||
@ -147,7 +147,7 @@ nc4_nc4f_list_add(NC *nc, const char *path, int mode)
|
||||
int
|
||||
nc4_find_nc4_grp(int ncid, NC_GRP_INFO_T **grp)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T* h5;
|
||||
NC *f = nc4_find_nc_file(ncid,&h5);
|
||||
if(f == NULL) return NC_EBADID;
|
||||
|
||||
@ -179,9 +179,9 @@ nc4_find_nc4_grp(int ncid, NC_GRP_INFO_T **grp)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
nc4_find_grp_h5(int ncid, NC_GRP_INFO_T **grpp, NC_HDF5_FILE_INFO_T **h5p)
|
||||
nc4_find_grp_h5(int ncid, NC_GRP_INFO_T **grpp, NC_FILE_INFO_T **h5p)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC *f = nc4_find_nc_file(ncid,&h5);
|
||||
if(f == NULL) return NC_EBADID;
|
||||
@ -215,10 +215,10 @@ nc4_find_grp_h5(int ncid, NC_GRP_INFO_T **grpp, NC_HDF5_FILE_INFO_T **h5p)
|
||||
*/
|
||||
int
|
||||
nc4_find_nc_grp_h5(int ncid, NC **nc, NC_GRP_INFO_T **grpp,
|
||||
NC_HDF5_FILE_INFO_T **h5p)
|
||||
NC_FILE_INFO_T **h5p)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T* h5;
|
||||
NC *f = nc4_find_nc_file(ncid,&h5);
|
||||
|
||||
if(f == NULL) return NC_EBADID;
|
||||
@ -242,7 +242,7 @@ nc4_find_nc_grp_h5(int ncid, NC **nc, NC_GRP_INFO_T **grpp,
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal Use NC_HDF5_FILE_INFO_T->allgroups to locate a group id.
|
||||
* @internal Use NC_FILE_INFO_T->allgroups to locate a group id.
|
||||
*
|
||||
* @param h5 Pointer to file info
|
||||
* @param target_nc_grpid Group ID to be found.
|
||||
@ -251,7 +251,7 @@ nc4_find_nc_grp_h5(int ncid, NC **nc, NC_GRP_INFO_T **grpp,
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
NC_GRP_INFO_T *
|
||||
nc4_rec_find_grp(NC_HDF5_FILE_INFO_T *h5, int target_nc_grpid)
|
||||
nc4_rec_find_grp(NC_FILE_INFO_T *h5, int target_nc_grpid)
|
||||
{
|
||||
NC_GRP_INFO_T *g;
|
||||
|
||||
@ -278,7 +278,7 @@ int
|
||||
nc4_find_g_var_nc(NC *nc, int ncid, int varid,
|
||||
NC_GRP_INFO_T **grp, NC_VAR_INFO_T **var)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T* h5 = NC4_DATA(nc);
|
||||
NC_FILE_INFO_T* h5 = NC4_DATA(nc);
|
||||
|
||||
/* Find the group info. */
|
||||
assert(grp && var && h5 && h5->root_grp);
|
||||
@ -315,7 +315,7 @@ nc4_find_dim(NC_GRP_INFO_T *grp, int dimid, NC_DIM_INFO_T **dim,
|
||||
{
|
||||
NC_GRP_INFO_T *g;
|
||||
int found = 0;
|
||||
NC_HDF5_FILE_INFO_T* h5 = grp->nc4_info;
|
||||
NC_FILE_INFO_T* h5 = grp->nc4_info;
|
||||
|
||||
assert(h5 && grp && dim);
|
||||
|
||||
@ -403,7 +403,7 @@ nc4_rec_find_named_type(NC_GRP_INFO_T *start_grp, char *name)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
NC_TYPE_INFO_T *
|
||||
nc4_rec_find_nc_type(NC_HDF5_FILE_INFO_T *h5, nc_type target_nc_typeid)
|
||||
nc4_rec_find_nc_type(NC_FILE_INFO_T *h5, nc_type target_nc_typeid)
|
||||
{
|
||||
assert(h5);
|
||||
return nclistget(h5->alltypes, target_nc_typeid);
|
||||
@ -421,7 +421,7 @@ nc4_rec_find_nc_type(NC_HDF5_FILE_INFO_T *h5, nc_type target_nc_typeid)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
nc4_find_type(const NC_HDF5_FILE_INFO_T *h5, nc_type typeid, NC_TYPE_INFO_T **type)
|
||||
nc4_find_type(const NC_FILE_INFO_T *h5, nc_type typeid, NC_TYPE_INFO_T **type)
|
||||
{
|
||||
if (typeid < 0 || !type)
|
||||
return NC_EINVAL;
|
||||
@ -529,7 +529,7 @@ nc4_find_nc_att(int ncid, int varid, const char *name, int attnum,
|
||||
NC_ATT_INFO_T **att)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
int retval;
|
||||
|
||||
LOG((4, "nc4_find_nc_att: ncid 0x%x varid %d name %s attnum %d",
|
||||
@ -554,7 +554,7 @@ nc4_find_nc_att(int ncid, int varid, const char *name, int attnum,
|
||||
* @author Ed Hartnett, Dennis Heimbigner
|
||||
*/
|
||||
NC*
|
||||
nc4_find_nc_file(int ext_ncid, NC_HDF5_FILE_INFO_T** h5p)
|
||||
nc4_find_nc_file(int ext_ncid, NC_FILE_INFO_T** h5p)
|
||||
{
|
||||
NC* nc;
|
||||
int stat;
|
||||
@ -564,7 +564,7 @@ nc4_find_nc_file(int ext_ncid, NC_HDF5_FILE_INFO_T** h5p)
|
||||
nc = NULL;
|
||||
|
||||
if(nc)
|
||||
if(h5p) *h5p = (NC_HDF5_FILE_INFO_T*)nc->dispatchdata;
|
||||
if(h5p) *h5p = (NC_FILE_INFO_T*)nc->dispatchdata;
|
||||
|
||||
return nc;
|
||||
}
|
||||
@ -594,7 +594,7 @@ obj_list_add(NCindex* index, NC_OBJ* obj)
|
||||
* @author Dennis Heimbigner
|
||||
*/
|
||||
static void
|
||||
obj_track(NC_HDF5_FILE_INFO_T* file, NC_OBJ* obj)
|
||||
obj_track(NC_FILE_INFO_T* file, NC_OBJ* obj)
|
||||
{
|
||||
NClist* list = NULL;
|
||||
/* record the object in the file */
|
||||
@ -709,7 +709,7 @@ int
|
||||
nc4_dim_list_add(NC_GRP_INFO_T* grp, const char* name, size_t len, int assignedid, NC_DIM_INFO_T **dim)
|
||||
{
|
||||
NC_DIM_INFO_T *new_dim = NULL;
|
||||
NC_HDF5_FILE_INFO_T *h5 = grp->nc4_info;
|
||||
NC_FILE_INFO_T *h5 = grp->nc4_info;
|
||||
int retval = NC_NOERR;
|
||||
|
||||
if (!(new_dim = calloc(1, sizeof(NC_DIM_INFO_T))))
|
||||
@ -804,7 +804,7 @@ int
|
||||
nc4_grp_list_add(NC_GRP_INFO_T * parent, char *name, NC_GRP_INFO_T **grp)
|
||||
{
|
||||
NC_GRP_INFO_T *new_grp;
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T* h5;
|
||||
NC* nc;
|
||||
|
||||
h5 = parent->nc4_info;
|
||||
@ -855,7 +855,7 @@ nc4_grp_list_add(NC_GRP_INFO_T * parent, char *name, NC_GRP_INFO_T **grp)
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
nc4_build_root_grp(NC_HDF5_FILE_INFO_T* h5)
|
||||
nc4_build_root_grp(NC_FILE_INFO_T* h5)
|
||||
{
|
||||
NC_GRP_INFO_T *new_grp;
|
||||
NC* nc;
|
||||
@ -1777,7 +1777,7 @@ rec_print_metadata(NC_GRP_INFO_T *grp, int tab_count)
|
||||
int
|
||||
log_metadata_nc(NC *nc)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T *h5 = NC4_DATA(nc);
|
||||
NC_FILE_INFO_T *h5 = NC4_DATA(nc);
|
||||
|
||||
LOG((2, "*** NetCDF-4 Internal Metadata: int_ncid 0x%x ext_ncid 0x%x",
|
||||
nc->int_ncid, nc->ext_ncid));
|
||||
|
@ -34,10 +34,10 @@
|
||||
#define HDrealloc(M,Z) realloc(M,Z)
|
||||
#endif /* HDrealloc */
|
||||
|
||||
extern hid_t NC4_image_init(NC_HDF5_FILE_INFO_T* h5);
|
||||
extern hid_t NC4_image_init(NC_FILE_INFO_T* h5);
|
||||
|
||||
int
|
||||
NC4_open_image_file(NC_HDF5_FILE_INFO_T* h5)
|
||||
NC4_open_image_file(NC_FILE_INFO_T* h5)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
hid_t hdfid;
|
||||
@ -66,7 +66,7 @@ done:
|
||||
}
|
||||
|
||||
int
|
||||
NC4_create_image_file(NC_HDF5_FILE_INFO_T* h5, size_t initialsz)
|
||||
NC4_create_image_file(NC_FILE_INFO_T* h5, size_t initialsz)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
int hdfid;
|
||||
@ -84,7 +84,7 @@ done:
|
||||
}
|
||||
|
||||
int
|
||||
NC4_extract_file_image(NC_HDF5_FILE_INFO_T* h5)
|
||||
NC4_extract_file_image(NC_FILE_INFO_T* h5)
|
||||
{
|
||||
int stat = NC_NOERR;
|
||||
hid_t fapl;
|
||||
|
@ -199,7 +199,7 @@ typedef struct {
|
||||
unsigned flags; /* Flags indicate how the file image will */
|
||||
/* be open */
|
||||
int ref_count; /* Reference counter on udata struct */
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T* h5;
|
||||
} H5LT_file_image_ud_t;
|
||||
|
||||
/* callbacks prototypes for file image ops */
|
||||
@ -656,28 +656,8 @@ out:
|
||||
|
||||
/* End of callbacks definitions for file image operations */
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
*
|
||||
* Public functions
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
/*-------------------------------------------------------------------------
|
||||
* Function: H5LTopen_file_image
|
||||
*
|
||||
* Purpose: Open a user supplied file image using the core file driver.
|
||||
*
|
||||
* Return: File identifier, Failure: -1
|
||||
*
|
||||
* Programmer: Christian Chilan
|
||||
*
|
||||
* Date: October 3, 2011
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
hid_t
|
||||
NC4_image_init(NC_HDF5_FILE_INFO_T* h5)
|
||||
NC4_image_init(NC_FILE_INFO_T* h5)
|
||||
{
|
||||
hid_t fapl = -1, file_id = -1; /* HDF5 identifiers */
|
||||
unsigned file_open_flags;/* Flags for image open */
|
||||
|
@ -49,7 +49,7 @@ int
|
||||
NC4_inq_typeids(int ncid, int *ntypes, int *typeids)
|
||||
{
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_TYPE_INFO_T *type;
|
||||
int num = 0;
|
||||
int retval;
|
||||
@ -291,7 +291,7 @@ NC4_inq_compound_field(int ncid, nc_type typeid1, int fieldid, char *name,
|
||||
static int
|
||||
find_nc4_file(int ncid, NC **nc)
|
||||
{
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
|
||||
/* Find file metadata. */
|
||||
if (!((*nc) = nc4_find_nc_file(ncid, &h5)))
|
||||
|
@ -87,7 +87,7 @@ NC4_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems,
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var;
|
||||
int retval;
|
||||
|
||||
@ -173,7 +173,7 @@ NC4_get_var_chunk_cache(int ncid, int varid, size_t *sizep,
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var;
|
||||
int retval;
|
||||
|
||||
@ -434,7 +434,7 @@ NC4_def_var(int ncid, const char *name, nc_type xtype,
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_VAR_INFO_T *var;
|
||||
NC_DIM_INFO_T *dim;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_TYPE_INFO_T *type_info = NULL;
|
||||
char norm_name[NC_MAX_NAME + 1];
|
||||
int d;
|
||||
@ -731,7 +731,7 @@ NC4_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var;
|
||||
int d;
|
||||
int retval;
|
||||
@ -908,7 +908,7 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate,
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var;
|
||||
int d;
|
||||
int retval;
|
||||
@ -1184,7 +1184,7 @@ nc_inq_var_chunking_ints(int ncid, int varid, int *contiguousp, int *chunksizesp
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_VAR_INFO_T *var;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
|
||||
size_t *cs = NULL;
|
||||
int i, retval;
|
||||
@ -1247,7 +1247,7 @@ nc_def_var_chunking_ints(int ncid, int varid, int contiguous, int *chunksizesp)
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_VAR_INFO_T *var;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
size_t *cs = NULL;
|
||||
int i, retval;
|
||||
|
||||
@ -1362,7 +1362,7 @@ NC4_def_var_filter(int ncid, int varid, unsigned int id, size_t nparams,
|
||||
int retval = NC_NOERR;
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x varid %d", __func__, ncid, varid));
|
||||
@ -1490,7 +1490,7 @@ NC4_rename_var(int ncid, int varid, const char *name)
|
||||
{
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var, *tmpvar;
|
||||
int retval = NC_NOERR;
|
||||
|
||||
@ -1626,7 +1626,7 @@ NC4_var_par_access(int ncid, int varid, int par_access)
|
||||
#else
|
||||
NC *nc;
|
||||
NC_GRP_INFO_T *grp;
|
||||
NC_HDF5_FILE_INFO_T *h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
NC_VAR_INFO_T *var;
|
||||
int retval;
|
||||
|
||||
@ -1705,7 +1705,7 @@ NC4_get_vara(int ncid, int varid, const size_t *startp,
|
||||
const size_t *countp, void *ip, int memtype)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T* h5;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x varid %d memtype %d", __func__, ncid, varid,
|
||||
memtype));
|
||||
@ -1770,7 +1770,7 @@ NC4_get_vars(int ncid, int varid, const size_t *startp,
|
||||
void *ip, int memtype)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x varid %d memtype %d", __func__, ncid, varid,
|
||||
memtype));
|
||||
|
@ -63,7 +63,7 @@ int
|
||||
NC4_inq_format(int ncid, int *formatp)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T* nc4_info;
|
||||
NC_FILE_INFO_T *nc4_info;
|
||||
|
||||
LOG((2, "nc_inq_format: ncid 0x%x", ncid));
|
||||
|
||||
@ -104,7 +104,7 @@ int
|
||||
NC4_inq_format_extended(int ncid, int *formatp, int *modep)
|
||||
{
|
||||
NC *nc;
|
||||
NC_HDF5_FILE_INFO_T* h5;
|
||||
NC_FILE_INFO_T *h5;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x", __func__, ncid));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user