[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108784: * configure.in: Add glyphs c
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108784: * configure.in: Add glyphs category to --enable-checking option. |
Date: |
Thu, 28 Jun 2012 11:50:50 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108784
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2012-06-28 11:50:50 +0400
message:
* configure.in: Add glyphs category to --enable-checking option.
(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.
modified:
ChangeLog
configure.in
src/ChangeLog
src/dispextern.h
src/dispnew.c
src/fontset.c
src/image.c
src/scroll.c
src/w32fns.c
src/w32term.c
src/xdisp.c
src/xfaces.c
src/xfns.c
src/xterm.c
=== modified file 'ChangeLog'
--- a/ChangeLog 2012-06-28 07:50:27 +0000
+++ b/ChangeLog 2012-06-28 07:50:50 +0000
@@ -1,5 +1,10 @@
2012-06-28 Dmitry Antipov <address@hidden>
+ * configure.in: Add glyphs category to --enable-checking option.
+ (GLYPH_DEBUG): Define if glyphs debugging is enabled.
+
+2012-06-28 Dmitry Antipov <address@hidden>
+
* configure.in (ENABLE_CHECKING): Update comment.
2012-06-28 Paul Eggert <address@hidden>
=== modified file 'configure.in'
--- a/configure.in 2012-06-28 07:50:27 +0000
+++ b/configure.in 2012-06-28 07:50:50 +0000
@@ -251,7 +251,7 @@
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
@@ -264,19 +264,22 @@
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
@@ -308,6 +311,10 @@
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],
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-06-28 07:50:27 +0000
+++ b/src/ChangeLog 2012-06-28 07:50:50 +0000
@@ -1,5 +1,22 @@
2012-06-28 Dmitry Antipov <address@hidden>
+ * 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 <address@hidden>
+
Generalize run-time debugging checks.
* dispextern.h (XASSERTS): Remove.
* fontset.c (xassert): Remove.
=== modified file 'src/dispextern.h'
--- a/src/dispextern.h 2012-06-28 07:50:27 +0000
+++ b/src/dispextern.h 2012-06-28 07:50:50 +0000
@@ -121,26 +121,21 @@
Debugging
***********************************************************************/
-/* If GLYPH_DEBUG is non-zero, additional checks are activated. Turn
- it off by defining the macro GLYPH_DEBUG to zero. */
-
-#ifndef GLYPH_DEBUG
-#define GLYPH_DEBUG 0
-#endif
-
-/* Macros to include code only if GLYPH_DEBUG != 0. */
-
-#if GLYPH_DEBUG
+/* If GLYPH_DEBUG is defined, additional checks are activated. */
+
+/* Macros to include code only if GLYPH_DEBUG is defined. */
+
+#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>
@@ -151,11 +146,11 @@
else \
(void) 0
-#else /* GLYPH_DEBUG == 0 */
+#else /* not GLYPH_DEBUG */
#define TRACE(X) (void) 0
-#endif /* GLYPH_DEBUG == 0 */
+#endif /* GLYPH_DEBUG */
@@ -653,7 +648,7 @@
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
@@ -671,7 +666,7 @@
/* 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
@@ -950,10 +945,10 @@
/* 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
@@ -3067,7 +3062,7 @@
#ifdef HAVE_WINDOW_SYSTEM
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
extern void dump_glyph_string (struct glyph_string *) EXTERNALLY_VISIBLE;
#endif
=== modified file 'src/dispnew.c'
--- a/src/dispnew.c 2012-06-28 07:50:27 +0000
+++ b/src/dispnew.c 2012-06-28 07:50:50 +0000
@@ -123,7 +123,7 @@
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
@@ -211,7 +211,7 @@
/* 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);
@@ -311,12 +311,12 @@
}
-#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 \
@@ -419,14 +419,14 @@
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.
@@ -1136,7 +1136,7 @@
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)
@@ -1451,7 +1451,7 @@
Debug Code
***********************************************************************/
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Flush standard output. This is sometimes useful to call from the debugger.
@@ -1576,7 +1576,7 @@
#endif /* 0 */
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
@@ -2599,7 +2599,7 @@
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));
@@ -3026,7 +3026,7 @@
}
-#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
@@ -3082,7 +3082,7 @@
}
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
@@ -3090,7 +3090,7 @@
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. */
@@ -3302,7 +3302,7 @@
}
/* 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
@@ -3529,7 +3529,7 @@
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
@@ -3681,7 +3681,7 @@
#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
@@ -3699,7 +3699,7 @@
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
@@ -6476,7 +6476,7 @@
defsubr (&Sinternal_show_cursor_p);
defsubr (&Slast_nonminibuf_frame);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
defsubr (&Sdump_redisplay_history);
#endif
=== modified file 'src/fontset.c'
--- a/src/fontset.c 2012-06-28 07:50:27 +0000
+++ b/src/fontset.c 2012-06-28 07:50:50 +0000
@@ -197,9 +197,8 @@
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)
@@ -207,8 +206,6 @@
return (id >= 0 && id < ASIZE (Vfontset_table) - 1);
}
-#endif
-
/********** MACROS AND FUNCTIONS TO HANDLE FONTSET **********/
=== modified file 'src/image.c'
--- a/src/image.c 2012-06-28 07:50:27 +0000
+++ b/src/image.c 2012-06-28 07:50:50 +0000
@@ -8686,7 +8686,7 @@
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. */)
@@ -8708,7 +8708,7 @@
return make_number (id);
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
/***********************************************************************
@@ -8922,7 +8922,7 @@
defsubr (&Simage_mask_p);
defsubr (&Simage_metadata);
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
defsubr (&Simagep);
defsubr (&Slookup_image);
#endif
=== modified file 'src/scroll.c'
--- a/src/scroll.c 2012-06-28 07:50:27 +0000
+++ b/src/scroll.c 2012-06-28 07:50:50 +0000
@@ -264,7 +264,7 @@
for (k = 0; k < window_size; ++k)
copy_from[k] = -1;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
# define CHECK_BOUNDS \
do \
{ \
@@ -322,7 +322,7 @@
copy_from[i] = j;
retained_p[j] = 1;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
CHECK_BOUNDS;
#endif
}
@@ -374,7 +374,7 @@
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)
=== modified file 'src/w32fns.c'
--- a/src/w32fns.c 2012-06-28 07:50:27 +0000
+++ b/src/w32fns.c 2012-06-28 07:50:50 +0000
@@ -183,7 +183,7 @@
#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
@@ -3996,14 +3996,14 @@
/* 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);
@@ -4160,7 +4160,7 @@
/* 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;
@@ -5237,7 +5237,7 @@
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;
=== modified file 'src/w32term.c'
--- a/src/w32term.c 2012-06-28 07:50:27 +0000
+++ b/src/w32term.c 2012-06-28 07:50:50 +0000
@@ -231,7 +231,7 @@
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
@@ -6024,7 +6024,7 @@
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. */
@@ -6037,7 +6037,7 @@
eassert (font->driver->check (f, font) == 0);
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2012-06-28 07:50:27 +0000
+++ b/src/xdisp.c 2012-06-28 07:50:50 +0000
@@ -627,10 +627,10 @@
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;
@@ -2495,7 +2495,7 @@
#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. */
@@ -2521,7 +2521,7 @@
#define CHECK_WINDOW_END(W) (void) 0
-#endif
+#endif /* GLYPH_DEBUG and ENABLE_CHECKING */
@@ -12435,7 +12435,7 @@
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. */
@@ -13235,7 +13235,7 @@
/* 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
@@ -13303,7 +13303,7 @@
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
@@ -14575,7 +14575,7 @@
/* 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
@@ -14927,7 +14927,7 @@
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
@@ -14974,7 +14974,7 @@
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
@@ -15332,7 +15332,7 @@
/* W must be a leaf window here. */
eassert (!NILP (w->buffer));
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
*w->desired_matrix->method = 0;
#endif
@@ -15624,7 +15624,7 @@
}
}
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "forced window start");
#endif
goto done;
@@ -15656,7 +15656,7 @@
&& !(CHARPOS (startp) <= BEGV
|| FETCH_BYTE (BYTEPOS (startp) - 1) == '\n'))
{
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "recenter 1");
#endif
goto recenter;
@@ -15667,7 +15667,7 @@
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
@@ -15724,7 +15724,7 @@
goto force_start;
}
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "same window start");
#endif
@@ -15819,7 +15819,7 @@
recenter:
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
debug_method_add (w, "recenter");
#endif
@@ -16307,7 +16307,7 @@
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
@@ -16529,7 +16529,7 @@
/* 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;
@@ -16719,7 +16719,7 @@
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;
@@ -17087,7 +17087,7 @@
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
@@ -17421,7 +17421,7 @@
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
@@ -17435,7 +17435,7 @@
: -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
@@ -17805,7 +17805,7 @@
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;
@@ -22223,7 +22223,7 @@
#ifdef HAVE_WINDOW_SYSTEM
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
void
dump_glyph_string (struct glyph_string *s)
@@ -28408,7 +28408,7 @@
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);
@@ -28620,7 +28620,7 @@
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
@@ -28937,7 +28937,7 @@
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;
=== modified file 'src/xfaces.c'
--- a/src/xfaces.c 2012-06-28 07:50:27 +0000
+++ b/src/xfaces.c 2012-06-28 07:50:50 +0000
@@ -441,7 +441,7 @@
/* The total number of colors currently allocated. */
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
static int ncolors_allocated;
static int npixmaps_allocated;
static int ngcs;
@@ -1010,7 +1010,7 @@
}
else
{
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
++npixmaps_allocated;
#endif
if (w_ptr)
@@ -1375,7 +1375,7 @@
abort ();
}
}
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
else
++ncolors_allocated;
#endif
@@ -1855,7 +1855,6 @@
#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. */
@@ -1863,10 +1862,9 @@
(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. */
@@ -1953,12 +1951,12 @@
}
}
-#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 */
@@ -4461,7 +4459,7 @@
break;
face->id = i;
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Check that FACE got a unique id. */
{
int j, n;
@@ -4547,7 +4545,7 @@
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 */
@@ -6450,7 +6448,7 @@
Tests
***********************************************************************/
-#if GLYPH_DEBUG
+#ifdef GLYPH_DEBUG
/* Print the contents of the realized face FACE to stderr. */
@@ -6525,7 +6523,7 @@
return Qnil;
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
@@ -6649,7 +6647,7 @@
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 */
=== modified file 'src/xfns.c'
--- a/src/xfns.c 2012-06-28 07:50:27 +0000
+++ b/src/xfns.c 2012-06-28 07:50:50 +0000
@@ -136,7 +136,7 @@
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
@@ -2914,14 +2914,14 @@
/* 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);
@@ -3296,7 +3296,7 @@
"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;
@@ -4730,7 +4730,7 @@
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;
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2012-06-28 07:50:27 +0000
+++ b/src/xterm.c 2012-06-28 07:50:50 +0000
@@ -931,7 +931,7 @@
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
@@ -9801,7 +9801,7 @@
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. */
@@ -9814,7 +9814,7 @@
eassert (font->driver->check (f, font) == 0);
}
-#endif /* GLYPH_DEBUG != 0 */
+#endif /* GLYPH_DEBUG */
/***********************************************************************
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108784: * configure.in: Add glyphs category to --enable-checking option.,
Dmitry Antipov <=