summaryrefslogtreecommitdiffstats
path: root/src/H5Pgcpl.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-10-02 10:24:03 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-10-02 10:24:03 (GMT)
commita6f6462541cc57364586f770131e2ea074d63492 (patch)
tree0debf502fb7d66f9f470edb935a62223945960d4 /src/H5Pgcpl.c
parent9bc29ea538b9ce2013a8cde5be230c18cf052009 (diff)
downloadhdf5-a6f6462541cc57364586f770131e2ea074d63492.zip
hdf5-a6f6462541cc57364586f770131e2ea074d63492.tar.gz
hdf5-a6f6462541cc57364586f770131e2ea074d63492.tar.bz2
[svn-r12700] Alert:
File format is not stable, don't keep files produced! Description: First stage of checkins modifying the format of groups to support creation order. Implement "dense" storage for links in groups. Try to clarify some of the symbols for the H5L API. Add the H5Pset_latest_format() flag for FAPLs, to choose to use the newest file format options (including "dense" link storage in groups) Add the H5Pset_track_creation_order() flag for GCPLs, to enable creation order tracking in groups (although no index on creation order yet). Remove --enable-group-revision configure flag, as file format issues are now handled in a backwardly/forwardly compatible way. Clean up lots of compiler warnings and other minor formatting issues. Tested on: FreeBSD/32 4.11 (sleipnir) w/threadsafe Linux/32 2.4 (heping) w/FORTRAN & C++ Linux/64 2.4 (mir) w/enable-v1.6 compa Mac OSX/32 10.4.8 (amazon) AIX 5.3 (copper) w/parallel & FORTRAN
Diffstat (limited to 'src/H5Pgcpl.c')
-rw-r--r--src/H5Pgcpl.c83
1 files changed, 81 insertions, 2 deletions
diff --git a/src/H5Pgcpl.c b/src/H5Pgcpl.c
index b78bc2b..a97fe42 100644
--- a/src/H5Pgcpl.c
+++ b/src/H5Pgcpl.c
@@ -24,7 +24,6 @@
/* Static function prototypes */
-#ifdef H5_GROUP_REVISION
/*-------------------------------------------------------------------------
* Function: H5Pset_local_heap_size_hint
@@ -292,7 +291,87 @@ 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() */
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pset_creation_order_tracking
+ *
+ * Purpose: Set the flag to track creation order of links in a group
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * September 12, 2006
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pset_creation_order_tracking(hid_t plist_id, hbool_t track_corder)
+{
+ H5P_genplist_t *plist; /* Property list pointer */
+ H5O_ginfo_t ginfo; /* Group information structure */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(H5Pset_creation_order_tracking, FAIL)
+ H5TRACE2("e","ib",plist_id,track_corder);
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Get group info */
+ if(H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info")
+
+ /* Update fields */
+ ginfo.track_corder = track_corder;
+
+ /* Set group info */
+ if(H5P_set(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "can't set group info")
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pset_creation_order_tracking() */
+
+/*-------------------------------------------------------------------------
+ * Function: H5Pget_creation_order_tracking
+ *
+ * Purpose: Returns the flag indicating that creation order is tracked
+ * for links in a group.
+ *
+ * Return: Non-negative on success/Negative on failure
+ *
+ * Programmer: Quincey Koziol
+ * September 12, 2006
+ *-------------------------------------------------------------------------
+ */
+herr_t
+H5Pget_creation_order_tracking(hid_t plist_id, hbool_t *track_corder /*out*/)
+{
+ herr_t ret_value = SUCCEED; /* return value */
-#endif /* H5_GROUP_REVISION */
+ FUNC_ENTER_API(H5Pget_creation_order_tracking, FAIL)
+ H5TRACE2("e","ix",plist_id,track_corder);
+
+ /* Get values */
+ if(track_corder) {
+ H5P_genplist_t *plist; /* Property list pointer */
+ H5O_ginfo_t ginfo; /* Group information structure */
+
+ /* Get the plist structure */
+ if(NULL == (plist = H5P_object_verify(plist_id, H5P_GROUP_CREATE)))
+ HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID")
+
+ /* Get group info */
+ if(H5P_get(plist, H5G_CRT_GROUP_INFO_NAME, &ginfo) < 0)
+ HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "can't get group info")
+
+ if(track_corder)
+ *track_corder = ginfo.track_corder;
+ } /* end if */
+
+done:
+ FUNC_LEAVE_API(ret_value)
+} /* end H5Pget_creation_order_tracking() */