diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-09-04 10:34:54 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-09-04 10:34:54 -0700 |
commit | 1088b9226e7dac7314dab52ef0696a5f540900cd (patch) | |
tree | bfae7d26f4b411f5c6a0ef33cfcd0c526619ee56 /src/intervals.c | |
parent | 30934d334e8a67c8992d910428758d5b93e0f04f (diff) | |
download | emacs-1088b9226e7dac7314dab52ef0696a5f540900cd.tar.gz |
Simplify redefinition of 'abort' (Bug#12316).
Do not try to redefine the 'abort' function. Instead, redo
the code so that it calls 'emacs_abort' rather than 'abort'.
This removes the need for the NO_ABORT configure-time macro
and makes it easier to change the abort code to do a backtrace.
* configure.ac (NO_ABRT): Remove.
* admin/CPP-DEFINES (NO_ABORT): Remove.
* nt/inc/ms-w32.h (w32_abort) [HAVE_NTGUI]: Remove.
* src/.gdbinit: Just stop at emacs_abort, not at w32_abort or abort.
* src/emacs.c (abort) [!DOS_NT && !NO_ABORT]:
Remove; sysdep.c's emacs_abort now takes its place.
* src/lisp.h (emacs_abort): New decl. All calls from Emacs code to
'abort' changed to use 'emacs_abort'.
* src/msdos.c (dos_abort) [defined abort]: Remove; not used.
(abort) [!defined abort]: Rename to ...
(emacs_abort): ... new name.
* src/sysdep.c (emacs_abort) [!HAVE_NTGUI]: New function, taking
the place of the old 'abort' in emacs.c.
* src/w32.c, src/w32fns.c (abort): Do not #undef.
* src/w32.c (emacs_abort): Rename from w32_abort.
Diffstat (limited to 'src/intervals.c')
-rw-r--r-- | src/intervals.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/intervals.c b/src/intervals.c index 49d61b2f9b0..e508f968963 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -199,13 +199,13 @@ intervals_equal (INTERVAL i0, INTERVAL i1) i0_sym = XCAR (i0_cdr); i0_cdr = XCDR (i0_cdr); if (!CONSP (i0_cdr)) - return 0; /* abort (); */ + return 0; i1_val = i1->plist; while (CONSP (i1_val) && !EQ (XCAR (i1_val), i0_sym)) { i1_val = XCDR (i1_val); if (!CONSP (i1_val)) - return 0; /* abort (); */ + return 0; i1_val = XCDR (i1_val); } @@ -223,7 +223,7 @@ intervals_equal (INTERVAL i0, INTERVAL i1) i1_cdr = XCDR (i1_cdr); if (!CONSP (i1_cdr)) - return 0; /* abort (); */ + return 0; i1_cdr = XCDR (i1_cdr); } @@ -1253,7 +1253,7 @@ delete_interval (register INTERVAL i) else if (STRINGP (owner)) set_string_intervals (owner, parent); else - abort (); + emacs_abort (); return; } @@ -1408,7 +1408,7 @@ offset_intervals (struct buffer *buffer, ptrdiff_t start, ptrdiff_t length) start, length); else { - IF_LINT (if (length < - TYPE_MAXIMUM (ptrdiff_t)) abort ();) + lint_assume (- TYPE_MAXIMUM (ptrdiff_t) <= length); adjust_intervals_for_deletion (buffer, start, -length); } } @@ -1468,7 +1468,7 @@ merge_interval_right (register INTERVAL i) /* This must be the rightmost or last interval and cannot be merged right. The caller should have known. */ - abort (); + emacs_abort (); } /* Merge interval I with its lexicographic predecessor. The resulting @@ -1524,7 +1524,7 @@ merge_interval_left (register INTERVAL i) /* This must be the leftmost or first interval and cannot be merged left. The caller should have known. */ - abort (); + emacs_abort (); } /* Create a copy of SOURCE but with the default value of UP. */ @@ -2170,7 +2170,7 @@ get_property_and_range (ptrdiff_t pos, Lisp_Object prop, Lisp_Object *val, else if (STRINGP (object)) i = find_interval (string_intervals (object), pos); else - abort (); + emacs_abort (); if (!i || (i->position + LENGTH (i) <= pos)) return 0; @@ -2209,7 +2209,7 @@ get_local_map (register ptrdiff_t position, register struct buffer *buffer, /* Perhaps we should just change `position' to the limit. */ if (position > BUF_ZV (buffer) || position < BUF_BEGV (buffer)) - abort (); + emacs_abort (); /* Ignore narrowing, so that a local map continues to be valid even if the visible region contains no characters and hence no properties. */ |