diff libmlk-util/mlk/util/dir.h @ 577:f937857336f3

util: mlk_dir_iter -> mlk_dir
author David Demelier <markand@malikania.fr>
date Sat, 11 Mar 2023 11:15:09 +0100
parents aaf518c87628
children 22c8e00147c4
line wrap: on
line diff
--- a/libmlk-util/mlk/util/dir.h	Sat Mar 11 11:04:11 2023 +0100
+++ b/libmlk-util/mlk/util/dir.h	Sat Mar 11 11:15:09 2023 +0100
@@ -34,7 +34,7 @@
  * otherwise ::mlk_dir_finish can be used in case the loop was terminated early
  *
  * ```c
- * struct mlk_dir_iter iter;
+ * struct mlk_dir iter;
  *
  * if (mlk_dir_open(&iter, "/tmp") < 0) {
  *     fprintf(stderr, "unable to open the directory\n");
@@ -54,10 +54,10 @@
 #endif
 
 /**
- * \struct mlk_dir_iter
+ * \struct mlk_dir
  * \brief Directory iterator structure
  */
-struct mlk_dir_iter {
+struct mlk_dir {
 	/**
 	 * (read-only, borrowed)
 	 *
@@ -80,7 +80,7 @@
  * \return 0 on success or -1 on error
  */
 int
-mlk_dir_open(struct mlk_dir_iter *iter, const char *path);
+mlk_dir_open(struct mlk_dir *iter, const char *path);
 
 /**
  * Read the next directory entry.
@@ -90,7 +90,7 @@
  * \return 1 on read or 0 on EOF
  */
 int
-mlk_dir_next(struct mlk_dir_iter *iter);
+mlk_dir_next(struct mlk_dir *iter);
 
 /**
  * Cleanup directory iterator resources.
@@ -102,7 +102,7 @@
  * \param iter the directory iterator
  */
 void
-mlk_dir_finish(struct mlk_dir_iter *iter);
+mlk_dir_finish(struct mlk_dir *iter);
 
 #if defined(__cplusplus)
 }