diff src/redisplay.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 91b3d00e717f
children 19a72041c5ed
line wrap: on
line diff
--- a/src/redisplay.c	Mon Jan 18 08:44:49 2010 -0600
+++ b/src/redisplay.c	Tue Jan 19 11:21:34 2010 -0600
@@ -1,7 +1,7 @@
 /* Display generation from window structure and buffer text.
    Copyright (C) 1994, 1995, 1996 Board of Trustees, University of Illinois.
    Copyright (C) 1995 Free Software Foundation, Inc.
-   Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2005 Ben Wing.
+   Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2005, 2010 Ben Wing.
    Copyright (C) 1995 Sun Microsystems, Inc.
    Copyright (C) 1996 Chuck Thompson.
 
@@ -640,9 +640,9 @@
   window = wrap_window (w);
   ensure_face_cachel_complete (WINDOW_FACE_CACHEL (w, findex), window,
 			       charsets);
-  return DEVMETH (XDEVICE (FRAME_DEVICE (XFRAME (WINDOW_FRAME (w)))),
-		  text_width, (XFRAME (WINDOW_FRAME (w)),
-			       WINDOW_FACE_CACHEL (w, findex), str, len));
+  return DEVMETH (WINDOW_XDEVICE (w),
+		  text_width, (w, WINDOW_FACE_CACHEL (w, findex), str,
+			       len));
 }
 
 static Ichar_dynarr *rtw_ichar_dynarr;
@@ -690,7 +690,12 @@
 			       NILP (window) ? frame : window,
 			       charsets);
   return DEVMETH (XDEVICE (FRAME_DEVICE (XFRAME (frame))),
-		  text_width, (XFRAME (frame),
+		  /* #### Not clear if we're always passed a window, but
+		     I think so.  If not, we will get an abort here,
+		     and then we need to either fix the callers to pass in
+		     a window, or change *text_width() to take a domain
+		     argument. */
+		  text_width, (XWINDOW (window),
 			       &cachel,
 			       Dynarr_atp (rtw_ichar_dynarr, 0),
 			       Dynarr_length (rtw_ichar_dynarr)));