summaryrefslogtreecommitdiffstats
path: root/src/H5D.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-05-08 20:09:07 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-05-08 20:09:07 (GMT)
commit390f1d02846803abfd46d30b3bd27894a30698c6 (patch)
treeaa0269135e97f1e92f0c33d970dac519d5025532 /src/H5D.c
parent3fff86acfa11ab756a8f72f3a30478677fb7bcf6 (diff)
downloadhdf5-390f1d02846803abfd46d30b3bd27894a30698c6.zip
hdf5-390f1d02846803abfd46d30b3bd27894a30698c6.tar.gz
hdf5-390f1d02846803abfd46d30b3bd27894a30698c6.tar.bz2
[svn-r6837] Purpose:
Code cleanup. Description: Move many package or internal function prototypes and macro definitions into tighter scope according to their current use. Added more comments where appropriate. Eliminate ancient, unused functions. Added a couple "accessor" functions to get parts of data structures which were moved out of scope. Platforms tested: h5committested
Diffstat (limited to 'src/H5D.c')
-rw-r--r--src/H5D.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/H5D.c b/src/H5D.c
index 1713d71..49df6c3 100644
--- a/src/H5D.c
+++ b/src/H5D.c
@@ -20,7 +20,7 @@
#include "H5FDprivate.h" /* File drivers */
#include "H5FLprivate.h" /* Free Lists */
#include "H5FOprivate.h" /* File objects */
-#include "H5HLprivate.h" /* Name heap */
+#include "H5HLprivate.h" /* Local heaps */
#include "H5Iprivate.h" /* IDs */
#include "H5MMprivate.h" /* Memory management */
#include "H5Sprivate.h" /* Dataspace functions */
@@ -58,6 +58,17 @@ static herr_t H5D_extend(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
static herr_t H5D_set_extent(H5D_t *dataset, const hsize_t *size, hid_t dxpl_id);
static herr_t H5D_close(H5D_t *dataset);
+/* Internal data structure for computing variable-length dataset's total size */
+typedef struct {
+ hid_t dataset_id; /* ID of the dataset we are working on */
+ hid_t fspace_id; /* ID of the file dataset's dataspace we are working on */
+ hid_t mspace_id; /* ID of the memory dataset's dataspace we are working on */
+ void *fl_tbuf; /* Ptr to the temporary buffer we are using for fixed-length data */
+ void *vl_tbuf; /* Ptr to the temporary buffer we are using for VL data */
+ hid_t xfer_pid; /* ID of the dataset xfer property list */
+ hsize_t size; /* Accumulated number of bytes for the selection */
+} H5D_vlen_bufsize_t;
+
/* Declare a free list to manage the H5D_t struct */
H5FL_DEFINE_STATIC(H5D_t);
@@ -2908,7 +2919,7 @@ done:
static void *
H5D_vlen_get_buf_size_alloc(size_t size, void *info)
{
- H5T_vlen_bufsize_t *vlen_bufsize=(H5T_vlen_bufsize_t *)info;
+ H5D_vlen_bufsize_t *vlen_bufsize=(H5D_vlen_bufsize_t *)info;
void *ret_value; /* Return value */
FUNC_ENTER_NOAPI(H5D_vlen_get_buf_size_alloc, NULL);
@@ -2955,7 +2966,7 @@ done:
static herr_t
H5D_vlen_get_buf_size(void UNUSED *elem, hid_t type_id, hsize_t UNUSED ndim, hssize_t *point, void *op_data)
{
- H5T_vlen_bufsize_t *vlen_bufsize=(H5T_vlen_bufsize_t *)op_data;
+ H5D_vlen_bufsize_t *vlen_bufsize=(H5D_vlen_bufsize_t *)op_data;
H5T_t *dt = NULL;
herr_t ret_value=0; /* The correct return value, if this function succeeds */
@@ -3015,7 +3026,7 @@ herr_t
H5Dvlen_get_buf_size(hid_t dataset_id, hid_t type_id, hid_t space_id,
hsize_t *size)
{
- H5T_vlen_bufsize_t vlen_bufsize = {0, 0, 0, 0, 0, 0, 0};
+ H5D_vlen_bufsize_t vlen_bufsize = {0, 0, 0, 0, 0, 0, 0};
char bogus; /* bogus value to pass to H5Diterate() */
H5P_genclass_t *pclass; /* Property class */
H5P_genplist_t *plist; /* Property list */