(GLYPH_DEBUG): Define if glyphs debugging is enabled.
* src/dispextern.h (GLYPH_DEBUG): Now defined in config.h if
enabled with --enable-checking=[all,glyphs] configure option.
Fix GLYPH_DEBUG usage assuming that it may be undefined,
adjust comments accordingly.
* src/dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
undefined, adjust comments accordingly.
* src/image.c: Likewise.
* src/scroll.c: Likewise.
* src/w32fns.c: Likewise.
* src/w32term.c: Likewise.
* src/xdisp.c: Likewise.
* src/xfaces.c: Likewise.
* src/xfns.c: Likewise.
* src/xterm.c: Likewise.
+2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * configure.in: Add glyphs category to --enable-checking option.
+ (GLYPH_DEBUG): Define if glyphs debugging is enabled.
+
2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
* configure.in (ENABLE_CHECKING): Update comment.
enable only specific categories of checks.
Categories are: all,yes,no.
Flags are: stringbytes, stringoverrun, stringfreelist,
- xmallocoverrun, conslist])],
+ xmallocoverrun, conslist, glyphs])],
[ac_checking_flags="${enableval}"],[])
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="$IFS,"
for check in $ac_checking_flags
ac_gc_check_string_overrun= ;
ac_gc_check_string_free_list= ;
ac_xmalloc_overrun= ;
- ac_gc_check_cons_list= ;;
+ ac_gc_check_cons_list= ;
+ ac_check_glyphs= ;;
all) ac_enable_checking=1 ;
ac_gc_check_stringbytes=1 ;
ac_gc_check_string_overrun=1 ;
ac_gc_check_string_free_list=1 ;
ac_xmalloc_overrun=1 ;
- ac_gc_check_cons_list=1 ;;
+ ac_gc_check_cons_list=1 ;
+ ac_check_glyphs=1 ;;
# these enable particular checks
stringbytes) ac_gc_check_stringbytes=1 ;;
stringoverrun) ac_gc_check_string_overrun=1 ;;
stringfreelist) ac_gc_check_string_free_list=1 ;;
xmallocoverrun) ac_xmalloc_overrun=1 ;;
conslist) ac_gc_check_cons_list=1 ;;
+ glyphs) ac_check_glyphs=1 ;;
*) AC_MSG_ERROR(unknown check category $check) ;;
esac
done
AC_DEFINE(GC_CHECK_CONS_LIST, 1,
[Define this to check for errors in cons list.])
fi
+if test x$ac_check_glyphs != x ; then
+ AC_DEFINE(GLYPH_DEBUG, 1,
+[Define this to enable glyphs debugging code.])
+fi
AC_ARG_ENABLE(check-lisp-object-type,
[AS_HELP_STRING([--enable-check-lisp-object-type],
+2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * dispextern.h (GLYPH_DEBUG): Now defined in config.h if
+ enabled with --enable-checking=[all,glyphs] configure option.
+ Fix GLYPH_DEBUG usage assuming that it may be undefined,
+ adjust comments accordingly.
+ * dispnew.c: Fix GLYPH_DEBUG usage assuming that it may be
+ undefined, adjust comments accordingly.
+ * image.c: Likewise.
+ * scroll.c: Likewise.
+ * w32fns.c: Likewise.
+ * w32term.c: Likewise.
+ * xdisp.c: Likewise.
+ * xfaces.c: Likewise.
+ * xfns.c: Likewise.
+ * xterm.c: Likewise.
+
2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
Generalize run-time debugging checks.
Debugging
***********************************************************************/
-/* If GLYPH_DEBUG is non-zero, additional checks are activated. Turn
- it off by defining the macro GLYPH_DEBUG to zero. */
+/* If GLYPH_DEBUG is defined, additional checks are activated. */
-#ifndef GLYPH_DEBUG
-#define GLYPH_DEBUG 0
-#endif
-
-/* Macros to include code only if GLYPH_DEBUG != 0. */
+/* Macros to include code only if GLYPH_DEBUG is defined. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
#define IF_DEBUG(X) X
#else
#define IF_DEBUG(X) (void) 0
#endif
/* Macro for displaying traces of redisplay. If Emacs was compiled
- with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to
+ with GLYPH_DEBUG defined, the variable trace_redisplay_p can be set to
a non-zero value in debugging sessions to activate traces. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
extern int trace_redisplay_p EXTERNALLY_VISIBLE;
#include <stdio.h>
else \
(void) 0
-#else /* GLYPH_DEBUG == 0 */
+#else /* not GLYPH_DEBUG */
#define TRACE(X) (void) 0
-#endif /* GLYPH_DEBUG == 0 */
+#endif /* GLYPH_DEBUG */
\f
line. */
unsigned header_line_p : 1;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* A string identifying the method used to display the matrix. */
char method[512];
#endif
/* Check that glyph pointers stored in glyph rows of MATRIX are okay.
This aborts if any pointer is found twice. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
void check_matrix_pointer_lossage (struct glyph_matrix *);
#define CHECK_MATRIX(MATRIX) check_matrix_pointer_lossage ((MATRIX))
#else
/* Get a pointer to row number ROW in matrix MATRIX. If GLYPH_DEBUG
- is defined to a non-zero value, the function matrix_row checks that
- we don't try to access rows that are out of bounds. */
+ is defined, the function matrix_row checks that we don't try to
+ access rows that are out of bounds. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
struct glyph_row *matrix_row (struct glyph_matrix *, int);
#define MATRIX_ROW(MATRIX, ROW) matrix_row ((MATRIX), (ROW))
#else
#ifdef HAVE_WINDOW_SYSTEM
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
extern void dump_glyph_string (struct glyph_string *) EXTERNALLY_VISIBLE;
#endif
static int scrolling_window (struct window *, int);
static int update_window_line (struct window *, int, int *);
static void mirror_make_current (struct window *, int);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
static void check_matrix_pointers (struct glyph_matrix *,
struct glyph_matrix *);
#endif
/* Convert vpos and hpos from frame to window and vice versa.
This may only be used for terminal frames. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
static int window_to_frame_vpos (struct window *, int);
static int window_to_frame_hpos (struct window *, int);
}
-#else /* GLYPH_DEBUG == 0 */
+#else /* not GLYPH_DEBUG */
#define WINDOW_TO_FRAME_VPOS(W, VPOS) ((VPOS) + WINDOW_TOP_EDGE_LINE (W))
#define WINDOW_TO_FRAME_HPOS(W, HPOS) ((HPOS) + WINDOW_LEFT_EDGE_COL (W))
-#endif /* GLYPH_DEBUG == 0 */
+#endif /* GLYPH_DEBUG */
#if (defined PROFILING \
return n;
}
-#ifdef ENABLE_CHECKING
-/* Return non-zero if ROW's hash value is correct, zero if not. */
+/* Return non-zero if ROW's hash value is correct, zero if not.
+ Optimized away if ENABLE_CHECKING is not defined. */
+
static int
verify_row_hash (struct glyph_row *row)
{
return row->hash == row_hash (row);
}
-#endif
/* Adjust glyph matrix MATRIX on window W or on a frame to changed
window sizes.
is non-zero if the glyph memory of WINDOW_ROW is part of the glyph
memory of FRAME_ROW. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
static int
glyph_row_slice_p (struct glyph_row *window_row, struct glyph_row *frame_row)
Debug Code
***********************************************************************/
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Flush standard output. This is sometimes useful to call from the debugger.
#endif /* 0 */
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
\f
SET_CHAR_GLYPH_FROM_GLYPH (*border, right_border_glyph);
}
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Window row window_y must be a slice of frame row
frame_y. */
eassert (glyph_row_slice_p (window_row, frame_row));
}
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Check that window and frame matrices agree about their
understanding where glyphs of the rows are to find. For each
}
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
\f
VPOS and HPOS translations
**********************************************************************/
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Translate vertical position VPOS which is relative to window W to a
vertical position relative to W's frame. */
}
/* Check window matrices for lost pointers. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
check_window_matrix_pointers (root_window);
add_frame_display_history (f, paused_p);
#endif
int preempt_count = baud_rate / 2400 + 1;
#endif
struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w)));
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Check that W's frame doesn't have glyph matrices. */
eassert (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w))));
#endif
#endif
}
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Remember the redisplay method used to display the matrix. */
strcpy (w->current_matrix->method, w->desired_matrix->method);
#endif
else
paused_p = 1;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* check_current_matrix_flags (w); */
add_window_display_history (w, w->current_matrix->method, paused_p);
#endif
defsubr (&Sinternal_show_cursor_p);
defsubr (&Slast_nonminibuf_frame);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
defsubr (&Sdump_redisplay_history);
#endif
Lisp_Object);
static void set_fontset_font (Lisp_Object, Lisp_Object);
-#ifdef ENABLE_CHECKING
-
-/* Return 1 if ID is a valid fontset id, else return 0. */
+/* Return 1 if ID is a valid fontset id, else return 0.
+ Optimized away if ENABLE_CHECKING is not defined. */
static int
fontset_id_valid_p (int id)
return (id >= 0 && id < ASIZE (Vfontset_table) - 1);
}
-#endif
-
\f
/********** MACROS AND FUNCTIONS TO HANDLE FONTSET **********/
Tests
***********************************************************************/
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
DEFUN ("imagep", Fimagep, Simagep, 1, 1, 0,
doc: /* Value is non-nil if SPEC is a valid image specification. */)
return make_number (id);
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
/***********************************************************************
defsubr (&Simage_mask_p);
defsubr (&Simage_metadata);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
defsubr (&Simagep);
defsubr (&Slookup_image);
#endif
for (k = 0; k < window_size; ++k)
copy_from[k] = -1;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
# define CHECK_BOUNDS \
do \
{ \
copy_from[i] = j;
retained_p[j] = 1;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
CHECK_BOUNDS;
#endif
}
mirrored_line_dance (current_matrix, unchanged_at_top, window_size,
copy_from, retained_p);
- /* Some sanity checks if GLYPH_DEBUG != 0. */
+ /* Some sanity checks if GLYPH_DEBUG is defined. */
CHECK_MATRIX (current_matrix);
if (terminal_window_p)
#define MENU_FREE_DELAY 1000
static unsigned menu_free_timer = 0;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
static int image_cache_refcount, dpyinfo_refcount;
#endif
/* If frame is ``official'', nothing to do. */
if (NILP (Fmemq (frame, Vframe_list)))
{
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
struct w32_display_info *dpyinfo = FRAME_W32_DISPLAY_INFO (f);
#endif
x_free_frame_resources (f);
free_glyphs (f);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Check that reference counts are indeed correct. */
eassert (dpyinfo->reference_count == dpyinfo_refcount);
eassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
/* With FRAME_X_DISPLAY_INFO set up, this unwind-protect is safe. */
record_unwind_protect (unwind_create_frame, frame);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
image_cache_refcount =
FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
dpyinfo_refcount = dpyinfo->reference_count;
FRAME_FONTSET (f) = -1;
f->icon_name = Qnil;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
image_cache_refcount =
FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
dpyinfo_refcount = dpyinfo->reference_count;
static void my_set_foreground_window (HWND);
static void my_destroy_window (struct frame *, HWND);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
static void x_check_font (struct frame *, struct font *);
#endif
Fonts
***********************************************************************/
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Check that FONT is valid on frame F. It is if it can be found in F's
font table. */
eassert (font->driver->check (f, font) == 0);
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
\f
CACHE = NULL; \
} while (0)
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Non-zero means print traces of redisplay if compiled with
- GLYPH_DEBUG != 0. */
+ GLYPH_DEBUG defined. */
int trace_redisplay_p;
#endif /* not 0 */
-#if GLYPH_DEBUG && defined ENABLE_CHECKING
+#if defined GLYPH_DEBUG && defined ENABLE_CHECKING
/* Check that the window end of window W is what we expect it
to be---the last row in the current matrix displaying text. */
#define CHECK_WINDOW_END(W) (void) 0
-#endif
+#endif /* GLYPH_DEBUG and ENABLE_CHECKING */
\f
to a non-zero value. This is sometimes handy to have in a debugger
session. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* First and last unchanged row for try_window_id. */
/* Update hint: No need to try to scroll in update_window. */
w->desired_matrix->no_scrolling_p = 1;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
*w->desired_matrix->method = 0;
debug_method_add (w, "optimization 1");
#endif
eassert (this_line_vpos == it.vpos);
eassert (this_line_y == it.current_y);
set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
*w->desired_matrix->method = 0;
debug_method_add (w, "optimization 3");
#endif
/* We will never try scrolling more than this number of lines. */
int scroll_limit = SCROLL_LIMIT;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "try_scrolling");
#endif
struct frame *f = XFRAME (w->frame);
int rc = CURSOR_MOVEMENT_CANNOT_BE_USED;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
if (inhibit_try_cursor_movement)
return rc;
#endif
int this_scroll_margin, top_scroll_margin;
struct glyph_row *row = NULL;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "cursor movement");
#endif
/* W must be a leaf window here. */
eassert (!NILP (w->buffer));
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
*w->desired_matrix->method = 0;
#endif
}
}
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "forced window start");
#endif
goto done;
&& !(CHARPOS (startp) <= BEGV
|| FETCH_BYTE (BYTEPOS (startp) - 1) == '\n'))
{
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "recenter 1");
#endif
goto recenter;
not work. It is 0 if unsuccessful for some other reason. */
else if ((tem = try_window_id (w)) != 0)
{
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "try_window_id %d", tem);
#endif
goto force_start;
}
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "same window start");
#endif
recenter:
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "recenter");
#endif
struct glyph_row *start_row;
int start_vpos, min_y, max_y;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
if (inhibit_try_window_reusing)
return 0;
#endif
/* Update hint: don't try scrolling again in update_window. */
w->desired_matrix->no_scrolling_p = 1;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "try_window_reusing_current_matrix 1");
#endif
return 1;
w->window_end_valid = Qnil;
w->desired_matrix->no_scrolling_p = 1;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "try_window_reusing_current_matrix 2");
#endif
return 1;
struct text_pos start;
ptrdiff_t first_changed_charpos, last_changed_charpos;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
if (inhibit_try_window_id)
return 0;
#endif
GIVE_UP (19);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Either there is no unchanged row at the end, or the one we have
now displays text. This is a necessary condition for the window
: -1);
debug_first_unchanged_at_end_vpos = first_unchanged_at_end_vpos;
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
/* Display new lines. Set last_text_row to the last new line
More debugging support
***********************************************************************/
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
void dump_glyph_row (struct glyph_row *, int, int) EXTERNALLY_VISIBLE;
void dump_glyph_matrix (struct glyph_matrix *, int) EXTERNALLY_VISIBLE;
#ifdef HAVE_WINDOW_SYSTEM
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
void
dump_glyph_string (struct glyph_string *s)
message_dolog_marker3 = Fmake_marker ();
staticpro (&message_dolog_marker3);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
defsubr (&Sdump_frame_glyph_matrix);
defsubr (&Sdump_glyph_matrix);
defsubr (&Sdump_glyph_row);
Value is a number or a cons (WIDTH-DPI . HEIGHT-DPI). */);
Vdisplay_pixels_per_inch = make_float (72.0);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
DEFVAR_INT ("debug-end-pos", debug_end_pos, doc: /* Don't ask. */);
#endif
doc: /* Non-nil means don't free realized faces. Internal use only. */);
inhibit_free_realized_faces = 0;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
DEFVAR_BOOL ("inhibit-try-window-id", inhibit_try_window_id,
doc: /* Inhibit try_window_id display optimization. */);
inhibit_try_window_id = 0;
/* The total number of colors currently allocated. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
static int ncolors_allocated;
static int npixmaps_allocated;
static int ngcs;
}
else
{
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
++npixmaps_allocated;
#endif
if (w_ptr)
abort ();
}
}
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
else
++ncolors_allocated;
#endif
#define LFACE_INHERIT(LFACE) AREF ((LFACE), LFACE_INHERIT_INDEX)
#define LFACE_FONTSET(LFACE) AREF ((LFACE), LFACE_FONTSET_INDEX)
-#ifdef ENABLE_CHECKING
/* Non-zero if LFACE is a Lisp face. A Lisp face is a vector of size
LFACE_VECTOR_SIZE which has the symbol `face' in slot 0. */
(VECTORP (LFACE) \
&& ASIZE (LFACE) == LFACE_VECTOR_SIZE \
&& EQ (AREF (LFACE, 0), Qface))
-#endif
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Check consistency of Lisp face attribute vector ATTRS. */
}
}
-#else /* GLYPH_DEBUG == 0 */
+#else /* not GLYPH_DEBUG */
#define check_lface_attrs(attrs) (void) 0
#define check_lface(lface) (void) 0
-#endif /* GLYPH_DEBUG == 0 */
+#endif /* GLYPH_DEBUG */
\f
break;
face->id = i;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Check that FACE got a unique id. */
{
int j, n;
if (face == NULL)
face = realize_face (cache, attr, -1);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
eassert (face == FACE_FROM_ID (f, face->id));
#endif /* GLYPH_DEBUG */
Tests
***********************************************************************/
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Print the contents of the realized face FACE to stderr. */
return Qnil;
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
\f
defsubr (&Sinternal_set_alternative_font_family_alist);
defsubr (&Sinternal_set_alternative_font_registry_alist);
defsubr (&Sface_attributes_as_vector);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
defsubr (&Sdump_face);
defsubr (&Sshow_face_resources);
#endif /* GLYPH_DEBUG */
static Lisp_Object Qcompound_text, Qcancel_timer;
Lisp_Object Qfont_param;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
static ptrdiff_t image_cache_refcount;
static int dpyinfo_refcount;
#endif
/* If frame is ``official'', nothing to do. */
if (NILP (Fmemq (frame, Vframe_list)))
{
-#if GLYPH_DEBUG && defined ENABLE_CHECKING
+#if defined GLYPH_DEBUG && defined ENABLE_CHECKING
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
#endif
x_free_frame_resources (f);
free_glyphs (f);
-#if GLYPH_DEBUG
+#if defined GLYPH_DEBUG && defined ENABLE_CHECKING
/* Check that reference counts are indeed correct. */
eassert (dpyinfo->reference_count == dpyinfo_refcount);
eassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
"scrollBarBackground",
"ScrollBarBackground", 0);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
image_cache_refcount =
FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
dpyinfo_refcount = dpyinfo->reference_count;
x_default_parameter (f, parms, Qborder_color, build_string ("black"),
"borderColor", "BorderColor", RES_TYPE_STRING);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
image_cache_refcount =
FRAME_IMAGE_CACHE (f) ? FRAME_IMAGE_CACHE (f)->refcount : 0;
dpyinfo_refcount = dpyinfo->reference_count;
int, int, int, XRectangle *);
static void x_scroll_bar_clear (struct frame *);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
static void x_check_font (struct frame *, struct font *);
#endif
Fonts
***********************************************************************/
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Check that FONT is valid on frame F. It is if it can be found in F's
font table. */
eassert (font->driver->check (f, font) == 0);
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
\f
/***********************************************************************