Mercurial > hg > xemacs-beta
changeset 2535:4c1f2310451d
[xemacs-hg @ 2005-01-31 19:29:47 by ben]
define ABORT always
emacs.c: Define assert_failed() always.
lisp.h: Always define ABORT().
author | ben |
---|---|
date | Mon, 31 Jan 2005 19:29:49 +0000 |
parents | 27fda215142d |
children | 7edc33019aa4 |
files | src/ChangeLog src/emacs.c src/lisp.h |
diffstat | 3 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Sun Jan 30 22:51:14 2005 +0000 +++ b/src/ChangeLog Mon Jan 31 19:29:49 2005 +0000 @@ -1,3 +1,10 @@ +2005-01-31 Ben Wing <ben@xemacs.org> + + * emacs.c: + Define assert_failed() always. + * lisp.h: + Always define ABORT(). + 2005-01-29 Ben Wing <ben@xemacs.org> * alloc.c (garbage_collect_1):
--- a/src/emacs.c Sun Jan 30 22:51:14 2005 +0000 +++ b/src/emacs.c Mon Jan 31 19:29:49 2005 +0000 @@ -3796,7 +3796,6 @@ in one session without having to recompile. */ /* #define ASSERTIONS_DONT_ABORT */ -#ifdef USE_ASSERTIONS /* This highly dubious kludge ... shut up Jamie, I'm tired of your slagging. */ /* Nonzero if handling an assertion failure. (Bumped by one each time @@ -3896,7 +3895,6 @@ inhibit_non_essential_conversion_operations = 0; in_assert_failed = 0; } -#endif /* USE_ASSERTIONS */ /* -------------------------------------- */ /* low-memory notification */
--- a/src/lisp.h Sun Jan 30 22:51:14 2005 +0000 +++ b/src/lisp.h Mon Jan 31 19:29:49 2005 +0000 @@ -1,7 +1,7 @@ /* Fundamental definitions for XEmacs Lisp interpreter. Copyright (C) 1985-1987, 1992-1995 Free Software Foundation, Inc. Copyright (C) 1993-1996 Richard Mlynarik. - Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004 Ben Wing. + Copyright (C) 1995, 1996, 2000, 2001, 2002, 2003, 2004, 2005 Ben Wing. This file is part of XEmacs. @@ -1040,26 +1040,25 @@ from error-checking macros. If we're not tricky, we just get the file and line of the inline function, which is not very useful. */ -#ifdef USE_ASSERTIONS /* Highly dubious kludge */ /* (thanks, Jamie, I feel better now -- ben) */ MODULE_API void assert_failed (const Ascbyte *, int, const Ascbyte *); -# define ABORT() (assert_failed (__FILE__, __LINE__, "ABORT()")) +#define ABORT() (assert_failed (__FILE__, __LINE__, "ABORT()")) + +#ifdef USE_ASSERTIONS # define assert(x) ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, #x)) # define assert_with_message(x, msg) \ ((x) ? (void) 0 : assert_failed (__FILE__, __LINE__, msg)) # define assert_at_line(x, file, line) \ ((x) ? (void) 0 : assert_failed (file, line, #x)) +#elif defined (DEBUG_XEMACS) +# define assert(x) ((x) ? (void) 0 : (void) ABORT ()) +# define assert_with_message(x, msg) ((x) ? (void) 0 : (void) ABORT ()) +# define assert_at_line(x, file, line) assert (x) #else -# ifdef DEBUG_XEMACS -# define assert(x) ((x) ? (void) 0 : (void) ABORT ()) -# define assert_with_message(x, msg) ((x) ? (void) 0 : (void) ABORT ()) -# define assert_at_line(x, file, line) assert (x) -# else -# define assert(x) ((void) 0) -# define assert_with_message(x, msg) -# define assert_at_line(x, file, line) assert (x) -# endif +# define assert(x) ((void) 0) +# define assert_with_message(x, msg) +# define assert_at_line(x, file, line) assert (x) #endif /************************************************************************/