summaryrefslogtreecommitdiffstats
path: root/src/H5Edeprec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Edeprec.c')
-rw-r--r--src/H5Edeprec.c76
1 files changed, 41 insertions, 35 deletions
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index 13a2f3d..c1a5a21 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -82,6 +82,7 @@
/*******************/
+#ifndef H5_NO_DEPRECATED_SYMBOLS
/*--------------------------------------------------------------------------
NAME
@@ -117,7 +118,7 @@ H5E_init_deprec_interface(void)
*
*-------------------------------------------------------------------------
*/
-const char *
+char *
H5Eget_major(H5E_major_t maj)
{
H5E_msg_t *msg; /* Pointer to error message */
@@ -165,7 +166,7 @@ done:
*
*-------------------------------------------------------------------------
*/
-const char *
+char *
H5Eget_minor(H5E_minor_t min)
{
H5E_msg_t *msg; /* Pointer to error message */
@@ -201,7 +202,7 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Epush
+ * Function: H5Epush1
*
* Purpose: This function definition is for backward compatibility only.
* It doesn't have error stack and error class as parameters.
@@ -221,13 +222,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Epush(const char *file, const char *func, unsigned line,
+H5Epush1(const char *file, const char *func, unsigned line,
H5E_major_t maj, H5E_minor_t min, const char *str)
{
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Epush, FAIL)
+ FUNC_ENTER_API_NOCLEAR(H5Epush1, FAIL)
H5TRACE6("e", "*s*sIuii*s", file, func, line, maj, min, str);
/* Push the error on the default error stack */
@@ -236,11 +237,11 @@ H5Epush(const char *file, const char *func, unsigned line,
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Epush() */
+} /* end H5Epush1() */
/*-------------------------------------------------------------------------
- * Function: H5Eclear
+ * Function: H5Eclear1
*
* Purpose: This function is for backward compatbility.
* Clears the error stack for the specified error stack.
@@ -253,12 +254,12 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Eclear(void)
+H5Eclear1(void)
{
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eclear, FAIL)
+ FUNC_ENTER_API_NOCLEAR(H5Eclear1, FAIL)
H5TRACE0("e","");
/* Clear the default error stack */
@@ -267,11 +268,11 @@ H5Eclear(void)
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Eclear() */
+} /* end H5Eclear1() */
/*-------------------------------------------------------------------------
- * Function: H5Eprint
+ * Function: H5Eprint1
*
* Purpose: This function is for backward compatbility.
* Prints the error stack in some default way. This is just a
@@ -287,29 +288,29 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Eprint(FILE *stream)
+H5Eprint1(FILE *stream)
{
H5E_t *estack; /* Error stack to operate on */
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eprint, FAIL)
+ FUNC_ENTER_API_NOCLEAR(H5Eprint1, FAIL)
/*NO TRACE*/
if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Print error stack */
- if(H5E_print2(estack, stream, TRUE) < 0)
+ if(H5E_print(estack, stream, TRUE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Eprint() */
+} /* end H5Eprint1() */
/*-------------------------------------------------------------------------
- * Function: H5Ewalk
+ * Function: H5Ewalk1
*
* Purpose: This function is for backward compatbility.
* Walks the error stack for the current thread and calls some
@@ -323,29 +324,32 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Ewalk(H5E_direction_t direction, H5E_walk_t func, void *client_data)
+H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client_data)
{
H5E_t *estack; /* Error stack to operate on */
+ H5E_walk_op_t walk_op; /* Error stack walking callback */
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Ewalk, FAIL)
+ FUNC_ENTER_API_NOCLEAR(H5Ewalk1, FAIL)
/*NO TRACE*/
if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Walk the error stack */
- if(H5E_walk2(estack, direction, func, NULL, TRUE, client_data) < 0)
+ walk_op.vers = 1;
+ walk_op.u.func1 = func;
+ if(H5E_walk(estack, direction, &walk_op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Ewalk() */
+} /* end H5Ewalk1() */
/*-------------------------------------------------------------------------
- * Function: H5Eget_auto
+ * Function: H5Eget_auto1
*
* Purpose: This function is for backward compatbility.
* Returns the current settings for the automatic error stack
@@ -361,13 +365,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Eget_auto(H5E_auto_t *func, void **client_data)
+H5Eget_auto1(H5E_auto1_t *func, void **client_data)
{
H5E_t *estack; /* Error stack to operate on */
- H5E_auto_op_t f; /* Error stack function */
+ H5E_auto_op_t auto_op; /* Error stack operator */
herr_t ret_value = SUCCEED; /* Return value */
- FUNC_ENTER_API(H5Eget_auto, FAIL)
+ FUNC_ENTER_API(H5Eget_auto1, FAIL)
H5TRACE2("e", "*x**x", func, client_data);
/* Retrieve default error stack */
@@ -375,18 +379,18 @@ H5Eget_auto(H5E_auto_t *func, void **client_data)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Get the automatic error reporting information */
- if(H5E_get_auto2(estack, FALSE, &f, client_data) < 0)
+ if(H5E_get_auto(estack, &auto_op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info")
if(func)
- *func = f.efunc;
+ *func = auto_op.u.func1;
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Eget_auto() */
+} /* end H5Eget_auto1() */
/*-------------------------------------------------------------------------
- * Function: H5Eset_auto
+ * Function: H5Eset_auto1
*
* Purpose: This function is for backward compatbility.
* Turns on or off automatic printing of errors for certain
@@ -395,7 +399,7 @@ done:
* call FUNC passing it CLIENT_DATA as an argument.
*
* The default values before this function is called are
- * H5Eprint() with client data being the standard error stream,
+ * H5Eprint1() with client data being the standard error stream,
* stderr.
*
* Automatic stack traversal is always in the H5E_WALK_DOWNWARD
@@ -409,25 +413,27 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5Eset_auto(H5E_auto_t func, void *client_data)
+H5Eset_auto1(H5E_auto1_t func, void *client_data)
{
H5E_t *estack; /* Error stack to operate on */
- H5E_auto_op_t f; /* Error stack function */
+ H5E_auto_op_t auto_op; /* Error stack operator */
herr_t ret_value = SUCCEED; /* Return value */
/* Don't clear the error stack! :-) */
- FUNC_ENTER_API_NOCLEAR(H5Eset_auto, FAIL)
+ FUNC_ENTER_API_NOCLEAR(H5Eset_auto1, FAIL)
H5TRACE2("e", "x*x", func, client_data);
if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get current error stack")
/* Set the automatic error reporting information */
- f.efunc = func;
- if(H5E_set_auto2(estack, FALSE, &f, client_data) < 0)
+ auto_op.vers = 1;
+ auto_op.u.func1 = func;
+ if(H5E_set_auto(estack, &auto_op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't set automatic error info")
done:
FUNC_LEAVE_API(ret_value)
-} /* end H5Eset_auto() */
+} /* end H5Eset_auto1() */
+#endif /* H5_NO_DEPRECATED_SYMBOLS */