Moved to XEmacs Beta.
Thanks for the reply, Happy New Year, the weather is drizzly and cold,
wish I were there. ;-)
>>>> "Ben" == Ben Wing <wing(a)666.com>
writes:
Ben> hmm, the different argument to character_to_event() affects
Ben> the processing of meta on tty's, i think, and makes it
Ben> conform to the tty setting. but i'll have to look at the
Ben> patch to see exactly,
OK. Here's the actual patch you sent. (The call is still
character_to_event (x, y, z, 1, 1) in 21.5 CVS, BTW.) The context of
the call is that c = event_to_character (XEVENT, 0, 0, 0), then
traduit = Fgethash (make_char(c), Vkeyboard_translate_table, Qnil).
So I guess the idea is that since c and ev2 are synthesized, we don't
care what the console is, and so we shouldn't care about meta
processing on it. Thus it is right to turn use_console_meta_flag off?
Index: src/event-stream.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/event-stream.c,v
retrieving revision 1.49.2.5
diff -u -r1.49.2.5 event-stream.c
--- src/event-stream.c 2002/08/20 11:37:07 1.49.2.5
+++ src/event-stream.c 2002/12/15 03:36:54
@@ -746,7 +746,7 @@
This way is safer. */
zero_event (&ev2);
character_to_event (XCHAR (traduit), &ev2,
- XCONSOLE (EVENT_CHANNEL (XEVENT (event))), 1, 1);
+ XCONSOLE (EVENT_CHANNEL (XEVENT (event))), 0, 1);
XEVENT (event)->event.key.keysym = ev2.event.key.keysym;
XEVENT (event)->event.key.modifiers = ev2.event.key.modifiers;
did_translate = 1;
@@ -768,7 +768,7 @@
zero_event (&ev2);
character_to_event (XCHAR (traduit), &ev2,
- XCONSOLE (EVENT_CHANNEL (XEVENT (event))), 1, 1);
+ XCONSOLE (EVENT_CHANNEL (XEVENT (event))), 0, 1);
XEVENT (event)->event.key.keysym = ev2.event.key.keysym;
XEVENT (event)->event.key.modifiers |= ev2.event.key.modifiers;
did_translate = 1;
The signal change is new code, where you change the SIGBUS and SIGSEGV
handlers so that you can try to smoke out illegal memory ranges. It's
only used in the new printing code. In 21.5 you have a macro
EMACS_SIGNAL which is typically qxe_reliable_signal but sometimes is
sigset or mswindows_sigset or signal. In 21.4 we don't have that
macro, and the new code that uses it is #ifdef'd !windows:
+#else /* !(defined (WIN32_NATIVE) || defined (CYGWIN)) */
+
+/* #### There must be a better way!!!! */
+
+static JMP_BUF memory_error_jump;
+
+static SIGTYPE
+debug_memory_error (int signum)
+{
+ EMACS_REESTABLISH_SIGNAL (signum, debug_memory_error);
+ EMACS_UNBLOCK_SIGNAL (signum);
+ LONGJMP (memory_error_jump, 1);
+}
+
+/* Return whether all bytes in the specified memory block can be read. */
+int
+debug_can_access_memory (void *ptr, Bytecount len)
+{
+ /* Use volatile to protect variables from being clobbered by longjmp. */
+ SIGTYPE (*volatile old_sigbus) (int);
+ SIGTYPE (*volatile old_sigsegv) (int);
+ volatile int old_errno = errno;
+ volatile int retval = 1;
+
+ if (!SETJMP (memory_error_jump))
+ {
+ old_sigbus =
+ (SIGTYPE (*) (int)) EMACS_SIGNAL (SIGBUS, debug_memory_error);
+ old_sigsegv =
+ (SIGTYPE (*) (int)) EMACS_SIGNAL (SIGSEGV, debug_memory_error);
+
+ if (len > 1)
+ /* If we can, try to avoid problems with super-optimizing compilers
+ that might decide that memcmp (ptr, ptr, len) can be optimized
+ away since its result is always 1. */
+ memcmp (ptr, (char *) ptr + 1, len - 1);
+ else
+ memcmp (ptr, ptr, len);
+ }
+ else
+ retval = 0;
+ EMACS_SIGNAL (SIGBUS, old_sigbus);
+ EMACS_SIGNAL (SIGSEGV, old_sigsegv);
+ errno = old_errno;
+
+ return retval;
+}
+
+#endif /* defined (WIN32_NATIVE) || defined (CYGWIN) */
--
Institute of Policy and Planning Sciences
http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Ask not how you can "do" free software business;
ask what your business can "do for" free software.