Mercurial > emacs
changeset 105669:68dd71358159
* alloc.c: Do not define struct catchtag.
* eval.c: Move struct catchtag definition ...
* lisp.h: ... here.
* image.c: Move png.h #include earlier to avoid warnings.
* xterm.c:
* xsmfns.c:
* xselect.c:
* xrdb.c:
* xmenu.c:
* xftfont.c:
* xfont.c:
* xfns.c:
* xfaces.c:
* xdisp.c:
* window.c:
* widget.c:
* w32xfns.c:
* w32uniscribe.c:
* w32term.c:
* w32select.c:
* w32reg.c:
* w32proc.c:
* w32menu.c:
* w32inevt.c:
* w32heap.c:
* w32font.c:
* w32fns.c:
* w32console.c:
* w32.c:
* w16select.c:
* vm-limit.c:
* unexsol.c:
* unexec.c:
* unexcw.c:
* unexaix.c:
* undo.c:
* tparam.c:
* textprop.c:
* terminfo.c:
* terminal.c:
* termcap.c:
* term.c:
* syntax.c:
* sound.c:
* sheap.c:
* search.c:
* scroll.c:
* region-cache.c:
* regex.c:
* ralloc.c:
* process.c:
* print.c:
* msdos.c:
* minibuf.c:
* menu.c:
* marker.c:
* macros.c:
* keymap.c:
* keyboard.c:
* intervals.c:
* insdel.c:
* indent.c:
* gtkutil.c:
* ftxfont.c:
* ftfont.c:
* fringe.c:
* frame.c:
* fontset.c:
* font.c:
* fns.c:
* floatfns.c:
* filelock.c:
* fileio.c:
* emacs.c:
* editfns.c:
* dosfns.c:
* doprnt.c:
* doc.c:
* dispnew.c:
* dired.c:
* dbusbind.c:
* data.c:
* composite.c:
* coding.c:
* cmds.c:
* cm.c:
* chartab.c:
* charset.c:
* character.c:
* ccl.c:
* category.c:
* casetab.c:
* casefiddle.c:
* callproc.c:
* callint.c:
* bytecode.c:
* buffer.c:
* atimer.c: Include setjmp.h. (Bug#4643)
* xlwmenu.c:
* lwlib.c:
* lwlib-utils.c:
* lwlib-Xm.c:
* lwlib-Xlw.c:
* lwlib-Xaw.c: Include setjmp.h.
line wrap: on
line diff
--- a/lwlib/ChangeLog Sun Oct 18 23:56:07 2009 +0000 +++ b/lwlib/ChangeLog Mon Oct 19 04:27:09 2009 +0000 @@ -1,3 +1,12 @@ +2009-10-19 Dan Nicolaescu <dann@ics.uci.edu> + + * xlwmenu.c: + * lwlib.c: + * lwlib-utils.c: + * lwlib-Xm.c: + * lwlib-Xlw.c: + * lwlib-Xaw.c: Include setjmp.h. + 2009-06-21 Chong Yidong <cyd@stupidchicken.com> * Branch for 23.1.
--- a/lwlib/lwlib-Xaw.c Sun Oct 18 23:56:07 2009 +0000 +++ b/lwlib/lwlib-Xaw.c Mon Oct 19 04:27:09 2009 +0000 @@ -25,6 +25,7 @@ #endif #include <stdio.h> +#include <setjmp.h> #include "../src/lisp.h"
--- a/lwlib/lwlib-Xlw.c Sun Oct 18 23:56:07 2009 +0000 +++ b/lwlib/lwlib-Xlw.c Mon Oct 19 04:27:09 2009 +0000 @@ -24,6 +24,7 @@ #include <config.h> #endif +#include <setjmp.h> #include "lisp.h" #include "lwlib-Xlw.h"
--- a/lwlib/lwlib-Xm.c Sun Oct 18 23:56:07 2009 +0000 +++ b/lwlib/lwlib-Xm.c Mon Oct 19 04:27:09 2009 +0000 @@ -26,6 +26,7 @@ #include <unistd.h> #include <stdio.h> +#include <setjmp.h> #include <X11/StringDefs.h> #include <X11/IntrinsicP.h>
--- a/lwlib/lwlib-utils.c Sun Oct 18 23:56:07 2009 +0000 +++ b/lwlib/lwlib-utils.c Mon Oct 19 04:27:09 2009 +0000 @@ -31,6 +31,7 @@ #undef index #undef rindex +#include <setjmp.h> #include "../src/lisp.h" #include <X11/Xatom.h>
--- a/lwlib/lwlib.c Sun Oct 18 23:56:07 2009 +0000 +++ b/lwlib/lwlib.c Mon Oct 19 04:27:09 2009 +0000 @@ -24,6 +24,7 @@ #include <config.h> #endif +#include <setjmp.h> #include "../src/lisp.h" #include <sys/types.h>
--- a/lwlib/xlwmenu.c Sun Oct 18 23:56:07 2009 +0000 +++ b/lwlib/xlwmenu.c Mon Oct 19 04:27:09 2009 +0000 @@ -26,6 +26,7 @@ #include <config.h> #endif +#include <setjmp.h> #include "lisp.h" #include <stdio.h>
--- a/src/ChangeLog Sun Oct 18 23:56:07 2009 +0000 +++ b/src/ChangeLog Mon Oct 19 04:27:09 2009 +0000 @@ -1,3 +1,106 @@ +2009-10-19 Dan Nicolaescu <dann@ics.uci.edu> + + * alloc.c: Do not define struct catchtag. + * eval.c: Move struct catchtag definition ... + * lisp.h: ... here. + + * image.c: Move png.h #include earlier to avoid warnings. + + * xterm.c: + * xsmfns.c: + * xselect.c: + * xrdb.c: + * xmenu.c: + * xftfont.c: + * xfont.c: + * xfns.c: + * xfaces.c: + * xdisp.c: + * window.c: + * widget.c: + * w32xfns.c: + * w32uniscribe.c: + * w32term.c: + * w32select.c: + * w32reg.c: + * w32proc.c: + * w32menu.c: + * w32inevt.c: + * w32heap.c: + * w32font.c: + * w32fns.c: + * w32console.c: + * w32.c: + * w16select.c: + * vm-limit.c: + * unexsol.c: + * unexec.c: + * unexcw.c: + * unexaix.c: + * undo.c: + * tparam.c: + * textprop.c: + * terminfo.c: + * terminal.c: + * termcap.c: + * term.c: + * syntax.c: + * sound.c: + * sheap.c: + * search.c: + * scroll.c: + * region-cache.c: + * regex.c: + * ralloc.c: + * process.c: + * print.c: + * msdos.c: + * minibuf.c: + * menu.c: + * marker.c: + * macros.c: + * keymap.c: + * keyboard.c: + * intervals.c: + * insdel.c: + * indent.c: + * gtkutil.c: + * ftxfont.c: + * ftfont.c: + * fringe.c: + * frame.c: + * fontset.c: + * font.c: + * fns.c: + * floatfns.c: + * filelock.c: + * fileio.c: + * emacs.c: + * editfns.c: + * dosfns.c: + * doprnt.c: + * doc.c: + * dispnew.c: + * dired.c: + * dbusbind.c: + * data.c: + * composite.c: + * coding.c: + * cmds.c: + * cm.c: + * chartab.c: + * charset.c: + * character.c: + * ccl.c: + * category.c: + * casetab.c: + * casefiddle.c: + * callproc.c: + * callint.c: + * bytecode.c: + * buffer.c: + * atimer.c: Include setjmp.h. (Bug#4643) + 2009-10-18 Stefan Monnier <monnier@iro.umontreal.ca> Remove leftover table unibyte_to_multibyte_table.
--- a/src/alloc.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/alloc.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> #include <limits.h> /* For CHAR_BIT. */ +#include <setjmp.h> #ifdef STDC_HEADERS #include <stddef.h> /* For offsetof, used by PSEUDOVECSIZE. */ @@ -4939,13 +4940,6 @@ abort (); } -struct catchtag -{ - Lisp_Object tag; - Lisp_Object val; - struct catchtag *next; -}; - /*********************************************************************** Protection from GC
--- a/src/atimer.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/atimer.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include <lisp.h> #include <syssignal.h> #include <systime.h>
--- a/src/buffer.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/buffer.c Mon Oct 19 04:27:09 2009 +0000 @@ -26,6 +26,7 @@ #include <sys/param.h> #include <errno.h> #include <stdio.h> +#include <setjmp.h> #ifndef USE_CRT_DLL extern int errno;
--- a/src/bytecode.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/bytecode.c Mon Oct 19 04:27:09 2009 +0000 @@ -34,6 +34,7 @@ */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h"
--- a/src/callint.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/callint.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h"
--- a/src/callproc.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/callproc.c Mon Oct 19 04:27:09 2009 +0000 @@ -23,6 +23,7 @@ #include <signal.h> #include <errno.h> #include <stdio.h> +#include <setjmp.h> #ifndef USE_CRT_DLL extern int errno;
--- a/src/casefiddle.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/casefiddle.c Mon Oct 19 04:27:09 2009 +0000 @@ -19,6 +19,7 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h"
--- a/src/casetab.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/casetab.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h"
--- a/src/category.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/category.c Mon Oct 19 04:27:09 2009 +0000 @@ -30,6 +30,7 @@ #include <config.h> #include <ctype.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h"
--- a/src/ccl.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/ccl.c Mon Oct 19 04:27:09 2009 +0000 @@ -27,6 +27,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "character.h"
--- a/src/character.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/character.c Mon Oct 19 04:27:09 2009 +0000 @@ -34,6 +34,7 @@ #ifdef emacs #include <sys/types.h> +#include <setjmp.h> #include "lisp.h" #include "character.h" #include "buffer.h"
--- a/src/charset.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/charset.c Mon Oct 19 04:27:09 2009 +0000 @@ -31,6 +31,7 @@ #include <unistd.h> #include <ctype.h> #include <sys/types.h> +#include <setjmp.h> #include "lisp.h" #include "character.h" #include "charset.h"
--- a/src/chartab.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/chartab.c Mon Oct 19 04:27:09 2009 +0000 @@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "character.h" #include "charset.h"
--- a/src/cm.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/cm.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "frame.h"
--- a/src/cmds.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/cmds.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "commands.h" #include "buffer.h"
--- a/src/coding.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/coding.c Mon Oct 19 04:27:09 2009 +0000 @@ -289,6 +289,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h"
--- a/src/composite.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/composite.c Mon Oct 19 04:27:09 2009 +0000 @@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h"
--- a/src/data.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/data.c Mon Oct 19 04:27:09 2009 +0000 @@ -22,6 +22,7 @@ #include <config.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "puresize.h" #include "character.h"
--- a/src/dbusbind.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/dbusbind.c Mon Oct 19 04:27:09 2009 +0000 @@ -22,6 +22,7 @@ #include <stdlib.h> #include <stdio.h> #include <dbus/dbus.h> +#include <setjmp.h> #include "lisp.h" #include "frame.h" #include "termhooks.h"
--- a/src/dired.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/dired.c Mon Oct 19 04:27:09 2009 +0000 @@ -23,6 +23,7 @@ #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> +#include <setjmp.h> #ifdef HAVE_PWD_H #include <pwd.h>
--- a/src/dispnew.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/dispnew.c Mon Oct 19 04:27:09 2009 +0000 @@ -22,6 +22,7 @@ #include <signal.h> #include <stdio.h> #include <ctype.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h>
--- a/src/doc.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/doc.c Mon Oct 19 04:27:09 2009 +0000 @@ -24,6 +24,7 @@ #include <sys/types.h> #include <sys/file.h> /* Must be after sys/types.h for USG*/ #include <ctype.h> +#include <setjmp.h> #ifdef HAVE_FCNTL_H #include <fcntl.h>
--- a/src/doprnt.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/doprnt.c Mon Oct 19 04:27:09 2009 +0000 @@ -23,6 +23,7 @@ #include <config.h> #include <stdio.h> #include <ctype.h> +#include <setjmp.h> #ifdef STDC_HEADERS #include <float.h>
--- a/src/dosfns.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/dosfns.c Mon Oct 19 04:27:09 2009 +0000 @@ -26,6 +26,7 @@ #include <stdio.h> #include <string.h> #include <dos.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "termchar.h"
--- a/src/editfns.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/editfns.c Mon Oct 19 04:27:09 2009 +0000 @@ -22,6 +22,7 @@ #include <config.h> #include <sys/types.h> #include <stdio.h> +#include <setjmp.h> #ifdef HAVE_PWD_H #include <pwd.h>
--- a/src/emacs.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/emacs.c Mon Oct 19 04:27:09 2009 +0000 @@ -26,6 +26,7 @@ #include <sys/types.h> #include <sys/file.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h>
--- a/src/eval.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/eval.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,12 +20,12 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "blockinput.h" #include "commands.h" #include "keyboard.h" #include "dispextern.h" -#include <setjmp.h> #if HAVE_X_WINDOWS #include "xterm.h" @@ -49,41 +49,6 @@ struct backtrace *backtrace_list; -/* This structure helps implement the `catch' and `throw' control - structure. A struct catchtag contains all the information needed - to restore the state of the interpreter after a non-local jump. - - Handlers for error conditions (represented by `struct handler' - structures) just point to a catch tag to do the cleanup required - for their jumps. - - catchtag structures are chained together in the C calling stack; - the `next' member points to the next outer catchtag. - - A call like (throw TAG VAL) searches for a catchtag whose `tag' - member is TAG, and then unbinds to it. The `val' member is used to - hold VAL while the stack is unwound; `val' is returned as the value - of the catch form. - - All the other members are concerned with restoring the interpreter - state. */ - -struct catchtag -{ - Lisp_Object tag; - Lisp_Object val; - struct catchtag *next; - struct gcpro *gcpro; - jmp_buf jmp; - struct backtrace *backlist; - struct handler *handlerlist; - int lisp_eval_depth; - int pdlcount; - int poll_suppress_count; - int interrupt_input_blocked; - struct byte_stack *byte_stack; -}; - struct catchtag *catchlist; #ifdef DEBUG_GCPRO
--- a/src/fileio.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/fileio.c Mon Oct 19 04:27:09 2009 +0000 @@ -28,6 +28,7 @@ #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h>
--- a/src/filelock.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/filelock.c Mon Oct 19 04:27:09 2009 +0000 @@ -24,6 +24,7 @@ #include <sys/stat.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #ifdef HAVE_PWD_H #include <pwd.h>
--- a/src/floatfns.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/floatfns.c Mon Oct 19 04:27:09 2009 +0000 @@ -48,6 +48,7 @@ #include <config.h> #include <signal.h> +#include <setjmp.h> #include "lisp.h" #include "syssignal.h"
--- a/src/fns.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/fns.c Mon Oct 19 04:27:09 2009 +0000 @@ -24,6 +24,7 @@ #include <unistd.h> #endif #include <time.h> +#include <setjmp.h> /* Note on some machines this defines `vector' as a typedef, so make sure we don't use that name in this file. */
--- a/src/font.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/font.c Mon Oct 19 04:27:09 2009 +0000 @@ -23,6 +23,7 @@ #include <stdio.h> #include <stdlib.h> #include <ctype.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h"
--- a/src/fontset.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/fontset.c Mon Oct 19 04:27:09 2009 +0000 @@ -28,6 +28,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "blockinput.h"
--- a/src/frame.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/frame.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <stdio.h> #include <ctype.h> +#include <setjmp.h> #include "lisp.h" #include "character.h" #ifdef HAVE_X_WINDOWS
--- a/src/fringe.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/fringe.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "frame.h"
--- a/src/ftfont.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/ftfont.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include <fontconfig/fontconfig.h> #include <fontconfig/fcfreetype.h>
--- a/src/ftxfont.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/ftxfont.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include <X11/Xlib.h> #include "lisp.h"
--- a/src/gtkutil.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/gtkutil.c Mon Oct 19 04:27:09 2009 +0000 @@ -23,6 +23,7 @@ #include <string.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "xterm.h" #include "blockinput.h"
--- a/src/image.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/image.c Mon Oct 19 04:27:09 2009 +0000 @@ -27,6 +27,14 @@ #include <unistd.h> #endif +#ifdef HAVE_PNG +#if defined HAVE_LIBPNG_PNG_H +# include <libpng/png.h> +#else +# include <png.h> +#endif +#endif + /* This makes the fields of a Display accessible, in Xlib header files. */ #define XLIB_ILLEGAL_ACCESS @@ -5787,12 +5795,6 @@ #ifdef HAVE_PNG -#if defined HAVE_LIBPNG_PNG_H -# include <libpng/png.h> -#else -# include <png.h> -#endif - #ifdef HAVE_NTGUI /* PNG library details. */
--- a/src/indent.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/indent.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h"
--- a/src/insdel.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/insdel.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "intervals.h" #include "buffer.h"
--- a/src/intervals.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/intervals.c Mon Oct 19 04:27:09 2009 +0000 @@ -39,6 +39,7 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "intervals.h" #include "buffer.h"
--- a/src/keyboard.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/keyboard.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "termchar.h" #include "termopts.h"
--- a/src/keymap.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/keymap.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #if HAVE_ALLOCA_H # include <alloca.h> #endif
--- a/src/lisp.h Sun Oct 18 23:56:07 2009 +0000 +++ b/src/lisp.h Mon Oct 19 04:27:09 2009 +0000 @@ -1826,6 +1826,41 @@ extern struct handler *handlerlist; +/* This structure helps implement the `catch' and `throw' control + structure. A struct catchtag contains all the information needed + to restore the state of the interpreter after a non-local jump. + + Handlers for error conditions (represented by `struct handler' + structures) just point to a catch tag to do the cleanup required + for their jumps. + + catchtag structures are chained together in the C calling stack; + the `next' member points to the next outer catchtag. + + A call like (throw TAG VAL) searches for a catchtag whose `tag' + member is TAG, and then unbinds to it. The `val' member is used to + hold VAL while the stack is unwound; `val' is returned as the value + of the catch form. + + All the other members are concerned with restoring the interpreter + state. */ + +struct catchtag +{ + Lisp_Object tag; + Lisp_Object val; + struct catchtag *next; + struct gcpro *gcpro; + jmp_buf jmp; + struct backtrace *backlist; + struct handler *handlerlist; + int lisp_eval_depth; + int pdlcount; + int poll_suppress_count; + int interrupt_input_blocked; + struct byte_stack *byte_stack; +}; + extern struct catchtag *catchlist; extern struct backtrace *backtrace_list;
--- a/src/macros.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/macros.c Mon Oct 19 04:27:09 2009 +0000 @@ -19,6 +19,7 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "macros.h" #include "commands.h"
--- a/src/marker.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/marker.c Mon Oct 19 04:27:09 2009 +0000 @@ -19,6 +19,7 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h"
--- a/src/menu.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/menu.c Mon Oct 19 04:27:09 2009 +0000 @@ -19,6 +19,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h"
--- a/src/minibuf.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/minibuf.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "commands.h"
--- a/src/msdos.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/msdos.c Mon Oct 19 04:27:09 2009 +0000 @@ -26,6 +26,7 @@ #include <config.h> #ifdef MSDOS +#include <setjmp.h> #include "lisp.h" #include <stdio.h> #include <stdlib.h>
--- a/src/print.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/print.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h"
--- a/src/process.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/process.c Mon Oct 19 04:27:09 2009 +0000 @@ -38,6 +38,7 @@ #include <sys/types.h> /* some typedefs are used in sys/file.h */ #include <sys/file.h> #include <sys/stat.h> +#include <setjmp.h> #ifdef HAVE_INTTYPES_H #include <inttypes.h> #endif @@ -7641,6 +7642,7 @@ #include <sys/stat.h> #include <stdlib.h> #include <fcntl.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif
--- a/src/ralloc.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/ralloc.c Mon Oct 19 04:27:09 2009 +0000 @@ -26,6 +26,7 @@ #ifdef emacs #include <config.h> +#include <setjmp.h> #include "lisp.h" /* Needed for VALBITS. */ #include "blockinput.h"
--- a/src/regex.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/regex.c Mon Oct 19 04:27:09 2009 +0000 @@ -117,6 +117,7 @@ that make sense only in Emacs. */ #ifdef emacs +# include <setjmp.h> # include "lisp.h" # include "buffer.h"
--- a/src/region-cache.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/region-cache.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h"
--- a/src/scroll.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/scroll.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> #include <string.h> +#include <setjmp.h> #include "lisp.h" #include "termchar.h" #include "dispextern.h"
--- a/src/search.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/search.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "syntax.h" #include "category.h"
--- a/src/sheap.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/sheap.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include <unistd.h>
--- a/src/sound.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/sound.c Mon Oct 19 04:27:09 2009 +0000 @@ -44,6 +44,7 @@ #include <unistd.h> #include <sys/types.h> #include <errno.h> +#include <setjmp.h> #include "lisp.h" #include "dispextern.h" #include "atimer.h"
--- a/src/syntax.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/syntax.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <ctype.h> +#include <setjmp.h> #include "lisp.h" #include "commands.h" #include "buffer.h"
--- a/src/term.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/term.c Mon Oct 19 04:27:09 2009 +0000 @@ -37,6 +37,7 @@ #include <signal.h> #include <stdarg.h> +#include <setjmp.h> #include "lisp.h" #include "termchar.h"
--- a/src/termcap.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/termcap.c Mon Oct 19 04:27:09 2009 +0000 @@ -24,6 +24,7 @@ #ifdef emacs +#include <setjmp.h> #include <lisp.h> /* xmalloc is here */ /* Get the O_* definitions for open et al. */ #include <sys/file.h>
--- a/src/terminal.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/terminal.c Mon Oct 19 04:27:09 2009 +0000 @@ -18,6 +18,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "frame.h"
--- a/src/terminfo.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/terminfo.c Mon Oct 19 04:27:09 2009 +0000 @@ -18,6 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> +#include <setjmp.h> #include "lisp.h" /* Define these variables that serve as global parameters to termcap,
--- a/src/textprop.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/textprop.c Mon Oct 19 04:27:09 2009 +0000 @@ -18,6 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "intervals.h" #include "buffer.h"
--- a/src/tparam.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/tparam.c Mon Oct 19 04:27:09 2009 +0000 @@ -23,6 +23,7 @@ #endif #ifdef emacs +#include <setjmp.h> #include "lisp.h" /* for xmalloc */ #else
--- a/src/undo.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/undo.c Mon Oct 19 04:27:09 2009 +0000 @@ -19,6 +19,7 @@ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "commands.h"
--- a/src/unexaix.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/unexaix.c Mon Oct 19 04:27:09 2009 +0000 @@ -104,6 +104,7 @@ static int pagemask; #ifdef emacs +#include <setjmp.h> #include "lisp.h" static void
--- a/src/unexcw.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/unexcw.c Mon Oct 19 04:27:09 2009 +0000 @@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> +#include <setjmp.h> #include <lisp.h> #include <stdio.h> #include <fcntl.h>
--- a/src/unexec.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/unexec.c Mon Oct 19 04:27:09 2009 +0000 @@ -204,6 +204,7 @@ #ifdef emacs +#include <setjmp.h> #include "lisp.h" static
--- a/src/unexsol.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/unexsol.c Mon Oct 19 04:27:09 2009 +0000 @@ -3,6 +3,7 @@ #include <config.h> #include <stdlib.h> #include <dlfcn.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h"
--- a/src/vm-limit.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/vm-limit.c Mon Oct 19 04:27:09 2009 +0000 @@ -19,6 +19,7 @@ #ifdef emacs #include <config.h> +#include <setjmp.h> #include "lisp.h" #endif
--- a/src/w16select.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w16select.c Mon Oct 19 04:27:09 2009 +0000 @@ -32,6 +32,7 @@ #include <dpmi.h> #include <go32.h> #include <sys/farptr.h> +#include <setjmp.h> #include "lisp.h" #include "dispextern.h" /* frame.h seems to want this */ #include "frame.h" /* Need this to get the X window of selected_frame */
--- a/src/w32.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32.c Mon Oct 19 04:27:09 2009 +0000 @@ -34,6 +34,7 @@ #include <sys/utime.h> #include <mbstring.h> /* for _mbspbrk */ #include <math.h> +#include <setjmp.h> /* must include CRT headers *before* config.h */
--- a/src/w32console.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32console.c Mon Oct 19 04:27:09 2009 +0000 @@ -29,6 +29,7 @@ #include <stdio.h> #include <windows.h> #include <string.h> +#include <setjmp.h> #include "lisp.h" #include "character.h"
--- a/src/w32fns.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32fns.c Mon Oct 19 04:27:09 2009 +0000 @@ -27,6 +27,7 @@ #include <limits.h> #include <errno.h> #include <math.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h"
--- a/src/w32font.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32font.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <math.h> #include <ctype.h> #include <commdlg.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h"
--- a/src/w32heap.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32heap.c Mon Oct 19 04:27:09 2009 +0000 @@ -27,6 +27,7 @@ #include <stdlib.h> #include <stdio.h> +#include <setjmp.h> #include "w32heap.h" #include "lisp.h" /* for VALMASK */
--- a/src/w32inevt.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32inevt.c Mon Oct 19 04:27:09 2009 +0000 @@ -30,6 +30,7 @@ #include <stdlib.h> #include <stdio.h> #include <windows.h> +#include <setjmp.h> #ifndef MOUSE_MOVED #define MOUSE_MOVED 1
--- a/src/w32menu.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32menu.c Mon Oct 19 04:27:09 2009 +0000 @@ -23,6 +23,7 @@ #include <signal.h> #include <stdio.h> #include <mbstring.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h"
--- a/src/w32proc.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32proc.c Mon Oct 19 04:27:09 2009 +0000 @@ -29,6 +29,7 @@ #include <fcntl.h> #include <signal.h> #include <sys/file.h> +#include <setjmp.h> /* must include CRT headers *before* config.h */
--- a/src/w32reg.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32reg.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ /* Written by Kevin Gallo */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h" #include "blockinput.h"
--- a/src/w32select.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32select.c Mon Oct 19 04:27:09 2009 +0000 @@ -73,6 +73,7 @@ */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h" /* for all of the w32 includes */ #include "w32heap.h" /* os_subtype */
--- a/src/w32term.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32term.c Mon Oct 19 04:27:09 2009 +0000 @@ -22,6 +22,7 @@ #include <signal.h> #include <stdio.h> #include <stdlib.h> +#include <setjmp.h> #include "lisp.h" #include "blockinput.h" #include "w32term.h"
--- a/src/w32uniscribe.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32uniscribe.c Mon Oct 19 04:27:09 2009 +0000 @@ -27,6 +27,7 @@ #define _WIN32_WINNT 0x500 #include <windows.h> #include <usp10.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h"
--- a/src/w32xfns.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/w32xfns.c Mon Oct 19 04:27:09 2009 +0000 @@ -20,6 +20,7 @@ #include <config.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h" #include "frame.h"
--- a/src/widget.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/widget.c Mon Oct 19 04:27:09 2009 +0000 @@ -31,6 +31,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "xterm.h"
--- a/src/window.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/window.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h"
--- a/src/xdisp.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/xdisp.c Mon Oct 19 04:27:09 2009 +0000 @@ -168,6 +168,7 @@ #include <config.h> #include <stdio.h> #include <limits.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h"
--- a/src/xfaces.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/xfaces.c Mon Oct 19 04:27:09 2009 +0000 @@ -204,6 +204,7 @@ #include <sys/types.h> #include <sys/stat.h> #include <stdio.h> /* This needs to be before termchar.h */ +#include <setjmp.h> #include "lisp.h" #include "character.h"
--- a/src/xfns.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/xfns.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> #include <math.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h>
--- a/src/xfont.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/xfont.c Mon Oct 19 04:27:09 2009 +0000 @@ -22,6 +22,7 @@ #include <config.h> #include <stdio.h> #include <stdlib.h> +#include <setjmp.h> #include <X11/Xlib.h> #include "lisp.h"
--- a/src/xftfont.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/xftfont.c Mon Oct 19 04:27:09 2009 +0000 @@ -21,6 +21,7 @@ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include <X11/Xlib.h> #include <X11/Xft/Xft.h>
--- a/src/xmenu.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/xmenu.c Mon Oct 19 04:27:09 2009 +0000 @@ -37,6 +37,7 @@ #endif #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h"
--- a/src/xrdb.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/xrdb.c Mon Oct 19 04:27:09 2009 +0000 @@ -31,6 +31,7 @@ #include <epaths.h> #include <stdio.h> +#include <setjmp.h> #if 1 /* I'd really appreciate it if this code could go away... -JimB */ /* This avoids lossage in the `dual-universe' headers on AT&T SysV
--- a/src/xselect.c Sun Oct 18 23:56:07 2009 +0000 +++ b/src/xselect.c Mon Oct 19 04:27:09 2009 +0000 @@ -22,6 +22,7 @@ #include <config.h> #include <stdio.h> /* termhooks.h needs this */ +#include <setjmp.h> #ifdef HAVE_SYS_TYPES_H #include <sys/types.h>