summaryrefslogtreecommitdiffstats
path: root/src/H5Tpkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-08-31 01:50:47 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-08-31 01:50:47 (GMT)
commit04137b3a16b829589ab28edfc39ba3092a650521 (patch)
tree093b007cd8488655592e547d5630a7190d99c349 /src/H5Tpkg.h
parent39106425cf1b2a98296350b287a8dbacb926886b (diff)
downloadhdf5-04137b3a16b829589ab28edfc39ba3092a650521.zip
hdf5-04137b3a16b829589ab28edfc39ba3092a650521.tar.gz
hdf5-04137b3a16b829589ab28edfc39ba3092a650521.tar.bz2
[svn-r7435] 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 6fccdba..3ccbd0f 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -47,6 +47,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 */
@@ -118,9 +124,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;
@@ -302,7 +305,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);