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/xterm.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/xterm.c')
-rw-r--r-- | src/xterm.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/xterm.c b/src/xterm.c index f497b5322bf..047b5569bf4 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1467,7 +1467,7 @@ x_frame_of_widget (Widget widget) && f->output_data.x->widget == widget) return f; - abort (); + emacs_abort (); } /* Allocate a color which is lighter or darker than *PIXEL by FACTOR @@ -2696,7 +2696,7 @@ x_draw_underwave (struct glyph_string *s) y2 += dy; if (INT_MAX - dx < xmax) - abort (); + emacs_abort (); while (x1 <= xmax) { @@ -2805,7 +2805,7 @@ x_draw_glyph_string (struct glyph_string *s) break; default: - abort (); + emacs_abort (); } if (!s->for_overlaps) @@ -3005,7 +3005,7 @@ x_shift_glyphs_for_insert (struct frame *f, int x, int y, int width, int height, static void x_delete_glyphs (struct frame *f, register int n) { - abort (); + emacs_abort (); } @@ -3278,7 +3278,7 @@ XTset_terminal_window (struct frame *f, int n) static void x_ins_del_lines (struct frame *f, int vpos, int n) { - abort (); + emacs_abort (); } @@ -4115,7 +4115,7 @@ x_window_to_scroll_bar (Display *display, Window window_id) frame = XCAR (tail); /* All elements of Vframe_list should be frames. */ if (! FRAMEP (frame)) - abort (); + emacs_abort (); if (! FRAME_X_P (XFRAME (frame))) continue; @@ -5434,7 +5434,7 @@ XTredeem_scroll_bar (struct window *window) /* We can't redeem this window's scroll bar if it doesn't have one. */ if (NILP (window->vertical_scroll_bar)) - abort (); + emacs_abort (); bar = XSCROLL_BAR (window->vertical_scroll_bar); @@ -5453,7 +5453,7 @@ XTredeem_scroll_bar (struct window *window) else /* If its prev pointer is nil, it must be at the front of one or the other! */ - abort (); + emacs_abort (); } else XSCROLL_BAR (bar->prev)->next = bar->next; @@ -5551,7 +5551,7 @@ static void x_scroll_bar_handle_click (struct scroll_bar *bar, XEvent *event, struct input_event *emacs_event) { if (! WINDOWP (bar->window)) - abort (); + emacs_abort (); emacs_event->kind = SCROLL_BAR_CLICK_EVENT; emacs_event->code = event->xbutton.button - Button1; @@ -6457,7 +6457,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, XEvent *eventptr, } else if (status_return != XLookupKeySym && status_return != XLookupBoth) - abort (); + emacs_abort (); } else nbytes = XLookupString (&event.xkey, (char *) copy_bufptr, @@ -7496,7 +7496,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int break; default: - abort (); + emacs_abort (); } } @@ -7849,7 +7849,7 @@ When compiled with GTK, Emacs cannot recover from X disconnects.\n\ This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715\n\ For details, see etc/PROBLEMS.\n", error_msg); - abort (); + emacs_abort (); #endif /* USE_GTK */ /* Indicate that this display is dead. */ @@ -7859,7 +7859,7 @@ For details, see etc/PROBLEMS.\n", dpyinfo->terminal->reference_count--; if (dpyinfo->reference_count != 0) /* We have just closed all frames on this display. */ - abort (); + emacs_abort (); { Lisp_Object tmp; @@ -10436,7 +10436,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) to.addr = (XPointer)&font; x_catch_errors (dpy); if (!XtCallConverter (dpy, XtCvtStringToFont, &d, 1, &fr, &to, NULL)) - abort (); + emacs_abort (); if (x_had_errors_p (dpy) || !XQueryFont (dpy, font)) XrmPutLineResource (&xrdb, "Emacs.dialog.*.font: 9x15"); x_uncatch_errors (); |