diff options
| author | Dmitry Antipov | 2012-06-28 11:50:27 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2012-06-28 11:50:27 +0400 |
| commit | a54e2c050b9cf161cbccc3dd4628f8ef6b64f519 (patch) | |
| tree | 447eb906b698dee37a17779ea15f448079b8f54b | |
| parent | 1c9bd87017e4b5f7f56e734277ff6e0a0ebb51d6 (diff) | |
| download | emacs-a54e2c050b9cf161cbccc3dd4628f8ef6b64f519.tar.gz emacs-a54e2c050b9cf161cbccc3dd4628f8ef6b64f519.zip | |
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.
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | configure.in | 2 | ||||
| -rw-r--r-- | src/ChangeLog | 30 | ||||
| -rw-r--r-- | src/alloc.c | 10 | ||||
| -rw-r--r-- | src/bidi.c | 10 | ||||
| -rw-r--r-- | src/dispextern.h | 13 | ||||
| -rw-r--r-- | src/dispnew.c | 120 | ||||
| -rw-r--r-- | src/fns.c | 26 | ||||
| -rw-r--r-- | src/fontset.c | 39 | ||||
| -rw-r--r-- | src/fringe.c | 2 | ||||
| -rw-r--r-- | src/ftfont.c | 4 | ||||
| -rw-r--r-- | src/gtkutil.c | 2 | ||||
| -rw-r--r-- | src/image.c | 46 | ||||
| -rw-r--r-- | src/keyboard.c | 4 | ||||
| -rw-r--r-- | src/menu.c | 2 | ||||
| -rw-r--r-- | src/process.c | 8 | ||||
| -rw-r--r-- | src/scroll.c | 10 | ||||
| -rw-r--r-- | src/sound.c | 4 | ||||
| -rw-r--r-- | src/term.c | 14 | ||||
| -rw-r--r-- | src/w32console.c | 2 | ||||
| -rw-r--r-- | src/w32fns.c | 4 | ||||
| -rw-r--r-- | src/w32term.c | 14 | ||||
| -rw-r--r-- | src/window.c | 12 | ||||
| -rw-r--r-- | src/xdisp.c | 320 | ||||
| -rw-r--r-- | src/xfaces.c | 90 | ||||
| -rw-r--r-- | src/xfns.c | 6 | ||||
| -rw-r--r-- | src/xselect.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 20 |
28 files changed, 416 insertions, 404 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * configure.in (ENABLE_CHECKING): Update comment. | ||
| 4 | |||
| 1 | 2012-06-28 Paul Eggert <eggert@cs.ucla.edu> | 5 | 2012-06-28 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 6 | ||
| 3 | * configure.in: Don't check for sys/select.h, sys/time.h, utime.h. | 7 | * configure.in: Don't check for sys/select.h, sys/time.h, utime.h. |
diff --git a/configure.in b/configure.in index d545ff4899a..7494e5e5da0 100644 --- a/configure.in +++ b/configure.in | |||
| @@ -284,7 +284,7 @@ IFS="$ac_save_IFS" | |||
| 284 | 284 | ||
| 285 | if test x$ac_enable_checking != x ; then | 285 | if test x$ac_enable_checking != x ; then |
| 286 | AC_DEFINE(ENABLE_CHECKING, 1, | 286 | AC_DEFINE(ENABLE_CHECKING, 1, |
| 287 | [Enable expensive run-time checking of data types?]) | 287 | [Define to 1 if expensive run-time data type and consistency checks are enabled.]) |
| 288 | fi | 288 | fi |
| 289 | if test x$ac_gc_check_stringbytes != x ; then | 289 | if test x$ac_gc_check_stringbytes != x ; then |
| 290 | AC_DEFINE(GC_CHECK_STRING_BYTES, 1, | 290 | AC_DEFINE(GC_CHECK_STRING_BYTES, 1, |
diff --git a/src/ChangeLog b/src/ChangeLog index 9af61d41353..9a677d9f2d7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,33 @@ | |||
| 1 | 2012-06-28 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | Generalize run-time debugging checks. | ||
| 4 | * dispextern.h (XASSERTS): Remove. | ||
| 5 | * fontset.c (xassert): Remove. | ||
| 6 | Convert from xassert to eassert. | ||
| 7 | * alloc.c: Convert from xassert to eassert. | ||
| 8 | * bidi.c: Likewise. | ||
| 9 | * dispnew.c: Likewise. | ||
| 10 | * fns.c: Likewise. | ||
| 11 | * fringe.c: Likewise. | ||
| 12 | * ftfont.c: Likewise. | ||
| 13 | * gtkutil.c: Likewise. | ||
| 14 | * image.c: Likewise. | ||
| 15 | * keyboard.c: Likewise. | ||
| 16 | * menu.c: Likewise. | ||
| 17 | * process.c: Likewise. | ||
| 18 | * scroll.c: Likewise. | ||
| 19 | * sound.c: Likewise. | ||
| 20 | * term.c: Likewise. | ||
| 21 | * w32console.c: Likewise. | ||
| 22 | * w32fns.c: Likewise. | ||
| 23 | * w32term.c: Likewise. | ||
| 24 | * window.c: Likewise. | ||
| 25 | * xdisp.c: Likewise. | ||
| 26 | * xfaces.c: Likewise. | ||
| 27 | * xfns.c: Likewise. | ||
| 28 | * xselect.c: Likewise. | ||
| 29 | * xterm.c: Likewise. | ||
| 30 | |||
| 1 | 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca> | 31 | 2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 32 | ||
| 3 | * fns.c (maybe_resize_hash_table): Output message when growing the | 33 | * fns.c (maybe_resize_hash_table): Output message when growing the |
diff --git a/src/alloc.c b/src/alloc.c index 17212f8d37d..2570364e6c1 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -787,7 +787,7 @@ verify (INT_MAX <= PTRDIFF_MAX); | |||
| 787 | void * | 787 | void * |
| 788 | xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size) | 788 | xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size) |
| 789 | { | 789 | { |
| 790 | xassert (0 <= nitems && 0 < item_size); | 790 | eassert (0 <= nitems && 0 < item_size); |
| 791 | if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems) | 791 | if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems) |
| 792 | memory_full (SIZE_MAX); | 792 | memory_full (SIZE_MAX); |
| 793 | return xmalloc (nitems * item_size); | 793 | return xmalloc (nitems * item_size); |
| @@ -800,7 +800,7 @@ xnmalloc (ptrdiff_t nitems, ptrdiff_t item_size) | |||
| 800 | void * | 800 | void * |
| 801 | xnrealloc (void *pa, ptrdiff_t nitems, ptrdiff_t item_size) | 801 | xnrealloc (void *pa, ptrdiff_t nitems, ptrdiff_t item_size) |
| 802 | { | 802 | { |
| 803 | xassert (0 <= nitems && 0 < item_size); | 803 | eassert (0 <= nitems && 0 < item_size); |
| 804 | if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems) | 804 | if (min (PTRDIFF_MAX, SIZE_MAX) / item_size < nitems) |
| 805 | memory_full (SIZE_MAX); | 805 | memory_full (SIZE_MAX); |
| 806 | return xrealloc (pa, nitems * item_size); | 806 | return xrealloc (pa, nitems * item_size); |
| @@ -850,7 +850,7 @@ xpalloc (void *pa, ptrdiff_t *nitems, ptrdiff_t nitems_incr_min, | |||
| 850 | ptrdiff_t nitems_incr_max = n_max - n; | 850 | ptrdiff_t nitems_incr_max = n_max - n; |
| 851 | ptrdiff_t incr = max (nitems_incr_min, min (incr_estimate, nitems_incr_max)); | 851 | ptrdiff_t incr = max (nitems_incr_min, min (incr_estimate, nitems_incr_max)); |
| 852 | 852 | ||
| 853 | xassert (0 < item_size && 0 < nitems_incr_min && 0 <= n && -1 <= nitems_max); | 853 | eassert (0 < item_size && 0 < nitems_incr_min && 0 <= n && -1 <= nitems_max); |
| 854 | if (! pa) | 854 | if (! pa) |
| 855 | *nitems = 0; | 855 | *nitems = 0; |
| 856 | if (nitems_incr_max < incr) | 856 | if (nitems_incr_max < incr) |
| @@ -2220,7 +2220,7 @@ compact_small_strings (void) | |||
| 2220 | for (b = oldest_sblock; b; b = b->next) | 2220 | for (b = oldest_sblock; b; b = b->next) |
| 2221 | { | 2221 | { |
| 2222 | end = b->next_free; | 2222 | end = b->next_free; |
| 2223 | xassert ((char *) end <= (char *) b + SBLOCK_SIZE); | 2223 | eassert ((char *) end <= (char *) b + SBLOCK_SIZE); |
| 2224 | 2224 | ||
| 2225 | for (from = &b->first_data; from < end; from = from_end) | 2225 | for (from = &b->first_data; from < end; from = from_end) |
| 2226 | { | 2226 | { |
| @@ -2271,7 +2271,7 @@ compact_small_strings (void) | |||
| 2271 | /* Copy, and update the string's `data' pointer. */ | 2271 | /* Copy, and update the string's `data' pointer. */ |
| 2272 | if (from != to) | 2272 | if (from != to) |
| 2273 | { | 2273 | { |
| 2274 | xassert (tb != b || to < from); | 2274 | eassert (tb != b || to < from); |
| 2275 | memmove (to, from, nbytes + GC_STRING_EXTRA); | 2275 | memmove (to, from, nbytes + GC_STRING_EXTRA); |
| 2276 | to->string->data = SDATA_DATA (to); | 2276 | to->string->data = SDATA_DATA (to); |
| 2277 | } | 2277 | } |
diff --git a/src/bidi.c b/src/bidi.c index 675e2028d92..80986e5b671 100644 --- a/src/bidi.c +++ b/src/bidi.c | |||
| @@ -149,7 +149,7 @@ bidi_get_type (int ch, bidi_dir_t override) | |||
| 149 | static inline void | 149 | static inline void |
| 150 | bidi_check_type (bidi_type_t type) | 150 | bidi_check_type (bidi_type_t type) |
| 151 | { | 151 | { |
| 152 | xassert (UNKNOWN_BT <= type && type <= NEUTRAL_ON); | 152 | eassert (UNKNOWN_BT <= type && type <= NEUTRAL_ON); |
| 153 | } | 153 | } |
| 154 | 154 | ||
| 155 | /* Given a bidi TYPE of a character, return its category. */ | 155 | /* Given a bidi TYPE of a character, return its category. */ |
| @@ -263,7 +263,7 @@ bidi_push_embedding_level (struct bidi_it *bidi_it, | |||
| 263 | int level, bidi_dir_t override) | 263 | int level, bidi_dir_t override) |
| 264 | { | 264 | { |
| 265 | bidi_it->stack_idx++; | 265 | bidi_it->stack_idx++; |
| 266 | xassert (bidi_it->stack_idx < BIDI_MAXLEVEL); | 266 | eassert (bidi_it->stack_idx < BIDI_MAXLEVEL); |
| 267 | bidi_it->level_stack[bidi_it->stack_idx].level = level; | 267 | bidi_it->level_stack[bidi_it->stack_idx].level = level; |
| 268 | bidi_it->level_stack[bidi_it->stack_idx].override = override; | 268 | bidi_it->level_stack[bidi_it->stack_idx].override = override; |
| 269 | } | 269 | } |
| @@ -458,7 +458,7 @@ bidi_cache_find_level_change (int level, int dir, int before) | |||
| 458 | ptrdiff_t i = dir ? bidi_cache_last_idx : bidi_cache_idx - 1; | 458 | ptrdiff_t i = dir ? bidi_cache_last_idx : bidi_cache_idx - 1; |
| 459 | int incr = before ? 1 : 0; | 459 | int incr = before ? 1 : 0; |
| 460 | 460 | ||
| 461 | xassert (!dir || bidi_cache_last_idx >= 0); | 461 | eassert (!dir || bidi_cache_last_idx >= 0); |
| 462 | 462 | ||
| 463 | if (!dir) | 463 | if (!dir) |
| 464 | dir = -1; | 464 | dir = -1; |
| @@ -616,7 +616,7 @@ bidi_push_it (struct bidi_it *bidi_it) | |||
| 616 | memcpy (&bidi_cache[bidi_cache_idx++], bidi_it, sizeof (struct bidi_it)); | 616 | memcpy (&bidi_cache[bidi_cache_idx++], bidi_it, sizeof (struct bidi_it)); |
| 617 | 617 | ||
| 618 | /* Push the current cache start onto the stack. */ | 618 | /* Push the current cache start onto the stack. */ |
| 619 | xassert (bidi_cache_sp < IT_STACK_SIZE); | 619 | eassert (bidi_cache_sp < IT_STACK_SIZE); |
| 620 | bidi_cache_start_stack[bidi_cache_sp++] = bidi_cache_start; | 620 | bidi_cache_start_stack[bidi_cache_sp++] = bidi_cache_start; |
| 621 | 621 | ||
| 622 | /* Start a new level of cache, and make it empty. */ | 622 | /* Start a new level of cache, and make it empty. */ |
| @@ -1958,7 +1958,7 @@ bidi_resolve_neutral (struct bidi_it *bidi_it) | |||
| 1958 | case STRONG_AL: | 1958 | case STRONG_AL: |
| 1959 | /* Actually, STRONG_AL cannot happen here, because | 1959 | /* Actually, STRONG_AL cannot happen here, because |
| 1960 | bidi_resolve_weak converts it to STRONG_R, per W3. */ | 1960 | bidi_resolve_weak converts it to STRONG_R, per W3. */ |
| 1961 | xassert (type != STRONG_AL); | 1961 | eassert (type != STRONG_AL); |
| 1962 | next_type = type; | 1962 | next_type = type; |
| 1963 | break; | 1963 | break; |
| 1964 | case WEAK_EN: | 1964 | case WEAK_EN: |
diff --git a/src/dispextern.h b/src/dispextern.h index d541d181fbf..78f6db63cb7 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -128,13 +128,6 @@ enum window_part | |||
| 128 | #define GLYPH_DEBUG 0 | 128 | #define GLYPH_DEBUG 0 |
| 129 | #endif | 129 | #endif |
| 130 | 130 | ||
| 131 | /* If XASSERTS is non-zero, additional consistency checks are activated. | ||
| 132 | Turn it off by defining the macro XASSERTS to zero. */ | ||
| 133 | |||
| 134 | #ifndef XASSERTS | ||
| 135 | #define XASSERTS 0 | ||
| 136 | #endif | ||
| 137 | |||
| 138 | /* Macros to include code only if GLYPH_DEBUG != 0. */ | 131 | /* Macros to include code only if GLYPH_DEBUG != 0. */ |
| 139 | 132 | ||
| 140 | #if GLYPH_DEBUG | 133 | #if GLYPH_DEBUG |
| @@ -143,12 +136,6 @@ enum window_part | |||
| 143 | #define IF_DEBUG(X) (void) 0 | 136 | #define IF_DEBUG(X) (void) 0 |
| 144 | #endif | 137 | #endif |
| 145 | 138 | ||
| 146 | #if XASSERTS | ||
| 147 | #define xassert(X) do {if (!(X)) abort ();} while (0) | ||
| 148 | #else | ||
| 149 | #define xassert(X) (void) 0 | ||
| 150 | #endif | ||
| 151 | |||
| 152 | /* Macro for displaying traces of redisplay. If Emacs was compiled | 139 | /* Macro for displaying traces of redisplay. If Emacs was compiled |
| 153 | with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to | 140 | with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to |
| 154 | a non-zero value in debugging sessions to activate traces. */ | 141 | a non-zero value in debugging sessions to activate traces. */ |
diff --git a/src/dispnew.c b/src/dispnew.c index 05c22be79ae..a34552fc564 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -419,9 +419,9 @@ margin_glyphs_to_reserve (struct window *w, int total_glyphs, Lisp_Object margin | |||
| 419 | return n; | 419 | return n; |
| 420 | } | 420 | } |
| 421 | 421 | ||
| 422 | #if XASSERTS | 422 | #ifdef ENABLE_CHECKING |
| 423 | /* Return non-zero if ROW's hash value is correct, zero if not. */ | 423 | /* Return non-zero if ROW's hash value is correct, zero if not. */ |
| 424 | int | 424 | static int |
| 425 | verify_row_hash (struct glyph_row *row) | 425 | verify_row_hash (struct glyph_row *row) |
| 426 | { | 426 | { |
| 427 | return row->hash == row_hash (row); | 427 | return row->hash == row_hash (row); |
| @@ -480,7 +480,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 480 | { | 480 | { |
| 481 | left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols); | 481 | left = margin_glyphs_to_reserve (w, dim.width, w->left_margin_cols); |
| 482 | right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols); | 482 | right = margin_glyphs_to_reserve (w, dim.width, w->right_margin_cols); |
| 483 | xassert (left >= 0 && right >= 0); | 483 | eassert (left >= 0 && right >= 0); |
| 484 | marginal_areas_changed_p = (left != matrix->left_margin_glyphs | 484 | marginal_areas_changed_p = (left != matrix->left_margin_glyphs |
| 485 | || right != matrix->right_margin_glyphs); | 485 | || right != matrix->right_margin_glyphs); |
| 486 | 486 | ||
| @@ -513,7 +513,7 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 513 | each row into the glyph pool. */ | 513 | each row into the glyph pool. */ |
| 514 | if (matrix->pool) | 514 | if (matrix->pool) |
| 515 | { | 515 | { |
| 516 | xassert (matrix->pool->glyphs); | 516 | eassert (matrix->pool->glyphs); |
| 517 | 517 | ||
| 518 | if (w) | 518 | if (w) |
| 519 | { | 519 | { |
| @@ -602,14 +602,14 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y | |||
| 602 | } | 602 | } |
| 603 | } | 603 | } |
| 604 | 604 | ||
| 605 | xassert (left >= 0 && right >= 0); | 605 | eassert (left >= 0 && right >= 0); |
| 606 | matrix->left_margin_glyphs = left; | 606 | matrix->left_margin_glyphs = left; |
| 607 | matrix->right_margin_glyphs = right; | 607 | matrix->right_margin_glyphs = right; |
| 608 | } | 608 | } |
| 609 | 609 | ||
| 610 | /* Number of rows to be used by MATRIX. */ | 610 | /* Number of rows to be used by MATRIX. */ |
| 611 | matrix->nrows = dim.height; | 611 | matrix->nrows = dim.height; |
| 612 | xassert (matrix->nrows >= 0); | 612 | eassert (matrix->nrows >= 0); |
| 613 | 613 | ||
| 614 | if (w) | 614 | if (w) |
| 615 | { | 615 | { |
| @@ -751,9 +751,9 @@ increment_matrix_positions (struct glyph_matrix *matrix, int start, int end, | |||
| 751 | ptrdiff_t delta, ptrdiff_t delta_bytes) | 751 | ptrdiff_t delta, ptrdiff_t delta_bytes) |
| 752 | { | 752 | { |
| 753 | /* Check that START and END are reasonable values. */ | 753 | /* Check that START and END are reasonable values. */ |
| 754 | xassert (start >= 0 && start <= matrix->nrows); | 754 | eassert (start >= 0 && start <= matrix->nrows); |
| 755 | xassert (end >= 0 && end <= matrix->nrows); | 755 | eassert (end >= 0 && end <= matrix->nrows); |
| 756 | xassert (start <= end); | 756 | eassert (start <= end); |
| 757 | 757 | ||
| 758 | for (; start < end; ++start) | 758 | for (; start < end; ++start) |
| 759 | increment_row_positions (matrix->rows + start, delta, delta_bytes); | 759 | increment_row_positions (matrix->rows + start, delta, delta_bytes); |
| @@ -767,9 +767,9 @@ increment_matrix_positions (struct glyph_matrix *matrix, int start, int end, | |||
| 767 | void | 767 | void |
| 768 | enable_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end, int enabled_p) | 768 | enable_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end, int enabled_p) |
| 769 | { | 769 | { |
| 770 | xassert (start <= end); | 770 | eassert (start <= end); |
| 771 | xassert (start >= 0 && start < matrix->nrows); | 771 | eassert (start >= 0 && start < matrix->nrows); |
| 772 | xassert (end >= 0 && end <= matrix->nrows); | 772 | eassert (end >= 0 && end <= matrix->nrows); |
| 773 | 773 | ||
| 774 | for (; start < end; ++start) | 774 | for (; start < end; ++start) |
| 775 | matrix->rows[start].enabled_p = enabled_p != 0; | 775 | 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 | |||
| 806 | { | 806 | { |
| 807 | int min_y, max_y; | 807 | int min_y, max_y; |
| 808 | 808 | ||
| 809 | xassert (start <= end); | 809 | eassert (start <= end); |
| 810 | xassert (start >= 0 && start < matrix->nrows); | 810 | eassert (start >= 0 && start < matrix->nrows); |
| 811 | xassert (end >= 0 && end <= matrix->nrows); | 811 | eassert (end >= 0 && end <= matrix->nrows); |
| 812 | 812 | ||
| 813 | min_y = WINDOW_HEADER_LINE_HEIGHT (w); | 813 | min_y = WINDOW_HEADER_LINE_HEIGHT (w); |
| 814 | max_y = WINDOW_BOX_HEIGHT_NO_MODE_LINE (w); | 814 | max_y = WINDOW_BOX_HEIGHT_NO_MODE_LINE (w); |
| @@ -852,7 +852,7 @@ clear_current_matrices (register struct frame *f) | |||
| 852 | clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix); | 852 | clear_glyph_matrix (XWINDOW (f->tool_bar_window)->current_matrix); |
| 853 | 853 | ||
| 854 | /* Clear current window matrices. */ | 854 | /* Clear current window matrices. */ |
| 855 | xassert (WINDOWP (FRAME_ROOT_WINDOW (f))); | 855 | eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); |
| 856 | clear_window_matrices (XWINDOW (FRAME_ROOT_WINDOW (f)), 0); | 856 | clear_window_matrices (XWINDOW (FRAME_ROOT_WINDOW (f)), 0); |
| 857 | } | 857 | } |
| 858 | 858 | ||
| @@ -872,7 +872,7 @@ clear_desired_matrices (register struct frame *f) | |||
| 872 | clear_glyph_matrix (XWINDOW (f->tool_bar_window)->desired_matrix); | 872 | clear_glyph_matrix (XWINDOW (f->tool_bar_window)->desired_matrix); |
| 873 | 873 | ||
| 874 | /* Do it for window matrices. */ | 874 | /* Do it for window matrices. */ |
| 875 | xassert (WINDOWP (FRAME_ROOT_WINDOW (f))); | 875 | eassert (WINDOWP (FRAME_ROOT_WINDOW (f))); |
| 876 | clear_window_matrices (XWINDOW (FRAME_ROOT_WINDOW (f)), 1); | 876 | clear_window_matrices (XWINDOW (FRAME_ROOT_WINDOW (f)), 1); |
| 877 | } | 877 | } |
| 878 | 878 | ||
| @@ -887,12 +887,12 @@ clear_window_matrices (struct window *w, int desired_p) | |||
| 887 | { | 887 | { |
| 888 | if (!NILP (w->hchild)) | 888 | if (!NILP (w->hchild)) |
| 889 | { | 889 | { |
| 890 | xassert (WINDOWP (w->hchild)); | 890 | eassert (WINDOWP (w->hchild)); |
| 891 | clear_window_matrices (XWINDOW (w->hchild), desired_p); | 891 | clear_window_matrices (XWINDOW (w->hchild), desired_p); |
| 892 | } | 892 | } |
| 893 | else if (!NILP (w->vchild)) | 893 | else if (!NILP (w->vchild)) |
| 894 | { | 894 | { |
| 895 | xassert (WINDOWP (w->vchild)); | 895 | eassert (WINDOWP (w->vchild)); |
| 896 | clear_window_matrices (XWINDOW (w->vchild), desired_p); | 896 | clear_window_matrices (XWINDOW (w->vchild), desired_p); |
| 897 | } | 897 | } |
| 898 | else | 898 | else |
| @@ -1163,7 +1163,7 @@ find_glyph_row_slice (struct glyph_matrix *window_matrix, | |||
| 1163 | { | 1163 | { |
| 1164 | int i; | 1164 | int i; |
| 1165 | 1165 | ||
| 1166 | xassert (row >= 0 && row < frame_matrix->nrows); | 1166 | eassert (row >= 0 && row < frame_matrix->nrows); |
| 1167 | 1167 | ||
| 1168 | for (i = 0; i < window_matrix->nrows; ++i) | 1168 | for (i = 0; i < window_matrix->nrows; ++i) |
| 1169 | if (glyph_row_slice_p (window_matrix->rows + i, | 1169 | if (glyph_row_slice_p (window_matrix->rows + i, |
| @@ -1291,8 +1291,8 @@ line_draw_cost (struct glyph_matrix *matrix, int vpos) | |||
| 1291 | static inline int | 1291 | static inline int |
| 1292 | row_equal_p (struct glyph_row *a, struct glyph_row *b, int mouse_face_p) | 1292 | row_equal_p (struct glyph_row *a, struct glyph_row *b, int mouse_face_p) |
| 1293 | { | 1293 | { |
| 1294 | xassert (verify_row_hash (a)); | 1294 | eassert (verify_row_hash (a)); |
| 1295 | xassert (verify_row_hash (b)); | 1295 | eassert (verify_row_hash (b)); |
| 1296 | 1296 | ||
| 1297 | if (a == b) | 1297 | if (a == b) |
| 1298 | return 1; | 1298 | return 1; |
| @@ -1394,7 +1394,7 @@ free_glyph_pool (struct glyph_pool *pool) | |||
| 1394 | { | 1394 | { |
| 1395 | /* More freed than allocated? */ | 1395 | /* More freed than allocated? */ |
| 1396 | --glyph_pool_count; | 1396 | --glyph_pool_count; |
| 1397 | xassert (glyph_pool_count >= 0); | 1397 | eassert (glyph_pool_count >= 0); |
| 1398 | 1398 | ||
| 1399 | xfree (pool->glyphs); | 1399 | xfree (pool->glyphs); |
| 1400 | xfree (pool); | 1400 | xfree (pool); |
| @@ -1480,7 +1480,7 @@ check_matrix_pointer_lossage (struct glyph_matrix *matrix) | |||
| 1480 | 1480 | ||
| 1481 | for (i = 0; i < matrix->nrows; ++i) | 1481 | for (i = 0; i < matrix->nrows; ++i) |
| 1482 | for (j = 0; j < matrix->nrows; ++j) | 1482 | for (j = 0; j < matrix->nrows; ++j) |
| 1483 | xassert (i == j | 1483 | eassert (i == j |
| 1484 | || (matrix->rows[i].glyphs[TEXT_AREA] | 1484 | || (matrix->rows[i].glyphs[TEXT_AREA] |
| 1485 | != matrix->rows[j].glyphs[TEXT_AREA])); | 1485 | != matrix->rows[j].glyphs[TEXT_AREA])); |
| 1486 | } | 1486 | } |
| @@ -1491,8 +1491,8 @@ check_matrix_pointer_lossage (struct glyph_matrix *matrix) | |||
| 1491 | struct glyph_row * | 1491 | struct glyph_row * |
| 1492 | matrix_row (struct glyph_matrix *matrix, int row) | 1492 | matrix_row (struct glyph_matrix *matrix, int row) |
| 1493 | { | 1493 | { |
| 1494 | xassert (matrix && matrix->rows); | 1494 | eassert (matrix && matrix->rows); |
| 1495 | xassert (row >= 0 && row < matrix->nrows); | 1495 | eassert (row >= 0 && row < matrix->nrows); |
| 1496 | 1496 | ||
| 1497 | /* That's really too slow for normal testing because this function | 1497 | /* That's really too slow for normal testing because this function |
| 1498 | is called almost everywhere. Although---it's still astonishingly | 1498 | is called almost everywhere. Although---it's still astonishingly |
| @@ -1539,9 +1539,9 @@ check_matrix_invariants (struct window *w) | |||
| 1539 | last_text_row = row; | 1539 | last_text_row = row; |
| 1540 | 1540 | ||
| 1541 | /* Check that character and byte positions are in sync. */ | 1541 | /* Check that character and byte positions are in sync. */ |
| 1542 | xassert (MATRIX_ROW_START_BYTEPOS (row) | 1542 | eassert (MATRIX_ROW_START_BYTEPOS (row) |
| 1543 | == CHAR_TO_BYTE (MATRIX_ROW_START_CHARPOS (row))); | 1543 | == CHAR_TO_BYTE (MATRIX_ROW_START_CHARPOS (row))); |
| 1544 | xassert (BYTEPOS (row->start.pos) | 1544 | eassert (BYTEPOS (row->start.pos) |
| 1545 | == CHAR_TO_BYTE (CHARPOS (row->start.pos))); | 1545 | == CHAR_TO_BYTE (CHARPOS (row->start.pos))); |
| 1546 | 1546 | ||
| 1547 | /* CHAR_TO_BYTE aborts when invoked for a position > Z. We can | 1547 | /* CHAR_TO_BYTE aborts when invoked for a position > Z. We can |
| @@ -1549,9 +1549,9 @@ check_matrix_invariants (struct window *w) | |||
| 1549 | displaying something like `[Sole completion]' at its end. */ | 1549 | displaying something like `[Sole completion]' at its end. */ |
| 1550 | if (MATRIX_ROW_END_CHARPOS (row) < BUF_ZV (current_buffer)) | 1550 | if (MATRIX_ROW_END_CHARPOS (row) < BUF_ZV (current_buffer)) |
| 1551 | { | 1551 | { |
| 1552 | xassert (MATRIX_ROW_END_BYTEPOS (row) | 1552 | eassert (MATRIX_ROW_END_BYTEPOS (row) |
| 1553 | == CHAR_TO_BYTE (MATRIX_ROW_END_CHARPOS (row))); | 1553 | == CHAR_TO_BYTE (MATRIX_ROW_END_CHARPOS (row))); |
| 1554 | xassert (BYTEPOS (row->end.pos) | 1554 | eassert (BYTEPOS (row->end.pos) |
| 1555 | == CHAR_TO_BYTE (CHARPOS (row->end.pos))); | 1555 | == CHAR_TO_BYTE (CHARPOS (row->end.pos))); |
| 1556 | } | 1556 | } |
| 1557 | 1557 | ||
| @@ -1559,18 +1559,18 @@ check_matrix_invariants (struct window *w) | |||
| 1559 | of next row. */ | 1559 | of next row. */ |
| 1560 | if (next->enabled_p && MATRIX_ROW_DISPLAYS_TEXT_P (next)) | 1560 | if (next->enabled_p && MATRIX_ROW_DISPLAYS_TEXT_P (next)) |
| 1561 | { | 1561 | { |
| 1562 | xassert (MATRIX_ROW_END_CHARPOS (row) | 1562 | eassert (MATRIX_ROW_END_CHARPOS (row) |
| 1563 | == MATRIX_ROW_START_CHARPOS (next)); | 1563 | == MATRIX_ROW_START_CHARPOS (next)); |
| 1564 | xassert (MATRIX_ROW_END_BYTEPOS (row) | 1564 | eassert (MATRIX_ROW_END_BYTEPOS (row) |
| 1565 | == MATRIX_ROW_START_BYTEPOS (next)); | 1565 | == MATRIX_ROW_START_BYTEPOS (next)); |
| 1566 | xassert (CHARPOS (row->end.pos) == CHARPOS (next->start.pos)); | 1566 | eassert (CHARPOS (row->end.pos) == CHARPOS (next->start.pos)); |
| 1567 | xassert (BYTEPOS (row->end.pos) == BYTEPOS (next->start.pos)); | 1567 | eassert (BYTEPOS (row->end.pos) == BYTEPOS (next->start.pos)); |
| 1568 | } | 1568 | } |
| 1569 | row = next; | 1569 | row = next; |
| 1570 | } | 1570 | } |
| 1571 | 1571 | ||
| 1572 | xassert (w->current_matrix->nrows == w->desired_matrix->nrows); | 1572 | eassert (w->current_matrix->nrows == w->desired_matrix->nrows); |
| 1573 | xassert (w->desired_matrix->rows != NULL); | 1573 | eassert (w->desired_matrix->rows != NULL); |
| 1574 | set_buffer_temp (saved); | 1574 | set_buffer_temp (saved); |
| 1575 | } | 1575 | } |
| 1576 | 1576 | ||
| @@ -1997,15 +1997,15 @@ fake_current_matrices (Lisp_Object window) | |||
| 1997 | struct glyph_matrix *m = w->current_matrix; | 1997 | struct glyph_matrix *m = w->current_matrix; |
| 1998 | struct glyph_matrix *fm = f->current_matrix; | 1998 | struct glyph_matrix *fm = f->current_matrix; |
| 1999 | 1999 | ||
| 2000 | xassert (m->matrix_h == WINDOW_TOTAL_LINES (w)); | 2000 | eassert (m->matrix_h == WINDOW_TOTAL_LINES (w)); |
| 2001 | xassert (m->matrix_w == WINDOW_TOTAL_COLS (w)); | 2001 | eassert (m->matrix_w == WINDOW_TOTAL_COLS (w)); |
| 2002 | 2002 | ||
| 2003 | for (i = 0; i < m->matrix_h; ++i) | 2003 | for (i = 0; i < m->matrix_h; ++i) |
| 2004 | { | 2004 | { |
| 2005 | struct glyph_row *r = m->rows + i; | 2005 | struct glyph_row *r = m->rows + i; |
| 2006 | struct glyph_row *fr = fm->rows + i + WINDOW_TOP_EDGE_LINE (w); | 2006 | struct glyph_row *fr = fm->rows + i + WINDOW_TOP_EDGE_LINE (w); |
| 2007 | 2007 | ||
| 2008 | xassert (r->glyphs[TEXT_AREA] >= fr->glyphs[TEXT_AREA] | 2008 | eassert (r->glyphs[TEXT_AREA] >= fr->glyphs[TEXT_AREA] |
| 2009 | && r->glyphs[LAST_AREA] <= fr->glyphs[LAST_AREA]); | 2009 | && r->glyphs[LAST_AREA] <= fr->glyphs[LAST_AREA]); |
| 2010 | 2010 | ||
| 2011 | r->enabled_p = fr->enabled_p; | 2011 | r->enabled_p = fr->enabled_p; |
| @@ -2140,7 +2140,7 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f) | |||
| 2140 | /* Size of frame matrices must equal size of frame. Note | 2140 | /* Size of frame matrices must equal size of frame. Note |
| 2141 | that we are called for X frames with window widths NOT equal | 2141 | that we are called for X frames with window widths NOT equal |
| 2142 | to the frame width (from CHANGE_FRAME_SIZE_1). */ | 2142 | to the frame width (from CHANGE_FRAME_SIZE_1). */ |
| 2143 | xassert (matrix_dim.width == FRAME_COLS (f) | 2143 | eassert (matrix_dim.width == FRAME_COLS (f) |
| 2144 | && matrix_dim.height == FRAME_LINES (f)); | 2144 | && matrix_dim.height == FRAME_LINES (f)); |
| 2145 | 2145 | ||
| 2146 | /* Pointers to glyph memory in glyph rows are exchanged during | 2146 | /* Pointers to glyph memory in glyph rows are exchanged during |
| @@ -2184,7 +2184,7 @@ adjust_frame_glyphs_for_frame_redisplay (struct frame *f) | |||
| 2184 | static void | 2184 | static void |
| 2185 | adjust_frame_glyphs_for_window_redisplay (struct frame *f) | 2185 | adjust_frame_glyphs_for_window_redisplay (struct frame *f) |
| 2186 | { | 2186 | { |
| 2187 | xassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); | 2187 | eassert (FRAME_WINDOW_P (f) && FRAME_LIVE_P (f)); |
| 2188 | 2188 | ||
| 2189 | /* Allocate/reallocate window matrices. */ | 2189 | /* Allocate/reallocate window matrices. */ |
| 2190 | allocate_matrices_for_window_redisplay (XWINDOW (FRAME_ROOT_WINDOW (f))); | 2190 | allocate_matrices_for_window_redisplay (XWINDOW (FRAME_ROOT_WINDOW (f))); |
| @@ -2469,7 +2469,7 @@ build_frame_matrix (struct frame *f) | |||
| 2469 | int i; | 2469 | int i; |
| 2470 | 2470 | ||
| 2471 | /* F must have a frame matrix when this function is called. */ | 2471 | /* F must have a frame matrix when this function is called. */ |
| 2472 | xassert (!FRAME_WINDOW_P (f)); | 2472 | eassert (!FRAME_WINDOW_P (f)); |
| 2473 | 2473 | ||
| 2474 | /* Clear all rows in the frame matrix covered by window matrices. | 2474 | /* Clear all rows in the frame matrix covered by window matrices. |
| 2475 | Menu bar lines are not covered by windows. */ | 2475 | 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 | |||
| 2585 | } | 2585 | } |
| 2586 | else | 2586 | else |
| 2587 | { | 2587 | { |
| 2588 | xassert (window_row->enabled_p); | 2588 | eassert (window_row->enabled_p); |
| 2589 | 2589 | ||
| 2590 | /* Only when a desired row has been displayed, we want | 2590 | /* Only when a desired row has been displayed, we want |
| 2591 | the corresponding frame row to be updated. */ | 2591 | the corresponding frame row to be updated. */ |
| @@ -2602,7 +2602,7 @@ build_frame_matrix_from_leaf_window (struct glyph_matrix *frame_matrix, struct w | |||
| 2602 | #if GLYPH_DEBUG | 2602 | #if GLYPH_DEBUG |
| 2603 | /* Window row window_y must be a slice of frame row | 2603 | /* Window row window_y must be a slice of frame row |
| 2604 | frame_y. */ | 2604 | frame_y. */ |
| 2605 | xassert (glyph_row_slice_p (window_row, frame_row)); | 2605 | eassert (glyph_row_slice_p (window_row, frame_row)); |
| 2606 | 2606 | ||
| 2607 | /* If rows are in sync, we don't have to copy glyphs because | 2607 | /* If rows are in sync, we don't have to copy glyphs because |
| 2608 | frame and window share glyphs. */ | 2608 | frame and window share glyphs. */ |
| @@ -2829,8 +2829,8 @@ mirrored_line_dance (struct glyph_matrix *matrix, int unchanged_at_top, int nlin | |||
| 2829 | { | 2829 | { |
| 2830 | int enabled_before_p = new_rows[i].enabled_p; | 2830 | int enabled_before_p = new_rows[i].enabled_p; |
| 2831 | 2831 | ||
| 2832 | xassert (i + unchanged_at_top < matrix->nrows); | 2832 | eassert (i + unchanged_at_top < matrix->nrows); |
| 2833 | xassert (unchanged_at_top + copy_from[i] < matrix->nrows); | 2833 | eassert (unchanged_at_top + copy_from[i] < matrix->nrows); |
| 2834 | new_rows[i] = old_rows[copy_from[i]]; | 2834 | new_rows[i] = old_rows[copy_from[i]]; |
| 2835 | new_rows[i].enabled_p = enabled_before_p; | 2835 | new_rows[i].enabled_p = enabled_before_p; |
| 2836 | 2836 | ||
| @@ -2857,8 +2857,8 @@ sync_window_with_frame_matrix_rows (struct window *w) | |||
| 2857 | int left, right, x, width; | 2857 | int left, right, x, width; |
| 2858 | 2858 | ||
| 2859 | /* Preconditions: W must be a leaf window on a tty frame. */ | 2859 | /* Preconditions: W must be a leaf window on a tty frame. */ |
| 2860 | xassert (NILP (w->hchild) && NILP (w->vchild)); | 2860 | eassert (NILP (w->hchild) && NILP (w->vchild)); |
| 2861 | xassert (!FRAME_WINDOW_P (f)); | 2861 | eassert (!FRAME_WINDOW_P (f)); |
| 2862 | 2862 | ||
| 2863 | left = margin_glyphs_to_reserve (w, 1, w->left_margin_cols); | 2863 | left = margin_glyphs_to_reserve (w, 1, w->left_margin_cols); |
| 2864 | right = margin_glyphs_to_reserve (w, 1, w->right_margin_cols); | 2864 | right = margin_glyphs_to_reserve (w, 1, w->right_margin_cols); |
| @@ -3098,10 +3098,10 @@ check_matrix_pointers (struct glyph_matrix *window_matrix, | |||
| 3098 | static int | 3098 | static int |
| 3099 | window_to_frame_vpos (struct window *w, int vpos) | 3099 | window_to_frame_vpos (struct window *w, int vpos) |
| 3100 | { | 3100 | { |
| 3101 | xassert (!FRAME_WINDOW_P (XFRAME (w->frame))); | 3101 | eassert (!FRAME_WINDOW_P (XFRAME (w->frame))); |
| 3102 | xassert (vpos >= 0 && vpos <= w->desired_matrix->nrows); | 3102 | eassert (vpos >= 0 && vpos <= w->desired_matrix->nrows); |
| 3103 | vpos += WINDOW_TOP_EDGE_LINE (w); | 3103 | vpos += WINDOW_TOP_EDGE_LINE (w); |
| 3104 | xassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (w->frame))); | 3104 | eassert (vpos >= 0 && vpos <= FRAME_LINES (XFRAME (w->frame))); |
| 3105 | return vpos; | 3105 | return vpos; |
| 3106 | } | 3106 | } |
| 3107 | 3107 | ||
| @@ -3112,7 +3112,7 @@ window_to_frame_vpos (struct window *w, int vpos) | |||
| 3112 | static int | 3112 | static int |
| 3113 | window_to_frame_hpos (struct window *w, int hpos) | 3113 | window_to_frame_hpos (struct window *w, int hpos) |
| 3114 | { | 3114 | { |
| 3115 | xassert (!FRAME_WINDOW_P (XFRAME (w->frame))); | 3115 | eassert (!FRAME_WINDOW_P (XFRAME (w->frame))); |
| 3116 | hpos += WINDOW_LEFT_EDGE_COL (w); | 3116 | hpos += WINDOW_LEFT_EDGE_COL (w); |
| 3117 | return hpos; | 3117 | return hpos; |
| 3118 | } | 3118 | } |
| @@ -3531,7 +3531,7 @@ update_window (struct window *w, int force_p) | |||
| 3531 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); | 3531 | struct redisplay_interface *rif = FRAME_RIF (XFRAME (WINDOW_FRAME (w))); |
| 3532 | #if GLYPH_DEBUG | 3532 | #if GLYPH_DEBUG |
| 3533 | /* Check that W's frame doesn't have glyph matrices. */ | 3533 | /* Check that W's frame doesn't have glyph matrices. */ |
| 3534 | xassert (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w)))); | 3534 | eassert (FRAME_WINDOW_P (XFRAME (WINDOW_FRAME (w)))); |
| 3535 | #endif | 3535 | #endif |
| 3536 | 3536 | ||
| 3537 | /* Check pending input the first time so that we can quickly return. */ | 3537 | /* Check pending input the first time so that we can quickly return. */ |
| @@ -3930,7 +3930,7 @@ update_text_area (struct window *w, int vpos) | |||
| 3930 | has to be cleared, if and only if we did a write_glyphs | 3930 | has to be cleared, if and only if we did a write_glyphs |
| 3931 | above. This is made sure by setting desired_stop_pos | 3931 | above. This is made sure by setting desired_stop_pos |
| 3932 | appropriately above. */ | 3932 | appropriately above. */ |
| 3933 | xassert (i < desired_row->used[TEXT_AREA] | 3933 | eassert (i < desired_row->used[TEXT_AREA] |
| 3934 | || ((desired_row->used[TEXT_AREA] | 3934 | || ((desired_row->used[TEXT_AREA] |
| 3935 | == current_row->used[TEXT_AREA]) | 3935 | == current_row->used[TEXT_AREA]) |
| 3936 | && MATRIX_ROW_EXTENDS_FACE_P (current_row))); | 3936 | && MATRIX_ROW_EXTENDS_FACE_P (current_row))); |
| @@ -4000,7 +4000,7 @@ update_window_line (struct window *w, int vpos, int *mouse_face_overwritten_p) | |||
| 4000 | if (desired_row->mode_line_p | 4000 | if (desired_row->mode_line_p |
| 4001 | || desired_row->visible_height > 0) | 4001 | || desired_row->visible_height > 0) |
| 4002 | { | 4002 | { |
| 4003 | xassert (desired_row->enabled_p); | 4003 | eassert (desired_row->enabled_p); |
| 4004 | 4004 | ||
| 4005 | /* Update display of the left margin area, if there is one. */ | 4005 | /* Update display of the left margin area, if there is one. */ |
| 4006 | if (!desired_row->full_width_p | 4006 | if (!desired_row->full_width_p |
| @@ -4058,7 +4058,7 @@ set_window_cursor_after_update (struct window *w) | |||
| 4058 | int cx, cy, vpos, hpos; | 4058 | int cx, cy, vpos, hpos; |
| 4059 | 4059 | ||
| 4060 | /* Not intended for frame matrix updates. */ | 4060 | /* Not intended for frame matrix updates. */ |
| 4061 | xassert (FRAME_WINDOW_P (f)); | 4061 | eassert (FRAME_WINDOW_P (f)); |
| 4062 | 4062 | ||
| 4063 | if (cursor_in_echo_area | 4063 | if (cursor_in_echo_area |
| 4064 | && !NILP (echo_area_buffer[0]) | 4064 | && !NILP (echo_area_buffer[0]) |
| @@ -4218,7 +4218,7 @@ add_row_entry (struct glyph_row *row) | |||
| 4218 | ptrdiff_t i = row->hash % row_table_size; | 4218 | ptrdiff_t i = row->hash % row_table_size; |
| 4219 | 4219 | ||
| 4220 | entry = row_table[i]; | 4220 | entry = row_table[i]; |
| 4221 | xassert (entry || verify_row_hash (row)); | 4221 | eassert (entry || verify_row_hash (row)); |
| 4222 | while (entry && !row_equal_p (entry->row, row, 1)) | 4222 | while (entry && !row_equal_p (entry->row, row, 1)) |
| 4223 | entry = entry->next; | 4223 | entry = entry->next; |
| 4224 | 4224 | ||
| @@ -4432,7 +4432,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4432 | 4432 | ||
| 4433 | for (i = first_new; i < last_new; ++i) | 4433 | for (i = first_new; i < last_new; ++i) |
| 4434 | { | 4434 | { |
| 4435 | xassert (MATRIX_ROW_ENABLED_P (desired_matrix, i)); | 4435 | eassert (MATRIX_ROW_ENABLED_P (desired_matrix, i)); |
| 4436 | entry = add_row_entry (MATRIX_ROW (desired_matrix, i)); | 4436 | entry = add_row_entry (MATRIX_ROW (desired_matrix, i)); |
| 4437 | ++entry->new_uses; | 4437 | ++entry->new_uses; |
| 4438 | entry->new_line_number = i; | 4438 | entry->new_line_number = i; |
| @@ -4612,7 +4612,7 @@ scrolling_window (struct window *w, int header_line_p) | |||
| 4612 | row. But thanks to the truncation code in the | 4612 | row. But thanks to the truncation code in the |
| 4613 | preceding for-loop, we no longer have such an overlap, | 4613 | preceding for-loop, we no longer have such an overlap, |
| 4614 | and thus the assigned row should always be enabled. */ | 4614 | and thus the assigned row should always be enabled. */ |
| 4615 | xassert (to->enabled_p); | 4615 | eassert (to->enabled_p); |
| 4616 | from->enabled_p = 0; | 4616 | from->enabled_p = 0; |
| 4617 | to->overlapped_p = to_overlapped_p; | 4617 | to->overlapped_p = to_overlapped_p; |
| 4618 | } | 4618 | } |
| @@ -4650,7 +4650,7 @@ update_frame_1 (struct frame *f, int force_p, int inhibit_id_p) | |||
| 4650 | int pause_p; | 4650 | int pause_p; |
| 4651 | int preempt_count = baud_rate / 2400 + 1; | 4651 | int preempt_count = baud_rate / 2400 + 1; |
| 4652 | 4652 | ||
| 4653 | xassert (current_matrix && desired_matrix); | 4653 | eassert (current_matrix && desired_matrix); |
| 4654 | 4654 | ||
| 4655 | if (baud_rate != FRAME_COST_BAUD_RATE (f)) | 4655 | if (baud_rate != FRAME_COST_BAUD_RATE (f)) |
| 4656 | calculate_costs (f); | 4656 | calculate_costs (f); |
| @@ -3434,8 +3434,8 @@ larger_vector (Lisp_Object vec, ptrdiff_t incr_min, ptrdiff_t nitems_max) | |||
| 3434 | ptrdiff_t C_language_max = min (PTRDIFF_MAX, SIZE_MAX) / sizeof *v->contents; | 3434 | ptrdiff_t C_language_max = min (PTRDIFF_MAX, SIZE_MAX) / sizeof *v->contents; |
| 3435 | ptrdiff_t n_max = (0 <= nitems_max && nitems_max < C_language_max | 3435 | ptrdiff_t n_max = (0 <= nitems_max && nitems_max < C_language_max |
| 3436 | ? nitems_max : C_language_max); | 3436 | ? nitems_max : C_language_max); |
| 3437 | xassert (VECTORP (vec)); | 3437 | eassert (VECTORP (vec)); |
| 3438 | xassert (0 < incr_min && -1 <= nitems_max); | 3438 | eassert (0 < incr_min && -1 <= nitems_max); |
| 3439 | old_size = ASIZE (vec); | 3439 | old_size = ASIZE (vec); |
| 3440 | incr_max = n_max - old_size; | 3440 | incr_max = n_max - old_size; |
| 3441 | incr = max (incr_min, min (old_size >> 1, incr_max)); | 3441 | incr = max (incr_min, min (old_size >> 1, incr_max)); |
| @@ -3514,7 +3514,7 @@ static EMACS_UINT | |||
| 3514 | hashfn_eq (struct Lisp_Hash_Table *h, Lisp_Object key) | 3514 | hashfn_eq (struct Lisp_Hash_Table *h, Lisp_Object key) |
| 3515 | { | 3515 | { |
| 3516 | EMACS_UINT hash = XUINT (key) ^ XTYPE (key); | 3516 | EMACS_UINT hash = XUINT (key) ^ XTYPE (key); |
| 3517 | xassert ((hash & ~INTMASK) == 0); | 3517 | eassert ((hash & ~INTMASK) == 0); |
| 3518 | return hash; | 3518 | return hash; |
| 3519 | } | 3519 | } |
| 3520 | 3520 | ||
| @@ -3531,7 +3531,7 @@ hashfn_eql (struct Lisp_Hash_Table *h, Lisp_Object key) | |||
| 3531 | hash = sxhash (key, 0); | 3531 | hash = sxhash (key, 0); |
| 3532 | else | 3532 | else |
| 3533 | hash = XUINT (key) ^ XTYPE (key); | 3533 | hash = XUINT (key) ^ XTYPE (key); |
| 3534 | xassert ((hash & ~INTMASK) == 0); | 3534 | eassert ((hash & ~INTMASK) == 0); |
| 3535 | return hash; | 3535 | return hash; |
| 3536 | } | 3536 | } |
| 3537 | 3537 | ||
| @@ -3544,7 +3544,7 @@ static EMACS_UINT | |||
| 3544 | hashfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key) | 3544 | hashfn_equal (struct Lisp_Hash_Table *h, Lisp_Object key) |
| 3545 | { | 3545 | { |
| 3546 | EMACS_UINT hash = sxhash (key, 0); | 3546 | EMACS_UINT hash = sxhash (key, 0); |
| 3547 | xassert ((hash & ~INTMASK) == 0); | 3547 | eassert ((hash & ~INTMASK) == 0); |
| 3548 | return hash; | 3548 | return hash; |
| 3549 | } | 3549 | } |
| 3550 | 3550 | ||
| @@ -3605,11 +3605,11 @@ make_hash_table (Lisp_Object test, Lisp_Object size, Lisp_Object rehash_size, | |||
| 3605 | double index_float; | 3605 | double index_float; |
| 3606 | 3606 | ||
| 3607 | /* Preconditions. */ | 3607 | /* Preconditions. */ |
| 3608 | xassert (SYMBOLP (test)); | 3608 | eassert (SYMBOLP (test)); |
| 3609 | xassert (INTEGERP (size) && XINT (size) >= 0); | 3609 | eassert (INTEGERP (size) && XINT (size) >= 0); |
| 3610 | xassert ((INTEGERP (rehash_size) && XINT (rehash_size) > 0) | 3610 | eassert ((INTEGERP (rehash_size) && XINT (rehash_size) > 0) |
| 3611 | || (FLOATP (rehash_size) && 1 < XFLOAT_DATA (rehash_size))); | 3611 | || (FLOATP (rehash_size) && 1 < XFLOAT_DATA (rehash_size))); |
| 3612 | xassert (FLOATP (rehash_threshold) | 3612 | eassert (FLOATP (rehash_threshold) |
| 3613 | && 0 < XFLOAT_DATA (rehash_threshold) | 3613 | && 0 < XFLOAT_DATA (rehash_threshold) |
| 3614 | && XFLOAT_DATA (rehash_threshold) <= 1.0); | 3614 | && XFLOAT_DATA (rehash_threshold) <= 1.0); |
| 3615 | 3615 | ||
| @@ -3667,8 +3667,8 @@ make_hash_table (Lisp_Object test, Lisp_Object size, Lisp_Object rehash_size, | |||
| 3667 | h->next_free = make_number (0); | 3667 | h->next_free = make_number (0); |
| 3668 | 3668 | ||
| 3669 | XSET_HASH_TABLE (table, h); | 3669 | XSET_HASH_TABLE (table, h); |
| 3670 | xassert (HASH_TABLE_P (table)); | 3670 | eassert (HASH_TABLE_P (table)); |
| 3671 | xassert (XHASH_TABLE (table) == h); | 3671 | eassert (XHASH_TABLE (table) == h); |
| 3672 | 3672 | ||
| 3673 | /* Maybe add this hash table to the list of all weak hash tables. */ | 3673 | /* Maybe add this hash table to the list of all weak hash tables. */ |
| 3674 | if (NILP (h->weak)) | 3674 | if (NILP (h->weak)) |
| @@ -3843,7 +3843,7 @@ hash_put (struct Lisp_Hash_Table *h, Lisp_Object key, Lisp_Object value, | |||
| 3843 | { | 3843 | { |
| 3844 | ptrdiff_t start_of_bucket, i; | 3844 | ptrdiff_t start_of_bucket, i; |
| 3845 | 3845 | ||
| 3846 | xassert ((hash & ~INTMASK) == 0); | 3846 | eassert ((hash & ~INTMASK) == 0); |
| 3847 | 3847 | ||
| 3848 | /* Increment count after resizing because resizing may fail. */ | 3848 | /* Increment count after resizing because resizing may fail. */ |
| 3849 | maybe_resize_hash_table (h); | 3849 | maybe_resize_hash_table (h); |
| @@ -3902,7 +3902,7 @@ hash_remove_from_table (struct Lisp_Hash_Table *h, Lisp_Object key) | |||
| 3902 | HASH_NEXT (h, i) = h->next_free; | 3902 | HASH_NEXT (h, i) = h->next_free; |
| 3903 | h->next_free = make_number (i); | 3903 | h->next_free = make_number (i); |
| 3904 | h->count--; | 3904 | h->count--; |
| 3905 | xassert (h->count >= 0); | 3905 | eassert (h->count >= 0); |
| 3906 | break; | 3906 | break; |
| 3907 | } | 3907 | } |
| 3908 | else | 3908 | else |
diff --git a/src/fontset.c b/src/fontset.c index 1d704a5900e..98ee89070f9 100644 --- a/src/fontset.c +++ b/src/fontset.c | |||
| @@ -24,8 +24,6 @@ GNU General Public License for more details. | |||
| 24 | You should have received a copy of the GNU General Public License | 24 | You should have received a copy of the GNU General Public License |
| 25 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | 25 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 26 | 26 | ||
| 27 | /* #define FONTSET_DEBUG */ | ||
| 28 | |||
| 29 | #include <config.h> | 27 | #include <config.h> |
| 30 | #include <stdio.h> | 28 | #include <stdio.h> |
| 31 | #include <setjmp.h> | 29 | #include <setjmp.h> |
| @@ -55,13 +53,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 55 | 53 | ||
| 56 | #include "font.h" | 54 | #include "font.h" |
| 57 | 55 | ||
| 58 | #undef xassert | ||
| 59 | #ifdef FONTSET_DEBUG | ||
| 60 | #define xassert(X) do {if (!(X)) abort ();} while (0) | ||
| 61 | #else /* not FONTSET_DEBUG */ | ||
| 62 | #define xassert(X) (void) 0 | ||
| 63 | #endif /* not FONTSET_DEBUG */ | ||
| 64 | |||
| 65 | /* FONTSET | 56 | /* FONTSET |
| 66 | 57 | ||
| 67 | A fontset is a collection of font related information to give | 58 | A fontset is a collection of font related information to give |
| @@ -206,7 +197,7 @@ static void accumulate_script_ranges (Lisp_Object, Lisp_Object, | |||
| 206 | Lisp_Object); | 197 | Lisp_Object); |
| 207 | static void set_fontset_font (Lisp_Object, Lisp_Object); | 198 | static void set_fontset_font (Lisp_Object, Lisp_Object); |
| 208 | 199 | ||
| 209 | #ifdef FONTSET_DEBUG | 200 | #ifdef ENABLE_CHECKING |
| 210 | 201 | ||
| 211 | /* Return 1 if ID is a valid fontset id, else return 0. */ | 202 | /* Return 1 if ID is a valid fontset id, else return 0. */ |
| 212 | 203 | ||
| @@ -459,7 +450,7 @@ fontset_get_font_group (Lisp_Object fontset, int c) | |||
| 459 | Lisp_Object base_fontset; | 450 | Lisp_Object base_fontset; |
| 460 | int from = 0, to = MAX_CHAR, i; | 451 | int from = 0, to = MAX_CHAR, i; |
| 461 | 452 | ||
| 462 | xassert (! BASE_FONTSET_P (fontset)); | 453 | eassert (! BASE_FONTSET_P (fontset)); |
| 463 | if (c >= 0) | 454 | if (c >= 0) |
| 464 | font_group = CHAR_TABLE_REF (fontset, c); | 455 | font_group = CHAR_TABLE_REF (fontset, c); |
| 465 | else | 456 | else |
| @@ -848,7 +839,7 @@ free_realized_fontset (FRAME_PTR f, Lisp_Object fontset) | |||
| 848 | if (0) | 839 | if (0) |
| 849 | for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail)) | 840 | for (tail = FONTSET_OBJLIST (fontset); CONSP (tail); tail = XCDR (tail)) |
| 850 | { | 841 | { |
| 851 | xassert (FONT_OBJECT_P (XCAR (tail))); | 842 | eassert (FONT_OBJECT_P (XCAR (tail))); |
| 852 | font_close_object (f, XCAR (tail)); | 843 | font_close_object (f, XCAR (tail)); |
| 853 | } | 844 | } |
| 854 | #endif | 845 | #endif |
| @@ -865,8 +856,8 @@ free_face_fontset (FRAME_PTR f, struct face *face) | |||
| 865 | fontset = FONTSET_FROM_ID (face->fontset); | 856 | fontset = FONTSET_FROM_ID (face->fontset); |
| 866 | if (NILP (fontset)) | 857 | if (NILP (fontset)) |
| 867 | return; | 858 | return; |
| 868 | xassert (! BASE_FONTSET_P (fontset)); | 859 | eassert (! BASE_FONTSET_P (fontset)); |
| 869 | xassert (f == XFRAME (FONTSET_FRAME (fontset))); | 860 | eassert (f == XFRAME (FONTSET_FRAME (fontset))); |
| 870 | free_realized_fontset (f, fontset); | 861 | free_realized_fontset (f, fontset); |
| 871 | ASET (Vfontset_table, face->fontset, Qnil); | 862 | ASET (Vfontset_table, face->fontset, Qnil); |
| 872 | if (face->fontset < next_fontset_id) | 863 | if (face->fontset < next_fontset_id) |
| @@ -876,8 +867,8 @@ free_face_fontset (FRAME_PTR f, struct face *face) | |||
| 876 | int id = XINT (FONTSET_ID (FONTSET_DEFAULT (fontset))); | 867 | int id = XINT (FONTSET_ID (FONTSET_DEFAULT (fontset))); |
| 877 | 868 | ||
| 878 | fontset = AREF (Vfontset_table, id); | 869 | fontset = AREF (Vfontset_table, id); |
| 879 | xassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset)); | 870 | eassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset)); |
| 880 | xassert (f == XFRAME (FONTSET_FRAME (fontset))); | 871 | eassert (f == XFRAME (FONTSET_FRAME (fontset))); |
| 881 | free_realized_fontset (f, fontset); | 872 | free_realized_fontset (f, fontset); |
| 882 | ASET (Vfontset_table, id, Qnil); | 873 | ASET (Vfontset_table, id, Qnil); |
| 883 | if (id < next_fontset_id) | 874 | 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 | |||
| 924 | if (ASCII_CHAR_P (c) || face->fontset < 0) | 915 | if (ASCII_CHAR_P (c) || face->fontset < 0) |
| 925 | return face->ascii_face->id; | 916 | return face->ascii_face->id; |
| 926 | 917 | ||
| 927 | xassert (fontset_id_valid_p (face->fontset)); | 918 | eassert (fontset_id_valid_p (face->fontset)); |
| 928 | fontset = FONTSET_FROM_ID (face->fontset); | 919 | fontset = FONTSET_FROM_ID (face->fontset); |
| 929 | xassert (!BASE_FONTSET_P (fontset)); | 920 | eassert (!BASE_FONTSET_P (fontset)); |
| 930 | 921 | ||
| 931 | if (pos < 0) | 922 | if (pos < 0) |
| 932 | { | 923 | { |
| @@ -973,7 +964,7 @@ face_for_char (FRAME_PTR f, struct face *face, int c, int pos, Lisp_Object objec | |||
| 973 | FONTSET_NOFONT_FACE (fontset) = make_number (face_id); | 964 | FONTSET_NOFONT_FACE (fontset) = make_number (face_id); |
| 974 | } | 965 | } |
| 975 | } | 966 | } |
| 976 | xassert (face_id >= 0); | 967 | eassert (face_id >= 0); |
| 977 | return face_id; | 968 | return face_id; |
| 978 | } | 969 | } |
| 979 | 970 | ||
| @@ -992,9 +983,9 @@ font_for_char (struct face *face, int c, int pos, Lisp_Object object) | |||
| 992 | return font_object; | 983 | return font_object; |
| 993 | } | 984 | } |
| 994 | 985 | ||
| 995 | xassert (fontset_id_valid_p (face->fontset)); | 986 | eassert (fontset_id_valid_p (face->fontset)); |
| 996 | fontset = FONTSET_FROM_ID (face->fontset); | 987 | fontset = FONTSET_FROM_ID (face->fontset); |
| 997 | xassert (!BASE_FONTSET_P (fontset)); | 988 | eassert (!BASE_FONTSET_P (fontset)); |
| 998 | if (pos < 0) | 989 | if (pos < 0) |
| 999 | { | 990 | { |
| 1000 | id = -1; | 991 | id = -1; |
| @@ -2104,7 +2095,7 @@ DEFUN ("fontset-list", Ffontset_list, Sfontset_list, 0, 0, 0, | |||
| 2104 | } | 2095 | } |
| 2105 | 2096 | ||
| 2106 | 2097 | ||
| 2107 | #ifdef FONTSET_DEBUG | 2098 | #ifdef ENABLE_CHECKING |
| 2108 | 2099 | ||
| 2109 | Lisp_Object dump_fontset (Lisp_Object) EXTERNALLY_VISIBLE; | 2100 | Lisp_Object dump_fontset (Lisp_Object) EXTERNALLY_VISIBLE; |
| 2110 | 2101 | ||
| @@ -2154,7 +2145,7 @@ DEFUN ("fontset-list-all", Ffontset_list_all, Sfontset_list_all, 0, 0, 0, | |||
| 2154 | val = Fcons (dump_fontset (AREF (Vfontset_table, i)), val); | 2145 | val = Fcons (dump_fontset (AREF (Vfontset_table, i)), val); |
| 2155 | return (Fnreverse (val)); | 2146 | return (Fnreverse (val)); |
| 2156 | } | 2147 | } |
| 2157 | #endif /* FONTSET_DEBUG */ | 2148 | #endif /* ENABLE_CHECKING */ |
| 2158 | 2149 | ||
| 2159 | void | 2150 | void |
| 2160 | syms_of_fontset (void) | 2151 | syms_of_fontset (void) |
| @@ -2245,7 +2236,7 @@ at the vertical center of lines. */); | |||
| 2245 | defsubr (&Sfontset_info); | 2236 | defsubr (&Sfontset_info); |
| 2246 | defsubr (&Sfontset_font); | 2237 | defsubr (&Sfontset_font); |
| 2247 | defsubr (&Sfontset_list); | 2238 | defsubr (&Sfontset_list); |
| 2248 | #ifdef FONTSET_DEBUG | 2239 | #ifdef ENABLE_CHECKING |
| 2249 | defsubr (&Sfontset_list_all); | 2240 | defsubr (&Sfontset_list_all); |
| 2250 | #endif | 2241 | #endif |
| 2251 | } | 2242 | } |
diff --git a/src/fringe.c b/src/fringe.c index 0224ea73e3e..72090dd01ca 100644 --- a/src/fringe.c +++ b/src/fringe.c | |||
| @@ -849,7 +849,7 @@ draw_fringe_bitmap (struct window *w, struct glyph_row *row, int left_p) | |||
| 849 | void | 849 | void |
| 850 | draw_row_fringe_bitmaps (struct window *w, struct glyph_row *row) | 850 | draw_row_fringe_bitmaps (struct window *w, struct glyph_row *row) |
| 851 | { | 851 | { |
| 852 | xassert (interrupt_input_blocked); | 852 | eassert (interrupt_input_blocked); |
| 853 | 853 | ||
| 854 | /* If row is completely invisible, because of vscrolling, we | 854 | /* If row is completely invisible, because of vscrolling, we |
| 855 | don't have to draw anything. */ | 855 | don't have to draw anything. */ |
diff --git a/src/ftfont.c b/src/ftfont.c index bfce7425af4..29732e4c870 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -372,7 +372,7 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for) | |||
| 372 | { | 372 | { |
| 373 | entity = key; | 373 | entity = key; |
| 374 | val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX)); | 374 | val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX)); |
| 375 | xassert (CONSP (val)); | 375 | eassert (CONSP (val)); |
| 376 | key = XCDR (val); | 376 | key = XCDR (val); |
| 377 | } | 377 | } |
| 378 | else | 378 | else |
| @@ -1325,7 +1325,7 @@ ftfont_close (FRAME_PTR f, struct font *font) | |||
| 1325 | 1325 | ||
| 1326 | val = Fcons (font->props[FONT_FILE_INDEX], make_number (ftfont_info->index)); | 1326 | val = Fcons (font->props[FONT_FILE_INDEX], make_number (ftfont_info->index)); |
| 1327 | cache = ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE); | 1327 | cache = ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE); |
| 1328 | xassert (CONSP (cache)); | 1328 | eassert (CONSP (cache)); |
| 1329 | val = XCDR (cache); | 1329 | val = XCDR (cache); |
| 1330 | (XSAVE_VALUE (val)->integer)--; | 1330 | (XSAVE_VALUE (val)->integer)--; |
| 1331 | if (XSAVE_VALUE (val)->integer == 0) | 1331 | if (XSAVE_VALUE (val)->integer == 0) |
diff --git a/src/gtkutil.c b/src/gtkutil.c index 6105d139d0e..57453b29648 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -4555,7 +4555,7 @@ update_frame_tool_bar (FRAME_PTR f) | |||
| 4555 | ? TOOL_BAR_IMAGE_DISABLED_SELECTED | 4555 | ? TOOL_BAR_IMAGE_DISABLED_SELECTED |
| 4556 | : TOOL_BAR_IMAGE_DISABLED_DESELECTED); | 4556 | : TOOL_BAR_IMAGE_DISABLED_DESELECTED); |
| 4557 | 4557 | ||
| 4558 | xassert (ASIZE (image) >= idx); | 4558 | eassert (ASIZE (image) >= idx); |
| 4559 | image = AREF (image, idx); | 4559 | image = AREF (image, idx); |
| 4560 | } | 4560 | } |
| 4561 | else | 4561 | else |
diff --git a/src/image.c b/src/image.c index cc0ddbb77e4..63bac9a8a79 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -522,7 +522,7 @@ x_create_bitmap_mask (struct frame *f, ptrdiff_t id) | |||
| 522 | } | 522 | } |
| 523 | } | 523 | } |
| 524 | 524 | ||
| 525 | xassert (interrupt_input_blocked); | 525 | eassert (interrupt_input_blocked); |
| 526 | gc = XCreateGC (FRAME_X_DISPLAY (f), mask, 0, NULL); | 526 | gc = XCreateGC (FRAME_X_DISPLAY (f), mask, 0, NULL); |
| 527 | XPutImage (FRAME_X_DISPLAY (f), mask, gc, mask_img, 0, 0, 0, 0, | 527 | XPutImage (FRAME_X_DISPLAY (f), mask, gc, mask_img, 0, 0, 0, 0, |
| 528 | width, height); | 528 | width, height); |
| @@ -874,7 +874,7 @@ image_spec_value (Lisp_Object spec, Lisp_Object key, int *found) | |||
| 874 | { | 874 | { |
| 875 | Lisp_Object tail; | 875 | Lisp_Object tail; |
| 876 | 876 | ||
| 877 | xassert (valid_image_p (spec)); | 877 | eassert (valid_image_p (spec)); |
| 878 | 878 | ||
| 879 | for (tail = XCDR (spec); | 879 | for (tail = XCDR (spec); |
| 880 | CONSP (tail) && CONSP (XCDR (tail)); | 880 | CONSP (tail) && CONSP (XCDR (tail)); |
| @@ -986,11 +986,11 @@ make_image (Lisp_Object spec, EMACS_UINT hash) | |||
| 986 | struct image *img = (struct image *) xmalloc (sizeof *img); | 986 | struct image *img = (struct image *) xmalloc (sizeof *img); |
| 987 | Lisp_Object file = image_spec_value (spec, QCfile, NULL); | 987 | Lisp_Object file = image_spec_value (spec, QCfile, NULL); |
| 988 | 988 | ||
| 989 | xassert (valid_image_p (spec)); | 989 | eassert (valid_image_p (spec)); |
| 990 | memset (img, 0, sizeof *img); | 990 | memset (img, 0, sizeof *img); |
| 991 | img->dependencies = NILP (file) ? Qnil : list1 (file); | 991 | img->dependencies = NILP (file) ? Qnil : list1 (file); |
| 992 | img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL)); | 992 | img->type = lookup_image_type (image_spec_value (spec, QCtype, NULL)); |
| 993 | xassert (img->type != NULL); | 993 | eassert (img->type != NULL); |
| 994 | img->spec = spec; | 994 | img->spec = spec; |
| 995 | img->lisp_data = Qnil; | 995 | img->lisp_data = Qnil; |
| 996 | img->ascent = DEFAULT_IMAGE_ASCENT; | 996 | img->ascent = DEFAULT_IMAGE_ASCENT; |
| @@ -1349,7 +1349,7 @@ x_alloc_image_color (struct frame *f, struct image *img, Lisp_Object color_name, | |||
| 1349 | XColor color; | 1349 | XColor color; |
| 1350 | unsigned long result; | 1350 | unsigned long result; |
| 1351 | 1351 | ||
| 1352 | xassert (STRINGP (color_name)); | 1352 | eassert (STRINGP (color_name)); |
| 1353 | 1353 | ||
| 1354 | if (x_defined_color (f, SSDATA (color_name), &color, 1) | 1354 | if (x_defined_color (f, SSDATA (color_name), &color, 1) |
| 1355 | && img->ncolors < min (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *img->colors, | 1355 | && img->ncolors < min (min (PTRDIFF_MAX, SIZE_MAX) / sizeof *img->colors, |
| @@ -1461,7 +1461,7 @@ free_image_cache (struct frame *f) | |||
| 1461 | ptrdiff_t i; | 1461 | ptrdiff_t i; |
| 1462 | 1462 | ||
| 1463 | /* Cache should not be referenced by any frame when freed. */ | 1463 | /* Cache should not be referenced by any frame when freed. */ |
| 1464 | xassert (c->refcount == 0); | 1464 | eassert (c->refcount == 0); |
| 1465 | 1465 | ||
| 1466 | for (i = 0; i < c->used; ++i) | 1466 | for (i = 0; i < c->used; ++i) |
| 1467 | free_image (f, c->images[i]); | 1467 | free_image (f, c->images[i]); |
| @@ -1708,8 +1708,8 @@ lookup_image (struct frame *f, Lisp_Object spec) | |||
| 1708 | 1708 | ||
| 1709 | /* F must be a window-system frame, and SPEC must be a valid image | 1709 | /* F must be a window-system frame, and SPEC must be a valid image |
| 1710 | specification. */ | 1710 | specification. */ |
| 1711 | xassert (FRAME_WINDOW_P (f)); | 1711 | eassert (FRAME_WINDOW_P (f)); |
| 1712 | xassert (valid_image_p (spec)); | 1712 | eassert (valid_image_p (spec)); |
| 1713 | 1713 | ||
| 1714 | /* Look up SPEC in the hash table of the image cache. */ | 1714 | /* Look up SPEC in the hash table of the image cache. */ |
| 1715 | hash = sxhash (spec, 0); | 1715 | hash = sxhash (spec, 0); |
| @@ -1947,7 +1947,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth, | |||
| 1947 | Window window = FRAME_X_WINDOW (f); | 1947 | Window window = FRAME_X_WINDOW (f); |
| 1948 | Screen *screen = FRAME_X_SCREEN (f); | 1948 | Screen *screen = FRAME_X_SCREEN (f); |
| 1949 | 1949 | ||
| 1950 | xassert (interrupt_input_blocked); | 1950 | eassert (interrupt_input_blocked); |
| 1951 | 1951 | ||
| 1952 | if (depth <= 0) | 1952 | if (depth <= 0) |
| 1953 | depth = DefaultDepthOfScreen (screen); | 1953 | depth = DefaultDepthOfScreen (screen); |
| @@ -2085,7 +2085,7 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth, | |||
| 2085 | static void | 2085 | static void |
| 2086 | x_destroy_x_image (XImagePtr ximg) | 2086 | x_destroy_x_image (XImagePtr ximg) |
| 2087 | { | 2087 | { |
| 2088 | xassert (interrupt_input_blocked); | 2088 | eassert (interrupt_input_blocked); |
| 2089 | if (ximg) | 2089 | if (ximg) |
| 2090 | { | 2090 | { |
| 2091 | #ifdef HAVE_X_WINDOWS | 2091 | #ifdef HAVE_X_WINDOWS |
| @@ -2114,7 +2114,7 @@ x_put_x_image (struct frame *f, XImagePtr ximg, Pixmap pixmap, int width, int he | |||
| 2114 | #ifdef HAVE_X_WINDOWS | 2114 | #ifdef HAVE_X_WINDOWS |
| 2115 | GC gc; | 2115 | GC gc; |
| 2116 | 2116 | ||
| 2117 | xassert (interrupt_input_blocked); | 2117 | eassert (interrupt_input_blocked); |
| 2118 | gc = XCreateGC (FRAME_X_DISPLAY (f), pixmap, 0, NULL); | 2118 | gc = XCreateGC (FRAME_X_DISPLAY (f), pixmap, 0, NULL); |
| 2119 | XPutImage (FRAME_X_DISPLAY (f), pixmap, gc, ximg, 0, 0, 0, 0, width, height); | 2119 | XPutImage (FRAME_X_DISPLAY (f), pixmap, gc, ximg, 0, 0, 0, 0, width, height); |
| 2120 | XFreeGC (FRAME_X_DISPLAY (f), gc); | 2120 | 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 | |||
| 2129 | #endif /* HAVE_NTGUI */ | 2129 | #endif /* HAVE_NTGUI */ |
| 2130 | 2130 | ||
| 2131 | #ifdef HAVE_NS | 2131 | #ifdef HAVE_NS |
| 2132 | xassert (ximg == pixmap); | 2132 | eassert (ximg == pixmap); |
| 2133 | ns_retain_object (ximg); | 2133 | ns_retain_object (ximg); |
| 2134 | #endif | 2134 | #endif |
| 2135 | } | 2135 | } |
| @@ -2319,7 +2319,7 @@ xbm_image_p (Lisp_Object object) | |||
| 2319 | if (!parse_image_spec (object, kw, XBM_LAST, Qxbm)) | 2319 | if (!parse_image_spec (object, kw, XBM_LAST, Qxbm)) |
| 2320 | return 0; | 2320 | return 0; |
| 2321 | 2321 | ||
| 2322 | xassert (EQ (kw[XBM_TYPE].value, Qxbm)); | 2322 | eassert (EQ (kw[XBM_TYPE].value, Qxbm)); |
| 2323 | 2323 | ||
| 2324 | if (kw[XBM_FILE].count) | 2324 | if (kw[XBM_FILE].count) |
| 2325 | { | 2325 | { |
| @@ -2780,7 +2780,7 @@ xbm_load_image (struct frame *f, struct image *img, unsigned char *contents, | |||
| 2780 | int non_default_colors = 0; | 2780 | int non_default_colors = 0; |
| 2781 | Lisp_Object value; | 2781 | Lisp_Object value; |
| 2782 | 2782 | ||
| 2783 | xassert (img->width > 0 && img->height > 0); | 2783 | eassert (img->width > 0 && img->height > 0); |
| 2784 | 2784 | ||
| 2785 | /* Get foreground and background colors, maybe allocate colors. */ | 2785 | /* Get foreground and background colors, maybe allocate colors. */ |
| 2786 | value = image_spec_value (img->spec, QCforeground, NULL); | 2786 | value = image_spec_value (img->spec, QCforeground, NULL); |
| @@ -2840,7 +2840,7 @@ xbm_load (struct frame *f, struct image *img) | |||
| 2840 | int success_p = 0; | 2840 | int success_p = 0; |
| 2841 | Lisp_Object file_name; | 2841 | Lisp_Object file_name; |
| 2842 | 2842 | ||
| 2843 | xassert (xbm_image_p (img->spec)); | 2843 | eassert (xbm_image_p (img->spec)); |
| 2844 | 2844 | ||
| 2845 | /* If IMG->spec specifies a file name, create a non-file spec from it. */ | 2845 | /* If IMG->spec specifies a file name, create a non-file spec from it. */ |
| 2846 | file_name = image_spec_value (img->spec, QCfile, NULL); | 2846 | file_name = image_spec_value (img->spec, QCfile, NULL); |
| @@ -2886,14 +2886,14 @@ xbm_load (struct frame *f, struct image *img) | |||
| 2886 | memcpy (fmt, xbm_format, sizeof fmt); | 2886 | memcpy (fmt, xbm_format, sizeof fmt); |
| 2887 | parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm); | 2887 | parsed_p = parse_image_spec (img->spec, fmt, XBM_LAST, Qxbm); |
| 2888 | (void) parsed_p; | 2888 | (void) parsed_p; |
| 2889 | xassert (parsed_p); | 2889 | eassert (parsed_p); |
| 2890 | 2890 | ||
| 2891 | /* Get specified width, and height. */ | 2891 | /* Get specified width, and height. */ |
| 2892 | if (!in_memory_file_p) | 2892 | if (!in_memory_file_p) |
| 2893 | { | 2893 | { |
| 2894 | img->width = XFASTINT (fmt[XBM_WIDTH].value); | 2894 | img->width = XFASTINT (fmt[XBM_WIDTH].value); |
| 2895 | img->height = XFASTINT (fmt[XBM_HEIGHT].value); | 2895 | img->height = XFASTINT (fmt[XBM_HEIGHT].value); |
| 2896 | xassert (img->width > 0 && img->height > 0); | 2896 | eassert (img->width > 0 && img->height > 0); |
| 2897 | if (!check_image_size (f, img->width, img->height)) | 2897 | if (!check_image_size (f, img->width, img->height)) |
| 2898 | { | 2898 | { |
| 2899 | image_error ("Invalid image size (see `max-image-size')", | 2899 | image_error ("Invalid image size (see `max-image-size')", |
| @@ -3580,7 +3580,7 @@ xpm_load (struct frame *f, struct image *img) | |||
| 3580 | 3580 | ||
| 3581 | img->width = attrs.width; | 3581 | img->width = attrs.width; |
| 3582 | img->height = attrs.height; | 3582 | img->height = attrs.height; |
| 3583 | xassert (img->width > 0 && img->height > 0); | 3583 | eassert (img->width > 0 && img->height > 0); |
| 3584 | 3584 | ||
| 3585 | /* The call to XpmFreeAttributes below frees attrs.alloc_pixels. */ | 3585 | /* The call to XpmFreeAttributes below frees attrs.alloc_pixels. */ |
| 3586 | #ifdef HAVE_NTGUI | 3586 | #ifdef HAVE_NTGUI |
| @@ -5551,7 +5551,7 @@ init_png_functions (Lisp_Object libraries) | |||
| 5551 | static _Noreturn void | 5551 | static _Noreturn void |
| 5552 | my_png_error (png_struct *png_ptr, const char *msg) | 5552 | my_png_error (png_struct *png_ptr, const char *msg) |
| 5553 | { | 5553 | { |
| 5554 | xassert (png_ptr != NULL); | 5554 | eassert (png_ptr != NULL); |
| 5555 | /* Avoid compiler warning about deprecated direct access to | 5555 | /* Avoid compiler warning about deprecated direct access to |
| 5556 | png_ptr's fields in libpng versions 1.4.x. */ | 5556 | png_ptr's fields in libpng versions 1.4.x. */ |
| 5557 | image_error ("PNG error: %s", build_string (msg), Qnil); | 5557 | image_error ("PNG error: %s", build_string (msg), Qnil); |
| @@ -5562,7 +5562,7 @@ my_png_error (png_struct *png_ptr, const char *msg) | |||
| 5562 | static void | 5562 | static void |
| 5563 | my_png_warning (png_struct *png_ptr, const char *msg) | 5563 | my_png_warning (png_struct *png_ptr, const char *msg) |
| 5564 | { | 5564 | { |
| 5565 | xassert (png_ptr != NULL); | 5565 | eassert (png_ptr != NULL); |
| 5566 | image_error ("PNG warning: %s", build_string (msg), Qnil); | 5566 | image_error ("PNG warning: %s", build_string (msg), Qnil); |
| 5567 | } | 5567 | } |
| 5568 | 5568 | ||
| @@ -5832,7 +5832,7 @@ png_load (struct frame *f, struct image *img) | |||
| 5832 | images with alpha channel, i.e. RGBA. If conversions above were | 5832 | images with alpha channel, i.e. RGBA. If conversions above were |
| 5833 | sufficient we should only have 3 or 4 channels here. */ | 5833 | sufficient we should only have 3 or 4 channels here. */ |
| 5834 | channels = fn_png_get_channels (png_ptr, info_ptr); | 5834 | channels = fn_png_get_channels (png_ptr, info_ptr); |
| 5835 | xassert (channels == 3 || channels == 4); | 5835 | eassert (channels == 3 || channels == 4); |
| 5836 | 5836 | ||
| 5837 | /* Number of bytes needed for one row of the image. */ | 5837 | /* Number of bytes needed for one row of the image. */ |
| 5838 | row_bytes = fn_png_get_rowbytes (png_ptr, info_ptr); | 5838 | row_bytes = fn_png_get_rowbytes (png_ptr, info_ptr); |
| @@ -8540,7 +8540,7 @@ gs_load (struct frame *f, struct image *img) | |||
| 8540 | img->height = in_height; | 8540 | img->height = in_height; |
| 8541 | 8541 | ||
| 8542 | /* Create the pixmap. */ | 8542 | /* Create the pixmap. */ |
| 8543 | xassert (img->pixmap == NO_PIXMAP); | 8543 | eassert (img->pixmap == NO_PIXMAP); |
| 8544 | 8544 | ||
| 8545 | if (x_check_image_size (0, img->width, img->height)) | 8545 | if (x_check_image_size (0, img->width, img->height)) |
| 8546 | { | 8546 | { |
| @@ -8611,7 +8611,7 @@ x_kill_gs_process (Pixmap pixmap, struct frame *f) | |||
| 8611 | /* Kill the GS process. We should have found PIXMAP in the image | 8611 | /* Kill the GS process. We should have found PIXMAP in the image |
| 8612 | cache and its image should contain a process object. */ | 8612 | cache and its image should contain a process object. */ |
| 8613 | img = c->images[i]; | 8613 | img = c->images[i]; |
| 8614 | xassert (PROCESSP (img->lisp_data)); | 8614 | eassert (PROCESSP (img->lisp_data)); |
| 8615 | Fkill_process (img->lisp_data, Qnil); | 8615 | Fkill_process (img->lisp_data, Qnil); |
| 8616 | img->lisp_data = Qnil; | 8616 | img->lisp_data = Qnil; |
| 8617 | 8617 | ||
diff --git a/src/keyboard.c b/src/keyboard.c index 3d128612028..c76e015a6f4 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -1752,7 +1752,7 @@ adjust_point_for_property (ptrdiff_t last_pt, int modified) | |||
| 1752 | && (beg < PT /* && end > PT <- It's always the case. */ | 1752 | && (beg < PT /* && end > PT <- It's always the case. */ |
| 1753 | || (beg <= PT && STRINGP (val) && SCHARS (val) == 0))) | 1753 | || (beg <= PT && STRINGP (val) && SCHARS (val) == 0))) |
| 1754 | { | 1754 | { |
| 1755 | xassert (end > PT); | 1755 | eassert (end > PT); |
| 1756 | SET_PT (PT < last_pt | 1756 | SET_PT (PT < last_pt |
| 1757 | ? (STRINGP (val) && SCHARS (val) == 0 | 1757 | ? (STRINGP (val) && SCHARS (val) == 0 |
| 1758 | ? max (beg - 1, BEGV) | 1758 | ? max (beg - 1, BEGV) |
| @@ -1834,7 +1834,7 @@ adjust_point_for_property (ptrdiff_t last_pt, int modified) | |||
| 1834 | #if 0 /* This assertion isn't correct, because SET_PT may end up setting | 1834 | #if 0 /* This assertion isn't correct, because SET_PT may end up setting |
| 1835 | the point to something other than its argument, due to | 1835 | the point to something other than its argument, due to |
| 1836 | point-motion hooks, intangibility, etc. */ | 1836 | point-motion hooks, intangibility, etc. */ |
| 1837 | xassert (PT == beg || PT == end); | 1837 | eassert (PT == beg || PT == end); |
| 1838 | #endif | 1838 | #endif |
| 1839 | 1839 | ||
| 1840 | /* Pretend the area doesn't exist if the buffer is not | 1840 | /* Pretend the area doesn't exist if the buffer is not |
diff --git a/src/menu.c b/src/menu.c index e3677e62896..2cff60eae3c 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -129,7 +129,7 @@ discard_menu_items (void) | |||
| 129 | menu_items = Qnil; | 129 | menu_items = Qnil; |
| 130 | menu_items_allocated = 0; | 130 | menu_items_allocated = 0; |
| 131 | } | 131 | } |
| 132 | xassert (NILP (menu_items_inuse)); | 132 | eassert (NILP (menu_items_inuse)); |
| 133 | } | 133 | } |
| 134 | 134 | ||
| 135 | #ifdef HAVE_NS | 135 | #ifdef HAVE_NS |
diff --git a/src/process.c b/src/process.c index 1508e4b13fc..de7fc147975 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -353,7 +353,7 @@ static struct fd_callback_data | |||
| 353 | void | 353 | void |
| 354 | add_read_fd (int fd, fd_callback func, void *data) | 354 | add_read_fd (int fd, fd_callback func, void *data) |
| 355 | { | 355 | { |
| 356 | xassert (fd < MAXDESC); | 356 | eassert (fd < MAXDESC); |
| 357 | add_keyboard_wait_descriptor (fd); | 357 | add_keyboard_wait_descriptor (fd); |
| 358 | 358 | ||
| 359 | fd_callback_info[fd].func = func; | 359 | fd_callback_info[fd].func = func; |
| @@ -366,7 +366,7 @@ add_read_fd (int fd, fd_callback func, void *data) | |||
| 366 | void | 366 | void |
| 367 | delete_read_fd (int fd) | 367 | delete_read_fd (int fd) |
| 368 | { | 368 | { |
| 369 | xassert (fd < MAXDESC); | 369 | eassert (fd < MAXDESC); |
| 370 | delete_keyboard_wait_descriptor (fd); | 370 | delete_keyboard_wait_descriptor (fd); |
| 371 | 371 | ||
| 372 | fd_callback_info[fd].condition &= ~FOR_READ; | 372 | fd_callback_info[fd].condition &= ~FOR_READ; |
| @@ -383,7 +383,7 @@ delete_read_fd (int fd) | |||
| 383 | void | 383 | void |
| 384 | add_write_fd (int fd, fd_callback func, void *data) | 384 | add_write_fd (int fd, fd_callback func, void *data) |
| 385 | { | 385 | { |
| 386 | xassert (fd < MAXDESC); | 386 | eassert (fd < MAXDESC); |
| 387 | FD_SET (fd, &write_mask); | 387 | FD_SET (fd, &write_mask); |
| 388 | if (fd > max_input_desc) | 388 | if (fd > max_input_desc) |
| 389 | max_input_desc = fd; | 389 | max_input_desc = fd; |
| @@ -400,7 +400,7 @@ delete_write_fd (int fd) | |||
| 400 | { | 400 | { |
| 401 | int lim = max_input_desc; | 401 | int lim = max_input_desc; |
| 402 | 402 | ||
| 403 | xassert (fd < MAXDESC); | 403 | eassert (fd < MAXDESC); |
| 404 | FD_CLR (fd, &write_mask); | 404 | FD_CLR (fd, &write_mask); |
| 405 | fd_callback_info[fd].condition &= ~FOR_WRITE; | 405 | fd_callback_info[fd].condition &= ~FOR_WRITE; |
| 406 | if (fd_callback_info[fd].condition == 0) | 406 | if (fd_callback_info[fd].condition == 0) |
diff --git a/src/scroll.c b/src/scroll.c index abc5c17400a..603e04575f6 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -270,7 +270,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, | |||
| 270 | { \ | 270 | { \ |
| 271 | int ck; \ | 271 | int ck; \ |
| 272 | for (ck = 0; ck < window_size; ++ck) \ | 272 | for (ck = 0; ck < window_size; ++ck) \ |
| 273 | xassert (copy_from[ck] == -1 \ | 273 | eassert (copy_from[ck] == -1 \ |
| 274 | || (copy_from[ck] >= 0 && copy_from[ck] < window_size)); \ | 274 | || (copy_from[ck] >= 0 && copy_from[ck] < window_size)); \ |
| 275 | } \ | 275 | } \ |
| 276 | while (0); | 276 | while (0); |
| @@ -317,8 +317,8 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, | |||
| 317 | { | 317 | { |
| 318 | /* Best thing done here is no insert or delete, i.e. a write. */ | 318 | /* Best thing done here is no insert or delete, i.e. a write. */ |
| 319 | --i, --j; | 319 | --i, --j; |
| 320 | xassert (i >= 0 && i < window_size); | 320 | eassert (i >= 0 && i < window_size); |
| 321 | xassert (j >= 0 && j < window_size); | 321 | eassert (j >= 0 && j < window_size); |
| 322 | copy_from[i] = j; | 322 | copy_from[i] = j; |
| 323 | retained_p[j] = 1; | 323 | retained_p[j] = 1; |
| 324 | 324 | ||
| @@ -368,7 +368,7 @@ do_scrolling (struct frame *frame, struct glyph_matrix *current_matrix, | |||
| 368 | } | 368 | } |
| 369 | 369 | ||
| 370 | for (k = 0; k < window_size; ++k) | 370 | for (k = 0; k < window_size; ++k) |
| 371 | xassert (copy_from[k] >= 0 && copy_from[k] < window_size); | 371 | eassert (copy_from[k] >= 0 && copy_from[k] < window_size); |
| 372 | 372 | ||
| 373 | /* Perform the row swizzling. */ | 373 | /* Perform the row swizzling. */ |
| 374 | mirrored_line_dance (current_matrix, unchanged_at_top, window_size, | 374 | 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, | |||
| 728 | place they belong. */ | 728 | place they belong. */ |
| 729 | int n_to_write = p->writecount; | 729 | int n_to_write = p->writecount; |
| 730 | write_follows_p = 1; | 730 | write_follows_p = 1; |
| 731 | xassert (n_to_write > 0); | 731 | eassert (n_to_write > 0); |
| 732 | 732 | ||
| 733 | if (i > j) | 733 | if (i > j) |
| 734 | { | 734 | { |
diff --git a/src/sound.c b/src/sound.c index 65e7af70c5d..66df195338f 100644 --- a/src/sound.c +++ b/src/sound.c | |||
| @@ -733,7 +733,7 @@ vox_configure (struct sound_device *sd) | |||
| 733 | { | 733 | { |
| 734 | int val; | 734 | int val; |
| 735 | 735 | ||
| 736 | xassert (sd->fd >= 0); | 736 | eassert (sd->fd >= 0); |
| 737 | 737 | ||
| 738 | /* On GNU/Linux, it seems that the device driver doesn't like to be | 738 | /* On GNU/Linux, it seems that the device driver doesn't like to be |
| 739 | interrupted by a signal. Block the ones we know to cause | 739 | interrupted by a signal. Block the ones we know to cause |
| @@ -962,7 +962,7 @@ alsa_configure (struct sound_device *sd) | |||
| 962 | struct alsa_params *p = (struct alsa_params *) sd->data; | 962 | struct alsa_params *p = (struct alsa_params *) sd->data; |
| 963 | snd_pcm_uframes_t buffer_size; | 963 | snd_pcm_uframes_t buffer_size; |
| 964 | 964 | ||
| 965 | xassert (p->handle != 0); | 965 | eassert (p->handle != 0); |
| 966 | 966 | ||
| 967 | err = snd_pcm_hw_params_malloc (&p->hwparams); | 967 | err = snd_pcm_hw_params_malloc (&p->hwparams); |
| 968 | if (err < 0) | 968 | if (err < 0) |
diff --git a/src/term.c b/src/term.c index 471bc19ab54..128aaca20dd 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -1459,7 +1459,7 @@ append_glyph (struct it *it) | |||
| 1459 | struct glyph *glyph, *end; | 1459 | struct glyph *glyph, *end; |
| 1460 | int i; | 1460 | int i; |
| 1461 | 1461 | ||
| 1462 | xassert (it->glyph_row); | 1462 | eassert (it->glyph_row); |
| 1463 | glyph = (it->glyph_row->glyphs[it->area] | 1463 | glyph = (it->glyph_row->glyphs[it->area] |
| 1464 | + it->glyph_row->used[it->area]); | 1464 | + it->glyph_row->used[it->area]); |
| 1465 | end = it->glyph_row->glyphs[1 + it->area]; | 1465 | end = it->glyph_row->glyphs[1 + it->area]; |
| @@ -1546,7 +1546,7 @@ produce_glyphs (struct it *it) | |||
| 1546 | /* If a hook is installed, let it do the work. */ | 1546 | /* If a hook is installed, let it do the work. */ |
| 1547 | 1547 | ||
| 1548 | /* Nothing but characters are supported on terminal frames. */ | 1548 | /* Nothing but characters are supported on terminal frames. */ |
| 1549 | xassert (it->what == IT_CHARACTER | 1549 | eassert (it->what == IT_CHARACTER |
| 1550 | || it->what == IT_COMPOSITION | 1550 | || it->what == IT_COMPOSITION |
| 1551 | || it->what == IT_STRETCH | 1551 | || it->what == IT_STRETCH |
| 1552 | || it->what == IT_GLYPHLESS); | 1552 | || it->what == IT_GLYPHLESS); |
| @@ -1633,7 +1633,7 @@ produce_glyphs (struct it *it) | |||
| 1633 | { | 1633 | { |
| 1634 | Lisp_Object acronym = lookup_glyphless_char_display (-1, it); | 1634 | Lisp_Object acronym = lookup_glyphless_char_display (-1, it); |
| 1635 | 1635 | ||
| 1636 | xassert (it->what == IT_GLYPHLESS); | 1636 | eassert (it->what == IT_GLYPHLESS); |
| 1637 | produce_glyphless_glyph (it, 1, acronym); | 1637 | produce_glyphless_glyph (it, 1, acronym); |
| 1638 | } | 1638 | } |
| 1639 | } | 1639 | } |
| @@ -1657,7 +1657,7 @@ append_composite_glyph (struct it *it) | |||
| 1657 | { | 1657 | { |
| 1658 | struct glyph *glyph; | 1658 | struct glyph *glyph; |
| 1659 | 1659 | ||
| 1660 | xassert (it->glyph_row); | 1660 | eassert (it->glyph_row); |
| 1661 | glyph = it->glyph_row->glyphs[it->area] + it->glyph_row->used[it->area]; | 1661 | glyph = it->glyph_row->glyphs[it->area] + it->glyph_row->used[it->area]; |
| 1662 | if (glyph < it->glyph_row->glyphs[1 + it->area]) | 1662 | if (glyph < it->glyph_row->glyphs[1 + it->area]) |
| 1663 | { | 1663 | { |
| @@ -1749,7 +1749,7 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str) | |||
| 1749 | struct glyph *glyph, *end; | 1749 | struct glyph *glyph, *end; |
| 1750 | int i; | 1750 | int i; |
| 1751 | 1751 | ||
| 1752 | xassert (it->glyph_row); | 1752 | eassert (it->glyph_row); |
| 1753 | glyph = it->glyph_row->glyphs[it->area] + it->glyph_row->used[it->area]; | 1753 | glyph = it->glyph_row->glyphs[it->area] + it->glyph_row->used[it->area]; |
| 1754 | end = it->glyph_row->glyphs[1 + it->area]; | 1754 | end = it->glyph_row->glyphs[1 + it->area]; |
| 1755 | 1755 | ||
| @@ -1871,7 +1871,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym) | |||
| 1871 | } | 1871 | } |
| 1872 | else | 1872 | else |
| 1873 | { | 1873 | { |
| 1874 | xassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE); | 1874 | eassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE); |
| 1875 | len = (it->c < 0x10000 ? sprintf (buf, "\\u%04X", it->c) | 1875 | len = (it->c < 0x10000 ? sprintf (buf, "\\u%04X", it->c) |
| 1876 | : it->c <= MAX_UNICODE_CHAR ? sprintf (buf, "\\U%06X", it->c) | 1876 | : it->c <= MAX_UNICODE_CHAR ? sprintf (buf, "\\U%06X", it->c) |
| 1877 | : sprintf (buf, "\\x%06X", it->c)); | 1877 | : sprintf (buf, "\\x%06X", it->c)); |
| @@ -2067,7 +2067,7 @@ turn_off_face (struct frame *f, int face_id) | |||
| 2067 | struct face *face = FACE_FROM_ID (f, face_id); | 2067 | struct face *face = FACE_FROM_ID (f, face_id); |
| 2068 | struct tty_display_info *tty = FRAME_TTY (f); | 2068 | struct tty_display_info *tty = FRAME_TTY (f); |
| 2069 | 2069 | ||
| 2070 | xassert (face != NULL); | 2070 | eassert (face != NULL); |
| 2071 | 2071 | ||
| 2072 | if (tty->TS_exit_attribute_mode) | 2072 | if (tty->TS_exit_attribute_mode) |
| 2073 | { | 2073 | { |
diff --git a/src/w32console.c b/src/w32console.c index 22f329e239d..42d89cca6d7 100644 --- a/src/w32console.c +++ b/src/w32console.c | |||
| @@ -616,7 +616,7 @@ w32_face_attributes (struct frame *f, int face_id) | |||
| 616 | WORD char_attr; | 616 | WORD char_attr; |
| 617 | struct face *face = FACE_FROM_ID (f, face_id); | 617 | struct face *face = FACE_FROM_ID (f, face_id); |
| 618 | 618 | ||
| 619 | xassert (face != NULL); | 619 | eassert (face != NULL); |
| 620 | 620 | ||
| 621 | char_attr = char_attr_normal; | 621 | char_attr = char_attr_normal; |
| 622 | 622 | ||
diff --git a/src/w32fns.c b/src/w32fns.c index 915114138d8..c00ed66dcbb 100644 --- a/src/w32fns.c +++ b/src/w32fns.c | |||
| @@ -4005,8 +4005,8 @@ unwind_create_frame (Lisp_Object frame) | |||
| 4005 | 4005 | ||
| 4006 | #if GLYPH_DEBUG | 4006 | #if GLYPH_DEBUG |
| 4007 | /* Check that reference counts are indeed correct. */ | 4007 | /* Check that reference counts are indeed correct. */ |
| 4008 | xassert (dpyinfo->reference_count == dpyinfo_refcount); | 4008 | eassert (dpyinfo->reference_count == dpyinfo_refcount); |
| 4009 | xassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount); | 4009 | eassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount); |
| 4010 | #endif | 4010 | #endif |
| 4011 | return Qt; | 4011 | return Qt; |
| 4012 | } | 4012 | } |
diff --git a/src/w32term.c b/src/w32term.c index 4f4fa220a7b..f879e648054 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -742,7 +742,7 @@ x_after_update_window_line (struct glyph_row *desired_row) | |||
| 742 | struct frame *f; | 742 | struct frame *f; |
| 743 | int width, height; | 743 | int width, height; |
| 744 | 744 | ||
| 745 | xassert (w); | 745 | eassert (w); |
| 746 | 746 | ||
| 747 | if (!desired_row->mode_line_p && !w->pseudo_window_p) | 747 | if (!desired_row->mode_line_p && !w->pseudo_window_p) |
| 748 | desired_row->redraw_fringe_bitmaps_p = 1; | 748 | desired_row->redraw_fringe_bitmaps_p = 1; |
| @@ -1086,7 +1086,7 @@ x_set_mouse_face_gc (struct glyph_string *s) | |||
| 1086 | s->gc = FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc; | 1086 | s->gc = FRAME_W32_DISPLAY_INFO (s->f)->scratch_cursor_gc; |
| 1087 | } | 1087 | } |
| 1088 | 1088 | ||
| 1089 | xassert (s->gc != 0); | 1089 | eassert (s->gc != 0); |
| 1090 | } | 1090 | } |
| 1091 | 1091 | ||
| 1092 | 1092 | ||
| @@ -1143,7 +1143,7 @@ x_set_glyph_string_gc (struct glyph_string *s) | |||
| 1143 | } | 1143 | } |
| 1144 | 1144 | ||
| 1145 | /* GC must have been set. */ | 1145 | /* GC must have been set. */ |
| 1146 | xassert (s->gc != 0); | 1146 | eassert (s->gc != 0); |
| 1147 | } | 1147 | } |
| 1148 | 1148 | ||
| 1149 | 1149 | ||
| @@ -1560,7 +1560,7 @@ w32_alloc_lighter_color (struct frame *f, COLORREF *color, | |||
| 1560 | delta /= 256; | 1560 | delta /= 256; |
| 1561 | 1561 | ||
| 1562 | /* Change RGB values by specified FACTOR. Avoid overflow! */ | 1562 | /* Change RGB values by specified FACTOR. Avoid overflow! */ |
| 1563 | xassert (factor >= 0); | 1563 | eassert (factor >= 0); |
| 1564 | new = PALETTERGB (min (0xff, factor * GetRValue (*color)), | 1564 | new = PALETTERGB (min (0xff, factor * GetRValue (*color)), |
| 1565 | min (0xff, factor * GetGValue (*color)), | 1565 | min (0xff, factor * GetGValue (*color)), |
| 1566 | min (0xff, factor * GetBValue (*color))); | 1566 | min (0xff, factor * GetBValue (*color))); |
| @@ -2237,7 +2237,7 @@ x_draw_image_glyph_string (struct glyph_string *s) | |||
| 2237 | static void | 2237 | static void |
| 2238 | x_draw_stretch_glyph_string (struct glyph_string *s) | 2238 | x_draw_stretch_glyph_string (struct glyph_string *s) |
| 2239 | { | 2239 | { |
| 2240 | xassert (s->first_glyph->type == STRETCH_GLYPH); | 2240 | eassert (s->first_glyph->type == STRETCH_GLYPH); |
| 2241 | 2241 | ||
| 2242 | if (s->hl == DRAW_CURSOR | 2242 | if (s->hl == DRAW_CURSOR |
| 2243 | && !x_stretch_cursor_p) | 2243 | && !x_stretch_cursor_p) |
| @@ -6032,9 +6032,9 @@ x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y) | |||
| 6032 | static void | 6032 | static void |
| 6033 | x_check_font (struct frame *f, struct font *font) | 6033 | x_check_font (struct frame *f, struct font *font) |
| 6034 | { | 6034 | { |
| 6035 | xassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX])); | 6035 | eassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX])); |
| 6036 | if (font->driver->check) | 6036 | if (font->driver->check) |
| 6037 | xassert (font->driver->check (f, font) == 0); | 6037 | eassert (font->driver->check (f, font) == 0); |
| 6038 | } | 6038 | } |
| 6039 | 6039 | ||
| 6040 | #endif /* GLYPH_DEBUG != 0 */ | 6040 | #endif /* GLYPH_DEBUG != 0 */ |
diff --git a/src/window.c b/src/window.c index 05749c12bb9..f640a54b283 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -2035,7 +2035,7 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow, Lisp_Object minibuf | |||
| 2035 | candidate_p = 1; | 2035 | candidate_p = 1; |
| 2036 | else if (NILP (all_frames)) | 2036 | else if (NILP (all_frames)) |
| 2037 | { | 2037 | { |
| 2038 | xassert (WINDOWP (owindow)); | 2038 | eassert (WINDOWP (owindow)); |
| 2039 | candidate_p = EQ (w->frame, XWINDOW (owindow)->frame); | 2039 | candidate_p = EQ (w->frame, XWINDOW (owindow)->frame); |
| 2040 | } | 2040 | } |
| 2041 | else if (EQ (all_frames, Qvisible)) | 2041 | else if (EQ (all_frames, Qvisible)) |
| @@ -4010,8 +4010,8 @@ grow_mini_window (struct window *w, int delta) | |||
| 4010 | struct window *r; | 4010 | struct window *r; |
| 4011 | Lisp_Object root, value; | 4011 | Lisp_Object root, value; |
| 4012 | 4012 | ||
| 4013 | xassert (MINI_WINDOW_P (w)); | 4013 | eassert (MINI_WINDOW_P (w)); |
| 4014 | xassert (delta >= 0); | 4014 | eassert (delta >= 0); |
| 4015 | 4015 | ||
| 4016 | root = FRAME_ROOT_WINDOW (f); | 4016 | root = FRAME_ROOT_WINDOW (f); |
| 4017 | r = XWINDOW (root); | 4017 | r = XWINDOW (root); |
| @@ -4043,7 +4043,7 @@ shrink_mini_window (struct window *w) | |||
| 4043 | Lisp_Object root, value; | 4043 | Lisp_Object root, value; |
| 4044 | EMACS_INT size; | 4044 | EMACS_INT size; |
| 4045 | 4045 | ||
| 4046 | xassert (MINI_WINDOW_P (w)); | 4046 | eassert (MINI_WINDOW_P (w)); |
| 4047 | 4047 | ||
| 4048 | size = XINT (w->total_lines); | 4048 | size = XINT (w->total_lines); |
| 4049 | if (size > 1) | 4049 | if (size > 1) |
| @@ -4721,7 +4721,7 @@ scroll_command (Lisp_Object n, int direction) | |||
| 4721 | { | 4721 | { |
| 4722 | ptrdiff_t count = SPECPDL_INDEX (); | 4722 | ptrdiff_t count = SPECPDL_INDEX (); |
| 4723 | 4723 | ||
| 4724 | xassert (eabs (direction) == 1); | 4724 | eassert (eabs (direction) == 1); |
| 4725 | 4725 | ||
| 4726 | /* If selected window's buffer isn't current, make it current for | 4726 | /* If selected window's buffer isn't current, make it current for |
| 4727 | the moment. But don't screw up if window_scroll gets an error. */ | 4727 | 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. */) | |||
| 5686 | if (NILP (leaf_windows[i]->buffer)) | 5686 | if (NILP (leaf_windows[i]->buffer)) |
| 5687 | { | 5687 | { |
| 5688 | /* Assert it's not reused as a combination. */ | 5688 | /* Assert it's not reused as a combination. */ |
| 5689 | xassert (NILP (leaf_windows[i]->hchild) | 5689 | eassert (NILP (leaf_windows[i]->hchild) |
| 5690 | && NILP (leaf_windows[i]->vchild)); | 5690 | && NILP (leaf_windows[i]->vchild)); |
| 5691 | free_window_matrices (leaf_windows[i]); | 5691 | free_window_matrices (leaf_windows[i]); |
| 5692 | } | 5692 | } |
diff --git a/src/xdisp.c b/src/xdisp.c index 23ecbb5d480..b03c455eb50 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1025,7 +1025,7 @@ window_box_height (struct window *w) | |||
| 1025 | struct frame *f = XFRAME (w->frame); | 1025 | struct frame *f = XFRAME (w->frame); |
| 1026 | int height = WINDOW_TOTAL_HEIGHT (w); | 1026 | int height = WINDOW_TOTAL_HEIGHT (w); |
| 1027 | 1027 | ||
| 1028 | xassert (height >= 0); | 1028 | eassert (height >= 0); |
| 1029 | 1029 | ||
| 1030 | /* Note: the code below that determines the mode-line/header-line | 1030 | /* Note: the code below that determines the mode-line/header-line |
| 1031 | height is essentially the same as that contained in the macro | 1031 | height is essentially the same as that contained in the macro |
| @@ -1511,7 +1511,7 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y, | |||
| 1511 | --g; | 1511 | --g; |
| 1512 | top_x -= g->pixel_width; | 1512 | top_x -= g->pixel_width; |
| 1513 | } | 1513 | } |
| 1514 | xassert (g < it3.glyph_row->glyphs[TEXT_AREA] | 1514 | eassert (g < it3.glyph_row->glyphs[TEXT_AREA] |
| 1515 | + it3.glyph_row->used[TEXT_AREA]); | 1515 | + it3.glyph_row->used[TEXT_AREA]); |
| 1516 | } | 1516 | } |
| 1517 | } | 1517 | } |
| @@ -1606,7 +1606,7 @@ string_char_and_length (const unsigned char *str, int *len) | |||
| 1606 | static struct text_pos | 1606 | static struct text_pos |
| 1607 | string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, ptrdiff_t nchars) | 1607 | string_pos_nchars_ahead (struct text_pos pos, Lisp_Object string, ptrdiff_t nchars) |
| 1608 | { | 1608 | { |
| 1609 | xassert (STRINGP (string) && nchars >= 0); | 1609 | eassert (STRINGP (string) && nchars >= 0); |
| 1610 | 1610 | ||
| 1611 | if (STRING_MULTIBYTE (string)) | 1611 | if (STRING_MULTIBYTE (string)) |
| 1612 | { | 1612 | { |
| @@ -1635,8 +1635,8 @@ static inline struct text_pos | |||
| 1635 | string_pos (ptrdiff_t charpos, Lisp_Object string) | 1635 | string_pos (ptrdiff_t charpos, Lisp_Object string) |
| 1636 | { | 1636 | { |
| 1637 | struct text_pos pos; | 1637 | struct text_pos pos; |
| 1638 | xassert (STRINGP (string)); | 1638 | eassert (STRINGP (string)); |
| 1639 | xassert (charpos >= 0); | 1639 | eassert (charpos >= 0); |
| 1640 | SET_TEXT_POS (pos, charpos, string_char_to_byte (string, charpos)); | 1640 | SET_TEXT_POS (pos, charpos, string_char_to_byte (string, charpos)); |
| 1641 | return pos; | 1641 | return pos; |
| 1642 | } | 1642 | } |
| @@ -1651,8 +1651,8 @@ c_string_pos (ptrdiff_t charpos, const char *s, int multibyte_p) | |||
| 1651 | { | 1651 | { |
| 1652 | struct text_pos pos; | 1652 | struct text_pos pos; |
| 1653 | 1653 | ||
| 1654 | xassert (s != NULL); | 1654 | eassert (s != NULL); |
| 1655 | xassert (charpos >= 0); | 1655 | eassert (charpos >= 0); |
| 1656 | 1656 | ||
| 1657 | if (multibyte_p) | 1657 | if (multibyte_p) |
| 1658 | { | 1658 | { |
| @@ -1708,8 +1708,8 @@ number_of_chars (const char *s, int multibyte_p) | |||
| 1708 | static void | 1708 | static void |
| 1709 | compute_string_pos (struct text_pos *newpos, struct text_pos pos, Lisp_Object string) | 1709 | compute_string_pos (struct text_pos *newpos, struct text_pos pos, Lisp_Object string) |
| 1710 | { | 1710 | { |
| 1711 | xassert (STRINGP (string)); | 1711 | eassert (STRINGP (string)); |
| 1712 | xassert (CHARPOS (*newpos) >= CHARPOS (pos)); | 1712 | eassert (CHARPOS (*newpos) >= CHARPOS (pos)); |
| 1713 | 1713 | ||
| 1714 | if (STRING_MULTIBYTE (string)) | 1714 | if (STRING_MULTIBYTE (string)) |
| 1715 | *newpos = string_pos_nchars_ahead (pos, string, | 1715 | *newpos = string_pos_nchars_ahead (pos, string, |
| @@ -2467,23 +2467,23 @@ check_it (struct it *it) | |||
| 2467 | { | 2467 | { |
| 2468 | if (it->method == GET_FROM_STRING) | 2468 | if (it->method == GET_FROM_STRING) |
| 2469 | { | 2469 | { |
| 2470 | xassert (STRINGP (it->string)); | 2470 | eassert (STRINGP (it->string)); |
| 2471 | xassert (IT_STRING_CHARPOS (*it) >= 0); | 2471 | eassert (IT_STRING_CHARPOS (*it) >= 0); |
| 2472 | } | 2472 | } |
| 2473 | else | 2473 | else |
| 2474 | { | 2474 | { |
| 2475 | xassert (IT_STRING_CHARPOS (*it) < 0); | 2475 | eassert (IT_STRING_CHARPOS (*it) < 0); |
| 2476 | if (it->method == GET_FROM_BUFFER) | 2476 | if (it->method == GET_FROM_BUFFER) |
| 2477 | { | 2477 | { |
| 2478 | /* Check that character and byte positions agree. */ | 2478 | /* Check that character and byte positions agree. */ |
| 2479 | xassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it))); | 2479 | eassert (IT_CHARPOS (*it) == BYTE_TO_CHAR (IT_BYTEPOS (*it))); |
| 2480 | } | 2480 | } |
| 2481 | } | 2481 | } |
| 2482 | 2482 | ||
| 2483 | if (it->dpvec) | 2483 | if (it->dpvec) |
| 2484 | xassert (it->current.dpvec_index >= 0); | 2484 | eassert (it->current.dpvec_index >= 0); |
| 2485 | else | 2485 | else |
| 2486 | xassert (it->current.dpvec_index < 0); | 2486 | eassert (it->current.dpvec_index < 0); |
| 2487 | } | 2487 | } |
| 2488 | 2488 | ||
| 2489 | #define CHECK_IT(IT) check_it ((IT)) | 2489 | #define CHECK_IT(IT) check_it ((IT)) |
| @@ -2495,7 +2495,7 @@ check_it (struct it *it) | |||
| 2495 | #endif /* not 0 */ | 2495 | #endif /* not 0 */ |
| 2496 | 2496 | ||
| 2497 | 2497 | ||
| 2498 | #if GLYPH_DEBUG && XASSERTS | 2498 | #if GLYPH_DEBUG && defined ENABLE_CHECKING |
| 2499 | 2499 | ||
| 2500 | /* Check that the window end of window W is what we expect it | 2500 | /* Check that the window end of window W is what we expect it |
| 2501 | to be---the last row in the current matrix displaying text. */ | 2501 | to be---the last row in the current matrix displaying text. */ |
| @@ -2507,7 +2507,7 @@ check_window_end (struct window *w) | |||
| 2507 | && !NILP (w->window_end_valid)) | 2507 | && !NILP (w->window_end_valid)) |
| 2508 | { | 2508 | { |
| 2509 | struct glyph_row *row; | 2509 | struct glyph_row *row; |
| 2510 | xassert ((row = MATRIX_ROW (w->current_matrix, | 2510 | eassert ((row = MATRIX_ROW (w->current_matrix, |
| 2511 | XFASTINT (w->window_end_vpos)), | 2511 | XFASTINT (w->window_end_vpos)), |
| 2512 | !row->enabled_p | 2512 | !row->enabled_p |
| 2513 | || MATRIX_ROW_DISPLAYS_TEXT_P (row) | 2513 | || MATRIX_ROW_DISPLAYS_TEXT_P (row) |
| @@ -2557,8 +2557,8 @@ init_iterator (struct it *it, struct window *w, | |||
| 2557 | enum face_id remapped_base_face_id = base_face_id; | 2557 | enum face_id remapped_base_face_id = base_face_id; |
| 2558 | 2558 | ||
| 2559 | /* Some precondition checks. */ | 2559 | /* Some precondition checks. */ |
| 2560 | xassert (w != NULL && it != NULL); | 2560 | eassert (w != NULL && it != NULL); |
| 2561 | xassert (charpos < 0 || (charpos >= BUF_BEG (current_buffer) | 2561 | eassert (charpos < 0 || (charpos >= BUF_BEG (current_buffer) |
| 2562 | && charpos <= ZV)); | 2562 | && charpos <= ZV)); |
| 2563 | 2563 | ||
| 2564 | /* If face attributes have been changed since the last redisplay, | 2564 | /* If face attributes have been changed since the last redisplay, |
| @@ -2719,14 +2719,14 @@ init_iterator (struct it *it, struct window *w, | |||
| 2719 | if (it->line_wrap == TRUNCATE) | 2719 | if (it->line_wrap == TRUNCATE) |
| 2720 | { | 2720 | { |
| 2721 | /* We will need the truncation glyph. */ | 2721 | /* We will need the truncation glyph. */ |
| 2722 | xassert (it->glyph_row == NULL); | 2722 | eassert (it->glyph_row == NULL); |
| 2723 | produce_special_glyphs (it, IT_TRUNCATION); | 2723 | produce_special_glyphs (it, IT_TRUNCATION); |
| 2724 | it->truncation_pixel_width = it->pixel_width; | 2724 | it->truncation_pixel_width = it->pixel_width; |
| 2725 | } | 2725 | } |
| 2726 | else | 2726 | else |
| 2727 | { | 2727 | { |
| 2728 | /* We will need the continuation glyph. */ | 2728 | /* We will need the continuation glyph. */ |
| 2729 | xassert (it->glyph_row == NULL); | 2729 | eassert (it->glyph_row == NULL); |
| 2730 | produce_special_glyphs (it, IT_CONTINUATION); | 2730 | produce_special_glyphs (it, IT_CONTINUATION); |
| 2731 | it->continuation_pixel_width = it->pixel_width; | 2731 | it->continuation_pixel_width = it->pixel_width; |
| 2732 | } | 2732 | } |
| @@ -3056,7 +3056,7 @@ init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos) | |||
| 3056 | relative_index = (it->current.overlay_string_index | 3056 | relative_index = (it->current.overlay_string_index |
| 3057 | % OVERLAY_STRING_CHUNK_SIZE); | 3057 | % OVERLAY_STRING_CHUNK_SIZE); |
| 3058 | it->string = it->overlay_strings[relative_index]; | 3058 | it->string = it->overlay_strings[relative_index]; |
| 3059 | xassert (STRINGP (it->string)); | 3059 | eassert (STRINGP (it->string)); |
| 3060 | it->current.string_pos = pos->string_pos; | 3060 | it->current.string_pos = pos->string_pos; |
| 3061 | it->method = GET_FROM_STRING; | 3061 | it->method = GET_FROM_STRING; |
| 3062 | } | 3062 | } |
| @@ -3067,7 +3067,7 @@ init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos) | |||
| 3067 | string. This can only be a string from a `display' property. | 3067 | string. This can only be a string from a `display' property. |
| 3068 | IT should already be filled with that string. */ | 3068 | IT should already be filled with that string. */ |
| 3069 | it->current.string_pos = pos->string_pos; | 3069 | it->current.string_pos = pos->string_pos; |
| 3070 | xassert (STRINGP (it->string)); | 3070 | eassert (STRINGP (it->string)); |
| 3071 | } | 3071 | } |
| 3072 | 3072 | ||
| 3073 | /* Restore position in display vector translations, control | 3073 | /* Restore position in display vector translations, control |
| @@ -3076,7 +3076,7 @@ init_from_display_pos (struct it *it, struct window *w, struct display_pos *pos) | |||
| 3076 | { | 3076 | { |
| 3077 | if (it->dpvec == NULL) | 3077 | if (it->dpvec == NULL) |
| 3078 | get_next_display_element (it); | 3078 | get_next_display_element (it); |
| 3079 | xassert (it->dpvec && it->current.dpvec_index == 0); | 3079 | eassert (it->dpvec && it->current.dpvec_index == 0); |
| 3080 | it->current.dpvec_index = pos->dpvec_index; | 3080 | it->current.dpvec_index = pos->dpvec_index; |
| 3081 | } | 3081 | } |
| 3082 | 3082 | ||
| @@ -3342,7 +3342,7 @@ compute_stop_pos (struct it *it) | |||
| 3342 | stoppos, it->string); | 3342 | stoppos, it->string); |
| 3343 | } | 3343 | } |
| 3344 | 3344 | ||
| 3345 | xassert (STRINGP (it->string) | 3345 | eassert (STRINGP (it->string) |
| 3346 | || (it->stop_charpos >= BEGV | 3346 | || (it->stop_charpos >= BEGV |
| 3347 | && it->stop_charpos >= IT_CHARPOS (*it))); | 3347 | && it->stop_charpos >= IT_CHARPOS (*it))); |
| 3348 | } | 3348 | } |
| @@ -3558,7 +3558,7 @@ handle_fontified_prop (struct it *it) | |||
| 3558 | val = Vfontification_functions; | 3558 | val = Vfontification_functions; |
| 3559 | specbind (Qfontification_functions, Qnil); | 3559 | specbind (Qfontification_functions, Qnil); |
| 3560 | 3560 | ||
| 3561 | xassert (it->end_charpos == ZV); | 3561 | eassert (it->end_charpos == ZV); |
| 3562 | 3562 | ||
| 3563 | if (!CONSP (val) || EQ (XCAR (val), Qlambda)) | 3563 | if (!CONSP (val) || EQ (XCAR (val), Qlambda)) |
| 3564 | safe_call1 (val, pos); | 3564 | safe_call1 (val, pos); |
| @@ -3790,7 +3790,7 @@ underlying_face_id (struct it *it) | |||
| 3790 | { | 3790 | { |
| 3791 | int face_id = it->base_face_id, i; | 3791 | int face_id = it->base_face_id, i; |
| 3792 | 3792 | ||
| 3793 | xassert (STRINGP (it->string)); | 3793 | eassert (STRINGP (it->string)); |
| 3794 | 3794 | ||
| 3795 | for (i = it->sp - 1; i >= 0; --i) | 3795 | for (i = it->sp - 1; i >= 0; --i) |
| 3796 | if (NILP (it->stack[i].string)) | 3796 | if (NILP (it->stack[i].string)) |
| @@ -3813,7 +3813,7 @@ face_before_or_after_it_pos (struct it *it, int before_p) | |||
| 3813 | struct it it_copy; | 3813 | struct it it_copy; |
| 3814 | void *it_copy_data = NULL; | 3814 | void *it_copy_data = NULL; |
| 3815 | 3815 | ||
| 3816 | xassert (it->s == NULL); | 3816 | eassert (it->s == NULL); |
| 3817 | 3817 | ||
| 3818 | if (STRINGP (it->string)) | 3818 | if (STRINGP (it->string)) |
| 3819 | { | 3819 | { |
| @@ -3879,7 +3879,7 @@ face_before_or_after_it_pos (struct it *it, int before_p) | |||
| 3879 | charpos = it_copy.bidi_it.charpos; | 3879 | charpos = it_copy.bidi_it.charpos; |
| 3880 | } | 3880 | } |
| 3881 | } | 3881 | } |
| 3882 | xassert (0 <= charpos && charpos <= SCHARS (it->string)); | 3882 | eassert (0 <= charpos && charpos <= SCHARS (it->string)); |
| 3883 | 3883 | ||
| 3884 | if (it->current.overlay_string_index >= 0) | 3884 | if (it->current.overlay_string_index >= 0) |
| 3885 | bufpos = IT_CHARPOS (*it); | 3885 | bufpos = IT_CHARPOS (*it); |
| @@ -3979,7 +3979,7 @@ face_before_or_after_it_pos (struct it *it, int before_p) | |||
| 3979 | it_copy.bidi_it.charpos, it_copy.bidi_it.bytepos); | 3979 | it_copy.bidi_it.charpos, it_copy.bidi_it.bytepos); |
| 3980 | } | 3980 | } |
| 3981 | } | 3981 | } |
| 3982 | xassert (BEGV <= CHARPOS (pos) && CHARPOS (pos) <= ZV); | 3982 | eassert (BEGV <= CHARPOS (pos) && CHARPOS (pos) <= ZV); |
| 3983 | 3983 | ||
| 3984 | /* Determine face for CHARSET_ASCII, or unibyte. */ | 3984 | /* Determine face for CHARSET_ASCII, or unibyte. */ |
| 3985 | face_id = face_at_buffer_position (it->w, | 3985 | face_id = face_at_buffer_position (it->w, |
| @@ -5237,7 +5237,7 @@ next_overlay_string (struct it *it) | |||
| 5237 | 5237 | ||
| 5238 | it->ellipsis_p = (it->stack[it->sp - 1].display_ellipsis_p != 0); | 5238 | it->ellipsis_p = (it->stack[it->sp - 1].display_ellipsis_p != 0); |
| 5239 | pop_it (it); | 5239 | pop_it (it); |
| 5240 | xassert (it->sp > 0 | 5240 | eassert (it->sp > 0 |
| 5241 | || (NILP (it->string) | 5241 | || (NILP (it->string) |
| 5242 | && it->method == GET_FROM_BUFFER | 5242 | && it->method == GET_FROM_BUFFER |
| 5243 | && it->stop_charpos >= BEGV | 5243 | && it->stop_charpos >= BEGV |
| @@ -5418,7 +5418,7 @@ load_overlay_strings (struct it *it, ptrdiff_t charpos) | |||
| 5418 | for (ov = current_buffer->overlays_before; ov; ov = ov->next) | 5418 | for (ov = current_buffer->overlays_before; ov; ov = ov->next) |
| 5419 | { | 5419 | { |
| 5420 | XSETMISC (overlay, ov); | 5420 | XSETMISC (overlay, ov); |
| 5421 | xassert (OVERLAYP (overlay)); | 5421 | eassert (OVERLAYP (overlay)); |
| 5422 | start = OVERLAY_POSITION (OVERLAY_START (overlay)); | 5422 | start = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| 5423 | end = OVERLAY_POSITION (OVERLAY_END (overlay)); | 5423 | end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| 5424 | 5424 | ||
| @@ -5458,7 +5458,7 @@ load_overlay_strings (struct it *it, ptrdiff_t charpos) | |||
| 5458 | for (ov = current_buffer->overlays_after; ov; ov = ov->next) | 5458 | for (ov = current_buffer->overlays_after; ov; ov = ov->next) |
| 5459 | { | 5459 | { |
| 5460 | XSETMISC (overlay, ov); | 5460 | XSETMISC (overlay, ov); |
| 5461 | xassert (OVERLAYP (overlay)); | 5461 | eassert (OVERLAYP (overlay)); |
| 5462 | start = OVERLAY_POSITION (OVERLAY_START (overlay)); | 5462 | start = OVERLAY_POSITION (OVERLAY_START (overlay)); |
| 5463 | end = OVERLAY_POSITION (OVERLAY_END (overlay)); | 5463 | end = OVERLAY_POSITION (OVERLAY_END (overlay)); |
| 5464 | 5464 | ||
| @@ -5546,11 +5546,11 @@ get_overlay_strings_1 (struct it *it, ptrdiff_t charpos, int compute_stop_p) | |||
| 5546 | strings. */ | 5546 | strings. */ |
| 5547 | if (compute_stop_p) | 5547 | if (compute_stop_p) |
| 5548 | compute_stop_pos (it); | 5548 | compute_stop_pos (it); |
| 5549 | xassert (it->face_id >= 0); | 5549 | eassert (it->face_id >= 0); |
| 5550 | 5550 | ||
| 5551 | /* Save IT's settings. They are restored after all overlay | 5551 | /* Save IT's settings. They are restored after all overlay |
| 5552 | strings have been processed. */ | 5552 | strings have been processed. */ |
| 5553 | xassert (!compute_stop_p || it->sp == 0); | 5553 | eassert (!compute_stop_p || it->sp == 0); |
| 5554 | 5554 | ||
| 5555 | /* When called from handle_stop, there might be an empty display | 5555 | /* When called from handle_stop, there might be an empty display |
| 5556 | string loaded. In that case, don't bother saving it. But | 5556 | string loaded. In that case, don't bother saving it. But |
| @@ -5570,7 +5570,7 @@ get_overlay_strings_1 (struct it *it, ptrdiff_t charpos, int compute_stop_p) | |||
| 5570 | it->string = it->overlay_strings[0]; | 5570 | it->string = it->overlay_strings[0]; |
| 5571 | it->from_overlay = Qnil; | 5571 | it->from_overlay = Qnil; |
| 5572 | it->stop_charpos = 0; | 5572 | it->stop_charpos = 0; |
| 5573 | xassert (STRINGP (it->string)); | 5573 | eassert (STRINGP (it->string)); |
| 5574 | it->end_charpos = SCHARS (it->string); | 5574 | it->end_charpos = SCHARS (it->string); |
| 5575 | it->prev_stop = 0; | 5575 | it->prev_stop = 0; |
| 5576 | it->base_level_stop = 0; | 5576 | it->base_level_stop = 0; |
| @@ -5636,14 +5636,14 @@ push_it (struct it *it, struct text_pos *position) | |||
| 5636 | { | 5636 | { |
| 5637 | struct iterator_stack_entry *p; | 5637 | struct iterator_stack_entry *p; |
| 5638 | 5638 | ||
| 5639 | xassert (it->sp < IT_STACK_SIZE); | 5639 | eassert (it->sp < IT_STACK_SIZE); |
| 5640 | p = it->stack + it->sp; | 5640 | p = it->stack + it->sp; |
| 5641 | 5641 | ||
| 5642 | p->stop_charpos = it->stop_charpos; | 5642 | p->stop_charpos = it->stop_charpos; |
| 5643 | p->prev_stop = it->prev_stop; | 5643 | p->prev_stop = it->prev_stop; |
| 5644 | p->base_level_stop = it->base_level_stop; | 5644 | p->base_level_stop = it->base_level_stop; |
| 5645 | p->cmp_it = it->cmp_it; | 5645 | p->cmp_it = it->cmp_it; |
| 5646 | xassert (it->face_id >= 0); | 5646 | eassert (it->face_id >= 0); |
| 5647 | p->face_id = it->face_id; | 5647 | p->face_id = it->face_id; |
| 5648 | p->string = it->string; | 5648 | p->string = it->string; |
| 5649 | p->method = it->method; | 5649 | p->method = it->method; |
| @@ -5690,7 +5690,7 @@ iterate_out_of_display_property (struct it *it) | |||
| 5690 | ptrdiff_t eob = (buffer_p ? ZV : it->end_charpos); | 5690 | ptrdiff_t eob = (buffer_p ? ZV : it->end_charpos); |
| 5691 | ptrdiff_t bob = (buffer_p ? BEGV : 0); | 5691 | ptrdiff_t bob = (buffer_p ? BEGV : 0); |
| 5692 | 5692 | ||
| 5693 | xassert (eob >= CHARPOS (it->position) && CHARPOS (it->position) >= bob); | 5693 | eassert (eob >= CHARPOS (it->position) && CHARPOS (it->position) >= bob); |
| 5694 | 5694 | ||
| 5695 | /* Maybe initialize paragraph direction. If we are at the beginning | 5695 | /* Maybe initialize paragraph direction. If we are at the beginning |
| 5696 | of a new paragraph, next_element_from_buffer may not have a | 5696 | of a new paragraph, next_element_from_buffer may not have a |
| @@ -5729,7 +5729,7 @@ pop_it (struct it *it) | |||
| 5729 | struct iterator_stack_entry *p; | 5729 | struct iterator_stack_entry *p; |
| 5730 | int from_display_prop = it->from_disp_prop_p; | 5730 | int from_display_prop = it->from_disp_prop_p; |
| 5731 | 5731 | ||
| 5732 | xassert (it->sp > 0); | 5732 | eassert (it->sp > 0); |
| 5733 | --it->sp; | 5733 | --it->sp; |
| 5734 | p = it->stack + it->sp; | 5734 | p = it->stack + it->sp; |
| 5735 | it->stop_charpos = p->stop_charpos; | 5735 | it->stop_charpos = p->stop_charpos; |
| @@ -5799,7 +5799,7 @@ pop_it (struct it *it) | |||
| 5799 | && (it->method == GET_FROM_BUFFER || it->method == GET_FROM_STRING)) | 5799 | && (it->method == GET_FROM_BUFFER || it->method == GET_FROM_STRING)) |
| 5800 | iterate_out_of_display_property (it); | 5800 | iterate_out_of_display_property (it); |
| 5801 | 5801 | ||
| 5802 | xassert ((BUFFERP (it->object) | 5802 | eassert ((BUFFERP (it->object) |
| 5803 | && IT_CHARPOS (*it) == it->bidi_it.charpos | 5803 | && IT_CHARPOS (*it) == it->bidi_it.charpos |
| 5804 | && IT_BYTEPOS (*it) == it->bidi_it.bytepos) | 5804 | && IT_BYTEPOS (*it) == it->bidi_it.bytepos) |
| 5805 | || (STRINGP (it->object) | 5805 | || (STRINGP (it->object) |
| @@ -5896,7 +5896,7 @@ forward_to_next_line_start (struct it *it, int *skipped_p, | |||
| 5896 | ptrdiff_t limit = find_next_newline_no_quit (start, 1); | 5896 | ptrdiff_t limit = find_next_newline_no_quit (start, 1); |
| 5897 | Lisp_Object pos; | 5897 | Lisp_Object pos; |
| 5898 | 5898 | ||
| 5899 | xassert (!STRINGP (it->string)); | 5899 | eassert (!STRINGP (it->string)); |
| 5900 | 5900 | ||
| 5901 | /* If there isn't any `display' property in sight, and no | 5901 | /* If there isn't any `display' property in sight, and no |
| 5902 | overlays, we can just use the position of the newline in | 5902 | overlays, we can just use the position of the newline in |
| @@ -6035,8 +6035,8 @@ back_to_previous_visible_line_start (struct it *it) | |||
| 6035 | 6035 | ||
| 6036 | it->continuation_lines_width = 0; | 6036 | it->continuation_lines_width = 0; |
| 6037 | 6037 | ||
| 6038 | xassert (IT_CHARPOS (*it) >= BEGV); | 6038 | eassert (IT_CHARPOS (*it) >= BEGV); |
| 6039 | xassert (IT_CHARPOS (*it) == BEGV | 6039 | eassert (IT_CHARPOS (*it) == BEGV |
| 6040 | || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); | 6040 | || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); |
| 6041 | CHECK_IT (it); | 6041 | CHECK_IT (it); |
| 6042 | } | 6042 | } |
| @@ -6078,7 +6078,7 @@ reseat_at_next_visible_line_start (struct it *it, int on_newline_p) | |||
| 6078 | && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it), | 6078 | && indented_beyond_p (IT_CHARPOS (*it), IT_BYTEPOS (*it), |
| 6079 | it->selective)) | 6079 | it->selective)) |
| 6080 | { | 6080 | { |
| 6081 | xassert (IT_BYTEPOS (*it) == BEGV | 6081 | eassert (IT_BYTEPOS (*it) == BEGV |
| 6082 | || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); | 6082 | || FETCH_BYTE (IT_BYTEPOS (*it) - 1) == '\n'); |
| 6083 | newline_found_p = | 6083 | newline_found_p = |
| 6084 | forward_to_next_line_start (it, &skipped_p, &bidi_it_prev); | 6084 | forward_to_next_line_start (it, &skipped_p, &bidi_it_prev); |
| @@ -6192,10 +6192,10 @@ static void | |||
| 6192 | reseat_1 (struct it *it, struct text_pos pos, int set_stop_p) | 6192 | reseat_1 (struct it *it, struct text_pos pos, int set_stop_p) |
| 6193 | { | 6193 | { |
| 6194 | /* Don't call this function when scanning a C string. */ | 6194 | /* Don't call this function when scanning a C string. */ |
| 6195 | xassert (it->s == NULL); | 6195 | eassert (it->s == NULL); |
| 6196 | 6196 | ||
| 6197 | /* POS must be a reasonable value. */ | 6197 | /* POS must be a reasonable value. */ |
| 6198 | xassert (CHARPOS (pos) >= BEGV && CHARPOS (pos) <= ZV); | 6198 | eassert (CHARPOS (pos) >= BEGV && CHARPOS (pos) <= ZV); |
| 6199 | 6199 | ||
| 6200 | it->current.pos = it->position = pos; | 6200 | it->current.pos = it->position = pos; |
| 6201 | it->end_charpos = ZV; | 6201 | it->end_charpos = ZV; |
| @@ -6268,7 +6268,7 @@ reseat_to_string (struct it *it, const char *s, Lisp_Object string, | |||
| 6268 | memset (&it->current, 0, sizeof it->current); | 6268 | memset (&it->current, 0, sizeof it->current); |
| 6269 | it->current.overlay_string_index = -1; | 6269 | it->current.overlay_string_index = -1; |
| 6270 | it->current.dpvec_index = -1; | 6270 | it->current.dpvec_index = -1; |
| 6271 | xassert (charpos >= 0); | 6271 | eassert (charpos >= 0); |
| 6272 | 6272 | ||
| 6273 | /* If STRING is specified, use its multibyteness, otherwise use the | 6273 | /* If STRING is specified, use its multibyteness, otherwise use the |
| 6274 | setting of MULTIBYTE, if specified. */ | 6274 | setting of MULTIBYTE, if specified. */ |
| @@ -6285,7 +6285,7 @@ reseat_to_string (struct it *it, const char *s, Lisp_Object string, | |||
| 6285 | 6285 | ||
| 6286 | if (s == NULL) | 6286 | if (s == NULL) |
| 6287 | { | 6287 | { |
| 6288 | xassert (STRINGP (string)); | 6288 | eassert (STRINGP (string)); |
| 6289 | it->string = string; | 6289 | it->string = string; |
| 6290 | it->s = NULL; | 6290 | it->s = NULL; |
| 6291 | it->end_charpos = it->string_nchars = SCHARS (string); | 6291 | it->end_charpos = it->string_nchars = SCHARS (string); |
| @@ -6528,7 +6528,7 @@ get_next_display_element (struct it *it) | |||
| 6528 | 6528 | ||
| 6529 | if (! it->multibyte_p && ! ASCII_CHAR_P (c)) | 6529 | if (! it->multibyte_p && ! ASCII_CHAR_P (c)) |
| 6530 | { | 6530 | { |
| 6531 | xassert (SINGLE_BYTE_CHAR_P (c)); | 6531 | eassert (SINGLE_BYTE_CHAR_P (c)); |
| 6532 | if (unibyte_display_via_language_environment) | 6532 | if (unibyte_display_via_language_environment) |
| 6533 | { | 6533 | { |
| 6534 | c = DECODE_CHAR (unibyte, c); | 6534 | c = DECODE_CHAR (unibyte, c); |
| @@ -6981,7 +6981,7 @@ set_iterator_to_next (struct it *it, int reseat_p) | |||
| 6981 | } | 6981 | } |
| 6982 | else | 6982 | else |
| 6983 | { | 6983 | { |
| 6984 | xassert (it->len != 0); | 6984 | eassert (it->len != 0); |
| 6985 | 6985 | ||
| 6986 | if (!it->bidi_p) | 6986 | if (!it->bidi_p) |
| 6987 | { | 6987 | { |
| @@ -7009,7 +7009,7 @@ set_iterator_to_next (struct it *it, int reseat_p) | |||
| 7009 | IT_BYTEPOS (*it), stop, Qnil); | 7009 | IT_BYTEPOS (*it), stop, Qnil); |
| 7010 | } | 7010 | } |
| 7011 | } | 7011 | } |
| 7012 | xassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it))); | 7012 | eassert (IT_BYTEPOS (*it) == CHAR_TO_BYTE (IT_CHARPOS (*it))); |
| 7013 | } | 7013 | } |
| 7014 | break; | 7014 | break; |
| 7015 | 7015 | ||
| @@ -7081,7 +7081,7 @@ set_iterator_to_next (struct it *it, int reseat_p) | |||
| 7081 | 7081 | ||
| 7082 | case GET_FROM_STRING: | 7082 | case GET_FROM_STRING: |
| 7083 | /* Current display element is a character from a Lisp string. */ | 7083 | /* Current display element is a character from a Lisp string. */ |
| 7084 | xassert (it->s == NULL && STRINGP (it->string)); | 7084 | eassert (it->s == NULL && STRINGP (it->string)); |
| 7085 | /* Don't advance past string end. These conditions are true | 7085 | /* Don't advance past string end. These conditions are true |
| 7086 | when set_iterator_to_next is called at the end of | 7086 | when set_iterator_to_next is called at the end of |
| 7087 | get_next_display_element, in which case the Lisp string is | 7087 | get_next_display_element, in which case the Lisp string is |
| @@ -7230,7 +7230,7 @@ set_iterator_to_next (struct it *it, int reseat_p) | |||
| 7230 | /* The position etc with which we have to proceed are on | 7230 | /* The position etc with which we have to proceed are on |
| 7231 | the stack. The position may be at the end of a string, | 7231 | the stack. The position may be at the end of a string, |
| 7232 | if the `display' property takes up the whole string. */ | 7232 | if the `display' property takes up the whole string. */ |
| 7233 | xassert (it->sp > 0); | 7233 | eassert (it->sp > 0); |
| 7234 | pop_it (it); | 7234 | pop_it (it); |
| 7235 | if (it->method == GET_FROM_STRING) | 7235 | if (it->method == GET_FROM_STRING) |
| 7236 | goto consider_string_end; | 7236 | goto consider_string_end; |
| @@ -7241,7 +7241,7 @@ set_iterator_to_next (struct it *it, int reseat_p) | |||
| 7241 | abort (); | 7241 | abort (); |
| 7242 | } | 7242 | } |
| 7243 | 7243 | ||
| 7244 | xassert (it->method != GET_FROM_STRING | 7244 | eassert (it->method != GET_FROM_STRING |
| 7245 | || (STRINGP (it->string) | 7245 | || (STRINGP (it->string) |
| 7246 | && IT_STRING_CHARPOS (*it) >= 0)); | 7246 | && IT_STRING_CHARPOS (*it) >= 0)); |
| 7247 | } | 7247 | } |
| @@ -7261,7 +7261,7 @@ next_element_from_display_vector (struct it *it) | |||
| 7261 | Lisp_Object gc; | 7261 | Lisp_Object gc; |
| 7262 | 7262 | ||
| 7263 | /* Precondition. */ | 7263 | /* Precondition. */ |
| 7264 | xassert (it->dpvec && it->current.dpvec_index >= 0); | 7264 | eassert (it->dpvec && it->current.dpvec_index >= 0); |
| 7265 | 7265 | ||
| 7266 | it->face_id = it->saved_face_id; | 7266 | it->face_id = it->saved_face_id; |
| 7267 | 7267 | ||
| @@ -7379,7 +7379,7 @@ get_visually_first_element (struct it *it) | |||
| 7379 | 7379 | ||
| 7380 | if (STRINGP (it->string)) | 7380 | if (STRINGP (it->string)) |
| 7381 | { | 7381 | { |
| 7382 | xassert (!it->s); | 7382 | eassert (!it->s); |
| 7383 | stop = SCHARS (it->string); | 7383 | stop = SCHARS (it->string); |
| 7384 | if (stop > it->end_charpos) | 7384 | if (stop > it->end_charpos) |
| 7385 | stop = it->end_charpos; | 7385 | stop = it->end_charpos; |
| @@ -7409,9 +7409,9 @@ next_element_from_string (struct it *it) | |||
| 7409 | { | 7409 | { |
| 7410 | struct text_pos position; | 7410 | struct text_pos position; |
| 7411 | 7411 | ||
| 7412 | xassert (STRINGP (it->string)); | 7412 | eassert (STRINGP (it->string)); |
| 7413 | xassert (!it->bidi_p || EQ (it->string, it->bidi_it.string.lstring)); | 7413 | eassert (!it->bidi_p || EQ (it->string, it->bidi_it.string.lstring)); |
| 7414 | xassert (IT_STRING_CHARPOS (*it) >= 0); | 7414 | eassert (IT_STRING_CHARPOS (*it) >= 0); |
| 7415 | position = it->current.string_pos; | 7415 | position = it->current.string_pos; |
| 7416 | 7416 | ||
| 7417 | /* With bidi reordering, the character to display might not be the | 7417 | /* With bidi reordering, the character to display might not be the |
| @@ -7575,8 +7575,8 @@ next_element_from_c_string (struct it *it) | |||
| 7575 | { | 7575 | { |
| 7576 | int success_p = 1; | 7576 | int success_p = 1; |
| 7577 | 7577 | ||
| 7578 | xassert (it->s); | 7578 | eassert (it->s); |
| 7579 | xassert (!it->bidi_p || it->s == it->bidi_it.string.s); | 7579 | eassert (!it->bidi_p || it->s == it->bidi_it.string.s); |
| 7580 | it->what = IT_CHARACTER; | 7580 | it->what = IT_CHARACTER; |
| 7581 | BYTEPOS (it->position) = CHARPOS (it->position) = 0; | 7581 | BYTEPOS (it->position) = CHARPOS (it->position) = 0; |
| 7582 | it->object = Qnil; | 7582 | it->object = Qnil; |
| @@ -7681,8 +7681,8 @@ compute_stop_pos_backwards (struct it *it) | |||
| 7681 | ptrdiff_t save_stop_pos = it->stop_charpos; | 7681 | ptrdiff_t save_stop_pos = it->stop_charpos; |
| 7682 | ptrdiff_t save_end_pos = it->end_charpos; | 7682 | ptrdiff_t save_end_pos = it->end_charpos; |
| 7683 | 7683 | ||
| 7684 | xassert (NILP (it->string) && !it->s); | 7684 | eassert (NILP (it->string) && !it->s); |
| 7685 | xassert (it->bidi_p); | 7685 | eassert (it->bidi_p); |
| 7686 | it->bidi_p = 0; | 7686 | it->bidi_p = 0; |
| 7687 | do | 7687 | do |
| 7688 | { | 7688 | { |
| @@ -7727,7 +7727,7 @@ handle_stop_backwards (struct it *it, ptrdiff_t charpos) | |||
| 7727 | ptrdiff_t next_stop; | 7727 | ptrdiff_t next_stop; |
| 7728 | 7728 | ||
| 7729 | /* Scan in strict logical order. */ | 7729 | /* Scan in strict logical order. */ |
| 7730 | xassert (it->bidi_p); | 7730 | eassert (it->bidi_p); |
| 7731 | it->bidi_p = 0; | 7731 | it->bidi_p = 0; |
| 7732 | do | 7732 | do |
| 7733 | { | 7733 | { |
| @@ -7766,9 +7766,9 @@ next_element_from_buffer (struct it *it) | |||
| 7766 | { | 7766 | { |
| 7767 | int success_p = 1; | 7767 | int success_p = 1; |
| 7768 | 7768 | ||
| 7769 | xassert (IT_CHARPOS (*it) >= BEGV); | 7769 | eassert (IT_CHARPOS (*it) >= BEGV); |
| 7770 | xassert (NILP (it->string) && !it->s); | 7770 | eassert (NILP (it->string) && !it->s); |
| 7771 | xassert (!it->bidi_p | 7771 | eassert (!it->bidi_p |
| 7772 | || (EQ (it->bidi_it.string.lstring, Qnil) | 7772 | || (EQ (it->bidi_it.string.lstring, Qnil) |
| 7773 | && it->bidi_it.string.s == NULL)); | 7773 | && it->bidi_it.string.s == NULL)); |
| 7774 | 7774 | ||
| @@ -7927,7 +7927,7 @@ next_element_from_buffer (struct it *it) | |||
| 7927 | } | 7927 | } |
| 7928 | 7928 | ||
| 7929 | /* Value is zero if end of buffer reached. */ | 7929 | /* Value is zero if end of buffer reached. */ |
| 7930 | xassert (!success_p || it->what != IT_CHARACTER || it->len > 0); | 7930 | eassert (!success_p || it->what != IT_CHARACTER || it->len > 0); |
| 7931 | return success_p; | 7931 | return success_p; |
| 7932 | } | 7932 | } |
| 7933 | 7933 | ||
| @@ -7941,7 +7941,7 @@ run_redisplay_end_trigger_hook (struct it *it) | |||
| 7941 | 7941 | ||
| 7942 | /* IT->glyph_row should be non-null, i.e. we should be actually | 7942 | /* IT->glyph_row should be non-null, i.e. we should be actually |
| 7943 | displaying something, or otherwise we should not run the hook. */ | 7943 | displaying something, or otherwise we should not run the hook. */ |
| 7944 | xassert (it->glyph_row); | 7944 | eassert (it->glyph_row); |
| 7945 | 7945 | ||
| 7946 | /* Set up hook arguments. */ | 7946 | /* Set up hook arguments. */ |
| 7947 | args[0] = Qredisplay_end_trigger_functions; | 7947 | args[0] = Qredisplay_end_trigger_functions; |
| @@ -8434,7 +8434,7 @@ move_it_in_display_line_to (struct it *it, | |||
| 8434 | necessary here because of lines consisting of a line end, | 8434 | necessary here because of lines consisting of a line end, |
| 8435 | only. The line end will not produce any glyphs and we | 8435 | only. The line end will not produce any glyphs and we |
| 8436 | would never get MOVE_X_REACHED. */ | 8436 | would never get MOVE_X_REACHED. */ |
| 8437 | xassert (it->nglyphs == 0); | 8437 | eassert (it->nglyphs == 0); |
| 8438 | result = MOVE_X_REACHED; | 8438 | result = MOVE_X_REACHED; |
| 8439 | break; | 8439 | break; |
| 8440 | } | 8440 | } |
| @@ -8884,7 +8884,7 @@ move_it_vertically_backward (struct it *it, int dy) | |||
| 8884 | ptrdiff_t start_pos; | 8884 | ptrdiff_t start_pos; |
| 8885 | 8885 | ||
| 8886 | move_further_back: | 8886 | move_further_back: |
| 8887 | xassert (dy >= 0); | 8887 | eassert (dy >= 0); |
| 8888 | 8888 | ||
| 8889 | start_pos = IT_CHARPOS (*it); | 8889 | start_pos = IT_CHARPOS (*it); |
| 8890 | 8890 | ||
| @@ -8927,11 +8927,11 @@ move_it_vertically_backward (struct it *it, int dy) | |||
| 8927 | || (it2.method == GET_FROM_STRING | 8927 | || (it2.method == GET_FROM_STRING |
| 8928 | && IT_CHARPOS (it2) == start_pos | 8928 | && IT_CHARPOS (it2) == start_pos |
| 8929 | && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n'))); | 8929 | && SREF (it2.string, IT_STRING_BYTEPOS (it2) - 1) == '\n'))); |
| 8930 | xassert (IT_CHARPOS (*it) >= BEGV); | 8930 | eassert (IT_CHARPOS (*it) >= BEGV); |
| 8931 | SAVE_IT (it3, it2, it3data); | 8931 | SAVE_IT (it3, it2, it3data); |
| 8932 | 8932 | ||
| 8933 | move_it_to (&it2, start_pos, -1, -1, -1, MOVE_TO_POS); | 8933 | move_it_to (&it2, start_pos, -1, -1, -1, MOVE_TO_POS); |
| 8934 | xassert (IT_CHARPOS (*it) >= BEGV); | 8934 | eassert (IT_CHARPOS (*it) >= BEGV); |
| 8935 | /* H is the actual vertical distance from the position in *IT | 8935 | /* H is the actual vertical distance from the position in *IT |
| 8936 | and the starting position. */ | 8936 | and the starting position. */ |
| 8937 | h = it2.current_y - it->current_y; | 8937 | h = it2.current_y - it->current_y; |
| @@ -9942,13 +9942,13 @@ with_echo_area_buffer (struct window *w, int which, | |||
| 9942 | if (clear_buffer_p && Z > BEG) | 9942 | if (clear_buffer_p && Z > BEG) |
| 9943 | del_range (BEG, Z); | 9943 | del_range (BEG, Z); |
| 9944 | 9944 | ||
| 9945 | xassert (BEGV >= BEG); | 9945 | eassert (BEGV >= BEG); |
| 9946 | xassert (ZV <= Z && ZV >= BEGV); | 9946 | eassert (ZV <= Z && ZV >= BEGV); |
| 9947 | 9947 | ||
| 9948 | rc = fn (a1, a2, a3, a4); | 9948 | rc = fn (a1, a2, a3, a4); |
| 9949 | 9949 | ||
| 9950 | xassert (BEGV >= BEG); | 9950 | eassert (BEGV >= BEG); |
| 9951 | xassert (ZV <= Z && ZV >= BEGV); | 9951 | eassert (ZV <= Z && ZV >= BEGV); |
| 9952 | 9952 | ||
| 9953 | unbind_to (count, Qnil); | 9953 | unbind_to (count, Qnil); |
| 9954 | return rc; | 9954 | return rc; |
| @@ -9990,7 +9990,7 @@ with_echo_area_buffer_unwind_data (struct window *w) | |||
| 9990 | ASET (vector, i, Qnil); | 9990 | ASET (vector, i, Qnil); |
| 9991 | } | 9991 | } |
| 9992 | 9992 | ||
| 9993 | xassert (i == ASIZE (vector)); | 9993 | eassert (i == ASIZE (vector)); |
| 9994 | return vector; | 9994 | return vector; |
| 9995 | } | 9995 | } |
| 9996 | 9996 | ||
| @@ -10229,7 +10229,7 @@ resize_mini_window (struct window *w, int exact_p) | |||
| 10229 | struct frame *f = XFRAME (w->frame); | 10229 | struct frame *f = XFRAME (w->frame); |
| 10230 | int window_height_changed_p = 0; | 10230 | int window_height_changed_p = 0; |
| 10231 | 10231 | ||
| 10232 | xassert (MINI_WINDOW_P (w)); | 10232 | eassert (MINI_WINDOW_P (w)); |
| 10233 | 10233 | ||
| 10234 | /* By default, start display at the beginning. */ | 10234 | /* By default, start display at the beginning. */ |
| 10235 | set_marker_both (w->start, w->buffer, | 10235 | set_marker_both (w->start, w->buffer, |
| @@ -10420,7 +10420,7 @@ restore_message (void) | |||
| 10420 | { | 10420 | { |
| 10421 | Lisp_Object msg; | 10421 | Lisp_Object msg; |
| 10422 | 10422 | ||
| 10423 | xassert (CONSP (Vmessage_stack)); | 10423 | eassert (CONSP (Vmessage_stack)); |
| 10424 | msg = XCAR (Vmessage_stack); | 10424 | msg = XCAR (Vmessage_stack); |
| 10425 | if (STRINGP (msg)) | 10425 | if (STRINGP (msg)) |
| 10426 | message3_nolog (msg, SBYTES (msg), STRING_MULTIBYTE (msg)); | 10426 | message3_nolog (msg, SBYTES (msg), STRING_MULTIBYTE (msg)); |
| @@ -10443,7 +10443,7 @@ pop_message_unwind (Lisp_Object dummy) | |||
| 10443 | static void | 10443 | static void |
| 10444 | pop_message (void) | 10444 | pop_message (void) |
| 10445 | { | 10445 | { |
| 10446 | xassert (CONSP (Vmessage_stack)); | 10446 | eassert (CONSP (Vmessage_stack)); |
| 10447 | Vmessage_stack = XCDR (Vmessage_stack); | 10447 | Vmessage_stack = XCDR (Vmessage_stack); |
| 10448 | } | 10448 | } |
| 10449 | 10449 | ||
| @@ -11522,7 +11522,7 @@ build_desired_tool_bar_string (struct frame *f) | |||
| 11522 | ? TOOL_BAR_IMAGE_DISABLED_SELECTED | 11522 | ? TOOL_BAR_IMAGE_DISABLED_SELECTED |
| 11523 | : TOOL_BAR_IMAGE_DISABLED_DESELECTED); | 11523 | : TOOL_BAR_IMAGE_DISABLED_DESELECTED); |
| 11524 | 11524 | ||
| 11525 | xassert (ASIZE (image) >= idx); | 11525 | eassert (ASIZE (image) >= idx); |
| 11526 | image = AREF (image, idx); | 11526 | image = AREF (image, idx); |
| 11527 | } | 11527 | } |
| 11528 | else | 11528 | else |
| @@ -12808,7 +12808,7 @@ select_frame_for_redisplay (Lisp_Object frame) | |||
| 12808 | Lisp_Object old = selected_frame; | 12808 | Lisp_Object old = selected_frame; |
| 12809 | struct Lisp_Symbol *sym; | 12809 | struct Lisp_Symbol *sym; |
| 12810 | 12810 | ||
| 12811 | xassert (FRAMEP (frame) && FRAME_LIVE_P (XFRAME (frame))); | 12811 | eassert (FRAMEP (frame) && FRAME_LIVE_P (XFRAME (frame))); |
| 12812 | 12812 | ||
| 12813 | selected_frame = frame; | 12813 | selected_frame = frame; |
| 12814 | 12814 | ||
| @@ -13300,8 +13300,8 @@ redisplay_internal (void) | |||
| 13300 | && (row = MATRIX_ROW (w->current_matrix, this_line_vpos), | 13300 | && (row = MATRIX_ROW (w->current_matrix, this_line_vpos), |
| 13301 | row->enabled_p)) | 13301 | row->enabled_p)) |
| 13302 | { | 13302 | { |
| 13303 | xassert (this_line_vpos == it.vpos); | 13303 | eassert (this_line_vpos == it.vpos); |
| 13304 | xassert (this_line_y == it.current_y); | 13304 | eassert (this_line_y == it.current_y); |
| 13305 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); | 13305 | set_cursor_from_row (w, row, w->current_matrix, 0, 0, 0, 0); |
| 13306 | #if GLYPH_DEBUG | 13306 | #if GLYPH_DEBUG |
| 13307 | *w->desired_matrix->method = 0; | 13307 | *w->desired_matrix->method = 0; |
| @@ -13869,7 +13869,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row, | |||
| 13869 | /* Don't even try doing anything if called for a mode-line or | 13869 | /* Don't even try doing anything if called for a mode-line or |
| 13870 | header-line row, since the rest of the code isn't prepared to | 13870 | header-line row, since the rest of the code isn't prepared to |
| 13871 | deal with such calamities. */ | 13871 | deal with such calamities. */ |
| 13872 | xassert (!row->mode_line_p); | 13872 | eassert (!row->mode_line_p); |
| 13873 | if (row->mode_line_p) | 13873 | if (row->mode_line_p) |
| 13874 | return 0; | 13874 | return 0; |
| 13875 | 13875 | ||
| @@ -15017,7 +15017,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 15017 | while (MATRIX_ROW_END_CHARPOS (row) < PT | 15017 | while (MATRIX_ROW_END_CHARPOS (row) < PT |
| 15018 | && MATRIX_ROW_BOTTOM_Y (row) < last_y) | 15018 | && MATRIX_ROW_BOTTOM_Y (row) < last_y) |
| 15019 | { | 15019 | { |
| 15020 | xassert (row->enabled_p); | 15020 | eassert (row->enabled_p); |
| 15021 | ++row; | 15021 | ++row; |
| 15022 | } | 15022 | } |
| 15023 | 15023 | ||
| @@ -15060,7 +15060,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 15060 | && (row->y > top_scroll_margin | 15060 | && (row->y > top_scroll_margin |
| 15061 | || CHARPOS (startp) == BEGV)) | 15061 | || CHARPOS (startp) == BEGV)) |
| 15062 | { | 15062 | { |
| 15063 | xassert (row->enabled_p); | 15063 | eassert (row->enabled_p); |
| 15064 | --row; | 15064 | --row; |
| 15065 | } | 15065 | } |
| 15066 | 15066 | ||
| @@ -15130,7 +15130,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste | |||
| 15130 | rc = CURSOR_MOVEMENT_MUST_SCROLL; | 15130 | rc = CURSOR_MOVEMENT_MUST_SCROLL; |
| 15131 | break; | 15131 | break; |
| 15132 | } | 15132 | } |
| 15133 | xassert (row->enabled_p); | 15133 | eassert (row->enabled_p); |
| 15134 | } | 15134 | } |
| 15135 | } | 15135 | } |
| 15136 | if (must_scroll) | 15136 | if (must_scroll) |
| @@ -15331,7 +15331,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15331 | opoint = lpoint; | 15331 | opoint = lpoint; |
| 15332 | 15332 | ||
| 15333 | /* W must be a leaf window here. */ | 15333 | /* W must be a leaf window here. */ |
| 15334 | xassert (!NILP (w->buffer)); | 15334 | eassert (!NILP (w->buffer)); |
| 15335 | #if GLYPH_DEBUG | 15335 | #if GLYPH_DEBUG |
| 15336 | *w->desired_matrix->method = 0; | 15336 | *w->desired_matrix->method = 0; |
| 15337 | #endif | 15337 | #endif |
| @@ -15911,7 +15911,7 @@ redisplay_window (Lisp_Object window, int just_this_one_p) | |||
| 15911 | } | 15911 | } |
| 15912 | move_it_vertically_backward (&it, centering_position); | 15912 | move_it_vertically_backward (&it, centering_position); |
| 15913 | 15913 | ||
| 15914 | xassert (IT_CHARPOS (it) >= BEGV); | 15914 | eassert (IT_CHARPOS (it) >= BEGV); |
| 15915 | 15915 | ||
| 15916 | /* The function move_it_vertically_backward may move over more | 15916 | /* The function move_it_vertically_backward may move over more |
| 15917 | than the specified y-distance. If it->w is small, e.g. a | 15917 | than the specified y-distance. If it->w is small, e.g. a |
| @@ -16260,14 +16260,14 @@ try_window (Lisp_Object window, struct text_pos pos, int flags) | |||
| 16260 | window_end_vpos to its row number. */ | 16260 | window_end_vpos to its row number. */ |
| 16261 | if (last_text_row) | 16261 | if (last_text_row) |
| 16262 | { | 16262 | { |
| 16263 | xassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row)); | 16263 | eassert (MATRIX_ROW_DISPLAYS_TEXT_P (last_text_row)); |
| 16264 | w->window_end_bytepos | 16264 | w->window_end_bytepos |
| 16265 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); | 16265 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); |
| 16266 | w->window_end_pos | 16266 | w->window_end_pos |
| 16267 | = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)); | 16267 | = make_number (Z - MATRIX_ROW_END_CHARPOS (last_text_row)); |
| 16268 | w->window_end_vpos | 16268 | w->window_end_vpos |
| 16269 | = make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)); | 16269 | = make_number (MATRIX_ROW_VPOS (last_text_row, w->desired_matrix)); |
| 16270 | xassert (MATRIX_ROW (w->desired_matrix, XFASTINT (w->window_end_vpos)) | 16270 | eassert (MATRIX_ROW (w->desired_matrix, XFASTINT (w->window_end_vpos)) |
| 16271 | ->displays_text_p); | 16271 | ->displays_text_p); |
| 16272 | } | 16272 | } |
| 16273 | else | 16273 | else |
| @@ -16576,7 +16576,7 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16576 | } | 16576 | } |
| 16577 | 16577 | ||
| 16578 | /* Start displaying at the start of first_row_to_display. */ | 16578 | /* Start displaying at the start of first_row_to_display. */ |
| 16579 | xassert (first_row_to_display->y < yb); | 16579 | eassert (first_row_to_display->y < yb); |
| 16580 | init_to_row_start (&it, w, first_row_to_display); | 16580 | init_to_row_start (&it, w, first_row_to_display); |
| 16581 | 16581 | ||
| 16582 | nrows_scrolled = (MATRIX_ROW_VPOS (first_reusable_row, w->current_matrix) | 16582 | nrows_scrolled = (MATRIX_ROW_VPOS (first_reusable_row, w->current_matrix) |
| @@ -16648,7 +16648,7 @@ try_window_reusing_current_matrix (struct window *w) | |||
| 16648 | } | 16648 | } |
| 16649 | 16649 | ||
| 16650 | /* Scroll the current matrix. */ | 16650 | /* Scroll the current matrix. */ |
| 16651 | xassert (nrows_scrolled > 0); | 16651 | eassert (nrows_scrolled > 0); |
| 16652 | rotate_matrix (w->current_matrix, | 16652 | rotate_matrix (w->current_matrix, |
| 16653 | start_vpos, | 16653 | start_vpos, |
| 16654 | MATRIX_ROW_VPOS (bottom_row, w->current_matrix), | 16654 | MATRIX_ROW_VPOS (bottom_row, w->current_matrix), |
| @@ -16760,7 +16760,7 @@ find_last_row_displaying_text (struct glyph_matrix *matrix, struct it *it, | |||
| 16760 | row = start ? start : MATRIX_FIRST_TEXT_ROW (matrix); | 16760 | row = start ? start : MATRIX_FIRST_TEXT_ROW (matrix); |
| 16761 | while (MATRIX_ROW_DISPLAYS_TEXT_P (row)) | 16761 | while (MATRIX_ROW_DISPLAYS_TEXT_P (row)) |
| 16762 | { | 16762 | { |
| 16763 | xassert (row->enabled_p); | 16763 | eassert (row->enabled_p); |
| 16764 | row_found = row; | 16764 | row_found = row; |
| 16765 | if (MATRIX_ROW_BOTTOM_Y (row) >= it->last_visible_y) | 16765 | if (MATRIX_ROW_BOTTOM_Y (row) >= it->last_visible_y) |
| 16766 | break; | 16766 | break; |
| @@ -16922,9 +16922,9 @@ sync_frame_with_window_matrix_rows (struct window *w) | |||
| 16922 | 16922 | ||
| 16923 | /* Preconditions: W must be a leaf window and full-width. Its frame | 16923 | /* Preconditions: W must be a leaf window and full-width. Its frame |
| 16924 | must have a frame matrix. */ | 16924 | must have a frame matrix. */ |
| 16925 | xassert (NILP (w->hchild) && NILP (w->vchild)); | 16925 | eassert (NILP (w->hchild) && NILP (w->vchild)); |
| 16926 | xassert (WINDOW_FULL_WIDTH_P (w)); | 16926 | eassert (WINDOW_FULL_WIDTH_P (w)); |
| 16927 | xassert (!FRAME_WINDOW_P (f)); | 16927 | eassert (!FRAME_WINDOW_P (f)); |
| 16928 | 16928 | ||
| 16929 | /* If W is a full-width window, glyph pointers in W's current matrix | 16929 | /* If W is a full-width window, glyph pointers in W's current matrix |
| 16930 | have, by definition, to be the same as glyph pointers in the | 16930 | have, by definition, to be the same as glyph pointers in the |
| @@ -17361,7 +17361,7 @@ try_window_id (struct window *w) | |||
| 17361 | it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos); | 17361 | it.glyph_row = MATRIX_ROW (desired_matrix, it.vpos); |
| 17362 | it.current_y = MATRIX_ROW_BOTTOM_Y (last_unchanged_at_beg_row); | 17362 | it.current_y = MATRIX_ROW_BOTTOM_Y (last_unchanged_at_beg_row); |
| 17363 | 17363 | ||
| 17364 | xassert (it.hpos == 0 && it.current_x == 0); | 17364 | eassert (it.hpos == 0 && it.current_x == 0); |
| 17365 | } | 17365 | } |
| 17366 | else | 17366 | else |
| 17367 | { | 17367 | { |
| @@ -17391,7 +17391,7 @@ try_window_id (struct window *w) | |||
| 17391 | stop_pos = 0; | 17391 | stop_pos = 0; |
| 17392 | if (first_unchanged_at_end_row) | 17392 | if (first_unchanged_at_end_row) |
| 17393 | { | 17393 | { |
| 17394 | xassert (last_unchanged_at_beg_row == NULL | 17394 | eassert (last_unchanged_at_beg_row == NULL |
| 17395 | || first_unchanged_at_end_row >= last_unchanged_at_beg_row); | 17395 | || first_unchanged_at_end_row >= last_unchanged_at_beg_row); |
| 17396 | 17396 | ||
| 17397 | /* If this is a continuation line, move forward to the next one | 17397 | /* If this is a continuation line, move forward to the next one |
| @@ -17414,7 +17414,7 @@ try_window_id (struct window *w) | |||
| 17414 | + delta); | 17414 | + delta); |
| 17415 | first_unchanged_at_end_vpos | 17415 | first_unchanged_at_end_vpos |
| 17416 | = MATRIX_ROW_VPOS (first_unchanged_at_end_row, current_matrix); | 17416 | = MATRIX_ROW_VPOS (first_unchanged_at_end_row, current_matrix); |
| 17417 | xassert (stop_pos >= Z - END_UNCHANGED); | 17417 | eassert (stop_pos >= Z - END_UNCHANGED); |
| 17418 | } | 17418 | } |
| 17419 | } | 17419 | } |
| 17420 | else if (last_unchanged_at_beg_row == NULL) | 17420 | else if (last_unchanged_at_beg_row == NULL) |
| @@ -17426,7 +17426,7 @@ try_window_id (struct window *w) | |||
| 17426 | /* Either there is no unchanged row at the end, or the one we have | 17426 | /* Either there is no unchanged row at the end, or the one we have |
| 17427 | now displays text. This is a necessary condition for the window | 17427 | now displays text. This is a necessary condition for the window |
| 17428 | end pos calculation at the end of this function. */ | 17428 | end pos calculation at the end of this function. */ |
| 17429 | xassert (first_unchanged_at_end_row == NULL | 17429 | eassert (first_unchanged_at_end_row == NULL |
| 17430 | || MATRIX_ROW_DISPLAYS_TEXT_P (first_unchanged_at_end_row)); | 17430 | || MATRIX_ROW_DISPLAYS_TEXT_P (first_unchanged_at_end_row)); |
| 17431 | 17431 | ||
| 17432 | debug_last_unchanged_at_beg_vpos | 17432 | debug_last_unchanged_at_beg_vpos |
| @@ -17671,7 +17671,7 @@ try_window_id (struct window *w) | |||
| 17671 | struct glyph_row *last_row = MATRIX_ROW (current_matrix, last_vpos); | 17671 | struct glyph_row *last_row = MATRIX_ROW (current_matrix, last_vpos); |
| 17672 | 17672 | ||
| 17673 | /* If last_row is the window end line, it should display text. */ | 17673 | /* If last_row is the window end line, it should display text. */ |
| 17674 | xassert (last_row->displays_text_p); | 17674 | eassert (last_row->displays_text_p); |
| 17675 | 17675 | ||
| 17676 | /* If window end line was partially visible before, begin | 17676 | /* If window end line was partially visible before, begin |
| 17677 | displaying at that line. Otherwise begin displaying with the | 17677 | displaying at that line. Otherwise begin displaying with the |
| @@ -17718,16 +17718,16 @@ try_window_id (struct window *w) | |||
| 17718 | matrix. Set row to the last row displaying text in current | 17718 | matrix. Set row to the last row displaying text in current |
| 17719 | matrix starting at first_unchanged_at_end_row, after | 17719 | matrix starting at first_unchanged_at_end_row, after |
| 17720 | scrolling. */ | 17720 | scrolling. */ |
| 17721 | xassert (first_unchanged_at_end_row->displays_text_p); | 17721 | eassert (first_unchanged_at_end_row->displays_text_p); |
| 17722 | row = find_last_row_displaying_text (w->current_matrix, &it, | 17722 | row = find_last_row_displaying_text (w->current_matrix, &it, |
| 17723 | first_unchanged_at_end_row); | 17723 | first_unchanged_at_end_row); |
| 17724 | xassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row)); | 17724 | eassert (row && MATRIX_ROW_DISPLAYS_TEXT_P (row)); |
| 17725 | 17725 | ||
| 17726 | w->window_end_pos = make_number (Z - MATRIX_ROW_END_CHARPOS (row)); | 17726 | w->window_end_pos = make_number (Z - MATRIX_ROW_END_CHARPOS (row)); |
| 17727 | w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); | 17727 | w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); |
| 17728 | w->window_end_vpos | 17728 | w->window_end_vpos |
| 17729 | = make_number (MATRIX_ROW_VPOS (row, w->current_matrix)); | 17729 | = make_number (MATRIX_ROW_VPOS (row, w->current_matrix)); |
| 17730 | xassert (w->window_end_bytepos >= 0); | 17730 | eassert (w->window_end_bytepos >= 0); |
| 17731 | IF_DEBUG (debug_method_add (w, "A")); | 17731 | IF_DEBUG (debug_method_add (w, "A")); |
| 17732 | } | 17732 | } |
| 17733 | else if (last_text_row_at_end) | 17733 | else if (last_text_row_at_end) |
| @@ -17738,7 +17738,7 @@ try_window_id (struct window *w) | |||
| 17738 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end); | 17738 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row_at_end); |
| 17739 | w->window_end_vpos | 17739 | w->window_end_vpos |
| 17740 | = make_number (MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix)); | 17740 | = make_number (MATRIX_ROW_VPOS (last_text_row_at_end, desired_matrix)); |
| 17741 | xassert (w->window_end_bytepos >= 0); | 17741 | eassert (w->window_end_bytepos >= 0); |
| 17742 | IF_DEBUG (debug_method_add (w, "B")); | 17742 | IF_DEBUG (debug_method_add (w, "B")); |
| 17743 | } | 17743 | } |
| 17744 | else if (last_text_row) | 17744 | else if (last_text_row) |
| @@ -17752,7 +17752,7 @@ try_window_id (struct window *w) | |||
| 17752 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); | 17752 | = Z_BYTE - MATRIX_ROW_END_BYTEPOS (last_text_row); |
| 17753 | w->window_end_vpos | 17753 | w->window_end_vpos |
| 17754 | = make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix)); | 17754 | = make_number (MATRIX_ROW_VPOS (last_text_row, desired_matrix)); |
| 17755 | xassert (w->window_end_bytepos >= 0); | 17755 | eassert (w->window_end_bytepos >= 0); |
| 17756 | } | 17756 | } |
| 17757 | else if (first_unchanged_at_end_row == NULL | 17757 | else if (first_unchanged_at_end_row == NULL |
| 17758 | && last_text_row == NULL | 17758 | && last_text_row == NULL |
| @@ -17778,11 +17778,11 @@ try_window_id (struct window *w) | |||
| 17778 | row = current_row; | 17778 | row = current_row; |
| 17779 | } | 17779 | } |
| 17780 | 17780 | ||
| 17781 | xassert (row != NULL); | 17781 | eassert (row != NULL); |
| 17782 | w->window_end_vpos = make_number (vpos + 1); | 17782 | w->window_end_vpos = make_number (vpos + 1); |
| 17783 | w->window_end_pos = make_number (Z - MATRIX_ROW_END_CHARPOS (row)); | 17783 | w->window_end_pos = make_number (Z - MATRIX_ROW_END_CHARPOS (row)); |
| 17784 | w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); | 17784 | w->window_end_bytepos = Z_BYTE - MATRIX_ROW_END_BYTEPOS (row); |
| 17785 | xassert (w->window_end_bytepos >= 0); | 17785 | eassert (w->window_end_bytepos >= 0); |
| 17786 | IF_DEBUG (debug_method_add (w, "C")); | 17786 | IF_DEBUG (debug_method_add (w, "C")); |
| 17787 | } | 17787 | } |
| 17788 | else | 17788 | else |
| @@ -18196,7 +18196,7 @@ insert_left_trunc_glyphs (struct it *it) | |||
| 18196 | struct it truncate_it; | 18196 | struct it truncate_it; |
| 18197 | struct glyph *from, *end, *to, *toend; | 18197 | struct glyph *from, *end, *to, *toend; |
| 18198 | 18198 | ||
| 18199 | xassert (!FRAME_WINDOW_P (it->f)); | 18199 | eassert (!FRAME_WINDOW_P (it->f)); |
| 18200 | 18200 | ||
| 18201 | /* Get the truncation glyphs. */ | 18201 | /* Get the truncation glyphs. */ |
| 18202 | truncate_it = *it; | 18202 | truncate_it = *it; |
| @@ -18329,8 +18329,8 @@ compute_line_metrics (struct it *it) | |||
| 18329 | for (i = 0; i < row->used[TEXT_AREA]; ++i) | 18329 | for (i = 0; i < row->used[TEXT_AREA]; ++i) |
| 18330 | row->pixel_width += row->glyphs[TEXT_AREA][i].pixel_width; | 18330 | row->pixel_width += row->glyphs[TEXT_AREA][i].pixel_width; |
| 18331 | 18331 | ||
| 18332 | xassert (row->pixel_width >= 0); | 18332 | eassert (row->pixel_width >= 0); |
| 18333 | xassert (row->ascent >= 0 && row->height > 0); | 18333 | eassert (row->ascent >= 0 && row->height > 0); |
| 18334 | 18334 | ||
| 18335 | row->overlapping_p = (MATRIX_ROW_OVERLAPS_SUCC_P (row) | 18335 | row->overlapping_p = (MATRIX_ROW_OVERLAPS_SUCC_P (row) |
| 18336 | || MATRIX_ROW_OVERLAPS_PRED_P (row)); | 18336 | || MATRIX_ROW_OVERLAPS_PRED_P (row)); |
| @@ -18803,7 +18803,7 @@ push_prefix_prop (struct it *it, Lisp_Object prop) | |||
| 18803 | struct text_pos pos = | 18803 | struct text_pos pos = |
| 18804 | STRINGP (it->string) ? it->current.string_pos : it->current.pos; | 18804 | STRINGP (it->string) ? it->current.string_pos : it->current.pos; |
| 18805 | 18805 | ||
| 18806 | xassert (it->method == GET_FROM_BUFFER | 18806 | eassert (it->method == GET_FROM_BUFFER |
| 18807 | || it->method == GET_FROM_DISPLAY_VECTOR | 18807 | || it->method == GET_FROM_DISPLAY_VECTOR |
| 18808 | || it->method == GET_FROM_STRING); | 18808 | || it->method == GET_FROM_STRING); |
| 18809 | 18809 | ||
| @@ -18930,10 +18930,10 @@ unproduce_glyphs (struct it *it, int n) | |||
| 18930 | { | 18930 | { |
| 18931 | struct glyph *glyph, *end; | 18931 | struct glyph *glyph, *end; |
| 18932 | 18932 | ||
| 18933 | xassert (it->glyph_row); | 18933 | eassert (it->glyph_row); |
| 18934 | xassert (it->glyph_row->reversed_p); | 18934 | eassert (it->glyph_row->reversed_p); |
| 18935 | xassert (it->area == TEXT_AREA); | 18935 | eassert (it->area == TEXT_AREA); |
| 18936 | xassert (n <= it->glyph_row->used[TEXT_AREA]); | 18936 | eassert (n <= it->glyph_row->used[TEXT_AREA]); |
| 18937 | 18937 | ||
| 18938 | if (n > it->glyph_row->used[TEXT_AREA]) | 18938 | if (n > it->glyph_row->used[TEXT_AREA]) |
| 18939 | n = it->glyph_row->used[TEXT_AREA]; | 18939 | n = it->glyph_row->used[TEXT_AREA]; |
| @@ -19122,7 +19122,7 @@ display_line (struct it *it) | |||
| 19122 | ptrdiff_t min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0); | 19122 | ptrdiff_t min_bpos IF_LINT (= 0), max_bpos IF_LINT (= 0); |
| 19123 | 19123 | ||
| 19124 | /* We always start displaying at hpos zero even if hscrolled. */ | 19124 | /* We always start displaying at hpos zero even if hscrolled. */ |
| 19125 | xassert (it->hpos == 0 && it->current_x == 0); | 19125 | eassert (it->hpos == 0 && it->current_x == 0); |
| 19126 | 19126 | ||
| 19127 | if (MATRIX_ROW_VPOS (row, it->w->desired_matrix) | 19127 | if (MATRIX_ROW_VPOS (row, it->w->desired_matrix) |
| 19128 | >= it->w->desired_matrix->nrows) | 19128 | >= it->w->desired_matrix->nrows) |
| @@ -19541,7 +19541,7 @@ display_line (struct it *it) | |||
| 19541 | move_it_in_display_line at the start of this | 19541 | move_it_in_display_line at the start of this |
| 19542 | function, unless the text display area of the | 19542 | function, unless the text display area of the |
| 19543 | window is empty. */ | 19543 | window is empty. */ |
| 19544 | xassert (it->first_visible_x <= it->last_visible_x); | 19544 | eassert (it->first_visible_x <= it->last_visible_x); |
| 19545 | } | 19545 | } |
| 19546 | } | 19546 | } |
| 19547 | /* Even if this display element produced no glyphs at all, | 19547 | /* Even if this display element produced no glyphs at all, |
| @@ -19733,7 +19733,7 @@ display_line (struct it *it) | |||
| 19733 | } | 19733 | } |
| 19734 | else | 19734 | else |
| 19735 | { | 19735 | { |
| 19736 | xassert (INTEGERP (overlay_arrow_string)); | 19736 | eassert (INTEGERP (overlay_arrow_string)); |
| 19737 | row->overlay_arrow_bitmap = XINT (overlay_arrow_string); | 19737 | row->overlay_arrow_bitmap = XINT (overlay_arrow_string); |
| 19738 | } | 19738 | } |
| 19739 | overlay_arrow_seen = 1; | 19739 | overlay_arrow_seen = 1; |
| @@ -19936,7 +19936,7 @@ display_menu_bar (struct window *w) | |||
| 19936 | #endif /* HAVE_NS */ | 19936 | #endif /* HAVE_NS */ |
| 19937 | 19937 | ||
| 19938 | #ifdef USE_X_TOOLKIT | 19938 | #ifdef USE_X_TOOLKIT |
| 19939 | xassert (!FRAME_WINDOW_P (f)); | 19939 | eassert (!FRAME_WINDOW_P (f)); |
| 19940 | init_iterator (&it, w, -1, -1, f->desired_matrix->rows, MENU_FACE_ID); | 19940 | init_iterator (&it, w, -1, -1, f->desired_matrix->rows, MENU_FACE_ID); |
| 19941 | it.first_visible_x = 0; | 19941 | it.first_visible_x = 0; |
| 19942 | it.last_visible_x = FRAME_TOTAL_COLS (f) * FRAME_COLUMN_WIDTH (f); | 19942 | it.last_visible_x = FRAME_TOTAL_COLS (f) * FRAME_COLUMN_WIDTH (f); |
| @@ -19946,7 +19946,7 @@ display_menu_bar (struct window *w) | |||
| 19946 | /* Menu bar lines are displayed in the desired matrix of the | 19946 | /* Menu bar lines are displayed in the desired matrix of the |
| 19947 | dummy window menu_bar_window. */ | 19947 | dummy window menu_bar_window. */ |
| 19948 | struct window *menu_w; | 19948 | struct window *menu_w; |
| 19949 | xassert (WINDOWP (f->menu_bar_window)); | 19949 | eassert (WINDOWP (f->menu_bar_window)); |
| 19950 | menu_w = XWINDOW (f->menu_bar_window); | 19950 | menu_w = XWINDOW (f->menu_bar_window); |
| 19951 | init_iterator (&it, menu_w, -1, -1, menu_w->desired_matrix->rows, | 19951 | init_iterator (&it, menu_w, -1, -1, menu_w->desired_matrix->rows, |
| 19952 | MENU_FACE_ID); | 19952 | MENU_FACE_ID); |
| @@ -22042,7 +22042,7 @@ calc_pixel_width_or_height (double *res, struct it *it, Lisp_Object prop, | |||
| 22042 | if (NILP (prop)) | 22042 | if (NILP (prop)) |
| 22043 | return OK_PIXELS (0); | 22043 | return OK_PIXELS (0); |
| 22044 | 22044 | ||
| 22045 | xassert (FRAME_LIVE_P (it->f)); | 22045 | eassert (FRAME_LIVE_P (it->f)); |
| 22046 | 22046 | ||
| 22047 | if (SYMBOLP (prop)) | 22047 | if (SYMBOLP (prop)) |
| 22048 | { | 22048 | { |
| @@ -22369,7 +22369,7 @@ get_char_face_and_encoding (struct frame *f, int c, int face_id, | |||
| 22369 | if (display_p) | 22369 | if (display_p) |
| 22370 | #endif | 22370 | #endif |
| 22371 | { | 22371 | { |
| 22372 | xassert (face != NULL); | 22372 | eassert (face != NULL); |
| 22373 | PREPARE_FACE_FOR_DISPLAY (f, face); | 22373 | PREPARE_FACE_FOR_DISPLAY (f, face); |
| 22374 | } | 22374 | } |
| 22375 | 22375 | ||
| @@ -22387,7 +22387,7 @@ get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph, | |||
| 22387 | { | 22387 | { |
| 22388 | struct face *face; | 22388 | struct face *face; |
| 22389 | 22389 | ||
| 22390 | xassert (glyph->type == CHAR_GLYPH); | 22390 | eassert (glyph->type == CHAR_GLYPH); |
| 22391 | face = FACE_FROM_ID (f, glyph->face_id); | 22391 | face = FACE_FROM_ID (f, glyph->face_id); |
| 22392 | 22392 | ||
| 22393 | if (two_byte_p) | 22393 | if (two_byte_p) |
| @@ -22409,7 +22409,7 @@ get_glyph_face_and_encoding (struct frame *f, struct glyph *glyph, | |||
| 22409 | } | 22409 | } |
| 22410 | 22410 | ||
| 22411 | /* Make sure X resources of the face are allocated. */ | 22411 | /* Make sure X resources of the face are allocated. */ |
| 22412 | xassert (face != NULL); | 22412 | eassert (face != NULL); |
| 22413 | PREPARE_FACE_FOR_DISPLAY (f, face); | 22413 | PREPARE_FACE_FOR_DISPLAY (f, face); |
| 22414 | return face; | 22414 | return face; |
| 22415 | } | 22415 | } |
| @@ -22455,7 +22455,7 @@ fill_composite_glyph_string (struct glyph_string *s, struct face *base_face, | |||
| 22455 | glyph that requires the different face, add it to S. */ | 22455 | glyph that requires the different face, add it to S. */ |
| 22456 | struct face *face; | 22456 | struct face *face; |
| 22457 | 22457 | ||
| 22458 | xassert (s); | 22458 | eassert (s); |
| 22459 | 22459 | ||
| 22460 | s->for_overlaps = overlaps; | 22460 | s->for_overlaps = overlaps; |
| 22461 | s->face = NULL; | 22461 | s->face = NULL; |
| @@ -22565,7 +22565,7 @@ fill_glyphless_glyph_string (struct glyph_string *s, int face_id, | |||
| 22565 | struct glyph *glyph, *last; | 22565 | struct glyph *glyph, *last; |
| 22566 | int voffset; | 22566 | int voffset; |
| 22567 | 22567 | ||
| 22568 | xassert (s->first_glyph->type == GLYPHLESS_GLYPH); | 22568 | eassert (s->first_glyph->type == GLYPHLESS_GLYPH); |
| 22569 | s->for_overlaps = overlaps; | 22569 | s->for_overlaps = overlaps; |
| 22570 | glyph = s->row->glyphs[s->area] + start; | 22570 | glyph = s->row->glyphs[s->area] + start; |
| 22571 | last = s->row->glyphs[s->area] + end; | 22571 | last = s->row->glyphs[s->area] + end; |
| @@ -22606,9 +22606,9 @@ fill_glyph_string (struct glyph_string *s, int face_id, | |||
| 22606 | int voffset; | 22606 | int voffset; |
| 22607 | int glyph_not_available_p; | 22607 | int glyph_not_available_p; |
| 22608 | 22608 | ||
| 22609 | xassert (s->f == XFRAME (s->w->frame)); | 22609 | eassert (s->f == XFRAME (s->w->frame)); |
| 22610 | xassert (s->nchars == 0); | 22610 | eassert (s->nchars == 0); |
| 22611 | xassert (start >= 0 && end > start); | 22611 | eassert (start >= 0 && end > start); |
| 22612 | 22612 | ||
| 22613 | s->for_overlaps = overlaps; | 22613 | s->for_overlaps = overlaps; |
| 22614 | glyph = s->row->glyphs[s->area] + start; | 22614 | glyph = s->row->glyphs[s->area] + start; |
| @@ -22631,7 +22631,7 @@ fill_glyph_string (struct glyph_string *s, int face_id, | |||
| 22631 | &two_byte_p); | 22631 | &two_byte_p); |
| 22632 | s->two_byte_p = two_byte_p; | 22632 | s->two_byte_p = two_byte_p; |
| 22633 | ++s->nchars; | 22633 | ++s->nchars; |
| 22634 | xassert (s->nchars <= end - start); | 22634 | eassert (s->nchars <= end - start); |
| 22635 | s->width += glyph->pixel_width; | 22635 | s->width += glyph->pixel_width; |
| 22636 | if (glyph++->padding_p != s->padding_p) | 22636 | if (glyph++->padding_p != s->padding_p) |
| 22637 | break; | 22637 | break; |
| @@ -22652,7 +22652,7 @@ fill_glyph_string (struct glyph_string *s, int face_id, | |||
| 22652 | /* Adjust base line for subscript/superscript text. */ | 22652 | /* Adjust base line for subscript/superscript text. */ |
| 22653 | s->ybase += voffset; | 22653 | s->ybase += voffset; |
| 22654 | 22654 | ||
| 22655 | xassert (s->face && s->face->gc); | 22655 | eassert (s->face && s->face->gc); |
| 22656 | return glyph - s->row->glyphs[s->area]; | 22656 | return glyph - s->row->glyphs[s->area]; |
| 22657 | } | 22657 | } |
| 22658 | 22658 | ||
| @@ -22662,9 +22662,9 @@ fill_glyph_string (struct glyph_string *s, int face_id, | |||
| 22662 | static void | 22662 | static void |
| 22663 | fill_image_glyph_string (struct glyph_string *s) | 22663 | fill_image_glyph_string (struct glyph_string *s) |
| 22664 | { | 22664 | { |
| 22665 | xassert (s->first_glyph->type == IMAGE_GLYPH); | 22665 | eassert (s->first_glyph->type == IMAGE_GLYPH); |
| 22666 | s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img_id); | 22666 | s->img = IMAGE_FROM_ID (s->f, s->first_glyph->u.img_id); |
| 22667 | xassert (s->img); | 22667 | eassert (s->img); |
| 22668 | s->slice = s->first_glyph->slice.img; | 22668 | s->slice = s->first_glyph->slice.img; |
| 22669 | s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id); | 22669 | s->face = FACE_FROM_ID (s->f, s->first_glyph->face_id); |
| 22670 | s->font = s->face->font; | 22670 | s->font = s->face->font; |
| @@ -22688,7 +22688,7 @@ fill_stretch_glyph_string (struct glyph_string *s, int start, int end) | |||
| 22688 | struct glyph *glyph, *last; | 22688 | struct glyph *glyph, *last; |
| 22689 | int voffset, face_id; | 22689 | int voffset, face_id; |
| 22690 | 22690 | ||
| 22691 | xassert (s->first_glyph->type == STRETCH_GLYPH); | 22691 | eassert (s->first_glyph->type == STRETCH_GLYPH); |
| 22692 | 22692 | ||
| 22693 | glyph = s->row->glyphs[s->area] + start; | 22693 | glyph = s->row->glyphs[s->area] + start; |
| 22694 | last = s->row->glyphs[s->area] + end; | 22694 | last = s->row->glyphs[s->area] + end; |
| @@ -22712,7 +22712,7 @@ fill_stretch_glyph_string (struct glyph_string *s, int start, int end) | |||
| 22712 | 22712 | ||
| 22713 | /* The case that face->gc == 0 is handled when drawing the glyph | 22713 | /* The case that face->gc == 0 is handled when drawing the glyph |
| 22714 | string by calling PREPARE_FACE_FOR_DISPLAY. */ | 22714 | string by calling PREPARE_FACE_FOR_DISPLAY. */ |
| 22715 | xassert (s->face); | 22715 | eassert (s->face); |
| 22716 | return glyph - s->row->glyphs[s->area]; | 22716 | return glyph - s->row->glyphs[s->area]; |
| 22717 | } | 22717 | } |
| 22718 | 22718 | ||
| @@ -23458,8 +23458,8 @@ append_glyph (struct it *it) | |||
| 23458 | struct glyph *glyph; | 23458 | struct glyph *glyph; |
| 23459 | enum glyph_row_area area = it->area; | 23459 | enum glyph_row_area area = it->area; |
| 23460 | 23460 | ||
| 23461 | xassert (it->glyph_row); | 23461 | eassert (it->glyph_row); |
| 23462 | xassert (it->char_to_display != '\n' && it->char_to_display != '\t'); | 23462 | eassert (it->char_to_display != '\n' && it->char_to_display != '\t'); |
| 23463 | 23463 | ||
| 23464 | glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; | 23464 | glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; |
| 23465 | if (glyph < it->glyph_row->glyphs[area + 1]) | 23465 | if (glyph < it->glyph_row->glyphs[area + 1]) |
| @@ -23532,7 +23532,7 @@ append_composite_glyph (struct it *it) | |||
| 23532 | struct glyph *glyph; | 23532 | struct glyph *glyph; |
| 23533 | enum glyph_row_area area = it->area; | 23533 | enum glyph_row_area area = it->area; |
| 23534 | 23534 | ||
| 23535 | xassert (it->glyph_row); | 23535 | eassert (it->glyph_row); |
| 23536 | 23536 | ||
| 23537 | glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; | 23537 | glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; |
| 23538 | if (glyph < it->glyph_row->glyphs[area + 1]) | 23538 | if (glyph < it->glyph_row->glyphs[area + 1]) |
| @@ -23624,10 +23624,10 @@ produce_image_glyph (struct it *it) | |||
| 23624 | int glyph_ascent, crop; | 23624 | int glyph_ascent, crop; |
| 23625 | struct glyph_slice slice; | 23625 | struct glyph_slice slice; |
| 23626 | 23626 | ||
| 23627 | xassert (it->what == IT_IMAGE); | 23627 | eassert (it->what == IT_IMAGE); |
| 23628 | 23628 | ||
| 23629 | face = FACE_FROM_ID (it->f, it->face_id); | 23629 | face = FACE_FROM_ID (it->f, it->face_id); |
| 23630 | xassert (face); | 23630 | eassert (face); |
| 23631 | /* Make sure X resources of the face is loaded. */ | 23631 | /* Make sure X resources of the face is loaded. */ |
| 23632 | PREPARE_FACE_FOR_DISPLAY (it->f, face); | 23632 | PREPARE_FACE_FOR_DISPLAY (it->f, face); |
| 23633 | 23633 | ||
| @@ -23642,7 +23642,7 @@ produce_image_glyph (struct it *it) | |||
| 23642 | } | 23642 | } |
| 23643 | 23643 | ||
| 23644 | img = IMAGE_FROM_ID (it->f, it->image_id); | 23644 | img = IMAGE_FROM_ID (it->f, it->image_id); |
| 23645 | xassert (img); | 23645 | eassert (img); |
| 23646 | /* Make sure X resources of the image is loaded. */ | 23646 | /* Make sure X resources of the image is loaded. */ |
| 23647 | prepare_image_for_display (it->f, img); | 23647 | prepare_image_for_display (it->f, img); |
| 23648 | 23648 | ||
| @@ -23783,7 +23783,7 @@ append_stretch_glyph (struct it *it, Lisp_Object object, | |||
| 23783 | struct glyph *glyph; | 23783 | struct glyph *glyph; |
| 23784 | enum glyph_row_area area = it->area; | 23784 | enum glyph_row_area area = it->area; |
| 23785 | 23785 | ||
| 23786 | xassert (ascent >= 0 && ascent <= height); | 23786 | eassert (ascent >= 0 && ascent <= height); |
| 23787 | 23787 | ||
| 23788 | glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; | 23788 | glyph = it->glyph_row->glyphs[area] + it->glyph_row->used[area]; |
| 23789 | if (glyph < it->glyph_row->glyphs[area + 1]) | 23789 | if (glyph < it->glyph_row->glyphs[area + 1]) |
| @@ -23893,7 +23893,7 @@ produce_stretch_glyph (struct it *it) | |||
| 23893 | #endif | 23893 | #endif |
| 23894 | 23894 | ||
| 23895 | /* List should start with `space'. */ | 23895 | /* List should start with `space'. */ |
| 23896 | xassert (CONSP (it->object) && EQ (XCAR (it->object), Qspace)); | 23896 | eassert (CONSP (it->object) && EQ (XCAR (it->object), Qspace)); |
| 23897 | plist = XCDR (it->object); | 23897 | plist = XCDR (it->object); |
| 23898 | 23898 | ||
| 23899 | /* Compute the width of the stretch. */ | 23899 | /* Compute the width of the stretch. */ |
| @@ -24272,7 +24272,7 @@ produce_glyphless_glyph (struct it *it, int for_no_font, Lisp_Object acronym) | |||
| 24272 | } | 24272 | } |
| 24273 | else | 24273 | else |
| 24274 | { | 24274 | { |
| 24275 | xassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE); | 24275 | eassert (it->glyphless_method == GLYPHLESS_DISPLAY_HEX_CODE); |
| 24276 | sprintf (buf, "%0*X", it->c < 0x10000 ? 4 : 6, it->c); | 24276 | sprintf (buf, "%0*X", it->c < 0x10000 ? 4 : 6, it->c); |
| 24277 | str = buf; | 24277 | str = buf; |
| 24278 | } | 24278 | } |
| @@ -24374,7 +24374,7 @@ x_produce_glyphs (struct it *it) | |||
| 24374 | Vglyphless_char_display. */ | 24374 | Vglyphless_char_display. */ |
| 24375 | Lisp_Object acronym = lookup_glyphless_char_display (-1, it); | 24375 | Lisp_Object acronym = lookup_glyphless_char_display (-1, it); |
| 24376 | 24376 | ||
| 24377 | xassert (it->what == IT_GLYPHLESS); | 24377 | eassert (it->what == IT_GLYPHLESS); |
| 24378 | produce_glyphless_glyph (it, 1, STRINGP (acronym) ? acronym : Qnil); | 24378 | produce_glyphless_glyph (it, 1, STRINGP (acronym) ? acronym : Qnil); |
| 24379 | goto done; | 24379 | goto done; |
| 24380 | } | 24380 | } |
| @@ -24999,7 +24999,7 @@ x_produce_glyphs (struct it *it) | |||
| 24999 | done: | 24999 | done: |
| 25000 | /* Accumulate dimensions. Note: can't assume that it->descent > 0 | 25000 | /* Accumulate dimensions. Note: can't assume that it->descent > 0 |
| 25001 | because this isn't true for images with `:ascent 100'. */ | 25001 | because this isn't true for images with `:ascent 100'. */ |
| 25002 | xassert (it->ascent >= 0 && it->descent >= 0); | 25002 | eassert (it->ascent >= 0 && it->descent >= 0); |
| 25003 | if (it->area == TEXT_AREA) | 25003 | if (it->area == TEXT_AREA) |
| 25004 | it->current_x += it->pixel_width; | 25004 | it->current_x += it->pixel_width; |
| 25005 | 25005 | ||
| @@ -25028,7 +25028,7 @@ x_write_glyphs (struct glyph *start, int len) | |||
| 25028 | { | 25028 | { |
| 25029 | int x, hpos, chpos = updated_window->phys_cursor.hpos; | 25029 | int x, hpos, chpos = updated_window->phys_cursor.hpos; |
| 25030 | 25030 | ||
| 25031 | xassert (updated_window && updated_row); | 25031 | eassert (updated_window && updated_row); |
| 25032 | /* When the window is hscrolled, cursor hpos can legitimately be out | 25032 | /* When the window is hscrolled, cursor hpos can legitimately be out |
| 25033 | of bounds, but we draw the cursor at the corresponding window | 25033 | of bounds, but we draw the cursor at the corresponding window |
| 25034 | margin in that case. */ | 25034 | margin in that case. */ |
| @@ -25077,7 +25077,7 @@ x_insert_glyphs (struct glyph *start, int len) | |||
| 25077 | int frame_x, frame_y; | 25077 | int frame_x, frame_y; |
| 25078 | ptrdiff_t hpos; | 25078 | ptrdiff_t hpos; |
| 25079 | 25079 | ||
| 25080 | xassert (updated_window && updated_row); | 25080 | eassert (updated_window && updated_row); |
| 25081 | BLOCK_INPUT; | 25081 | BLOCK_INPUT; |
| 25082 | w = updated_window; | 25082 | w = updated_window; |
| 25083 | f = XFRAME (WINDOW_FRAME (w)); | 25083 | f = XFRAME (WINDOW_FRAME (w)); |
| @@ -25132,7 +25132,7 @@ x_clear_end_of_line (int to_x) | |||
| 25132 | int max_x, min_y, max_y; | 25132 | int max_x, min_y, max_y; |
| 25133 | int from_x, from_y, to_y; | 25133 | int from_x, from_y, to_y; |
| 25134 | 25134 | ||
| 25135 | xassert (updated_window && updated_row); | 25135 | eassert (updated_window && updated_row); |
| 25136 | f = XFRAME (w->frame); | 25136 | f = XFRAME (w->frame); |
| 25137 | 25137 | ||
| 25138 | if (updated_row->full_width_p) | 25138 | if (updated_row->full_width_p) |
| @@ -25757,7 +25757,7 @@ display_and_set_cursor (struct window *w, int on, | |||
| 25757 | || (0 <= hpos && hpos < glyph_row->used[TEXT_AREA])) | 25757 | || (0 <= hpos && hpos < glyph_row->used[TEXT_AREA])) |
| 25758 | glyph = glyph_row->glyphs[TEXT_AREA] + hpos; | 25758 | glyph = glyph_row->glyphs[TEXT_AREA] + hpos; |
| 25759 | 25759 | ||
| 25760 | xassert (interrupt_input_blocked); | 25760 | eassert (interrupt_input_blocked); |
| 25761 | 25761 | ||
| 25762 | /* Set new_cursor_type to the cursor we want to be displayed. */ | 25762 | /* Set new_cursor_type to the cursor we want to be displayed. */ |
| 25763 | new_cursor_type = get_window_cursor_type (w, glyph, | 25763 | new_cursor_type = get_window_cursor_type (w, glyph, |
| @@ -26304,9 +26304,9 @@ mouse_face_from_buffer_pos (Lisp_Object window, | |||
| 26304 | ptrdiff_t ignore, pos; | 26304 | ptrdiff_t ignore, pos; |
| 26305 | int x; | 26305 | int x; |
| 26306 | 26306 | ||
| 26307 | xassert (NILP (disp_string) || STRINGP (disp_string)); | 26307 | eassert (NILP (disp_string) || STRINGP (disp_string)); |
| 26308 | xassert (NILP (before_string) || STRINGP (before_string)); | 26308 | eassert (NILP (before_string) || STRINGP (before_string)); |
| 26309 | xassert (NILP (after_string) || STRINGP (after_string)); | 26309 | eassert (NILP (after_string) || STRINGP (after_string)); |
| 26310 | 26310 | ||
| 26311 | /* Find the rows corresponding to START_CHARPOS and END_CHARPOS. */ | 26311 | /* Find the rows corresponding to START_CHARPOS and END_CHARPOS. */ |
| 26312 | rows_from_pos_range (w, start_charpos, end_charpos, disp_string, &r1, &r2); | 26312 | rows_from_pos_range (w, start_charpos, end_charpos, disp_string, &r1, &r2); |
| @@ -27922,7 +27922,7 @@ expose_area (struct window *w, struct glyph_row *row, XRectangle *r, | |||
| 27922 | static int | 27922 | static int |
| 27923 | expose_line (struct window *w, struct glyph_row *row, XRectangle *r) | 27923 | expose_line (struct window *w, struct glyph_row *row, XRectangle *r) |
| 27924 | { | 27924 | { |
| 27925 | xassert (row->enabled_p); | 27925 | eassert (row->enabled_p); |
| 27926 | 27926 | ||
| 27927 | if (row->mode_line_p || w->pseudo_window_p) | 27927 | if (row->mode_line_p || w->pseudo_window_p) |
| 27928 | draw_glyphs (w, 0, row, TEXT_AREA, | 27928 | draw_glyphs (w, 0, row, TEXT_AREA, |
| @@ -27962,7 +27962,7 @@ expose_overlaps (struct window *w, | |||
| 27962 | for (row = first_overlapping_row; row <= last_overlapping_row; ++row) | 27962 | for (row = first_overlapping_row; row <= last_overlapping_row; ++row) |
| 27963 | if (row->overlapping_p) | 27963 | if (row->overlapping_p) |
| 27964 | { | 27964 | { |
| 27965 | xassert (row->enabled_p && !row->mode_line_p); | 27965 | eassert (row->enabled_p && !row->mode_line_p); |
| 27966 | 27966 | ||
| 27967 | row->clip = r; | 27967 | row->clip = r; |
| 27968 | if (row->used[LEFT_MARGIN_AREA]) | 27968 | if (row->used[LEFT_MARGIN_AREA]) |
diff --git a/src/xfaces.c b/src/xfaces.c index f2cd0eb6af8..a319c542b07 100644 --- a/src/xfaces.c +++ b/src/xfaces.c | |||
| @@ -539,7 +539,7 @@ int color_count[256]; | |||
| 539 | void | 539 | void |
| 540 | register_color (unsigned long pixel) | 540 | register_color (unsigned long pixel) |
| 541 | { | 541 | { |
| 542 | xassert (pixel < 256); | 542 | eassert (pixel < 256); |
| 543 | ++color_count[pixel]; | 543 | ++color_count[pixel]; |
| 544 | } | 544 | } |
| 545 | 545 | ||
| @@ -549,7 +549,7 @@ register_color (unsigned long pixel) | |||
| 549 | void | 549 | void |
| 550 | unregister_color (unsigned long pixel) | 550 | unregister_color (unsigned long pixel) |
| 551 | { | 551 | { |
| 552 | xassert (pixel < 256); | 552 | eassert (pixel < 256); |
| 553 | if (color_count[pixel] > 0) | 553 | if (color_count[pixel] > 0) |
| 554 | --color_count[pixel]; | 554 | --color_count[pixel]; |
| 555 | else | 555 | else |
| @@ -663,7 +663,7 @@ static inline void | |||
| 663 | x_free_gc (struct frame *f, GC gc) | 663 | x_free_gc (struct frame *f, GC gc) |
| 664 | { | 664 | { |
| 665 | eassert (interrupt_input_blocked); | 665 | eassert (interrupt_input_blocked); |
| 666 | IF_DEBUG (xassert (--ngcs >= 0)); | 666 | IF_DEBUG (eassert (--ngcs >= 0)); |
| 667 | XFreeGC (FRAME_X_DISPLAY (f), gc); | 667 | XFreeGC (FRAME_X_DISPLAY (f), gc); |
| 668 | } | 668 | } |
| 669 | 669 | ||
| @@ -689,7 +689,7 @@ x_create_gc (struct frame *f, unsigned long mask, XGCValues *xgcv) | |||
| 689 | static inline void | 689 | static inline void |
| 690 | x_free_gc (struct frame *f, GC gc) | 690 | x_free_gc (struct frame *f, GC gc) |
| 691 | { | 691 | { |
| 692 | IF_DEBUG (xassert (--ngcs >= 0)); | 692 | IF_DEBUG (eassert (--ngcs >= 0)); |
| 693 | xfree (gc); | 693 | xfree (gc); |
| 694 | } | 694 | } |
| 695 | 695 | ||
| @@ -1325,8 +1325,8 @@ load_color (struct frame *f, struct face *face, Lisp_Object name, | |||
| 1325 | { | 1325 | { |
| 1326 | XColor color; | 1326 | XColor color; |
| 1327 | 1327 | ||
| 1328 | xassert (STRINGP (name)); | 1328 | eassert (STRINGP (name)); |
| 1329 | xassert (target_index == LFACE_FOREGROUND_INDEX | 1329 | eassert (target_index == LFACE_FOREGROUND_INDEX |
| 1330 | || target_index == LFACE_BACKGROUND_INDEX | 1330 | || target_index == LFACE_BACKGROUND_INDEX |
| 1331 | || target_index == LFACE_UNDERLINE_INDEX | 1331 | || target_index == LFACE_UNDERLINE_INDEX |
| 1332 | || target_index == LFACE_OVERLINE_INDEX | 1332 | || target_index == LFACE_OVERLINE_INDEX |
| @@ -1855,7 +1855,7 @@ the WIDTH times as wide as FACE on FRAME. */) | |||
| 1855 | #define LFACE_INHERIT(LFACE) AREF ((LFACE), LFACE_INHERIT_INDEX) | 1855 | #define LFACE_INHERIT(LFACE) AREF ((LFACE), LFACE_INHERIT_INDEX) |
| 1856 | #define LFACE_FONTSET(LFACE) AREF ((LFACE), LFACE_FONTSET_INDEX) | 1856 | #define LFACE_FONTSET(LFACE) AREF ((LFACE), LFACE_FONTSET_INDEX) |
| 1857 | 1857 | ||
| 1858 | #if XASSERTS | 1858 | #ifdef ENABLE_CHECKING |
| 1859 | /* Non-zero if LFACE is a Lisp face. A Lisp face is a vector of size | 1859 | /* Non-zero if LFACE is a Lisp face. A Lisp face is a vector of size |
| 1860 | LFACE_VECTOR_SIZE which has the symbol `face' in slot 0. */ | 1860 | LFACE_VECTOR_SIZE which has the symbol `face' in slot 0. */ |
| 1861 | 1861 | ||
| @@ -1873,68 +1873,68 @@ the WIDTH times as wide as FACE on FRAME. */) | |||
| 1873 | static void | 1873 | static void |
| 1874 | check_lface_attrs (Lisp_Object *attrs) | 1874 | check_lface_attrs (Lisp_Object *attrs) |
| 1875 | { | 1875 | { |
| 1876 | xassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX]) | 1876 | eassert (UNSPECIFIEDP (attrs[LFACE_FAMILY_INDEX]) |
| 1877 | || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX]) | 1877 | || IGNORE_DEFFACE_P (attrs[LFACE_FAMILY_INDEX]) |
| 1878 | || STRINGP (attrs[LFACE_FAMILY_INDEX])); | 1878 | || STRINGP (attrs[LFACE_FAMILY_INDEX])); |
| 1879 | xassert (UNSPECIFIEDP (attrs[LFACE_FOUNDRY_INDEX]) | 1879 | eassert (UNSPECIFIEDP (attrs[LFACE_FOUNDRY_INDEX]) |
| 1880 | || IGNORE_DEFFACE_P (attrs[LFACE_FOUNDRY_INDEX]) | 1880 | || IGNORE_DEFFACE_P (attrs[LFACE_FOUNDRY_INDEX]) |
| 1881 | || STRINGP (attrs[LFACE_FOUNDRY_INDEX])); | 1881 | || STRINGP (attrs[LFACE_FOUNDRY_INDEX])); |
| 1882 | xassert (UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX]) | 1882 | eassert (UNSPECIFIEDP (attrs[LFACE_SWIDTH_INDEX]) |
| 1883 | || IGNORE_DEFFACE_P (attrs[LFACE_SWIDTH_INDEX]) | 1883 | || IGNORE_DEFFACE_P (attrs[LFACE_SWIDTH_INDEX]) |
| 1884 | || SYMBOLP (attrs[LFACE_SWIDTH_INDEX])); | 1884 | || SYMBOLP (attrs[LFACE_SWIDTH_INDEX])); |
| 1885 | xassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX]) | 1885 | eassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX]) |
| 1886 | || IGNORE_DEFFACE_P (attrs[LFACE_HEIGHT_INDEX]) | 1886 | || IGNORE_DEFFACE_P (attrs[LFACE_HEIGHT_INDEX]) |
| 1887 | || INTEGERP (attrs[LFACE_HEIGHT_INDEX]) | 1887 | || INTEGERP (attrs[LFACE_HEIGHT_INDEX]) |
| 1888 | || FLOATP (attrs[LFACE_HEIGHT_INDEX]) | 1888 | || FLOATP (attrs[LFACE_HEIGHT_INDEX]) |
| 1889 | || FUNCTIONP (attrs[LFACE_HEIGHT_INDEX])); | 1889 | || FUNCTIONP (attrs[LFACE_HEIGHT_INDEX])); |
| 1890 | xassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX]) | 1890 | eassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX]) |
| 1891 | || IGNORE_DEFFACE_P (attrs[LFACE_WEIGHT_INDEX]) | 1891 | || IGNORE_DEFFACE_P (attrs[LFACE_WEIGHT_INDEX]) |
| 1892 | || SYMBOLP (attrs[LFACE_WEIGHT_INDEX])); | 1892 | || SYMBOLP (attrs[LFACE_WEIGHT_INDEX])); |
| 1893 | xassert (UNSPECIFIEDP (attrs[LFACE_SLANT_INDEX]) | 1893 | eassert (UNSPECIFIEDP (attrs[LFACE_SLANT_INDEX]) |
| 1894 | || IGNORE_DEFFACE_P (attrs[LFACE_SLANT_INDEX]) | 1894 | || IGNORE_DEFFACE_P (attrs[LFACE_SLANT_INDEX]) |
| 1895 | || SYMBOLP (attrs[LFACE_SLANT_INDEX])); | 1895 | || SYMBOLP (attrs[LFACE_SLANT_INDEX])); |
| 1896 | xassert (UNSPECIFIEDP (attrs[LFACE_UNDERLINE_INDEX]) | 1896 | eassert (UNSPECIFIEDP (attrs[LFACE_UNDERLINE_INDEX]) |
| 1897 | || IGNORE_DEFFACE_P (attrs[LFACE_UNDERLINE_INDEX]) | 1897 | || IGNORE_DEFFACE_P (attrs[LFACE_UNDERLINE_INDEX]) |
| 1898 | || SYMBOLP (attrs[LFACE_UNDERLINE_INDEX]) | 1898 | || SYMBOLP (attrs[LFACE_UNDERLINE_INDEX]) |
| 1899 | || STRINGP (attrs[LFACE_UNDERLINE_INDEX]) | 1899 | || STRINGP (attrs[LFACE_UNDERLINE_INDEX]) |
| 1900 | || CONSP (attrs[LFACE_UNDERLINE_INDEX])); | 1900 | || CONSP (attrs[LFACE_UNDERLINE_INDEX])); |
| 1901 | xassert (UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX]) | 1901 | eassert (UNSPECIFIEDP (attrs[LFACE_OVERLINE_INDEX]) |
| 1902 | || IGNORE_DEFFACE_P (attrs[LFACE_OVERLINE_INDEX]) | 1902 | || IGNORE_DEFFACE_P (attrs[LFACE_OVERLINE_INDEX]) |
| 1903 | || SYMBOLP (attrs[LFACE_OVERLINE_INDEX]) | 1903 | || SYMBOLP (attrs[LFACE_OVERLINE_INDEX]) |
| 1904 | || STRINGP (attrs[LFACE_OVERLINE_INDEX])); | 1904 | || STRINGP (attrs[LFACE_OVERLINE_INDEX])); |
| 1905 | xassert (UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX]) | 1905 | eassert (UNSPECIFIEDP (attrs[LFACE_STRIKE_THROUGH_INDEX]) |
| 1906 | || IGNORE_DEFFACE_P (attrs[LFACE_STRIKE_THROUGH_INDEX]) | 1906 | || IGNORE_DEFFACE_P (attrs[LFACE_STRIKE_THROUGH_INDEX]) |
| 1907 | || SYMBOLP (attrs[LFACE_STRIKE_THROUGH_INDEX]) | 1907 | || SYMBOLP (attrs[LFACE_STRIKE_THROUGH_INDEX]) |
| 1908 | || STRINGP (attrs[LFACE_STRIKE_THROUGH_INDEX])); | 1908 | || STRINGP (attrs[LFACE_STRIKE_THROUGH_INDEX])); |
| 1909 | xassert (UNSPECIFIEDP (attrs[LFACE_BOX_INDEX]) | 1909 | eassert (UNSPECIFIEDP (attrs[LFACE_BOX_INDEX]) |
| 1910 | || IGNORE_DEFFACE_P (attrs[LFACE_BOX_INDEX]) | 1910 | || IGNORE_DEFFACE_P (attrs[LFACE_BOX_INDEX]) |
| 1911 | || SYMBOLP (attrs[LFACE_BOX_INDEX]) | 1911 | || SYMBOLP (attrs[LFACE_BOX_INDEX]) |
| 1912 | || STRINGP (attrs[LFACE_BOX_INDEX]) | 1912 | || STRINGP (attrs[LFACE_BOX_INDEX]) |
| 1913 | || INTEGERP (attrs[LFACE_BOX_INDEX]) | 1913 | || INTEGERP (attrs[LFACE_BOX_INDEX]) |
| 1914 | || CONSP (attrs[LFACE_BOX_INDEX])); | 1914 | || CONSP (attrs[LFACE_BOX_INDEX])); |
| 1915 | xassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX]) | 1915 | eassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX]) |
| 1916 | || IGNORE_DEFFACE_P (attrs[LFACE_INVERSE_INDEX]) | 1916 | || IGNORE_DEFFACE_P (attrs[LFACE_INVERSE_INDEX]) |
| 1917 | || SYMBOLP (attrs[LFACE_INVERSE_INDEX])); | 1917 | || SYMBOLP (attrs[LFACE_INVERSE_INDEX])); |
| 1918 | xassert (UNSPECIFIEDP (attrs[LFACE_FOREGROUND_INDEX]) | 1918 | eassert (UNSPECIFIEDP (attrs[LFACE_FOREGROUND_INDEX]) |
| 1919 | || IGNORE_DEFFACE_P (attrs[LFACE_FOREGROUND_INDEX]) | 1919 | || IGNORE_DEFFACE_P (attrs[LFACE_FOREGROUND_INDEX]) |
| 1920 | || STRINGP (attrs[LFACE_FOREGROUND_INDEX])); | 1920 | || STRINGP (attrs[LFACE_FOREGROUND_INDEX])); |
| 1921 | xassert (UNSPECIFIEDP (attrs[LFACE_BACKGROUND_INDEX]) | 1921 | eassert (UNSPECIFIEDP (attrs[LFACE_BACKGROUND_INDEX]) |
| 1922 | || IGNORE_DEFFACE_P (attrs[LFACE_BACKGROUND_INDEX]) | 1922 | || IGNORE_DEFFACE_P (attrs[LFACE_BACKGROUND_INDEX]) |
| 1923 | || STRINGP (attrs[LFACE_BACKGROUND_INDEX])); | 1923 | || STRINGP (attrs[LFACE_BACKGROUND_INDEX])); |
| 1924 | xassert (UNSPECIFIEDP (attrs[LFACE_INHERIT_INDEX]) | 1924 | eassert (UNSPECIFIEDP (attrs[LFACE_INHERIT_INDEX]) |
| 1925 | || IGNORE_DEFFACE_P (attrs[LFACE_INHERIT_INDEX]) | 1925 | || IGNORE_DEFFACE_P (attrs[LFACE_INHERIT_INDEX]) |
| 1926 | || NILP (attrs[LFACE_INHERIT_INDEX]) | 1926 | || NILP (attrs[LFACE_INHERIT_INDEX]) |
| 1927 | || SYMBOLP (attrs[LFACE_INHERIT_INDEX]) | 1927 | || SYMBOLP (attrs[LFACE_INHERIT_INDEX]) |
| 1928 | || CONSP (attrs[LFACE_INHERIT_INDEX])); | 1928 | || CONSP (attrs[LFACE_INHERIT_INDEX])); |
| 1929 | #ifdef HAVE_WINDOW_SYSTEM | 1929 | #ifdef HAVE_WINDOW_SYSTEM |
| 1930 | xassert (UNSPECIFIEDP (attrs[LFACE_STIPPLE_INDEX]) | 1930 | eassert (UNSPECIFIEDP (attrs[LFACE_STIPPLE_INDEX]) |
| 1931 | || IGNORE_DEFFACE_P (attrs[LFACE_STIPPLE_INDEX]) | 1931 | || IGNORE_DEFFACE_P (attrs[LFACE_STIPPLE_INDEX]) |
| 1932 | || SYMBOLP (attrs[LFACE_STIPPLE_INDEX]) | 1932 | || SYMBOLP (attrs[LFACE_STIPPLE_INDEX]) |
| 1933 | || !NILP (Fbitmap_spec_p (attrs[LFACE_STIPPLE_INDEX]))); | 1933 | || !NILP (Fbitmap_spec_p (attrs[LFACE_STIPPLE_INDEX]))); |
| 1934 | xassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX]) | 1934 | eassert (UNSPECIFIEDP (attrs[LFACE_FONT_INDEX]) |
| 1935 | || IGNORE_DEFFACE_P (attrs[LFACE_FONT_INDEX]) | 1935 | || IGNORE_DEFFACE_P (attrs[LFACE_FONT_INDEX]) |
| 1936 | || FONTP (attrs[LFACE_FONT_INDEX])); | 1936 | || FONTP (attrs[LFACE_FONT_INDEX])); |
| 1937 | xassert (UNSPECIFIEDP (attrs[LFACE_FONTSET_INDEX]) | 1937 | eassert (UNSPECIFIEDP (attrs[LFACE_FONTSET_INDEX]) |
| 1938 | || STRINGP (attrs[LFACE_FONTSET_INDEX]) | 1938 | || STRINGP (attrs[LFACE_FONTSET_INDEX]) |
| 1939 | || NILP (attrs[LFACE_FONTSET_INDEX])); | 1939 | || NILP (attrs[LFACE_FONTSET_INDEX])); |
| 1940 | #endif | 1940 | #endif |
| @@ -1948,7 +1948,7 @@ check_lface (Lisp_Object lface) | |||
| 1948 | { | 1948 | { |
| 1949 | if (!NILP (lface)) | 1949 | if (!NILP (lface)) |
| 1950 | { | 1950 | { |
| 1951 | xassert (LFACEP (lface)); | 1951 | eassert (LFACEP (lface)); |
| 1952 | check_lface_attrs (XVECTOR (lface)->contents); | 1952 | check_lface_attrs (XVECTOR (lface)->contents); |
| 1953 | } | 1953 | } |
| 1954 | } | 1954 | } |
| @@ -2225,7 +2225,7 @@ set_lface_from_font (struct frame *f, Lisp_Object lface, | |||
| 2225 | { | 2225 | { |
| 2226 | int pt = PIXEL_TO_POINT (font->pixel_size * 10, f->resy); | 2226 | int pt = PIXEL_TO_POINT (font->pixel_size * 10, f->resy); |
| 2227 | 2227 | ||
| 2228 | xassert (pt > 0); | 2228 | eassert (pt > 0); |
| 2229 | LFACE_HEIGHT (lface) = make_number (pt); | 2229 | LFACE_HEIGHT (lface) = make_number (pt); |
| 2230 | } | 2230 | } |
| 2231 | 2231 | ||
| @@ -2731,7 +2731,7 @@ Value is a vector of face attributes. */) | |||
| 2731 | ++windows_or_buffers_changed; | 2731 | ++windows_or_buffers_changed; |
| 2732 | } | 2732 | } |
| 2733 | 2733 | ||
| 2734 | xassert (LFACEP (lface)); | 2734 | eassert (LFACEP (lface)); |
| 2735 | check_lface (lface); | 2735 | check_lface (lface); |
| 2736 | return lface; | 2736 | return lface; |
| 2737 | } | 2737 | } |
| @@ -3515,7 +3515,7 @@ face_boolean_x_resource_value (Lisp_Object value, int signal_p) | |||
| 3515 | { | 3515 | { |
| 3516 | Lisp_Object result = make_number (0); | 3516 | Lisp_Object result = make_number (0); |
| 3517 | 3517 | ||
| 3518 | xassert (STRINGP (value)); | 3518 | eassert (STRINGP (value)); |
| 3519 | 3519 | ||
| 3520 | if (xstrcasecmp (SSDATA (value), "on") == 0 | 3520 | if (xstrcasecmp (SSDATA (value), "on") == 0 |
| 3521 | || xstrcasecmp (SSDATA (value), "true") == 0) | 3521 | || xstrcasecmp (SSDATA (value), "true") == 0) |
| @@ -4088,7 +4088,7 @@ hash_string_case_insensitive (Lisp_Object string) | |||
| 4088 | { | 4088 | { |
| 4089 | const unsigned char *s; | 4089 | const unsigned char *s; |
| 4090 | unsigned hash = 0; | 4090 | unsigned hash = 0; |
| 4091 | xassert (STRINGP (string)); | 4091 | eassert (STRINGP (string)); |
| 4092 | for (s = SDATA (string); *s; ++s) | 4092 | for (s = SDATA (string); *s; ++s) |
| 4093 | hash = (hash << 1) ^ tolower (*s); | 4093 | hash = (hash << 1) ^ tolower (*s); |
| 4094 | return hash; | 4094 | return hash; |
| @@ -4119,7 +4119,7 @@ lface_hash (Lisp_Object *v) | |||
| 4119 | static inline int | 4119 | static inline int |
| 4120 | lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2) | 4120 | lface_same_font_attributes_p (Lisp_Object *lface1, Lisp_Object *lface2) |
| 4121 | { | 4121 | { |
| 4122 | xassert (lface_fully_specified_p (lface1) | 4122 | eassert (lface_fully_specified_p (lface1) |
| 4123 | && lface_fully_specified_p (lface2)); | 4123 | && lface_fully_specified_p (lface2)); |
| 4124 | return (xstrcasecmp (SSDATA (lface1[LFACE_FAMILY_INDEX]), | 4124 | return (xstrcasecmp (SSDATA (lface1[LFACE_FAMILY_INDEX]), |
| 4125 | SSDATA (lface2[LFACE_FAMILY_INDEX])) == 0 | 4125 | SSDATA (lface2[LFACE_FAMILY_INDEX])) == 0 |
| @@ -4200,7 +4200,7 @@ void | |||
| 4200 | prepare_face_for_display (struct frame *f, struct face *face) | 4200 | prepare_face_for_display (struct frame *f, struct face *face) |
| 4201 | { | 4201 | { |
| 4202 | #ifdef HAVE_WINDOW_SYSTEM | 4202 | #ifdef HAVE_WINDOW_SYSTEM |
| 4203 | xassert (FRAME_WINDOW_P (f)); | 4203 | eassert (FRAME_WINDOW_P (f)); |
| 4204 | 4204 | ||
| 4205 | if (face->gc == 0) | 4205 | if (face->gc == 0) |
| 4206 | { | 4206 | { |
| @@ -4472,7 +4472,7 @@ cache_face (struct face_cache *c, struct face *face, unsigned int hash) | |||
| 4472 | if (face1->id == i) | 4472 | if (face1->id == i) |
| 4473 | ++n; | 4473 | ++n; |
| 4474 | 4474 | ||
| 4475 | xassert (n == 1); | 4475 | eassert (n == 1); |
| 4476 | } | 4476 | } |
| 4477 | #endif /* GLYPH_DEBUG */ | 4477 | #endif /* GLYPH_DEBUG */ |
| 4478 | 4478 | ||
| @@ -4523,7 +4523,7 @@ lookup_face (struct frame *f, Lisp_Object *attr) | |||
| 4523 | int i; | 4523 | int i; |
| 4524 | struct face *face; | 4524 | struct face *face; |
| 4525 | 4525 | ||
| 4526 | xassert (cache != NULL); | 4526 | eassert (cache != NULL); |
| 4527 | check_lface_attrs (attr); | 4527 | check_lface_attrs (attr); |
| 4528 | 4528 | ||
| 4529 | /* Look up ATTR in the face cache. */ | 4529 | /* Look up ATTR in the face cache. */ |
| @@ -4548,7 +4548,7 @@ lookup_face (struct frame *f, Lisp_Object *attr) | |||
| 4548 | face = realize_face (cache, attr, -1); | 4548 | face = realize_face (cache, attr, -1); |
| 4549 | 4549 | ||
| 4550 | #if GLYPH_DEBUG | 4550 | #if GLYPH_DEBUG |
| 4551 | xassert (face == FACE_FROM_ID (f, face->id)); | 4551 | eassert (face == FACE_FROM_ID (f, face->id)); |
| 4552 | #endif /* GLYPH_DEBUG */ | 4552 | #endif /* GLYPH_DEBUG */ |
| 4553 | 4553 | ||
| 4554 | return face->id; | 4554 | return face->id; |
| @@ -4569,7 +4569,7 @@ face_for_font (struct frame *f, Lisp_Object font_object, struct face *base_face) | |||
| 4569 | int i; | 4569 | int i; |
| 4570 | struct face *face; | 4570 | struct face *face; |
| 4571 | 4571 | ||
| 4572 | xassert (cache != NULL); | 4572 | eassert (cache != NULL); |
| 4573 | base_face = base_face->ascii_face; | 4573 | base_face = base_face->ascii_face; |
| 4574 | hash = lface_hash (base_face->lface); | 4574 | hash = lface_hash (base_face->lface); |
| 4575 | i = hash % FACE_CACHE_BUCKETS_SIZE; | 4575 | i = hash % FACE_CACHE_BUCKETS_SIZE; |
| @@ -5470,7 +5470,7 @@ realize_default_face (struct frame *f) | |||
| 5470 | LFACE_STIPPLE (lface) = Qnil; | 5470 | LFACE_STIPPLE (lface) = Qnil; |
| 5471 | 5471 | ||
| 5472 | /* Realize the face; it must be fully-specified now. */ | 5472 | /* Realize the face; it must be fully-specified now. */ |
| 5473 | xassert (lface_fully_specified_p (XVECTOR (lface)->contents)); | 5473 | eassert (lface_fully_specified_p (XVECTOR (lface)->contents)); |
| 5474 | check_lface (lface); | 5474 | check_lface (lface); |
| 5475 | memcpy (attrs, XVECTOR (lface)->contents, sizeof attrs); | 5475 | memcpy (attrs, XVECTOR (lface)->contents, sizeof attrs); |
| 5476 | face = realize_face (c, attrs, DEFAULT_FACE_ID); | 5476 | face = realize_face (c, attrs, DEFAULT_FACE_ID); |
| @@ -5511,7 +5511,7 @@ realize_named_face (struct frame *f, Lisp_Object symbol, int id) | |||
| 5511 | /* The default face must exist and be fully specified. */ | 5511 | /* The default face must exist and be fully specified. */ |
| 5512 | get_lface_attributes_no_remap (f, Qdefault, attrs, 1); | 5512 | get_lface_attributes_no_remap (f, Qdefault, attrs, 1); |
| 5513 | check_lface_attrs (attrs); | 5513 | check_lface_attrs (attrs); |
| 5514 | xassert (lface_fully_specified_p (attrs)); | 5514 | eassert (lface_fully_specified_p (attrs)); |
| 5515 | 5515 | ||
| 5516 | /* If SYMBOL isn't know as a face, create it. */ | 5516 | /* If SYMBOL isn't know as a face, create it. */ |
| 5517 | if (NILP (lface)) | 5517 | if (NILP (lface)) |
| @@ -5541,7 +5541,7 @@ realize_face (struct face_cache *cache, Lisp_Object *attrs, int former_face_id) | |||
| 5541 | struct face *face; | 5541 | struct face *face; |
| 5542 | 5542 | ||
| 5543 | /* LFACE must be fully specified. */ | 5543 | /* LFACE must be fully specified. */ |
| 5544 | xassert (cache != NULL); | 5544 | eassert (cache != NULL); |
| 5545 | check_lface_attrs (attrs); | 5545 | check_lface_attrs (attrs); |
| 5546 | 5546 | ||
| 5547 | if (former_face_id >= 0 && cache->used > former_face_id) | 5547 | if (former_face_id >= 0 && cache->used > former_face_id) |
| @@ -5621,7 +5621,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object *attrs) | |||
| 5621 | struct frame *f; | 5621 | struct frame *f; |
| 5622 | Lisp_Object stipple, underline, overline, strike_through, box; | 5622 | Lisp_Object stipple, underline, overline, strike_through, box; |
| 5623 | 5623 | ||
| 5624 | xassert (FRAME_WINDOW_P (cache->f)); | 5624 | eassert (FRAME_WINDOW_P (cache->f)); |
| 5625 | 5625 | ||
| 5626 | /* Allocate a new realized face. */ | 5626 | /* Allocate a new realized face. */ |
| 5627 | face = make_realized_face (attrs); | 5627 | face = make_realized_face (attrs); |
| @@ -5699,7 +5699,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object *attrs) | |||
| 5699 | { | 5699 | { |
| 5700 | /* Simple box of specified line width in foreground color of the | 5700 | /* Simple box of specified line width in foreground color of the |
| 5701 | face. */ | 5701 | face. */ |
| 5702 | xassert (XINT (box) != 0); | 5702 | eassert (XINT (box) != 0); |
| 5703 | face->box = FACE_SIMPLE_BOX; | 5703 | face->box = FACE_SIMPLE_BOX; |
| 5704 | face->box_line_width = XINT (box); | 5704 | face->box_line_width = XINT (box); |
| 5705 | face->box_color = face->foreground; | 5705 | face->box_color = face->foreground; |
| @@ -5880,7 +5880,7 @@ map_tty_color (struct frame *f, struct face *face, | |||
| 5880 | foreground_p ? FACE_TTY_DEFAULT_BG_COLOR : FACE_TTY_DEFAULT_FG_COLOR; | 5880 | foreground_p ? FACE_TTY_DEFAULT_BG_COLOR : FACE_TTY_DEFAULT_FG_COLOR; |
| 5881 | #endif | 5881 | #endif |
| 5882 | 5882 | ||
| 5883 | xassert (idx == LFACE_FOREGROUND_INDEX || idx == LFACE_BACKGROUND_INDEX); | 5883 | eassert (idx == LFACE_FOREGROUND_INDEX || idx == LFACE_BACKGROUND_INDEX); |
| 5884 | 5884 | ||
| 5885 | XSETFRAME (frame, f); | 5885 | XSETFRAME (frame, f); |
| 5886 | color = face->lface[idx]; | 5886 | color = face->lface[idx]; |
| @@ -5948,7 +5948,7 @@ realize_tty_face (struct face_cache *cache, Lisp_Object *attrs) | |||
| 5948 | struct frame *f = cache->f; | 5948 | struct frame *f = cache->f; |
| 5949 | 5949 | ||
| 5950 | /* Frame must be a termcap frame. */ | 5950 | /* Frame must be a termcap frame. */ |
| 5951 | xassert (FRAME_TERMCAP_P (cache->f) || FRAME_MSDOS_P (cache->f)); | 5951 | eassert (FRAME_TERMCAP_P (cache->f) || FRAME_MSDOS_P (cache->f)); |
| 5952 | 5952 | ||
| 5953 | /* Allocate a new realized face. */ | 5953 | /* Allocate a new realized face. */ |
| 5954 | face = make_realized_face (attrs); | 5954 | face = make_realized_face (attrs); |
| @@ -6079,7 +6079,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos, | |||
| 6079 | 6079 | ||
| 6080 | /* W must display the current buffer. We could write this function | 6080 | /* W must display the current buffer. We could write this function |
| 6081 | to use the frame and buffer of W, but right now it doesn't. */ | 6081 | to use the frame and buffer of W, but right now it doesn't. */ |
| 6082 | /* xassert (XBUFFER (w->buffer) == current_buffer); */ | 6082 | /* eassert (XBUFFER (w->buffer) == current_buffer); */ |
| 6083 | 6083 | ||
| 6084 | XSETFRAME (frame, f); | 6084 | XSETFRAME (frame, f); |
| 6085 | XSETFASTINT (position, pos); | 6085 | XSETFASTINT (position, pos); |
| @@ -6189,7 +6189,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos, | |||
| 6189 | 6189 | ||
| 6190 | /* W must display the current buffer. We could write this function | 6190 | /* W must display the current buffer. We could write this function |
| 6191 | to use the frame and buffer of W, but right now it doesn't. */ | 6191 | to use the frame and buffer of W, but right now it doesn't. */ |
| 6192 | /* xassert (XBUFFER (w->buffer) == current_buffer); */ | 6192 | /* eassert (XBUFFER (w->buffer) == current_buffer); */ |
| 6193 | 6193 | ||
| 6194 | XSETFRAME (frame, f); | 6194 | XSETFRAME (frame, f); |
| 6195 | XSETFASTINT (position, pos); | 6195 | XSETFASTINT (position, pos); |
| @@ -6293,7 +6293,7 @@ face_at_string_position (struct window *w, Lisp_Object string, | |||
| 6293 | *endptr = -1; | 6293 | *endptr = -1; |
| 6294 | 6294 | ||
| 6295 | base_face = FACE_FROM_ID (f, base_face_id); | 6295 | base_face = FACE_FROM_ID (f, base_face_id); |
| 6296 | xassert (base_face); | 6296 | eassert (base_face); |
| 6297 | 6297 | ||
| 6298 | /* Optimize the default case that there is no face property and we | 6298 | /* Optimize the default case that there is no face property and we |
| 6299 | are not in the region. */ | 6299 | are not in the region. */ |
diff --git a/src/xfns.c b/src/xfns.c index 02aefe9d91a..00cf9f8e081 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -2914,7 +2914,7 @@ unwind_create_frame (Lisp_Object frame) | |||
| 2914 | /* If frame is ``official'', nothing to do. */ | 2914 | /* If frame is ``official'', nothing to do. */ |
| 2915 | if (NILP (Fmemq (frame, Vframe_list))) | 2915 | if (NILP (Fmemq (frame, Vframe_list))) |
| 2916 | { | 2916 | { |
| 2917 | #if GLYPH_DEBUG && XASSERTS | 2917 | #if GLYPH_DEBUG && defined ENABLE_CHECKING |
| 2918 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); | 2918 | struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); |
| 2919 | #endif | 2919 | #endif |
| 2920 | 2920 | ||
| @@ -2923,8 +2923,8 @@ unwind_create_frame (Lisp_Object frame) | |||
| 2923 | 2923 | ||
| 2924 | #if GLYPH_DEBUG | 2924 | #if GLYPH_DEBUG |
| 2925 | /* Check that reference counts are indeed correct. */ | 2925 | /* Check that reference counts are indeed correct. */ |
| 2926 | xassert (dpyinfo->reference_count == dpyinfo_refcount); | 2926 | eassert (dpyinfo->reference_count == dpyinfo_refcount); |
| 2927 | xassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount); | 2927 | eassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount); |
| 2928 | #endif | 2928 | #endif |
| 2929 | return Qt; | 2929 | return Qt; |
| 2930 | } | 2930 | } |
diff --git a/src/xselect.c b/src/xselect.c index f21c57b44bb..4d961d73bf1 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -1359,7 +1359,7 @@ x_get_window_property (Display *display, Window window, Atom property, | |||
| 1359 | break; | 1359 | break; |
| 1360 | 1360 | ||
| 1361 | bytes_per_item = *actual_format_ret >> 3; | 1361 | bytes_per_item = *actual_format_ret >> 3; |
| 1362 | xassert (*actual_size_ret <= buffer_size / bytes_per_item); | 1362 | eassert (*actual_size_ret <= buffer_size / bytes_per_item); |
| 1363 | 1363 | ||
| 1364 | /* The man page for XGetWindowProperty says: | 1364 | /* The man page for XGetWindowProperty says: |
| 1365 | "If the returned format is 32, the returned data is represented | 1365 | "If the returned format is 32, the returned data is represented |
diff --git a/src/xterm.c b/src/xterm.c index be01513d910..8e978edf7d9 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -715,7 +715,7 @@ x_after_update_window_line (struct glyph_row *desired_row) | |||
| 715 | struct frame *f; | 715 | struct frame *f; |
| 716 | int width, height; | 716 | int width, height; |
| 717 | 717 | ||
| 718 | xassert (w); | 718 | eassert (w); |
| 719 | 719 | ||
| 720 | if (!desired_row->mode_line_p && !w->pseudo_window_p) | 720 | if (!desired_row->mode_line_p && !w->pseudo_window_p) |
| 721 | desired_row->redraw_fringe_bitmaps_p = 1; | 721 | desired_row->redraw_fringe_bitmaps_p = 1; |
| @@ -1033,7 +1033,7 @@ x_set_mouse_face_gc (struct glyph_string *s) | |||
| 1033 | s->gc = FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc; | 1033 | s->gc = FRAME_X_DISPLAY_INFO (s->f)->scratch_cursor_gc; |
| 1034 | 1034 | ||
| 1035 | } | 1035 | } |
| 1036 | xassert (s->gc != 0); | 1036 | eassert (s->gc != 0); |
| 1037 | } | 1037 | } |
| 1038 | 1038 | ||
| 1039 | 1039 | ||
| @@ -1090,7 +1090,7 @@ x_set_glyph_string_gc (struct glyph_string *s) | |||
| 1090 | } | 1090 | } |
| 1091 | 1091 | ||
| 1092 | /* GC must have been set. */ | 1092 | /* GC must have been set. */ |
| 1093 | xassert (s->gc != 0); | 1093 | eassert (s->gc != 0); |
| 1094 | } | 1094 | } |
| 1095 | 1095 | ||
| 1096 | 1096 | ||
| @@ -1691,8 +1691,8 @@ x_query_colors (struct frame *f, XColor *colors, int ncolors) | |||
| 1691 | for (i = 0; i < ncolors; ++i) | 1691 | for (i = 0; i < ncolors; ++i) |
| 1692 | { | 1692 | { |
| 1693 | unsigned long pixel = colors[i].pixel; | 1693 | unsigned long pixel = colors[i].pixel; |
| 1694 | xassert (pixel < dpyinfo->ncolor_cells); | 1694 | eassert (pixel < dpyinfo->ncolor_cells); |
| 1695 | xassert (dpyinfo->color_cells[pixel].pixel == pixel); | 1695 | eassert (dpyinfo->color_cells[pixel].pixel == pixel); |
| 1696 | colors[i] = dpyinfo->color_cells[pixel]; | 1696 | colors[i] = dpyinfo->color_cells[pixel]; |
| 1697 | } | 1697 | } |
| 1698 | } | 1698 | } |
| @@ -1850,7 +1850,7 @@ x_alloc_lighter_color (struct frame *f, Display *display, Colormap cmap, long un | |||
| 1850 | x_query_color (f, &color); | 1850 | x_query_color (f, &color); |
| 1851 | 1851 | ||
| 1852 | /* Change RGB values by specified FACTOR. Avoid overflow! */ | 1852 | /* Change RGB values by specified FACTOR. Avoid overflow! */ |
| 1853 | xassert (factor >= 0); | 1853 | eassert (factor >= 0); |
| 1854 | new.red = min (0xffff, factor * color.red); | 1854 | new.red = min (0xffff, factor * color.red); |
| 1855 | new.green = min (0xffff, factor * color.green); | 1855 | new.green = min (0xffff, factor * color.green); |
| 1856 | new.blue = min (0xffff, factor * color.blue); | 1856 | new.blue = min (0xffff, factor * color.blue); |
| @@ -2562,7 +2562,7 @@ x_draw_image_glyph_string (struct glyph_string *s) | |||
| 2562 | static void | 2562 | static void |
| 2563 | x_draw_stretch_glyph_string (struct glyph_string *s) | 2563 | x_draw_stretch_glyph_string (struct glyph_string *s) |
| 2564 | { | 2564 | { |
| 2565 | xassert (s->first_glyph->type == STRETCH_GLYPH); | 2565 | eassert (s->first_glyph->type == STRETCH_GLYPH); |
| 2566 | 2566 | ||
| 2567 | if (s->hl == DRAW_CURSOR | 2567 | if (s->hl == DRAW_CURSOR |
| 2568 | && !x_stretch_cursor_p) | 2568 | && !x_stretch_cursor_p) |
| @@ -3026,7 +3026,7 @@ x_delete_glyphs (struct frame *f, register int n) | |||
| 3026 | void | 3026 | void |
| 3027 | x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures) | 3027 | x_clear_area (Display *dpy, Window window, int x, int y, int width, int height, int exposures) |
| 3028 | { | 3028 | { |
| 3029 | xassert (width > 0 && height > 0); | 3029 | eassert (width > 0 && height > 0); |
| 3030 | XClearArea (dpy, window, x, y, width, height, exposures); | 3030 | XClearArea (dpy, window, x, y, width, height, exposures); |
| 3031 | } | 3031 | } |
| 3032 | 3032 | ||
| @@ -9809,9 +9809,9 @@ x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y) | |||
| 9809 | static void | 9809 | static void |
| 9810 | x_check_font (struct frame *f, struct font *font) | 9810 | x_check_font (struct frame *f, struct font *font) |
| 9811 | { | 9811 | { |
| 9812 | xassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX])); | 9812 | eassert (font != NULL && ! NILP (font->props[FONT_TYPE_INDEX])); |
| 9813 | if (font->driver->check) | 9813 | if (font->driver->check) |
| 9814 | xassert (font->driver->check (f, font) == 0); | 9814 | eassert (font->driver->check (f, font) == 0); |
| 9815 | } | 9815 | } |
| 9816 | 9816 | ||
| 9817 | #endif /* GLYPH_DEBUG != 0 */ | 9817 | #endif /* GLYPH_DEBUG != 0 */ |