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/scroll.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/scroll.c')
| -rw-r--r-- | src/scroll.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scroll.c b/src/scroll.c index 78ebe65bdcc..79dd464b29e 100644 --- a/src/scroll.c +++ b/src/scroll.c | |||
| @@ -195,13 +195,13 @@ calculate_scrolling (FRAME_PTR frame, | |||
| 195 | { | 195 | { |
| 196 | cost = p1->writecost + first_insert_cost[i]; | 196 | cost = p1->writecost + first_insert_cost[i]; |
| 197 | if ((int) p1->insertcount > i) | 197 | if ((int) p1->insertcount > i) |
| 198 | abort (); | 198 | emacs_abort (); |
| 199 | cost1 = p1->insertcost + next_insert_cost[i - p1->insertcount]; | 199 | cost1 = p1->insertcost + next_insert_cost[i - p1->insertcount]; |
| 200 | } | 200 | } |
| 201 | p->insertcost = min (cost, cost1) + draw_cost[i] + extra_cost; | 201 | p->insertcost = min (cost, cost1) + draw_cost[i] + extra_cost; |
| 202 | p->insertcount = (cost < cost1) ? 1 : p1->insertcount + 1; | 202 | p->insertcount = (cost < cost1) ? 1 : p1->insertcount + 1; |
| 203 | if ((int) p->insertcount > i) | 203 | if ((int) p->insertcount > i) |
| 204 | abort (); | 204 | emacs_abort (); |
| 205 | 205 | ||
| 206 | /* Calculate the cost if we do a delete line after | 206 | /* Calculate the cost if we do a delete line after |
| 207 | outputting this line. | 207 | outputting this line. |