From: Ben Pfaff Date: Sat, 1 Jan 2011 23:15:40 +0000 (-0800) Subject: Rename uc_is_grapheme_cluster_break() to uc_is_grapheme_break(). X-Git-Tag: v0.1~3405 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=217b2aa0c6bfbbfe271152e2e0d769d3d43386ae;hp=06f7622100701688a981cb30c50bfff789522516;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 87c7bcd2c..1ba03669b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,23 @@ 2011-01-01 Ben Pfaff + 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 + 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 c95b75be0..6dda1ea11 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 36e559fb7..b79a8a8b5 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 8ca3a939f..c4bed19bb 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 353a63a0b..437f3db2f 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 2b5c12c5a..09dc238c8 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 08fa7dd10..52dc514d1 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 7fc90e3b0..fb0ea1348 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 3fb552255..f145bdc0b 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 123af518c..068f174b1 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 ebbdce433..ac866b0e4 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 3e1b6ebb9..c67a5da1e 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 859db4928..47304f037 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);