summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5S.c4
-rw-r--r--src/H5Sall.c10
-rw-r--r--src/H5Shyper.c8
-rw-r--r--src/H5Snone.c10
-rw-r--r--src/H5Spkg.h2
-rw-r--r--src/H5Spoint.c12
-rw-r--r--src/H5Sprivate.h2
-rw-r--r--src/H5Sselect.c12
8 files changed, 31 insertions, 29 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 88c2f72..4c11268 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1974,7 +1974,7 @@ done:
/*-------------------------------------------------------------------------
* Function: H5S_set_extent
*
- * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend
+ * Purpose: Modify the dimensions of a dataspace.
*
* Return: Success: Non-negative
* Failure: Negative
@@ -2055,7 +2055,7 @@ H5S_has_extent(const H5S_t *ds)
/*-------------------------------------------------------------------------
* Function: H5S_set_extent_real
*
- * Purpose: Modify the dimensions of a dataspace. Based on H5S_extend
+ * Purpose: Modify the dimensions of a dataspace.
*
* Return: Success: Non-negative
* Failure: Negative
diff --git a/src/H5Sall.c b/src/H5Sall.c
index 28395b1..3b77b98 100644
--- a/src/H5Sall.c
+++ b/src/H5Sall.c
@@ -46,7 +46,7 @@ static int H5S__all_unlim_dim(const H5S_t *space);
static htri_t H5S__all_is_contiguous(const H5S_t *space);
static htri_t H5S__all_is_single(const H5S_t *space);
static htri_t H5S__all_is_regular(const H5S_t *space);
-static void H5S__all_adjust_u(H5S_t *space, const hsize_t *offset);
+static herr_t H5S__all_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S__all_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S__all_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S__all_iter_init(H5S_sel_iter_t *iter, const H5S_t *space);
@@ -785,11 +785,11 @@ H5S__all_is_regular(const H5S_t H5_ATTR_UNUSED *space)
PURPOSE
Adjust an "all" selection by subtracting an offset
USAGE
- void H5S__all_adjust_u(space, offset)
+ herr_t H5S__all_adjust_u(space, offset)
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
- None
+ Non-negative on success, negative on failure
DESCRIPTION
Moves selection by subtracting an offset from it.
GLOBAL VARIABLES
@@ -797,7 +797,7 @@ H5S__all_is_regular(const H5S_t H5_ATTR_UNUSED *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static void
+static herr_t
H5S__all_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *offset)
{
FUNC_ENTER_STATIC_NOERR
@@ -806,7 +806,7 @@ H5S__all_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *off
HDassert(space);
HDassert(offset);
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S__all_adjust_u() */
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 7a6d1be..ed3fa45 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -92,7 +92,7 @@ static herr_t H5S__hyper_num_elem_non_unlim(const H5S_t *space,
static htri_t H5S__hyper_is_contiguous(const H5S_t *space);
static htri_t H5S__hyper_is_single(const H5S_t *space);
static htri_t H5S__hyper_is_regular(const H5S_t *space);
-static void H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset);
+static herr_t H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S__hyper_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S__hyper_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S__hyper_iter_init(H5S_sel_iter_t *iter, const H5S_t *space);
@@ -4203,7 +4203,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans,
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
- None
+ Non-negative on success, negative on failure
DESCRIPTION
Moves a hyperslab selection by subtracting an offset from it.
GLOBAL VARIABLES
@@ -4211,7 +4211,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans,
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static void
+static herr_t
H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
{
FUNC_ENTER_STATIC_NOERR
@@ -4238,7 +4238,7 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
H5S__hyper_span_scratch(space->select.sel_info.hslab->span_lst);
} /* end if */
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* end H5S__hyper_adjust_u() */
diff --git a/src/H5Snone.c b/src/H5Snone.c
index a46a71a..a8aaf7e 100644
--- a/src/H5Snone.c
+++ b/src/H5Snone.c
@@ -47,7 +47,7 @@ static int H5S__none_unlim_dim(const H5S_t *space);
static htri_t H5S_none_is_contiguous(const H5S_t *space);
static htri_t H5S_none_is_single(const H5S_t *space);
static htri_t H5S_none_is_regular(const H5S_t *space);
-static void H5S_none_adjust_u(H5S_t *space, const hsize_t *offset);
+static herr_t H5S_none_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S_none_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S_none_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S_none_iter_init(H5S_sel_iter_t *iter, const H5S_t *space);
@@ -744,11 +744,11 @@ H5S_none_is_regular(const H5S_t H5_ATTR_UNUSED *space)
PURPOSE
Adjust an "none" selection by subtracting an offset
USAGE
- void H5S_none_adjust_u(space, offset)
+ herr_t H5S_none_adjust_u(space, offset)
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
- None
+ Non-negative on success, negative on failure
DESCRIPTION
Moves selection by subtracting an offset from it.
GLOBAL VARIABLES
@@ -756,7 +756,7 @@ H5S_none_is_regular(const H5S_t H5_ATTR_UNUSED *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static void
+static herr_t
H5S_none_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *offset)
{
FUNC_ENTER_NOAPI_NOINIT_NOERR
@@ -765,7 +765,7 @@ H5S_none_adjust_u(H5S_t H5_ATTR_UNUSED *space, const hsize_t H5_ATTR_UNUSED *off
HDassert(space);
HDassert(offset);
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_none_adjust_u() */
diff --git a/src/H5Spkg.h b/src/H5Spkg.h
index 6ded287..d895f40 100644
--- a/src/H5Spkg.h
+++ b/src/H5Spkg.h
@@ -161,7 +161,7 @@ typedef htri_t (*H5S_sel_is_single_func_t)(const H5S_t *space);
/* Method to determine if current selection is "regular" */
typedef htri_t (*H5S_sel_is_regular_func_t)(const H5S_t *space);
/* Method to adjust a selection by an offset */
-typedef void (*H5S_sel_adjust_u_func_t)(H5S_t *space, const hsize_t *offset);
+typedef herr_t (*H5S_sel_adjust_u_func_t)(H5S_t *space, const hsize_t *offset);
/* Method to construct single element projection onto scalar dataspace */
typedef herr_t (*H5S_sel_project_scalar)(const H5S_t *space, hsize_t *offset);
/* Method to construct selection projection onto/into simple dataspace */
diff --git a/src/H5Spoint.c b/src/H5Spoint.c
index fb8e311..9924920 100644
--- a/src/H5Spoint.c
+++ b/src/H5Spoint.c
@@ -48,7 +48,7 @@ static int H5S__point_unlim_dim(const H5S_t *space);
static htri_t H5S_point_is_contiguous(const H5S_t *space);
static htri_t H5S_point_is_single(const H5S_t *space);
static htri_t H5S_point_is_regular(const H5S_t *space);
-static void H5S_point_adjust_u(H5S_t *space, const hsize_t *offset);
+static herr_t H5S_point_adjust_u(H5S_t *space, const hsize_t *offset);
static herr_t H5S_point_project_scalar(const H5S_t *space, hsize_t *offset);
static herr_t H5S_point_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
static herr_t H5S_point_iter_init(H5S_sel_iter_t *iter, const H5S_t *space);
@@ -686,7 +686,7 @@ done:
static htri_t
H5S_point_is_valid (const H5S_t *space)
{
- H5S_pnt_node_t *curr; /* Point information nodes */
+ H5S_pnt_node_t *curr; /* Point information nodes */
unsigned u; /* Counter */
htri_t ret_value = TRUE; /* Return value */
@@ -1354,11 +1354,11 @@ H5S_point_is_regular(const H5S_t *space)
PURPOSE
Adjust a "point" selection by subtracting an offset
USAGE
- void H5S_point_adjust_u(space, offset)
+ herr_t H5S_point_adjust_u(space, offset)
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
- None
+ Non-negative on success, negative on failure
DESCRIPTION
Moves a point selection by subtracting an offset from it.
GLOBAL VARIABLES
@@ -1366,7 +1366,7 @@ H5S_point_is_regular(const H5S_t *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static void
+static herr_t
H5S_point_adjust_u(H5S_t *space, const hsize_t *offset)
{
H5S_pnt_node_t *node; /* Point node */
@@ -1396,7 +1396,7 @@ H5S_point_adjust_u(H5S_t *space, const hsize_t *offset)
node = node->next;
} /* end while */
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(SUCCEED)
} /* H5S_point_adjust_u() */
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index 15ce75d..32ac51a 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -259,7 +259,7 @@ H5_DLL herr_t H5S_select_serialize(const H5S_t *space, uint8_t **p);
H5_DLL htri_t H5S_select_is_contiguous(const H5S_t *space);
H5_DLL htri_t H5S_select_is_single(const H5S_t *space);
H5_DLL htri_t H5S_select_is_regular(const H5S_t *space);
-H5_DLL void H5S_select_adjust_u(H5S_t *space, const hsize_t *offset);
+H5_DLL herr_t H5S_select_adjust_u(H5S_t *space, const hsize_t *offset);
H5_DLL herr_t H5S_select_project_scalar(const H5S_t *space, hsize_t *offset);
H5_DLL herr_t H5S_select_project_simple(const H5S_t *space, H5S_t *new_space, hsize_t *offset);
H5_DLL herr_t H5S_select_project_intersection(const H5S_t *src_space,
diff --git a/src/H5Sselect.c b/src/H5Sselect.c
index ec74523..2ce3f10 100644
--- a/src/H5Sselect.c
+++ b/src/H5Sselect.c
@@ -893,11 +893,11 @@ H5S_select_is_regular(const H5S_t *space)
PURPOSE
Adjust a selection by subtracting an offset
USAGE
- void H5S_select_adjust_u(space, offset)
+ herr_t H5S_select_adjust_u(space, offset)
H5S_t *space; IN/OUT: Pointer to dataspace to adjust
const hsize_t *offset; IN: Offset to subtract
RETURNS
- None
+ Non-negative on success, negative on failure
DESCRIPTION
Moves a selection by subtracting an offset from it.
GLOBAL VARIABLES
@@ -908,18 +908,20 @@ H5S_select_is_regular(const H5S_t *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-void
+herr_t
H5S_select_adjust_u(H5S_t *space, const hsize_t *offset)
{
+ herr_t ret_value = FAIL; /* Return value */
+
FUNC_ENTER_NOAPI_NOINIT_NOERR
/* Check args */
HDassert(space);
HDassert(offset);
- (*space->select.type->adjust_u)(space, offset);
+ ret_value = (*space->select.type->adjust_u)(space, offset);
- FUNC_LEAVE_NOAPI_VOID
+ FUNC_LEAVE_NOAPI(ret_value)
} /* H5S_select_adjust_u() */