summaryrefslogtreecommitdiffstats
path: root/src/H5Opline.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2006-01-28 18:31:22 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2006-01-28 18:31:22 (GMT)
commitd579d6aa5eff6674ae523da1dc35b1bd0d63deee (patch)
tree01876072685ff08728c1504faeec7e451d8af1e8 /src/H5Opline.c
parentdfb1f40cbbe847d25368861c6cc1e60cf6dcb17a (diff)
downloadhdf5-d579d6aa5eff6674ae523da1dc35b1bd0d63deee.zip
hdf5-d579d6aa5eff6674ae523da1dc35b1bd0d63deee.tar.gz
hdf5-d579d6aa5eff6674ae523da1dc35b1bd0d63deee.tar.bz2
[svn-r11899] Purpose:
Bug fix & new feature Description: Support variable-length datatypes in compact data storage and chunked data storage, along with attributes. Bug fix on the H5T_vlen_set_loc to allow for changing the file on a variable-length datatype on disk. Platforms tested: FreeBSD 4.11 (sleipnir) Linux 2.4 Can't h5committest right now, due to missing cache files.
Diffstat (limited to 'src/H5Opline.c')
-rw-r--r--src/H5Opline.c47
1 files changed, 46 insertions, 1 deletions
diff --git a/src/H5Opline.c b/src/H5Opline.c
index 9b6f147..d6e9870 100644
--- a/src/H5Opline.c
+++ b/src/H5Opline.c
@@ -36,6 +36,8 @@ static void *H5O_pline_copy (const void *_mesg, void *_dest, unsigned update_fla
static size_t H5O_pline_size (const H5F_t *f, const void *_mesg);
static herr_t H5O_pline_reset (void *_mesg);
static herr_t H5O_pline_free (void *_mesg);
+static herr_t H5O_pline_pre_copy_file(H5F_t *file_src, void *mesg_src,
+ void *_udata);
static herr_t H5O_pline_debug (H5F_t *f, hid_t dxpl_id, const void *_mesg,
FILE * stream, int indent, int fwidth);
@@ -54,7 +56,7 @@ const H5O_msg_class_t H5O_MSG_PLINE[1] = {{
NULL, /* link method */
NULL, /* get share method */
NULL, /* set share method */
- NULL, /* pre copy native value to file */
+ H5O_pline_pre_copy_file, /* pre copy native value to file */
NULL, /* copy native value to file */
NULL, /* post copy native value to file */
H5O_pline_debug /* debug the message */
@@ -424,6 +426,49 @@ H5O_pline_free (void *mesg)
/*-------------------------------------------------------------------------
+ * Function: H5O_pline_pre_copy_file
+ *
+ * Purpose: Perform any necessary actions before copying message between
+ * files
+ *
+ * Return: Success: Non-negative
+ *
+ * Failure: Negative
+ *
+ * Programmer: Peter Cao
+ * December 27, 2005
+ *
+ *-------------------------------------------------------------------------
+ */
+static herr_t
+H5O_pline_pre_copy_file(H5F_t *file_src, void *mesg_src, void *_udata)
+{
+ H5O_pline_t *pline_src = (H5O_pline_t *)mesg_src; /* Source datatype */
+ H5D_copy_file_ud_t *udata = (H5D_copy_file_ud_t *)_udata; /* Dataset copying user data */
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_NOAPI_NOINIT(H5O_pline_pre_copy_file)
+
+ /* check args */
+ HDassert(file_src);
+ HDassert(pline_src);
+
+ /* If the user data is non-NULL, assume we are copying a dataset
+ * and make a copy of the filter pipeline for later in
+ * the object copying process.
+ */
+ if(udata) {
+ if(NULL == (udata->src_pline = H5O_copy(H5O_PLINE_ID, pline_src, udata->src_pline)))
+ HGOTO_ERROR(H5E_PLINE, H5E_CANTINIT, FAIL, "unable to copy")
+ } /* end if */
+
+done:
+ FUNC_LEAVE_NOAPI(ret_value)
+} /* end H5O_pline_pre_copy_file() */
+
+
+
+/*-------------------------------------------------------------------------
* Function: H5O_pline_debug
*
* Purpose: Prints debugging information for filter pipeline message MESG