blob: 03dbc0f3d1c3aec3e5b7c5141520b54acd1ca6c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
Index: wtf/unicode/glib/UnicodeMacrosFromICU.h
===================================================================
--- a/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h (revision 44458)
+++ b/JavaScriptCore/wtf/unicode/glib/UnicodeMacrosFromICU.h (working copy)
@@ -41,6 +41,17 @@
#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c)
#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0)
+#define U16_PREV(s, start, i, c) { \
+ (c)=(s)[--(i)]; \
+ if(U16_IS_TRAIL(c)) { \
+ uint16_t __c2; \
+ if((i)>(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \
+ --(i); \
+ (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \
+ } \
+ } \
+}
+
#define U16_NEXT(s, i, length, c) { \
(c)=(s)[(i)++]; \
if(U16_IS_LEAD(c)) { \
|