summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-06-05 21:03:49 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-06-05 21:03:49 (GMT)
commit1e8ebeecfc67073a3019f9c2084a5977d2b8c62e (patch)
tree9ad027ec237578472f22d62b8adb6edfa9aafdfa /src/H5T.c
parenta63ccc0c6b02c232744a35ed6fbb8c3708f7a3aa (diff)
downloadhdf5-1e8ebeecfc67073a3019f9c2084a5977d2b8c62e.zip
hdf5-1e8ebeecfc67073a3019f9c2084a5977d2b8c62e.tar.gz
hdf5-1e8ebeecfc67073a3019f9c2084a5977d2b8c62e.tar.bz2
[svn-r410] Changes since 19980604
---------------------- ./src/H5A.c Named data types can have attributes. Fixed bugs where the API functions didn't check the return values of their internal counterparts and thus the automatic error reporting didn't work. Fixed some places where the error stack wasn't cleared after a function returned failure. Data types returned by H5Aget_type() are always read-only. If the `attr_num' argument of H5Aiterate() is null then it acts like H5Giterate() instead of failing -- it begins processing attributes with the first one. ./src/H5D.c We check for allocation overruns when scalar datasets are stored in external files. ./src/H5O.c H5O_modify() will fail if the message is >=16kB. ./src/H5Oattr.c Split some long lines ./src/H5T.c ./src/H5Tprivate.h Added H5T_entof() to support attributes on named types. ./src/h5ls.c Prints the names of attributes and their sizes. ./test/cmpd_dset.c ./test/dsets.c ./test/dtypes.c ./test/extend.c ./test/external.c ./test/gheap.c ./test/istore.c ./test/links.c ./test/shtype.c If the environment variable HDF5_NOCLEANUP is defined then the temporary files are not removed. The testhdf5 program still has the bug that it removes *.h5, clobbering test files from other programs... oh well. ./test/dtypes.c Added attribute tests.
Diffstat (limited to 'src/H5T.c')
-rw-r--r--src/H5T.c40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/H5T.c b/src/H5T.c
index 5f6b8ad..e3a1e1d 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -3775,6 +3775,46 @@ H5T_path_find(const char *name, const H5T_t *src, const H5T_t *dst,
/*-------------------------------------------------------------------------
+ * Function: H5T_entof
+ *
+ * Purpose: Returns a pointer to the entry for a named data type.
+ *
+ * Return: Success: Ptr directly into named data type
+ *
+ * Failure: NULL
+ *
+ * Programmer: Robb Matzke
+ * Friday, June 5, 1998
+ *
+ * Modifications:
+ *
+ *-------------------------------------------------------------------------
+ */
+H5G_entry_t *
+H5T_entof (H5T_t *dt)
+{
+ H5G_entry_t *ret_value = NULL;
+
+ FUNC_ENTER (H5T_entof, NULL);
+ assert (dt);
+
+ switch (dt->state) {
+ case H5T_STATE_TRANSIENT:
+ case H5T_STATE_RDONLY:
+ case H5T_STATE_IMMUTABLE:
+ HRETURN_ERROR (H5E_DATATYPE, H5E_CANTINIT, NULL,
+ "not a named data type");
+ case H5T_STATE_NAMED:
+ case H5T_STATE_OPEN:
+ ret_value = &(dt->ent);
+ break;
+ }
+
+ FUNC_LEAVE (ret_value);
+}
+
+
+/*-------------------------------------------------------------------------
* Function: H5T_timer_begin
*
* Purpose: Start a timer for a data type conversion.