summaryrefslogtreecommitdiffstats
path: root/src/H5P.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>1997-08-29 19:26:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>1997-08-29 19:26:32 (GMT)
commit39a94b2f538e6b4d1b13362e022141ba8cb599c0 (patch)
tree93c81660e0b8e423868bed0ca907bfe046b4c878 /src/H5P.c
parentc48f8b7590ed6bc334a6d62ab651cda8124ba90f (diff)
downloadhdf5-39a94b2f538e6b4d1b13362e022141ba8cb599c0.zip
hdf5-39a94b2f538e6b4d1b13362e022141ba8cb599c0.tar.gz
hdf5-39a94b2f538e6b4d1b13362e022141ba8cb599c0.tar.bz2
[svn-r53] Added datatype and dimensionality messages to dataset header, cleaned up more
code, etc.
Diffstat (limited to 'src/H5P.c')
-rw-r--r--src/H5P.c82
1 files changed, 82 insertions, 0 deletions
diff --git a/src/H5P.c b/src/H5P.c
index abaa5c1..3c51ed0 100644
--- a/src/H5P.c
+++ b/src/H5P.c
@@ -117,6 +117,86 @@ done:
/*--------------------------------------------------------------------------
NAME
+ H5P_get_lrank
+ PURPOSE
+ Return the logical rank of a dataspace (internal)
+ USAGE
+ uint32 H5P_get_lrank(sdim)
+ H5P_sdim_t *sdim; IN: Pointer to dataspace object to query
+ RETURNS
+ The logical rank of a dataspace on success, UFAIL on failure
+ DESCRIPTION
+ This function determines the number of logical dimensions in a
+ dataspace. The logical rank is the actual number of dimensions of the
+ dataspace, not the dimensionality of the space its embedded in.
+ UFAIL is returned on an error, otherwise the rank is returned.
+--------------------------------------------------------------------------*/
+uint32 H5P_get_lrank(H5P_sdim_t *sdim)
+{
+ uint32 ret_value = UFAIL;
+
+ FUNC_ENTER(H5P_get_lrank, H5P_init_interface, UFAIL);
+
+ /* Clear errors and check args and all the boring stuff. */
+ H5ECLEAR;
+
+ assert(sdim);
+ ret_value=sdim->rank;
+
+#ifdef LATER
+done:
+#endif /* LATER */
+ if(ret_value == UFAIL)
+ { /* Error condition cleanup */
+
+ } /* end if */
+
+ /* Normal function cleanup */
+
+ FUNC_LEAVE(ret_value);
+} /* end H5P_get_lrank() */
+
+/*--------------------------------------------------------------------------
+ NAME
+ H5P_is_simple
+ PURPOSE
+ Check if a dataspace is simple (internal)
+ USAGE
+ hbool_t H5P_is_simple(sdim)
+ H5P_sdim_t *sdim; IN: Pointer to dataspace object to query
+ RETURNS
+ BTRUE/BFALSE/BFAIL
+ DESCRIPTION
+ This function determines the if a dataspace is "simple". ie. if it
+ has orthogonal, evenly spaced dimensions.
+--------------------------------------------------------------------------*/
+hbool_t H5P_is_simple(H5P_sdim_t *sdim)
+{
+ hbool_t ret_value = BFAIL;
+
+ FUNC_ENTER(H5P_get_lrank, H5P_init_interface, UFAIL);
+
+ /* Clear errors and check args and all the boring stuff. */
+ H5ECLEAR;
+
+ assert(sdim);
+ ret_value=BTRUE; /* Currently all dataspaces are simple */
+
+#ifdef LATER
+done:
+#endif /* LATER */
+ if(ret_value == BFAIL)
+ { /* Error condition cleanup */
+
+ } /* end if */
+
+ /* Normal function cleanup */
+
+ FUNC_LEAVE(ret_value);
+} /* end H5P_is_simple() */
+
+/*--------------------------------------------------------------------------
+ NAME
H5Pnelem
PURPOSE
Return the number of elements in a dataspace
@@ -146,7 +226,9 @@ uintn H5Pnelem(hatom_t sid)
ret_value=1;
#endif /* FINISH_THIS */
+#ifdef LATER
done:
+#endif /* LATER */
if(ret_value == UFAIL)
{ /* Error condition cleanup */