emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104626: Fixes for GLYPH_DEBUG.


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104626: Fixes for GLYPH_DEBUG.
Date: Sat, 18 Jun 2011 15:15:06 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104626
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sat 2011-06-18 15:15:06 -0400
message:
  Fixes for GLYPH_DEBUG.
  
  * dispnew.c (add_window_display_history): Use BVAR.
  
  * xdisp.c (debug_method_add): Use BVAR.
  (check_window_end, dump_glyph_matrix, dump_glyph)
  (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
  
  * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
  Likewise.
  
  * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
  check till after the cache is created in init_frame_faces.
modified:
  src/ChangeLog
  src/dispnew.c
  src/xdisp.c
  src/xfaces.c
  src/xfns.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2011-06-17 15:18:54 +0000
+++ b/src/ChangeLog     2011-06-18 19:15:06 +0000
@@ -1,3 +1,17 @@
+2011-06-18  Chong Yidong  <address@hidden>
+
+       * dispnew.c (add_window_display_history): Use BVAR.
+
+       * xdisp.c (debug_method_add): Use BVAR.
+       (check_window_end, dump_glyph_matrix, dump_glyph)
+       (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
+
+       * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
+       Likewise.
+
+       * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
+       check till after the cache is created in init_frame_faces.
+
 2011-06-17  Stefan Monnier  <address@hidden>
 
        * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.

=== modified file 'src/dispnew.c'
--- a/src/dispnew.c     2011-06-10 06:55:18 +0000
+++ b/src/dispnew.c     2011-06-18 19:15:06 +0000
@@ -310,8 +310,8 @@
           history_tick++,
           w,
           ((BUFFERP (w->buffer)
-            && STRINGP (XBUFFER (w->buffer)->name))
-           ? SSDATA (XBUFFER (w->buffer)->name)
+            && STRINGP (BVAR (XBUFFER (w->buffer), name)))
+           ? SSDATA (BVAR (XBUFFER (w->buffer), name))
            : "???"),
           paused_p ? " ***paused***" : "");
   strcat (buf, msg);

=== modified file 'src/xdisp.c'
--- a/src/xdisp.c       2011-06-14 18:57:19 +0000
+++ b/src/xdisp.c       2011-06-18 19:15:06 +0000
@@ -2248,8 +2248,7 @@
    to be---the last row in the current matrix displaying text.  */
 
 static void
-check_window_end (w)
-     struct window *w;
+check_window_end (struct window *w)
 {
   if (!MINI_WINDOW_P (w)
       && !NILP (w->window_end_valid))
@@ -11147,8 +11146,8 @@
     fprintf (stderr, "%p (%s): %s\n",
             w,
             ((BUFFERP (w->buffer)
-              && STRINGP (XBUFFER (w->buffer)->name))
-             ? SSDATA (XBUFFER (w->buffer)->name)
+              && STRINGP (BVAR (XBUFFER (w->buffer), name)))
+             ? SSDATA (BVAR (XBUFFER (w->buffer), name))
              : "no buffer"),
             buffer);
 }
@@ -16277,9 +16276,7 @@
    GLYPHS > 1 means show glyphs in long form.  */
 
 void
-dump_glyph_matrix (matrix, glyphs)
-     struct glyph_matrix *matrix;
-     int glyphs;
+dump_glyph_matrix (struct glyph_matrix *matrix, int glyphs)
 {
   int i;
   for (i = 0; i < matrix->nrows; ++i)
@@ -16291,10 +16288,7 @@
    the glyph row and area where the glyph comes from.  */
 
 void
-dump_glyph (row, glyph, area)
-     struct glyph_row *row;
-     struct glyph *glyph;
-     int area;
+dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
 {
   if (glyph->type == CHAR_GLYPH)
     {
@@ -16387,9 +16381,7 @@
    GLYPHS > 1 means show glyphs in long form.  */
 
 void
-dump_glyph_row (row, vpos, glyphs)
-     struct glyph_row *row;
-     int vpos, glyphs;
+dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
 {
   if (glyphs != 1)
     {
@@ -20470,8 +20462,7 @@
 #if GLYPH_DEBUG
 
 void
-dump_glyph_string (s)
-     struct glyph_string *s;
+dump_glyph_string (struct glyph_string *s)
 {
   fprintf (stderr, "glyph string\n");
   fprintf (stderr, "  x, y, w, h = %d, %d, %d, %d\n",

=== modified file 'src/xfaces.c'
--- a/src/xfaces.c      2011-06-13 05:15:27 +0000
+++ b/src/xfaces.c      2011-06-18 19:15:06 +0000
@@ -1858,8 +1858,7 @@
 /* Check consistency of Lisp face attribute vector ATTRS.  */
 
 static void
-check_lface_attrs (attrs)
-     Lisp_Object *attrs;
+check_lface_attrs (Lisp_Object *attrs)
 {
   xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
           || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX])
@@ -1930,8 +1929,7 @@
 /* Check consistency of attributes of Lisp face LFACE (a Lisp vector).  */
 
 static void
-check_lface (lface)
-     Lisp_Object lface;
+check_lface (Lisp_Object lface)
 {
   if (!NILP (lface))
     {
@@ -2008,24 +2006,6 @@
 }
 
 
-
-#if 0                          /* Seems to be unused.  */
-static Lisp_Object
-internal_resolve_face_name (nargs, args)
-     int nargs;
-     Lisp_Object *args;
-{
-  return Fget (args[0], args[1]);
-}
-
-static Lisp_Object
-resolve_face_name_error (ignore)
-     Lisp_Object ignore;
-{
-  return Qnil;
-}
-#endif
-
 /* Resolve face name FACE_NAME.  If FACE_NAME is a string, intern it
    to make it a symbol.  If FACE_NAME is an alias for another face,
    return that face's name.
@@ -6331,8 +6311,7 @@
 /* Print the contents of the realized face FACE to stderr.  */
 
 static void
-dump_realized_face (face)
-     struct face *face;
+dump_realized_face (struct face *face)
 {
   fprintf (stderr, "ID: %d\n", face->id);
 #ifdef HAVE_X_WINDOWS

=== modified file 'src/xfns.c'
--- a/src/xfns.c        2011-06-15 18:07:38 +0000
+++ b/src/xfns.c        2011-06-18 19:15:06 +0000
@@ -3156,10 +3156,6 @@
 
   /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe.  */
   record_unwind_protect (unwind_create_frame, frame);
-#if GLYPH_DEBUG
-  image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
-  dpyinfo_refcount = dpyinfo->reference_count;
-#endif /* GLYPH_DEBUG */
 
   /* These colors will be set anyway later, but it's important
      to get the color reference counts right, so initialize them!  */
@@ -3314,6 +3310,11 @@
      happen.  */
   init_frame_faces (f);
 
+#if GLYPH_DEBUG
+  image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
+  dpyinfo_refcount = dpyinfo->reference_count;
+#endif /* GLYPH_DEBUG */
+
   /* The X resources controlling the menu-bar and tool-bar are
      processed specially at startup, and reflected in the mode
      variables; ignore them here.  */
@@ -4606,10 +4607,6 @@
 #endif /* USE_TOOLKIT_SCROLL_BARS */
   f->icon_name = Qnil;
   FRAME_X_DISPLAY_INFO (f) = dpyinfo;
-#if GLYPH_DEBUG
-  image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
-  dpyinfo_refcount = dpyinfo->reference_count;
-#endif /* GLYPH_DEBUG */
   f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
   f->output_data.x->explicit_parent = 0;
 
@@ -4721,6 +4718,11 @@
      happen.  */
   init_frame_faces (f);
 
+#if GLYPH_DEBUG
+  image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
+  dpyinfo_refcount = dpyinfo->reference_count;
+#endif /* GLYPH_DEBUG */
+
   f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
 
   x_figure_window_size (f, parms, 0);


reply via email to

[Prev in Thread] Current Thread [Next in Thread]