bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/5] bitset: comment changes


From: Akim Demaille
Subject: [PATCH 1/5] bitset: comment changes
Date: Sun, 15 Nov 2020 14:11:37 +0100

* lib/bitset.c: Move some documenting comments to...
* lib/bitset.h: here.
* lib/bitset/array.c: Fix some comments.
---
 ChangeLog          |  7 +++++++
 lib/bitset.c       |  4 ----
 lib/bitset.h       | 20 ++++++++++++--------
 lib/bitset/array.c |  6 +++---
 4 files changed, 22 insertions(+), 15 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 4abbcd385..f25a948eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2020-11-15  Akim Demaille  <akim@lrde.epita.fr>
+
+       bitset: comment changes
+       * lib/bitset.c: Move some documenting comments to...
+       * lib/bitset.h: here.
+       * lib/bitset/array.c: Fix some comments.
+
 2020-11-14  Paul Eggert  <eggert@cs.ucla.edu>
 
        careadlinkat: warn better about GCC bug 93644
diff --git a/lib/bitset.c b/lib/bitset.c
index 70752b621..06a47ad64 100644
--- a/lib/bitset.c
+++ b/lib/bitset.c
@@ -207,8 +207,6 @@ bitset_type_name_get (bitset bset)
 }
 
 
-/* Find next bit set in SRC starting from and including BITNO.
-   Return BITSET_BINDEX_MAX if SRC empty.  */
 bitset_bindex
 bitset_next (bitset src, bitset_bindex bitno)
 {
@@ -228,8 +226,6 @@ bitset_compatible_p (bitset bset1, bitset bset2)
 }
 
 
-/* Find previous bit set in SRC starting from and including BITNO.
-   Return BITSET_BINDEX_MAX if SRC empty.  */
 bitset_bindex
 bitset_prev (bitset src, bitset_bindex bitno)
 {
diff --git a/lib/bitset.h b/lib/bitset.h
index a13b8d4d1..172b2c575 100644
--- a/lib/bitset.h
+++ b/lib/bitset.h
@@ -282,17 +282,21 @@ bitset_test (bitset bset, bitset_bindex bitno)
 /* Return true if both bitsets are of the same type and size.  */
 bool bitset_compatible_p (bitset bset1, bitset bset2);
 
-/* Find next set bit from the given bit index.  */
-bitset_bindex bitset_next (bitset, bitset_bindex);
+/* Find next bit set in SRC starting from and including BITNO.
+   Return BITSET_BINDEX_MAX if SRC empty.  */
+bitset_bindex bitset_next (bitset src, bitset_bindex bitno);
 
-/* Find previous set bit from the given bit index.  */
-bitset_bindex bitset_prev (bitset, bitset_bindex);
+/* Find previous bit set in SRC starting from and including BITNO.
+   Return BITSET_BINDEX_MAX if SRC empty.  */
+bitset_bindex bitset_prev (bitset src, bitset_bindex bitno);
 
-/* Find first set bit.  */
-bitset_bindex bitset_first (bitset);
+/* Find first set bit.
+   Return BITSET_BINDEX_MAX if SRC empty.  */
+bitset_bindex bitset_first (bitset src);
 
-/* Find last set bit.  */
-bitset_bindex bitset_last (bitset);
+/* Find last set bit.
+   Return BITSET_BINDEX_MAX if SRC empty.  */
+bitset_bindex bitset_last (bitset src);
 
 /* Return nonzero if this is the only set bit.  */
 bool bitset_only_set_p (bitset, bitset_bindex);
diff --git a/lib/bitset/array.c b/lib/bitset/array.c
index f350b53eb..1db583891 100644
--- a/lib/bitset/array.c
+++ b/lib/bitset/array.c
@@ -42,7 +42,7 @@ abitset_resize (bitset src, bitset_bindex size)
   return size;
 }
 
-/* Find list of up to NUM bits set in BSET starting from and including
+/* Find list of up to NUM bits set in SRC starting from and including
    *NEXT and store in array LIST.  Return with actual number of bits
    found and with *NEXT indicating where search stopped.  */
 static bitset_bindex
@@ -130,7 +130,7 @@ abitset_test (bitset src MAYBE_UNUSED,
 }
 
 
-/* Find list of up to NUM bits set in BSET in reverse order, starting
+/* Find list of up to NUM bits set in SRC in reverse order, starting
    from and including NEXT and store in array LIST.  Return with
    actual number of bits found and with *NEXT indicating where search
    stopped.  */
@@ -182,7 +182,7 @@ abitset_list_reverse (bitset src, bitset_bindex *list,
 }
 
 
-/* Find list of up to NUM bits set in BSET starting from and including
+/* Find list of up to NUM bits set in SRC starting from and including
    *NEXT and store in array LIST.  Return with actual number of bits
    found and with *NEXT indicating where search stopped.  */
 static bitset_bindex
-- 
2.29.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]