From 6db161bec8de73baa968732345355b5178e1fd30 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 9 Jun 2011 20:12:10 +0300 Subject: Adapt compute_display_string_pos to iteration over strings. Just compiled, not yet tested. src/xdisp.c (compute_display_string_pos): First arg is now struct `text_pos *'; all callers changed. Support display properties on Lisp strings. (compute_display_string_end): Support display properties on Lisp strings. (init_iterator, reseat_1, reseat_to_string): Initialize the string.bufpos member to 0 (zero, for compatibility with IT_CHARPOS when iterating on a string not from display properties). src/bidi.c (bidi_fetch_char): Support strings with display properties. src/dispextern.h (struct bidi_string_data): New member bufpos. (compute_display_string_pos): Update prototype. --- src/dispextern.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dispextern.h') diff --git a/src/dispextern.h b/src/dispextern.h index 979cb43e98..5cb28fa0f7 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -1818,6 +1818,7 @@ struct bidi_string_data { const unsigned char *s; /* string data, or NULL if reordering buffer */ EMACS_INT schars; /* the number of characters in the string, excluding the terminating null */ + EMACS_INT bufpos; /* buffer position of lstring, or 0 if N/A */ unsigned from_disp_str : 1; /* 1 means the string comes from a display property */ }; @@ -3018,7 +3019,7 @@ extern void reseat_at_previous_visible_line_start (struct it *); extern Lisp_Object lookup_glyphless_char_display (int, struct it *); extern int calc_pixel_width_or_height (double *, struct it *, Lisp_Object, struct font *, int, int *); -extern EMACS_INT compute_display_string_pos (EMACS_INT, +extern EMACS_INT compute_display_string_pos (struct text_pos *, struct bidi_string_data *, int); extern EMACS_INT compute_display_string_end (EMACS_INT, struct bidi_string_data *); -- cgit v1.2.3