summaryrefslogtreecommitdiffstats
path: root/src/H5PL.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /src/H5PL.c
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'src/H5PL.c')
-rw-r--r--src/H5PL.c66
1 files changed, 26 insertions, 40 deletions
diff --git a/src/H5PL.c b/src/H5PL.c
index 0f0f88a..57c9a12 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -14,48 +14,39 @@
/* Module Setup */
/****************/
-#include "H5PLmodule.h" /* This source code file is part of the H5PL module */
-
+#include "H5PLmodule.h" /* This source code file is part of the H5PL module */
/***********/
/* Headers */
/***********/
-#include "H5private.h" /* Generic Functions */
-#include "H5Eprivate.h" /* Error handling */
-#include "H5PLpkg.h" /* Plugin */
-
+#include "H5private.h" /* Generic Functions */
+#include "H5Eprivate.h" /* Error handling */
+#include "H5PLpkg.h" /* Plugin */
/****************/
/* Local Macros */
/****************/
-
/******************/
/* Local Typedefs */
/******************/
-
/********************/
/* Local Prototypes */
/********************/
-
/*********************/
/* Package Variables */
/*********************/
-
/*****************************/
/* Library Private Variables */
/*****************************/
-
/*******************/
/* Local Variables */
/*******************/
-
-
/*-------------------------------------------------------------------------
* Function: H5PLset_loading_state
*
@@ -83,20 +74,19 @@
herr_t
H5PLset_loading_state(unsigned int plugin_control_mask)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "Iu", plugin_control_mask);
/* Set the plugin control mask */
- if(H5PL__set_plugin_control_mask(plugin_control_mask) < 0)
+ if (H5PL__set_plugin_control_mask(plugin_control_mask) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTSET, FAIL, "error setting plugin control mask")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5PLset_loading_state() */
-
/*-------------------------------------------------------------------------
* Function: H5PLget_loading_state
*
@@ -116,7 +106,7 @@ done:
herr_t
H5PLget_loading_state(unsigned int *plugin_control_mask)
{
- herr_t ret_value = SUCCEED; /* Return value */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "*Iu", plugin_control_mask);
@@ -125,14 +115,13 @@ H5PLget_loading_state(unsigned int *plugin_control_mask)
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "plugin_control_mask parameter cannot be NULL")
/* Set the plugin control mask */
- if(H5PL__get_plugin_control_mask(plugin_control_mask) < 0)
+ if (H5PL__get_plugin_control_mask(plugin_control_mask) < 0)
HGOTO_ERROR(H5E_ARGS, H5E_CANTGET, FAIL, "error getting plugin control mask")
done:
FUNC_LEAVE_API(ret_value)
} /* end H5PLget_loading_state() */
-
/*-------------------------------------------------------------------------
* Function: H5PLappend
*
@@ -165,7 +154,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5PLappend() */
-
/*-------------------------------------------------------------------------
* Function: H5PLprepend
*
@@ -198,7 +186,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5PLprepend() */
-
/*-------------------------------------------------------------------------
* Function: H5PLreplace
*
@@ -212,8 +199,8 @@ done:
herr_t
H5PLreplace(const char *search_path, unsigned int idx)
{
- unsigned num_paths; /* Current number of stored paths */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned num_paths; /* Current number of stored paths */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "*sIu", search_path, idx);
@@ -229,7 +216,8 @@ H5PLreplace(const char *search_path, unsigned int idx)
if (0 == num_paths)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty")
else if (idx >= num_paths)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL,
+ "index path out of bounds for table - can't be more than %u", (num_paths - 1))
/* Insert the search path into the path table */
if (H5PL__replace_path(search_path, idx) < 0)
@@ -239,7 +227,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5PLreplace() */
-
/*-------------------------------------------------------------------------
* Function: H5PLinsert
*
@@ -254,8 +241,8 @@ done:
herr_t
H5PLinsert(const char *search_path, unsigned int idx)
{
- unsigned num_paths; /* Current number of stored paths */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned num_paths; /* Current number of stored paths */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE2("e", "*sIu", search_path, idx);
@@ -269,7 +256,8 @@ H5PLinsert(const char *search_path, unsigned int idx)
/* Check index */
num_paths = H5PL__get_num_paths();
if ((0 != num_paths) && (idx >= num_paths))
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL,
+ "index path out of bounds for table - can't be more than %u", (num_paths - 1))
/* Insert the search path into the path table */
if (H5PL__insert_path(search_path, idx) < 0)
@@ -279,7 +267,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5PLinsert() */
-
/*-------------------------------------------------------------------------
* Function: H5PLremove
*
@@ -296,8 +283,8 @@ done:
herr_t
H5PLremove(unsigned int idx)
{
- unsigned num_paths; /* Current number of stored paths */
- herr_t ret_value = SUCCEED; /* Return value */
+ unsigned num_paths; /* Current number of stored paths */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE1("e", "Iu", idx);
@@ -307,7 +294,8 @@ H5PLremove(unsigned int idx)
if (0 == num_paths)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty")
else if (idx >= num_paths)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL,
+ "index path out of bounds for table - can't be more than %u", (num_paths - 1))
/* Delete the search path from the path table */
if (H5PL__remove_path(idx) < 0)
@@ -317,7 +305,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5PLremove() */
-
/*-------------------------------------------------------------------------
* Function: H5PLget
*
@@ -345,10 +332,10 @@ done:
ssize_t
H5PLget(unsigned int idx, char *path_buf, size_t buf_size)
{
- unsigned num_paths; /* Current number of stored paths */
- const char *path = NULL; /* path from table */
- size_t path_len = 0; /* Length of path */
- ssize_t ret_value = 0; /* Return value */
+ unsigned num_paths; /* Current number of stored paths */
+ const char *path = NULL; /* path from table */
+ size_t path_len = 0; /* Length of path */
+ ssize_t ret_value = 0; /* Return value */
FUNC_ENTER_API(FAIL)
H5TRACE3("Zs", "Iu*sz", idx, path_buf, buf_size);
@@ -358,7 +345,8 @@ H5PLget(unsigned int idx, char *path_buf, size_t buf_size)
if (0 == num_paths)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "path table is empty")
else if (idx >= num_paths)
- HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL, "index path out of bounds for table - can't be more than %u", (num_paths - 1))
+ HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, FAIL,
+ "index path out of bounds for table - can't be more than %u", (num_paths - 1))
/* Check if the search table is empty */
if (H5PL__get_num_paths() == 0)
@@ -383,7 +371,6 @@ done:
FUNC_LEAVE_API(ret_value)
} /* end H5PLget() */
-
/*-------------------------------------------------------------------------
* Function: H5PLsize
*
@@ -412,4 +399,3 @@ H5PLsize(unsigned int *num_paths)
done:
FUNC_LEAVE_API(ret_value)
} /* end H5PLsize() */
-