diff options
| author | Kim F. Storm | 2005-03-02 22:35:17 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2005-03-02 22:35:17 +0000 |
| commit | 139c65cf7b6b0bce5f4cd6e45f450ff4f02d5421 (patch) | |
| tree | 66535204b83fa57fa71e43ca16d95f202be9754b /src | |
| parent | db2dacf61063fb315bf68420492567afd593f568 (diff) | |
| download | emacs-139c65cf7b6b0bce5f4cd6e45f450ff4f02d5421.tar.gz emacs-139c65cf7b6b0bce5f4cd6e45f450ff4f02d5421.zip | |
(XASSERTS): Define to 0 if not already defined.
(xassert) [!XASSERTS]: Define dummy version.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispextern.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/dispextern.h b/src/dispextern.h index aa296e12340..1d8c1402c81 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -119,6 +119,13 @@ enum window_part | |||
| 119 | #define GLYPH_DEBUG 0 | 119 | #define GLYPH_DEBUG 0 |
| 120 | #endif | 120 | #endif |
| 121 | 121 | ||
| 122 | /* If XASSERTS is non-zero, additional consistency checks are activated. | ||
| 123 | Turn it off by defining the macro XASSERTS to zero. */ | ||
| 124 | |||
| 125 | #ifndef XASSERTS | ||
| 126 | #define XASSERTS 0 | ||
| 127 | #endif | ||
| 128 | |||
| 122 | /* Macros to include code only if GLYPH_DEBUG != 0. */ | 129 | /* Macros to include code only if GLYPH_DEBUG != 0. */ |
| 123 | 130 | ||
| 124 | #if GLYPH_DEBUG | 131 | #if GLYPH_DEBUG |
| @@ -127,8 +134,11 @@ enum window_part | |||
| 127 | #define IF_DEBUG(X) (void) 0 | 134 | #define IF_DEBUG(X) (void) 0 |
| 128 | #endif | 135 | #endif |
| 129 | 136 | ||
| 130 | /* Maybe move this inside the above `#ifdef GLYPH_DEBUG' for release. */ | 137 | #if XASSERTS |
| 131 | #define xassert(X) do {if (!(X)) abort ();} while (0) | 138 | #define xassert(X) do {if (!(X)) abort ();} while (0) |
| 139 | #else | ||
| 140 | #define xassert(X) (void) 0 | ||
| 141 | #endif | ||
| 132 | 142 | ||
| 133 | /* Macro for displaying traces of redisplay. If Emacs was compiled | 143 | /* Macro for displaying traces of redisplay. If Emacs was compiled |
| 134 | with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to | 144 | with GLYPH_DEBUG != 0, the variable trace_redisplay_p can be set to |