chiark
/
gitweb
/
~mdw
/
disorder
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1625e11
)
more idiomatic grapheme breaking
author
Richard Kettlewell
<rjk@greenend.org.uk>
Sun, 18 Nov 2007 15:44:12 +0000
(15:44 +0000)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Sun, 18 Nov 2007 15:44:12 +0000
(15:44 +0000)
lib/unicode.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/unicode.c
b/lib/unicode.c
index 0bad74390efce0630cb9defc47d6d19dc54555f1..02b29fcf6757f9f69e4cee2a739f77fa4da63792 100644
(file)
--- a/
lib/unicode.c
+++ b/
lib/unicode.c
@@
-593,7
+593,7
@@
static inline enum unicode_General_Category utf32__general_category(uint32_t c)
* @param c Code point
* @return Grapheme_Break property value of @p c
*/
* @param c Code point
* @return Grapheme_Break property value of @p c
*/
-static enum unicode_Grapheme_Break utf32__grapheme_break(uint32_t c) {
+static
inline
enum unicode_Grapheme_Break utf32__grapheme_break(uint32_t c) {
return utf32__unidata(c)->grapheme_break;
}
return utf32__unidata(c)->grapheme_break;
}
@@
-601,7
+601,7
@@
static enum unicode_Grapheme_Break utf32__grapheme_break(uint32_t c) {
* @param c Code point
* @return Word_Break property value of @p c
*/
* @param c Code point
* @return Word_Break property value of @p c
*/
-static enum unicode_Word_Break utf32__word_break(uint32_t c) {
+static
inline
enum unicode_Word_Break utf32__word_break(uint32_t c) {
return utf32__unidata(c)->word_break;
}
return utf32__unidata(c)->word_break;
}
@@
-659,7
+659,7
@@
int utf32_is_grapheme_boundary(const uint32_t *s, size_t ns, size_t n) {
&& gbafter == unicode_Grapheme_Break_T)
return 0;
/* GB9 */
&& gbafter == unicode_Grapheme_Break_T)
return 0;
/* GB9 */
- if(
utf32__word_break(after) == unicode_Word
_Break_Extend)
+ if(
gbafter == unicode_Grapheme
_Break_Extend)
return 0;
/* GB10 */
return 1;
return 0;
/* GB10 */
return 1;