diff options
| author | Paul Eggert | 2012-09-04 10:34:54 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-09-04 10:34:54 -0700 |
| commit | 1088b9226e7dac7314dab52ef0696a5f540900cd (patch) | |
| tree | bfae7d26f4b411f5c6a0ef33cfcd0c526619ee56 /src/coding.c | |
| parent | 30934d334e8a67c8992d910428758d5b93e0f04f (diff) | |
| download | emacs-1088b9226e7dac7314dab52ef0696a5f540900cd.tar.gz emacs-1088b9226e7dac7314dab52ef0696a5f540900cd.zip | |
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/coding.c')
| -rw-r--r-- | src/coding.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/coding.c b/src/coding.c index 02e7b34695e..94a2d9fea80 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -2051,7 +2051,7 @@ emacs_mule_char (struct coding_system *coding, const unsigned char *src, | |||
| 2051 | break; | 2051 | break; |
| 2052 | 2052 | ||
| 2053 | default: | 2053 | default: |
| 2054 | abort (); | 2054 | emacs_abort (); |
| 2055 | } | 2055 | } |
| 2056 | CODING_DECODE_CHAR (coding, src, src_base, src_end, | 2056 | CODING_DECODE_CHAR (coding, src, src_base, src_end, |
| 2057 | CHARSET_FROM_ID (charset_ID), code, c); | 2057 | CHARSET_FROM_ID (charset_ID), code, c); |
| @@ -2345,7 +2345,7 @@ decode_coding_emacs_mule (struct coding_system *coding) | |||
| 2345 | int i; | 2345 | int i; |
| 2346 | 2346 | ||
| 2347 | if (charbuf_end - charbuf < cmp_status->length) | 2347 | if (charbuf_end - charbuf < cmp_status->length) |
| 2348 | abort (); | 2348 | emacs_abort (); |
| 2349 | for (i = 0; i < cmp_status->length; i++) | 2349 | for (i = 0; i < cmp_status->length; i++) |
| 2350 | *charbuf++ = cmp_status->carryover[i]; | 2350 | *charbuf++ = cmp_status->carryover[i]; |
| 2351 | coding->annotated = 1; | 2351 | coding->annotated = 1; |
| @@ -2619,7 +2619,7 @@ encode_coding_emacs_mule (struct coding_system *coding) | |||
| 2619 | preferred_charset_id = -1; | 2619 | preferred_charset_id = -1; |
| 2620 | break; | 2620 | break; |
| 2621 | default: | 2621 | default: |
| 2622 | abort (); | 2622 | emacs_abort (); |
| 2623 | } | 2623 | } |
| 2624 | charbuf += -c - 1; | 2624 | charbuf += -c - 1; |
| 2625 | continue; | 2625 | continue; |
| @@ -3482,7 +3482,7 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3482 | if (cmp_status->state != COMPOSING_NO) | 3482 | if (cmp_status->state != COMPOSING_NO) |
| 3483 | { | 3483 | { |
| 3484 | if (charbuf_end - charbuf < cmp_status->length) | 3484 | if (charbuf_end - charbuf < cmp_status->length) |
| 3485 | abort (); | 3485 | emacs_abort (); |
| 3486 | for (i = 0; i < cmp_status->length; i++) | 3486 | for (i = 0; i < cmp_status->length; i++) |
| 3487 | *charbuf++ = cmp_status->carryover[i]; | 3487 | *charbuf++ = cmp_status->carryover[i]; |
| 3488 | coding->annotated = 1; | 3488 | coding->annotated = 1; |
| @@ -3864,7 +3864,7 @@ decode_coding_iso_2022 (struct coding_system *coding) | |||
| 3864 | break; | 3864 | break; |
| 3865 | 3865 | ||
| 3866 | default: | 3866 | default: |
| 3867 | abort (); | 3867 | emacs_abort (); |
| 3868 | } | 3868 | } |
| 3869 | 3869 | ||
| 3870 | if (cmp_status->state == COMPOSING_NO | 3870 | if (cmp_status->state == COMPOSING_NO |
| @@ -4419,7 +4419,7 @@ encode_coding_iso_2022 (struct coding_system *coding) | |||
| 4419 | preferred_charset_id = -1; | 4419 | preferred_charset_id = -1; |
| 4420 | break; | 4420 | break; |
| 4421 | default: | 4421 | default: |
| 4422 | abort (); | 4422 | emacs_abort (); |
| 4423 | } | 4423 | } |
| 4424 | charbuf += -c - 1; | 4424 | charbuf += -c - 1; |
| 4425 | continue; | 4425 | continue; |
| @@ -4933,7 +4933,7 @@ encode_coding_sjis (struct coding_system *coding) | |||
| 4933 | } | 4933 | } |
| 4934 | } | 4934 | } |
| 4935 | if (code == CHARSET_INVALID_CODE (charset)) | 4935 | if (code == CHARSET_INVALID_CODE (charset)) |
| 4936 | abort (); | 4936 | emacs_abort (); |
| 4937 | if (charset == charset_kanji) | 4937 | if (charset == charset_kanji) |
| 4938 | { | 4938 | { |
| 4939 | int c1, c2; | 4939 | int c1, c2; |
| @@ -5023,7 +5023,7 @@ encode_coding_big5 (struct coding_system *coding) | |||
| 5023 | } | 5023 | } |
| 5024 | } | 5024 | } |
| 5025 | if (code == CHARSET_INVALID_CODE (charset)) | 5025 | if (code == CHARSET_INVALID_CODE (charset)) |
| 5026 | abort (); | 5026 | emacs_abort (); |
| 5027 | if (charset == charset_big5) | 5027 | if (charset == charset_big5) |
| 5028 | { | 5028 | { |
| 5029 | int c1, c2; | 5029 | int c1, c2; |
| @@ -7190,7 +7190,7 @@ handle_composition_annotation (ptrdiff_t pos, ptrdiff_t limit, | |||
| 7190 | *buf++ = XINT (XCAR (components)); | 7190 | *buf++ = XINT (XCAR (components)); |
| 7191 | } | 7191 | } |
| 7192 | else | 7192 | else |
| 7193 | abort (); | 7193 | emacs_abort (); |
| 7194 | *head -= len; | 7194 | *head -= len; |
| 7195 | } | 7195 | } |
| 7196 | } | 7196 | } |
| @@ -9428,7 +9428,7 @@ usage: (set-coding-system-priority &rest coding-systems) */) | |||
| 9428 | && changed[coding_priorities[j]]) | 9428 | && changed[coding_priorities[j]]) |
| 9429 | j++; | 9429 | j++; |
| 9430 | if (j == coding_category_max) | 9430 | if (j == coding_category_max) |
| 9431 | abort (); | 9431 | emacs_abort (); |
| 9432 | priorities[i] = coding_priorities[j]; | 9432 | priorities[i] = coding_priorities[j]; |
| 9433 | } | 9433 | } |
| 9434 | 9434 | ||