summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2002-03-13 16:35:31 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2002-03-13 16:35:31 (GMT)
commit64658d1f9ffe5fc83b549b80396b39263ba3e0ad (patch)
tree80c04c793e887014e105fedbb958e367907966f4 /src/H5S.c
parentbbc50c3a1f3096959f09bce67e993267bda9df24 (diff)
downloadhdf5-64658d1f9ffe5fc83b549b80396b39263ba3e0ad.zip
hdf5-64658d1f9ffe5fc83b549b80396b39263ba3e0ad.tar.gz
hdf5-64658d1f9ffe5fc83b549b80396b39263ba3e0ad.tar.bz2
[svn-r5062]
Purpose: code clean up Description: just some clean up of the functions H5D_set_extend and H5S_set_extend before the big change (changing chunk info in the b-tree struct of the dataset) Platforms tested: w2000, eirene
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c114
1 files changed, 55 insertions, 59 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 45fd991..877de5d 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1657,65 +1657,6 @@ H5S_extend (H5S_t *space, const hsize_t *size)
-
-/*-------------------------------------------------------------------------
- * Function: H5S_set_extend
- *
- * Purpose: Modify the dimensions of a data space. Based on H5S_extend
- *
- * Return: Success: Number of dimensions whose size increased.
- *
- * Failure: Negative
- *
- * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
- *
- * Date: November 26, 2001
- *
- *-------------------------------------------------------------------------
- */
-
-int
-H5S_set_extend (H5S_t *space, const hsize_t *size)
-{
- int ret_value=0;
- unsigned u;
-
- FUNC_ENTER (H5S_set_extend, FAIL);
-
- /* Check args */
- assert (space && H5S_SIMPLE==space->extent.type);
- assert (size);
-
- for (u=0; u<space->extent.u.simple.rank; u++)
- {
-
- if (space->extent.u.simple.max &&
- H5S_UNLIMITED!=space->extent.u.simple.max[u] &&
- space->extent.u.simple.max[u]<size[u])
- {
- HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,"dimension cannot be increased");
- }
-
- ret_value++;
-
- }
-
- /* Update */
- if (ret_value)
- {
- for (u=0; u<space->extent.u.simple.rank; u++)
- {
-
- space->extent.u.simple.size[u] = size[u];
-
- }
- }
-
- FUNC_LEAVE (ret_value);
-}
-
-
-
/*-------------------------------------------------------------------------
* Function: H5Screate_simple
@@ -2004,3 +1945,58 @@ H5S_debug(H5F_t *f, const void *_mesg, FILE *stream, int indent, int fwidth)
FUNC_LEAVE(SUCCEED);
}
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: H5S_set_extend
+ *
+ * Purpose: Modify the dimensions of a data space. Based on H5S_extend
+ *
+ * Return: Success: Number of dimensions whose size increased.
+ *
+ * Failure: Negative
+ *
+ * Programmer: Pedro Vicente, pvn@ncsa.uiuc.edu
+ *
+ * Date: March 13, 2002
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int H5S_set_extend( H5S_t *space, const hsize_t *size )
+{
+ int ret_value = 0;
+ unsigned u;
+
+ FUNC_ENTER( H5S_set_extend, FAIL );
+
+ /* Check args */
+ assert( space && H5S_SIMPLE==space->extent.type );
+ assert( size);
+
+ for ( u = 0; u < space->extent.u.simple.rank; u++ )
+ {
+ if ( space->extent.u.simple.max &&
+ H5S_UNLIMITED != space->extent.u.simple.max[u] &&
+ space->extent.u.simple.max[u]<size[u] )
+ {
+ HRETURN_ERROR (H5E_ARGS, H5E_BADVALUE, FAIL,"dimension cannot be modified");
+ }
+
+ ret_value++;
+ }
+
+ /* Update */
+ if ( ret_value )
+ {
+ for ( u = 0; u < space->extent.u.simple.rank; u++ )
+ {
+ space->extent.u.simple.size[u] = size[u];
+ }
+ }
+
+ FUNC_LEAVE( ret_value );
+}
+