Commit 7d7d0045 authored by Chong Yidong's avatar Chong Yidong

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.
parent 61dfb316
2011-06-18 Chong Yidong <cyd@stupidchicken.com>
* 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 <monnier@iro.umontreal.ca>
* fns.c (Fsafe_length): Yet another int/Lisp_Object mixup.
......@@ -1349,7 +1363,7 @@
2011-05-18 Christoph Scholtes <cschol2112@googlemail.com>
* menu.c: Include limits.h (fixes the MS-Windows build broken by
revision 104625).
2011-06-18T18:49:19Z!cyd@stupidchicken.com).
2011-05-18 Paul Eggert <eggert@cs.ucla.edu>
......
......@@ -310,8 +310,8 @@ add_window_display_history (struct window *w, const char *msg, int paused_p)
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);
......
......@@ -2248,8 +2248,7 @@ check_it (it)
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 @@ debug_method_add (w, fmt, a1, a2, a3, a4, a5, a6, a7, a8, a9)
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 @@ void dump_glyph (struct glyph_row *, struct glyph *, int);
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 @@ dump_glyph_matrix (matrix, glyphs)
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 @@ dump_glyph (row, glyph, area)
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 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop,
#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",
......
......@@ -1858,8 +1858,7 @@ the WIDTH times as wide as FACE on FRAME. */)
/* 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_lface_attrs (attrs)
/* 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 @@ push_named_merge_point (struct named_merge_point *new_named_merge_point,
}
#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 @@ where R,G,B are numbers between 0 and 255 and name is an arbitrary string. */)
/* 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
......
......@@ -3156,10 +3156,6 @@ This function is an internal primitive--use `make-frame' instead. */)
/* 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 @@ This function is an internal primitive--use `make-frame' instead. */)
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 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
#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 @@ x_create_tip_frame (struct x_display_info *dpyinfo,
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment