summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
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 );
+}
+