summaryrefslogtreecommitdiffstats
path: root/src/H5Tpkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-08-31 01:48:01 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-08-31 01:48:01 (GMT)
commitf92d7f73df1846f4489fb6e2c2dd857b636b4deb (patch)
tree74d28cd355a39d0d9f8dc0c96484380b6b12628e /src/H5Tpkg.h
parentbd3510bea3638d5f4281bf9a6bbfe4c4a8b3ca9a (diff)
downloadhdf5-f92d7f73df1846f4489fb6e2c2dd857b636b4deb.zip
hdf5-f92d7f73df1846f4489fb6e2c2dd857b636b4deb.tar.gz
hdf5-f92d7f73df1846f4489fb6e2c2dd857b636b4deb.tar.bz2
[svn-r7434] Purpose:
Bug Fix and code cleanup Description: Correct error in H5T_detect_class that was causing nested compound datatypes with to not detect the datatype class of fields correctly, which caused errors with fill-values, variable-length datatypes and chunks later on. Return the rank of the array datatype from H5Tget_array_dims(), like H5Sget_dims(). Lots of cleanups to datatype code, to make the handling of arrays, compound types, variable-length strings and sequences and enumerated types more consistent and robust. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest
Diffstat (limited to 'src/H5Tpkg.h')
-rw-r--r--src/H5Tpkg.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 826bab2..fab832b 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -49,6 +49,12 @@
/* Length of debugging name buffer */
#define H5T_NAMELEN 32
+/* Macro to ease detecting "complex" datatypes (i.e. those with base types or fields) */
+#define H5T_IS_COMPLEX(t) ((t)==H5T_COMPOUND || (t)==H5T_ENUM || (t)==H5T_VLEN || (t)==H5T_ARRAY)
+
+/* Macro to ease detecting fixed or variable-length "string" datatypes */
+#define H5T_IS_STRING(dt) (H5T_STRING == (dt)->type || (H5T_VLEN == (dt)->type && H5T_VLEN_STRING == (dt)->u.vlen.type))
+
/* Statistics about a conversion function */
struct H5T_stats_t {
unsigned ncalls; /*num calls to conversion function */
@@ -113,9 +119,6 @@ typedef struct H5T_compnd_t {
int nalloc; /*num entries allocated in MEMB array*/
int nmembs; /*number of members defined in struct*/
H5T_sort_t sorted; /*how are members sorted? */
- hbool_t has_array; /* Set if this type has an array datatype member */
- /* and should be written with the new version of */
- /* the datatype object header message */
struct H5T_cmemb_t *memb; /*array of struct members */
} H5T_compnd_t;
@@ -305,7 +308,7 @@ H5_DLL herr_t H5T_insert(H5T_t *parent, const char *name, size_t offset,
H5_DLL H5T_t *H5T_enum_create(H5T_t *parent);
H5_DLL herr_t H5T_enum_insert(H5T_t *dt, const char *name, void *value);
H5_DLL int H5T_get_array_ndims(H5T_t *dt);
-H5_DLL herr_t H5T_get_array_dims(H5T_t *dt, hsize_t dims[], int perm[]);
+H5_DLL int H5T_get_array_dims(H5T_t *dt, hsize_t dims[], int perm[]);
H5_DLL herr_t H5T_sort_value(H5T_t *dt, int *map);
H5_DLL herr_t H5T_sort_name(H5T_t *dt, int *map);
H5_DLL herr_t H5T_set_size(H5T_t *dt, size_t size);