summaryrefslogtreecommitdiffstats
path: root/c++/test/titerate.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2017-12-04 18:21:12 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2017-12-04 18:21:12 (GMT)
commite33d677636b860f8f6b95c0ee3736395541a2610 (patch)
treed70dd01c6e75aa27ef6d286c553de06625aa0b8d /c++/test/titerate.cpp
parentf116545ce465181928ca97214b9cfa87092a3ee9 (diff)
downloadhdf5-e33d677636b860f8f6b95c0ee3736395541a2610.zip
hdf5-e33d677636b860f8f6b95c0ee3736395541a2610.tar.gz
hdf5-e33d677636b860f8f6b95c0ee3736395541a2610.tar.bz2
Various code cleanup
Description: - Replaced H5Location::exists with H5Location::nameExists and marked H5Location::exists as deprecated. - Miscellaneous test cleanup for consistency. Platforms tested: Linux/32 2.6 (jam) Linux/64 (jelly) Darwin (osx1010test)
Diffstat (limited to 'c++/test/titerate.cpp')
-rw-r--r--c++/test/titerate.cpp59
1 files changed, 25 insertions, 34 deletions
diff --git a/c++/test/titerate.cpp b/c++/test/titerate.cpp
index 5c760f3..e77ebcc 100644
--- a/c++/test/titerate.cpp
+++ b/c++/test/titerate.cpp
@@ -78,23 +78,25 @@ typedef struct {
int iter_strcmp(const void *s1, const void *s2);
-/****************************************************************
-**
-** iter_strcmp(): String comparison routine for qsort
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: iter_strcmp
+ *
+ * Purpose String comparison routine for qsort
+ *-------------------------------------------------------------------------
+ */
int iter_strcmp(const void *s1, const void *s2)
{
return(HDstrcmp(*(const char * const *)s1,*(const char * const *)s2));
}
-/****************************************************************
-**
-** liter_cb(): Custom link iteration callback routine.
-**
-****************************************************************/
-static herr_t
-liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_info, void *op_data)
+/*-------------------------------------------------------------------------
+ * Function: liter_cb
+ *
+ * Purpose Custom link iteration callback routine
+ *-------------------------------------------------------------------------
+ */
+static herr_t liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_info, void *op_data)
{
iter_info *info = (iter_info *)op_data;
static int count = 0;
@@ -123,6 +125,7 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t H5_ATTR_
} /* end switch */
} /* end liter_cb() */
+
/*-------------------------------------------------------------------------
* Function: test_iter_group
*
@@ -133,9 +136,6 @@ liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t H5_ATTR_
*
* Programmer Binh-Minh Ribler
* Friday, September 9, 2016
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void test_iter_group(FileAccPropList& fapl)
@@ -348,13 +348,13 @@ static void test_iter_group(FileAccPropList& fapl)
#endif
} /* test_iter_group() */
-
-/****************************************************************
-**
-** printelems(): Open an attribute and verify that it has a
-** the correct name
-**
-****************************************************************/
+
+/*-------------------------------------------------------------------------
+ * Function: printelems
+ *
+ * Purpose Open an attribute and verify that it has a the correct name
+ *-------------------------------------------------------------------------
+ */
const H5std_string FILE_NAME("titerate.h5");
const H5std_string GRP_NAME("/Group_A");
const H5std_string FDATASET_NAME("file dset");
@@ -386,6 +386,7 @@ void printelems(const Group& group, const H5std_string& dsname, const H5std_stri
}
}
+
/*-------------------------------------------------------------------------
* Function: test_HDFFV_9920
*
@@ -393,9 +394,6 @@ void printelems(const Group& group, const H5std_string& dsname, const H5std_stri
*
* Programmer Binh-Minh Ribler
* Friday, September 9, 2016
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static void test_HDFFV_9920()
@@ -444,7 +442,7 @@ static void test_HDFFV_9920()
}
}
-
+
/*-------------------------------------------------------------------------
* Function: test_iterate
*
@@ -455,9 +453,6 @@ static void test_HDFFV_9920()
*
* Programmer Binh-Minh Ribler
* Tuesday, September 6, 2016
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
extern "C"
@@ -476,17 +471,13 @@ void test_iterate()
} // test_iterate
+
/*-------------------------------------------------------------------------
* Function: cleanup_iterate
*
* Purpose Cleanup temporary test files
*
* Return none
- *
- * Programmer (use C version)
- *
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
extern "C"