summaryrefslogtreecommitdiffstats
path: root/src/H5PL.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5PL.c')
-rw-r--r--src/H5PL.c46
1 files changed, 29 insertions, 17 deletions
diff --git a/src/H5PL.c b/src/H5PL.c
index bfa3ace..65d6c91 100644
--- a/src/H5PL.c
+++ b/src/H5PL.c
@@ -4,12 +4,10 @@
* *
* This file is part of HDF5. The full HDF5 copyright notice, including *
* terms governing use, modification, and redistribution, is contained in *
- * the files COPYING and Copyright.html. COPYING can be found at the root *
- * of the source code distribution tree; Copyright.html can be found at the *
- * root level of an installed copy of the electronic document set and is *
- * linked from the top-level documents page. It can also be found at *
- * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have access *
- * to either file, you may request a copy from help@hdfgroup.org. *
+ * the COPYING file, which can be found at the root of the source code *
+ * distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+ * If you do not have access to either file, you may request a copy from *
+ * help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/****************/
@@ -200,7 +198,7 @@ H5PL__init_package(void)
* to tell the library to load plugin libraries without search.
*/
if(NULL != (preload_path = HDgetenv("HDF5_PLUGIN_PRELOAD")))
- /* Special symbal "::" means no plugin during data reading. */
+ /* Special symbol "::" means no plugin during data reading. */
if(!HDstrcmp(preload_path, H5PL_NO_PLUGIN))
H5PL_plugin_g = 0;
@@ -417,12 +415,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PLappend(const char* plugin_path)
+H5PLappend(const char *plugin_path)
{
herr_t ret_value = SUCCEED; /* Return value */
char *dl_path = NULL;
FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "*s", plugin_path);
if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM)
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table")
if(NULL == plugin_path)
@@ -450,13 +449,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PLprepend(const char* plugin_path)
+H5PLprepend(const char *plugin_path)
{
herr_t ret_value = SUCCEED; /* Return value */
char *dl_path = NULL;
unsigned int plindex;
FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "*s", plugin_path);
if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM)
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table")
if(NULL == plugin_path)
@@ -486,12 +486,13 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PLreplace(const char* plugin_path, unsigned int index)
+H5PLreplace(const char *plugin_path, unsigned int index)
{
herr_t ret_value = SUCCEED; /* Return value */
char *dl_path = NULL;
FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "*sIu", plugin_path, index);
if(NULL == plugin_path)
HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "no path provided")
if(index >= H5PL_MAX_PATH_NUM)
@@ -520,13 +521,14 @@ done:
*-------------------------------------------------------------------------
*/
herr_t
-H5PLinsert(const char* plugin_path, unsigned int index)
+H5PLinsert(const char *plugin_path, unsigned int index)
{
herr_t ret_value = SUCCEED; /* Return value */
char *dl_path = NULL;
unsigned int plindex;
FUNC_ENTER_API(FAIL)
+ H5TRACE2("e", "*sIu", plugin_path, index);
if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM)
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table")
if(NULL == plugin_path)
@@ -564,6 +566,7 @@ H5PLremove(unsigned int index)
unsigned int plindex;
FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "Iu", index);
if(H5PL_num_paths_g == 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table")
if(index >= H5PL_MAX_PATH_NUM)
@@ -604,10 +607,11 @@ ssize_t
H5PLget(unsigned int index, char *pathname/*out*/, size_t size)
{
ssize_t ret_value = 0; /* Return value */
- ssize_t len = 0; /* Length of pathname */
+ size_t len = 0; /* Length of pathname */
char *dl_path = NULL;
FUNC_ENTER_API(FAIL)
+ H5TRACE3("Zs", "Iuxz", index, pathname, size);
if(H5PL_num_paths_g == 0)
HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "no directories in table")
if(index >= H5PL_MAX_PATH_NUM)
@@ -622,7 +626,7 @@ H5PLget(unsigned int index, char *pathname/*out*/, size_t size)
} /* end if */
/* Set return value */
- ret_value = len;
+ ret_value = (ssize_t)len;
done:
FUNC_LEAVE_API(ret_value)
@@ -634,14 +638,22 @@ done:
*
* Purpose: Query the size of the current list of plugin paths.
*
- * Return: Non-negative or success.
+ * Return: Plugin path size
*
*-------------------------------------------------------------------------
*/
-unsigned int
-H5PLsize(void)
+herr_t
+H5PLsize(unsigned int *listsize)
{
- return (unsigned int)H5PL_num_paths_g;
+ herr_t ret_value = SUCCEED; /* Return value */
+
+ FUNC_ENTER_API(FAIL)
+ H5TRACE1("e", "*Iu", listsize);
+
+ *listsize = (unsigned int)H5PL_num_paths_g;
+
+done:
+ FUNC_LEAVE_API(ret_value)
} /* end H5PLsize() */