bug-gnulib
[Top][All Lists]
Advanced

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

[gbrk improvements 3/3] Rename uc_is_grapheme_cluster_break() to uc_is_g


From: Ben Pfaff
Subject: [gbrk improvements 3/3] Rename uc_is_grapheme_cluster_break() to uc_is_grapheme_break().
Date: Sat, 1 Jan 2011 15:30:10 -0800

This aids consistency, since the "cluster" term is not used elsewhere.

* lib/unigbrk.in.h: Update name.
* lib/unigbrk/u16-grapheme-breaks.c: Update name.
* lib/unigbrk/u16-grapheme-next.c: Update name.
* lib/unigbrk/u16-grapheme-prev.c: Update name.
* lib/unigbrk/u32-grapheme-breaks.c: Update name.
* lib/unigbrk/u32-grapheme-next.c: Update name.
* lib/unigbrk/u32-grapheme-prev.c: Update name.
* lib/unigbrk/u8-grapheme-breaks.c: Update name.
* lib/unigbrk/u8-grapheme-next.c: Update name.
* lib/unigbrk/u8-grapheme-prev.c: Update name.
* lib/unigbrk/uc-is-grapheme-break.c: Update name.
* tests/unigbrk/test-uc-is-grapheme-break.c: Update name.

Suggested by Bruno Haible.
---
 ChangeLog                                 |   18 ++++++++++++++++++
 lib/unigbrk.in.h                          |    2 +-
 lib/unigbrk/u16-grapheme-breaks.c         |    2 +-
 lib/unigbrk/u16-grapheme-next.c           |    2 +-
 lib/unigbrk/u16-grapheme-prev.c           |    2 +-
 lib/unigbrk/u32-grapheme-breaks.c         |    2 +-
 lib/unigbrk/u32-grapheme-next.c           |    2 +-
 lib/unigbrk/u32-grapheme-prev.c           |    2 +-
 lib/unigbrk/u8-grapheme-breaks.c          |    2 +-
 lib/unigbrk/u8-grapheme-next.c            |    2 +-
 lib/unigbrk/u8-grapheme-prev.c            |    2 +-
 lib/unigbrk/uc-is-grapheme-break.c        |    2 +-
 tests/unigbrk/test-uc-is-grapheme-break.c |    2 +-
 13 files changed, 30 insertions(+), 12 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 87c7bcd..1ba0366 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2011-01-01  Ben Pfaff  <address@hidden>
 
+       Rename uc_is_grapheme_cluster_break() to uc_is_grapheme_break()
+       for consistency, since the "cluster" term is not used elsewhere.
+       * lib/unigbrk.in.h: Update name.
+       * lib/unigbrk/u16-grapheme-breaks.c: Update name.
+       * lib/unigbrk/u16-grapheme-next.c: Update name.
+       * lib/unigbrk/u16-grapheme-prev.c: Update name.
+       * lib/unigbrk/u32-grapheme-breaks.c: Update name.
+       * lib/unigbrk/u32-grapheme-next.c: Update name.
+       * lib/unigbrk/u32-grapheme-prev.c: Update name.
+       * lib/unigbrk/u8-grapheme-breaks.c: Update name.
+       * lib/unigbrk/u8-grapheme-next.c: Update name.
+       * lib/unigbrk/u8-grapheme-prev.c: Update name.
+       * lib/unigbrk/uc-is-grapheme-break.c: Update name.
+       * tests/unigbrk/test-uc-is-grapheme-break.c: Update name.
+       Suggested by Bruno Haible.
+
+2011-01-01  Ben Pfaff  <address@hidden>
+
        Remove module 'u8-grapheme-len' as too redundant with
        'u8-grapheme-next'.
        * modules/unigbrk/u8-grapheme-len: Delete file.
diff --git a/lib/unigbrk.in.h b/lib/unigbrk.in.h
index c95b75b..6dda1ea 100644
--- a/lib/unigbrk.in.h
+++ b/lib/unigbrk.in.h
@@ -76,7 +76,7 @@ extern int
    Use A == 0 or B == 0 to indicate start of text or end of text,
    respectively. */
 extern bool
-       uc_is_grapheme_cluster_break (ucs4_t a, ucs4_t b);
+       uc_is_grapheme_break (ucs4_t a, ucs4_t b);
 
 /* Returns the start of the next grapheme cluster following S, or NULL if the
    end of the string has been reached. */
diff --git a/lib/unigbrk/u16-grapheme-breaks.c 
b/lib/unigbrk/u16-grapheme-breaks.c
index 36e559f..b79a8a8 100644
--- a/lib/unigbrk/u16-grapheme-breaks.c
+++ b/lib/unigbrk/u16-grapheme-breaks.c
@@ -36,7 +36,7 @@ u16_grapheme_breaks (const uint16_t *s, size_t n, char *p)
 
       mblen = u16_mbtouc (&next, s, n);
 
-      p[0] = uc_is_grapheme_cluster_break (prev, next);
+      p[0] = uc_is_grapheme_break (prev, next);
       if (mblen > 1)
         p[1] = 0;
 
diff --git a/lib/unigbrk/u16-grapheme-next.c b/lib/unigbrk/u16-grapheme-next.c
index 8ca3a93..c4bed19 100644
--- a/lib/unigbrk/u16-grapheme-next.c
+++ b/lib/unigbrk/u16-grapheme-next.c
@@ -36,7 +36,7 @@ u16_grapheme_next (const uint16_t *s, const uint16_t *end)
       ucs4_t next;
 
       mblen = u16_mbtouc (&next, s, end - s);
-      if (uc_is_grapheme_cluster_break (prev, next))
+      if (uc_is_grapheme_break (prev, next))
         break;
 
       prev = next;
diff --git a/lib/unigbrk/u16-grapheme-prev.c b/lib/unigbrk/u16-grapheme-prev.c
index 353a63a..437f3db 100644
--- a/lib/unigbrk/u16-grapheme-prev.c
+++ b/lib/unigbrk/u16-grapheme-prev.c
@@ -44,7 +44,7 @@ u16_grapheme_prev (const uint16_t *s, const uint16_t *start)
           return start;
         }
 
-      if (uc_is_grapheme_cluster_break (prev, next))
+      if (uc_is_grapheme_break (prev, next))
         break;
 
       s = prev_s;
diff --git a/lib/unigbrk/u32-grapheme-breaks.c 
b/lib/unigbrk/u32-grapheme-breaks.c
index 2b5c12c..09dc238 100644
--- a/lib/unigbrk/u32-grapheme-breaks.c
+++ b/lib/unigbrk/u32-grapheme-breaks.c
@@ -35,7 +35,7 @@ u32_grapheme_breaks (const uint32_t *s, size_t n, char *p)
 
       u32_mbtouc (&next, &s[i], 1);
 
-      p[i] = uc_is_grapheme_cluster_break (prev, next);
+      p[i] = uc_is_grapheme_break (prev, next);
 
       prev = next;
     }
diff --git a/lib/unigbrk/u32-grapheme-next.c b/lib/unigbrk/u32-grapheme-next.c
index 08fa7dd..52dc514 100644
--- a/lib/unigbrk/u32-grapheme-next.c
+++ b/lib/unigbrk/u32-grapheme-next.c
@@ -36,7 +36,7 @@ u32_grapheme_next (const uint32_t *s, const uint32_t *end)
       ucs4_t next;
 
       u32_mbtouc (&next, s, end - s);
-      if (uc_is_grapheme_cluster_break (prev, next))
+      if (uc_is_grapheme_break (prev, next))
         break;
 
       prev = next;
diff --git a/lib/unigbrk/u32-grapheme-prev.c b/lib/unigbrk/u32-grapheme-prev.c
index 7fc90e3..fb0ea13 100644
--- a/lib/unigbrk/u32-grapheme-prev.c
+++ b/lib/unigbrk/u32-grapheme-prev.c
@@ -41,7 +41,7 @@ u32_grapheme_prev (const uint32_t *s, const uint32_t *start)
           return start;
         }
 
-      if (uc_is_grapheme_cluster_break (prev, next))
+      if (uc_is_grapheme_break (prev, next))
         break;
 
       next = prev;
diff --git a/lib/unigbrk/u8-grapheme-breaks.c b/lib/unigbrk/u8-grapheme-breaks.c
index 3fb5522..f145bdc 100644
--- a/lib/unigbrk/u8-grapheme-breaks.c
+++ b/lib/unigbrk/u8-grapheme-breaks.c
@@ -37,7 +37,7 @@ u8_grapheme_breaks (const uint8_t *s, size_t n, char *p)
 
       mblen = u8_mbtouc (&next, s, n);
 
-      p[0] = uc_is_grapheme_cluster_break (prev, next);
+      p[0] = uc_is_grapheme_break (prev, next);
       for (i = 1; i < mblen; i++)
         p[i] = 0;
 
diff --git a/lib/unigbrk/u8-grapheme-next.c b/lib/unigbrk/u8-grapheme-next.c
index 123af51..068f174 100644
--- a/lib/unigbrk/u8-grapheme-next.c
+++ b/lib/unigbrk/u8-grapheme-next.c
@@ -36,7 +36,7 @@ u8_grapheme_next (const uint8_t *s, const uint8_t *end)
       ucs4_t next;
 
       mblen = u8_mbtouc (&next, s, end - s);
-      if (uc_is_grapheme_cluster_break (prev, next))
+      if (uc_is_grapheme_break (prev, next))
         break;
 
       prev = next;
diff --git a/lib/unigbrk/u8-grapheme-prev.c b/lib/unigbrk/u8-grapheme-prev.c
index ebbdce4..ac866b0 100644
--- a/lib/unigbrk/u8-grapheme-prev.c
+++ b/lib/unigbrk/u8-grapheme-prev.c
@@ -44,7 +44,7 @@ u8_grapheme_prev (const uint8_t *s, const uint8_t *start)
           return start;
         }
 
-      if (uc_is_grapheme_cluster_break (prev, next))
+      if (uc_is_grapheme_break (prev, next))
         break;
 
       s = prev_s;
diff --git a/lib/unigbrk/uc-is-grapheme-break.c 
b/lib/unigbrk/uc-is-grapheme-break.c
index 3e1b6eb..c67a5da 100644
--- a/lib/unigbrk/uc-is-grapheme-break.c
+++ b/lib/unigbrk/uc-is-grapheme-break.c
@@ -90,7 +90,7 @@ static const unsigned short int gb_table[12] =
   };
 
 bool
-uc_is_grapheme_cluster_break (ucs4_t a, ucs4_t b)
+uc_is_grapheme_break (ucs4_t a, ucs4_t b)
 {
   int a_gcp, b_gcp;
 
diff --git a/tests/unigbrk/test-uc-is-grapheme-break.c 
b/tests/unigbrk/test-uc-is-grapheme-break.c
index 859db49..47304f0 100644
--- a/tests/unigbrk/test-uc-is-grapheme-break.c
+++ b/tests/unigbrk/test-uc-is-grapheme-break.c
@@ -134,7 +134,7 @@ main (int argc, char *argv[])
               next = next_int;
             }
 
-          if (uc_is_grapheme_cluster_break (prev, next) != should_break)
+          if (uc_is_grapheme_break (prev, next) != should_break)
             {
               int prev_gbp = uc_graphemeclusterbreak_property (prev);
               int next_gbp = uc_graphemeclusterbreak_property (next);
-- 
1.7.1




reply via email to

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