summaryrefslogtreecommitdiffstats
path: root/src/H5Tpkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-11-13 15:19:50 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-11-13 15:19:50 (GMT)
commite1792ebb22c1fee3eb349b83543e6e915bd1e6f7 (patch)
tree6e3f936d7809ff0191d17454ba0cb6047abda784 /src/H5Tpkg.h
parent71f3513337e800f6500551448559cecc6853aca9 (diff)
downloadhdf5-e1792ebb22c1fee3eb349b83543e6e915bd1e6f7.zip
hdf5-e1792ebb22c1fee3eb349b83543e6e915bd1e6f7.tar.gz
hdf5-e1792ebb22c1fee3eb349b83543e6e915bd1e6f7.tar.bz2
[svn-r7842] Purpose:
Bug fix Description: Variable length strings and sequences with NULL pointers were not handled by library, causing problems access the data. This also affected fill values for variable-length datatypes. Solution: Address the issues in the library by detecting NULL sequences/strings and avoid trying to convert them. Patched up dumper to display NULL sequences/strings. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest
Diffstat (limited to 'src/H5Tpkg.h')
-rw-r--r--src/H5Tpkg.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index dba89bc..01465ef 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -142,9 +142,11 @@ typedef struct H5T_enum_t {
} H5T_enum_t;
/* VL function pointers */
-typedef hssize_t (*H5T_vlen_getlenfunc_t)(H5F_t *f, void *vl_addr);
-typedef herr_t (*H5T_vlen_readfunc_t)(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *buf, size_t len);
-typedef herr_t (*H5T_vlen_writefunc_t)(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *buf, void *bg_addr, hsize_t seq_len, hsize_t base_size);
+typedef hssize_t (*H5T_vlen_getlenfunc_t)(void *vl_addr);
+typedef htri_t (*H5T_vlen_isnullfunc_t)(H5F_t *f, void *vl_addr);
+typedef herr_t (*H5T_vlen_readfunc_t)(H5F_t *f, hid_t dxpl_id, void *_vl, void *buf, size_t len);
+typedef herr_t (*H5T_vlen_writefunc_t)(H5F_t *f, hid_t dxpl_id, void *_vl, void *buf, void *_bg, hsize_t seq_len, hsize_t base_size);
+typedef herr_t (*H5T_vlen_setnullfunc_t)(H5F_t *f, hid_t dxpl_id, void *_vl, void *_bg);
/* VL types */
typedef enum {
@@ -163,8 +165,10 @@ typedef struct H5T_vlen_t {
* extra bytes */
H5F_t *f; /* File ID (if VL data is on disk) */
H5T_vlen_getlenfunc_t getlen; /* Function to get VL sequence size (in element units, not bytes) */
+ H5T_vlen_isnullfunc_t isnull; /* Function to check if VL value is NIL */
H5T_vlen_readfunc_t read; /* Function to read VL sequence into buffer */
H5T_vlen_writefunc_t write; /* Function to write VL sequence from buffer */
+ H5T_vlen_setnullfunc_t setnull; /* Function to set a VL value to NIL */
} H5T_vlen_t;
/* An opaque datatype */
@@ -859,15 +863,6 @@ H5_DLL htri_t H5T_bit_inc(uint8_t *buf, size_t start, size_t size);
/* VL functions */
H5_DLL H5T_t * H5T_vlen_create(const H5T_t *base);
-H5_DLL hssize_t H5T_vlen_seq_mem_getlen(H5F_t *f, void *vl_addr);
-H5_DLL herr_t H5T_vlen_seq_mem_read(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *_buf, size_t len);
-H5_DLL herr_t H5T_vlen_seq_mem_write(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *_buf, void *bg_addr, hsize_t seq_len, hsize_t base_size);
-H5_DLL hssize_t H5T_vlen_str_mem_getlen(H5F_t *f, void *vl_addr);
-H5_DLL herr_t H5T_vlen_str_mem_read(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *_buf, size_t len);
-H5_DLL herr_t H5T_vlen_str_mem_write(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *_buf, void *bg_addr, hsize_t seq_len, hsize_t base_size);
-H5_DLL hssize_t H5T_vlen_disk_getlen(H5F_t *f, void *vl_addr);
-H5_DLL herr_t H5T_vlen_disk_read(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *_buf, size_t len);
-H5_DLL herr_t H5T_vlen_disk_write(H5F_t *f, hid_t dxpl_id, void *vl_addr, void *_buf, void *bg_addr, hsize_t seq_len, hsize_t base_size);
H5_DLL htri_t H5T_vlen_set_loc(H5T_t *dt, H5F_t *f, H5T_loc_t loc);
/* Array functions */