summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST6
-rw-r--r--src/.distdep122
-rw-r--r--src/H5G.c6
-rw-r--r--src/H5RA.c (renamed from src/H5R.c)184
-rw-r--r--src/H5RAprivate.h28
-rw-r--r--src/H5RApublic.h (renamed from src/H5Rpublic.h)14
-rw-r--r--src/H5Rprivate.h28
-rw-r--r--src/Makefile.in6
-rw-r--r--src/hdf5.h2
-rw-r--r--test/.distdep30
-rw-r--r--test/ragged.c10
11 files changed, 218 insertions, 218 deletions
diff --git a/MANIFEST b/MANIFEST
index 0f09500..aab342f 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -248,9 +248,9 @@
./src/H5P.c
./src/H5Pprivate.h
./src/H5Ppublic.h
-./src/H5R.c
-./src/H5Rprivate.h
-./src/H5Rpublic.h
+./src/H5RA.c
+./src/H5RAprivate.h
+./src/H5RApublic.h
./src/H5S.c
./src/H5Sall.c
./src/H5Shyper.c
diff --git a/src/.distdep b/src/.distdep
index f54f911..292675b 100644
--- a/src/.distdep
+++ b/src/.distdep
@@ -324,39 +324,6 @@ H5Fstdio.o: \
H5Dpublic.h \
H5MMprivate.h \
H5MMpublic.h
-H5G.o: \
- H5G.c \
- H5private.h \
- H5public.h \
- H5config.h \
- H5Aprivate.h \
- H5Apublic.h \
- H5Ipublic.h \
- H5Gprivate.h \
- H5Gpublic.h \
- H5Bprivate.h \
- H5Bpublic.h \
- H5Fprivate.h \
- H5Fpublic.h \
- H5Dpublic.h \
- H5Dprivate.h \
- H5Oprivate.h \
- H5Opublic.h \
- H5HGprivate.h \
- H5HGpublic.h \
- H5Tprivate.h \
- H5Tpublic.h \
- H5Sprivate.h \
- H5Spublic.h \
- H5Zprivate.h \
- H5Zpublic.h \
- H5Eprivate.h \
- H5Epublic.h \
- H5Gpkg.h \
- H5ACprivate.h \
- H5ACpublic.h \
- H5HLprivate.h \
- H5HLpublic.h
H5Gent.o: \
H5Gent.c \
H5private.h \
@@ -857,34 +824,6 @@ H5P.o: \
H5Eprivate.h \
H5Epublic.h \
H5MMprivate.h
-H5R.o: \
- H5R.c \
- H5Rprivate.h \
- H5Rpublic.h \
- H5Ipublic.h \
- H5public.h \
- H5config.h \
- H5Dprivate.h \
- H5Dpublic.h \
- H5private.h \
- H5Fprivate.h \
- H5Fpublic.h \
- H5Gprivate.h \
- H5Gpublic.h \
- H5Bprivate.h \
- H5Bpublic.h \
- H5Oprivate.h \
- H5Opublic.h \
- H5HGprivate.h \
- H5HGpublic.h \
- H5Tprivate.h \
- H5Tpublic.h \
- H5Sprivate.h \
- H5Spublic.h \
- H5Zprivate.h \
- H5Zpublic.h \
- H5Eprivate.h \
- H5Epublic.h
H5S.o: \
H5S.c \
H5private.h \
@@ -1183,3 +1122,64 @@ H5Z.o: \
H5Spublic.h \
H5Zprivate.h \
H5Zpublic.h
+H5G.o: \
+ H5G.c \
+ H5private.h \
+ H5public.h \
+ H5config.h \
+ H5Aprivate.h \
+ H5Apublic.h \
+ H5Ipublic.h \
+ H5Gprivate.h \
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Dpublic.h \
+ H5Dprivate.h \
+ H5Oprivate.h \
+ H5Opublic.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Sprivate.h \
+ H5Spublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Eprivate.h \
+ H5Epublic.h \
+ H5Gpkg.h \
+ H5ACprivate.h \
+ H5ACpublic.h \
+ H5HLprivate.h \
+ H5HLpublic.h
+H5RA.o: \
+ H5RA.c \
+ H5RAprivate.h \
+ H5RApublic.h \
+ H5Ipublic.h \
+ H5public.h \
+ H5config.h \
+ H5Dprivate.h \
+ H5Dpublic.h \
+ H5private.h \
+ H5Fprivate.h \
+ H5Fpublic.h \
+ H5Gprivate.h \
+ H5Gpublic.h \
+ H5Bprivate.h \
+ H5Bpublic.h \
+ H5Oprivate.h \
+ H5Opublic.h \
+ H5HGprivate.h \
+ H5HGpublic.h \
+ H5Tprivate.h \
+ H5Tpublic.h \
+ H5Sprivate.h \
+ H5Spublic.h \
+ H5Zprivate.h \
+ H5Zpublic.h \
+ H5Eprivate.h \
+ H5Epublic.h
diff --git a/src/H5G.c b/src/H5G.c
index f64b16a..3864dcf 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -84,7 +84,7 @@
#include <H5Iprivate.h>
#include <H5MMprivate.h>
#include <H5Oprivate.h>
-#include <H5Rprivate.h>
+#include <H5RAprivate.h>
#define H5G_INIT_HEAP 8192
#define H5G_RESERVED_ATOMS 0
@@ -1863,7 +1863,7 @@ H5G_loc (hid_t loc_id)
H5T_t *dt=NULL;
H5D_t *dset=NULL;
H5A_t *attr=NULL;
- H5R_t *ra=NULL;
+ H5RA_t *ra=NULL;
FUNC_ENTER (H5G_loc, NULL);
@@ -1951,7 +1951,7 @@ H5G_loc (hid_t loc_id)
HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
"invalid ragged array ID");
}
- if (NULL==(ret_value=H5R_entof(ra))) {
+ if (NULL==(ret_value=H5RA_entof(ra))) {
HRETURN_ERROR(H5E_ARGS, H5E_BADVALUE, NULL,
"unable to get symbol table entry of ragged array");
}
diff --git a/src/H5R.c b/src/H5RA.c
index dec1e34..47e25a4 100644
--- a/src/H5R.c
+++ b/src/H5RA.c
@@ -25,7 +25,7 @@
* dataset. All three datasets are contained in a single group
* whose name is the name of the ragged array.
*/
-#include <H5Rprivate.h>
+#include <H5RAprivate.h>
#include <H5private.h>
#include <H5Eprivate.h>
@@ -33,32 +33,32 @@
#include <H5MMprivate.h>
#include <H5Pprivate.h>
-typedef struct H5R_meta_t {
+typedef struct H5RA_meta_t {
hsize_t nelmts; /*num elements in row */
hssize_t offset; /*offset into overflow array */
hsize_t nover; /*allocated size in overflow array */
-} H5R_meta_t;
+} H5RA_meta_t;
-struct H5R_t {
+struct H5RA_t {
H5G_t *group; /*the group containing everything */
H5D_t *meta; /*ragged meta data array */
H5D_t *raw; /*fixed-width raw data */
H5D_t *over; /*overflow data */
};
-#define PABLO_MASK H5R_mask
+#define PABLO_MASK H5RA_mask
static hbool_t interface_initialize_g = FALSE;
-#define INTERFACE_INIT H5R_init_interface
-static herr_t H5R_init_interface(void);
-static void H5R_term_interface(void);
-static H5T_t *H5R_meta_type_g = NULL;
+#define INTERFACE_INIT H5RA_init_interface
+static herr_t H5RA_init_interface(void);
+static void H5RA_term_interface(void);
+static H5T_t *H5RA_meta_type_g = NULL;
-static herr_t H5R_fix_overflow(H5R_t *ra, H5T_t *type, H5R_meta_t *meta,
+static herr_t H5RA_fix_overflow(H5RA_t *ra, H5T_t *type, H5RA_meta_t *meta,
hsize_t nelmts, void *buf);
/*-------------------------------------------------------------------------
- * Function: H5R_init_interface
+ * Function: H5RA_init_interface
*
* Purpose: Initialize the interface.
*
@@ -74,38 +74,38 @@ static herr_t H5R_fix_overflow(H5R_t *ra, H5T_t *type, H5R_meta_t *meta,
*-------------------------------------------------------------------------
*/
static herr_t
-H5R_init_interface(void)
+H5RA_init_interface(void)
{
herr_t ret_value = SUCCEED;
H5T_t *type = NULL;
- FUNC_ENTER(H5R_init_interface, FAIL);
+ FUNC_ENTER(H5RA_init_interface, FAIL);
/* The atom group */
if ((ret_value=H5I_init_group(H5I_RAGGED, H5I_RAGGED_HASHSIZE, 0,
- (herr_t(*)(void*))H5R_close))>=0) {
- ret_value = H5_add_exit(H5R_term_interface);
+ (herr_t(*)(void*))H5RA_close))>=0) {
+ ret_value = H5_add_exit(H5RA_term_interface);
}
/* The meta dataset type */
- if (NULL==(type=H5T_create(H5T_COMPOUND, sizeof(H5R_meta_t))) ||
- H5T_insert(type, "nelmts", HOFFSET(H5R_meta_t, nelmts),
+ if (NULL==(type=H5T_create(H5T_COMPOUND, sizeof(H5RA_meta_t))) ||
+ H5T_insert(type, "nelmts", HOFFSET(H5RA_meta_t, nelmts),
0, NULL, NULL, H5I_object(H5T_NATIVE_HSIZE_g))<0 ||
- H5T_insert(type, "offset", HOFFSET(H5R_meta_t, offset),
+ H5T_insert(type, "offset", HOFFSET(H5RA_meta_t, offset),
0, NULL, NULL, H5I_object(H5T_NATIVE_HSSIZE_g))<0 ||
- H5T_insert(type, "nover", HOFFSET(H5R_meta_t, nover),
+ H5T_insert(type, "nover", HOFFSET(H5RA_meta_t, nover),
0, NULL, NULL, H5I_object(H5T_NATIVE_HSIZE_g))) {
HRETURN_ERROR(H5E_RAGGED, H5E_CANTINIT, FAIL,
"unable to define ragged array meta type");
}
- H5R_meta_type_g = type;
+ H5RA_meta_type_g = type;
FUNC_LEAVE(ret_value);
}
/*-------------------------------------------------------------------------
- * Function: H5R_term_interface
+ * Function: H5RA_term_interface
*
* Purpose: Terminate the ragged array interface.
*
@@ -119,16 +119,16 @@ H5R_init_interface(void)
*-------------------------------------------------------------------------
*/
static void
-H5R_term_interface(void)
+H5RA_term_interface(void)
{
H5I_destroy_group(H5I_RAGGED);
- H5T_close(H5R_meta_type_g);
- H5R_meta_type_g = NULL;
+ H5T_close(H5RA_meta_type_g);
+ H5RA_meta_type_g = NULL;
}
/*-------------------------------------------------------------------------
- * Function: H5Rcreate
+ * Function: H5RAcreate
*
* Purpose: Create a new ragged array with the specified name. A ragged
* array is implemented as a group containing three datasets.
@@ -158,15 +158,15 @@ H5R_term_interface(void)
*-------------------------------------------------------------------------
*/
hid_t
-H5Rcreate(hid_t loc_id, const char *name, hid_t type_id, hid_t plist_id)
+H5RAcreate(hid_t loc_id, const char *name, hid_t type_id, hid_t plist_id)
{
- H5R_t *ra=NULL;
+ H5RA_t *ra=NULL;
H5G_entry_t *loc=NULL;
H5T_t *type=NULL;
const H5D_create_t *plist=NULL;
hid_t ret_value=FAIL;
- FUNC_ENTER(H5Rcreate, FAIL);
+ FUNC_ENTER(H5RAcreate, FAIL);
H5TRACE4("i","isii",loc_id,name,type_id,plist_id);
/* Check args */
@@ -197,14 +197,14 @@ H5Rcreate(hid_t loc_id, const char *name, hid_t type_id, hid_t plist_id)
}
/* Do the real work */
- if (NULL==(ra=H5R_create(loc, name, type, plist))) {
+ if (NULL==(ra=H5RA_create(loc, name, type, plist))) {
HRETURN_ERROR(H5E_RAGGED, H5E_CANTINIT, FAIL,
"unable to create ragged array");
}
/* Register the new dataset to get an ID for it */
if ((ret_value=H5I_register(H5I_RAGGED, ra))<0) {
- H5R_close(ra);
+ H5RA_close(ra);
HRETURN_ERROR(H5E_RAGGED, H5E_CANTREGISTER, FAIL,
"unable to register ragged array");
}
@@ -214,7 +214,7 @@ H5Rcreate(hid_t loc_id, const char *name, hid_t type_id, hid_t plist_id)
/*-------------------------------------------------------------------------
- * Function: H5R_create
+ * Function: H5RA_create
*
* Purpose: Create a new ragged array implemented as a group.
*
@@ -229,18 +229,18 @@ H5Rcreate(hid_t loc_id, const char *name, hid_t type_id, hid_t plist_id)
*
*-------------------------------------------------------------------------
*/
-H5R_t *
-H5R_create(H5G_entry_t *loc, const char *name, H5T_t *type,
+H5RA_t *
+H5RA_create(H5G_entry_t *loc, const char *name, H5T_t *type,
const H5D_create_t *dcpl)
{
- H5R_t *ra = NULL;
+ H5RA_t *ra = NULL;
H5S_t *space = NULL;
hsize_t cur_dims[2];
hsize_t max_dims[2];
- H5R_t *ret_value=NULL;
+ H5RA_t *ret_value=NULL;
H5D_create_t d1_dcpl;
- FUNC_ENTER(H5R_create, NULL);
+ FUNC_ENTER(H5RA_create, NULL);
/* Check args */
assert(loc);
@@ -250,7 +250,7 @@ H5R_create(H5G_entry_t *loc, const char *name, H5T_t *type,
assert(H5D_CHUNKED==dcpl->layout);
/* Create the data struct */
- if (NULL==(ra=H5MM_calloc(sizeof(H5R_t)))) {
+ if (NULL==(ra=H5MM_calloc(sizeof(H5RA_t)))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed for ragged array struct");
}
@@ -316,9 +316,9 @@ H5R_create(H5G_entry_t *loc, const char *name, H5T_t *type,
d1_dcpl.chunk_size[0] = MAX(1,
(dcpl->chunk_size[0]*dcpl->chunk_size[1]*
H5T_get_size(type))/
- H5T_get_size(H5R_meta_type_g));
+ H5T_get_size(H5RA_meta_type_g));
if (NULL==(ra->meta=H5D_create(H5G_entof(ra->group), "meta",
- H5R_meta_type_g, space, &d1_dcpl))) {
+ H5RA_meta_type_g, space, &d1_dcpl))) {
HGOTO_ERROR(H5E_RAGGED, H5E_CANTINIT, NULL,
"unable to create meta dataset");
}
@@ -347,7 +347,7 @@ H5R_create(H5G_entry_t *loc, const char *name, H5T_t *type,
/*-------------------------------------------------------------------------
- * Function: H5Ropen
+ * Function: H5RAopen
*
* Purpose: Opens an existing ragged array. The name of the array should
* be the same that was used when the array was created; that is,
@@ -365,13 +365,13 @@ H5R_create(H5G_entry_t *loc, const char *name, H5T_t *type,
*-------------------------------------------------------------------------
*/
hid_t
-H5Ropen(hid_t loc_id, const char *name)
+H5RAopen(hid_t loc_id, const char *name)
{
H5G_entry_t *loc=NULL;
- H5R_t *ra=NULL;
+ H5RA_t *ra=NULL;
hid_t ret_value=FAIL;
- FUNC_ENTER(H5Ropen, FAIL);
+ FUNC_ENTER(H5RAopen, FAIL);
H5TRACE2("i","is",loc_id,name);
/* Check args */
@@ -383,14 +383,14 @@ H5Ropen(hid_t loc_id, const char *name)
}
/* The real work */
- if (NULL==(ra=H5R_open(loc, name))) {
+ if (NULL==(ra=H5RA_open(loc, name))) {
HRETURN_ERROR(H5E_RAGGED, H5E_CANTOPENOBJ, FAIL,
"unable to open ragged array");
}
/* Turn it into an atom */
if ((ret_value=H5I_register(H5I_RAGGED, ra))<0) {
- H5R_close(ra);
+ H5RA_close(ra);
HRETURN_ERROR(H5E_RAGGED, H5E_CANTREGISTER, FAIL,
"unable to register ragged array");
}
@@ -400,7 +400,7 @@ H5Ropen(hid_t loc_id, const char *name)
/*-------------------------------------------------------------------------
- * Function: H5R_open
+ * Function: H5RA_open
*
* Purpose: Open a ragged array. The name of the array is the same as
* the group that implements the array.
@@ -416,20 +416,20 @@ H5Ropen(hid_t loc_id, const char *name)
*
*-------------------------------------------------------------------------
*/
-H5R_t *
-H5R_open(H5G_entry_t *loc, const char *name)
+H5RA_t *
+H5RA_open(H5G_entry_t *loc, const char *name)
{
- H5R_t *ra = NULL;
- H5R_t *ret_value = NULL;
+ H5RA_t *ra = NULL;
+ H5RA_t *ret_value = NULL;
- FUNC_ENTER(H5R_open, NULL);
+ FUNC_ENTER(H5RA_open, NULL);
/* Check arguments */
assert(loc);
assert(name && *name);
/* Create the struct */
- if (NULL==(ra=H5MM_calloc(sizeof(H5R_t)))) {
+ if (NULL==(ra=H5MM_calloc(sizeof(H5RA_t)))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, NULL,
"memory allocation failed for ragged array struct");
}
@@ -465,7 +465,7 @@ H5R_open(H5G_entry_t *loc, const char *name)
/*-------------------------------------------------------------------------
- * Function: H5Rclose
+ * Function: H5RAclose
*
* Purpose: Close a ragged array.
*
@@ -481,11 +481,11 @@ H5R_open(H5G_entry_t *loc, const char *name)
*-------------------------------------------------------------------------
*/
herr_t
-H5Rclose(hid_t array_id)
+H5RAclose(hid_t array_id)
{
- H5R_t *ra=NULL;
+ H5RA_t *ra=NULL;
- FUNC_ENTER(H5Rclose, FAIL);
+ FUNC_ENTER(H5RAclose, FAIL);
H5TRACE1("e","i",array_id);
/* Check args */
@@ -507,7 +507,7 @@ H5Rclose(hid_t array_id)
/*-------------------------------------------------------------------------
- * Function: H5R_close
+ * Function: H5RA_close
*
* Purpose: Close a ragged array
*
@@ -523,9 +523,9 @@ H5Rclose(hid_t array_id)
*-------------------------------------------------------------------------
*/
herr_t
-H5R_close(H5R_t *ra)
+H5RA_close(H5RA_t *ra)
{
- FUNC_ENTER(H5R_close, FAIL);
+ FUNC_ENTER(H5RA_close, FAIL);
assert(ra);
if ((ra->group && H5G_close(ra->group)<0) ||
@@ -535,7 +535,7 @@ H5R_close(H5R_t *ra)
HRETURN_ERROR(H5E_RAGGED, H5E_CANTINIT, FAIL,
"unable to close one or more component datasets");
}
- HDmemset(ra, 0, sizeof(H5R_t));
+ HDmemset(ra, 0, sizeof(H5RA_t));
H5MM_xfree(ra);
FUNC_LEAVE(SUCCEED);
@@ -543,7 +543,7 @@ H5R_close(H5R_t *ra)
/*-------------------------------------------------------------------------
- * Function: H5Rwrite
+ * Function: H5RAwrite
*
* Purpose: Write a contiguous set of rows to a ragged array beginning at
* row number START_ROW and continuing for NROWS rows. Each row
@@ -562,14 +562,14 @@ H5R_close(H5R_t *ra)
*-------------------------------------------------------------------------
*/
herr_t
-H5Rwrite(hid_t array_id, hssize_t start_row, hsize_t nrows,
+H5RAwrite(hid_t array_id, hssize_t start_row, hsize_t nrows,
hid_t type_id, hsize_t size[/*nrows*/], void *buf[/*nrows*/])
{
- H5R_t *ra=NULL;
+ H5RA_t *ra=NULL;
H5T_t *type=NULL;
hsize_t i;
- FUNC_ENTER(H5Rwrite, FAIL);
+ FUNC_ENTER(H5RAwrite, FAIL);
H5TRACE6("e","iHshi*[a2]h*[a2]x",array_id,start_row,nrows,type_id,size,
buf);
@@ -596,7 +596,7 @@ H5Rwrite(hid_t array_id, hssize_t start_row, hsize_t nrows,
}
/* Do the work */
- if (H5R_write(ra, start_row, nrows, type, size, buf)<0) {
+ if (H5RA_write(ra, start_row, nrows, type, size, buf)<0) {
HRETURN_ERROR(H5E_RAGGED, H5E_WRITEERROR, FAIL,
"unable to write to ragged array");
}
@@ -606,7 +606,7 @@ H5Rwrite(hid_t array_id, hssize_t start_row, hsize_t nrows,
/*-------------------------------------------------------------------------
- * Function: H5R_write
+ * Function: H5RA_write
*
* Purpose: Write a contiguous set of rows to a ragged array beginning at
* row number START_ROW and continuing for NROWS rows. Each row
@@ -625,11 +625,11 @@ H5Rwrite(hid_t array_id, hssize_t start_row, hsize_t nrows,
*-------------------------------------------------------------------------
*/
herr_t
-H5R_write(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
+H5RA_write(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
hsize_t size[], void *buf[])
{
herr_t ret_value=FAIL;
- H5R_meta_t *meta = NULL;
+ H5RA_meta_t *meta = NULL;
H5S_t *mf_space=NULL; /*meta file data space */
H5S_t *mm_space=NULL; /*meta memory data space */
H5S_t *rf_space=NULL; /*raw data file space */
@@ -643,7 +643,7 @@ H5R_write(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
size_t type_size; /*size of the TYPE argument */
hsize_t i;
- FUNC_ENTER(H5R_write, FAIL);
+ FUNC_ENTER(H5RA_write, FAIL);
/* Check args */
assert(ra);
@@ -671,17 +671,17 @@ H5R_write(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
HGOTO_ERROR(H5E_RAGGED, H5E_CANTINIT, FAIL,
"unable to set meta data selection");
}
- if (NULL==(meta=H5MM_malloc(nrows*sizeof(H5R_meta_t)))) {
+ if (NULL==(meta=H5MM_malloc(nrows*sizeof(H5RA_meta_t)))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for meta data");
}
- if (H5D_read(ra->meta, H5R_meta_type_g, mm_space, mf_space,
+ if (H5D_read(ra->meta, H5RA_meta_type_g, mm_space, mf_space,
&H5D_xfer_dflt, meta)<0) {
HGOTO_ERROR(H5E_RAGGED, H5E_READERROR, FAIL,
"unable to read meta data");
}
HDmemset(meta+meta_read_size, 0,
- (nrows-meta_read_size)*sizeof(H5R_meta_t));
+ (nrows-meta_read_size)*sizeof(H5RA_meta_t));
/* Write the part of the data that will fit in the raw dataset */
if (NULL==(rf_space=H5D_get_space(ra->raw)) ||
@@ -726,7 +726,7 @@ H5R_write(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
/* Update the meta data */
for (i=0; i<nrows; i++) {
if (size[i]>raw_cur_size[1]) {
- H5R_fix_overflow(ra, type, meta+i, size[i]-raw_cur_size[1],
+ H5RA_fix_overflow(ra, type, meta+i, size[i]-raw_cur_size[1],
(uint8*)(buf[i])+raw_cur_size[1]*type_size);
}
meta[i].nelmts = size[i];
@@ -746,7 +746,7 @@ H5R_write(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
HGOTO_ERROR(H5E_RAGGED, H5E_CANTINIT, FAIL,
"unable to set meta data selection");
}
- if (H5D_write(ra->meta, H5R_meta_type_g, mm_space, mf_space,
+ if (H5D_write(ra->meta, H5RA_meta_type_g, mm_space, mf_space,
&H5D_xfer_dflt, meta)<0) {
HGOTO_ERROR(H5E_RAGGED, H5E_WRITEERROR, FAIL,
"unable to write meta data");
@@ -766,7 +766,7 @@ H5R_write(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
/*-------------------------------------------------------------------------
- * Function: H5R_fix_overflow
+ * Function: H5RA_fix_overflow
*
* Purpose: Updates the overflow information for a row. This is where
* the heap management comes into play. The NELMTS is the
@@ -786,7 +786,7 @@ H5R_write(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
*-------------------------------------------------------------------------
*/
static herr_t
-H5R_fix_overflow(H5R_t *ra, H5T_t *type, H5R_meta_t *meta, hsize_t nelmts,
+H5RA_fix_overflow(H5RA_t *ra, H5T_t *type, H5RA_meta_t *meta, hsize_t nelmts,
void *buf)
{
H5S_t *of_space=NULL; /*overflow file space */
@@ -794,7 +794,7 @@ H5R_fix_overflow(H5R_t *ra, H5T_t *type, H5R_meta_t *meta, hsize_t nelmts,
hsize_t cur_size; /*num elmts in overflow dataset */
herr_t ret_value=FAIL; /*return value */
- FUNC_ENTER(H5R_fix_overflow, FAIL);
+ FUNC_ENTER(H5RA_fix_overflow, FAIL);
assert(ra);
assert(meta);
@@ -887,7 +887,7 @@ H5R_fix_overflow(H5R_t *ra, H5T_t *type, H5R_meta_t *meta, hsize_t nelmts,
/*-------------------------------------------------------------------------
- * Function: H5Rread
+ * Function: H5RAread
*
* Purpose: Reads the contents of one or more rows of a ragged array
* pointed to by ARRAY_ID. The rows to read begin at row
@@ -924,13 +924,13 @@ H5R_fix_overflow(H5R_t *ra, H5T_t *type, H5R_meta_t *meta, hsize_t nelmts,
*-------------------------------------------------------------------------
*/
herr_t
-H5Rread(hid_t array_id, hssize_t start_row, hsize_t nrows,
+H5RAread(hid_t array_id, hssize_t start_row, hsize_t nrows,
hid_t type_id, hsize_t size[/*nrows*/], void *buf[/*nrows*/])
{
- H5R_t *ra=NULL;
+ H5RA_t *ra=NULL;
H5T_t *type=NULL;
- FUNC_ENTER(H5Rread, FAIL);
+ FUNC_ENTER(H5RAread, FAIL);
H5TRACE6("e","iHshi*[a2]h*[a2]x",array_id,start_row,nrows,type_id,size,
buf);
@@ -951,7 +951,7 @@ H5Rread(hid_t array_id, hssize_t start_row, hsize_t nrows,
}
/* Do the work */
- if (H5R_read(ra, start_row, nrows, type, size, buf)<0) {
+ if (H5RA_read(ra, start_row, nrows, type, size, buf)<0) {
HRETURN_ERROR(H5E_RAGGED, H5E_READERROR, FAIL,
"unable to read ragged array");
}
@@ -961,9 +961,9 @@ H5Rread(hid_t array_id, hssize_t start_row, hsize_t nrows,
/*-------------------------------------------------------------------------
- * Function: H5R_read
+ * Function: H5RA_read
*
- * Purpose: Reads (part of) a ragged array. See H5Rread() for details.
+ * Purpose: Reads (part of) a ragged array. See H5RAread() for details.
*
* Return: Success: SUCCEED
*
@@ -977,11 +977,11 @@ H5Rread(hid_t array_id, hssize_t start_row, hsize_t nrows,
*-------------------------------------------------------------------------
*/
herr_t
-H5R_read(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
+H5RA_read(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
hsize_t size[], void *buf[])
{
herr_t ret_value=FAIL;
- H5R_meta_t *meta = NULL;
+ H5RA_meta_t *meta = NULL;
H5S_t *mf_space=NULL; /*meta file data space */
H5S_t *mm_space=NULL; /*meta memory data space */
H5S_t *rf_space=NULL; /*raw data file space */
@@ -999,7 +999,7 @@ H5R_read(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
void **buf_out=NULL; /*output BUF values */
hsize_t i; /*counter */
- FUNC_ENTER(H5R_read, FAIL);
+ FUNC_ENTER(H5RA_read, FAIL);
/* Check args */
assert(ra);
@@ -1054,7 +1054,7 @@ H5R_read(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
(nrows-raw_read_size[0])*raw_read_size[1]*type_size);
/* Get the meta data */
- if (NULL==(meta=H5MM_malloc(nrows*sizeof(H5R_meta_t)))) {
+ if (NULL==(meta=H5MM_malloc(nrows*sizeof(H5RA_meta_t)))) {
HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL,
"memory allocation failed for meta data");
}
@@ -1075,13 +1075,13 @@ H5R_read(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
HGOTO_ERROR(H5E_RAGGED, H5E_CANTINIT, FAIL,
"unable to set meta data selection");
}
- if (H5D_read(ra->meta, H5R_meta_type_g, mm_space, mf_space,
+ if (H5D_read(ra->meta, H5RA_meta_type_g, mm_space, mf_space,
&H5D_xfer_dflt, meta)<0) {
HGOTO_ERROR(H5E_RAGGED, H5E_READERROR, FAIL,
"unable to read meta data");
}
HDmemset(meta+meta_read_size, 0,
- (nrows-meta_read_size)*sizeof(H5R_meta_t));
+ (nrows-meta_read_size)*sizeof(H5RA_meta_t));
/* Copy data into output buffers */
for (i=0; i<nrows; i++) {
@@ -1166,7 +1166,7 @@ H5R_read(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
/*-------------------------------------------------------------------------
- * Function: H5R_entof
+ * Function: H5RA_entof
*
* Purpose: Return a pointer to the ragged arrays symbol table entry.
*
@@ -1182,7 +1182,7 @@ H5R_read(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
*-------------------------------------------------------------------------
*/
H5G_entry_t *
-H5R_entof(H5R_t *ra)
+H5RA_entof(H5RA_t *ra)
{
assert(ra);
return H5G_entof(ra->group);
diff --git a/src/H5RAprivate.h b/src/H5RAprivate.h
new file mode 100644
index 0000000..19e11d7
--- /dev/null
+++ b/src/H5RAprivate.h
@@ -0,0 +1,28 @@
+/*
+ * Copyright © 1998 NCSA
+ * All rights reserved.
+ *
+ * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Tuesday, August 25, 1998
+ */
+#ifndef _H5RAprivate_H
+#define _H5RAprivate_H
+#include <H5RApublic.h>
+
+#include <H5Dprivate.h>
+#include <H5Gprivate.h>
+#include <H5Tprivate.h>
+
+typedef struct H5RA_t H5RA_t;
+
+herr_t H5RA_close(H5RA_t *ra);
+H5RA_t *H5RA_create(H5G_entry_t *loc, const char *name, H5T_t *type,
+ const H5D_create_t *dcpl);
+H5RA_t *H5RA_open(H5G_entry_t *loc, const char *name);
+herr_t H5RA_write(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
+ hsize_t size[], void *buf[]);
+herr_t H5RA_read(H5RA_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
+ hsize_t size[], void *buf[]);
+H5G_entry_t *H5RA_entof(H5RA_t *ra);
+
+#endif
diff --git a/src/H5Rpublic.h b/src/H5RApublic.h
index bcdcee7..e2daaa4 100644
--- a/src/H5Rpublic.h
+++ b/src/H5RApublic.h
@@ -5,8 +5,8 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Tuesday, August 25, 1998
*/
-#ifndef _H5Rpublic_H
-#define _H5Rpublic_H
+#ifndef _H5RApublic_H
+#define _H5RApublic_H
#include <H5Ipublic.h>
@@ -14,12 +14,12 @@
extern "C" {
#endif
-hid_t H5Rcreate(hid_t loc_id, const char *name, hid_t type_id, hid_t plist_id);
-hid_t H5Ropen(hid_t loc_id, const char *name);
-herr_t H5Rclose(hid_t array_id);
-herr_t H5Rwrite(hid_t array_id, hssize_t start_row, hsize_t nrows,
+hid_t H5RAcreate(hid_t loc_id, const char *name, hid_t type_id, hid_t plist_id);
+hid_t H5RAopen(hid_t loc_id, const char *name);
+herr_t H5RAclose(hid_t array_id);
+herr_t H5RAwrite(hid_t array_id, hssize_t start_row, hsize_t nrows,
hid_t type_id, hsize_t size[], void *buf[]);
-herr_t H5Rread(hid_t array_id, hssize_t start_row, hsize_t nrows,
+herr_t H5RAread(hid_t array_id, hssize_t start_row, hsize_t nrows,
hid_t type_id, hsize_t size[], void *buf[]);
#ifdef __cplusplus
diff --git a/src/H5Rprivate.h b/src/H5Rprivate.h
deleted file mode 100644
index 39c7135..0000000
--- a/src/H5Rprivate.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright © 1998 NCSA
- * All rights reserved.
- *
- * Programmer: Robb Matzke <matzke@llnl.gov>
- * Tuesday, August 25, 1998
- */
-#ifndef _H5Rprivate_H
-#define _H5Rprivate_H
-#include <H5Rpublic.h>
-
-#include <H5Dprivate.h>
-#include <H5Gprivate.h>
-#include <H5Tprivate.h>
-
-typedef struct H5R_t H5R_t;
-
-herr_t H5R_close(H5R_t *ra);
-H5R_t *H5R_create(H5G_entry_t *loc, const char *name, H5T_t *type,
- const H5D_create_t *dcpl);
-H5R_t *H5R_open(H5G_entry_t *loc, const char *name);
-herr_t H5R_write(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
- hsize_t size[], void *buf[]);
-herr_t H5R_read(H5R_t *ra, hssize_t start_row, hsize_t nrows, H5T_t *type,
- hsize_t size[], void *buf[]);
-H5G_entry_t *H5R_entof(H5R_t *ra);
-
-#endif
diff --git a/src/Makefile.in b/src/Makefile.in
index 750a200..404c4e5 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -19,7 +19,7 @@ LIB_SRC=H5.c H5A.c H5AC.c H5B.c H5D.c H5E.c H5F.c H5Farray.c H5Fcore.c \
H5Fstdio.c H5G.c H5Gent.c H5Gnode.c H5Gstab.c H5HG.c H5HL.c H5I.c H5MF.c \
H5MM.c H5O.c H5Oattr.c H5Ocomp.c H5Ocont.c H5Odtype.c H5Oefl.c H5Ofill.c \
H5Olayout.c H5Omtime.c H5Oname.c H5Onull.c H5Osdspace.c H5Oshared.c \
- H5Ostab.c H5P.c H5R.c H5S.c H5Sall.c H5Shyper.c H5Smpio.c H5Spoint.c \
+ H5Ostab.c H5P.c H5RA.c H5S.c H5Sall.c H5Shyper.c H5Smpio.c H5Spoint.c \
H5Sselect.c H5T.c H5Tbit.c H5Tconv.c H5Tinit.c H5TB.c H5V.c H5Z.c
LIB_OBJ=$(LIB_SRC:.c=.o)
@@ -31,13 +31,13 @@ MOSTLYCLEAN=H5detect.o H5detect H5Tinit.o H5Tinit.c
PUB_HDR=H5public.h H5Apublic.h H5ACpublic.h H5Bpublic.h H5Dpublic.h \
H5Epublic.h H5Fpublic.h H5Gpublic.h H5HGpublic.h H5HLpublic.h \
H5Ipublic.h H5MFpublic.h H5MMpublic.h H5Opublic.h H5Ppublic.h \
- H5Rpublic.h H5Spublic.h H5Tpublic.h H5Zpublic.h H5config.h hdf5.h
+ H5RApublic.h H5Spublic.h H5Tpublic.h H5Zpublic.h H5config.h hdf5.h
# Other header files (not to be installed)...
PRIVATE_HDR=H5private.h H5Aprivate.h H5Apkg.h H5ACprivate.h H5Bprivate.h \
H5Dprivate.h H5Eprivate.h H5Fprivate.h H5Gprivate.h H5Gpkg.h \
H5HGprivate.h H5HLprivate.h H5Iprivate.h H5MFprivate.h H5MMprivate.h \
- H5Oprivate.h H5Pprivate.h H5Rprivate.h H5Sprivate.h H5Tprivate.h \
+ H5Oprivate.h H5Pprivate.h H5RAprivate.h H5Sprivate.h H5Tprivate.h \
H5TBprivate.h H5Tpkg.h H5Vprivate.h H5Zprivate.h
# Number format detection
diff --git a/src/hdf5.h b/src/hdf5.h
index 204d67d..be9b2b6 100644
--- a/src/hdf5.h
+++ b/src/hdf5.h
@@ -33,7 +33,7 @@
#include <H5MMpublic.h> /* Core memory management */
#include <H5Opublic.h> /* Object headers */
#include <H5Ppublic.h> /* Property lists */
-#include <H5Rpublic.h> /* Ragged arrays */
+#include <H5RApublic.h> /* Ragged arrays */
#include <H5Spublic.h> /* Dataspaces */
#include <H5Tpublic.h> /* Datatypes */
#include <H5Zpublic.h> /* Data filters */
diff --git a/test/.distdep b/test/.distdep
index 0d2d589..a560909 100644
--- a/test/.distdep
+++ b/test/.distdep
@@ -198,7 +198,7 @@ dtypes.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h \
../src/H5Tpkg.h \
@@ -261,7 +261,7 @@ dsets.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
cmpd_dset.o: \
@@ -284,7 +284,7 @@ cmpd_dset.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
extend.o: \
@@ -307,7 +307,7 @@ extend.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h
+ ../src/H5RApublic.h
external.o: \
external.c \
../src/hdf5.h \
@@ -328,7 +328,7 @@ external.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
iopipe.o: \
@@ -351,7 +351,7 @@ iopipe.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
gheap.o: \
@@ -393,7 +393,7 @@ shtype.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h
+ ../src/H5RApublic.h
big.o: \
big.c \
../src/hdf5.h \
@@ -414,7 +414,7 @@ big.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h \
../src/H5private.h
@@ -438,7 +438,7 @@ links.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h
chunk.o: \
chunk.c \
@@ -460,7 +460,7 @@ chunk.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h
bittests.o: \
bittests.c \
@@ -498,7 +498,7 @@ mtime.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h \
../src/H5private.h
@@ -522,7 +522,7 @@ ragged.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h \
../src/H5private.h
@@ -546,7 +546,7 @@ unlink.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h
overhead.o: \
overhead.c \
@@ -568,7 +568,7 @@ overhead.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
fillval.o: \
@@ -591,6 +591,6 @@ fillval.o: \
../src/H5Opublic.h \
../src/H5Ppublic.h \
../src/H5Zpublic.h \
- ../src/H5Rpublic.h \
+ ../src/H5RApublic.h \
../src/H5Spublic.h \
../src/H5Tpublic.h
diff --git a/test/ragged.c b/test/ragged.c
index e4e8a8c..f89412d 100644
--- a/test/ragged.c
+++ b/test/ragged.c
@@ -235,7 +235,7 @@ ragged_write_all(hid_t ra, hsize_t rows_at_once)
buf[i] = dd;
interval_nelmts += size[i];
}
- if (H5Rwrite(ra, row, i, H_MTYPE, size, buf)<0) goto error;
+ if (H5RAwrite(ra, row, i, H_MTYPE, size, buf)<0) goto error;
if (0==row || alarm_g || 0==timeout_g) {
alarm_g = 0;
H5_timer_end(&timer_total, &timer);
@@ -333,7 +333,7 @@ ragged_read_all(hid_t ra, hsize_t rows_at_once)
/* Clear data then read */
HDmemset(size, 0, rows_at_once*sizeof(*size));
HDmemset(buf, 0, rows_at_once*sizeof(*buf));
- if (H5Rread(ra, row, rows_at_once, H_MTYPE, size,
+ if (H5RAread(ra, row, rows_at_once, H_MTYPE, size,
(void**)buf)<0) {
goto error;
}
@@ -470,7 +470,7 @@ ragged_read_short(hid_t ra, hsize_t rows_at_once, hsize_t width)
/* Read data */
for (i=0; i<rows_at_once; i++) size[i] = width;
- if (H5Rread(ra, row, rows_at_once, H_MTYPE, size,
+ if (H5RAread(ra, row, rows_at_once, H_MTYPE, size,
(void**)buf)<0) {
goto error;
}
@@ -612,7 +612,7 @@ main(int argc, char *argv[])
printf("Chunk size is %lu by %lu\n",
(unsigned long)(ch_size[0]), (unsigned long)(ch_size[1]));
if (H5Pset_chunk(dcpl, 2, ch_size)<0) goto error;
- if ((ra=H5Rcreate(file, "ra", H_FTYPE, dcpl))<0) goto error;
+ if ((ra=H5RAcreate(file, "ra", H_FTYPE, dcpl))<0) goto error;
if (H5Pclose(dcpl)<0) goto error;
/* The tests */
@@ -630,7 +630,7 @@ main(int argc, char *argv[])
rand_nelmts(1);
/* Cleanup */
- if (H5Rclose(ra)<0) goto error;
+ if (H5RAclose(ra)<0) goto error;
if (H5Fclose(file)<0) goto error;
puts("All ragged array tests passed.");