Started work on reordering display strings. Refactor FETCH_CHAR.
authorEli Zaretskii <eliz@gnu.org>
Tue, 10 May 2011 16:12:16 +0000 (19:12 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 10 May 2011 16:12:16 +0000 (19:12 +0300)
commit182ce2d254ed316239b8deab8adac05c3dbe0149
tree8df1f0ece905ab62db502e6fe30cd45acfc6837e
parentffb54e99ad5c0c3529e22eec4d112d64977f81a3
Started work on reordering display strings. Refactor FETCH_CHAR.
Only compiled, not tested.

 src/xdisp.c (compute_display_string_pos): New function.
 (reseat_1): Initialize bidi_it.disp_pos.
 src/bidi.c (bidi_copy_it): Use offsetof.
 (bidi_fetch_char, bidi_fetch_char_advance): New functions.
 (bidi_cache_search, bidi_cache_iterator_state)
 (bidi_paragraph_init, bidi_resolve_explicit, bidi_resolve_weak)
 (bidi_level_of_next_char, bidi_move_to_visually_next): Support
 character positions inside a run of characters covered by a
 display string.
 (bidi_paragraph_init, bidi_resolve_explicit_1)
 (bidi_level_of_next_char): Call bidi_fetch_char and
 bidi_fetch_char_advance instead of FETCH_CHAR and
 FETCH_CHAR_ADVANCE.
 (bidi_init_it): Initialize new members.
 (LRE_CHAR, RLE_CHAR, PDF_CHAR, LRO_CHAR, RLO_CHAR): Remove macro
 definitions.
 (bidi_explicit_dir_char): Lookup character type in bidi_type_table,
 instead of using explicit *_CHAR codes.
 (bidi_resolve_explicit, bidi_resolve_weak): Use
 FETCH_MULTIBYTE_CHAR instead of FETCH_CHAR, as reordering of
 bidirectional text is supported only in multibyte buffers.
 src/dispextern.h (struct bidi_it): New members nchars and disp_pos.
 ch_len is now EMACS_INT.
 (compute_display_string_pos): Declare prototype.
src/ChangeLog
src/bidi.c
src/dispextern.h
src/xdisp.c