summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1998-10-26 17:14:00 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1998-10-26 17:14:00 (GMT)
commit5ff842ebefb4adcebaaecd5b6809f32f614ed932 (patch)
tree02c8350835b930561d22c85d37f3221d4536d372
parentdb9525c2a3ee70379032bae71f26866451df7e58 (diff)
downloadhdf5-5ff842ebefb4adcebaaecd5b6809f32f614ed932.zip
hdf5-5ff842ebefb4adcebaaecd5b6809f32f614ed932.tar.gz
hdf5-5ff842ebefb4adcebaaecd5b6809f32f614ed932.tar.bz2
[svn-r790] Updated parameters for H5R API and changed constants from pointers to references
-rw-r--r--src/H5Odtype.c4
-rw-r--r--src/H5R.c25
-rw-r--r--src/H5Rpublic.h2
-rw-r--r--src/H5T.c8
-rw-r--r--src/H5Tpublic.h6
-rw-r--r--test/trefer.c6
6 files changed, 25 insertions, 26 deletions
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index 26d42f1..26bb58d 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -218,7 +218,7 @@ H5O_dtype_decode_helper(const uint8 **pp, H5T_t *dt)
}
break;
- case H5T_POINTER:
+ case H5T_REFERENCE:
dt->u.atomic.order = H5T_ORDER_NONE;
dt->u.atomic.prec = 8 * dt->size;
dt->u.atomic.offset = 0;
@@ -466,7 +466,7 @@ H5O_dtype_encode_helper(uint8 **pp, const H5T_t *dt)
}
break;
- case H5T_POINTER:
+ case H5T_REFERENCE:
flags |= (dt->u.atomic.u.r.rtype & 0x0f);
break;
diff --git a/src/H5R.c b/src/H5R.c
index 15ad790..3d0652f 100644
--- a/src/H5R.c
+++ b/src/H5R.c
@@ -36,7 +36,7 @@ static void H5R_term_interface(void);
static herr_t H5R_create(void *ref, H5G_entry_t *loc, const char *name,
H5R_type_t ref_type, H5S_t *space);
static hid_t H5R_dereference(H5D_t *dset, H5R_type_t ref_type, void *_ref);
-static H5S_t * H5R_get_space(void *ref);
+static H5S_t * H5R_get_region(void *ref);
/*--------------------------------------------------------------------------
@@ -346,11 +346,11 @@ done:
/*--------------------------------------------------------------------------
NAME
- H5R_get_space
+ H5R_get_region
PURPOSE
Retrieves a dataspace with the region pointed to selected.
USAGE
- H5S_t *H5R_get_space(ref)
+ H5S_t *H5R_get_region(ref)
void *ref; IN: Reference to open.
RETURNS
@@ -365,11 +365,11 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static H5S_t *
-H5R_get_space(void __unused__ *ref)
+H5R_get_region(void __unused__ *ref)
{
H5S_t *ret_value = NULL;
- FUNC_ENTER(H5R_get_space, NULL);
+ FUNC_ENTER(H5R_get_region, NULL);
assert(ref);
@@ -377,16 +377,16 @@ H5R_get_space(void __unused__ *ref)
done:
#endif /* LATER */
FUNC_LEAVE(ret_value);
-} /* end H5R_get_space() */
+} /* end H5R_get_region() */
/*--------------------------------------------------------------------------
NAME
- H5Rget_space
+ H5Rget_region
PURPOSE
Retrieves a dataspace with the region pointed to selected.
USAGE
- hid_t H5Rget_space(ref)
+ hid_t H5Rget_region(ref)
void *ref; IN: Reference to open.
RETURNS
@@ -401,20 +401,19 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
hid_t
-H5Rget_space(void *ref)
+H5Rget_region(hid_t dset, H5R_type_t rtype, void *ref)
{
H5S_t *space = NULL;
hid_t ret_value = FAIL;
- FUNC_ENTER(H5Rget_space, FAIL);
- H5TRACE1("i","x",ref);
+ FUNC_ENTER(H5Rget_region, FAIL);
/* Check args */
if(ref==NULL)
HGOTO_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL, "invalid reference pointer");
/* Create reference */
- if ((space=H5R_get_space(ref))==NULL)
+ if ((space=H5R_get_region(ref))==NULL)
HGOTO_ERROR (H5E_REFERENCE, H5E_CANTCREATE, FAIL, "unable to create dataspace");
/* Atomize */
@@ -423,5 +422,5 @@ H5Rget_space(void *ref)
done:
FUNC_LEAVE(ret_value);
-} /* end H5Rget_space() */
+} /* end H5Rget_region() */
diff --git a/src/H5Rpublic.h b/src/H5Rpublic.h
index ebb7771..48a5765 100644
--- a/src/H5Rpublic.h
+++ b/src/H5Rpublic.h
@@ -55,7 +55,7 @@ extern "C" {
herr_t H5Rcreate(void *ref, hid_t loc_id, const char *name,
H5R_type_t ref_type, hid_t space_id);
hid_t H5Rdereference(hid_t dataset, H5R_type_t ref_type, void *ref);
-hid_t H5Rget_space(void *ref);
+hid_t H5Rget_region(hid_t dataset, H5R_type_t ref_type, void *ref);
#ifdef __cplusplus
}
diff --git a/src/H5T.c b/src/H5T.c
index d583f3d..b7fd0f7 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -59,7 +59,7 @@ hid_t H5T_STD_B32BE_g = FAIL;
hid_t H5T_STD_B32LE_g = FAIL;
hid_t H5T_STD_B64BE_g = FAIL;
hid_t H5T_STD_B64LE_g = FAIL;
-hid_t H5T_STD_PTR_OBJ_g = FAIL;
+hid_t H5T_STD_REF_OBJ_g = FAIL;
hid_t H5T_UNIX_D32BE_g = FAIL;
hid_t H5T_UNIX_D32LE_g = FAIL;
@@ -609,7 +609,7 @@ H5T_init_interface(void)
}
dt->state = H5T_STATE_IMMUTABLE;
H5F_addr_undef (&(dt->ent.header));
- dt->type = H5T_POINTER;
+ dt->type = H5T_REFERENCE;
dt->size = sizeof(haddr_t);
dt->u.atomic.order = H5T_ORDER_NONE;
dt->u.atomic.offset = 0;
@@ -617,7 +617,7 @@ H5T_init_interface(void)
dt->u.atomic.lsb_pad = H5T_PAD_ZERO;
dt->u.atomic.msb_pad = H5T_PAD_ZERO;
dt->u.atomic.u.r.rtype = H5R_OBJECT;
- if ((H5T_STD_PTR_OBJ_g = H5I_register(H5I_DATATYPE, dt)) < 0) {
+ if ((H5T_STD_REF_OBJ_g = H5I_register(H5I_DATATYPE, dt)) < 0) {
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to initialize H5T layer");
}
@@ -4347,7 +4347,7 @@ H5T_cmp(const H5T_t *dt1, const H5T_t *dt2)
/*void */
break;
- case H5T_POINTER:
+ case H5T_REFERENCE:
if (dt1->u.atomic.u.r.rtype < dt2->u.atomic.u.r.rtype) {
HGOTO_DONE(-1);
}
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index a523e87..acf0510 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -32,7 +32,7 @@ typedef enum H5T_class_t {
H5T_BITFIELD = 4, /*bit field types */
H5T_OPAQUE = 5, /*opaque types */
H5T_COMPOUND = 6, /*compound types */
- H5T_POINTER = 7, /*Pointer types */
+ H5T_REFERENCE = 7, /*reference types */
H5T_NCLASSES = 8 /*this must be last */
} H5T_class_t;
@@ -209,7 +209,7 @@ extern hid_t H5T_IEEE_F64LE_g;
#define H5T_STD_B32LE (H5open(), H5T_STD_B32LE_g)
#define H5T_STD_B64BE (H5open(), H5T_STD_B64BE_g)
#define H5T_STD_B64LE (H5open(), H5T_STD_B64LE_g)
-#define H5T_STD_PTR_OBJ (H5open(), H5T_STD_PTR_OBJ_g)
+#define H5T_STD_REF_OBJ (H5open(), H5T_STD_REF_OBJ_g)
extern hid_t H5T_STD_I8BE_g;
extern hid_t H5T_STD_I8LE_g;
extern hid_t H5T_STD_I16BE_g;
@@ -234,7 +234,7 @@ extern hid_t H5T_STD_B32BE_g;
extern hid_t H5T_STD_B32LE_g;
extern hid_t H5T_STD_B64BE_g;
extern hid_t H5T_STD_B64LE_g;
-extern hid_t H5T_STD_PTR_OBJ_g;
+extern hid_t H5T_STD_REF_OBJ_g;
/*
* Types which are particular to Unix.
diff --git a/test/trefer.c b/test/trefer.c
index 0ffa001..5438729 100644
--- a/test/trefer.c
+++ b/test/trefer.c
@@ -105,7 +105,7 @@ test_reference_obj(void)
CHECK(ret, FAIL, "H5Dclose");
/* Create a dataset */
- dataset=H5Dcreate(fid1,"Dataset3",H5T_STD_PTR_OBJ,sid1,H5P_DEFAULT);
+ dataset=H5Dcreate(fid1,"Dataset3",H5T_STD_REF_OBJ,sid1,H5P_DEFAULT);
CHECK(ret, FAIL, "H5Dcreate");
/* Create references */
@@ -119,7 +119,7 @@ test_reference_obj(void)
CHECK(ret, FAIL, "H5Rcreate");
/* Write selection to disk */
- ret=H5Dwrite(dataset,H5T_STD_PTR_OBJ,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf);
+ ret=H5Dwrite(dataset,H5T_STD_REF_OBJ,H5S_ALL,H5S_ALL,H5P_DEFAULT,wbuf);
CHECK(ret, FAIL, "H5Dwrite");
/* Close disk dataspace */
@@ -143,7 +143,7 @@ test_reference_obj(void)
CHECK(ret, FAIL, "H5Dcreate");
/* Read selection from disk */
- ret=H5Dread(dataset,H5T_STD_PTR_OBJ,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf);
+ ret=H5Dread(dataset,H5T_STD_REF_OBJ,H5S_ALL,H5S_ALL,H5P_DEFAULT,rbuf);
CHECK(ret, FAIL, "H5Dread");
/* Try to open objects */