summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5A.c3
-rw-r--r--src/H5Apublic.h2
-rw-r--r--src/H5G.c44
-rw-r--r--src/H5Glink.c2
-rw-r--r--src/H5Gnode.c18
-rw-r--r--src/H5Gobj.c85
-rw-r--r--src/H5Goh.c8
-rw-r--r--src/H5Gpkg.h7
-rw-r--r--src/H5Gpublic.h2
-rw-r--r--src/H5Gstab.c6
-rw-r--r--src/H5Gtest.c2
-rw-r--r--src/H5Gtraverse.c25
-rw-r--r--src/H5O.c14
-rw-r--r--src/H5Oginfo.c3
-rw-r--r--src/H5Olinfo.c2
-rw-r--r--src/H5Olink.c2
-rw-r--r--src/H5Oprivate.h8
-rw-r--r--src/H5Pacpl.c3
-rw-r--r--src/H5Pgcpl.c2
-rwxr-xr-xsrc/H5Pocpl.c4
-rw-r--r--src/H5Ppublic.h2
-rw-r--r--src/H5Tcommit.c4
-rw-r--r--src/H5Tpublic.h2
-rw-r--r--src/H5config.h.in3
24 files changed, 237 insertions, 16 deletions
diff --git a/src/H5A.c b/src/H5A.c
index 9c8da81..abd70b5 100644
--- a/src/H5A.c
+++ b/src/H5A.c
@@ -1021,6 +1021,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* H5Aget_type() */
+#ifdef H5_GROUP_REVISION
/*--------------------------------------------------------------------------
NAME
@@ -1076,6 +1077,8 @@ H5Aget_create_plist(hid_t attr_id)
done:
FUNC_LEAVE_API(ret_value)
}
+#endif /* H5_GROUP_REVISION */
+
/*--------------------------------------------------------------------------
NAME
diff --git a/src/H5Apublic.h b/src/H5Apublic.h
index ec9904a..c932e54 100644
--- a/src/H5Apublic.h
+++ b/src/H5Apublic.h
@@ -38,7 +38,9 @@ H5_DLL herr_t H5Aread(hid_t attr_id, hid_t type_id, void *buf);
H5_DLL herr_t H5Aclose(hid_t attr_id);
H5_DLL hid_t H5Aget_space(hid_t attr_id);
H5_DLL hid_t H5Aget_type(hid_t attr_id);
+#ifdef H5_GROUP_REVISION
H5_DLL hid_t H5Aget_create_plist(hid_t attr_id);
+#endif /* H5_GROUP_REVISION */
H5_DLL ssize_t H5Aget_name(hid_t attr_id, size_t buf_size, char *buf);
H5_DLL hsize_t H5Aget_storage_size(hid_t attr_id);
H5_DLL int H5Aget_num_attrs(hid_t loc_id);
diff --git a/src/H5G.c b/src/H5G.c
index 8b9f2fd..a606574 100644
--- a/src/H5G.c
+++ b/src/H5G.c
@@ -228,6 +228,7 @@ H5Gcreate(hid_t loc_id, const char *name, size_t size_hint)
if(!name || !*name)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no name given")
+#ifdef H5_GROUP_REVISION
/* Check if we need to create a non-standard GCPL */
if(size_hint > 0) {
H5P_genplist_t *gc_plist; /* Property list created */
@@ -255,6 +256,7 @@ H5Gcreate(hid_t loc_id, const char *name, size_t size_hint)
HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info")
} /* end if */
else
+#endif /* H5_GROUP_REVISION */
tmp_gcpl = H5P_GROUP_CREATE_DEFAULT;
/* Create the group */
@@ -276,6 +278,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gcreate() */
+#ifdef H5_GROUP_REVISION
/*-------------------------------------------------------------------------
* Function: H5Gcreate_expand
@@ -357,6 +360,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gcreate_expand() */
+#endif /* H5_GROUP_REVISION */
/*-------------------------------------------------------------------------
@@ -987,6 +991,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_comment() */
+#ifdef H5_GROUP_REVISION
/*-------------------------------------------------------------------------
* Function: H5Gget_create_plist
@@ -1055,6 +1060,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Gget_create_plist() */
+#endif /* H5_GROUP_REVISION */
/*-------------------------------------------------------------------------
@@ -1079,7 +1085,7 @@ done:
* Keep external links as they are (default)
* Expand them into new objects
* H5G_COPY_EXPAND_OBJ_REFERENCE_FLAG
- * Update only the values of object references (default)
+ * Update only the values of object references (default)
* Copy objects that are pointed by references
* H5G_COPY_WITHOUT_ATTR_FLAG
* Copy object along with all its attributes (default)
@@ -1123,6 +1129,7 @@ H5Gcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Gcopy, FAIL)
+ H5TRACE5("e","isisi",src_loc_id,src_name,dst_loc_id,dst_name,plist_id);
/* Check arguments */
if(H5G_loc(src_loc_id, &loc) < 0)
@@ -1425,16 +1432,20 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, H5G_loc_t *loc)
*/
if (loc == NULL) {
H5P_genplist_t *fc_plist; /* File creation property list */
+#ifdef H5_GROUP_REVISION
H5O_ginfo_t ginfo; /* Group info parameters */
+#endif /* H5_GROUP_REVISION */
/* Get the file creation property list */
/* (Which is a sub-class of the group creation property class) */
if(NULL == (fc_plist = H5I_object(f->shared->fcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a property list")
+#ifdef H5_GROUP_REVISION
/* Get the group info property */
if(H5P_get(fc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info")
+#endif /* H5_GROUP_REVISION */
/* Set up group location for root group */
new_root_loc.oloc = &new_root_oloc;
@@ -1442,7 +1453,11 @@ H5G_mkroot(H5F_t *f, hid_t dxpl_id, H5G_loc_t *loc)
H5G_loc_reset(&new_root_loc);
loc = &new_root_loc;
- if(H5G_obj_create(f, dxpl_id, &ginfo, loc->oloc/*out*/) < 0)
+ if(H5G_obj_create(f, dxpl_id,
+#ifdef H5_GROUP_REVISION
+ &ginfo,
+#endif /* H5_GROUP_REVISION */
+ loc->oloc/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
if(1 != H5O_link(loc->oloc, 1, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_LINK, FAIL, "internal error (wrong link count)")
@@ -1509,7 +1524,9 @@ H5G_create(H5G_loc_t *loc, const char *name,
H5G_t *grp = NULL; /*new group */
H5F_t *file = NULL; /* File new group will be in */
H5P_genplist_t *gc_plist; /* Property list created */
+#ifdef H5_GROUP_REVISION
H5O_ginfo_t ginfo; /* Group info */
+#endif /* H5_GROUP_REVISION */
unsigned oloc_init = 0; /* Flag to indicate that the group object location was created successfully */
H5G_loc_t grp_loc; /* Group location wrapper structure */
H5G_t *ret_value; /* Return value */
@@ -1538,12 +1555,18 @@ H5G_create(H5G_loc_t *loc, const char *name,
if(NULL == (gc_plist = H5I_object(gcpl_id)))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a property list")
+#ifdef H5_GROUP_REVISION
/* Get the group info property */
if(H5P_get(gc_plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, NULL, "can't get group info")
+#endif /* H5_GROUP_REVISION */
/* Create the group object header */
- if(H5G_obj_create(file, dxpl_id, &ginfo, &(grp->oloc)/*out*/) < 0)
+ if(H5G_obj_create(file, dxpl_id,
+#ifdef H5_GROUP_REVISION
+ &ginfo,
+#endif /* H5_GROUP_REVISION */
+ &(grp->oloc)/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, NULL, "unable to create group object header")
oloc_init = 1; /* Indicate that the object location information is valid */
@@ -1711,7 +1734,10 @@ H5G_open_oid(H5G_t *grp, hid_t dxpl_id)
/* Check if this object has the right message(s) to be treated as a group */
if(H5O_exists(&(grp->oloc), H5O_STAB_ID, 0, dxpl_id) <= 0
- && H5O_exists(&(grp->oloc), H5O_LINFO_ID, 0, dxpl_id) <= 0)
+#ifdef H5_GROUP_REVISION
+ && H5O_exists(&(grp->oloc), H5O_LINFO_ID, 0, dxpl_id) <= 0
+#endif /* H5_GROUP_REVISION */
+ )
HGOTO_ERROR(H5E_SYM, H5E_CANTOPENOBJ, FAIL, "not a group")
done:
@@ -2750,8 +2776,16 @@ H5G_move(H5G_loc_t *src_loc, const char *src_name, H5G_loc_t *dst_loc,
done:
/* If there's valid information in the link, reset it */
- if(link_valid)
+ if(link_valid) {
+#ifdef H5_GROUP_REVISION
H5O_reset(H5O_LINK_ID, &lnk);
+#else /* H5_GROUP_REVISION */
+ /* Free information for link (but don't free link pointer) */
+ if(lnk.type == H5G_LINK_SOFT)
+ lnk.u.soft.name = H5MM_xfree(lnk.u.soft.name);
+ lnk.name = H5MM_xfree(lnk.name);
+#endif /* H5_GROUP_REVISION */
+ } /* end if */
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_move() */
diff --git a/src/H5Glink.c b/src/H5Glink.c
index 6eb9dfc..28ef431 100644
--- a/src/H5Glink.c
+++ b/src/H5Glink.c
@@ -33,6 +33,7 @@
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
+#ifdef H5_GROUP_REVISION
/* Private typedefs */
/* Data structure to hold table of links for a group */
@@ -723,4 +724,5 @@ H5G_link_lookup(H5O_loc_t *oloc, const char *name, H5O_link_t *lnk,
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_link_lookup() */
+#endif /* H5_GROUP_REVISION */
diff --git a/src/H5Gnode.c b/src/H5Gnode.c
index 1a2f922..126be95 100644
--- a/src/H5Gnode.c
+++ b/src/H5Gnode.c
@@ -1669,12 +1669,18 @@ H5G_node_type(H5F_t *f, hid_t dxpl_id, const void UNUSED *_lt_key, haddr_t addr,
/* Compute index of entry */
loc_idx = udata->idx - udata->num_objs;
- /* Build temporary object location */
- tmp_oloc.file = f;
- HDassert(H5F_addr_defined(sn->entry[loc_idx].header));
- tmp_oloc.addr = sn->entry[loc_idx].header;
+ /* Check for a soft link */
+ if(sn->entry[loc_idx].type == H5G_CACHED_SLINK)
+ udata->type = H5G_LINK;
+ /* Must be a hard link */
+ else {
+ /* Build temporary object location */
+ tmp_oloc.file = f;
+ HDassert(H5F_addr_defined(sn->entry[loc_idx].header));
+ tmp_oloc.addr = sn->entry[loc_idx].header;
- udata->type = H5O_obj_type(&tmp_oloc, dxpl_id);
+ udata->type = H5O_obj_type(&tmp_oloc, dxpl_id);
+ } /* end else */
ret_value = H5B_ITER_STOP;
} else {
udata->num_objs += sn->nsyms;
@@ -1687,6 +1693,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value);
} /* end H5G_node_type() */
+#ifdef H5_GROUP_REVISION
/*-------------------------------------------------------------------------
* Function: H5G_node_stab_convert
@@ -1756,6 +1763,7 @@ done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_node_stab_convert() */
+#endif /* H5_GROUP_REVISION */
/*-------------------------------------------------------------------------
diff --git a/src/H5Gobj.c b/src/H5Gobj.c
index aa8250f..8846927 100644
--- a/src/H5Gobj.c
+++ b/src/H5Gobj.c
@@ -54,8 +54,10 @@ typedef struct {
/* Private macros */
/* PRIVATE PROTOTYPES */
+#ifdef H5_GROUP_REVISION
static herr_t
H5G_obj_link_to_stab_cb(const void *_mesg, unsigned idx, void *_udata);
+#endif /* H5_GROUP_REVISION */
/*-------------------------------------------------------------------------
@@ -72,14 +74,20 @@ H5G_obj_link_to_stab_cb(const void *_mesg, unsigned idx, void *_udata);
*-------------------------------------------------------------------------
*/
herr_t
-H5G_obj_create(H5F_t *f, hid_t dxpl_id, H5O_ginfo_t *ginfo, H5O_loc_t *oloc/*out*/)
+H5G_obj_create(H5F_t *f, hid_t dxpl_id,
+#ifdef H5_GROUP_REVISION
+ H5O_ginfo_t *ginfo,
+#endif /* H5_GROUP_REVISION */
+ H5O_loc_t *oloc/*out*/)
{
+#ifdef H5_GROUP_REVISION
H5O_linfo_t linfo; /* Link information */
H5O_link_t lnk; /* Temporary link message info for computing message size */
char null_char = '\0'; /* Character for creating null string */
size_t ginfo_size; /* Size of the group info message */
size_t linfo_size; /* Size of the link info message */
size_t link_size; /* Size of a link message */
+#endif /* H5_GROUP_REVISION */
size_t hdr_size; /* Size of object header to request */
herr_t ret_value = SUCCEED; /* Return value */
@@ -89,9 +97,12 @@ H5G_obj_create(H5F_t *f, hid_t dxpl_id, H5O_ginfo_t *ginfo, H5O_loc_t *oloc/*out
* Check arguments.
*/
HDassert(f);
+#ifdef H5_GROUP_REVISION
HDassert(ginfo);
+#endif /* H5_GROUP_REVISION */
HDassert(oloc);
+#ifdef H5_GROUP_REVISION
/* Initialize message information */
linfo.nlinks = 0;
@@ -111,6 +122,9 @@ H5G_obj_create(H5F_t *f, hid_t dxpl_id, H5O_ginfo_t *ginfo, H5O_loc_t *oloc/*out
hdr_size = linfo_size +
ginfo_size +
(ginfo->est_num_entries * (link_size + ginfo->est_name_len));
+#else /* H5_GROUP_REVISION */
+ hdr_size = 4 + 2 * H5F_SIZEOF_ADDR(f);
+#endif /* H5_GROUP_REVISION */
/*
* Create symbol table object header. It has a zero link count
@@ -120,6 +134,7 @@ H5G_obj_create(H5F_t *f, hid_t dxpl_id, H5O_ginfo_t *ginfo, H5O_loc_t *oloc/*out
if(H5O_create(f, dxpl_id, hdr_size, oloc/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create header")
+#ifdef H5_GROUP_REVISION
/* Insert link info message */
if(H5O_modify(oloc, H5O_LINFO_ID, H5O_NEW_MESG, 0, 0, &linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
@@ -127,6 +142,16 @@ H5G_obj_create(H5F_t *f, hid_t dxpl_id, H5O_ginfo_t *ginfo, H5O_loc_t *oloc/*out
/* Insert group info message */
if(H5O_modify(oloc, H5O_GINFO_ID, H5O_NEW_MESG, H5O_FLAG_CONSTANT, H5O_UPDATE_TIME, ginfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create message")
+#else /* H5_GROUP_REVISION */
+ {
+ H5O_stab_t stab; /* Symbol table message */
+
+ /* The group doesn't currently have a 'stab' message, go create one */
+ if(H5G_stab_create(oloc, &stab, dxpl_id) < 0)
+ HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create symbol table")
+
+ }
+#endif /* H5_GROUP_REVISION */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -222,6 +247,7 @@ H5G_obj_ent_encode(H5F_t *f, uint8_t **pp, const H5O_loc_t *oloc)
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5G_obj_ent_encode() */
+#ifdef H5_GROUP_REVISION
/*-------------------------------------------------------------------------
* Function: H5G_obj_link_to_stab_cb
@@ -263,6 +289,7 @@ H5G_obj_link_to_stab_cb(const void *_mesg, unsigned UNUSED idx, void *_udata)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5G_obj_link_to_stab_cb() */
+#endif /* H5_GROUP_REVISION */
/*-------------------------------------------------------------------------
@@ -285,9 +312,11 @@ herr_t
H5G_obj_insert(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
hbool_t inc_link, hid_t dxpl_id)
{
+#ifdef H5_GROUP_REVISION
H5O_linfo_t linfo; /* Link info message */
htri_t linfo_exists; /* Whether the link info is present */
hbool_t use_stab; /* Whether to use symbol table for insertions or not */
+#endif /* H5_GROUP_REVISION */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_obj_insert, FAIL)
@@ -297,6 +326,7 @@ H5G_obj_insert(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
HDassert(name && *name);
HDassert(obj_lnk);
+#ifdef H5_GROUP_REVISION
/* Check if we have information about the number of objects in this group */
if((linfo_exists = H5O_exists(grp_oloc, H5O_LINFO_ID, 0, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for link info")
@@ -358,12 +388,16 @@ H5G_obj_insert(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
} /* end if */
else
use_stab = TRUE;
+#endif /* H5_GROUP_REVISION */
/* Insert into symbol table or create link object */
+#ifdef H5_GROUP_REVISION
if(use_stab) {
+#endif /* H5_GROUP_REVISION */
/* Insert into symbol table */
if(H5G_stab_insert(grp_oloc, name, obj_lnk, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINSERT, FAIL, "unable to insert entry")
+#ifdef H5_GROUP_REVISION
} /* end if */
else {
/* Insert with link message */
@@ -377,6 +411,7 @@ H5G_obj_insert(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *obj_lnk,
if(H5O_modify(grp_oloc, H5O_LINFO_ID, 0, 0, H5O_UPDATE_TIME, &linfo, dxpl_id) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "can't update link info message")
} /* end if */
+#endif /* H5_GROUP_REVISION */
/* Increment link count on object, if appropriate */
if(inc_link) {
@@ -415,7 +450,9 @@ herr_t
H5G_obj_iterate(hid_t loc_id, const char *name, int skip, int *last_obj,
H5G_iterate_t op, void *op_data, hid_t dxpl_id)
{
+#ifdef H5_GROUP_REVISION
htri_t stab_exists; /* Whether the symbol table info is present */
+#endif /* H5_GROUP_REVISION */
hid_t gid = -1; /* ID of group to iterate over */
H5G_t *grp; /* Pointer to group data structure to iterate over */
herr_t ret_value; /* Return value */
@@ -436,6 +473,7 @@ H5G_obj_iterate(hid_t loc_id, const char *name, int skip, int *last_obj,
if((grp = H5I_object(gid)) == NULL)
HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "bad group ID")
+#ifdef H5_GROUP_REVISION
/* Check if we have information about the number of objects in this group */
if((stab_exists = H5O_exists(&(grp->oloc), H5O_STAB_ID, 0, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for symbol table")
@@ -447,10 +485,13 @@ H5G_obj_iterate(hid_t loc_id, const char *name, int skip, int *last_obj,
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over links")
} /* end if */
else {
+#endif /* H5_GROUP_REVISION */
/* Iterate over symbol table */
if((ret_value = H5G_stab_iterate(&(grp->oloc), gid, skip, last_obj, op, op_data, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_BADITER, FAIL, "can't iterate over symbol table")
+#ifdef H5_GROUP_REVISION
} /* end else */
+#endif /* H5_GROUP_REVISION */
done:
if(gid > 0)
@@ -476,7 +517,9 @@ done:
herr_t
H5G_obj_count(H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id)
{
+#ifdef H5_GROUP_REVISION
htri_t linfo_exists; /* Whether the link info is present */
+#endif /* H5_GROUP_REVISION */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_obj_count, FAIL)
@@ -485,6 +528,7 @@ H5G_obj_count(H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id)
HDassert(oloc);
HDassert(num_objs);
+#ifdef H5_GROUP_REVISION
/* Check if we have information about the number of objects in this group */
if((linfo_exists = H5O_exists(oloc, H5O_LINFO_ID, 0, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for link info")
@@ -501,10 +545,13 @@ H5G_obj_count(H5O_loc_t *oloc, hsize_t *num_objs, hid_t dxpl_id)
*num_objs = linfo.nlinks;
} /* end if */
else {
+#endif /* H5_GROUP_REVISION */
/* Get the number of objects in this group by iterating over symbol table */
if(H5G_stab_count(oloc, num_objs, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOUNT, FAIL, "can't count objects")
+#ifdef H5_GROUP_REVISION
} /* end else */
+#endif /* H5_GROUP_REVISION */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -529,7 +576,9 @@ done:
ssize_t
H5G_obj_get_name_by_idx(H5O_loc_t *oloc, hsize_t idx, char* name, size_t size, hid_t dxpl_id)
{
+#ifdef H5_GROUP_REVISION
htri_t stab_exists; /* Whether the symbol table info is present */
+#endif /* H5_GROUP_REVISION */
ssize_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5G_obj_get_name_by_idx, FAIL)
@@ -537,6 +586,7 @@ H5G_obj_get_name_by_idx(H5O_loc_t *oloc, hsize_t idx, char* name, size_t size, h
/* Sanity check */
HDassert(oloc);
+#ifdef H5_GROUP_REVISION
/* Check if we have information about the number of objects in this group */
if((stab_exists = H5O_exists(oloc, H5O_STAB_ID, 0, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for symbol table")
@@ -548,10 +598,13 @@ H5G_obj_get_name_by_idx(H5O_loc_t *oloc, hsize_t idx, char* name, size_t size, h
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name")
} /* end if */
else {
+#endif /* H5_GROUP_REVISION */
/* Get the object's name from the symbol table */
if((ret_value = H5G_stab_get_name_by_idx(oloc, idx, name, size, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate name")
+#ifdef H5_GROUP_REVISION
} /* end else */
+#endif /* H5_GROUP_REVISION */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -576,7 +629,9 @@ done:
H5G_obj_t
H5G_obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
{
+#ifdef H5_GROUP_REVISION
htri_t stab_exists; /* Whether the symbol table info is present */
+#endif /* H5_GROUP_REVISION */
H5G_obj_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5G_obj_get_type_by_idx, H5G_UNKNOWN)
@@ -584,6 +639,7 @@ H5G_obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
/* Sanity check */
HDassert(oloc);
+#ifdef H5_GROUP_REVISION
/* Check if we have information about the number of objects in this group */
if((stab_exists = H5O_exists(oloc, H5O_STAB_ID, 0, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "unable to check for symbol table")
@@ -595,10 +651,13 @@ H5G_obj_get_type_by_idx(H5O_loc_t *oloc, hsize_t idx, hid_t dxpl_id)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "can't locate type")
} /* end if */
else {
+#endif /* H5_GROUP_REVISION */
/* Get the object's type from the symbol table */
if((ret_value = H5G_stab_get_type_by_idx(oloc, idx, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, H5G_UNKNOWN, "can't locate type")
+#ifdef H5_GROUP_REVISION
} /* end else */
+#endif /* H5_GROUP_REVISION */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -623,10 +682,12 @@ done:
herr_t
H5G_obj_remove(H5O_loc_t *oloc, const char *name, H5G_obj_t *obj_type, hid_t dxpl_id)
{
+#ifdef H5_GROUP_REVISION
htri_t linfo_exists; /* Whether the link info is present */
H5O_linfo_t linfo; /* Link info message */
htri_t stab_exists; /* Whether the symbol table info is present */
hbool_t use_stab; /* Whether to use symbol table for deletions or not */
+#endif /* H5_GROUP_REVISION */
H5G_obj_t ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5G_obj_remove, FAIL)
@@ -635,6 +696,7 @@ H5G_obj_remove(H5O_loc_t *oloc, const char *name, H5G_obj_t *obj_type, hid_t dxp
HDassert(oloc);
HDassert(obj_type);
+#ifdef H5_GROUP_REVISION
/* Check if we have information about the number of objects in this group */
if((stab_exists = H5O_exists(oloc, H5O_STAB_ID, 0, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for symbol table")
@@ -729,19 +791,25 @@ H5G_obj_remove(H5O_loc_t *oloc, const char *name, H5G_obj_t *obj_type, hid_t dxp
} /* end if */
else
use_stab = TRUE;
+#endif /* H5_GROUP_REVISION */
/* If the symbol table doesn't exist, search link messages */
+#ifdef H5_GROUP_REVISION
if(!use_stab) {
/* Remove object from the link messages */
if((ret_value = H5G_link_remove(oloc, name, obj_type, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
} /* end if */
else {
+#endif /* H5_GROUP_REVISION */
/* Remove object from the symbol table */
if((ret_value = H5G_stab_remove(oloc, name, obj_type, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't remove object")
+#ifdef H5_GROUP_REVISION
} /* end else */
+#endif /* H5_GROUP_REVISION */
+#ifdef H5_GROUP_REVISION
/* Decrement the number of objects in this group */
if(linfo_exists) {
linfo.nlinks--;
@@ -754,6 +822,7 @@ H5G_obj_remove(H5O_loc_t *oloc, const char *name, H5G_obj_t *obj_type, hid_t dxp
HGOTO_ERROR(H5E_SYM, H5E_CANTDELETE, FAIL, "unable to delete symbol table message")
} /* end if */
} /* end if */
+#endif /* H5_GROUP_REVISION */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -777,7 +846,9 @@ herr_t
H5G_obj_lookup(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
hid_t dxpl_id)
{
+#ifdef H5_GROUP_REVISION
htri_t stab_exists; /* Whether the symbol table info is present */
+#endif /* H5_GROUP_REVISION */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_NOAPI(H5G_obj_lookup, FAIL)
@@ -786,6 +857,7 @@ H5G_obj_lookup(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
HDassert(grp_oloc && grp_oloc->file);
HDassert(name && *name);
+#ifdef H5_GROUP_REVISION
/* Check if we have information about the number of objects in this group */
if((stab_exists = H5O_exists(grp_oloc, H5O_STAB_ID, 0, dxpl_id)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "unable to check for symbol table")
@@ -797,10 +869,13 @@ H5G_obj_lookup(H5O_loc_t *grp_oloc, const char *name, H5O_link_t *lnk,
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
} /* end if */
else {
+#endif /* H5_GROUP_REVISION */
/* Get the object's info from the symbol table */
if(H5G_stab_lookup(grp_oloc, name, lnk, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "can't locate object")
+#ifdef H5_GROUP_REVISION
} /* end else */
+#endif /* H5_GROUP_REVISION */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -835,8 +910,16 @@ H5G_obj_find_cb(H5G_loc_t UNUSED *grp_loc/*in*/, const char UNUSED *name, const
HGOTO_ERROR(H5E_SYM, H5E_NOTFOUND, FAIL, "name doesn't exist")
/* Copy link information */
+#ifdef H5_GROUP_REVISION
if(H5O_copy(H5O_LINK_ID, lnk, udata->lnk) == NULL)
HGOTO_ERROR(H5E_SYM, H5E_CANTCOPY, H5O_ITER_ERROR, "can't copy link message")
+#else /* H5_GROUP_REVISION */
+ *udata->lnk = *lnk;
+ HDassert(lnk->name);
+ udata->lnk->name = H5MM_xstrdup(lnk->name);
+ if(lnk->type == H5G_LINK_SOFT)
+ udata->lnk->u.soft.name = H5MM_xstrdup(lnk->u.soft.name);
+#endif /* H5_GROUP_REVISION */
} /* end if */
/* Copy object location for object */
diff --git a/src/H5Goh.c b/src/H5Goh.c
index c51a493..08d1b25 100644
--- a/src/H5Goh.c
+++ b/src/H5Goh.c
@@ -81,7 +81,9 @@ htri_t
H5O_group_isa(struct H5O_t *oh)
{
htri_t stab_exists; /* Whether the 'stab' message is in the object header */
+#ifdef H5_GROUP_REVISION
htri_t linfo_exists; /* Whether the 'linfo' message is in the object header */
+#endif /* H5_GROUP_REVISION */
htri_t ret_value; /* Return value */
FUNC_ENTER_NOAPI_NOINIT(H5O_group_isa)
@@ -91,10 +93,16 @@ H5O_group_isa(struct H5O_t *oh)
/* Check for any of the messages that indicate a group */
if((stab_exists = H5O_exists_oh(oh, H5O_STAB_ID, 0)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+#ifdef H5_GROUP_REVISION
if((linfo_exists = H5O_exists_oh(oh, H5O_LINFO_ID, 0)) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to read object header")
+#endif /* H5_GROUP_REVISION */
+#ifdef H5_GROUP_REVISION
ret_value = (stab_exists > 0 || linfo_exists > 0);
+#else /* H5_GROUP_REVISION */
+ ret_value = stab_exists > 0;
+#endif /* H5_GROUP_REVISION */
done:
FUNC_LEAVE_NOAPI(ret_value)
diff --git a/src/H5Gpkg.h b/src/H5Gpkg.h
index 19d1de4..c8db6e3 100644
--- a/src/H5Gpkg.h
+++ b/src/H5Gpkg.h
@@ -331,8 +331,10 @@ H5_DLL int H5G_node_type(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t a
const void *_rt_key, void *_udata);
H5_DLL int H5G_node_copy(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
const void *_rt_key, void *_udata);
+#ifdef H5_GROUP_REVISION
H5_DLL int H5G_node_stab_convert(H5F_t *f, hid_t dxpl_id, const void *_lt_key, haddr_t addr,
const void *_rt_key, void *_udata);
+#endif /* H5_GROUP_REVISION */
/* Functions that understand link messages */
/* forward reference for later use */
@@ -353,7 +355,10 @@ H5_DLL herr_t H5G_link_lookup(H5O_loc_t *grp_oloc, const char *name,
H5O_link_t *lnk, hid_t dxpl_id);
/* Functions that understand objects */
-H5_DLL herr_t H5G_obj_create(H5F_t *f, hid_t dxpl_id, H5O_ginfo_t *ginfo,
+H5_DLL herr_t H5G_obj_create(H5F_t *f, hid_t dxpl_id,
+#ifdef H5_GROUP_REVISION
+ H5O_ginfo_t *ginfo,
+#endif /* H5_GROUP_REVISION */
H5O_loc_t *oloc/*out*/);
H5_DLL herr_t H5G_obj_insert(H5O_loc_t *grp_oloc, const char *name,
H5O_link_t *obj_lnk, hbool_t inc_link, hid_t dxpl_id);
diff --git a/src/H5Gpublic.h b/src/H5Gpublic.h
index b9f0095..0a264e5 100644
--- a/src/H5Gpublic.h
+++ b/src/H5Gpublic.h
@@ -131,9 +131,11 @@ H5_DLL herr_t H5Gset_comment(hid_t loc_id, const char *name,
const char *comment);
H5_DLL int H5Gget_comment(hid_t loc_id, const char *name, size_t bufsize,
char *buf);
+#ifdef H5_GROUP_REVISION
H5_DLL hid_t H5Gcreate_expand(hid_t loc_id, const char *name, hid_t gcpl_id,
hid_t gapl_id);
H5_DLL hid_t H5Gget_create_plist(hid_t group_id);
+#endif /* H5_GROUP_REVISION */
H5_DLL herr_t H5Gcopy(hid_t src_loc_id, const char *src_name, hid_t dst_loc_id,
const char *dst_name, hid_t plist_id);
diff --git a/src/H5Gstab.c b/src/H5Gstab.c
index 926ff7f..3491f51 100644
--- a/src/H5Gstab.c
+++ b/src/H5Gstab.c
@@ -157,8 +157,10 @@ done:
herr_t
H5G_stab_create(H5O_loc_t *grp_oloc, H5O_stab_t *stab, hid_t dxpl_id)
{
+#ifdef H5_GROUP_REVISION
H5O_ginfo_t ginfo; /* Group info message */
size_t heap_hint; /* Local heap size hint */
+#endif /* H5_GROUP_REVISION */
size_t size_hint; /* Local heap size hint */
herr_t ret_value = SUCCEED; /* Return value */
@@ -170,6 +172,7 @@ H5G_stab_create(H5O_loc_t *grp_oloc, H5O_stab_t *stab, hid_t dxpl_id)
HDassert(grp_oloc);
HDassert(stab);
+#ifdef H5_GROUP_REVISION
/* Get the group info */
if(NULL == H5O_read(grp_oloc, H5O_GINFO_ID, 0, &ginfo, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info")
@@ -180,6 +183,9 @@ H5G_stab_create(H5O_loc_t *grp_oloc, H5O_stab_t *stab, hid_t dxpl_id)
else
heap_hint = ginfo.lheap_size_hint;
size_hint = MAX(heap_hint, H5HL_SIZEOF_FREE(grp_oloc->file) + 2);
+#else /* H5_GROUP_REVISION */
+ size_hint = 4 * (H5HL_SIZEOF_FREE(grp_oloc->file) + 2);
+#endif /* H5_GROUP_REVISION */
if(H5G_stab_create_components(grp_oloc->file, stab, size_hint, dxpl_id) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "can't create symbol table components")
diff --git a/src/H5Gtest.c b/src/H5Gtest.c
index 83f561e..262a925 100644
--- a/src/H5Gtest.c
+++ b/src/H5Gtest.c
@@ -29,6 +29,7 @@
#include "H5HLprivate.h" /* Local Heaps */
#include "H5Iprivate.h" /* IDs */
+#ifdef H5_GROUP_REVISION
/*--------------------------------------------------------------------------
NAME
@@ -184,6 +185,7 @@ H5G_has_stab_test(hid_t gid)
done:
FUNC_LEAVE_NOAPI(ret_value)
} /* H5G_has_stab_test() */
+#endif /* H5_GROUP_REVISION */
/*--------------------------------------------------------------------------
diff --git a/src/H5Gtraverse.c b/src/H5Gtraverse.c
index 60ab54b..1df90d1 100644
--- a/src/H5Gtraverse.c
+++ b/src/H5Gtraverse.c
@@ -397,7 +397,14 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
/* If there's valid information in the link, reset it */
if(link_valid) {
+#ifdef H5_GROUP_REVISION
H5O_reset(H5O_LINK_ID, &lnk);
+#else /* H5_GROUP_REVISION */
+ /* Free information for link (but don't free link pointer) */
+ if(lnk.type == H5G_LINK_SOFT)
+ lnk.u.soft.name = H5MM_xfree(lnk.u.soft.name);
+ lnk.name = H5MM_xfree(lnk.name);
+#endif /* H5_GROUP_REVISION */
link_valid = FALSE;
} /* end if */
@@ -479,15 +486,21 @@ H5G_traverse_real(const H5G_loc_t *_loc, const char *name, unsigned target,
if(lookup_status < 0) {
/* If an intermediate group doesn't exist & flag is set, create the group */
if(target & H5G_CRT_INTMD_GROUP) {
+#ifdef H5_GROUP_REVISION
H5O_ginfo_t ginfo; /* Group info message for parent group */
/* Get the group info for parent group */
if(NULL == H5O_read(grp_loc.oloc, H5O_GINFO_ID, 0, &ginfo, dxpl_id))
HGOTO_ERROR(H5E_SYM, H5E_BADMESG, FAIL, "can't get group info")
+#endif /* H5_GROUP_REVISION */
/* Create the intermediate group */
/* XXX: Should we allow user to control the group creation params here? -QAK */
- if(H5G_obj_create(grp_oloc.file, dxpl_id, &ginfo, obj_loc.oloc/*out*/) < 0)
+ if(H5G_obj_create(grp_oloc.file, dxpl_id,
+#ifdef H5_GROUP_REVISION
+ &ginfo,
+#endif /* H5_GROUP_REVISION */
+ obj_loc.oloc/*out*/) < 0)
HGOTO_ERROR(H5E_SYM, H5E_CANTINIT, FAIL, "unable to create group entry")
/* Insert new group into current group's symbol table */
@@ -534,8 +547,16 @@ done:
if(obj_loc_valid)
H5G_loc_free(&obj_loc);
/* If there's valid information in the link, reset it */
- if(link_valid)
+ if(link_valid) {
+#ifdef H5_GROUP_REVISION
H5O_reset(H5O_LINK_ID, &lnk);
+#else /* H5_GROUP_REVISION */
+ /* Free information for link (but don't free link pointer) */
+ if(lnk.type == H5G_LINK_SOFT)
+ lnk.u.soft.name = H5MM_xfree(lnk.u.soft.name);
+ lnk.name = H5MM_xfree(lnk.name);
+#endif /* H5_GROUP_REVISION */
+ } /* end if */
/* If we copied something into the group location, free it */
if(group_copy)
H5G_loc_free(&grp_loc);
diff --git a/src/H5O.c b/src/H5O.c
index a52dca6..632337d 100644
--- a/src/H5O.c
+++ b/src/H5O.c
@@ -102,11 +102,19 @@ typedef struct H5O_addr_map_t {
const H5O_msg_class_t *const H5O_msg_class_g[] = {
H5O_MSG_NULL, /*0x0000 Null */
H5O_MSG_SDSPACE, /*0x0001 Simple Dimensionality */
+#ifdef H5_GROUP_REVISION
H5O_MSG_LINFO, /*0x0002 Link information */
+#else /* H5_GROUP_REVISION */
+ NULL,
+#endif /* H5_GROUP_REVISION */
H5O_MSG_DTYPE, /*0x0003 Data Type */
H5O_MSG_FILL, /*0x0004 Old data storage -- fill value */
H5O_MSG_FILL_NEW, /*0x0005 New Data storage -- fill value */
+#ifdef H5_GROUP_REVISION
H5O_MSG_LINK, /*0x0006 Link */
+#else /* H5_GROUP_REVISION */
+ NULL,
+#endif /* H5_GROUP_REVISION */
H5O_MSG_EFL, /*0x0007 Data storage -- external data files */
H5O_MSG_LAYOUT, /*0x0008 Data Layout */
#ifdef H5O_ENABLE_BOGUS
@@ -114,7 +122,11 @@ const H5O_msg_class_t *const H5O_msg_class_g[] = {
#else /* H5O_ENABLE_BOGUS */
NULL, /*0x0009 "Bogus" */
#endif /* H5O_ENABLE_BOGUS */
+#ifdef H5_GROUP_REVISION
H5O_MSG_GINFO, /*0x000A Group Information */
+#else /* H5_GROUP_REVISION */
+ NULL,
+#endif /* H5_GROUP_REVISION */
H5O_MSG_PLINE, /*0x000B Data storage -- filter pipeline */
H5O_MSG_ATTR, /*0x000C Attribute list */
H5O_MSG_NAME, /*0x000D Object name */
@@ -2894,11 +2906,13 @@ H5O_alloc_new_chunk(H5F_t *f,
(found_attr < 0 ||
oh->mesg[u].raw_size < oh->mesg[found_attr].raw_size))
found_attr = u;
+#ifdef H5_GROUP_REVISION
} else if(H5O_LINK_ID == msg_id) {
if(oh->mesg[u].raw_size >= cont_size &&
(found_link < 0 ||
oh->mesg[u].raw_size < oh->mesg[found_link].raw_size))
found_link = u;
+#endif /* H5_GROUP_REVISION */
} else {
if(oh->mesg[u].raw_size >= cont_size &&
(found_other < 0 ||
diff --git a/src/H5Oginfo.c b/src/H5Oginfo.c
index 10bde6d..63e8b39 100644
--- a/src/H5Oginfo.c
+++ b/src/H5Oginfo.c
@@ -33,6 +33,7 @@
#include "H5Opkg.h" /* Object headers */
+#ifdef H5_GROUP_REVISION
/* PRIVATE PROTOTYPES */
static void *H5O_ginfo_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p);
static herr_t H5O_ginfo_encode(H5F_t *f, uint8_t *p, const void *_mesg);
@@ -331,5 +332,5 @@ H5O_ginfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_ginfo_debug() */
-
+#endif /* H5_GROUP_REVISION */
diff --git a/src/H5Olinfo.c b/src/H5Olinfo.c
index 11699b7..a14be2a 100644
--- a/src/H5Olinfo.c
+++ b/src/H5Olinfo.c
@@ -33,6 +33,7 @@
#include "H5Opkg.h" /* Object headers */
+#ifdef H5_GROUP_REVISION
/* PRIVATE PROTOTYPES */
static void *H5O_linfo_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p);
static herr_t H5O_linfo_encode(H5F_t *f, uint8_t *p, const void *_mesg);
@@ -299,4 +300,5 @@ H5O_linfo_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_linfo_debug() */
+#endif /* H5_GROUP_REVISION */
diff --git a/src/H5Olink.c b/src/H5Olink.c
index 88ccabc..464f96b 100644
--- a/src/H5Olink.c
+++ b/src/H5Olink.c
@@ -34,6 +34,7 @@
#include "H5Opkg.h" /* Object headers */
+#ifdef H5_GROUP_REVISION
/* PRIVATE PROTOTYPES */
static void *H5O_link_decode(H5F_t *f, hid_t dxpl_id, const uint8_t *p);
static herr_t H5O_link_encode(H5F_t *f, uint8_t *p, const void *_mesg);
@@ -668,4 +669,5 @@ H5O_link_debug(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, const void *_mesg, FILE *
FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5O_link_debug() */
+#endif /* H5_GROUP_REVISION */
diff --git a/src/H5Oprivate.h b/src/H5Oprivate.h
index c087fe1..a0f2bbd 100644
--- a/src/H5Oprivate.h
+++ b/src/H5Oprivate.h
@@ -68,15 +68,21 @@ typedef struct H5O_loc_t {
/* Header message IDs */
#define H5O_NULL_ID 0x0000 /* Null Message. */
#define H5O_SDSPACE_ID 0x0001 /* Simple Dataspace Message. */
+#ifdef H5_GROUP_REVISION
#define H5O_LINFO_ID 0x0002 /* Link Info Message. */
+#endif /* H5_GROUP_REVISION */
#define H5O_DTYPE_ID 0x0003 /* Datatype Message. */
#define H5O_FILL_ID 0x0004 /* Fill Value Message. (Old) */
#define H5O_FILL_NEW_ID 0x0005 /* Fill Value Message. (New) */
+#ifdef H5_GROUP_REVISION
#define H5O_LINK_ID 0x0006 /* Link Message. */
+#endif /* H5_GROUP_REVISION */
#define H5O_EFL_ID 0x0007 /* External File List Message */
#define H5O_LAYOUT_ID 0x0008 /* Data Storage Layout Message. */
#define H5O_BOGUS_ID 0x0009 /* "Bogus" Message. */
+#ifdef H5_GROUP_REVISION
#define H5O_GINFO_ID 0x000a /* Group Info Message. */
+#endif /* H5_GROUP_REVISION */
#define H5O_PLINE_ID 0x000b /* Filter pipeline message. */
#define H5O_ATTR_ID 0x000c /* Attribute Message. */
#define H5O_NAME_ID 0x000d /* Object name message. */
@@ -86,6 +92,7 @@ typedef struct H5O_loc_t {
#define H5O_STAB_ID 0x0011 /* Symbol table message. */
#define H5O_MTIME_NEW_ID 0x0012 /* Modification time message. (New) */
+#ifdef H5_GROUP_REVISION
/*
* Link Info Message.
* (Data structure in memory)
@@ -93,6 +100,7 @@ typedef struct H5O_loc_t {
typedef struct H5O_linfo_t {
hsize_t nlinks; /* Number of links in the group */
} H5O_linfo_t;
+#endif /* H5_GROUP_REVISION */
/*
* Fill Value Message. (Old)
diff --git a/src/H5Pacpl.c b/src/H5Pacpl.c
index a8603be..7f86def 100644
--- a/src/H5Pacpl.c
+++ b/src/H5Pacpl.c
@@ -25,6 +25,7 @@
/* Static function prototypes */
+#ifdef H5_GROUP_REVISION
/*-------------------------------------------------------------------------
* Function: H5Pset_char_encoding
@@ -98,3 +99,5 @@ H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/)
done:
FUNC_LEAVE_API(ret_value);
} /* end H5Pget_create_intermediate_group() */
+#endif /* H5_GROUP_REVISION */
+
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index b7f6c15..6e883e5 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -24,6 +24,7 @@
/* Static function prototypes */
+#ifdef H5_GROUP_REVISION
/*-------------------------------------------------------------------------
* Function: H5Pset_local_heap_size_hint
@@ -291,4 +292,5 @@ H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /*out*/, unsigned
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_est_link_info() */
+#endif /* H5_GROUP_REVISION */
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c
index e0bf371..b00d314 100755
--- a/src/H5Pocpl.c
+++ b/src/H5Pocpl.c
@@ -24,6 +24,7 @@
/* Static function prototypes */
+#ifdef H5_GROUP_REVISION
/*-------------------------------------------------------------------------
* Function: H5Pset_create_intermediate_group
@@ -108,6 +109,7 @@ H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd_group /*out
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Pget_create_intermediate_group() */
+#endif /* H5_GROUP_REVISION */
/*-------------------------------------------------------------------------
@@ -138,6 +140,7 @@ H5Pset_copy_object(hid_t plist_id, unsigned cpy_option)
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(H5Pset_copy_object, FAIL)
+ H5TRACE2("e","iIu",plist_id,cpy_option);
/* Check parameters */
if(cpy_option & ~H5G_COPY_ALL)
@@ -175,6 +178,7 @@ H5Pget_copy_object(hid_t plist_id, unsigned *cpy_option /*out*/)
herr_t ret_value = SUCCEED; /* return value */
FUNC_ENTER_API(H5Pget_copy_object, FAIL)
+ H5TRACE2("e","ix",plist_id,cpy_option);
/* Get the plist structure */
if(NULL == (plist = H5P_object_verify(plist_id, H5P_OBJECT_COPY)))
diff --git a/src/H5Ppublic.h b/src/H5Ppublic.h
index aec051c..d87cc48 100644
--- a/src/H5Ppublic.h
+++ b/src/H5Ppublic.h
@@ -337,6 +337,7 @@ H5_DLL herr_t H5Premove_filter(hid_t plist_id, H5Z_filter_t filter);
H5_DLL herr_t H5Pset_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t op, void* operate_data);
H5_DLL herr_t H5Pget_type_conv_cb(hid_t dxpl_id, H5T_conv_except_func_t *op, void** operate_data);
+#ifdef H5_GROUP_REVISION
H5_DLL herr_t H5Pset_create_intermediate_group(hid_t plist_id, unsigned crt_intmd);
H5_DLL herr_t H5Pget_create_intermediate_group(hid_t plist_id, unsigned *crt_intmd /*out*/);
@@ -349,6 +350,7 @@ H5_DLL herr_t H5Pget_est_link_info(hid_t plist_id, unsigned *est_num_entries /*
H5_DLL herr_t H5Pset_char_encoding(hid_t plist_id, H5T_cset_t encoding);
H5_DLL herr_t H5Pget_char_encoding(hid_t plist_id, H5T_cset_t *encoding /*out*/);
+#endif /* H5_GROUP_REVISION */
H5_DLL herr_t H5Pset_copy_object(hid_t plist_id, unsigned crt_intmd);
H5_DLL herr_t H5Pget_copy_object(hid_t plist_id, unsigned *crt_intmd /*out*/);
diff --git a/src/H5Tcommit.c b/src/H5Tcommit.c
index 3866db1..5b19201 100644
--- a/src/H5Tcommit.c
+++ b/src/H5Tcommit.c
@@ -99,6 +99,7 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcommit() */
+#ifdef H5_GROUP_REVISION
/*-------------------------------------------------------------------------
* Function: H5Tcommit_expand
@@ -141,7 +142,7 @@ H5Tcommit_expand(hid_t loc_id, const char *name, hid_t type_id, hid_t tcpl_id, h
#ifdef LATER
/* Get correct property list */
- if(H5P_DEFAULT == tcpl_id)
+ if(H5P_DEFAULT == tapl_id)
tapl_id = H5P_DATATYPE_ACCESS_DEFAULT;
else
if(TRUE != H5P_isa_class(tapl_id, H5P_DATATYPE_ACCESS))
@@ -155,6 +156,7 @@ H5Tcommit_expand(hid_t loc_id, const char *name, hid_t type_id, hid_t tcpl_id, h
done:
FUNC_LEAVE_API(ret_value)
} /* end H5Tcommit_expand() */
+#endif /* H5_GROUP_REVISION */
/*-------------------------------------------------------------------------
diff --git a/src/H5Tpublic.h b/src/H5Tpublic.h
index 18ba136..a4846dd 100644
--- a/src/H5Tpublic.h
+++ b/src/H5Tpublic.h
@@ -503,7 +503,9 @@ H5_DLL herr_t H5Tclose(hid_t type_id);
H5_DLL htri_t H5Tequal(hid_t type1_id, hid_t type2_id);
H5_DLL herr_t H5Tlock(hid_t type_id);
H5_DLL herr_t H5Tcommit(hid_t loc_id, const char *name, hid_t type_id);
+#ifdef H5_GROUP_REVISION
H5_DLL herr_t H5Tcommit_expand(hid_t loc_id, const char *name, hid_t type_id, hid_t tcpl_id, hid_t tapl_id);
+#endif /* H5_GROUP_REVISION */
H5_DLL htri_t H5Tcommitted(hid_t type_id);
H5_DLL herr_t H5Tencode(hid_t obj_id, void *buf, size_t *nalloc);
H5_DLL hid_t H5Tdecode(const void *buf);
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 73ad39a..1ad2692 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -36,6 +36,9 @@
/* Define if gettimeofday() populates the tz pointer passed in */
#undef GETTIMEOFDAY_GIVES_TZ
+/* Define if the group revision code is to be compiled in */
+#undef GROUP_REVISION
+
/* Define to 1 if you have the `alarm' function. */
#undef HAVE_ALARM