summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-02-03 17:29:54 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-02-03 17:29:54 (GMT)
commit519b33c5b00b7cb81e7d1d6d808b0923ff16d18c (patch)
tree08585cfd99d214d18c0dd142c8a0d2290b134b2b /src/H5D.c
parent137bc83f7a8f1f552b53a97d21d89269c844a051 (diff)
downloadhdf5-519b33c5b00b7cb81e7d1d6d808b0923ff16d18c.zip
hdf5-519b33c5b00b7cb81e7d1d6d808b0923ff16d18c.tar.gz
hdf5-519b33c5b00b7cb81e7d1d6d808b0923ff16d18c.tar.bz2
[svn-r214] Changes since 19980203
---------------------- ./src/H5C.c ./src/H5Cprivate.h ./src/H5D.c ./src/H5Dpublic.h Added H5Dget_create_parms(), trying to stay one step ahead of Elena ;-)
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 86e7fdb..70d512c 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -409,6 +409,56 @@ H5Dget_type (hid_t dataset_id)
}
/*-------------------------------------------------------------------------
+ * Function: H5Dget_create_parms
+ *
+ * Purpose: Returns a copy of the dataset creation template.
+ *
+ * Return: Success: ID for a copy of the dataset creation
+ * template. The template should be released by
+ * calling H5Cclose().
+ *
+ * Failure: FAIL
+ *
+ * Programmer: Robb Matzke
+ * Tuesday, February 3, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+hid_t
+H5Dget_create_parms (hid_t dataset_id)
+{
+ H5D_t *dataset = NULL;
+ H5D_create_t *copied_parms = NULL;
+ hid_t ret_value = FAIL;
+
+ FUNC_ENTER (H5Dget_create_parms, FAIL);
+
+ /* Check args */
+ if (H5_DATASET!=H5A_group (dataset_id) ||
+ NULL==(dataset=H5A_object (dataset_id))) {
+ HRETURN_ERROR (H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset");
+ }
+
+ /* Copy the creation template */
+ if (NULL==(copied_parms=H5C_copy (H5C_DATASET_CREATE,
+ &(dataset->create_parms)))) {
+ HRETURN_ERROR (H5E_DATASET, H5E_CANTINIT, FAIL,
+ "unable to copy the creation template");
+ }
+
+ /* Create an atom */
+ if ((ret_value=H5A_register ((group_t)(H5_TEMPLATE_0+H5C_DATASET_CREATE),
+ copied_parms))<0) {
+ HRETURN_ERROR (H5E_ATOM, H5E_CANTREGISTER, FAIL,
+ "unable to register creation template");
+ }
+
+ FUNC_LEAVE (ret_value);
+}
+
+/*-------------------------------------------------------------------------
* Function: H5Dread
*
* Purpose: Reads (part of) a DATASET from the file into application