summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-08-18 23:19:27 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-08-18 23:19:27 (GMT)
commit93e5190bb173a89deb7a91f72f800f6ab5769b8e (patch)
tree2bb86e9387ca7702ecc6742630f2301ff2bc76a9 /src/H5T.c
parentda3fcf286af08c45449fad4002889aa0a0ab7850 (diff)
downloadhdf5-93e5190bb173a89deb7a91f72f800f6ab5769b8e.zip
hdf5-93e5190bb173a89deb7a91f72f800f6ab5769b8e.tar.gz
hdf5-93e5190bb173a89deb7a91f72f800f6ab5769b8e.tar.bz2
[svn-r603] Changes since 19980818
---------------------- ./src/H5.c Fixed an argument promotion bug in HDfprintf() ./src/H5Fistore.c Fixed a array bounds read error. ./src/H5HG.c Fixed uninitialized (but unused) data appearing in the hdf5 file, a potential security problem. ./src/H5T.c ./src/H5Tpublic.h Added new data types for hdf5 types: H5T_NATIVE_HSIZE, H5T_NATIVE_HSSIZE, H5T_NATIVE_HERR, and H5T_NATIVE_HBOOL. I did not add H5T_NATIVE_HID since I couldn't think of a reason that it would be stored in a file anyway.
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/src/H5T.c b/src/H5T.c
index ca7e571..9be5749 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -87,7 +87,10 @@ hid_t H5T_NATIVE_B16_g = FAIL;
hid_t H5T_NATIVE_B32_g = FAIL;
hid_t H5T_NATIVE_B64_g = FAIL;
hid_t H5T_NATIVE_OPAQUE_g = FAIL;
-
+hid_t H5T_NATIVE_HSIZE_g = FAIL;
+hid_t H5T_NATIVE_HSSIZE_g = FAIL;
+hid_t H5T_NATIVE_HERR_g = FAIL;
+hid_t H5T_NATIVE_HBOOL_g = FAIL;
/* The path database */
static intn H5T_npath_g = 0; /*num paths defined */
@@ -187,7 +190,35 @@ H5T_init_interface(void)
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL,
"unable to initialize H5T layer");
}
+
+ /* hsize_t */
+ dt = H5I_object (H5T_NATIVE_HSIZE_g = H5Tcopy (H5T_NATIVE_UINT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = sizeof(hsize_t);
+ dt->u.atomic.prec = 8*dt->size;
+ dt->u.atomic.offset = 0;
+
+ /* hssize_t */
+ dt = H5I_object (H5T_NATIVE_HSSIZE_g = H5Tcopy (H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = sizeof(hssize_t);
+ dt->u.atomic.prec = 8*dt->size;
+ dt->u.atomic.offset = 0;
+ /* herr_t */
+ dt = H5I_object (H5T_NATIVE_HERR_g = H5Tcopy (H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = sizeof(herr_t);
+ dt->u.atomic.prec = 8*dt->size;
+ dt->u.atomic.offset = 0;
+
+ /* hbool_t */
+ dt = H5I_object (H5T_NATIVE_HBOOL_g = H5Tcopy (H5T_NATIVE_INT_g));
+ dt->state = H5T_STATE_IMMUTABLE;
+ dt->size = sizeof(hbool_t);
+ dt->u.atomic.prec = 8*dt->size;
+ dt->u.atomic.offset = 0;
+
/*------------------------------------------------------------
* IEEE Types
*------------------------------------------------------------