summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5tools_error.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5tools_error.h')
-rw-r--r--tools/lib/h5tools_error.h58
1 files changed, 29 insertions, 29 deletions
diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h
index 5417eb9..8a7414c 100644
--- a/tools/lib/h5tools_error.h
+++ b/tools/lib/h5tools_error.h
@@ -40,27 +40,27 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g;
\
/* Create new HDF5 error stack for the tools to use */ \
if ((H5tools_ERR_STACK_g = H5Ecreate_stack()) < 0) \
- HDfprintf(stderr, "Failed to create HDF5 tools error stack\n"); \
+ fprintf(stderr, "Failed to create HDF5 tools error stack\n"); \
\
/* Register errors from the HDF5 tools as a new error class */ \
if ((H5tools_ERR_CLS_g = H5Eregister_class("H5tools", "HDF5:tools", lib_str)) < 0) \
- HDfprintf(stderr, "Failed to register HDF5 tools error class\n"); \
+ fprintf(stderr, "Failed to register HDF5 tools error class\n"); \
\
/* Create a new HDF5 major error message for errors from the tools library */ \
if ((H5E_tools_g = H5Ecreate_msg(H5tools_ERR_CLS_g, H5E_MAJOR, "Failure in tools library")) < 0) \
- HDfprintf(stderr, "Failed to register major error message for tools library errors\n"); \
+ fprintf(stderr, "Failed to register major error message for tools library errors\n"); \
\
/* Create a new HDF5 minor error message for errors from the tools library */ \
if ((H5E_tools_min_id_g = H5Ecreate_msg(H5tools_ERR_CLS_g, H5E_MINOR, "error in function")) < 0) \
- HDfprintf(stderr, "Failed to register minor error message for tools library errors\n"); \
+ fprintf(stderr, "Failed to register minor error message for tools library errors\n"); \
\
/* Create a new HDF5 minor error message for info messages from the tools library */ \
if ((H5E_tools_min_info_id_g = H5Ecreate_msg(H5tools_ERR_CLS_g, H5E_MINOR, "function info")) < 0) \
- HDfprintf(stderr, "Failed to register minor error message for tools library info messages\n"); \
+ fprintf(stderr, "Failed to register minor error message for tools library info messages\n"); \
\
/* Create a new HDF5 minor error message for debug messages from the tools library */ \
if ((H5E_tools_min_dbg_id_g = H5Ecreate_msg(H5tools_ERR_CLS_g, H5E_MINOR, "function debug")) < 0) \
- HDfprintf(stderr, "Failed to register minor error message for tools library debug messages\n"); \
+ fprintf(stderr, "Failed to register minor error message for tools library debug messages\n"); \
} while (0)
/*
@@ -70,21 +70,21 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g;
do { \
/* Close all error messages created by H5TOOLS_INIT_ERROR() */ \
if (H5Eclose_msg(H5E_tools_min_dbg_id_g) < 0) \
- HDfprintf(stderr, "Failed to close minor error message for tools library debug messages\n"); \
+ fprintf(stderr, "Failed to close minor error message for tools library debug messages\n"); \
if (H5Eclose_msg(H5E_tools_min_info_id_g) < 0) \
- HDfprintf(stderr, "Failed to close minor error message for tools library info messages\n"); \
+ fprintf(stderr, "Failed to close minor error message for tools library info messages\n"); \
if (H5Eclose_msg(H5E_tools_min_id_g) < 0) \
- HDfprintf(stderr, "Failed to close minor error message for tools library errors\n"); \
+ fprintf(stderr, "Failed to close minor error message for tools library errors\n"); \
if (H5Eclose_msg(H5E_tools_g) < 0) \
- HDfprintf(stderr, "Failed to close major error message for tools library errors\n"); \
+ fprintf(stderr, "Failed to close major error message for tools library errors\n"); \
\
/* Unregister the HDF5 tools error class */ \
if (H5Eunregister_class(H5tools_ERR_CLS_g) < 0) \
- HDfprintf(stderr, "Failed to unregister the HDF5 tools error class\n"); \
+ fprintf(stderr, "Failed to unregister the HDF5 tools error class\n"); \
\
/* Close the tools error stack */ \
if (H5Eclose_stack(H5tools_ERR_STACK_g) < 0) \
- HDfprintf(stderr, "Failed to close HDF5 tools error stack\n"); \
+ fprintf(stderr, "Failed to close HDF5 tools error stack\n"); \
} while (0)
/*
@@ -98,8 +98,8 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g;
H5Epush2(estack_id, __FILE__, __func__, __LINE__, err_cls, maj_err_id, min_err_id, \
__VA_ARGS__); \
else { \
- HDfprintf(stderr, __VA_ARGS__); \
- HDfprintf(stderr, "\n"); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
} \
} \
} while (0)
@@ -166,27 +166,27 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g;
#define H5TOOLS_START_DEBUG(...) \
do { \
H5tools_INDENT_g += 2; \
- HDfprintf(stderr, "%*sENTER %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, __func__); \
- HDfprintf(stderr, __VA_ARGS__); \
- HDfprintf(stderr, "\n"); \
- HDfflush(stderr); \
+ fprintf(stderr, "%*sENTER %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, __func__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
+ fflush(stderr); \
} while (0)
#define H5TOOLS_DEBUG(...) \
do { \
- HDfprintf(stderr, "%*s %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, __func__); \
- HDfprintf(stderr, __VA_ARGS__); \
- HDfprintf(stderr, "\n"); \
- HDfflush(stderr); \
+ fprintf(stderr, "%*s %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, __func__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
+ fflush(stderr); \
} while (0)
#define H5TOOLS_ENDDEBUG(...) \
do { \
- HDfprintf(stderr, "%*sEXIT %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, __func__); \
- HDfprintf(stderr, __VA_ARGS__); \
- HDfprintf(stderr, "\n"); \
+ fprintf(stderr, "%*sEXIT %s:%d in %s()...", H5tools_INDENT_g, "", __FILE__, __LINE__, __func__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
H5tools_INDENT_g -= 2; \
- HDfflush(stderr); \
+ fflush(stderr); \
} while (0)
#else
@@ -222,11 +222,11 @@ catch_except:;
* it.
*/
#define H5_LEAVE(v) \
- { \
+ do { \
ret_value = v; \
if (!past_catch) \
goto catch_except; \
- }
+ } while (0)
/*
* H5TOOLS_THROW macro, used to facilitate error reporting within a function body.
@@ -238,7 +238,7 @@ catch_except:;
do { \
H5TOOLS_PUSH_ERROR(H5tools_ERR_STACK_g, H5tools_ERR_CLS_g, H5E_tools_g, H5E_tools_min_id_g, \
__VA_ARGS__); \
- H5_LEAVE(ret_val) \
+ H5_LEAVE(ret_val); \
} while (0)
#endif /* H5TOOLS_ERROR_H */