Generalize run-time debugging checks.
* configure.in (ENABLE_CHECKING): Update comment. * src/dispextern.h (XASSERTS): Remove. * src/fontset.c (xassert): Remove. Convert from xassert to eassert. * src/alloc.c: Convert from xassert to eassert. * src/bidi.c: Likewise. * src/dispnew.c: Likewise. * src/fns.c: Likewise. * src/fringe.c: Likewise. * src/ftfont.c: Likewise. * src/gtkutil.c: Likewise. * src/image.c: Likewise. * src/keyboard.c: Likewise. * src/menu.c: Likewise. * src/process.c: Likewise. * src/scroll.c: Likewise. * src/sound.c: Likewise. * src/term.c: Likewise. * src/w32console.c: Likewise. * src/w32fns.c: Likewise. * src/w32term.c: Likewise. * src/window.c: Likewise. * src/xdisp.c: Likewise. * src/xfaces.c: Likewise. * src/xfns.c: Likewise. * src/xselect.c: Likewise. * src/xterm.c: Likewise.
This commit is contained in:
parent
1c9bd87017
commit
a54e2c050b
28 changed files with 416 additions and 404 deletions
|
@ -1,3 +1,7 @@
|
|||
2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
* configure.in (ENABLE_CHECKING): Update comment.
|
||||
|
||||
2012-06-28 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* configure.in: Don't check for sys/select.h, sys/time.h, utime.h.
|
||||
|
|
|
@ -284,7 +284,7 @@ IFS="$ac_save_IFS"
|
|||
|
||||
if test x$ac_enable_checking != x ; then
|
||||
AC_DEFINE(ENABLE_CHECKING, 1,
|
||||
[Enable expensive run-time checking of data types?])
|
||||
[Define to 1 if expensive run-time data type and consistency checks are enabled.])
|
||||
fi
|
||||
if test x$ac_gc_check_stringbytes != x ; then
|
||||
AC_DEFINE(GC_CHECK_STRING_BYTES, 1,
|
||||
|
|
|
@ -1,3 +1,33 @@
|
|||
2012-06-28 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
Generalize run-time debugging checks.
|
||||
* dispextern.h (XASSERTS): Remove.
|
||||
* fontset.c (xassert): Remove.
|
||||
Convert from xassert to eassert.
|
||||
* alloc.c: Convert from xassert to eassert.
|
||||
* bidi.c: Likewise.
|
||||
* dispnew.c: Likewise.
|
||||
* fns.c: Likewise.
|
||||
* fringe.c: Likewise.
|
||||
* ftfont.c: Likewise.
|
||||
* gtkutil.c: Likewise.
|
||||
* image.c: Likewise.
|
||||
* keyboard.c: Likewise.
|
||||
* menu.c: Likewise.
|
||||
* process.c: Likewise.
|
||||
* scroll.c: Likewise.
|
||||
* sound.c: Likewise.
|
||||
* term.c: Likewise.
|
||||
* w32console.c: Likewise.
|
||||
* w32fns.c: Likewise.
|
||||
* w32term.c: Likewise.
|
||||
* window.c: Likewise.
|
||||
* xdisp.c: Likewise.
|
||||
* xfaces.c: Likewise.
|
||||
* xfns.c: Likewise.
|
||||
* xselect.c: Likewise.
|
||||
* xterm.c: Likewise.
|
||||
|
||||
2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* fns.c (maybe_resize_hash_table): Output message when growing the
|
||||
|
|
10
src/alloc.c
10
src/alloc.c
|
@ -787,7 +787,7 @@ verify (INT_MAX <= PTRDIFF_MAX);
|
|||
void *
|
||||
xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size)
|
||||
{
|
||||
xassert (0 <= nitems && 0 < item_size);
|
||||
eassert (0 <= nitems && 0 < item_size);
|
||||
if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems)
|
||||
memory_full (SIZE_MAX);
|
||||
return xmalloc (nitems * item_size);
|
||||
|
@ -800,7 +800,7 @@ xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size)
|
|||
void *
|
||||
xnrealloc (void *pa, ptrdiff_t nitems, ptrdiff_t item_size)
|
||||
{
|
||||
xassert (0 <= nitems && 0 < item_size);
|
||||
eassert (0 <= nitems && 0 < item_size);
|
||||
if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems)
|
||||
memory_full (SIZE_MAX);
|
||||
return xrealloc (pa, nitems * item_size);
|
||||
|
@ -850,7 +850,7 @@ xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min,
|
|||
ptrdiff_t nitems_incr_max = n_max - n;
|
||||
ptrdiff_t incr = max (nitems_incr_min, min (incr_estimate, nitems_incr_max));
|
||||
|
||||
xassert (0 < item_size && 0 < nitems_incr_min && 0 <= n && -1 <= nitems_max);
|
||||
eassert (0 < item_size && 0 < nitems_incr_min && 0 <= n && -1 <= nitems_max);
|
||||
if (! pa)
|
||||
*nitems = 0;
|
||||
if (nitems_incr_max < incr)
|
||||
|
@ -2220,7 +2220,7 @@ compact_small_strings (void)
|
|||
for (b = oldest_sblock; b; b = b->next)
|
||||
{
|
||||
end = b->next_free;
|
||||
xassert ((char *) end <= (char *) b + SBLOCK_SIZE);
|
||||
eassert ((char *) end <= (char *) b + SBLOCK_SIZE);
|
||||
|
||||
for (from = &b->first_data; from < end; from = from_end)
|
||||
{
|
||||
|
@ -2271,7 +2271,7 @@ compact_small_strings (void)
|
|||
/* Copy, and update the string's `data' pointer. */
|
||||
if (from != to)
|
||||
{
|
||||
xassert (tb != b || to < from);
|
||||
eassert (tb != b || to < from);
|
||||
memmove (to, from, nbytes + GC_STRING_EXTRA);
|
||||
to->string->data = SDATA_DATA (to);
|
||||
}
|
||||
|
|
10
src/bidi.c
10
src/bidi.c
|
@ -149,7 +149,7 @@ bidi_get_type (int ch, bidi_dir_t override)
|
|||
static inline void
|
||||
bidi_check_type (bidi_type_t type)
|
||||
{
|
||||
xassert (UNKNOWN_BT <= type && type <= NEUTRAL_ON);
|
||||
eassert (UNKNOWN_BT <= type && type <= NEUTRAL_ON);
|
||||
}
|
||||
|
||||
/* Given a bidi TYPE of a character, return its category. */
|
||||
|
@ -263,7 +263,7 @@ bidi_push_embedding_level (struct bidi_it *bidi_it,
|
|||
int level, bidi_dir_t override)
|
||||
{
|
||||
bidi_it->stack_idx++;
|
||||
xassert (bidi_it->stack_idx < BIDI_MAXLEVEL);
|
||||
eassert (bidi_it->stack_idx < BIDI_MAXLEVEL);
|
||||
bidi_it->level_stack[bidi_it->stack_idx].level = level;
|
||||
bidi_it->level_stack[bidi_it->stack_idx].override = override;
|
||||
}
|
||||
|
@ -458,7 +458,7 @@ bidi_cache_find_level_change (int level, int dir, int before)
|
|||
ptrdiff_t i = dir ? bidi_cache_last_idx : bidi_cache_idx - 1;
|
||||
int incr = before ? 1 : 0;
|
||||
|
||||
xassert (!dir || bidi_cache_last_idx >= 0);
|
||||
eassert (!dir || bidi_cache_last_idx >= 0);
|
||||
|
||||
if (!dir)
|
||||
dir = -1;
|
||||
|
@ -616,7 +616,7 @@ bidi_push_it (struct bidi_it *bidi_it)
|
|||
memcpy (&bidi_cache[bidi_cache_idx++], bidi_it, sizeof (struct bidi_it));
|
||||
|
||||
/* Push the current cache start onto the stack. */
|
||||
xassert (bidi_cache_sp < IT_STACK_SIZE);
|
||||
eassert (bidi_cache_sp < IT_STACK_SIZE);
|
||||
bidi_cache_start_stack[bidi_cache_sp++] = bidi_cache_start;
|
||||
|
||||
/* Start a new level of cache, and make it empty. */
|
||||
|
@ -1958,7 +1958,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it)
|
|||
case STRONG_AL:
|
||||
/* Actually, STRONG_AL cannot happen here, because
|
||||
bidi_resolve_weak converts it to STRONG_R, per W3. */
|
||||
xassert (type != STRONG_AL);
|
||||
eassert (type != STRONG_AL);
|
||||
next_type = type;
|
||||
break;
|
||||
case WEAK_EN:
|
||||
|
|
|
@ -128,13 +128,6 @@ enum window_part
|
|||
#define GLYPH_DEBUG 0
|
||||
#endif
|
||||
|
||||
/* If XASSERTS is non-zero, additional consistency checks are activated.
|
||||
Turn it off by defining the macro XASSERTS to zero. */
|
||||
|
||||
#ifndef XASSERTS
|
||||
#define XASSERTS 0
|
||||
#endif
|
||||
|
||||
/* Macros to include code only if GLYPH_DEBUG != 0. */
|
||||
|
||||
#if GLYPH_DEBUG
|
||||
|
@ -143,12 +136,6 @@ enum window_part
|
|||
#define IF_DEBUG(X) (void) 0
|
||||
#endif
|
||||
|
||||
#if XASSERTS
|
||||
#define xassert(X) do {if (!(X)) abort ();} while (0)
|
||||
#else
|
||||
#define xassert(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
|
||||
a non-zero value in debugging sessions to activate traces. */
|
||||
|
|
120
src/dispnew.c
120
src/dispnew.c
|
@ -419,9 +419,9 @@ margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin
|
|||
return n;
|
||||
}
|
||||
|
||||
#if XASSERTS
|
||||
#ifdef ENABLE_CHECKING
|
||||
/* Return non-zero if ROW's hash value is correct, zero if not. */
|
||||
int
|
||||
static int
|
||||
verify_row_hash (struct glyph_row *row)
|
||||
{
|
||||
return row->hash == row_hash (row);
|
||||
|
@ -480,7 +480,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
|
|||
{
|
||||
left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols);
|
||||
right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols);
|
||||
xassert (left >= 0 && right >= 0);
|
||||
eassert (left >= 0 && right >= 0);
|
||||
marginal_areas_changed_p = (left != matrix->left_margin_glyphs
|
||||
|| right != matrix->right_margin_glyphs);
|
||||
|
||||
|
@ -513,7 +513,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
|
|||
each row into the glyph pool. */
|
||||
if (matrix->pool)
|
||||
{
|
||||
xassert (matrix->pool->glyphs);
|
||||
eassert (matrix->pool->glyphs);
|
||||
|
||||
if (w)
|
||||
{
|
||||
|
@ -602,14 +602,14 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
|
|||
}
|
||||
}
|
||||
|
||||
xassert (left >= 0 && right >= 0);
|
||||
eassert (left >= 0 && right >= 0);
|
||||
matrix->left_margin_glyphs = left;
|
||||
matrix->right_margin_glyphs = right;
|
||||
}
|
||||
|
||||
/* Number of rows to be used by MATRIX. */
|
||||
matrix->nrows = dim.height;
|
||||
xassert (matrix->nrows >= 0);
|
||||
eassert (matrix->nrows >= 0);
|
||||
|
||||
if (w)
|
||||
{
|
||||
|
@ -751,9 +751,9 @@ increment_matrix_positions (struct glyph_matrix *matrix, int start, int end,
|
|||
ptrdiff_t delta, ptrdiff_t delta_bytes)
|
||||
{
|
||||
/* Check that START and END are reasonable values. */
|
||||
xassert (start >= 0 && start <= matrix->nrows);
|
||||
xassert (end >= 0 && end <= matrix->nrows);
|
||||
xassert (start <= end);
|
||||
eassert (start >= 0 && start <= matrix->nrows);
|
||||
eassert (end >= 0 && end <= matrix->nrows);
|
||||
eassert (start <= end);
|
||||
|
||||
for (; start < end; ++start)
|
||||
increment_row_positions (matrix->rows + start, delta, delta_bytes);
|
||||
|
@ -767,9 +767,9 @@ increment_matrix_positions (struct glyph_matrix *matrix, int start, int end,
|
|||
void
|
||||
enable_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end, int enabled_p)
|
||||
{
|
||||
xassert (start <= end);
|
||||
xassert (start >= 0 && start < matrix->nrows);
|
||||
xassert (end >= 0 && end <= matrix->nrows);
|
||||
eassert (start <= end);
|
||||
eassert (start >= 0 && start < matrix->nrows);
|
||||
eassert (end >= 0 && end <= matrix->nrows);
|
||||
|
||||
for (; start < end; ++start)
|
||||
matrix->rows[start].enabled_p = enabled_p != 0;
|
||||
|
@ -806,9 +806,9 @@ shift_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int start, in
|
|||
{
|
||||
int min_y, max_y;
|
||||
|
||||
xassert (start <= end);
|
||||
xassert (start >= 0 && start < matrix->nrows);
|
||||
xassert (end >= 0 && end <= matrix->nrows);
|
||||
eassert (start <= end);
|
||||
eassert (start >= 0 && start < matrix->nrows);
|
||||
eassert (end >= 0 && end <= matrix->nrows);
|
||||
|
||||
min_y = WINDOW_HEADER_LINE_HEIGHT (w);
|
||||
max_y = WINDOW_BOX_HEIGHT_NO_MODE_LINE (w);
|
||||
|
@ -852,7 +852,7 @@ clear_current_matrices (register struct frame *f)
|
|||
clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix);
|
||||
|
||||
/* Clear current window matrices. */
|
||||
xassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
|
||||
eassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
|
||||
clear_window_matrices (XWINDOW (FRAME_ROOT_WINDOW (f)), 0);
|
||||
}
|
||||
|
||||
|
@ -872,7 +872,7 @@ clear_desired_matrices (register struct frame *f)
|
|||
clear_glyph_matrix (XWINDOW (f->tool_bar_window)->desired_matrix);
|
||||
|
||||
/* Do it for window matrices. */
|
||||
xassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
|
||||
eassert (WINDOWP (FRAME_ROOT_WINDOW (f)));
|
||||
clear_window_matrices (XWINDOW (FRAME_ROOT_WINDOW (f)), 1);
|
||||
}
|
||||
|
||||
|
@ -887,12 +887,12 @@ clear_window_matrices (struct window *w, int desired_p)
|
|||
{
|
||||
if (!NILP (w->hchild))
|
||||
{
|
||||
xassert (WINDOWP (w->hchild));
|
||||
eassert (WINDOWP (w->hchild));
|
||||
clear_window_matrices (XWINDOW (w->hchild), desired_p);
|
||||
}
|
||||
else if (!NILP (w->vchild))
|
||||
{
|
||||
xassert (WINDOWP (w->vchild));
|
||||
eassert (WINDOWP (w->vchild));
|
||||
clear_window_matrices (XWINDOW (w->vchild), desired_p);
|
||||
}
|
||||
else
|
||||
|
@ -1163,7 +1163,7 @@ find_glyph_row_slice (struct glyph_matrix *window_matrix,
|
|||
{
|
||||
int i;
|
||||
|
||||
xassert (row >= 0 && row < frame_matrix->nrows);
|
||||
eassert (row >= 0 && row < frame_matrix->nrows);
|
||||
|
||||
for (i = 0; i < window_matrix->nrows; ++i)
|
||||
if (glyph_row_slice_p (window_matrix->rows + i,
|
||||
|
@ -1291,8 +1291,8 @@ line_draw_cost (struct glyph_matrix *matrix, int vpos)
|
|||
static inline int
|
||||
row_equal_p (struct glyph_row *a, struct glyph_row *b, int mouse_face_p)
|
||||
{
|
||||
xassert (verify_row_hash (a));
|
||||
xassert (verify_row_hash (b));
|
||||
eassert (verify_row_hash (a));
|
||||
eassert (verify_row_hash (b));
|
||||
|
||||
if (a == b)
|
||||
return 1;
|
||||
|
@ -1394,7 +1394,7 @@ free_glyph_pool (struct glyph_pool *pool)
|
|||
{
|
||||
/* More freed than allocated? */
|
||||
--glyph_pool_count;
|
||||
xassert (glyph_pool_count >= 0);
|
||||
eassert (glyph_pool_count >= 0);
|
||||
|
||||
xfree (pool->glyphs);
|
||||
xfree (pool);
|
||||
|
@ -1480,7 +1480,7 @@ check_matrix_pointer_lossage (struct glyph_matrix *matrix)
|
|||
|
||||
for (i = 0; i < matrix->nrows; ++i)
|
||||
for (j = 0; j < matrix->nrows; ++j)
|
||||
xassert (i == j
|
||||
eassert (i == j
|
||||
|| (matrix->rows[i].glyphs[TEXT_AREA]
|
||||
!= matrix->rows[j].glyphs[TEXT_AREA]));
|
||||
}
|
||||
|
@ -1491,8 +1491,8 @@ check_matrix_pointer_lossage (struct glyph_matrix *matrix)
|
|||
struct glyph_row *
|
||||
matrix_row (struct glyph_matrix *matrix, int row)
|
||||
{
|
||||
xassert (matrix && matrix->rows);
|
||||
xassert (row >= 0 && row < matrix->nrows);
|
||||
eassert (matrix && matrix->rows);
|
||||
eassert (row >= 0 && row < matrix->nrows);
|
||||
|
||||
/* That's really too slow for normal testing because this function
|
||||
is called almost everywhere. Although---it's still astonishingly
|
||||
|
@ -1539,9 +1539,9 @@ check_matrix_invariants (struct window *w)
|
|||
last_text_row = row;
|
||||
|
||||
/* Check that character and byte positions are in sync. */
|
||||
xassert (MATRIX_ROW_START_BYTEPOS (row)
|
||||
eassert (MATRIX_ROW_START_BYTEPOS (row)
|
||||
== CHAR_TO_BYTE (MATRIX_ROW_START_CHARPOS (row)));
|
||||
xassert (BYTEPOS (row->start.pos)
|
||||
eassert (BYTEPOS (row->start.pos)
|
||||
== CHAR_TO_BYTE (CHARPOS (row->start.pos)));
|
||||
|
||||
/* CHAR_TO_BYTE aborts when invoked for a position > Z. We can
|
||||
|
@ -1549,9 +1549,9 @@ check_matrix_invariants (struct window *w)
|
|||
displaying something like `[Sole completion]' at its end. */
|
||||
if (MATRIX_ROW_END_CHARPOS (row) < BUF_ZV (current_buffer))
|
||||
{
|
||||
xassert (MATRIX_ROW_END_BYTEPOS (row)
|
||||
eassert (MATRIX_ROW_END_BYTEPOS (row)
|
||||
== CHAR_TO_BYTE (MATRIX_ROW_END_CHARPOS (row)));
|
||||
xassert (BYTEPOS (row->end.pos)
|
||||
eassert (BYTEPOS (row->end.pos)
|
||||
== CHAR_TO_BYTE (CHARPOS (row->end.pos)));
|
||||
}
|
||||
|
||||
|
@ -1559,18 +1559,18 @@ check_matrix_invariants (struct window *w)
|
|||
of next row. */
|
||||
if (next->enabled_p && MATRIX_ROW_DISPLAYS_TEXT_P (next))
|
||||
{
|
||||
xassert (MATRIX_ROW_END_CHARPOS (row)
|
||||
eassert (MATRIX_ROW_END_CHARPOS (row)
|
||||
== MATRIX_ROW_START_CHARPOS (next));
|
||||
xassert (MATRIX_ROW_END_BYTEPOS (row)
|
||||
eassert (MATRIX_ROW_END_BYTEPOS (row)
|
||||
== MATRIX_ROW_START_BYTEPOS (next));
|
||||
xassert (CHARPOS (row->end.pos) == CHARPOS (next->start.pos));
|
||||
xassert (BYTEPOS (row->end.pos) == BYTEPOS (next->start.pos));
|
||||
eassert (CHARPOS (row->end.pos) == CHARPOS (next->start.pos));
|
||||
eassert (BYTEPOS (row->end.pos) == BYTEPOS (next->start.pos));
|
||||
}
|
||||
row = next;
|
||||
}
|
||||
|
||||
xassert (w->current_matrix->nrows == w->desired_matrix->nrows);
|
||||
xassert (w->desired_matrix->rows != NULL);
|
||||
eassert (w->current_matrix->nrows == w->desired_matrix->nrows);
|
||||
eassert (w->desired_matrix->rows != NULL);
|
||||
set_buffer_temp (saved);
|
||||
}
|
||||
|
||||
|
@ -1997,15 +1997,15 @@ fake_current_matrices (Lisp_Object window)
|
|||
struct glyph_matrix *m = w->current_matrix;
|
||||
struct glyph_matrix *fm = f->current_matrix;
|
||||
|
||||
xassert (m->matrix_h == WINDOW_TOTAL_LINES (w));
|
||||
xassert (m->matrix_w == WINDOW_TOTAL_COLS (w));
|
||||
eassert (m->matrix_h == WINDOW_TOTAL_LINES (w));
|
||||
eassert (m->matrix_w == WINDOW_TOTAL_COLS (w));
|
||||
|
||||
for (i = 0; i < m->matrix_h; ++i)
|
||||
{
|
||||
struct glyph_row *r = m->rows + i;
|
||||
struct glyph_row *fr = fm->rows + i + WINDOW_TOP_EDGE_LINE (w);
|
||||
|
||||
xassert (r->glyphs[TEXT_AREA] >= fr->glyphs[TEXT_AREA]
|
||||
eassert (r->glyphs[TEXT_AREA] >= fr->glyphs[TEXT_AREA]
|
||||
&& r->glyphs[LAST_AREA] <= fr->glyphs[LAST_AREA]);
|
||||
|
||||
r->enabled_p = fr->enabled_p;
|
||||
|
@ -2140,7 +2140,7 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
|
|||
/* Size of frame matrices must equal size of frame. Note
|
||||
that we are called for X frames with window widths NOT equal
|
||||
to the frame width (from CHANGE_FRAME_SIZE_1). */
|
||||
xassert (matrix_dim.width == FRAME_COLS (f)
|
||||
eassert (matrix_dim.width == FRAME_COLS (f)
|
||||
&& matrix_dim.height == FRAME_LINES (f));
|
||||
|
||||
/* Pointers to glyph memory in glyph rows are exchanged during
|
||||
|
@ -2184,7 +2184,7 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f)
|
|||
static void
|
||||
adjust_frame_glyphs_for_window_redisplay (struct frame *f)
|
||||
{
|
||||
xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f));
|
||||
eassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f));
|
||||
|
||||
/* Allocate/reallocate window matrices. */
|
||||
allocate_matrices_for_window_redisplay (XWINDOW (FRAME_ROOT_WINDOW (f)));
|
||||
|
@ -2469,7 +2469,7 @@ build_frame_matrix (struct frame *f)
|
|||
int i;
|
||||
|
||||
/* F must have a frame matrix when this function is called. */
|
||||
xassert (!FRAME_WINDOW_P (f));
|
||||
eassert (!FRAME_WINDOW_P (f));
|
||||
|
||||
/* Clear all rows in the frame matrix covered by window matrices.
|
||||
Menu bar lines are not covered by windows. */
|
||||
|
@ -2585,7 +2585,7 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w
|
|||
}
|
||||
else
|
||||
{
|
||||
xassert (window_row->enabled_p);
|
||||
eassert (window_row->enabled_p);
|
||||
|
||||
/* Only when a desired row has been displayed, we want
|
||||
the corresponding frame row to be updated. */
|
||||
|
@ -2602,7 +2602,7 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w
|
|||
#if GLYPH_DEBUG
|
||||
/* Window row window_y must be a slice of frame row
|
||||
frame_y. */
|
||||
xassert (glyph_row_slice_p (window_row, frame_row));
|
||||
eassert (glyph_row_slice_p (window_row, frame_row));
|
||||
|
||||
/* If rows are in sync, we don't have to copy glyphs because
|
||||
frame and window share glyphs. */
|
||||
|
@ -2829,8 +2829,8 @@ mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlin
|
|||
{
|
||||
int enabled_before_p = new_rows[i].enabled_p;
|
||||
|
||||
xassert (i + unchanged_at_top < matrix->nrows);
|
||||
xassert (unchanged_at_top + copy_from[i] < matrix->nrows);
|
||||
eassert (i + unchanged_at_top < matrix->nrows);
|
||||
eassert (unchanged_at_top + copy_from[i] < matrix->nrows);
|
||||
new_rows[i] = old_rows[copy_from[i]];
|
||||
new_rows[i].enabled_p = enabled_before_p;
|
||||
|
||||
|
@ -2857,8 +2857,8 @@ sync_window_with_frame_matrix_rows (struct window *w)
|
|||
int left, right, x, width;
|
||||
|
||||
/* Preconditions: W must be a leaf window on a tty frame. */
|
||||
xassert (NILP (w->hchild) && NILP (w->vchild));
|
||||
xassert (!FRAME_WINDOW_P (f));
|
||||
eassert (NILP (w->hchild) && NILP (w->vchild));
|
||||
eassert (!FRAME_WINDOW_P (f));
|
||||
|
||||
left = margin_glyphs_to_reserve (w, 1, w->left_margin_cols);
|
||||
right = margin_glyphs_to_reserve (w, 1, w->right_margin_cols);
|
||||
|
@ -3098,10 +3098,10 @@ check_matrix_pointers (struct glyph_matrix *window_matrix,
|
|||
static int
|
||||
window_to_frame_vpos (struct window *w, int vpos)
|
||||
{
|
||||
xassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
|
||||
xassert (vpos >= 0 && vpos <= w->desired_matrix->nrows);
|
||||
eassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
|
||||
eassert (vpos >= 0 && vpos <= w->desired_matrix->nrows);
|
||||
vpos += WINDOW_TOP_EDGE_LINE (w);
|
||||
xassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (w->frame)));
|
||||
eassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (w->frame)));
|
||||
return vpos;
|
||||
}
|
||||
|
||||
|
@ -3112,7 +3112,7 @@ window_to_frame_vpos (struct window *w, int vpos)
|
|||
static int
|
||||
window_to_frame_hpos (struct window *w, int hpos)
|
||||
{
|
||||
xassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
|
||||
eassert (!FRAME_WINDOW_P (XFRAME (w->frame)));
|
||||
hpos += WINDOW_LEFT_EDGE_COL (w);
|
||||
return hpos;
|
||||
}
|
||||
|
@ -3531,7 +3531,7 @@ update_window (struct window *w, int force_p)
|
|||
struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w)));
|
||||
#if GLYPH_DEBUG
|
||||
/* Check that W's frame doesn't have glyph matrices. */
|
||||
xassert (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w))));
|
||||
eassert (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w))));
|
||||
#endif
|
||||
|
||||
/* Check pending input the first time so that we can quickly return. */
|
||||
|
@ -3930,7 +3930,7 @@ update_text_area (struct window *w, int vpos)
|
|||
has to be cleared, if and only if we did a write_glyphs
|
||||
above. This is made sure by setting desired_stop_pos
|
||||
appropriately above. */
|
||||
xassert (i < desired_row->used[TEXT_AREA]
|
||||
eassert (i < desired_row->used[TEXT_AREA]
|
||||
|| ((desired_row->used[TEXT_AREA]
|
||||
== current_row->used[TEXT_AREA])
|
||||
&& MATRIX_ROW_EXTENDS_FACE_P (current_row)));
|
||||
|
@ -4000,7 +4000,7 @@ update_window_line (struct window *w, int vpos, int *mouse_face_overwritten_p)
|
|||
if (desired_row->mode_line_p
|
||||
|| desired_row->visible_height > 0)
|
||||
{
|
||||
xassert (desired_row->enabled_p);
|
||||
eassert (desired_row->enabled_p);
|
||||
|
||||
/* Update display of the left margin area, if there is one. */
|
||||
if (!desired_row->full_width_p
|
||||
|
@ -4058,7 +4058,7 @@ set_window_cursor_after_update (struct window *w)
|
|||
int cx, cy, vpos, hpos;
|
||||
|
||||
/* Not intended for frame matrix updates. */
|
||||
xassert (FRAME_WINDOW_P (f));
|
||||
eassert (FRAME_WINDOW_P (f));
|
||||
|
||||
if (cursor_in_echo_area
|
||||
&& !NILP (echo_area_buffer[0])
|
||||
|
@ -4218,7 +4218,7 @@ add_row_entry (struct glyph_row *row)
|
|||
ptrdiff_t i = row->hash % row_table_size;
|
||||
|
||||
entry = row_table[i];
|
||||
xassert (entry || verify_row_hash (row));
|
||||
eassert (entry || verify_row_hash (row));
|
||||
while (entry && !row_equal_p (entry->row, row, 1))
|
||||
entry = entry->next;
|
||||
|
||||
|
@ -4432,7 +4432,7 @@ scrolling_window (struct window *w, int header_line_p)
|
|||
|
||||
for (i = first_new; i < last_new; ++i)
|
||||
{
|
||||
xassert (MATRIX_ROW_ENABLED_P (desired_matrix, i));
|
||||
eassert (MATRIX_ROW_ENABLED_P (desired_matrix, i));
|
||||
entry = add_row_entry (MATRIX_ROW (desired_matrix, i));
|
||||
++entry->new_uses;
|
||||
entry->new_line_number = i;
|
||||
|
@ -4612,7 +4612,7 @@ scrolling_window (struct window *w, int header_line_p)
|
|||
row. But thanks to the truncation code in the
|
||||
preceding for-loop, we no longer have such an overlap,
|
||||
and thus the assigned row should always be enabled. */
|
||||
xassert (to->enabled_p);
|
||||
eassert (to->enabled_p);
|
||||
from->enabled_p = 0;
|
||||
to->overlapped_p = to_overlapped_p;
|
||||
}
|
||||
|
@ -4650,7 +4650,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p)
|
|||
int pause_p;
|
||||
int preempt_count = baud_rate / 2400 + 1;
|
||||
|
||||
xassert (current_matrix && desired_matrix);
|
||||
eassert (current_matrix && desired_matrix);
|
||||
|
||||
if (baud_rate != FRAME_COST_BAUD_RATE (f))
|
||||
calculate_costs (f);
|
||||
|
|
26
src/fns.c
26
src/fns.c
|
@ -3434,8 +3434,8 @@ larger_vector (Lisp_Object vec, ptrdiff_t incr_min, ptrdiff_t nitems_max)
|
|||
ptrdiff_t C_language_max = min (PTRDIFF_MAX, SIZE_MAX) / sizeof *v->contents;
|
||||
ptrdiff_t n_max = (0 <= nitems_max && nitems_max < C_language_max
|
||||
? nitems_max : C_language_max);
|
||||
xassert (VECTORP (vec));
|
||||
xassert (0 < incr_min && -1 <= nitems_max);
|
||||
eassert (VECTORP (vec));
|
||||
eassert (0 < incr_min && -1 <= nitems_max);
|
||||
old_size = ASIZE (vec);
|
||||
incr_max = n_max - old_size;
|
||||
incr = max (incr_min, min (old_size >> 1, incr_max));
|
||||
|
@ -3514,7 +3514,7 @@ static EMACS_UINT
|
|||
hashfn_eq (struct Lisp_Hash_Table *h, Lisp_Object key)
|
||||
{
|
||||
EMACS_UINT hash = XUINT (key) ^ XTYPE (key);
|
||||
xassert ((hash & ~INTMASK) == 0);
|
||||
eassert ((hash & ~INTMASK) == 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
@ -3531,7 +3531,7 @@ hashfn_eql (struct Lisp_Hash_Table *h, Lisp_Object key)
|
|||
hash = sxhash (key, 0);
|
||||
else
|
||||
hash = XUINT (key) ^ XTYPE (key);
|
||||
xassert ((hash & ~INTMASK) == 0);
|
||||
eassert ((hash & ~INTMASK) == 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
@ -3544,7 +3544,7 @@ static EMACS_UINT
|
|||
hashfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key)
|
||||
{
|
||||
EMACS_UINT hash = sxhash (key, 0);
|
||||
xassert ((hash & ~INTMASK) == 0);
|
||||
eassert ((hash & ~INTMASK) == 0);
|
||||
return hash;
|
||||
}
|
||||
|
||||
|
@ -3605,11 +3605,11 @@ make_hash_table (Lisp_Object test, Lisp_Object size, Lisp_Object rehash_size,
|
|||
double index_float;
|
||||
|
||||
/* Preconditions. */
|
||||
xassert (SYMBOLP (test));
|
||||
xassert (INTEGERP (size) && XINT (size) >= 0);
|
||||
xassert ((INTEGERP (rehash_size) && XINT (rehash_size) > 0)
|
||||
eassert (SYMBOLP (test));
|
||||
eassert (INTEGERP (size) && XINT (size) >= 0);
|
||||
eassert ((INTEGERP (rehash_size) && XINT (rehash_size) > 0)
|
||||
|| (FLOATP (rehash_size) && 1 < XFLOAT_DATA (rehash_size)));
|
||||
xassert (FLOATP (rehash_threshold)
|
||||
eassert (FLOATP (rehash_threshold)
|
||||
&& 0 < XFLOAT_DATA (rehash_threshold)
|
||||
&& XFLOAT_DATA (rehash_threshold) <= 1.0);
|
||||
|
||||
|
@ -3667,8 +3667,8 @@ make_hash_table (Lisp_Object test, Lisp_Object size, Lisp_Object rehash_size,
|
|||
h->next_free = make_number (0);
|
||||
|
||||
XSET_HASH_TABLE (table, h);
|
||||
xassert (HASH_TABLE_P (table));
|
||||
xassert (XHASH_TABLE (table) == h);
|
||||
eassert (HASH_TABLE_P (table));
|
||||
eassert (XHASH_TABLE (table) == h);
|
||||
|
||||
/* Maybe add this hash table to the list of all weak hash tables. */
|
||||
if (NILP (h->weak))
|
||||
|
@ -3843,7 +3843,7 @@ hash_put (struct Lisp_Hash_Table *h, Lisp_Object key, Lisp_Object value,
|
|||
{
|
||||
ptrdiff_t start_of_bucket, i;
|
||||
|
||||
xassert ((hash & ~INTMASK) == 0);
|
||||
eassert ((hash & ~INTMASK) == 0);
|
||||
|
||||
/* Increment count after resizing because resizing may fail. */
|
||||
maybe_resize_hash_table (h);
|
||||
|
@ -3902,7 +3902,7 @@ hash_remove_from_table (struct Lisp_Hash_Table *h, Lisp_Object key)
|
|||
HASH_NEXT (h, i) = h->next_free;
|
||||
h->next_free = make_number (i);
|
||||
h->count--;
|
||||
xassert (h->count >= 0);
|
||||
eassert (h->count >= 0);
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -24,8 +24,6 @@ GNU General Public License for more details.
|
|||
You should have received a copy of the GNU General Public License
|
||||
along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* #define FONTSET_DEBUG */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <setjmp.h>
|
||||
|
@ -55,13 +53,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
|||
|
||||
#include "font.h"
|
||||
|
||||
#undef xassert
|
||||
#ifdef FONTSET_DEBUG
|
||||
#define xassert(X) do {if (!(X)) abort ();} while (0)
|
||||
#else /* not FONTSET_DEBUG */
|
||||
#define xassert(X) (void) 0
|
||||
#endif /* not FONTSET_DEBUG */
|
||||
|
||||
/* FONTSET
|
||||
|
||||
A fontset is a collection of font related information to give
|
||||
|
@ -206,7 +197,7 @@ static void accumulate_script_ranges (Lisp_Object, Lisp_Object,
|
|||
Lisp_Object);
|
||||
static void set_fontset_font (Lisp_Object, Lisp_Object);
|
||||
|
||||
#ifdef FONTSET_DEBUG
|
||||
#ifdef ENABLE_CHECKING
|
||||
|
||||
/* Return 1 if ID is a valid fontset id, else return 0. */
|
||||
|
||||
|
@ -459,7 +450,7 @@ fontset_get_font_group (Lisp_Object fontset, int c)
|
|||
Lisp_Object base_fontset;
|
||||
int from = 0, to = MAX_CHAR, i;
|
||||
|
||||
xassert (! BASE_FONTSET_P (fontset));
|
||||
eassert (! BASE_FONTSET_P (fontset));
|
||||
if (c >= 0)
|
||||
font_group = CHAR_TABLE_REF (fontset, c);
|
||||
else
|
||||
|
@ -848,7 +839,7 @@ free_realized_fontset (FRAME_PTR f, Lisp_Object fontset)
|
|||
if (0)
|
||||
for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
xassert (FONT_OBJECT_P (XCAR (tail)));
|
||||
eassert (FONT_OBJECT_P (XCAR (tail)));
|
||||
font_close_object (f, XCAR (tail));
|
||||
}
|
||||
#endif
|
||||
|
@ -865,8 +856,8 @@ free_face_fontset (FRAME_PTR f, struct face *face)
|
|||
fontset = FONTSET_FROM_ID (face->fontset);
|
||||
if (NILP (fontset))
|
||||
return;
|
||||
xassert (! BASE_FONTSET_P (fontset));
|
||||
xassert (f == XFRAME (FONTSET_FRAME (fontset)));
|
||||
eassert (! BASE_FONTSET_P (fontset));
|
||||
eassert (f == XFRAME (FONTSET_FRAME (fontset)));
|
||||
free_realized_fontset (f, fontset);
|
||||
ASET (Vfontset_table, face->fontset, Qnil);
|
||||
if (face->fontset < next_fontset_id)
|
||||
|
@ -876,8 +867,8 @@ free_face_fontset (FRAME_PTR f, struct face *face)
|
|||
int id = XINT (FONTSET_ID (FONTSET_DEFAULT (fontset)));
|
||||
|
||||
fontset = AREF (Vfontset_table, id);
|
||||
xassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset));
|
||||
xassert (f == XFRAME (FONTSET_FRAME (fontset)));
|
||||
eassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset));
|
||||
eassert (f == XFRAME (FONTSET_FRAME (fontset)));
|
||||
free_realized_fontset (f, fontset);
|
||||
ASET (Vfontset_table, id, Qnil);
|
||||
if (id < next_fontset_id)
|
||||
|
@ -924,9 +915,9 @@ face_for_char (FRAME_PTR f, struct face *face, int c, int pos, Lisp_Object objec
|
|||
if (ASCII_CHAR_P (c) || face->fontset < 0)
|
||||
return face->ascii_face->id;
|
||||
|
||||
xassert (fontset_id_valid_p (face->fontset));
|
||||
eassert (fontset_id_valid_p (face->fontset));
|
||||
fontset = FONTSET_FROM_ID (face->fontset);
|
||||
xassert (!BASE_FONTSET_P (fontset));
|
||||
eassert (!BASE_FONTSET_P (fontset));
|
||||
|
||||
if (pos < 0)
|
||||
{
|
||||
|
@ -973,7 +964,7 @@ face_for_char (FRAME_PTR f, struct face *face, int c, int pos, Lisp_Object objec
|
|||
FONTSET_NOFONT_FACE (fontset) = make_number (face_id);
|
||||
}
|
||||
}
|
||||
xassert (face_id >= 0);
|
||||
eassert (face_id >= 0);
|
||||
return face_id;
|
||||
}
|
||||
|
||||
|
@ -992,9 +983,9 @@ font_for_char (struct face *face, int c, int pos, Lisp_Object object)
|
|||
return font_object;
|
||||
}
|
||||
|
||||
xassert (fontset_id_valid_p (face->fontset));
|
||||
eassert (fontset_id_valid_p (face->fontset));
|
||||
fontset = FONTSET_FROM_ID (face->fontset);
|
||||
xassert (!BASE_FONTSET_P (fontset));
|
||||
eassert (!BASE_FONTSET_P (fontset));
|
||||
if (pos < 0)
|
||||
{
|
||||
id = -1;
|
||||
|
@ -2104,7 +2095,7 @@ DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0,
|
|||
}
|
||||
|
||||
|
||||
#ifdef FONTSET_DEBUG
|
||||
#ifdef ENABLE_CHECKING
|
||||
|
||||
Lisp_Object dump_fontset (Lisp_Object) EXTERNALLY_VISIBLE;
|
||||
|
||||
|
@ -2154,7 +2145,7 @@ DEFUN ("fontset-list-all", Ffontset_list_all, Sfontset_list_all, 0, 0, 0,
|
|||
val = Fcons (dump_fontset (AREF (Vfontset_table, i)), val);
|
||||
return (Fnreverse (val));
|
||||
}
|
||||
#endif /* FONTSET_DEBUG */
|
||||
#endif /* ENABLE_CHECKING */
|
||||
|
||||
void
|
||||
syms_of_fontset (void)
|
||||
|
@ -2245,7 +2236,7 @@ at the vertical center of lines. */);
|
|||
defsubr (&Sfontset_info);
|
||||
defsubr (&Sfontset_font);
|
||||
defsubr (&Sfontset_list);
|
||||
#ifdef FONTSET_DEBUG
|
||||
#ifdef ENABLE_CHECKING
|
||||
defsubr (&Sfontset_list_all);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -849,7 +849,7 @@ draw_fringe_bitmap (struct window *w, struct glyph_row *row, int left_p)
|
|||
void
|
||||
draw_row_fringe_bitmaps (struct window *w, struct glyph_row *row)
|
||||
{
|
||||
xassert (interrupt_input_blocked);
|
||||
eassert (interrupt_input_blocked);
|
||||
|
||||
/* If row is completely invisible, because of vscrolling, we
|
||||
don't have to draw anything. */
|
||||
|
|
|
@ -372,7 +372,7 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for)
|
|||
{
|
||||
entity = key;
|
||||
val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX));
|
||||
xassert (CONSP (val));
|
||||
eassert (CONSP (val));
|
||||
key = XCDR (val);
|
||||
}
|
||||
else
|
||||
|
@ -1325,7 +1325,7 @@ ftfont_close (FRAME_PTR f, struct font *font)
|
|||
|
||||
val = Fcons (font->props[FONT_FILE_INDEX], make_number (ftfont_info->index));
|
||||
cache = ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE);
|
||||
xassert (CONSP (cache));
|
||||
eassert (CONSP (cache));
|
||||
val = XCDR (cache);
|
||||
(XSAVE_VALUE (val)->integer)--;
|
||||
if (XSAVE_VALUE (val)->integer == 0)
|
||||
|
|
|
@ -4555,7 +4555,7 @@ update_frame_tool_bar (FRAME_PTR f)
|
|||
? TOOL_BAR_IMAGE_DISABLED_SELECTED
|
||||
: TOOL_BAR_IMAGE_DISABLED_DESELECTED);
|
||||
|
||||
xassert (ASIZE (image) >= idx);
|
||||
eassert (ASIZE (image) >= idx);
|
||||
image = AREF (image, idx);
|
||||
}
|
||||
else
|
||||
|
|
46
src/image.c
46
src/image.c
|
@ -522,7 +522,7 @@ x_create_bitmap_mask (struct frame *f, ptrdiff_t id)
|
|||
}
|
||||
}
|
||||
|
||||
xassert (interrupt_input_blocked);
|
||||
eassert (interrupt_input_blocked);
|
||||
gc = XCreateGC (FRAME_X_DISPLAY (f), mask, 0, NULL);
|
||||
XPutImage (FRAME_X_DISPLAY (f), mask, gc, mask_img, 0, 0, 0, 0,
|
||||
width, height);
|
||||
|
@ -874,7 +874,7 @@ image_spec_value (Lisp_Object spec, Lisp_Object key, int *found)
|
|||
{
|
||||
Lisp_Object tail;
|
||||
|
||||
xassert (valid_image_p (spec));
|
||||
eassert (valid_image_p (spec));
|
||||
|
||||
for (tail = XCDR (spec);
|
||||
CONSP (tail) && CONSP (XCDR (tail));
|
||||
|
@ -986,11 +986,11 @@ make_image (Lisp_Object spec, EMACS_UINT hash)
|
|||
struct image *img = (struct image *) xmalloc (sizeof *img);
|
||||
Lisp_Object file = image_spec_value (spec, QCfile, NULL);
|
||||
|
||||
xassert (valid_image_p (spec));
|
||||
eassert (valid_image_p (spec));
|
||||
memset (img, 0, sizeof *img);
|
||||
img->dependencies = NILP (file) ? Qnil : list1 (file);
|
||||
img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL));
|
||||
xassert (img->type != NULL);
|
||||
eassert (img->type != NULL);
|
||||
img->spec = spec;
|
||||
img->lisp_data = Qnil;
|
||||
img->ascent = DEFAULT_IMAGE_ASCENT;
|
||||
|
@ -1349,7 +1349,7 @@ x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name,
|
|||
XColor color;
|
||||
unsigned long result;
|
||||
|
||||
xassert (STRINGP (color_name));
|
||||
eassert (STRINGP (color_name));
|
||||
|
||||
if (x_defined_color (f, SSDATA (color_name), &color, 1)
|
||||
&& img->ncolors < min (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *img->colors,
|
||||
|
@ -1461,7 +1461,7 @@ free_image_cache (struct frame *f)
|
|||
ptrdiff_t i;
|
||||
|
||||
/* Cache should not be referenced by any frame when freed. */
|
||||
xassert (c->refcount == 0);
|
||||
eassert (c->refcount == 0);
|
||||
|
||||
for (i = 0; i < c->used; ++i)
|
||||
free_image (f, c->images[i]);
|
||||
|
@ -1708,8 +1708,8 @@ lookup_image (struct frame *f, Lisp_Object spec)
|
|||
|
||||
/* F must be a window-system frame, and SPEC must be a valid image
|
||||
specification. */
|
||||
xassert (FRAME_WINDOW_P (f));
|
||||
xassert (valid_image_p (spec));
|
||||
eassert (FRAME_WINDOW_P (f));
|
||||
eassert (valid_image_p (spec));
|
||||
|
||||
/* Look up SPEC in the hash table of the image cache. */
|
||||
hash = sxhash (spec, 0);
|
||||
|
@ -1947,7 +1947,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth,
|
|||
Window window = FRAME_X_WINDOW (f);
|
||||
Screen *screen = FRAME_X_SCREEN (f);
|
||||
|
||||
xassert (interrupt_input_blocked);
|
||||
eassert (interrupt_input_blocked);
|
||||
|
||||
if (depth <= 0)
|
||||
depth = DefaultDepthOfScreen (screen);
|
||||
|
@ -2085,7 +2085,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth,
|
|||
static void
|
||||
x_destroy_x_image (XImagePtr ximg)
|
||||
{
|
||||
xassert (interrupt_input_blocked);
|
||||
eassert (interrupt_input_blocked);
|
||||
if (ximg)
|
||||
{
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
|
@ -2114,7 +2114,7 @@ x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int he
|
|||
#ifdef HAVE_X_WINDOWS
|
||||
GC gc;
|
||||
|
||||
xassert (interrupt_input_blocked);
|
||||
eassert (interrupt_input_blocked);
|
||||
gc = XCreateGC (FRAME_X_DISPLAY (f), pixmap, 0, NULL);
|
||||
XPutImage (FRAME_X_DISPLAY (f), pixmap, gc, ximg, 0, 0, 0, 0, width, height);
|
||||
XFreeGC (FRAME_X_DISPLAY (f), gc);
|
||||
|
@ -2129,7 +2129,7 @@ x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int he
|
|||
#endif /* HAVE_NTGUI */
|
||||
|
||||
#ifdef HAVE_NS
|
||||
xassert (ximg == pixmap);
|
||||
eassert (ximg == pixmap);
|
||||
ns_retain_object (ximg);
|
||||
#endif
|
||||
}
|
||||
|
@ -2319,7 +2319,7 @@ xbm_image_p (Lisp_Object object)
|
|||
if (!parse_image_spec (object, kw, XBM_LAST, Qxbm))
|
||||
return 0;
|
||||
|
||||
xassert (EQ (kw[XBM_TYPE].value, Qxbm));
|
||||
eassert (EQ (kw[XBM_TYPE].value, Qxbm));
|
||||
|
||||
if (kw[XBM_FILE].count)
|
||||
{
|
||||
|
@ -2780,7 +2780,7 @@ xbm_load_image (struct frame *f, struct image *img, unsigned char *contents,
|
|||
int non_default_colors = 0;
|
||||
Lisp_Object value;
|
||||
|
||||
xassert (img->width > 0 && img->height > 0);
|
||||
eassert (img->width > 0 && img->height > 0);
|
||||
|
||||
/* Get foreground and background colors, maybe allocate colors. */
|
||||
value = image_spec_value (img->spec, QCforeground, NULL);
|
||||
|
@ -2840,7 +2840,7 @@ xbm_load (struct frame *f, struct image *img)
|
|||
int success_p = 0;
|
||||
Lisp_Object file_name;
|
||||
|
||||
xassert (xbm_image_p (img->spec));
|
||||
eassert (xbm_image_p (img->spec));
|
||||
|
||||
/* If IMG->spec specifies a file name, create a non-file spec from it. */
|
||||
file_name = image_spec_value (img->spec, QCfile, NULL);
|
||||
|
@ -2886,14 +2886,14 @@ xbm_load (struct frame *f, struct image *img)
|
|||
memcpy (fmt, xbm_format, sizeof fmt);
|
||||
parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm);
|
||||
(void) parsed_p;
|
||||
xassert (parsed_p);
|
||||
eassert (parsed_p);
|
||||
|
||||
/* Get specified width, and height. */
|
||||
if (!in_memory_file_p)
|
||||
{
|
||||
img->width = XFASTINT (fmt[XBM_WIDTH].value);
|
||||
img->height = XFASTINT (fmt[XBM_HEIGHT].value);
|
||||
xassert (img->width > 0 && img->height > 0);
|
||||
eassert (img->width > 0 && img->height > 0);
|
||||
if (!check_image_size (f, img->width, img->height))
|
||||
{
|
||||
image_error ("Invalid image size (see `max-image-size')",
|
||||
|
@ -3580,7 +3580,7 @@ xpm_load (struct frame *f, struct image *img)
|
|||
|
||||
img->width = attrs.width;
|
||||
img->height = attrs.height;
|
||||
xassert (img->width > 0 && img->height > 0);
|
||||
eassert (img->width > 0 && img->height > 0);
|
||||
|
||||
/* The call to XpmFreeAttributes below frees attrs.alloc_pixels. */
|
||||
#ifdef HAVE_NTGUI
|
||||
|
@ -5551,7 +5551,7 @@ init_png_functions (Lisp_Object libraries)
|
|||
static _Noreturn void
|
||||
my_png_error (png_struct *png_ptr, const char *msg)
|
||||
{
|
||||
xassert (png_ptr != NULL);
|
||||
eassert (png_ptr != NULL);
|
||||
/* Avoid compiler warning about deprecated direct access to
|
||||
png_ptr's fields in libpng versions 1.4.x. */
|
||||
image_error ("PNG error: %s", build_string (msg), Qnil);
|
||||
|
@ -5562,7 +5562,7 @@ my_png_error (png_struct *png_ptr, const char *msg)
|
|||
static void
|
||||
my_png_warning (png_struct *png_ptr, const char *msg)
|
||||
{
|
||||
xassert (png_ptr != NULL);
|
||||
eassert (png_ptr != NULL);
|
||||
image_error ("PNG warning: %s", build_string (msg), Qnil);
|
||||
}
|
||||
|
||||
|
@ -5832,7 +5832,7 @@ png_load (struct frame *f, struct image *img)
|
|||
images with alpha channel, i.e. RGBA. If conversions above were
|
||||
sufficient we should only have 3 or 4 channels here. */
|
||||
channels = fn_png_get_channels (png_ptr, info_ptr);
|
||||
xassert (channels == 3 || channels == 4);
|
||||
eassert (channels == 3 || channels == 4);
|
||||
|
||||
/* Number of bytes needed for one row of the image. */
|
||||
row_bytes = fn_png_get_rowbytes (png_ptr, info_ptr);
|
||||
|
@ -8540,7 +8540,7 @@ gs_load (struct frame *f, struct image *img)
|
|||
img->height = in_height;
|
||||
|
||||
/* Create the pixmap. */
|
||||
xassert (img->pixmap == NO_PIXMAP);
|
||||
eassert (img->pixmap == NO_PIXMAP);
|
||||
|
||||
if (x_check_image_size (0, img->width, img->height))
|
||||
{
|
||||
|
@ -8611,7 +8611,7 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f)
|
|||
/* Kill the GS process. We should have found PIXMAP in the image
|
||||
cache and its image should contain a process object. */
|
||||
img = c->images[i];
|
||||
xassert (PROCESSP (img->lisp_data));
|
||||
eassert (PROCESSP (img->lisp_data));
|
||||
Fkill_process (img->lisp_data, Qnil);
|
||||
img->lisp_data = Qnil;
|
||||
|
||||
|
|
|
@ -1752,7 +1752,7 @@ adjust_point_for_property (ptrdiff_t last_pt, int modified)
|
|||
&& (beg < PT /* && end > PT <- It's always the case. */
|
||||
|| (beg <= PT && STRINGP (val) && SCHARS (val) == 0)))
|
||||
{
|
||||
xassert (end > PT);
|
||||
eassert (end > PT);
|
||||
SET_PT (PT < last_pt
|
||||
? (STRINGP (val) && SCHARS (val) == 0
|
||||
? max (beg - 1, BEGV)
|
||||
|
@ -1834,7 +1834,7 @@ adjust_point_for_property (ptrdiff_t last_pt, int modified)
|
|||
#if 0 /* This assertion isn't correct, because SET_PT may end up setting
|
||||
the point to something other than its argument, due to
|
||||
point-motion hooks, intangibility, etc. */
|
||||
xassert (PT == beg || PT == end);
|
||||
eassert (PT == beg || PT == end);
|
||||
#endif
|
||||
|
||||
/* Pretend the area doesn't exist if the buffer is not
|
||||
|
|
|
@ -129,7 +129,7 @@ discard_menu_items (void)
|
|||
menu_items = Qnil;
|
||||
menu_items_allocated = 0;
|
||||
}
|
||||
xassert (NILP (menu_items_inuse));
|
||||
eassert (NILP (menu_items_inuse));
|
||||
}
|
||||
|
||||
#ifdef HAVE_NS
|
||||
|
|
|
@ -353,7 +353,7 @@ static struct fd_callback_data
|
|||
void
|
||||
add_read_fd (int fd, fd_callback func, void *data)
|
||||
{
|
||||
xassert (fd < MAXDESC);
|
||||
eassert (fd < MAXDESC);
|
||||
add_keyboard_wait_descriptor (fd);
|
||||
|
||||
fd_callback_info[fd].func = func;
|
||||
|
@ -366,7 +366,7 @@ add_read_fd (int fd, fd_callback func, void *data)
|
|||
void
|
||||
delete_read_fd (int fd)
|
||||
{
|
||||
xassert (fd < MAXDESC);
|
||||
eassert (fd < MAXDESC);
|
||||
delete_keyboard_wait_descriptor (fd);
|
||||
|
||||
fd_callback_info[fd].condition &= ~FOR_READ;
|
||||
|
@ -383,7 +383,7 @@ delete_read_fd (int fd)
|
|||
void
|
||||
add_write_fd (int fd, fd_callback func, void *data)
|
||||
{
|
||||
xassert (fd < MAXDESC);
|
||||
eassert (fd < MAXDESC);
|
||||
FD_SET (fd, &write_mask);
|
||||
if (fd > max_input_desc)
|
||||
max_input_desc = fd;
|
||||
|
@ -400,7 +400,7 @@ delete_write_fd (int fd)
|
|||
{
|
||||
int lim = max_input_desc;
|
||||
|
||||
xassert (fd < MAXDESC);
|
||||
eassert (fd < MAXDESC);
|
||||
FD_CLR (fd, &write_mask);
|
||||
fd_callback_info[fd].condition &= ~FOR_WRITE;
|
||||
if (fd_callback_info[fd].condition == 0)
|
||||
|
|
10
src/scroll.c
10
src/scroll.c
|
@ -270,7 +270,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
|
|||
{ \
|
||||
int ck; \
|
||||
for (ck = 0; ck < window_size; ++ck) \
|
||||
xassert (copy_from[ck] == -1 \
|
||||
eassert (copy_from[ck] == -1 \
|
||||
|| (copy_from[ck] >= 0 && copy_from[ck] < window_size)); \
|
||||
} \
|
||||
while (0);
|
||||
|
@ -317,8 +317,8 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
|
|||
{
|
||||
/* Best thing done here is no insert or delete, i.e. a write. */
|
||||
--i, --j;
|
||||
xassert (i >= 0 && i < window_size);
|
||||
xassert (j >= 0 && j < window_size);
|
||||
eassert (i >= 0 && i < window_size);
|
||||
eassert (j >= 0 && j < window_size);
|
||||
copy_from[i] = j;
|
||||
retained_p[j] = 1;
|
||||
|
||||
|
@ -368,7 +368,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
|
|||
}
|
||||
|
||||
for (k = 0; k < window_size; ++k)
|
||||
xassert (copy_from[k] >= 0 && copy_from[k] < window_size);
|
||||
eassert (copy_from[k] >= 0 && copy_from[k] < window_size);
|
||||
|
||||
/* Perform the row swizzling. */
|
||||
mirrored_line_dance (current_matrix, unchanged_at_top, window_size,
|
||||
|
@ -728,7 +728,7 @@ do_direct_scrolling (struct frame *frame, struct glyph_matrix *current_matrix,
|
|||
place they belong. */
|
||||
int n_to_write = p->writecount;
|
||||
write_follows_p = 1;
|
||||
xassert (n_to_write > 0);
|
||||
eassert (n_to_write > 0);
|
||||
|
||||
if (i > j)
|
||||
{
|
||||
|
|
|
@ -733,7 +733,7 @@ vox_configure (struct sound_device *sd)
|
|||
{
|
||||
int val;
|
||||
|
||||
xassert (sd->fd >= 0);
|
||||
eassert (sd->fd >= 0);
|
||||
|
||||
/* On GNU/Linux, it seems that the device driver doesn't like to be
|
||||
interrupted by a signal. Block the ones we know to cause
|
||||
|
@ -962,7 +962,7 @@ alsa_configure (struct sound_device *sd)
|
|||
struct alsa_params *p = (struct alsa_params *) sd->data;
|
||||
snd_pcm_uframes_t buffer_size;
|
||||
|
||||
xassert (p->handle != 0);
|
||||
eassert (p->handle != 0);
|
||||
|
||||
err = snd_pcm_hw_params_malloc (&p->hwparams);
|
||||
if (err < 0)
|
||||
|
|
14
src/term.c
14
src/term.c
|
@ -1459,7 +1459,7 @@ append_glyph (struct it *it)
|
|||
struct glyph *glyph, *end;
|
||||
int i;
|
||||
|
||||
xassert (it->glyph_row);
|
||||
eassert (it->glyph_row);
|
||||
glyph = (it->glyph_row->glyphs[it->area]
|
||||
+ it->glyph_row->used[it->area]);
|
||||
end = it->glyph_row->glyphs[1 + it->area];
|
||||
|
@ -1546,7 +1546,7 @@ produce_glyphs (struct it *it)
|
|||
/* If a hook is installed, let it do the work. */
|
||||
|
||||
/* Nothing but characters are supported on terminal frames. */
|
||||
xassert (it->what == IT_CHARACTER
|
||||
eassert (it->what == IT_CHARACTER
|
||||
|| it->what == IT_COMPOSITION
|
||||
|| it->what == IT_STRETCH
|
||||
|| it->what == IT_GLYPHLESS);
|
||||
|
@ -1633,7 +1633,7 @@ produce_glyphs (struct it *it)
|
|||
{
|
||||
Lisp_Object acronym = lookup_glyphless_char_display (-1, it);
|
||||
|
||||
xassert (it->what == IT_GLYPHLESS);
|
||||
eassert (it->what == IT_GLYPHLESS);
|
||||
produce_glyphless_glyph (it, 1, acronym);
|
||||
}
|
||||
}
|
||||
|
@ -1657,7 +1657,7 @@ append_composite_glyph (struct it *it)
|
|||
{
|
||||
struct glyph *glyph;
|
||||
|
||||
xassert (it->glyph_row);
|
||||
eassert (it->glyph_row);
|
||||
glyph = it->glyph_row->glyphs[it->area] + it->glyph_row->used[it->area];
|
||||
if (glyph < it->glyph_row->glyphs[1 + it->area])
|
||||
{
|
||||
|
@ -1749,7 +1749,7 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str)
|
|||
struct glyph *glyph, *end;
|
||||
int i;
|
||||
|
||||
xassert (it->glyph_row);
|
||||
eassert (it->glyph_row);
|
||||
glyph = it->glyph_row->glyphs[it->area] + it->glyph_row->used[it->area];
|
||||
end = it->glyph_row->glyphs[1 + it->area];
|
||||
|
||||
|
@ -1871,7 +1871,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym)
|
|||
}
|
||||
else
|
||||
{
|
||||
xassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE);
|
||||
eassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE);
|
||||
len = (it->c < 0x10000 ? sprintf (buf, "\\u%04X", it->c)
|
||||
: it->c <= MAX_UNICODE_CHAR ? sprintf (buf, "\\U%06X", it->c)
|
||||
: sprintf (buf, "\\x%06X", it->c));
|
||||
|
@ -2067,7 +2067,7 @@ turn_off_face (struct frame *f, int face_id)
|
|||
struct face *face = FACE_FROM_ID (f, face_id);
|
||||
struct tty_display_info *tty = FRAME_TTY (f);
|
||||
|
||||
xassert (face != NULL);
|
||||
eassert (face != NULL);
|
||||
|
||||
if (tty->TS_exit_attribute_mode)
|
||||
{
|
||||
|
|
|
@ -616,7 +616,7 @@ w32_face_attributes (struct frame *f, int face_id)
|
|||
WORD char_attr;
|
||||
struct face *face = FACE_FROM_ID (f, face_id);
|
||||
|
||||
xassert (face != NULL);
|
||||
eassert (face != NULL);
|
||||
|
||||
char_attr = char_attr_normal;
|
||||
|
||||
|
|
|
@ -4005,8 +4005,8 @@ unwind_create_frame (Lisp_Object frame)
|
|||
|
||||
#if GLYPH_DEBUG
|
||||
/* Check that reference counts are indeed correct. */
|
||||
xassert (dpyinfo->reference_count == dpyinfo_refcount);
|
||||
xassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
|
||||
eassert (dpyinfo->reference_count == dpyinfo_refcount);
|
||||
eassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
|
||||
#endif
|
||||
return Qt;
|
||||
}
|
||||
|
|
|
@ -742,7 +742,7 @@ x_after_update_window_line (struct glyph_row *desired_row)
|
|||
struct frame *f;
|
||||
int width, height;
|
||||
|
||||
xassert (w);
|
||||
eassert (w);
|
||||
|
||||
if (!desired_row->mode_line_p && !w->pseudo_window_p)
|
||||
desired_row->redraw_fringe_bitmaps_p = 1;
|
||||
|
@ -1086,7 +1086,7 @@ x_set_mouse_face_gc (struct glyph_string *s)
|
|||
s->gc = FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
}
|
||||
|
||||
xassert (s->gc != 0);
|
||||
eassert (s->gc != 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1143,7 +1143,7 @@ x_set_glyph_string_gc (struct glyph_string *s)
|
|||
}
|
||||
|
||||
/* GC must have been set. */
|
||||
xassert (s->gc != 0);
|
||||
eassert (s->gc != 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1560,7 +1560,7 @@ w32_alloc_lighter_color (struct frame *f, COLORREF *color,
|
|||
delta /= 256;
|
||||
|
||||
/* Change RGB values by specified FACTOR. Avoid overflow! */
|
||||
xassert (factor >= 0);
|
||||
eassert (factor >= 0);
|
||||
new = PALETTERGB (min (0xff, factor * GetRValue (*color)),
|
||||
min (0xff, factor * GetGValue (*color)),
|
||||
min (0xff, factor * GetBValue (*color)));
|
||||
|
@ -2237,7 +2237,7 @@ x_draw_image_glyph_string (struct glyph_string *s)
|
|||
static void
|
||||
x_draw_stretch_glyph_string (struct glyph_string *s)
|
||||
{
|
||||
xassert (s->first_glyph->type == STRETCH_GLYPH);
|
||||
eassert (s->first_glyph->type == STRETCH_GLYPH);
|
||||
|
||||
if (s->hl == DRAW_CURSOR
|
||||
&& !x_stretch_cursor_p)
|
||||
|
@ -6032,9 +6032,9 @@ x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
|
|||
static void
|
||||
x_check_font (struct frame *f, struct font *font)
|
||||
{
|
||||
xassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX]));
|
||||
eassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX]));
|
||||
if (font->driver->check)
|
||||
xassert (font->driver->check (f, font) == 0);
|
||||
eassert (font->driver->check (f, font) == 0);
|
||||
}
|
||||
|
||||
#endif /* GLYPH_DEBUG != 0 */
|
||||
|
|
12
src/window.c
12
src/window.c
|
@ -2035,7 +2035,7 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf
|
|||
candidate_p = 1;
|
||||
else if (NILP (all_frames))
|
||||
{
|
||||
xassert (WINDOWP (owindow));
|
||||
eassert (WINDOWP (owindow));
|
||||
candidate_p = EQ (w->frame, XWINDOW (owindow)->frame);
|
||||
}
|
||||
else if (EQ (all_frames, Qvisible))
|
||||
|
@ -4010,8 +4010,8 @@ grow_mini_window (struct window *w, int delta)
|
|||
struct window *r;
|
||||
Lisp_Object root, value;
|
||||
|
||||
xassert (MINI_WINDOW_P (w));
|
||||
xassert (delta >= 0);
|
||||
eassert (MINI_WINDOW_P (w));
|
||||
eassert (delta >= 0);
|
||||
|
||||
root = FRAME_ROOT_WINDOW (f);
|
||||
r = XWINDOW (root);
|
||||
|
@ -4043,7 +4043,7 @@ shrink_mini_window (struct window *w)
|
|||
Lisp_Object root, value;
|
||||
EMACS_INT size;
|
||||
|
||||
xassert (MINI_WINDOW_P (w));
|
||||
eassert (MINI_WINDOW_P (w));
|
||||
|
||||
size = XINT (w->total_lines);
|
||||
if (size > 1)
|
||||
|
@ -4721,7 +4721,7 @@ scroll_command (Lisp_Object n, int direction)
|
|||
{
|
||||
ptrdiff_t count = SPECPDL_INDEX ();
|
||||
|
||||
xassert (eabs (direction) == 1);
|
||||
eassert (eabs (direction) == 1);
|
||||
|
||||
/* If selected window's buffer isn't current, make it current for
|
||||
the moment. But don't screw up if window_scroll gets an error. */
|
||||
|
@ -5686,7 +5686,7 @@ the return value is nil. Otherwise the value is t. */)
|
|||
if (NILP (leaf_windows[i]->buffer))
|
||||
{
|
||||
/* Assert it's not reused as a combination. */
|
||||
xassert (NILP (leaf_windows[i]->hchild)
|
||||
eassert (NILP (leaf_windows[i]->hchild)
|
||||
&& NILP (leaf_windows[i]->vchild));
|
||||
free_window_matrices (leaf_windows[i]);
|
||||
}
|
||||
|
|
320
src/xdisp.c
320
src/xdisp.c
File diff suppressed because it is too large
Load diff
90
src/xfaces.c
90
src/xfaces.c
|
@ -539,7 +539,7 @@ int color_count[256];
|
|||
void
|
||||
register_color (unsigned long pixel)
|
||||
{
|
||||
xassert (pixel < 256);
|
||||
eassert (pixel < 256);
|
||||
++color_count[pixel];
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,7 @@ register_color (unsigned long pixel)
|
|||
void
|
||||
unregister_color (unsigned long pixel)
|
||||
{
|
||||
xassert (pixel < 256);
|
||||
eassert (pixel < 256);
|
||||
if (color_count[pixel] > 0)
|
||||
--color_count[pixel];
|
||||
else
|
||||
|
@ -663,7 +663,7 @@ static inline void
|
|||
x_free_gc (struct frame *f, GC gc)
|
||||
{
|
||||
eassert (interrupt_input_blocked);
|
||||
IF_DEBUG (xassert (--ngcs >= 0));
|
||||
IF_DEBUG (eassert (--ngcs >= 0));
|
||||
XFreeGC (FRAME_X_DISPLAY (f), gc);
|
||||
}
|
||||
|
||||
|
@ -689,7 +689,7 @@ x_create_gc (struct frame *f, unsigned long mask, XGCValues *xgcv)
|
|||
static inline void
|
||||
x_free_gc (struct frame *f, GC gc)
|
||||
{
|
||||
IF_DEBUG (xassert (--ngcs >= 0));
|
||||
IF_DEBUG (eassert (--ngcs >= 0));
|
||||
xfree (gc);
|
||||
}
|
||||
|
||||
|
@ -1325,8 +1325,8 @@ load_color (struct frame *f, struct face *face, Lisp_Object name,
|
|||
{
|
||||
XColor color;
|
||||
|
||||
xassert (STRINGP (name));
|
||||
xassert (target_index == LFACE_FOREGROUND_INDEX
|
||||
eassert (STRINGP (name));
|
||||
eassert (target_index == LFACE_FOREGROUND_INDEX
|
||||
|| target_index == LFACE_BACKGROUND_INDEX
|
||||
|| target_index == LFACE_UNDERLINE_INDEX
|
||||
|| target_index == LFACE_OVERLINE_INDEX
|
||||
|
@ -1855,7 +1855,7 @@ the WIDTH times as wide as FACE on FRAME. */)
|
|||
#define LFACE_INHERIT(LFACE) AREF ((LFACE), LFACE_INHERIT_INDEX)
|
||||
#define LFACE_FONTSET(LFACE) AREF ((LFACE), LFACE_FONTSET_INDEX)
|
||||
|
||||
#if XASSERTS
|
||||
#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. */
|
||||
|
||||
|
@ -1873,68 +1873,68 @@ the WIDTH times as wide as FACE on FRAME. */)
|
|||
static void
|
||||
check_lface_attrs (Lisp_Object *attrs)
|
||||
{
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX])
|
||||
|| STRINGP (attrs[LFACE_FAMILY_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_FOUNDRY_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_FOUNDRY_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_FOUNDRY_INDEX])
|
||||
|| STRINGP (attrs[LFACE_FOUNDRY_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_SWIDTH_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_SWIDTH_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_HEIGHT_INDEX])
|
||||
|| INTEGERP (attrs[LFACE_HEIGHT_INDEX])
|
||||
|| FLOATP (attrs[LFACE_HEIGHT_INDEX])
|
||||
|| FUNCTIONP (attrs[LFACE_HEIGHT_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_WEIGHT_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_WEIGHT_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_SLANT_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_SLANT_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_SLANT_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_SLANT_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_UNDERLINE_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_UNDERLINE_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_UNDERLINE_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_UNDERLINE_INDEX])
|
||||
|| STRINGP (attrs[LFACE_UNDERLINE_INDEX])
|
||||
|| CONSP (attrs[LFACE_UNDERLINE_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_OVERLINE_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_OVERLINE_INDEX])
|
||||
|| STRINGP (attrs[LFACE_OVERLINE_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_STRIKE_THROUGH_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_STRIKE_THROUGH_INDEX])
|
||||
|| STRINGP (attrs[LFACE_STRIKE_THROUGH_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_BOX_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_BOX_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_BOX_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_BOX_INDEX])
|
||||
|| STRINGP (attrs[LFACE_BOX_INDEX])
|
||||
|| INTEGERP (attrs[LFACE_BOX_INDEX])
|
||||
|| CONSP (attrs[LFACE_BOX_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_INVERSE_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_INVERSE_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_FOREGROUND_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_FOREGROUND_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_FOREGROUND_INDEX])
|
||||
|| STRINGP (attrs[LFACE_FOREGROUND_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_BACKGROUND_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_BACKGROUND_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_BACKGROUND_INDEX])
|
||||
|| STRINGP (attrs[LFACE_BACKGROUND_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_INHERIT_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_INHERIT_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_INHERIT_INDEX])
|
||||
|| NILP (attrs[LFACE_INHERIT_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_INHERIT_INDEX])
|
||||
|| CONSP (attrs[LFACE_INHERIT_INDEX]));
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_STIPPLE_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_STIPPLE_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_STIPPLE_INDEX])
|
||||
|| SYMBOLP (attrs[LFACE_STIPPLE_INDEX])
|
||||
|| !NILP (Fbitmap_spec_p (attrs[LFACE_STIPPLE_INDEX])));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX])
|
||||
|| IGNORE_DEFFACE_P (attrs[LFACE_FONT_INDEX])
|
||||
|| FONTP (attrs[LFACE_FONT_INDEX]));
|
||||
xassert (UNSPECIFIEDP (attrs[LFACE_FONTSET_INDEX])
|
||||
eassert (UNSPECIFIEDP (attrs[LFACE_FONTSET_INDEX])
|
||||
|| STRINGP (attrs[LFACE_FONTSET_INDEX])
|
||||
|| NILP (attrs[LFACE_FONTSET_INDEX]));
|
||||
#endif
|
||||
|
@ -1948,7 +1948,7 @@ check_lface (Lisp_Object lface)
|
|||
{
|
||||
if (!NILP (lface))
|
||||
{
|
||||
xassert (LFACEP (lface));
|
||||
eassert (LFACEP (lface));
|
||||
check_lface_attrs (XVECTOR (lface)->contents);
|
||||
}
|
||||
}
|
||||
|
@ -2225,7 +2225,7 @@ set_lface_from_font (struct frame *f, Lisp_Object lface,
|
|||
{
|
||||
int pt = PIXEL_TO_POINT (font->pixel_size * 10, f->resy);
|
||||
|
||||
xassert (pt > 0);
|
||||
eassert (pt > 0);
|
||||
LFACE_HEIGHT (lface) = make_number (pt);
|
||||
}
|
||||
|
||||
|
@ -2731,7 +2731,7 @@ Value is a vector of face attributes. */)
|
|||
++windows_or_buffers_changed;
|
||||
}
|
||||
|
||||
xassert (LFACEP (lface));
|
||||
eassert (LFACEP (lface));
|
||||
check_lface (lface);
|
||||
return lface;
|
||||
}
|
||||
|
@ -3515,7 +3515,7 @@ face_boolean_x_resource_value (Lisp_Object value, int signal_p)
|
|||
{
|
||||
Lisp_Object result = make_number (0);
|
||||
|
||||
xassert (STRINGP (value));
|
||||
eassert (STRINGP (value));
|
||||
|
||||
if (xstrcasecmp (SSDATA (value), "on") == 0
|
||||
|| xstrcasecmp (SSDATA (value), "true") == 0)
|
||||
|
@ -4088,7 +4088,7 @@ hash_string_case_insensitive (Lisp_Object string)
|
|||
{
|
||||
const unsigned char *s;
|
||||
unsigned hash = 0;
|
||||
xassert (STRINGP (string));
|
||||
eassert (STRINGP (string));
|
||||
for (s = SDATA (string); *s; ++s)
|
||||
hash = (hash << 1) ^ tolower (*s);
|
||||
return hash;
|
||||
|
@ -4119,7 +4119,7 @@ lface_hash (Lisp_Object *v)
|
|||
static inline int
|
||||
lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2)
|
||||
{
|
||||
xassert (lface_fully_specified_p (lface1)
|
||||
eassert (lface_fully_specified_p (lface1)
|
||||
&& lface_fully_specified_p (lface2));
|
||||
return (xstrcasecmp (SSDATA (lface1[LFACE_FAMILY_INDEX]),
|
||||
SSDATA (lface2[LFACE_FAMILY_INDEX])) == 0
|
||||
|
@ -4200,7 +4200,7 @@ void
|
|||
prepare_face_for_display (struct frame *f, struct face *face)
|
||||
{
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
xassert (FRAME_WINDOW_P (f));
|
||||
eassert (FRAME_WINDOW_P (f));
|
||||
|
||||
if (face->gc == 0)
|
||||
{
|
||||
|
@ -4472,7 +4472,7 @@ cache_face (struct face_cache *c, struct face *face, unsigned int hash)
|
|||
if (face1->id == i)
|
||||
++n;
|
||||
|
||||
xassert (n == 1);
|
||||
eassert (n == 1);
|
||||
}
|
||||
#endif /* GLYPH_DEBUG */
|
||||
|
||||
|
@ -4523,7 +4523,7 @@ lookup_face (struct frame *f, Lisp_Object *attr)
|
|||
int i;
|
||||
struct face *face;
|
||||
|
||||
xassert (cache != NULL);
|
||||
eassert (cache != NULL);
|
||||
check_lface_attrs (attr);
|
||||
|
||||
/* Look up ATTR in the face cache. */
|
||||
|
@ -4548,7 +4548,7 @@ lookup_face (struct frame *f, Lisp_Object *attr)
|
|||
face = realize_face (cache, attr, -1);
|
||||
|
||||
#if GLYPH_DEBUG
|
||||
xassert (face == FACE_FROM_ID (f, face->id));
|
||||
eassert (face == FACE_FROM_ID (f, face->id));
|
||||
#endif /* GLYPH_DEBUG */
|
||||
|
||||
return face->id;
|
||||
|
@ -4569,7 +4569,7 @@ face_for_font (struct frame *f, Lisp_Object font_object, struct face *base_face)
|
|||
int i;
|
||||
struct face *face;
|
||||
|
||||
xassert (cache != NULL);
|
||||
eassert (cache != NULL);
|
||||
base_face = base_face->ascii_face;
|
||||
hash = lface_hash (base_face->lface);
|
||||
i = hash % FACE_CACHE_BUCKETS_SIZE;
|
||||
|
@ -5470,7 +5470,7 @@ realize_default_face (struct frame *f)
|
|||
LFACE_STIPPLE (lface) = Qnil;
|
||||
|
||||
/* Realize the face; it must be fully-specified now. */
|
||||
xassert (lface_fully_specified_p (XVECTOR (lface)->contents));
|
||||
eassert (lface_fully_specified_p (XVECTOR (lface)->contents));
|
||||
check_lface (lface);
|
||||
memcpy (attrs, XVECTOR (lface)->contents, sizeof attrs);
|
||||
face = realize_face (c, attrs, DEFAULT_FACE_ID);
|
||||
|
@ -5511,7 +5511,7 @@ realize_named_face (struct frame *f, Lisp_Object symbol, int id)
|
|||
/* The default face must exist and be fully specified. */
|
||||
get_lface_attributes_no_remap (f, Qdefault, attrs, 1);
|
||||
check_lface_attrs (attrs);
|
||||
xassert (lface_fully_specified_p (attrs));
|
||||
eassert (lface_fully_specified_p (attrs));
|
||||
|
||||
/* If SYMBOL isn't know as a face, create it. */
|
||||
if (NILP (lface))
|
||||
|
@ -5541,7 +5541,7 @@ realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id)
|
|||
struct face *face;
|
||||
|
||||
/* LFACE must be fully specified. */
|
||||
xassert (cache != NULL);
|
||||
eassert (cache != NULL);
|
||||
check_lface_attrs (attrs);
|
||||
|
||||
if (former_face_id >= 0 && cache->used > former_face_id)
|
||||
|
@ -5621,7 +5621,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object *attrs)
|
|||
struct frame *f;
|
||||
Lisp_Object stipple, underline, overline, strike_through, box;
|
||||
|
||||
xassert (FRAME_WINDOW_P (cache->f));
|
||||
eassert (FRAME_WINDOW_P (cache->f));
|
||||
|
||||
/* Allocate a new realized face. */
|
||||
face = make_realized_face (attrs);
|
||||
|
@ -5699,7 +5699,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object *attrs)
|
|||
{
|
||||
/* Simple box of specified line width in foreground color of the
|
||||
face. */
|
||||
xassert (XINT (box) != 0);
|
||||
eassert (XINT (box) != 0);
|
||||
face->box = FACE_SIMPLE_BOX;
|
||||
face->box_line_width = XINT (box);
|
||||
face->box_color = face->foreground;
|
||||
|
@ -5880,7 +5880,7 @@ map_tty_color (struct frame *f, struct face *face,
|
|||
foreground_p ? FACE_TTY_DEFAULT_BG_COLOR : FACE_TTY_DEFAULT_FG_COLOR;
|
||||
#endif
|
||||
|
||||
xassert (idx == LFACE_FOREGROUND_INDEX || idx == LFACE_BACKGROUND_INDEX);
|
||||
eassert (idx == LFACE_FOREGROUND_INDEX || idx == LFACE_BACKGROUND_INDEX);
|
||||
|
||||
XSETFRAME (frame, f);
|
||||
color = face->lface[idx];
|
||||
|
@ -5948,7 +5948,7 @@ realize_tty_face (struct face_cache *cache, Lisp_Object *attrs)
|
|||
struct frame *f = cache->f;
|
||||
|
||||
/* Frame must be a termcap frame. */
|
||||
xassert (FRAME_TERMCAP_P (cache->f) || FRAME_MSDOS_P (cache->f));
|
||||
eassert (FRAME_TERMCAP_P (cache->f) || FRAME_MSDOS_P (cache->f));
|
||||
|
||||
/* Allocate a new realized face. */
|
||||
face = make_realized_face (attrs);
|
||||
|
@ -6079,7 +6079,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
|
|||
|
||||
/* W must display the current buffer. We could write this function
|
||||
to use the frame and buffer of W, but right now it doesn't. */
|
||||
/* xassert (XBUFFER (w->buffer) == current_buffer); */
|
||||
/* eassert (XBUFFER (w->buffer) == current_buffer); */
|
||||
|
||||
XSETFRAME (frame, f);
|
||||
XSETFASTINT (position, pos);
|
||||
|
@ -6189,7 +6189,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos,
|
|||
|
||||
/* W must display the current buffer. We could write this function
|
||||
to use the frame and buffer of W, but right now it doesn't. */
|
||||
/* xassert (XBUFFER (w->buffer) == current_buffer); */
|
||||
/* eassert (XBUFFER (w->buffer) == current_buffer); */
|
||||
|
||||
XSETFRAME (frame, f);
|
||||
XSETFASTINT (position, pos);
|
||||
|
@ -6293,7 +6293,7 @@ face_at_string_position (struct window *w, Lisp_Object string,
|
|||
*endptr = -1;
|
||||
|
||||
base_face = FACE_FROM_ID (f, base_face_id);
|
||||
xassert (base_face);
|
||||
eassert (base_face);
|
||||
|
||||
/* Optimize the default case that there is no face property and we
|
||||
are not in the region. */
|
||||
|
|
|
@ -2914,7 +2914,7 @@ unwind_create_frame (Lisp_Object frame)
|
|||
/* If frame is ``official'', nothing to do. */
|
||||
if (NILP (Fmemq (frame, Vframe_list)))
|
||||
{
|
||||
#if GLYPH_DEBUG && XASSERTS
|
||||
#if GLYPH_DEBUG && defined ENABLE_CHECKING
|
||||
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
|
||||
#endif
|
||||
|
||||
|
@ -2923,8 +2923,8 @@ unwind_create_frame (Lisp_Object frame)
|
|||
|
||||
#if GLYPH_DEBUG
|
||||
/* Check that reference counts are indeed correct. */
|
||||
xassert (dpyinfo->reference_count == dpyinfo_refcount);
|
||||
xassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
|
||||
eassert (dpyinfo->reference_count == dpyinfo_refcount);
|
||||
eassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
|
||||
#endif
|
||||
return Qt;
|
||||
}
|
||||
|
|
|
@ -1359,7 +1359,7 @@ x_get_window_property (Display *display, Window window, Atom property,
|
|||
break;
|
||||
|
||||
bytes_per_item = *actual_format_ret >> 3;
|
||||
xassert (*actual_size_ret <= buffer_size / bytes_per_item);
|
||||
eassert (*actual_size_ret <= buffer_size / bytes_per_item);
|
||||
|
||||
/* The man page for XGetWindowProperty says:
|
||||
"If the returned format is 32, the returned data is represented
|
||||
|
|
20
src/xterm.c
20
src/xterm.c
|
@ -715,7 +715,7 @@ x_after_update_window_line (struct glyph_row *desired_row)
|
|||
struct frame *f;
|
||||
int width, height;
|
||||
|
||||
xassert (w);
|
||||
eassert (w);
|
||||
|
||||
if (!desired_row->mode_line_p && !w->pseudo_window_p)
|
||||
desired_row->redraw_fringe_bitmaps_p = 1;
|
||||
|
@ -1033,7 +1033,7 @@ x_set_mouse_face_gc (struct glyph_string *s)
|
|||
s->gc = FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc;
|
||||
|
||||
}
|
||||
xassert (s->gc != 0);
|
||||
eassert (s->gc != 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1090,7 +1090,7 @@ x_set_glyph_string_gc (struct glyph_string *s)
|
|||
}
|
||||
|
||||
/* GC must have been set. */
|
||||
xassert (s->gc != 0);
|
||||
eassert (s->gc != 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1691,8 +1691,8 @@ x_query_colors (struct frame *f, XColor *colors, int ncolors)
|
|||
for (i = 0; i < ncolors; ++i)
|
||||
{
|
||||
unsigned long pixel = colors[i].pixel;
|
||||
xassert (pixel < dpyinfo->ncolor_cells);
|
||||
xassert (dpyinfo->color_cells[pixel].pixel == pixel);
|
||||
eassert (pixel < dpyinfo->ncolor_cells);
|
||||
eassert (dpyinfo->color_cells[pixel].pixel == pixel);
|
||||
colors[i] = dpyinfo->color_cells[pixel];
|
||||
}
|
||||
}
|
||||
|
@ -1850,7 +1850,7 @@ x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long un
|
|||
x_query_color (f, &color);
|
||||
|
||||
/* Change RGB values by specified FACTOR. Avoid overflow! */
|
||||
xassert (factor >= 0);
|
||||
eassert (factor >= 0);
|
||||
new.red = min (0xffff, factor * color.red);
|
||||
new.green = min (0xffff, factor * color.green);
|
||||
new.blue = min (0xffff, factor * color.blue);
|
||||
|
@ -2562,7 +2562,7 @@ x_draw_image_glyph_string (struct glyph_string *s)
|
|||
static void
|
||||
x_draw_stretch_glyph_string (struct glyph_string *s)
|
||||
{
|
||||
xassert (s->first_glyph->type == STRETCH_GLYPH);
|
||||
eassert (s->first_glyph->type == STRETCH_GLYPH);
|
||||
|
||||
if (s->hl == DRAW_CURSOR
|
||||
&& !x_stretch_cursor_p)
|
||||
|
@ -3026,7 +3026,7 @@ x_delete_glyphs (struct frame *f, register int n)
|
|||
void
|
||||
x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures)
|
||||
{
|
||||
xassert (width > 0 && height > 0);
|
||||
eassert (width > 0 && height > 0);
|
||||
XClearArea (dpy, window, x, y, width, height, exposures);
|
||||
}
|
||||
|
||||
|
@ -9809,9 +9809,9 @@ x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
|
|||
static void
|
||||
x_check_font (struct frame *f, struct font *font)
|
||||
{
|
||||
xassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX]));
|
||||
eassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX]));
|
||||
if (font->driver->check)
|
||||
xassert (font->driver->check (f, font) == 0);
|
||||
eassert (font->driver->check (f, font) == 0);
|
||||
}
|
||||
|
||||
#endif /* GLYPH_DEBUG != 0 */
|
||||
|
|
Loading…
Add table
Reference in a new issue