diff src/window.c @ 4990:8f0cf4fd3d2c

Automatic merge
author Ben Wing <ben@xemacs.org>
date Sat, 06 Feb 2010 04:01:46 -0600
parents 0d4c9d0f6a8d
children d0c14ea98592 6f2158fa75ed b5df3737028a
line wrap: on
line diff
--- a/src/window.c	Sat Feb 06 03:59:18 2010 -0600
+++ b/src/window.c	Sat Feb 06 04:01:46 2010 -0600
@@ -318,10 +318,10 @@
   if (print_readably)
     printing_unreadable_lcrecord (obj, 0);
 
-  write_c_string (printcharfun, "#<window");
+  write_ascstring (printcharfun, "#<window");
   buf = XWINDOW_BUFFER (obj);
   if (EQ (buf, Qt))
-    write_c_string (printcharfun, " during creation");
+    write_ascstring (printcharfun, " during creation");
   else if (!NILP (buf))
     {
       
@@ -1048,7 +1048,7 @@
 }
 
 int
-window_scrollbar_width (struct window *w)
+window_scrollbar_width (struct window * USED_IF_SCROLLBARS (w))
 {
 #ifdef HAVE_SCROLLBARS
   if (!WINDOW_WIN_P (w)
@@ -1067,7 +1067,7 @@
 /* Horizontal scrollbars are only active on windows with truncation
    turned on. */
 int
-window_scrollbar_height (struct window *w)
+window_scrollbar_height (struct window * USED_IF_SCROLLBARS (w))
 {
 #ifdef HAVE_SCROLLBARS
   if (!WINDOW_WIN_P (w)
@@ -1125,15 +1125,15 @@
              since there is a redisplay condition that these
              structures be identical outside of redisplay. */
 	  dla = window_display_lines (w, DESIRED_DISP);
-	  if (dla && Dynarr_length (dla) && Dynarr_atp (dla, 0)->modeline)
-	    modeline_height = (Dynarr_atp (dla, 0)->ascent +
-			       Dynarr_atp (dla, 0)->descent);
+	  if (dla && Dynarr_length (dla) && Dynarr_begin (dla)->modeline)
+	    modeline_height = (Dynarr_begin (dla)->ascent +
+			       Dynarr_begin (dla)->descent);
 	  else
 	    {
 	      dla = window_display_lines (w, CURRENT_DISP);
-	      if (dla && Dynarr_length (dla) && Dynarr_atp (dla, 0)->modeline)
-		modeline_height = (Dynarr_atp (dla, 0)->ascent +
-				   Dynarr_atp (dla, 0)->descent);
+	      if (dla && Dynarr_length (dla) && Dynarr_begin (dla)->modeline)
+		modeline_height = (Dynarr_begin (dla)->ascent +
+				   Dynarr_begin (dla)->descent);
 	      else
 		/* This should be an abort except I'm not yet 100%
                    confident that it won't ever get hit (though I
@@ -1274,7 +1274,8 @@
 }
 
 static int
-window_left_window_gutter_width (struct window *w, int modeline)
+window_left_window_gutter_width (struct window *w,
+				 int USED_IF_SCROLLBARS (modeline))
 {
   if (!NILP (w->hchild) || !NILP (w->vchild))
     return 0;
@@ -1294,7 +1295,8 @@
 }
 
 static int
-window_right_window_gutter_width (struct window *w, int modeline)
+window_right_window_gutter_width (struct window *w,
+				  int USED_IF_SCROLLBARS (modeline))
 {
   int gutter = 0;
 
@@ -1921,7 +1923,7 @@
   struct display_line *dl;
 
   /* No lines - no clipped lines */
-  if (num_lines == 0 || (num_lines == 1 && Dynarr_atp (dla, 0)->modeline))
+  if (num_lines == 0 || (num_lines == 1 && Dynarr_begin (dla)->modeline))
     return Qnil;
 
   dl = Dynarr_atp (dla, num_lines - 1);
@@ -4207,7 +4209,7 @@
      indicates that end-of-buffer is being displayed. */
   if (end_pos == -1)
     {
-      struct display_line *dl = Dynarr_atp (dla, 0);
+      struct display_line *dl = Dynarr_begin (dla);
       int ypos1 = dl->ypos + dl->descent;
       int ypos2 = WINDOW_TEXT_BOTTOM (w);
       Lisp_Object window;
@@ -4242,7 +4244,7 @@
     }
   else
     {
-      if (num_lines > 1 && Dynarr_atp (dla, 0)->modeline)
+      if (num_lines > 1 && Dynarr_begin (dla)->modeline)
 	num_lines--;
 
       if (scroll_on_clipped_lines
@@ -4615,7 +4617,7 @@
     default_face_height_and_width (window, &fheight, &fwidth);
 
   if (Dynarr_length (dla) >= 1)
-    modeline = Dynarr_atp (dla, 0)->modeline;
+    modeline = Dynarr_begin (dla)->modeline;
 
   dl = Dynarr_atp (dla, modeline);
 
@@ -5303,7 +5305,7 @@
       CHECK_INT (pos);
       point = XINT (pos);
 
-      if (Dynarr_length (dla) && Dynarr_atp (dla, 0)->modeline)
+      if (Dynarr_length (dla) && Dynarr_begin (dla)->modeline)
 	first_line = 1;
       else
 	first_line = 0;