aboutsummaryrefslogtreecommitdiffstats
path: root/src/bidi.c
diff options
context:
space:
mode:
authorPaul Eggert2011-08-24 14:20:36 -0700
committerPaul Eggert2011-08-24 14:20:36 -0700
commit011ba6eaacfa50cc9871d0cfea34e8f0a7a5bc43 (patch)
treeced7a98ff1eb289559da6ebfda46a8e436640da6 /src/bidi.c
parentfe4496a6e27ac892283b8568adbd12831868cc54 (diff)
parentf22f4808a08e8f985d5e6175bbd13d5260e1ab1a (diff)
downloademacs-011ba6eaacfa50cc9871d0cfea34e8f0a7a5bc43.tar.gz
emacs-011ba6eaacfa50cc9871d0cfea34e8f0a7a5bc43.zip
Merge from trunk.
Diffstat (limited to 'src/bidi.c')
-rw-r--r--src/bidi.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/bidi.c b/src/bidi.c
index 769a14f089b..433c2cea2dc 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -108,8 +108,12 @@ bidi_get_type (int ch, bidi_dir_t override)
108 abort (); 108 abort ();
109 109
110 default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); 110 default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch));
111 if (default_type == 0) 111 /* Every valid character code, even those that are unassigned by the
112 default_type = STRONG_L; 112 UCD, have some bidi-class property, according to
113 DerivedBidiClass.txt file. Therefore, if we ever get UNKNOWN_BT
114 (= zero) code from CHAR_TABLE_REF, that's a bug. */
115 if (default_type == UNKNOWN_BT)
116 abort ();
113 117
114 if (override == NEUTRAL_DIR) 118 if (override == NEUTRAL_DIR)
115 return default_type; 119 return default_type;
@@ -142,11 +146,10 @@ bidi_get_type (int ch, bidi_dir_t override)
142 } 146 }
143} 147}
144 148
145static void 149static inline void
146bidi_check_type (bidi_type_t type) 150bidi_check_type (bidi_type_t type)
147{ 151{
148 if (type < UNKNOWN_BT || type > NEUTRAL_ON) 152 xassert (UNKNOWN_BT <= type && type <= NEUTRAL_ON);
149 abort ();
150} 153}
151 154
152/* Given a bidi TYPE of a character, return its category. */ 155/* Given a bidi TYPE of a character, return its category. */
@@ -549,6 +552,8 @@ bidi_cache_iterator_state (struct bidi_it *bidi_it, int resolved)
549 bidi_cache[idx].next_for_neutral = bidi_it->next_for_neutral; 552 bidi_cache[idx].next_for_neutral = bidi_it->next_for_neutral;
550 bidi_cache[idx].next_for_ws = bidi_it->next_for_ws; 553 bidi_cache[idx].next_for_ws = bidi_it->next_for_ws;
551 bidi_cache[idx].ignore_bn_limit = bidi_it->ignore_bn_limit; 554 bidi_cache[idx].ignore_bn_limit = bidi_it->ignore_bn_limit;
555 bidi_cache[idx].disp_pos = bidi_it->disp_pos;
556 bidi_cache[idx].disp_prop_p = bidi_it->disp_prop_p;
552 } 557 }
553 558
554 bidi_cache_last_idx = idx; 559 bidi_cache_last_idx = idx;