From 217b2aa0c6bfbbfe271152e2e0d769d3d43386ae Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp@cs.stanford.edu>
Date: Sat, 1 Jan 2011 15:15:40 -0800
Subject: [PATCH] Rename uc_is_grapheme_cluster_break() to
 uc_is_grapheme_break().

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 87c7bcd2c0..1ba03669bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2011-01-01  Ben Pfaff  <blp@cs.stanford.edu>
+
+	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  <blp@cs.stanford.edu>
 
 	Remove module 'u8-grapheme-len' as too redundant with
diff --git a/lib/unigbrk.in.h b/lib/unigbrk.in.h
index c95b75be05..6dda1ea115 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 36e559fb7a..b79a8a8b55 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 8ca3a939fd..c4bed19bba 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 353a63a0b0..437f3db2f8 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 2b5c12c5ad..09dc238c8b 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 08fa7dd10f..52dc514d13 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 7fc90e3b0e..fb0ea1348c 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 3fb552255f..f145bdc0b0 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 123af518cd..068f174b10 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 ebbdce4337..ac866b0e4d 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 3e1b6ebb98..c67a5da1eb 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 859db49289..47304f0374 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);
-- 
2.30.2