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:
fb4c61d
)
Rename word break property values
author
Richard Kettlewell
<rjk@greenend.org.uk>
Sun, 5 Apr 2009 09:59:17 +0000
(10:59 +0100)
committer
Richard Kettlewell
<rjk@greenend.org.uk>
Sun, 5 Apr 2009 09:59:17 +0000
(10:59 +0100)
lib/unicode.c
patch
|
blob
|
blame
|
history
diff --git
a/lib/unicode.c
b/lib/unicode.c
index 6eadb6c1fc41cca292a4fef9703008ba5a96fc3d..5eb319b040eeaf113a121b994f271d19b293077b 100644
(file)
--- a/
lib/unicode.c
+++ b/
lib/unicode.c
@@
-624,7
+624,7
@@
int utf32_iterator_grapheme_boundary(utf32_iterator it) {
* string) and 0 otherwise.
*/
int utf32_iterator_word_boundary(utf32_iterator it) {
* string) and 0 otherwise.
*/
int utf32_iterator_word_boundary(utf32_iterator it) {
- enum unicode_Word_Break
twobefore, before, after,
twoafter;
+ enum unicode_Word_Break
wbtwobefore, wbbefore, wbafter, wb
twoafter;
size_t nn;
/* WB1 and WB2 */
size_t nn;
/* WB1 and WB2 */
@@
-652,8
+652,8
@@
int utf32_iterator_word_boundary(utf32_iterator it) {
* s6.2 changes into account */
/* First we look at the code points after the proposed boundary */
nn = it->n; /* <it->ns */
* s6.2 changes into account */
/* First we look at the code points after the proposed boundary */
nn = it->n; /* <it->ns */
- after = utf32__iterator_word_break(it, it->s[nn++]);
- if(!utf32__boundary_ignorable(after)) {
+
wb
after = utf32__iterator_word_break(it, it->s[nn++]);
+ if(!utf32__boundary_ignorable(
wb
after)) {
/* X (Extend|Format)* -> X */
while(nn < it->ns
&& utf32__boundary_ignorable(utf32__iterator_word_break(it,
/* X (Extend|Format)* -> X */
while(nn < it->ns
&& utf32__boundary_ignorable(utf32__iterator_word_break(it,
@@
-662,71
+662,71
@@
int utf32_iterator_word_boundary(utf32_iterator it) {
}
/* It's possible now that nn=ns */
if(nn < it->ns)
}
/* It's possible now that nn=ns */
if(nn < it->ns)
- twoafter = utf32__iterator_word_break(it, it->s[nn]);
+
wb
twoafter = utf32__iterator_word_break(it, it->s[nn]);
else
else
- twoafter = unicode_Word_Break_Other;
+
wb
twoafter = unicode_Word_Break_Other;
/* We've already recorded the non-ignorable code points before the proposed
* boundary */
/* We've already recorded the non-ignorable code points before the proposed
* boundary */
- before = utf32__iterator_word_break(it, it->last[1]);
- twobefore = utf32__iterator_word_break(it, it->last[0]);
+
wb
before = utf32__iterator_word_break(it, it->last[1]);
+
wb
twobefore = utf32__iterator_word_break(it, it->last[0]);
/* WB5 */
/* WB5 */
- if(before == unicode_Word_Break_ALetter
- && after == unicode_Word_Break_ALetter)
+ if(
wb
before == unicode_Word_Break_ALetter
+ &&
wb
after == unicode_Word_Break_ALetter)
return 0;
/* WB6 */
return 0;
/* WB6 */
- if(before == unicode_Word_Break_ALetter
- && (after == unicode_Word_Break_MidLetter
- || after == unicode_Word_Break_MidNumLet)
- && twoafter == unicode_Word_Break_ALetter)
+ if(
wb
before == unicode_Word_Break_ALetter
+ && (
wb
after == unicode_Word_Break_MidLetter
+ ||
wb
after == unicode_Word_Break_MidNumLet)
+ &&
wb
twoafter == unicode_Word_Break_ALetter)
return 0;
/* WB7 */
return 0;
/* WB7 */
- if(twobefore == unicode_Word_Break_ALetter
- && (before == unicode_Word_Break_MidLetter
- || before == unicode_Word_Break_MidNumLet)
- && after == unicode_Word_Break_ALetter)
+ if(
wb
twobefore == unicode_Word_Break_ALetter
+ && (
wb
before == unicode_Word_Break_MidLetter
+ ||
wb
before == unicode_Word_Break_MidNumLet)
+ &&
wb
after == unicode_Word_Break_ALetter)
return 0;
/* WB8 */
return 0;
/* WB8 */
- if(before == unicode_Word_Break_Numeric
- && after == unicode_Word_Break_Numeric)
+ if(
wb
before == unicode_Word_Break_Numeric
+ &&
wb
after == unicode_Word_Break_Numeric)
return 0;
/* WB9 */
return 0;
/* WB9 */
- if(before == unicode_Word_Break_ALetter
- && after == unicode_Word_Break_Numeric)
+ if(
wb
before == unicode_Word_Break_ALetter
+ &&
wb
after == unicode_Word_Break_Numeric)
return 0;
/* WB10 */
return 0;
/* WB10 */
- if(before == unicode_Word_Break_Numeric
- && after == unicode_Word_Break_ALetter)
+ if(
wb
before == unicode_Word_Break_Numeric
+ &&
wb
after == unicode_Word_Break_ALetter)
return 0;
/* WB11 */
return 0;
/* WB11 */
- if(twobefore == unicode_Word_Break_Numeric
- && (before == unicode_Word_Break_MidNum
- || before == unicode_Word_Break_MidNumLet)
- && after == unicode_Word_Break_Numeric)
+ if(
wb
twobefore == unicode_Word_Break_Numeric
+ && (
wb
before == unicode_Word_Break_MidNum
+ ||
wb
before == unicode_Word_Break_MidNumLet)
+ &&
wb
after == unicode_Word_Break_Numeric)
return 0;
/* WB12 */
return 0;
/* WB12 */
- if(before == unicode_Word_Break_Numeric
- && (after == unicode_Word_Break_MidNum
- || after == unicode_Word_Break_MidNumLet)
- && twoafter == unicode_Word_Break_Numeric)
+ if(
wb
before == unicode_Word_Break_Numeric
+ && (
wb
after == unicode_Word_Break_MidNum
+ ||
wb
after == unicode_Word_Break_MidNumLet)
+ &&
wb
twoafter == unicode_Word_Break_Numeric)
return 0;
/* WB13 */
return 0;
/* WB13 */
- if(before == unicode_Word_Break_Katakana
- && after == unicode_Word_Break_Katakana)
+ if(
wb
before == unicode_Word_Break_Katakana
+ &&
wb
after == unicode_Word_Break_Katakana)
return 0;
/* WB13a */
return 0;
/* WB13a */
- if((before == unicode_Word_Break_ALetter
- || before == unicode_Word_Break_Numeric
- || before == unicode_Word_Break_Katakana
- || before == unicode_Word_Break_ExtendNumLet)
- && after == unicode_Word_Break_ExtendNumLet)
+ if((
wb
before == unicode_Word_Break_ALetter
+ ||
wb
before == unicode_Word_Break_Numeric
+ ||
wb
before == unicode_Word_Break_Katakana
+ ||
wb
before == unicode_Word_Break_ExtendNumLet)
+ &&
wb
after == unicode_Word_Break_ExtendNumLet)
return 0;
/* WB13b */
return 0;
/* WB13b */
- if(before == unicode_Word_Break_ExtendNumLet
- && (after == unicode_Word_Break_ALetter
- || after == unicode_Word_Break_Numeric
- || after == unicode_Word_Break_Katakana))
+ if(
wb
before == unicode_Word_Break_ExtendNumLet
+ && (
wb
after == unicode_Word_Break_ALetter
+ ||
wb
after == unicode_Word_Break_Numeric
+ ||
wb
after == unicode_Word_Break_Katakana))
return 0;
/* WB14 */
return 1;
return 0;
/* WB14 */
return 1;