summaryrefslogtreecommitdiffstats
path: root/src/H5Edeprec.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Edeprec.c')
-rw-r--r--src/H5Edeprec.c138
1 files changed, 65 insertions, 73 deletions
diff --git a/src/H5Edeprec.c b/src/H5Edeprec.c
index fc3eb9c..603d448 100644
--- a/src/H5Edeprec.c
+++ b/src/H5Edeprec.c
@@ -35,11 +35,11 @@
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Iprivate.h" /* IDs */
-#include "H5Epkg.h" /* Error handling */
-#include "H5FLprivate.h" /* Free lists */
-#include "H5MMprivate.h" /* Memory management */
+#include "H5private.h" /* Generic Functions */
+#include "H5CXprivate.h" /* API Contexts */
+#include "H5Epkg.h" /* Error handling */
+#include "H5Iprivate.h" /* IDs */
+#include "H5MMprivate.h" /* Memory management */
/****************/
@@ -80,12 +80,12 @@
#ifndef H5_NO_DEPRECATED_SYMBOLS
/*-------------------------------------------------------------------------
- * Function: H5Eget_major
+ * Function: H5Eget_major
*
- * Purpose: Retrieves a major error message.
+ * Purpose: Retrieves a major error message.
*
- * Return: Returns message if succeeds.
- * otherwise returns NULL.
+ * Return: Success: Pointer to the message
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Friday, July 14, 2003
@@ -106,21 +106,21 @@ H5Eget_major(H5E_major_t maj)
/* Get the message object */
if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(maj, H5I_ERROR_MSG)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")
/* Get the size & type of the message's text */
- if((size = H5E_get_msg(msg, &type, NULL, (size_t)0)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
+ if((size = H5E__get_msg(msg, &type, NULL, (size_t)0)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
if(type != H5E_MAJOR)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a major one")
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a major one")
/* Application will free this */
size++;
msg_str = (char *)H5MM_malloc((size_t)size);
/* Get the text for the message */
- if(H5E_get_msg(msg, NULL, msg_str, (size_t)size) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
+ if(H5E__get_msg(msg, NULL, msg_str, (size_t)size) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
ret_value = msg_str;
@@ -133,12 +133,12 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Eget_minor
+ * Function: H5Eget_minor
*
- * Purpose: Retrieves a minor error message.
+ * Purpose: Retrieves a minor error message.
*
- * Return: Returns message if succeeds.
- * otherwise returns NULL.
+ * Return: Success: Pointer to the message
+ * Failure: NULL
*
* Programmer: Raymond Lu
* Friday, July 14, 2003
@@ -159,21 +159,21 @@ H5Eget_minor(H5E_minor_t min)
/* Get the message object */
if(NULL == (msg = (H5E_msg_t *)H5I_object_verify(min, H5I_ERROR_MSG)))
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")
+ HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, NULL, "not a error message ID")
/* Get the size & type of the message's text */
- if((size = H5E_get_msg(msg, &type, NULL, (size_t)0)) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
+ if((size = H5E__get_msg(msg, &type, NULL, (size_t)0)) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
if(type != H5E_MINOR)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a minor one")
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "Error message isn't a minor one")
/* Application will free this */
size++;
msg_str = (char *)H5MM_malloc((size_t)size);
/* Get the text for the message */
- if(H5E_get_msg(msg, NULL, msg_str, (size_t)size) < 0)
- HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
+ if(H5E__get_msg(msg, NULL, msg_str, (size_t)size) < 0)
+ HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, NULL, "can't get error message text")
ret_value = msg_str;
@@ -186,19 +186,19 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Epush1
+ * Function: H5Epush1
*
- * Purpose: This function definition is for backward compatibility only.
+ * Purpose: This function definition is for backward compatibility only.
* It doesn't have error stack and error class as parameters.
* The old definition of major and minor is casted as HID_T
* in H5Epublic.h
*
- * Notes: Basically a public API wrapper around the H5E_push2
+ * Notes: Basically a public API wrapper around the H5E_push2
* function. For backward compatibility, it maintains the
* same parameter as the old function, in contrary to
* H5Epush2.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Tuesday, Sep 16, 2003
@@ -225,12 +225,12 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Eclear1
+ * Function: H5Eclear1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatbility.
* Clears the error stack for the specified error stack.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Wednesday, July 16, 2003
@@ -256,15 +256,15 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Eprint1
+ * Function: H5Eprint1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatbility.
* Prints the error stack in some default way. This is just a
- * convenience function for H5Ewalk() with a function that
- * prints error messages. Users are encouraged to write there
- * own more specific error handlers.
+ * convenience function for H5Ewalk() with a function that
+ * prints error messages. Users are encouraged to write there
+ * own more specific error handlers.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Sep 16, 2003
@@ -281,11 +281,11 @@ H5Eprint1(FILE *stream)
FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ 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_print(estack, stream, TRUE) < 0)
+ if(H5E__print(estack, stream, TRUE) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't display error stack")
done:
@@ -294,13 +294,13 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Ewalk1
+ * Function: H5Ewalk1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatbility.
* Walks the error stack for the current thread and calls some
- * function for each error along the way.
+ * function for each error along the way.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Sep 16, 2003
@@ -318,13 +318,13 @@ H5Ewalk1(H5E_direction_t direction, H5E_walk1_t func, void *client_data)
FUNC_ENTER_API_NOCLEAR(FAIL)
/*NO TRACE*/
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ 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 */
walk_op.vers = 1;
walk_op.u.func1 = func;
- if(H5E_walk(estack, direction, &walk_op, client_data) < 0)
+ if(H5E__walk(estack, direction, &walk_op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTLIST, FAIL, "can't walk error stack")
done:
@@ -333,24 +333,19 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Eget_auto1
+ * Function: H5Eget_auto1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatbility.
* Returns the current settings for the automatic error stack
- * traversal function and its data for specific error stack.
- * Either (or both) arguments may be null in which case the
- * value is not returned.
+ * traversal function and its data for specific error stack.
+ * Either (or both) arguments may be null in which case the
+ * value is not returned.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Sep 16, 2003
*
- * Modification:Raymond Lu
- * 4 October 2010
- * If the printing function isn't the default H5Eprint1 or 2,
- * and H5Eset_auto2 has been called to set the new style
- * printing function, a call to H5Eget_auto1 should fail.
*-------------------------------------------------------------------------
*/
herr_t
@@ -364,11 +359,11 @@ H5Eget_auto1(H5E_auto1_t *func, void **client_data)
H5TRACE2("e", "*x**x", func, client_data);
/* Retrieve default error stack */
- if(NULL == (estack = H5E_get_my_stack())) /*lint !e506 !e774 Make lint 'constant value Boolean' in non-threaded case */
+ 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")
/* Get the automatic error reporting information */
- if(H5E_get_auto(estack, &auto_op, 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")
/* Fail if the printing function isn't the default(user-set) and set through H5Eset_auto2 */
@@ -384,29 +379,26 @@ done:
/*-------------------------------------------------------------------------
- * Function: H5Eset_auto1
+ * Function: H5Eset_auto1
*
- * Purpose: This function is for backward compatibility.
+ * Purpose: This function is for backward compatbility.
* Turns on or off automatic printing of errors for certain
* error stack. When turned on (non-null FUNC pointer) any
* API function which returns an error indication will first
* call FUNC passing it CLIENT_DATA as an argument.
*
- * The default values before this function is called are
- * H5Eprint1() with client data being the standard error stream,
- * stderr.
+ * The default values before this function is called are
+ * H5Eprint1() with client data being the standard error stream,
+ * stderr.
*
- * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
- * direction.
+ * Automatic stack traversal is always in the H5E_WALK_DOWNWARD
+ * direction.
*
- * Return: Non-negative on success/Negative on failure
+ * Return: SUCCEED/FAIL
*
* Programmer: Raymond Lu
* Sep 16, 2003
*
- * Modification:Raymond Lu
- * 4 October 2010
- * If the FUNC is H5Eprint2, put the IS_DEFAULT flag on.
*-------------------------------------------------------------------------
*/
herr_t
@@ -420,11 +412,11 @@ H5Eset_auto1(H5E_auto1_t func, void *client_data)
FUNC_ENTER_API_NOCLEAR(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 */
+ 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")
/* Get the automatic error reporting information */
- if(H5E_get_auto(estack, &auto_op, NULL) < 0)
+ if(H5E__get_auto(estack, &auto_op, NULL) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTGET, FAIL, "can't get automatic error info")
/* Set the automatic error reporting information */
@@ -435,7 +427,7 @@ H5Eset_auto1(H5E_auto1_t func, void *client_data)
auto_op.is_default = TRUE;
auto_op.func1 = func;
- if(H5E_set_auto(estack, &auto_op, client_data) < 0)
+ if(H5E__set_auto(estack, &auto_op, client_data) < 0)
HGOTO_ERROR(H5E_ERROR, H5E_CANTSET, FAIL, "can't set automatic error info")
done: