summaryrefslogtreecommitdiffstats
path: root/src/H5Tpkg.h
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1999-01-07 11:41:25 (GMT)
committerRobb Matzke <matzke@llnl.gov>1999-01-07 11:41:25 (GMT)
commit504aa95bd92511ccb80e6321dd79f7dc525310d5 (patch)
tree43b1c89316ea8ef44db0fe05a6f33cba0006d4b0 /src/H5Tpkg.h
parent04bec43fa2e962fc4bf5deef67879b5ebf573c8f (diff)
downloadhdf5-504aa95bd92511ccb80e6321dd79f7dc525310d5.zip
hdf5-504aa95bd92511ccb80e6321dd79f7dc525310d5.tar.gz
hdf5-504aa95bd92511ccb80e6321dd79f7dc525310d5.tar.bz2
[svn-r1010] Changes since 19981217
---------------------- ./src/H5.c ./src/H5private.h Renamed `library_initialize_g' to `H5_libinit_g' to make it conform to our naming scheme. ./src/H5I.c Fixed a bug in H5I_dec_ref() that caused the return value to always be zero instead of the new reference count. ./src/H5.c ./src/H5Odtype.c ./src/H5T.c ./src/H5Tconv.c ./src/H5Tpkg.h ./src/H5Tprivate.h ./src/H5Tpublic.h Added support for enumeration data types. ./src/H5RA.c Renamed H5T_insert() to H5T_struct_insert() and added H5T_enum_insert(). ./src/H5RA.c ./src/H5Shyper.c Added casts to size_t for the third argument of memcpy() to shut up a warning message from insure++. ./src/H5T.c Changed "can't" to "unable to" in some error messages to be more consistent. ./src/H5detect.c If fork() or waitpid() are unavailable then we assume no alignment constraints. Hopefully this is the case only on NT and Intel CPU's don't have alignment constraints. ./src/H5public.h Include <limits.h> because the H5T_NATIVE_CHAR macro needs the definition for CHAR_MIN.
Diffstat (limited to 'src/H5Tpkg.h')
-rw-r--r--src/H5Tpkg.h29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index a390897..2e8bf1f 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -61,12 +61,30 @@ typedef struct H5T_atomic_t {
} u;
} H5T_atomic_t;
+/* How members are sorted for compound or enum data types */
+typedef enum H5T_sort_t {
+ H5T_SORT_NONE = 0, /*not sorted */
+ H5T_SORT_NAME = 1, /*sorted by member name */
+ H5T_SORT_VALUE = 2 /*sorted by memb offset or enum value*/
+} H5T_sort_t;
+
+/* A compound data type */
typedef struct H5T_compnd_t {
intn nalloc; /*num entries allocated in MEMB array*/
intn nmembs; /*number of members defined in struct*/
- struct H5T_member_t *memb; /*array of struct members */
+ H5T_sort_t sorted; /*how are members sorted? */
+ struct H5T_cmemb_t *memb; /*array of struct members */
} H5T_compnd_t;
+/* An enumeration data type */
+typedef struct H5T_enum_t {
+ intn nalloc; /*num entries allocated */
+ intn nmembs; /*number of members defined in enum */
+ H5T_sort_t sorted; /*how are members sorted? */
+ uint8_t *value; /*array of values */
+ char **name; /*array of symbol names */
+} H5T_enum_t;
+
typedef enum H5T_state_t {
H5T_STATE_TRANSIENT, /*type is a modifiable transient */
H5T_STATE_RDONLY, /*transient, not modifiable, closable*/
@@ -81,13 +99,16 @@ struct H5T_t {
H5F_t *sh_file;/*file pointer if this is a shared type */
H5T_class_t type; /*which class of type is this? */
size_t size; /*total size of an instance of this type */
+ struct H5T_t *parent;/*parent type for derived data types */
union {
H5T_atomic_t atomic; /*an atomic data type */
H5T_compnd_t compnd; /*a compound data type (struct) */
+ H5T_enum_t enumer; /*an enumeration type (enum) */
} u;
};
-typedef struct H5T_member_t {
+/* A compound data type 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 */
@@ -95,7 +116,7 @@ typedef struct H5T_member_t {
size_t dim[4]; /*size in each dimension */
intn perm[4]; /*index permutation */
struct H5T_t *type; /*type of this member */
-} H5T_member_t;
+} H5T_cmemb_t;
/* The master list of soft conversion functions */
typedef struct H5T_soft_t {
@@ -142,6 +163,8 @@ herr_t H5T_conv_order (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *_buf, void *bkg);
herr_t H5T_conv_struct (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *_buf, void *bkg);
+herr_t H5T_conv_enum(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
+ size_t nelmts, void *buf, void __unused__ *bkg);
herr_t H5T_conv_i_i (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, void *_buf, void *bkg);
herr_t H5T_conv_f_f (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,