diff options
author | Dan Nicolaescu <dann@ics.uci.edu> | 2009-10-19 04:27:09 +0000 |
---|---|---|
committer | Dan Nicolaescu <dann@ics.uci.edu> | 2009-10-19 04:27:09 +0000 |
commit | 59165f67fbbf05524d118e75c083a7fe28821721 (patch) | |
tree | 150e303a8a6d6f81c0201f4264dc4f34707e8494 /src | |
parent | 994299aa877960c1444df40418fdfa9c6320127a (diff) | |
download | emacs-59165f67fbbf05524d118e75c083a7fe28821721.tar.gz |
* 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.
Diffstat (limited to 'src')
99 files changed, 243 insertions, 49 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index cc7a6dbaff9..defd5a5f072 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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. diff --git a/src/alloc.c b/src/alloc.c index d11eff3d387..557621af797 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #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 @@ staticpro (varaddress) abort (); } -struct catchtag -{ - Lisp_Object tag; - Lisp_Object val; - struct catchtag *next; -}; - /*********************************************************************** Protection from GC diff --git a/src/atimer.c b/src/atimer.c index 4fc593b6d73..308d4688d7b 100644 --- a/src/atimer.c +++ b/src/atimer.c @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include <lisp.h> #include <syssignal.h> #include <systime.h> diff --git a/src/buffer.c b/src/buffer.c index d74a40ac4f5..2fc7a8b3a7c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <sys/param.h> #include <errno.h> #include <stdio.h> +#include <setjmp.h> #ifndef USE_CRT_DLL extern int errno; diff --git a/src/bytecode.c b/src/bytecode.c index 0335af81860..4a1e2da3556 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -34,6 +34,7 @@ by Hallvard: */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h" diff --git a/src/callint.c b/src/callint.c index 074f9c0fc5b..a9f8f231462 100644 --- a/src/callint.c +++ b/src/callint.c @@ -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" diff --git a/src/callproc.c b/src/callproc.c index 14d1ac0b3d6..b1918b9cd5e 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <signal.h> #include <errno.h> #include <stdio.h> +#include <setjmp.h> #ifndef USE_CRT_DLL extern int errno; diff --git a/src/casefiddle.c b/src/casefiddle.c index f01faa01198..112198b3225 100644 --- a/src/casefiddle.c +++ b/src/casefiddle.c @@ -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 "buffer.h" #include "character.h" diff --git a/src/casetab.c b/src/casetab.c index 95fca03584b..5ae4ee2b5f2 100644 --- a/src/casetab.c +++ b/src/casetab.c @@ -20,6 +20,7 @@ You should have received a copy of the GNU General Public License 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" diff --git a/src/category.c b/src/category.c index 84af413120f..babed58c7fe 100644 --- a/src/category.c +++ b/src/category.c @@ -30,6 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <ctype.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h" diff --git a/src/ccl.c b/src/ccl.c index f110291ac72..03600158049 100644 --- a/src/ccl.c +++ b/src/ccl.c @@ -27,6 +27,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "character.h" diff --git a/src/character.c b/src/character.c index e2896444c25..bfe99766bc8 100644 --- a/src/character.c +++ b/src/character.c @@ -34,6 +34,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifdef emacs #include <sys/types.h> +#include <setjmp.h> #include "lisp.h" #include "character.h" #include "buffer.h" diff --git a/src/charset.c b/src/charset.c index 7ca9240d74f..cfdf95565a7 100644 --- a/src/charset.c +++ b/src/charset.c @@ -31,6 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <unistd.h> #include <ctype.h> #include <sys/types.h> +#include <setjmp.h> #include "lisp.h" #include "character.h" #include "charset.h" diff --git a/src/chartab.c b/src/chartab.c index 30f7e8bef2c..79906c38fd7 100644 --- a/src/chartab.c +++ b/src/chartab.c @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License 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" @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "frame.h" diff --git a/src/cmds.c b/src/cmds.c index 19073dccf4a..5b5c6de817e 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -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 "commands.h" #include "buffer.h" diff --git a/src/coding.c b/src/coding.c index 405284f778b..678bafaa9ea 100644 --- a/src/coding.c +++ b/src/coding.c @@ -289,6 +289,7 @@ encode_coding_XXX (coding) #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" diff --git a/src/composite.c b/src/composite.c index cd84f3932b0..a654b5e8088 100644 --- a/src/composite.c +++ b/src/composite.c @@ -24,6 +24,7 @@ You should have received a copy of the GNU General Public License 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" diff --git a/src/data.c b/src/data.c index 96e29a6c283..6d469e161db 100644 --- a/src/data.c +++ b/src/data.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "puresize.h" #include "character.h" diff --git a/src/dbusbind.c b/src/dbusbind.c index f4a5c6887d8..86ec866ac6a 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <stdio.h> #include <dbus/dbus.h> +#include <setjmp.h> #include "lisp.h" #include "frame.h" #include "termhooks.h" diff --git a/src/dired.c b/src/dired.c index 10d8782d023..67002d32eb7 100644 --- a/src/dired.c +++ b/src/dired.c @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> +#include <setjmp.h> #ifdef HAVE_PWD_H #include <pwd.h> diff --git a/src/dispnew.c b/src/dispnew.c index e43a1a9869e..ba50b001980 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <signal.h> #include <stdio.h> #include <ctype.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h> diff --git a/src/doc.c b/src/doc.c index 71308e6904f..6a53e0d3f74 100644 --- a/src/doc.c +++ b/src/doc.c @@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #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> diff --git a/src/doprnt.c b/src/doprnt.c index 95d6b789c4f..2d5b893dd20 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <ctype.h> +#include <setjmp.h> #ifdef STDC_HEADERS #include <float.h> diff --git a/src/dosfns.c b/src/dosfns.c index 62594f1671f..30daed3077a 100644 --- a/src/dosfns.c +++ b/src/dosfns.c @@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <stdio.h> #include <string.h> #include <dos.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "termchar.h" diff --git a/src/editfns.c b/src/editfns.c index 859e3965824..8dfea1f595c 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <sys/types.h> #include <stdio.h> +#include <setjmp.h> #ifdef HAVE_PWD_H #include <pwd.h> diff --git a/src/emacs.c b/src/emacs.c index 1afcd08fb68..2724aeefd48 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <sys/types.h> #include <sys/file.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h> diff --git a/src/eval.c b/src/eval.c index 20988392e5f..4611731a65e 100644 --- a/src/eval.c +++ b/src/eval.c @@ -20,12 +20,12 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #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 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 diff --git a/src/fileio.c b/src/fileio.c index cfe1f54382e..b83ef6fe45c 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -28,6 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <stdio.h> #include <sys/types.h> #include <sys/stat.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h> diff --git a/src/filelock.c b/src/filelock.c index c845a804ae3..bed0057dcbd 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <sys/stat.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #ifdef HAVE_PWD_H #include <pwd.h> diff --git a/src/floatfns.c b/src/floatfns.c index 15077efae6c..5aaf5f7badb 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -48,6 +48,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <signal.h> +#include <setjmp.h> #include "lisp.h" #include "syssignal.h" diff --git a/src/fns.c b/src/fns.c index e1431251e24..be5d9a9b43e 100644 --- a/src/fns.c +++ b/src/fns.c @@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #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. */ diff --git a/src/font.c b/src/font.c index 2e5db2d8f10..6e33b9bec55 100644 --- a/src/font.c +++ b/src/font.c @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <stdio.h> #include <stdlib.h> #include <ctype.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" diff --git a/src/fontset.c b/src/fontset.c index 35e186b3c3b..cba84dc2458 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -28,6 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "blockinput.h" diff --git a/src/frame.c b/src/frame.c index 47e084eb896..a66d4dd57eb 100644 --- a/src/frame.c +++ b/src/frame.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <stdio.h> #include <ctype.h> +#include <setjmp.h> #include "lisp.h" #include "character.h" #ifdef HAVE_X_WINDOWS diff --git a/src/fringe.c b/src/fringe.c index 41fc24d1150..df62bee0edc 100644 --- a/src/fringe.c +++ b/src/fringe.c @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "frame.h" diff --git a/src/ftfont.c b/src/ftfont.c index 367b796a212..ed9cb6f19d2 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include <fontconfig/fontconfig.h> #include <fontconfig/fcfreetype.h> diff --git a/src/ftxfont.c b/src/ftxfont.c index 2cf45bb27a0..1f97a94e94f 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include <X11/Xlib.h> #include "lisp.h" diff --git a/src/gtkutil.c b/src/gtkutil.c index 9da2c7e9cbe..8aa877a8f83 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <string.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "xterm.h" #include "blockinput.h" diff --git a/src/image.c b/src/image.c index fa4eecd040b..d35bd83e6a4 100644 --- a/src/image.c +++ b/src/image.c @@ -27,6 +27,14 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #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 @@ png_image_p (object) #ifdef HAVE_PNG -#if defined HAVE_LIBPNG_PNG_H -# include <libpng/png.h> -#else -# include <png.h> -#endif - #ifdef HAVE_NTGUI /* PNG library details. */ diff --git a/src/indent.c b/src/indent.c index f10b235427e..5a73fa1b211 100644 --- a/src/indent.c +++ b/src/indent.c @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" diff --git a/src/insdel.c b/src/insdel.c index b09bed66d55..27901164842 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -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 "intervals.h" #include "buffer.h" diff --git a/src/intervals.c b/src/intervals.c index ee18dd5b4be..bb6023337f2 100644 --- a/src/intervals.c +++ b/src/intervals.c @@ -39,6 +39,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" diff --git a/src/keyboard.c b/src/keyboard.c index 396f22fa7a1..de4e1c5647e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "termchar.h" #include "termopts.h" diff --git a/src/keymap.c b/src/keymap.c index e4f68d386de..d050191dc4e 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #if HAVE_ALLOCA_H # include <alloca.h> #endif diff --git a/src/lisp.h b/src/lisp.h index 6751898e163..4685578a417 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -1826,6 +1826,41 @@ struct handler 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; diff --git a/src/macros.c b/src/macros.c index c6ae0defa63..0d69b9203cf 100644 --- a/src/macros.c +++ b/src/macros.c @@ -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 "macros.h" #include "commands.h" diff --git a/src/marker.c b/src/marker.c index dbaaf872c2c..fd2b8b91087 100644 --- a/src/marker.c +++ b/src/marker.c @@ -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 "buffer.h" #include "character.h" diff --git a/src/menu.c b/src/menu.c index 5331cbc3144..74d455a8c0a 100644 --- a/src/menu.c +++ b/src/menu.c @@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h" diff --git a/src/minibuf.c b/src/minibuf.c index 138581fb835..fc876370a2d 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "commands.h" diff --git a/src/msdos.c b/src/msdos.c index 9783e8ce16a..b6820b50f2c 100644 --- a/src/msdos.c +++ b/src/msdos.c @@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #ifdef MSDOS +#include <setjmp.h> #include "lisp.h" #include <stdio.h> #include <stdlib.h> diff --git a/src/print.c b/src/print.c index 5eee386cab7..f90ec27a0a4 100644 --- a/src/print.c +++ b/src/print.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" #include "character.h" diff --git a/src/process.c b/src/process.c index 99f57d35d4a..b405f1ef690 100644 --- a/src/process.c +++ b/src/process.c @@ -38,6 +38,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #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 @@ The variable takes effect when `start-process' is called. */); #include <sys/stat.h> #include <stdlib.h> #include <fcntl.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h> #endif diff --git a/src/ralloc.c b/src/ralloc.c index f5ebb8449ca..6faee2cac89 100644 --- a/src/ralloc.c +++ b/src/ralloc.c @@ -26,6 +26,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifdef emacs #include <config.h> +#include <setjmp.h> #include "lisp.h" /* Needed for VALBITS. */ #include "blockinput.h" diff --git a/src/regex.c b/src/regex.c index 0c9e137aca0..ac7b7510a67 100644 --- a/src/regex.c +++ b/src/regex.c @@ -117,6 +117,7 @@ that make sense only in Emacs. */ #ifdef emacs +# include <setjmp.h> # include "lisp.h" # include "buffer.h" diff --git a/src/region-cache.c b/src/region-cache.c index 1f1df5fc168..22caf6ebf0d 100644 --- a/src/region-cache.c +++ b/src/region-cache.c @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" diff --git a/src/scroll.c b/src/scroll.c index 4d57a2a9b8b..c7c2630403b 100644 --- a/src/scroll.c +++ b/src/scroll.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <string.h> +#include <setjmp.h> #include "lisp.h" #include "termchar.h" #include "dispextern.h" diff --git a/src/search.c b/src/search.c index e6ae4b660b6..8bfe61d5f6d 100644 --- a/src/search.c +++ b/src/search.c @@ -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 "syntax.h" #include "category.h" diff --git a/src/sheap.c b/src/sheap.c index 96511e68f45..5e327764efe 100644 --- a/src/sheap.c +++ b/src/sheap.c @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include <unistd.h> diff --git a/src/sound.c b/src/sound.c index 58a8a9c4653..6f1f5385978 100644 --- a/src/sound.c +++ b/src/sound.c @@ -44,6 +44,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <unistd.h> #include <sys/types.h> #include <errno.h> +#include <setjmp.h> #include "lisp.h" #include "dispextern.h" #include "atimer.h" diff --git a/src/syntax.c b/src/syntax.c index 3c5a21de5c7..048f0ee6637 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <ctype.h> +#include <setjmp.h> #include "lisp.h" #include "commands.h" #include "buffer.h" diff --git a/src/term.c b/src/term.c index 9e18df3160e..d860a932357 100644 --- a/src/term.c +++ b/src/term.c @@ -37,6 +37,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <signal.h> #include <stdarg.h> +#include <setjmp.h> #include "lisp.h" #include "termchar.h" diff --git a/src/termcap.c b/src/termcap.c index 2ad31d7b96a..46254c67c1c 100644 --- a/src/termcap.c +++ b/src/termcap.c @@ -24,6 +24,7 @@ Boston, MA 02110-1301, USA. */ #ifdef emacs +#include <setjmp.h> #include <lisp.h> /* xmalloc is here */ /* Get the O_* definitions for open et al. */ #include <sys/file.h> diff --git a/src/terminal.c b/src/terminal.c index d9951dba464..c89f2e60005 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -18,6 +18,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "frame.h" diff --git a/src/terminfo.c b/src/terminfo.c index 9b6b76b9f7f..03187c65e8f 100644 --- a/src/terminfo.c +++ b/src/terminfo.c @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License 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, diff --git a/src/textprop.c b/src/textprop.c index 0018088b63e..e82af12d90a 100644 --- a/src/textprop.c +++ b/src/textprop.c @@ -18,6 +18,7 @@ You should have received a copy of the GNU General Public License 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" diff --git a/src/tparam.c b/src/tparam.c index dabf0ed9713..dcf79a3b617 100644 --- a/src/tparam.c +++ b/src/tparam.c @@ -23,6 +23,7 @@ Boston, MA 02110-1301, USA. */ #endif #ifdef emacs +#include <setjmp.h> #include "lisp.h" /* for xmalloc */ #else diff --git a/src/undo.c b/src/undo.c index 39ca983b76e..f2a37cb4083 100644 --- a/src/undo.c +++ b/src/undo.c @@ -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 "buffer.h" #include "commands.h" diff --git a/src/unexaix.c b/src/unexaix.c index c224a3626fe..5f61b5a03d2 100644 --- a/src/unexaix.c +++ b/src/unexaix.c @@ -104,6 +104,7 @@ static int adjust_lnnoptrs (int, int, char *); static int pagemask; #ifdef emacs +#include <setjmp.h> #include "lisp.h" static void diff --git a/src/unexcw.c b/src/unexcw.c index a7f4b6b2cf6..1e65d65007b 100644 --- a/src/unexcw.c +++ b/src/unexcw.c @@ -19,6 +19,7 @@ You should have received a copy of the GNU General Public License 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> diff --git a/src/unexec.c b/src/unexec.c index a6852af7d07..c655583e306 100644 --- a/src/unexec.c +++ b/src/unexec.c @@ -204,6 +204,7 @@ static int pagemask; #ifdef emacs +#include <setjmp.h> #include "lisp.h" static diff --git a/src/unexsol.c b/src/unexsol.c index 9f919faedc0..04e3f40799c 100644 --- a/src/unexsol.c +++ b/src/unexsol.c @@ -3,6 +3,7 @@ #include <config.h> #include <stdlib.h> #include <dlfcn.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" diff --git a/src/vm-limit.c b/src/vm-limit.c index 5abf048913a..06e99c638dd 100644 --- a/src/vm-limit.c +++ b/src/vm-limit.c @@ -19,6 +19,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #ifdef emacs #include <config.h> +#include <setjmp.h> #include "lisp.h" #endif diff --git a/src/w16select.c b/src/w16select.c index 91ce8f13f1c..4d2476030e5 100644 --- a/src/w16select.c +++ b/src/w16select.c @@ -32,6 +32,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #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 */ diff --git a/src/w32.c b/src/w32.c index e8b7abc082e..786f8e2a848 100644 --- a/src/w32.c +++ b/src/w32.c @@ -34,6 +34,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <sys/utime.h> #include <mbstring.h> /* for _mbspbrk */ #include <math.h> +#include <setjmp.h> /* must include CRT headers *before* config.h */ diff --git a/src/w32console.c b/src/w32console.c index 947ff7554fc..6b96c05b2eb 100644 --- a/src/w32console.c +++ b/src/w32console.c @@ -29,6 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <stdio.h> #include <windows.h> #include <string.h> +#include <setjmp.h> #include "lisp.h" #include "character.h" diff --git a/src/w32fns.c b/src/w32fns.c index 8003d791719..c06fa4ea9d4 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -27,6 +27,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <limits.h> #include <errno.h> #include <math.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h" diff --git a/src/w32font.c b/src/w32font.c index 995500aa0e4..69462512ca3 100644 --- a/src/w32font.c +++ b/src/w32font.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <math.h> #include <ctype.h> #include <commdlg.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h" diff --git a/src/w32heap.c b/src/w32heap.c index efdcdfa7107..408917dda1a 100644 --- a/src/w32heap.c +++ b/src/w32heap.c @@ -27,6 +27,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <stdio.h> +#include <setjmp.h> #include "w32heap.h" #include "lisp.h" /* for VALMASK */ diff --git a/src/w32inevt.c b/src/w32inevt.c index ac7ca644c54..960e14de2a9 100644 --- a/src/w32inevt.c +++ b/src/w32inevt.c @@ -30,6 +30,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <stdlib.h> #include <stdio.h> #include <windows.h> +#include <setjmp.h> #ifndef MOUSE_MOVED #define MOUSE_MOVED 1 diff --git a/src/w32menu.c b/src/w32menu.c index 677de1b180a..c573e3713ca 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -23,6 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <signal.h> #include <stdio.h> #include <mbstring.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h" diff --git a/src/w32proc.c b/src/w32proc.c index 40829f0d63e..ab5c91f679e 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -29,6 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <fcntl.h> #include <signal.h> #include <sys/file.h> +#include <setjmp.h> /* must include CRT headers *before* config.h */ diff --git a/src/w32reg.c b/src/w32reg.c index 2b5b352c583..94f5196ea8d 100644 --- a/src/w32reg.c +++ b/src/w32reg.c @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ /* Written by Kevin Gallo */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h" #include "blockinput.h" diff --git a/src/w32select.c b/src/w32select.c index ce93b544126..9c67fabceec 100644 --- a/src/w32select.c +++ b/src/w32select.c @@ -73,6 +73,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ */ #include <config.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h" /* for all of the w32 includes */ #include "w32heap.h" /* os_subtype */ diff --git a/src/w32term.c b/src/w32term.c index b7642b46891..008042c810a 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <signal.h> #include <stdio.h> #include <stdlib.h> +#include <setjmp.h> #include "lisp.h" #include "blockinput.h" #include "w32term.h" diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c index 9e75b671616..2cb55d4c702 100644 --- a/src/w32uniscribe.c +++ b/src/w32uniscribe.c @@ -27,6 +27,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #define _WIN32_WINNT 0x500 #include <windows.h> #include <usp10.h> +#include <setjmp.h> #include "lisp.h" #include "w32term.h" diff --git a/src/w32xfns.c b/src/w32xfns.c index 5bf39967e85..37ec500d554 100644 --- a/src/w32xfns.c +++ b/src/w32xfns.c @@ -20,6 +20,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <signal.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h" #include "frame.h" diff --git a/src/widget.c b/src/widget.c index 91072c40acd..32b3649be5d 100644 --- a/src/widget.c +++ b/src/widget.c @@ -31,6 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "xterm.h" diff --git a/src/window.c b/src/window.c index 9b50a85b0ca..4630b6dd90b 100644 --- a/src/window.c +++ b/src/window.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "buffer.h" diff --git a/src/xdisp.c b/src/xdisp.c index a750a1b73b5..f88750447aa 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -168,6 +168,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <limits.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h" diff --git a/src/xfaces.c b/src/xfaces.c index 4f808e41beb..f120dfcbb54 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -204,6 +204,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #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" diff --git a/src/xfns.c b/src/xfns.c index 87ff21b7759..4fc08925ebb 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <math.h> +#include <setjmp.h> #ifdef HAVE_UNISTD_H #include <unistd.h> diff --git a/src/xfont.c b/src/xfont.c index 7db7cae5c65..36ac09fcb18 100644 --- a/src/xfont.c +++ b/src/xfont.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> #include <stdlib.h> +#include <setjmp.h> #include <X11/Xlib.h> #include "lisp.h" diff --git a/src/xftfont.c b/src/xftfont.c index 2b576c3d4a2..e66b538fa15 100644 --- a/src/xftfont.c +++ b/src/xftfont.c @@ -21,6 +21,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> +#include <setjmp.h> #include <X11/Xlib.h> #include <X11/Xft/Xft.h> diff --git a/src/xmenu.c b/src/xmenu.c index c6d7b0d9585..f899ddaa631 100644 --- a/src/xmenu.c +++ b/src/xmenu.c @@ -37,6 +37,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #endif #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "keyboard.h" diff --git a/src/xrdb.c b/src/xrdb.c index fac97e4350f..3ae7068e479 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -31,6 +31,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #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 diff --git a/src/xselect.c b/src/xselect.c index 5cf4f74602c..79e0c0a280b 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <config.h> #include <stdio.h> /* termhooks.h needs this */ +#include <setjmp.h> #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> diff --git a/src/xsmfns.c b/src/xsmfns.c index 80c4802a496..3e8220bd406 100644 --- a/src/xsmfns.c +++ b/src/xsmfns.c @@ -32,6 +32,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <sys/param.h> #include <stdio.h> +#include <setjmp.h> #include "lisp.h" #include "systime.h" diff --git a/src/xterm.c b/src/xterm.c index 72aea94e8b3..c77136eb64a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -28,6 +28,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <signal.h> #include <stdio.h> +#include <setjmp.h> #ifdef HAVE_X_WINDOWS |