aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-07-01 11:45:24 +0300
committerEli Zaretskii2011-07-01 11:45:24 +0300
commit7e2ad32c19096fb9a86fbb88f7e7b1ed90a332e9 (patch)
treec6b99e45b004ecf2a99a3cc5c6efe988cef74d93 /src
parenta1344e7d125a094bf49460f1a356f98fa86a8f9f (diff)
downloademacs-7e2ad32c19096fb9a86fbb88f7e7b1ed90a332e9.tar.gz
emacs-7e2ad32c19096fb9a86fbb88f7e7b1ed90a332e9.zip
Fix typos in comments. Use xassert.
Diffstat (limited to 'src')
-rw-r--r--src/bidi.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/bidi.c b/src/bidi.c
index 0cd8deb47c0..5c9239d60f0 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -240,8 +240,7 @@ bidi_push_embedding_level (struct bidi_it *bidi_it,
240 int level, bidi_dir_t override) 240 int level, bidi_dir_t override)
241{ 241{
242 bidi_it->stack_idx++; 242 bidi_it->stack_idx++;
243 if (bidi_it->stack_idx >= BIDI_MAXLEVEL) 243 xassert (bidi_it->stack_idx < BIDI_MAXLEVEL);
244 abort ();
245 bidi_it->level_stack[bidi_it->stack_idx].level = level; 244 bidi_it->level_stack[bidi_it->stack_idx].level = level;
246 bidi_it->level_stack[bidi_it->stack_idx].override = override; 245 bidi_it->level_stack[bidi_it->stack_idx].override = override;
247} 246}
@@ -556,9 +555,9 @@ static int bidi_cache_sp;
556 555
557/* Push the bidi iterator state in preparation for reordering a 556/* Push the bidi iterator state in preparation for reordering a
558 different object, e.g. display string found at certain buffer 557 different object, e.g. display string found at certain buffer
559 position. Pushing the bidi iterator boils to saving its entire 558 position. Pushing the bidi iterator boils down to saving its
560 state on the cache and starting a new cache "stacked" on top of the 559 entire state on the cache and starting a new cache "stacked" on top
561 current cache. */ 560 of the current cache. */
562void 561void
563bidi_push_it (struct bidi_it *bidi_it) 562bidi_push_it (struct bidi_it *bidi_it)
564{ 563{
@@ -568,8 +567,7 @@ bidi_push_it (struct bidi_it *bidi_it)
568 memcpy (&bidi_cache[bidi_cache_idx++], bidi_it, sizeof (struct bidi_it)); 567 memcpy (&bidi_cache[bidi_cache_idx++], bidi_it, sizeof (struct bidi_it));
569 568
570 /* Push the current cache start onto the stack. */ 569 /* Push the current cache start onto the stack. */
571 if (bidi_cache_sp >= IT_STACK_SIZE) 570 xassert (bidi_cache_sp < IT_STACK_SIZE);
572 abort ();
573 bidi_cache_start_stack[bidi_cache_sp++] = bidi_cache_start; 571 bidi_cache_start_stack[bidi_cache_sp++] = bidi_cache_start;
574 572
575 /* Start a new level of cache, and make it empty. */ 573 /* Start a new level of cache, and make it empty. */
@@ -2034,7 +2032,7 @@ bidi_move_to_visually_next (struct bidi_it *bidi_it)
2034 } 2032 }
2035 2033
2036 /* The code below can call eval, and thus cause GC. If we are 2034 /* The code below can call eval, and thus cause GC. If we are
2037 iterating a Lisp string, make sure it won't GCed. */ 2035 iterating a Lisp string, make sure it won't be GCed. */
2038 if (STRINGP (bidi_it->string.lstring)) 2036 if (STRINGP (bidi_it->string.lstring))
2039 GCPRO1 (bidi_it->string.lstring); 2037 GCPRO1 (bidi_it->string.lstring);
2040 2038