comparison src/redisplay-tty.c @ 4928:ea701c23ed84

change text_width method to take a window, in preparation for unicode-internal changes -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-01-19 Ben Wing <ben@xemacs.org> * console-impl.h (struct console_methods): * console-stream.c (stream_text_width): * redisplay-msw.c (mswindows_output_string): * redisplay-msw.c (mswindows_text_width): * redisplay-tty.c (tty_text_width): * redisplay-xlike-inc.c (XLIKE_text_width): * redisplay-xlike-inc.c (XLIKE_output_string): * redisplay.c: * redisplay.c (redisplay_window_text_width_ichar_string): * redisplay.c (redisplay_text_width_string): Change the text_width method to take a window instead of a frame. Needed for Unicode-internal.
author Ben Wing <ben@xemacs.org>
date Tue, 19 Jan 2010 11:21:34 -0600
parents f6cd5fe9bf4c
children 304aebb79cd3
comparison
equal deleted inserted replaced
4882:eab9498ecc0e 4928:ea701c23ed84
104 is considered to be fixed width -- in other words, we return LEN. 104 is considered to be fixed width -- in other words, we return LEN.
105 Under Mule, however, a character can still cover more than one 105 Under Mule, however, a character can still cover more than one
106 column, so we use ichar_string_displayed_columns(). 106 column, so we use ichar_string_displayed_columns().
107 ****************************************************************************/ 107 ****************************************************************************/
108 static int 108 static int
109 tty_text_width (struct frame *f, struct face_cachel *UNUSED (cachel), 109 tty_text_width (struct window *w, struct face_cachel *UNUSED (cachel),
110 const Ichar *str, Charcount len) 110 const Ichar *str, Charcount len)
111 { 111 {
112 struct console *c = XCONSOLE(FRAME_CONSOLE (f)); 112 struct console *c = WINDOW_XCONSOLE (w);
113 113
114 if (CONSOLE_TTY_MULTIPLE_WIDTH (c)) 114 if (CONSOLE_TTY_MULTIPLE_WIDTH (c))
115 { 115 {
116 return ichar_string_displayed_columns (str, len); 116 return ichar_string_displayed_columns (str, len);
117 } 117 }