summaryrefslogtreecommitdiffstats
path: root/src/H5Tpkg.h
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2008-09-10 19:10:41 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2008-09-10 19:10:41 (GMT)
commitc465e18a68f2a77550d93366a5b6c8fac2e24502 (patch)
treebd3649f75f1507040b68d8e15c63333600816360 /src/H5Tpkg.h
parent068620ea815d8590982069cfb6374e07d3c8e1e6 (diff)
downloadhdf5-c465e18a68f2a77550d93366a5b6c8fac2e24502.zip
hdf5-c465e18a68f2a77550d93366a5b6c8fac2e24502.tar.gz
hdf5-c465e18a68f2a77550d93366a5b6c8fac2e24502.tar.bz2
[svn-r15609] Description:
Omnibus compiler warning cleanup & some reformatting also. Tested on: Mac OS X/32 10.5.4 (amazon) Too minor to require h5committest
Diffstat (limited to 'src/H5Tpkg.h')
-rw-r--r--src/H5Tpkg.h40
1 files changed, 23 insertions, 17 deletions
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index b0abb9a..a534f1b 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -53,10 +53,10 @@
#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)
+#define H5T_IS_COMPLEX(t) ((t) == H5T_COMPOUND || (t) == H5T_ENUM || (t) == H5T_VLEN || (t) == H5T_ARRAY)
/* Macro to ease detecting fixed "string" datatypes */
-#define H5T_IS_FIXED_STRING(dt) (H5T_STRING == (dt)->type)
+#define H5T_IS_FIXED_STRING(dt) (H5T_STRING == (dt)->type)
/* Macro to ease detecting variable-length "string" datatypes */
#define H5T_IS_VL_STRING(dt) (H5T_VLEN == (dt)->type && H5T_VLEN_STRING == (dt)->u.vlen.type)
@@ -65,7 +65,14 @@
#define H5T_IS_STRING(dt) (H5T_IS_FIXED_STRING(dt) || H5T_IS_VL_STRING(dt))
/* Macro to ease detecting atomic datatypes */
-#define H5T_IS_ATOMIC(dt) (!(H5T_IS_COMPLEX((dt)->type) || (dt)->type==H5T_OPAQUE))
+#define H5T_IS_ATOMIC(dt) (!(H5T_IS_COMPLEX((dt)->type) || (dt)->type == H5T_OPAQUE))
+
+/* Macro to ease retrieving class of shared datatype */
+/* (Externally, a VL string is a string; internally, a VL string is a VL. Lie
+ * to the user if they have a VL string and tell them it's in the string
+ * class)
+ */
+#define H5T_GET_CLASS(shared, internal) ((internal) ? (shared)->type : (H5T_IS_VL_STRING(shared) ? H5T_STRING : (shared)->type))
/*
@@ -226,8 +233,8 @@ struct H5T_stats_t {
/* The datatype conversion database */
struct H5T_path_t {
char name[H5T_NAMELEN]; /*name for debugging only */
- H5T_t *src; /*source datatype ID */
- H5T_t *dst; /*destination datatype ID */
+ H5T_t *src; /*source datatype */
+ H5T_t *dst; /*destination datatype */
H5T_conv_t func; /*data conversion function */
hbool_t is_hard; /*is it a hard function? */
hbool_t is_noop; /*is it the noop conversion? */
@@ -277,13 +284,21 @@ typedef enum H5T_sort_t {
H5T_SORT_VALUE = 2 /*sorted by memb offset or enum value*/
} H5T_sort_t;
+/* A compound datatype member */
+typedef struct H5T_cmemb_t {
+ char *name; /*name of this member */
+ size_t offset; /*offset from beginning of struct */
+ size_t size; /*total size: dims * type_size */
+ struct H5T_t *type; /*type of this member */
+} H5T_cmemb_t;
+
/* A compound datatype */
typedef struct H5T_compnd_t {
unsigned nalloc; /*num entries allocated in MEMB array*/
unsigned nmembs; /*number of members defined in struct*/
H5T_sort_t sorted; /*how are members sorted? */
hbool_t packed; /*are members packed together? */
- struct H5T_cmemb_t *memb; /*array of struct members */
+ H5T_cmemb_t *memb; /*array of struct members */
} H5T_compnd_t;
/* An enumeration datatype */
@@ -306,7 +321,7 @@ typedef herr_t (*H5T_vlen_setnullfunc_t)(H5F_t *f, hid_t dxpl_id, void *_vl, voi
/* VL types */
typedef enum {
H5T_VLEN_BADTYPE = -1, /* invalid VL Type */
- H5T_VLEN_SEQUENCE=0, /* VL sequence */
+ H5T_VLEN_SEQUENCE = 0, /* VL sequence */
H5T_VLEN_STRING, /* VL string */
H5T_VLEN_MAXTYPE /* highest type (Invalid as true type) */
} H5T_vlen_type_t;
@@ -374,14 +389,6 @@ struct H5T_t {
H5G_name_t path; /* group hier. path if the type is a named type */
};
-/* A compound datatype member */
-typedef struct H5T_cmemb_t {
- char *name; /*name of this member */
- size_t offset; /*offset from beginning of struct */
- size_t size; /*total size: dims * type_size */
- struct H5T_t *type; /*type of this member */
-} H5T_cmemb_t;
-
/* The master list of soft conversion functions */
typedef struct H5T_soft_t {
char name[H5T_NAMELEN]; /*name for debugging only */
@@ -1364,8 +1371,7 @@ H5_DLL H5T_t * H5T_vlen_create(const H5T_t *base);
H5_DLL htri_t H5T_vlen_set_loc(const H5T_t *dt, H5F_t *f, H5T_loc_t loc);
/* Array functions */
-H5_DLL H5T_t * H5T_array_create(H5T_t *base, unsigned ndims,
- const hsize_t dim[/* ndims */]);
+H5_DLL H5T_t *H5T_array_create(H5T_t *base, unsigned ndims, const hsize_t dim[/* ndims */]);
H5_DLL int H5T_get_array_ndims(const H5T_t *dt);
H5_DLL int H5T_get_array_dims(const H5T_t *dt, hsize_t dims[]);