comparison 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
comparison
equal deleted inserted replaced
5125:b5df3737028a 5126:2a462149bd6a
1 /* Events: printing them, converting them to and from characters. 1 /* Events: printing them, converting them to and from characters.
2 Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc. 2 Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois. 3 Copyright (C) 1994, 1995 Board of Trustees, University of Illinois.
4 Copyright (C) 2001, 2002, 2005 Ben Wing. 4 Copyright (C) 2001, 2002, 2005, 2010 Ben Wing.
5 5
6 This file is part of XEmacs. 6 This file is part of XEmacs.
7 7
8 XEmacs is free software; you can redistribute it and/or modify it 8 XEmacs is free software; you can redistribute it and/or modify it
9 under the terms of the GNU General Public License as published by the 9 under the terms of the GNU General Public License as published by the
38 #include "redisplay.h" 38 #include "redisplay.h"
39 #include "toolbar.h" 39 #include "toolbar.h"
40 #include "window.h" 40 #include "window.h"
41 41
42 #include "console-tty-impl.h" /* for stuff in character_to_event */ 42 #include "console-tty-impl.h" /* for stuff in character_to_event */
43
44 #ifdef HAVE_TTY
45 #define USED_IF_TTY(decl) decl
46 #else
47 #define USED_IF_TTY(decl) UNUSED (decl)
48 #endif
49
50 #ifdef HAVE_TOOLBARS
51 #define USED_IF_TOOLBARS(decl) decl
52 #else
53 #define USED_IF_TOOLBARS(decl) UNUSED (decl)
54 #endif
55 43
56 /* Where old events go when they are explicitly deallocated. 44 /* Where old events go when they are explicitly deallocated.
57 The event chain here is cut loose before GC, so these will be freed 45 The event chain here is cut loose before GC, so these will be freed
58 eventually. 46 eventually.
59 */ 47 */
878 866
879 #if 0 867 #if 0
880 { 868 {
881 int i, len; 869 int i, len;
882 870
883 if (EQ (event, Vlast_command_event) || 871 assert (!(EQ (event, Vlast_command_event) ||
884 EQ (event, Vlast_input_event) || 872 EQ (event, Vlast_input_event) ||
885 EQ (event, Vunread_command_event)) 873 EQ (event, Vunread_command_event)));
886 ABORT ();
887 874
888 len = XVECTOR_LENGTH (Vthis_command_keys); 875 len = XVECTOR_LENGTH (Vthis_command_keys);
889 for (i = 0; i < len; i++) 876 for (i = 0; i < len; i++)
890 if (EQ (event, XVECTOR_DATA (Vthis_command_keys) [i])) 877 assert (!EQ (event, XVECTOR_DATA (Vthis_command_keys) [i]));
891 ABORT ();
892 if (!NILP (Vrecent_keys_ring)) 878 if (!NILP (Vrecent_keys_ring))
893 { 879 {
894 int recent_ring_len = XVECTOR_LENGTH (Vrecent_keys_ring); 880 int recent_ring_len = XVECTOR_LENGTH (Vrecent_keys_ring);
895 for (i = 0; i < recent_ring_len; i++) 881 for (i = 0; i < recent_ring_len; i++)
896 if (EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i])) 882 assert (!EQ (event, XVECTOR_DATA (Vrecent_keys_ring) [i]));
897 ABORT ();
898 } 883 }
899 } 884 }
900 #endif /* 0 */ 885 #endif /* 0 */
901 886
902 assert (!EQ (event, Vevent_resource)); 887 assert (!EQ (event, Vevent_resource));
2138 /* #### pixel_to_glyph_translation() sometimes returns garbage... 2123 /* #### pixel_to_glyph_translation() sometimes returns garbage...
2139 The word has type Lisp_Type_Record (presumably meaning `extent') but the 2124 The word has type Lisp_Type_Record (presumably meaning `extent') but the
2140 pointer points to random memory, often filled with 0, sometimes not. 2125 pointer points to random memory, often filled with 0, sometimes not.
2141 */ 2126 */
2142 /* #### Chuck, do we still need this crap? */ 2127 /* #### Chuck, do we still need this crap? */
2143 if (!NILP (ret_obj1) && !(GLYPHP (ret_obj1)
2144 #ifdef HAVE_TOOLBARS 2128 #ifdef HAVE_TOOLBARS
2145 || TOOLBAR_BUTTONP (ret_obj1) 2129 assert (NILP (ret_obj1) || GLYPHP (ret_obj1)
2130 || TOOLBAR_BUTTONP (ret_obj1));
2131 #else
2132 assert (NILP (ret_obj1) || GLYPHP (ret_obj1));
2146 #endif 2133 #endif
2147 )) 2134 assert (NILP (ret_obj2) || EXTENTP (ret_obj2) || CONSP (ret_obj2));
2148 ABORT ();
2149 if (!NILP (ret_obj2) && !(EXTENTP (ret_obj2) || CONSP (ret_obj2)))
2150 ABORT ();
2151 2135
2152 if (char_x) 2136 if (char_x)
2153 *char_x = ret_x; 2137 *char_x = ret_x;
2154 if (char_y) 2138 if (char_y)
2155 *char_y = ret_y; 2139 *char_y = ret_y;