aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2011-06-18 15:15:06 -0400
committerChong Yidong2011-06-18 15:15:06 -0400
commit7d7d00451f78eafdad6d9c06e51de544137e64fb (patch)
treef63a3d5b67b5e0e5ea0db3e57288c30f54009817
parent61dfb316ecfae23ea093a48ab67b9c66e9d1d7da (diff)
downloademacs-7d7d00451f78eafdad6d9c06e51de544137e64fb.tar.gz
emacs-7d7d00451f78eafdad6d9c06e51de544137e64fb.zip
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.
-rw-r--r--src/ChangeLog16
-rw-r--r--src/dispnew.c4
-rw-r--r--src/xdisp.c23
-rw-r--r--src/xfaces.c27
-rw-r--r--src/xfns.c18
5 files changed, 37 insertions, 51 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index f8e791285b1..a38f79eaa12 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,17 @@
12011-06-18 Chong Yidong <cyd@stupidchicken.com>
2
3 * dispnew.c (add_window_display_history): Use BVAR.
4
5 * xdisp.c (debug_method_add): Use BVAR.
6 (check_window_end, dump_glyph_matrix, dump_glyph)
7 (dump_glyph_row, dump_glyph_string): Convert arglist to ANSI C.
8
9 * xfaces.c (check_lface_attrs, check_lface, dump_realized_face):
10 Likewise.
11
12 * xfns.c (Fx_create_frame, x_create_tip_frame): Delay image cache
13 check till after the cache is created in init_frame_faces.
14
12011-06-17 Stefan Monnier <monnier@iro.umontreal.ca> 152011-06-17 Stefan Monnier <monnier@iro.umontreal.ca>
2 16
3 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup. 17 * fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
@@ -1349,7 +1363,7 @@
13492011-05-18 Christoph Scholtes <cschol2112@googlemail.com> 13632011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
1350 1364
1351 * menu.c: Include limits.h (fixes the MS-Windows build broken by 1365 * menu.c: Include limits.h (fixes the MS-Windows build broken by
1352 revision 104625). 1366 2011-06-18T18:49:19Z!cyd@stupidchicken.com).
1353 1367
13542011-05-18 Paul Eggert <eggert@cs.ucla.edu> 13682011-05-18 Paul Eggert <eggert@cs.ucla.edu>
1355 1369
diff --git a/src/dispnew.c b/src/dispnew.c
index 2dffc0dce25..dbf052dd099 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -310,8 +310,8 @@ add_window_display_history (struct window *w, const char *msg, int paused_p)
310 history_tick++, 310 history_tick++,
311 w, 311 w,
312 ((BUFFERP (w->buffer) 312 ((BUFFERP (w->buffer)
313 && STRINGP (XBUFFER (w->buffer)->name)) 313 && STRINGP (BVAR (XBUFFER (w->buffer), name)))
314 ? SSDATA (XBUFFER (w->buffer)->name) 314 ? SSDATA (BVAR (XBUFFER (w->buffer), name))
315 : "???"), 315 : "???"),
316 paused_p ? " ***paused***" : ""); 316 paused_p ? " ***paused***" : "");
317 strcat (buf, msg); 317 strcat (buf, msg);
diff --git a/src/xdisp.c b/src/xdisp.c
index 5a0b0060fa3..3b34005d389 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -2248,8 +2248,7 @@ check_it (it)
2248 to be---the last row in the current matrix displaying text. */ 2248 to be---the last row in the current matrix displaying text. */
2249 2249
2250static void 2250static void
2251check_window_end (w) 2251check_window_end (struct window *w)
2252 struct window *w;
2253{ 2252{
2254 if (!MINI_WINDOW_P (w) 2253 if (!MINI_WINDOW_P (w)
2255 && !NILP (w->window_end_valid)) 2254 && !NILP (w->window_end_valid))
@@ -11147,8 +11146,8 @@ debug_method_add (w, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9)
11147 fprintf (stderr, "%p (%s): %s\n", 11146 fprintf (stderr, "%p (%s): %s\n",
11148 w, 11147 w,
11149 ((BUFFERP (w->buffer) 11148 ((BUFFERP (w->buffer)
11150 && STRINGP (XBUFFER (w->buffer)->name)) 11149 && STRINGP (BVAR (XBUFFER (w->buffer), name)))
11151 ? SSDATA (XBUFFER (w->buffer)->name) 11150 ? SSDATA (BVAR (XBUFFER (w->buffer), name))
11152 : "no buffer"), 11151 : "no buffer"),
11153 buffer); 11152 buffer);
11154} 11153}
@@ -16277,9 +16276,7 @@ void dump_glyph (struct glyph_row *, struct glyph *, int);
16277 GLYPHS > 1 means show glyphs in long form. */ 16276 GLYPHS > 1 means show glyphs in long form. */
16278 16277
16279void 16278void
16280dump_glyph_matrix (matrix, glyphs) 16279dump_glyph_matrix (struct glyph_matrix *matrix, int glyphs)
16281 struct glyph_matrix *matrix;
16282 int glyphs;
16283{ 16280{
16284 int i; 16281 int i;
16285 for (i = 0; i < matrix->nrows; ++i) 16282 for (i = 0; i < matrix->nrows; ++i)
@@ -16291,10 +16288,7 @@ dump_glyph_matrix (matrix, glyphs)
16291 the glyph row and area where the glyph comes from. */ 16288 the glyph row and area where the glyph comes from. */
16292 16289
16293void 16290void
16294dump_glyph (row, glyph, area) 16291dump_glyph (struct glyph_row *row, struct glyph *glyph, int area)
16295 struct glyph_row *row;
16296 struct glyph *glyph;
16297 int area;
16298{ 16292{
16299 if (glyph->type == CHAR_GLYPH) 16293 if (glyph->type == CHAR_GLYPH)
16300 { 16294 {
@@ -16387,9 +16381,7 @@ dump_glyph (row, glyph, area)
16387 GLYPHS > 1 means show glyphs in long form. */ 16381 GLYPHS > 1 means show glyphs in long form. */
16388 16382
16389void 16383void
16390dump_glyph_row (row, vpos, glyphs) 16384dump_glyph_row (struct glyph_row *row, int vpos, int glyphs)
16391 struct glyph_row *row;
16392 int vpos, glyphs;
16393{ 16385{
16394 if (glyphs != 1) 16386 if (glyphs != 1)
16395 { 16387 {
@@ -20470,8 +20462,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
20470#if GLYPH_DEBUG 20462#if GLYPH_DEBUG
20471 20463
20472void 20464void
20473dump_glyph_string (s) 20465dump_glyph_string (struct glyph_string *s)
20474 struct glyph_string *s;
20475{ 20466{
20476 fprintf (stderr, "glyph string\n"); 20467 fprintf (stderr, "glyph string\n");
20477 fprintf (stderr, " x, y, w, h = %d, %d, %d, %d\n", 20468 fprintf (stderr, " x, y, w, h = %d, %d, %d, %d\n",
diff --git a/src/xfaces.c b/src/xfaces.c
index a56e54c90cd..78ea913526e 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1858,8 +1858,7 @@ the WIDTH times as wide as FACE on FRAME. */)
1858/* Check consistency of Lisp face attribute vector ATTRS. */ 1858/* Check consistency of Lisp face attribute vector ATTRS. */
1859 1859
1860static void 1860static void
1861check_lface_attrs (attrs) 1861check_lface_attrs (Lisp_Object *attrs)
1862 Lisp_Object *attrs;
1863{ 1862{
1864 xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX]) 1863 xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
1865 || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX]) 1864 || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX])
@@ -1930,8 +1929,7 @@ check_lface_attrs (attrs)
1930/* Check consistency of attributes of Lisp face LFACE (a Lisp vector). */ 1929/* Check consistency of attributes of Lisp face LFACE (a Lisp vector). */
1931 1930
1932static void 1931static void
1933check_lface (lface) 1932check_lface (Lisp_Object lface)
1934 Lisp_Object lface;
1935{ 1933{
1936 if (!NILP (lface)) 1934 if (!NILP (lface))
1937 { 1935 {
@@ -2008,24 +2006,6 @@ push_named_merge_point (struct named_merge_point *new_named_merge_point,
2008} 2006}
2009 2007
2010 2008
2011
2012#if 0 /* Seems to be unused. */
2013static Lisp_Object
2014internal_resolve_face_name (nargs, args)
2015 int nargs;
2016 Lisp_Object *args;
2017{
2018 return Fget (args[0], args[1]);
2019}
2020
2021static Lisp_Object
2022resolve_face_name_error (ignore)
2023 Lisp_Object ignore;
2024{
2025 return Qnil;
2026}
2027#endif
2028
2029/* Resolve face name FACE_NAME. If FACE_NAME is a string, intern it 2009/* Resolve face name FACE_NAME. If FACE_NAME is a string, intern it
2030 to make it a symbol. If FACE_NAME is an alias for another face, 2010 to make it a symbol. If FACE_NAME is an alias for another face,
2031 return that face's name. 2011 return that face's name.
@@ -6331,8 +6311,7 @@ where R,G,B are numbers between 0 and 255 and name is an arbitrary string. */)
6331/* Print the contents of the realized face FACE to stderr. */ 6311/* Print the contents of the realized face FACE to stderr. */
6332 6312
6333static void 6313static void
6334dump_realized_face (face) 6314dump_realized_face (struct face *face)
6335 struct face *face;
6336{ 6315{
6337 fprintf (stderr, "ID: %d\n", face->id); 6316 fprintf (stderr, "ID: %d\n", face->id);
6338#ifdef HAVE_X_WINDOWS 6317#ifdef HAVE_X_WINDOWS
diff --git a/src/xfns.c b/src/xfns.c
index abc273c2bdf..20bfa1df3f0 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -3156,10 +3156,6 @@ This function is an internal primitive--use `make-frame' instead. */)
3156 3156
3157 /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */ 3157 /* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
3158 record_unwind_protect (unwind_create_frame, frame); 3158 record_unwind_protect (unwind_create_frame, frame);
3159#if GLYPH_DEBUG
3160 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
3161 dpyinfo_refcount = dpyinfo->reference_count;
3162#endif /* GLYPH_DEBUG */
3163 3159
3164 /* These colors will be set anyway later, but it's important 3160 /* These colors will be set anyway later, but it's important
3165 to get the color reference counts right, so initialize them! */ 3161 to get the color reference counts right, so initialize them! */
@@ -3314,6 +3310,11 @@ This function is an internal primitive--use `make-frame' instead. */)
3314 happen. */ 3310 happen. */
3315 init_frame_faces (f); 3311 init_frame_faces (f);
3316 3312
3313#if GLYPH_DEBUG
3314 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
3315 dpyinfo_refcount = dpyinfo->reference_count;
3316#endif /* GLYPH_DEBUG */
3317
3317 /* The X resources controlling the menu-bar and tool-bar are 3318 /* The X resources controlling the menu-bar and tool-bar are
3318 processed specially at startup, and reflected in the mode 3319 processed specially at startup, and reflected in the mode
3319 variables; ignore them here. */ 3320 variables; ignore them here. */
@@ -4606,10 +4607,6 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4606#endif /* USE_TOOLKIT_SCROLL_BARS */ 4607#endif /* USE_TOOLKIT_SCROLL_BARS */
4607 f->icon_name = Qnil; 4608 f->icon_name = Qnil;
4608 FRAME_X_DISPLAY_INFO (f) = dpyinfo; 4609 FRAME_X_DISPLAY_INFO (f) = dpyinfo;
4609#if GLYPH_DEBUG
4610 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
4611 dpyinfo_refcount = dpyinfo->reference_count;
4612#endif /* GLYPH_DEBUG */
4613 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window; 4610 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
4614 f->output_data.x->explicit_parent = 0; 4611 f->output_data.x->explicit_parent = 0;
4615 4612
@@ -4721,6 +4718,11 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
4721 happen. */ 4718 happen. */
4722 init_frame_faces (f); 4719 init_frame_faces (f);
4723 4720
4721#if GLYPH_DEBUG
4722 image_cache_refcount = FRAME_IMAGE_CACHE (f)->refcount;
4723 dpyinfo_refcount = dpyinfo->reference_count;
4724#endif /* GLYPH_DEBUG */
4725
4724 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window; 4726 f->output_data.x->parent_desc = FRAME_X_DISPLAY_INFO (f)->root_window;
4725 4727
4726 x_figure_window_size (f, parms, 0); 4728 x_figure_window_size (f, parms, 0);