Mercurial > hg > xemacs-beta
diff src/events.c @ 5126:2a462149bd6a ben-lisp-object
merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Wed, 24 Feb 2010 19:04:27 -0600 |
parents | b5df3737028a 79564cbad5f3 |
children | e5380fdaf8f1 f965e31a35f0 |
line wrap: on
line diff
--- a/src/events.c Wed Feb 24 01:58:04 2010 -0600 +++ b/src/events.c Wed Feb 24 19:04:27 2010 -0600 @@ -1,7 +1,7 @@ /* Events: printing them, converting them to and from characters. Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. - Copyright (C) 2001, 2002, 2005 Ben Wing. + Copyright (C) 2001, 2002, 2005, 2010 Ben Wing. This file is part of XEmacs. @@ -41,18 +41,6 @@ #include "console-tty-impl.h" /* for stuff in character_to_event */ -#ifdef HAVE_TTY -#define USED_IF_TTY(decl) decl -#else -#define USED_IF_TTY(decl) UNUSED (decl) -#endif - -#ifdef HAVE_TOOLBARS -#define USED_IF_TOOLBARS(decl) decl -#else -#define USED_IF_TOOLBARS(decl) UNUSED (decl) -#endif - /* Where old events go when they are explicitly deallocated. The event chain here is cut loose before GC, so these will be freed eventually. @@ -880,21 +868,18 @@ { int i, len; - if (EQ (event, Vlast_command_event) || - EQ (event, Vlast_input_event) || - EQ (event, Vunread_command_event)) - ABORT (); + assert (!(EQ (event, Vlast_command_event) || + EQ (event, Vlast_input_event) || + EQ (event, Vunread_command_event))); len = XVECTOR_LENGTH (Vthis_command_keys); for (i = 0; i < len; i++) - if (EQ (event, XVECTOR_DATA (Vthis_command_keys) [i])) - ABORT (); + assert (!EQ (event, XVECTOR_DATA (Vthis_command_keys) [i])); if (!NILP (Vrecent_keys_ring)) { int recent_ring_len = XVECTOR_LENGTH (Vrecent_keys_ring); for (i = 0; i < recent_ring_len; i++) - if (EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i])) - ABORT (); + assert (!EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i])); } } #endif /* 0 */ @@ -2140,14 +2125,13 @@ pointer points to random memory, often filled with 0, sometimes not. */ /* #### Chuck, do we still need this crap? */ - if (!NILP (ret_obj1) && !(GLYPHP (ret_obj1) #ifdef HAVE_TOOLBARS - || TOOLBAR_BUTTONP (ret_obj1) + assert (NILP (ret_obj1) || GLYPHP (ret_obj1) + || TOOLBAR_BUTTONP (ret_obj1)); +#else + assert (NILP (ret_obj1) || GLYPHP (ret_obj1)); #endif - )) - ABORT (); - if (!NILP (ret_obj2) && !(EXTENTP (ret_obj2) || CONSP (ret_obj2))) - ABORT (); + assert (NILP (ret_obj2) || EXTENTP (ret_obj2) || CONSP (ret_obj2)); if (char_x) *char_x = ret_x;