aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
authorPaul Eggert2012-09-04 10:34:54 -0700
committerPaul Eggert2012-09-04 10:34:54 -0700
commit1088b9226e7dac7314dab52ef0696a5f540900cd (patch)
treebfae7d26f4b411f5c6a0ef33cfcd0c526619ee56 /src/term.c
parent30934d334e8a67c8992d910428758d5b93e0f04f (diff)
downloademacs-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/term.c')
-rw-r--r--src/term.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/term.c b/src/term.c
index f1a09b39cf9..8cc5dfd2a87 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1498,7 +1498,7 @@ append_glyph (struct it *it)
1498 { 1498 {
1499 glyph->resolved_level = it->bidi_it.resolved_level; 1499 glyph->resolved_level = it->bidi_it.resolved_level;
1500 if ((it->bidi_it.type & 7) != it->bidi_it.type) 1500 if ((it->bidi_it.type & 7) != it->bidi_it.type)
1501 abort (); 1501 emacs_abort ();
1502 glyph->bidi_type = it->bidi_it.type; 1502 glyph->bidi_type = it->bidi_it.type;
1503 } 1503 }
1504 else 1504 else
@@ -1695,7 +1695,7 @@ append_composite_glyph (struct it *it)
1695 { 1695 {
1696 glyph->resolved_level = it->bidi_it.resolved_level; 1696 glyph->resolved_level = it->bidi_it.resolved_level;
1697 if ((it->bidi_it.type & 7) != it->bidi_it.type) 1697 if ((it->bidi_it.type & 7) != it->bidi_it.type)
1698 abort (); 1698 emacs_abort ();
1699 glyph->bidi_type = it->bidi_it.type; 1699 glyph->bidi_type = it->bidi_it.type;
1700 } 1700 }
1701 else 1701 else
@@ -1780,7 +1780,7 @@ append_glyphless_glyph (struct it *it, int face_id, const char *str)
1780 { 1780 {
1781 glyph->resolved_level = it->bidi_it.resolved_level; 1781 glyph->resolved_level = it->bidi_it.resolved_level;
1782 if ((it->bidi_it.type & 7) != it->bidi_it.type) 1782 if ((it->bidi_it.type & 7) != it->bidi_it.type)
1783 abort (); 1783 emacs_abort ();
1784 glyph->bidi_type = it->bidi_it.type; 1784 glyph->bidi_type = it->bidi_it.type;
1785 } 1785 }
1786 else 1786 else
@@ -2250,7 +2250,7 @@ get_named_tty (const char *name)
2250 struct terminal *t; 2250 struct terminal *t;
2251 2251
2252 if (!name) 2252 if (!name)
2253 abort (); 2253 emacs_abort ();
2254 2254
2255 for (t = terminal_list; t; t = t->next_terminal) 2255 for (t = terminal_list; t; t = t->next_terminal)
2256 { 2256 {
@@ -2798,7 +2798,7 @@ create_tty_output (struct frame *f)
2798 struct tty_output *t = xzalloc (sizeof *t); 2798 struct tty_output *t = xzalloc (sizeof *t);
2799 2799
2800 if (! FRAME_TERMCAP_P (f)) 2800 if (! FRAME_TERMCAP_P (f))
2801 abort (); 2801 emacs_abort ();
2802 2802
2803 t->display_info = FRAME_TERMINAL (f)->display_info.tty; 2803 t->display_info = FRAME_TERMINAL (f)->display_info.tty;
2804 2804
@@ -2811,7 +2811,7 @@ static void
2811tty_free_frame_resources (struct frame *f) 2811tty_free_frame_resources (struct frame *f)
2812{ 2812{
2813 if (! FRAME_TERMCAP_P (f)) 2813 if (! FRAME_TERMCAP_P (f))
2814 abort (); 2814 emacs_abort ();
2815 2815
2816 if (FRAME_FACE_CACHE (f)) 2816 if (FRAME_FACE_CACHE (f))
2817 free_frame_faces (f); 2817 free_frame_faces (f);
@@ -2827,7 +2827,7 @@ static void
2827tty_free_frame_resources (struct frame *f) 2827tty_free_frame_resources (struct frame *f)
2828{ 2828{
2829 if (! FRAME_TERMCAP_P (f) && ! FRAME_MSDOS_P (f)) 2829 if (! FRAME_TERMCAP_P (f) && ! FRAME_MSDOS_P (f))
2830 abort (); 2830 emacs_abort ();
2831 2831
2832 if (FRAME_FACE_CACHE (f)) 2832 if (FRAME_FACE_CACHE (f))
2833 free_frame_faces (f); 2833 free_frame_faces (f);
@@ -3108,7 +3108,7 @@ use the Bourne shell command `TERM=... export TERM' (C-shell:\n\
3108 3108
3109#ifndef TERMINFO 3109#ifndef TERMINFO
3110 if (strlen (tty->termcap_term_buffer) >= buffer_size) 3110 if (strlen (tty->termcap_term_buffer) >= buffer_size)
3111 abort (); 3111 emacs_abort ();
3112 buffer_size = strlen (tty->termcap_term_buffer); 3112 buffer_size = strlen (tty->termcap_term_buffer);
3113#endif 3113#endif
3114 tty->termcap_strings_buffer = area = xmalloc (buffer_size); 3114 tty->termcap_strings_buffer = area = xmalloc (buffer_size);
@@ -3467,7 +3467,7 @@ maybe_fatal (int must_succeed, struct terminal *terminal,
3467 verror (str1, ap); 3467 verror (str1, ap);
3468 3468
3469 va_end (ap); 3469 va_end (ap);
3470 abort (); 3470 emacs_abort ();
3471} 3471}
3472 3472
3473void 3473void
@@ -3494,7 +3494,7 @@ delete_tty (struct terminal *terminal)
3494 return; 3494 return;
3495 3495
3496 if (terminal->type != output_termcap) 3496 if (terminal->type != output_termcap)
3497 abort (); 3497 emacs_abort ();
3498 3498
3499 tty = terminal->display_info.tty; 3499 tty = terminal->display_info.tty;
3500 3500
@@ -3508,7 +3508,7 @@ delete_tty (struct terminal *terminal)
3508 3508
3509 if (! p) 3509 if (! p)
3510 /* This should not happen. */ 3510 /* This should not happen. */
3511 abort (); 3511 emacs_abort ();
3512 3512
3513 p->next = tty->next; 3513 p->next = tty->next;
3514 tty->next = 0; 3514 tty->next = 0;