From d634a67054364f0a1d1ddad6791fe69186505fbe Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Thu, 3 Aug 2006 15:19:20 +0000 Subject: * process.c: Revert last change. --- src/ChangeLog | 4 ++++ src/process.c | 18 ++++++------------ 2 files changed, 10 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 08590d793da..78cfea5dff2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-08-03 Chong Yidong + + * process.c: Revert last change. + 2006-08-01 Kim F. Storm * process.c (wait_reading_process_output_unwind): New function. diff --git a/src/process.c b/src/process.c index b24dee002c6..dc70ef37761 100644 --- a/src/process.c +++ b/src/process.c @@ -4158,14 +4158,6 @@ server_accept_connection (server, channel) when not inside wait_reading_process_output. */ static int waiting_for_user_input_p; -static Lisp_Object -wait_reading_process_output_unwind (data) - Lisp_Object data; -{ - waiting_for_user_input_p = XINT (data); - return Qnil; -} - /* This is here so breakpoints can be put on it. */ static void wait_reading_process_output_1 () @@ -4248,7 +4240,11 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, EMACS_TIME timeout, end_time; int wait_channel = -1; int got_some_input = 0; - int count = SPECPDL_INDEX (); + /* We can't record_unwind_protect here because after the + set_waiting_for_input call, C-g (interrupt_signal) would run + throw_to_read_char instead of Fsignal, which means unbind_to + doesn't get called. */ + int saved_waiting_for_user_input_p = waiting_for_user_input_p; FD_ZERO (&Available); #ifdef NON_BLOCKING_CONNECT @@ -4259,8 +4255,6 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, if (wait_proc != NULL) wait_channel = XINT (wait_proc->infd); - record_unwind_protect (wait_reading_process_output_unwind, - make_number (waiting_for_user_input_p)); waiting_for_user_input_p = read_kbd; /* Since we may need to wait several times, @@ -4887,7 +4881,7 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, } /* end for each file descriptor */ } /* end while exit conditions not met */ - unbind_to (count, Qnil); + waiting_for_user_input_p = saved_waiting_for_user_input_p; /* If calling from keyboard input, do not quit since we want to return C-g as an input character. -- cgit v1.2.1 From f3e0a6de08025d4f77a55b74a28760cc9a5e30e7 Mon Sep 17 00:00:00 2001 From: Jason Rumney Date: Thu, 3 Aug 2006 22:08:09 +0000 Subject: (w32_menu_show, w32_dialog_show): Call Fsignal to quit when no option selected except when for_click. --- src/ChangeLog | 5 +++++ src/w32menu.c | 6 ++++++ 2 files changed, 11 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 78cfea5dff2..1a70edd2a07 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-03 Jason Rumney + + * w32menu.c (w32_menu_show, w32_dialog_show): Call Fsignal to quit + when no option selected. + 2006-08-03 Chong Yidong * process.c: Revert last change. diff --git a/src/w32menu.c b/src/w32menu.c index 389e6c5b856..11af1d66b6f 100644 --- a/src/w32menu.c +++ b/src/w32menu.c @@ -1994,6 +1994,9 @@ w32_menu_show (f, x, y, for_click, keymaps, title, error) } } } + else if (!for_click) + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); return Qnil; } @@ -2186,6 +2189,9 @@ w32_dialog_show (f, keymaps, title, header, error) } } } + else + /* Make "Cancel" equivalent to C-g. */ + Fsignal (Qquit, Qnil); return Qnil; } -- cgit v1.2.1 From dc3ca1078f41aaf51d84fe06f9cdf22672b8a85e Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 4 Aug 2006 01:41:14 +0000 Subject: (x_query_font): Compare names by ignoring case. --- src/xterm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xterm.c b/src/xterm.c index 5e4eeb3bb64..4203411e888 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10056,8 +10056,8 @@ x_query_font (f, fontname) for (i = 0; i < dpyinfo->n_fonts; i++) if (dpyinfo->font_table[i].name - && (!strcmp (dpyinfo->font_table[i].name, fontname) - || !strcmp (dpyinfo->font_table[i].full_name, fontname))) + && (!strcasecmp (dpyinfo->font_table[i].name, fontname) + || !strcasecmp (dpyinfo->font_table[i].full_name, fontname))) return (dpyinfo->font_table + i); return NULL; } -- cgit v1.2.1 From ef8f7cddb377a5fd5b8ec6549ded05bb9aa3da81 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 4 Aug 2006 01:49:05 +0000 Subject: *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 1a70edd2a07..b81ffed78b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-08-04 Kenichi Handa + + * xterm.c (x_query_font): Compare names by ignoring case. + 2006-08-03 Jason Rumney * w32menu.c (w32_menu_show, w32_dialog_show): Call Fsignal to quit -- cgit v1.2.1 From 6f64cebf164a4a613f445aa32e70e95ba6a50d45 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 4 Aug 2006 02:50:10 +0000 Subject: (w32_query_font): Compare names by ignoring case. --- src/ChangeLog | 2 ++ src/w32fns.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index b81ffed78b1..faa7db9b206 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2006-08-04 Kenichi Handa + * w32fns.c (w32_query_font): Compare names by ignoring case. + * xterm.c (x_query_font): Compare names by ignoring case. 2006-08-03 Jason Rumney diff --git a/src/w32fns.c b/src/w32fns.c index 68fcced88c2..a3df8de5338 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -6207,7 +6207,7 @@ w32_query_font (struct frame *f, char *fontname) for (i = 0; i < one_w32_display_info.n_fonts ;i++, pfi++) { - if (strcmp(pfi->name, fontname) == 0) return pfi; + if (strcasecmp(pfi->name, fontname) == 0) return pfi; } return NULL; -- cgit v1.2.1 From df70725f7a2437a7c1edc39b4119a30016c84690 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 4 Aug 2006 11:36:02 +0000 Subject: (w32_createwindow): Handle -geometry command line option and the geometry settings in the Registry. --- src/w32fns.c | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/w32fns.c b/src/w32fns.c index a3df8de5338..4c933f0631e 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -2066,7 +2066,8 @@ w32_createwindow (f) { HWND hwnd; RECT rect; - Lisp_Object top, left; + Lisp_Object top = Qunbound; + Lisp_Object left = Qunbound; rect.left = rect.top = 0; rect.right = FRAME_PIXEL_WIDTH (f); @@ -2079,13 +2080,41 @@ w32_createwindow (f) if (!hprevinst) { + Lisp_Object ifa; + w32_init_class (hinst); + + /* Handle the -geometry command line option and the geometry + settings in the registry. They are decoded and put into + initial-frame-alist by w32-win.el:x-handle-geometry. */ + ifa = Fsymbol_value (intern ("initial-frame-alist")); + if (CONSP (ifa)) + { + Lisp_Object lt = Fassq (Qleft, ifa); + Lisp_Object tp = Fassq (Qtop, ifa); + + if (!NILP (lt)) + { + lt = XCDR (lt); + if (INTEGERP (lt)) + left = lt; + } + if (!NILP (tp)) + { + tp = XCDR (tp); + if (INTEGERP (tp)) + top = tp; + } + } } - /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero - for anything that is not a number and is not Qunbound. */ - left = w32_get_arg (Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER); - top = w32_get_arg (Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER); + if (EQ (left, Qunbound) && EQ (top, Qunbound)) + { + /* When called with RES_TYPE_NUMBER, w32_get_arg will return zero + for anything that is not a number and is not Qunbound. */ + left = w32_get_arg (Qnil, Qleft, "left", "Left", RES_TYPE_NUMBER); + top = w32_get_arg (Qnil, Qtop, "top", "Top", RES_TYPE_NUMBER); + } FRAME_W32_WINDOW (f) = hwnd = CreateWindow (EMACS_CLASS, -- cgit v1.2.1 From 316a275a1e626f7689affcf96f4e98953a6b5c97 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 4 Aug 2006 11:43:45 +0000 Subject: *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index faa7db9b206..52847a7fe1f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-04 Ralf Angeli + + * w32fns.c (w32_createwindow): Handle -geometry command line option + and the geometry settings in the Registry. + 2006-08-04 Kenichi Handa * w32fns.c (w32_query_font): Compare names by ignoring case. -- cgit v1.2.1 From 0f2e2a3bbc74a84038de18603e5d734f38fa9db4 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 4 Aug 2006 15:22:09 +0000 Subject: (Fsubst_char_in_region): Redo the setup work after running the before-change-functions since they may have altered the buffer. --- src/ChangeLog | 5 +++++ src/editfns.c | 24 +++++++++++++++++++----- 2 files changed, 24 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 52847a7fe1f..49c4649d144 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-04 Stefan Monnier + + * editfns.c (Fsubst_char_in_region): Redo the setup work after running + the before-change-functions since they may have altered the buffer. + 2006-08-04 Ralf Angeli * w32fns.c (w32_createwindow): Handle -geometry command line option diff --git a/src/editfns.c b/src/editfns.c index e692204c702..8ac61f3d006 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2691,6 +2691,10 @@ Both characters must have the same length of multi-byte form. */) Lisp_Object start, end, fromchar, tochar, noundo; { register int pos, pos_byte, stop, i, len, end_byte; + /* Keep track of the first change in the buffer: + if 0 we haven't found it yet. + if < 0 we've found it and we've run the before-change-function. + if > 0 we've actually performed it and the value is its position. */ int changed = 0; unsigned char fromstr[MAX_MULTIBYTE_LENGTH], tostr[MAX_MULTIBYTE_LENGTH]; unsigned char *p; @@ -2703,6 +2707,8 @@ Both characters must have the same length of multi-byte form. */) int last_changed = 0; int multibyte_p = !NILP (current_buffer->enable_multibyte_characters); + restart: + validate_region (&start, &end); CHECK_NUMBER (fromchar); CHECK_NUMBER (tochar); @@ -2740,7 +2746,7 @@ Both characters must have the same length of multi-byte form. */) That's faster than getting rid of things, and it prevents even the entry for a first change. Also inhibit locking the file. */ - if (!NILP (noundo)) + if (!changed && !NILP (noundo)) { record_unwind_protect (subst_char_in_region_unwind, current_buffer->undo_list); @@ -2774,10 +2780,14 @@ Both characters must have the same length of multi-byte form. */) && (len == 2 || (p[2] == fromstr[2] && (len == 3 || p[3] == fromstr[3])))))) { - if (! changed) + if (changed < 0) + /* We've already seen this and run the before-change-function; + this time we only need to record the actual position. */ + changed = pos; + else if (!changed) { - changed = pos; - modify_region (current_buffer, changed, XINT (end)); + changed = -1; + modify_region (current_buffer, pos, XINT (end)); if (! NILP (noundo)) { @@ -2786,6 +2796,10 @@ Both characters must have the same length of multi-byte form. */) if (MODIFF - 1 == current_buffer->auto_save_modified) current_buffer->auto_save_modified++; } + + /* The before-change-function may have moved the gap + or even modified the buffer so we should start over. */ + goto restart; } /* Take care of the case where the new character @@ -2838,7 +2852,7 @@ Both characters must have the same length of multi-byte form. */) pos++; } - if (changed) + if (changed > 0) { signal_after_change (changed, last_changed - changed, last_changed - changed); -- cgit v1.2.1 From 3046c3f9246fde1c93c30bce6c011204333de29f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 4 Aug 2006 17:22:18 +0000 Subject: (w32_query_font): Fix last change: use stricmp. --- src/ChangeLog | 4 ++++ src/w32fns.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 49c4649d144..59be848bf58 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-08-04 Eli Zaretskii + + * w32fns.c (w32_query_font): Fix last change: use stricmp. + 2006-08-04 Stefan Monnier * editfns.c (Fsubst_char_in_region): Redo the setup work after running diff --git a/src/w32fns.c b/src/w32fns.c index 4c933f0631e..e1cae4f3eb4 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -6236,7 +6236,7 @@ w32_query_font (struct frame *f, char *fontname) for (i = 0; i < one_w32_display_info.n_fonts ;i++, pfi++) { - if (strcasecmp(pfi->name, fontname) == 0) return pfi; + if (stricmp(pfi->name, fontname) == 0) return pfi; } return NULL; -- cgit v1.2.1 From 092869b9735590049a4be576970c95dc4b53af75 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 5 Aug 2006 01:38:21 +0000 Subject: * keyboard.c (read_char): Rebalance specpdl after receiving jump. --- src/ChangeLog | 6 ++++++ src/keyboard.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 59be848bf58..aa025125067 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-08-04 Chong Yidong + + * keyboard.c (read_char): Rebalance specpdl after receiving jump. + + * process.c: Reapply 2006-08-01 change. + 2006-08-04 Eli Zaretskii * w32fns.c (w32_query_font): Fix last change: use stricmp. diff --git a/src/keyboard.c b/src/keyboard.c index 95d880d1209..a4e1c98c013 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2403,7 +2403,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) EMACS_TIME *end_time; { volatile Lisp_Object c; - int count; + int count, jmpcount; jmp_buf local_getcjmp; jmp_buf save_jump; volatile int key_already_recorded = 0; @@ -2629,11 +2629,13 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) around any call to sit_for or kbd_buffer_get_event; it *must not* be in effect when we call redisplay. */ + jmpcount = SPECPDL_INDEX (); if (_setjmp (local_getcjmp)) { /* We must have saved the outer value of getcjmp here, so restore it now. */ restore_getcjmp (save_jump); + unbind_to (jmpcount, Qnil); XSETINT (c, quit_char); internal_last_event_frame = selected_frame; Vlast_event_frame = internal_last_event_frame; -- cgit v1.2.1 From 42ec1561cfb550dc580dd3e163b21289780a2a72 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sat, 5 Aug 2006 01:38:42 +0000 Subject: * process.c: Reapply 2006-08-01 change. --- src/process.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/process.c b/src/process.c index dc70ef37761..b24dee002c6 100644 --- a/src/process.c +++ b/src/process.c @@ -4158,6 +4158,14 @@ server_accept_connection (server, channel) when not inside wait_reading_process_output. */ static int waiting_for_user_input_p; +static Lisp_Object +wait_reading_process_output_unwind (data) + Lisp_Object data; +{ + waiting_for_user_input_p = XINT (data); + return Qnil; +} + /* This is here so breakpoints can be put on it. */ static void wait_reading_process_output_1 () @@ -4240,11 +4248,7 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, EMACS_TIME timeout, end_time; int wait_channel = -1; int got_some_input = 0; - /* We can't record_unwind_protect here because after the - set_waiting_for_input call, C-g (interrupt_signal) would run - throw_to_read_char instead of Fsignal, which means unbind_to - doesn't get called. */ - int saved_waiting_for_user_input_p = waiting_for_user_input_p; + int count = SPECPDL_INDEX (); FD_ZERO (&Available); #ifdef NON_BLOCKING_CONNECT @@ -4255,6 +4259,8 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, if (wait_proc != NULL) wait_channel = XINT (wait_proc->infd); + record_unwind_protect (wait_reading_process_output_unwind, + make_number (waiting_for_user_input_p)); waiting_for_user_input_p = read_kbd; /* Since we may need to wait several times, @@ -4881,7 +4887,7 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display, } /* end for each file descriptor */ } /* end while exit conditions not met */ - waiting_for_user_input_p = saved_waiting_for_user_input_p; + unbind_to (count, Qnil); /* If calling from keyboard input, do not quit since we want to return C-g as an input character. -- cgit v1.2.1 From 6b657e423e2e10e4d9f7061e76cd3f8f3fcff7b7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 5 Aug 2006 12:00:32 +0000 Subject: (kbd_buffer_get_event): Return Qnil when current time is exactly equal to end_time, not only when it is past that. --- src/ChangeLog | 5 +++++ src/keyboard.c | 14 ++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index aa025125067..28109540800 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-05 Eli Zaretskii + + * keyboard.c (kbd_buffer_get_event): Return Qnil when current time + is exactly equal to end_time, not only when it is past that. + 2006-08-04 Chong Yidong * keyboard.c (read_char): Rebalance specpdl after receiving jump. diff --git a/src/keyboard.c b/src/keyboard.c index a4e1c98c013..6f12994a1b8 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -3954,13 +3954,15 @@ kbd_buffer_get_event (kbp, used_mouse_menu, end_time) { EMACS_TIME duration; EMACS_GET_TIME (duration); - EMACS_SUB_TIME (duration, *end_time, duration); - if (EMACS_TIME_NEG_P (duration)) - return Qnil; + if (EMACS_TIME_GE (duration, *end_time)) + return Qnil; /* finished waiting */ else - wait_reading_process_output (EMACS_SECS (duration), - EMACS_USECS (duration), - -1, 1, Qnil, NULL, 0); + { + EMACS_SUB_TIME (duration, *end_time, duration); + wait_reading_process_output (EMACS_SECS (duration), + EMACS_USECS (duration), + -1, 1, Qnil, NULL, 0); + } } else wait_reading_process_output (0, 0, -1, 1, Qnil, NULL, 0); -- cgit v1.2.1 From ed91b2add33be7f813979c8c64e5cd92758d75fc Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 5 Aug 2006 13:01:10 +0000 Subject: (w32_valid_pointer_p): New function. --- src/w32.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src') diff --git a/src/w32.c b/src/w32.c index c093eab599e..0da908ff932 100644 --- a/src/w32.c +++ b/src/w32.c @@ -323,6 +323,28 @@ w32_strerror (int error_no) return buf; } +/* Return 1 if P is a valid pointer to an object of size SIZE. Return + 0 if P is NOT a valid pointer. Return -1 if we cannot validate P. + + This is called from alloc.c:valid_pointer_p. */ +int +w32_valid_pointer_p (void *p, int size) +{ + SIZE_T done; + HANDLE h = OpenProcess (PROCESS_VM_READ, FALSE, GetCurrentProcessId ()); + + if (h) + { + unsigned char *buf = alloca (size); + int retval = ReadProcessMemory (h, p, buf, size, &done); + + CloseHandle (h); + return retval; + } + else + return -1; +} + static char startup_dir[MAXPATHLEN]; /* Get the current working directory. */ -- cgit v1.2.1 From 0c5c0e3dfe9396982d70d155430ec441867b3629 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 5 Aug 2006 13:01:25 +0000 Subject: Add prototype for w32_valid_pointer_p. --- src/w32.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/w32.h b/src/w32.h index 1d5dbee6d40..6ba25a42403 100644 --- a/src/w32.h +++ b/src/w32.h @@ -110,6 +110,9 @@ extern void delete_child (child_process *cp); /* Equivalent of strerror for W32 error codes. */ extern char * w32_strerror (int error_no); +/* Validate a pointer. */ +extern int w32_valid_pointer_p (void *, int); + /* Get long (aka "true") form of file name, if it exists. */ extern BOOL w32_get_long_filename (char * name, char * buf, int size); -- cgit v1.2.1 From f892cf9c9d14e5920ad5c8ce236bd660f18c0816 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 5 Aug 2006 13:01:50 +0000 Subject: Include w32.h. (valid_lisp_object_p) [WINDOWSNT]: Call w32_valid_pointer_p to do the job. --- src/alloc.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/alloc.c b/src/alloc.c index e5735e03fd9..eb7acfd649f 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -80,6 +80,7 @@ extern POINTER_TYPE *sbrk (); #ifdef WINDOWSNT #include +#include "w32.h" #endif #ifdef DOUG_LEA_MALLOC @@ -4615,6 +4616,9 @@ int valid_pointer_p (p) void *p; { +#ifdef WINDOWSNT + return w32_valid_pointer_p (p, 16); +#else int fd; /* Obviously, we cannot just access it (we would SEGV trying), so we @@ -4631,6 +4635,7 @@ valid_pointer_p (p) } return -1; +#endif } /* Return 1 if OBJ is a valid lisp object. -- cgit v1.2.1 From 0a3297f7bbfced678d4cd242d5c5eeb59fa57878 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 5 Aug 2006 13:31:11 +0000 Subject: *** empty log message *** --- src/ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 28109540800..80d99505c44 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,13 @@ 2006-08-05 Eli Zaretskii + * w32.c (w32_valid_pointer_p): New function. + + * w32.h: Add prototype for w32_valid_pointer_p. + + * alloc.c: Include w32.h. + (valid_lisp_object_p) [WINDOWSNT]: Call w32_valid_pointer_p to do + the job. + * keyboard.c (kbd_buffer_get_event): Return Qnil when current time is exactly equal to end_time, not only when it is past that. -- cgit v1.2.1 From 43ed3b8da0c563a5fec8708cada2ee39411062ec Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Sun, 6 Aug 2006 14:22:24 +0000 Subject: * buffer.c (Vchange_major_mode_hook, Qchange_major_mode_hook): New vars. (Fkill_all_local_variables): Use it. (syms_of_buffer): Defvar it. --- src/ChangeLog | 6 ++++++ src/buffer.c | 12 +++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 80d99505c44..2e0563e44a7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-08-06 Chong Yidong + + * buffer.c (Vchange_major_mode_hook, Qchange_major_mode_hook): New vars. + (Fkill_all_local_variables): Use it. + (syms_of_buffer): Defvar it. + 2006-08-05 Eli Zaretskii * w32.c (w32_valid_pointer_p): New function. diff --git a/src/buffer.c b/src/buffer.c index fcb842de83c..3502afc9bf0 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -146,6 +146,9 @@ Lisp_Object Vinhibit_read_only; Lisp_Object Vkill_buffer_query_functions; Lisp_Object Qkill_buffer_query_functions; +/* Hook run before changing a major mode. */ +Lisp_Object Vchange_major_mode_hook, Qchange_major_mode_hook; + /* List of functions to call before changing an unmodified buffer. */ Lisp_Object Vfirst_change_hook; @@ -2386,7 +2389,7 @@ the normal hook `change-major-mode-hook'. */) Lisp_Object oalist; if (!NILP (Vrun_hooks)) - call1 (Vrun_hooks, intern ("change-major-mode-hook")); + call1 (Vrun_hooks, Qchange_major_mode_hook); oalist = current_buffer->local_var_alist; /* Make sure none of the bindings in oalist @@ -5998,6 +6001,13 @@ t means to use hollow box cursor. See `cursor-type' for other values. */); doc: /* List of functions called with no args to query before killing a buffer. */); Vkill_buffer_query_functions = Qnil; + DEFVAR_LISP ("change-major-mode-hook", &Vchange_major_mode_hook, + doc: /* Normal hook run before changing the major mode of a buffer. +The function `kill-all-local-variables' runs this before doing anything else. */); + Vchange_major_mode_hook = Qnil; + Qchange_major_mode_hook = intern ("change-major-mode-hook"); + staticpro (&Qchange_major_mode_hook); + defsubr (&Sbuffer_live_p); defsubr (&Sbuffer_list); defsubr (&Sget_buffer); -- cgit v1.2.1 From 614869993024153d5c7167ca78a9013cb0f95fc4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 7 Aug 2006 16:39:36 +0000 Subject: (BASE_PURESIZE): Increase to 1120000. --- src/ChangeLog | 4 ++++ src/puresize.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 2e0563e44a7..7c0408196aa 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-08-07 Andreas Schwab + + * puresize.h (BASE_PURESIZE): Increase to 1120000. + 2006-08-06 Chong Yidong * buffer.c (Vchange_major_mode_hook, Qchange_major_mode_hook): New vars. diff --git a/src/puresize.h b/src/puresize.h index bae7cbb6d6a..5dd374af207 100644 --- a/src/puresize.h +++ b/src/puresize.h @@ -43,7 +43,7 @@ Boston, MA 02110-1301, USA. */ #endif #ifndef BASE_PURESIZE -#define BASE_PURESIZE (1102000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) +#define BASE_PURESIZE (1120000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) #endif /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ -- cgit v1.2.1 From 2c53e699a1a9705755ca239da5acfdf32fd77ac9 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 9 Aug 2006 01:25:03 +0000 Subject: (syms_of_coding): Improve the docstring file-coding-system-alist. --- src/coding.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/coding.c b/src/coding.c index 1af7b4c0d52..ae9f6749792 100644 --- a/src/coding.c +++ b/src/coding.c @@ -7968,8 +7968,9 @@ the file contents. If VAL is a cons of coding systems, the car part is used for decoding, and the cdr part is used for encoding. If VAL is a function symbol, the function must return a coding system -or a cons of coding systems which are used as above. The function gets -the arguments with which `find-operation-coding-system' was called. +or a cons of coding systems which are used as above. The function is +called with an argument that is a list of the arguments with which +`find-operation-coding-system' was called. See also the function `find-operation-coding-system' and the variable `auto-coding-alist'. */); -- cgit v1.2.1 From bb0825cb7d70a290d61946d53f2a665ce8a4a14c Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 9 Aug 2006 01:25:59 +0000 Subject: *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 7c0408196aa..9d23a23e6a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-09 Kenichi Handa + + * coding.c (syms_of_coding): Improve the docstring + file-coding-system-alist. + 2006-08-07 Andreas Schwab * puresize.h (BASE_PURESIZE): Increase to 1120000. -- cgit v1.2.1 From c2028ac64fab925570fa9ef7e1ed564f4aa3eb2c Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 9 Aug 2006 04:55:10 +0000 Subject: (keyremap_step): No-op if fkey->parent = nil. (read_key_sequence): Always start fkey.start and fkey.end at 0, and likewise for keytran. --- src/ChangeLog | 6 ++++++ src/keyboard.c | 25 ++++++++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 9d23a23e6a5..678078d3781 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2006-08-09 Richard Stallman + + * keyboard.c (keyremap_step): No-op if fkey->parent = nil. + (read_key_sequence): Always start fkey.start and fkey.end at 0, + and likewise for keytran. + 2006-08-09 Kenichi Handa * coding.c (syms_of_coding): Improve the docstring diff --git a/src/keyboard.c b/src/keyboard.c index 6f12994a1b8..ae3b78b04d2 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -8385,7 +8385,15 @@ follow_key (key, nmaps, current, defs, next) such as Vfunction_key_map and Vkey_translation_map. */ typedef struct keyremap { - Lisp_Object map, parent; + /* This is the map originally specified for this use. */ + Lisp_Object parent; + /* This is a submap reached by looking up, in PARENT, + the events from START to END. */ + Lisp_Object map; + /* Positions [START, END) in the key sequence buffer + are the key that we have scanned so far. + Those events are the ones that we will replace + if PAREHT maps them into a key sequence. */ int start, end; } keyremap; @@ -8458,7 +8466,11 @@ keyremap_step (keybuf, bufsize, fkey, input, doit, diff, prompt) Lisp_Object next, key; key = keybuf[fkey->end++]; - next = access_keymap_keyremap (fkey->map, key, prompt, doit); + + if (KEYMAPP (fkey->parent)) + next = access_keymap_keyremap (fkey->map, key, prompt, doit); + else + next = Qnil; /* If keybuf[fkey->start..fkey->end] is bound in the map and we're in a position to do the key remapping, replace it with @@ -8656,9 +8668,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, delayed_switch_frame = Qnil; fkey.map = fkey.parent = Vfunction_key_map; keytran.map = keytran.parent = Vkey_translation_map; - /* If there is no translation-map, turn off scanning. */ - fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1; - keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1; + fkey.start = fkey.end = 0; + keytran.start = keytran.end = 0; if (INTERACTIVE) { @@ -9486,8 +9497,8 @@ read_key_sequence (keybuf, bufsize, prompt, dont_downcase_last, keybuf[t - 1] = new_key; mock_input = max (t, mock_input); - fkey.start = fkey.end = KEYMAPP (fkey.map) ? 0 : bufsize + 1; - keytran.start = keytran.end = KEYMAPP (keytran.map) ? 0 : bufsize + 1; + fkey.start = fkey.end = 0; + keytran.start = keytran.end = 0; goto replay_sequence; } -- cgit v1.2.1 From 0e94a24a871c7032b29bb971abdd0353d5ace084 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Thu, 10 Aug 2006 06:06:48 +0000 Subject: * keyboard.h: Declare in_sighandler. --- src/keyboard.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/keyboard.h b/src/keyboard.h index 96ac7d2e856..f8d8f789c08 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -190,6 +190,9 @@ extern EMACS_INT num_nonmacro_input_events; /* Nonzero means polling for input is temporarily suppressed. */ extern int poll_suppress_count; +/* Nonzero if we are executing from the SIGIO signal handler. */ +extern int in_sighandler; + /* Keymap mapping ASCII function key sequences onto their preferred forms. Initialized by the terminal-specific lisp files. */ extern Lisp_Object Vfunction_key_map; -- cgit v1.2.1 From 90b03d58966b9bb4f8de4f4b5fcbb24cec70b45a Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Thu, 10 Aug 2006 06:07:15 +0000 Subject: * keyboard.c: Define in_sighandler. (input_available_signal): Set in_sighandler. --- src/keyboard.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/keyboard.c b/src/keyboard.c index ae3b78b04d2..c715eadeb80 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -100,6 +100,9 @@ int interrupt_input_pending; /* File descriptor to use for input. */ extern int input_fd; +/* Nonzero if we are executing from the SIGIO signal handler. */ +int in_sighandler; + #ifdef HAVE_WINDOW_SYSTEM /* Make all keyboard buffers much bigger when using X windows. */ #ifdef MAC_OS8 @@ -6924,6 +6927,8 @@ input_available_signal (signo) SIGNAL_THREAD_CHECK (signo); #endif + in_sighandler = 1; + if (input_available_clear_time) EMACS_SET_SECS_USECS (*input_available_clear_time, 0, 0); @@ -6935,6 +6940,7 @@ input_available_signal (signo) sigfree (); #endif errno = old_errno; + in_sighandler = 0; } #endif /* SIGIO */ @@ -10802,6 +10808,7 @@ init_keyboard () do_mouse_tracking = Qnil; #endif input_pending = 0; + in_sighandler = 0; /* This means that command_loop_1 won't try to select anything the first time through. */ -- cgit v1.2.1 From 0d3e774694d20e3cf496204fad3447bac9f13d55 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Thu, 10 Aug 2006 06:09:30 +0000 Subject: * alloc.c (UNBLOCK_INPUT_ALLOC, BLOCK_INPUT_ALLOC): Use in_sighandler to check if mutex should be locked or not. --- src/alloc.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/alloc.c b/src/alloc.c index eb7acfd649f..192b974196f 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -130,17 +130,27 @@ static pthread_mutex_t alloc_mutex; #define BLOCK_INPUT_ALLOC \ do \ { \ - pthread_mutex_lock (&alloc_mutex); \ - if (pthread_self () == main_thread) \ - BLOCK_INPUT; \ + if (!in_sighandler) \ + { \ + pthread_mutex_lock (&alloc_mutex); \ + if (pthread_self () == main_thread) \ + BLOCK_INPUT; \ + else \ + sigblock (sigmask (SIGIO)); \ + } \ } \ while (0) #define UNBLOCK_INPUT_ALLOC \ do \ { \ - if (pthread_self () == main_thread) \ - UNBLOCK_INPUT; \ - pthread_mutex_unlock (&alloc_mutex); \ + if (!in_sighandler) \ + { \ + pthread_mutex_unlock (&alloc_mutex); \ + if (pthread_self () == main_thread) \ + UNBLOCK_INPUT; \ + else \ + sigunblock (sigmask (SIGIO)); \ + } \ } \ while (0) -- cgit v1.2.1 From abef1dd799261ccb87282c30ad61b87e31b4dadc Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Thu, 10 Aug 2006 06:09:57 +0000 Subject: * keyboard.c: Define in_sighandler. (input_available_signal): Set in_sighandler. (init_keyboard): Initialize in_sighandler. * keyboard.h: Declare in_sighandler. * alloc.c (UNBLOCK_INPUT_ALLOC, BLOCK_INPUT_ALLOC): Use in_sighandler to check if mutex should be locked or not. --- src/ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 678078d3781..abd06ed521c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,14 @@ +2006-08-10 Jan Dj,Ad(Brv + + * keyboard.c: Define in_sighandler. + (input_available_signal): Set in_sighandler. + (init_keyboard): Initialize in_sighandler. + + * keyboard.h: Declare in_sighandler. + + * alloc.c (UNBLOCK_INPUT_ALLOC, BLOCK_INPUT_ALLOC): Use in_sighandler + to check if mutex should be locked or not. + 2006-08-09 Richard Stallman * keyboard.c (keyremap_step): No-op if fkey->parent = nil. -- cgit v1.2.1 From 9fc68699c62e1efe177e4dcce268ef74eef4dde9 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Fri, 11 Aug 2006 07:30:14 +0000 Subject: * xselect.c (Fx_register_dnd_atom): New function. (syms_of_xselect): Defsubr it. (x_handle_dnd_message): Check that message_type is in dpyinfo->x_dnd_atoms before generating lisp event. --- src/xselect.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xselect.c b/src/xselect.c index fcac2860359..013a52dbdb1 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -2677,8 +2677,48 @@ If the value is 0 or the atom is not known, return the empty string. */) return ret; } -/* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. - TODO: Check if this client event really is a DND event? */ +DEFUN ("x-register-dnd-atom", Fx_register_dnd_atom, + Sx_register_dnd_atom, 1, 2, 0, + doc: /* Request that dnd events are made for ClientMessages with ATOM. +ATOM can be a symbol or a string. The ATOM is interned on the display that +FRAME is on. If FRAME is nil, the selected frame is used. */) + (atom, frame) + Lisp_Object atom, frame; +{ + Atom x_atom; + struct frame *f = check_x_frame (frame); + size_t i; + struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); + + + if (SYMBOLP (atom)) + x_atom = symbol_to_x_atom (dpyinfo, FRAME_X_DISPLAY (f), atom); + else if (STRINGP (atom)) + { + BLOCK_INPUT; + x_atom = XInternAtom (FRAME_X_DISPLAY (f), (char *) SDATA (atom), False); + UNBLOCK_INPUT; + } + else + error ("ATOM must be a symbol or a string"); + + for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i) + if (dpyinfo->x_dnd_atoms[i] == x_atom) + return Qnil; + + if (dpyinfo->x_dnd_atoms_length == dpyinfo->x_dnd_atoms_size) + { + dpyinfo->x_dnd_atoms_size *= 2; + dpyinfo->x_dnd_atoms = xrealloc (dpyinfo->x_dnd_atoms, + sizeof (*dpyinfo->x_dnd_atoms) + * dpyinfo->x_dnd_atoms_size); + } + + dpyinfo->x_dnd_atoms[dpyinfo->x_dnd_atoms_length++] = x_atom; + return Qnil; +} + +/* Convert an XClientMessageEvent to a Lisp event of type DRAG_N_DROP_EVENT. */ int x_handle_dnd_message (f, event, dpyinfo, bufp) @@ -2694,6 +2734,12 @@ x_handle_dnd_message (f, event, dpyinfo, bufp) int x, y; unsigned char *data = (unsigned char *) event->data.b; int idata[5]; + size_t i; + + for (i = 0; i < dpyinfo->x_dnd_atoms_length; ++i) + if (dpyinfo->x_dnd_atoms[i] == event->message_type) break; + + if (i == dpyinfo->x_dnd_atoms_length) return 0; XSETFRAME (frame, f); @@ -2867,6 +2913,7 @@ syms_of_xselect () defsubr (&Sx_get_atom_name); defsubr (&Sx_send_client_message); + defsubr (&Sx_register_dnd_atom); reading_selection_reply = Fcons (Qnil, Qnil); staticpro (&reading_selection_reply); -- cgit v1.2.1 From 9f562c51d616d1e534771600368e16705269c625 Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Fri, 11 Aug 2006 07:30:36 +0000 Subject: * xterm.h (struct x_display_info): Add x_dnd_atoms* to keep track of drag and drop Atoms. --- src/xterm.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/xterm.h b/src/xterm.h index 10a9aaa2961..9aa1d8fcacb 100644 --- a/src/xterm.h +++ b/src/xterm.h @@ -389,6 +389,12 @@ struct x_display_info X_WMTYPE_A, X_WMTYPE_B } wm_type; + + + /* Atoms that are drag and drop atoms */ + Atom *x_dnd_atoms; + size_t x_dnd_atoms_size; + size_t x_dnd_atoms_length; }; #ifdef HAVE_X_I18N -- cgit v1.2.1 From 93acf8f34d3cdbe9e23f0207ff6285c759c67bef Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Fri, 11 Aug 2006 07:30:56 +0000 Subject: * xterm.c (x_term_init): Initialize dpyinfo->x_dnd_atoms* --- src/xterm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/xterm.c b/src/xterm.c index 4203411e888..6fb9ee28f42 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10584,6 +10584,11 @@ x_term_init (display_name, xrm_option, resource_name) dpyinfo->cut_buffers_initialized = 0; + dpyinfo->x_dnd_atoms_size = 8; + dpyinfo->x_dnd_atoms_length = 0; + dpyinfo->x_dnd_atoms = xmalloc (sizeof (*dpyinfo->x_dnd_atoms) + * dpyinfo->x_dnd_atoms_size); + connection = ConnectionNumber (dpyinfo->display); dpyinfo->connection = connection; -- cgit v1.2.1 From 0c584069b6212a25be12aa9edf2f713b03f54f5b Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Fri, 11 Aug 2006 07:31:14 +0000 Subject: * xselect.c (Fx_register_dnd_atom): New function. (syms_of_xselect): Defsubr it. (x_handle_dnd_message): Check that message_type is in dpyinfo->x_dnd_atoms before generating lisp event. * xterm.h (struct x_display_info): Add x_dnd_atoms* to keep track of drag and drop Atoms. * xterm.c (x_term_init): Initialize dpyinfo->x_dnd_atoms* --- src/ChangeLog | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index abd06ed521c..b4016b546c0 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2006-08-11 Jan Dj,Ad(Brv + + * xselect.c (Fx_register_dnd_atom): New function. + (syms_of_xselect): Defsubr it. + (x_handle_dnd_message): Check that message_type is in + dpyinfo->x_dnd_atoms before generating lisp event. + + * xterm.h (struct x_display_info): Add x_dnd_atoms* to keep track + of drag and drop Atoms. + + * xterm.c (x_term_init): Initialize dpyinfo->x_dnd_atoms* + + 2006-08-10 Jan Dj,Ad(Brv * keyboard.c: Define in_sighandler. -- cgit v1.2.1 From d0cd961e58fb5e421377fad88b1037546e9bec93 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Aug 2006 11:36:15 +0000 Subject: (Fmouse_position, Fmouse_pixel_position) (Fset_mouse_position, Fset_mouse_pixel_position): Doc fix. --- src/frame.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/frame.c b/src/frame.c index 1fdeb129f89..82a016be69e 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1429,7 +1429,8 @@ The functions are run with one arg, the frame to be deleted. */) DEFUN ("mouse-position", Fmouse_position, Smouse_position, 0, 0, 0, doc: /* Return a list (FRAME X . Y) giving the current mouse frame and position. The position is given in character cells, where (0, 0) is the -upper-left corner. +upper-left corner of the frame, X is the horizontal offset, and Y is +the vertical offset. If Emacs is running on a mouseless terminal or hasn't been programmed to read the mouse position, it returns the selected frame for FRAME and nil for X and Y. @@ -1477,7 +1478,8 @@ DEFUN ("mouse-pixel-position", Fmouse_pixel_position, Smouse_pixel_position, 0, 0, 0, doc: /* Return a list (FRAME X . Y) giving the current mouse frame and position. The position is given in pixel units, where (0, 0) is the -upper-left corner. +upper-left corner of the frame, X is the horizontal offset, and Y is +the vertical offset. If Emacs is running on a mouseless terminal or hasn't been programmed to read the mouse position, it returns the selected frame for FRAME and nil for X and Y. */) @@ -1510,6 +1512,10 @@ Coordinates are relative to the frame, not a window, so the coordinates of the top left character in the frame may be nonzero due to left-hand scroll bars or the menu bar. +The position is given in character cells, where (0, 0) is the +upper-left corner of the frame, X is the horizontal offset, and Y is +the vertical offset. + This function is a no-op for an X frame that is not visible. If you have just created a frame, you must wait for it to become visible before calling this function on it, like this. @@ -1542,6 +1548,9 @@ before calling this function on it, like this. DEFUN ("set-mouse-pixel-position", Fset_mouse_pixel_position, Sset_mouse_pixel_position, 3, 3, 0, doc: /* Move the mouse pointer to pixel position (X,Y) in FRAME. +The position is given in pixels, where (0, 0) is the upper-left corner +of the frame, X is the horizontal offset, and Y is the vertical offset. + Note, this is a no-op for an X frame that is not visible. If you have just created a frame, you must wait for it to become visible before calling this function on it, like this. -- cgit v1.2.1 From e6b8d6628244c1978544b016006b9eac0310ef1f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 12 Aug 2006 12:34:47 +0000 Subject: *** empty log message *** --- src/ChangeLog | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index b4016b546c0..7f0932a4206 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-12 Eli Zaretskii + + * frame.c (Fmouse_position, Fmouse_pixel_position) + (Fset_mouse_position, Fset_mouse_pixel_position): Doc fix. + 2006-08-11 Jan Dj,Ad(Brv * xselect.c (Fx_register_dnd_atom): New function. -- cgit v1.2.1 From 9bdc2a5d70f1373b914d94cc8afb9fa82f320890 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 14 Aug 2006 09:58:03 +0000 Subject: *** empty log message *** --- src/ChangeLog | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 7f0932a4206..7bfc9a88967 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-14 Kim F. Storm + + * .gdbinit (pitx): Print iterator position. + Limit stack dump in case iterator is not initialized. + 2006-08-12 Eli Zaretskii * frame.c (Fmouse_position, Fmouse_pixel_position) @@ -7,7 +12,7 @@ * xselect.c (Fx_register_dnd_atom): New function. (syms_of_xselect): Defsubr it. - (x_handle_dnd_message): Check that message_type is in + (x_handle_dnd_message): Check that message_type is in dpyinfo->x_dnd_atoms before generating lisp event. * xterm.h (struct x_display_info): Add x_dnd_atoms* to keep track -- cgit v1.2.1 From 82d59cb0cabac3a51a23fe06b59a22bc14fa2000 Mon Sep 17 00:00:00 2001 From: Kim F. Storm Date: Mon, 14 Aug 2006 09:58:12 +0000 Subject: (pitx): Print iterator position. Limit stack dump in case iterator is not initialized. --- src/.gdbinit | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/.gdbinit b/src/.gdbinit index 564b3762bd7..a99b17e16fb 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -164,6 +164,10 @@ define pitx if ($it->current.pos.charpos != $it->current.pos.bytepos) printf "[%d]", $it->current.pos.bytepos end + printf " pos=%d", $it->position.charpos + if ($it->position.charpos != $it->position.bytepos) + printf "[%d]", $it->position.bytepos + end printf " start=%d", $it->start.pos.charpos if ($it->start.pos.charpos != $it->start.pos.bytepos) printf "[%d]", $it->start.pos.bytepos @@ -218,7 +222,7 @@ define pitx printf " max=%d+%d=%d", $it->max_ascent, $it->max_descent, $it->max_ascent+$it->max_descent printf "\n" set $i = 0 - while ($i < $it->sp) + while ($i < $it->sp && $i < 4) set $e = $it->stack[$i] printf "stack[%d]: ", $i output $e->method -- cgit v1.2.1 From 70282fce62e13117947dfb4151e93eeb60251d65 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Mon, 14 Aug 2006 18:32:23 +0000 Subject: * keyboard.c (read_char): Don't reset idle timers if a time limit is supplied. --- src/ChangeLog | 5 +++++ src/keyboard.c | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 7bfc9a88967..e97b91cf42e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-14 Chong Yidong + + * keyboard.c (read_char): Don't reset idle timers if a time limit + is supplied. + 2006-08-14 Kim F. Storm * .gdbinit (pitx): Print iterator position. diff --git a/src/keyboard.c b/src/keyboard.c index c715eadeb80..bea35a05731 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2679,7 +2679,14 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) goto non_reread; } - timer_start_idle (); + /* Start idle timers. If a time limit is supplied, we don't reset + idle timers. This avoids an infinite recursion in case an idle + timer calls `sit-for'. */ + + if (end_time) + timer_resume_idle (); + else + timer_start_idle (); /* If in middle of key sequence and minibuffer not active, start echoing if enough time elapses. */ @@ -2879,7 +2886,10 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) /* Actually read a character, waiting if necessary. */ save_getcjmp (save_jump); restore_getcjmp (local_getcjmp); - timer_start_idle (); + if (end_time) + timer_resume_idle (); + else + timer_start_idle (); c = kbd_buffer_get_event (&kb, used_mouse_menu, end_time); restore_getcjmp (save_jump); -- cgit v1.2.1 From 8db1f9fa0c11f5c2e1f4e5eb94911b573f61fd6f Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 15 Aug 2006 02:42:21 +0000 Subject: (ONE_MORE_BYTE_CHECK_MULTIBYTE): New arg RET. If SRC is exhausted, return with RET. (detect_coding_emacs_mule, detect_coding_iso2022) (detect_coding_sjis, detect_coding_big5, detect_coding_utf_8) (detect_coding_utf_16, detect_coding_ccl): Adjusted for the above change. --- src/ChangeLog | 9 +++++++++ src/coding.c | 61 ++++++++++++++++++++++++----------------------------------- 2 files changed, 34 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index e97b91cf42e..5026f4f10f8 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,12 @@ +2006-08-15 Kenichi Handa + + * coding.c (ONE_MORE_BYTE_CHECK_MULTIBYTE): New arg RET. If SRC + is exhausted, return with RET. + (detect_coding_emacs_mule, detect_coding_iso2022) + (detect_coding_sjis, detect_coding_big5, detect_coding_utf_8) + (detect_coding_utf_16, detect_coding_ccl): Adjusted for the above + change. + 2006-08-14 Chong Yidong * keyboard.c (read_char): Don't reset idle timers if a time limit diff --git a/src/coding.c b/src/coding.c index ae9f6749792..28e7a3fafc1 100644 --- a/src/coding.c +++ b/src/coding.c @@ -219,14 +219,15 @@ encode_coding_XXX (coding, source, destination, src_bytes, dst_bytes) /* Like ONE_MORE_BYTE, but 8-bit bytes of data at SRC are in multibyte - form if MULTIBYTEP is nonzero. */ + form if MULTIBYTEP is nonzero. In addition, if SRC is not less + than SRC_END, return with RET. */ -#define ONE_MORE_BYTE_CHECK_MULTIBYTE(c1, multibytep) \ +#define ONE_MORE_BYTE_CHECK_MULTIBYTE(c1, multibytep, ret) \ do { \ if (src >= src_end) \ { \ coding->result = CODING_FINISH_INSUFFICIENT_SRC; \ - goto label_end_of_loop; \ + return ret; \ } \ c1 = *src++; \ if (multibytep && c1 == LEADING_CODE_8_BIT_CONTROL) \ @@ -632,15 +633,15 @@ detect_coding_emacs_mule (src, src_end, multibytep) while (1) { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); - + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, + CODING_CATEGORY_MASK_EMACS_MULE); if (composing) { if (c < 0xA0) composing = 0; else if (c == 0xA0) { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, 0); c &= 0x7F; } else @@ -669,8 +670,6 @@ detect_coding_emacs_mule (src, src_end, multibytep) } } } - label_end_of_loop: - return CODING_CATEGORY_MASK_EMACS_MULE; } @@ -1425,9 +1424,9 @@ detect_coding_iso2022 (src, src_end, multibytep) Lisp_Object safe_chars; reg[0] = CHARSET_ASCII, reg[1] = reg[2] = reg[3] = -1; - while (mask && src < src_end) + while (mask) { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, mask & mask_found); retry: switch (c) { @@ -1435,11 +1434,11 @@ detect_coding_iso2022 (src, src_end, multibytep) if (inhibit_iso_escape_detection) break; single_shifting = 0; - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, mask & mask_found); if (c >= '(' && c <= '/') { /* Designation sequence for a charset of dimension 1. */ - ONE_MORE_BYTE_CHECK_MULTIBYTE (c1, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c1, multibytep, mask & mask_found); if (c1 < ' ' || c1 >= 0x80 || (charset = iso_charset_table[0][c >= ','][c1]) < 0) /* Invalid designation sequence. Just ignore. */ @@ -1449,13 +1448,14 @@ detect_coding_iso2022 (src, src_end, multibytep) else if (c == '$') { /* Designation sequence for a charset of dimension 2. */ - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, mask & mask_found); if (c >= '@' && c <= 'B') /* Designation for JISX0208.1978, GB2312, or JISX0208. */ reg[0] = charset = iso_charset_table[1][0][c]; else if (c >= '(' && c <= '/') { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c1, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c1, multibytep, + mask & mask_found); if (c1 < ' ' || c1 >= 0x80 || (charset = iso_charset_table[1][c >= ','][c1]) < 0) /* Invalid designation sequence. Just ignore. */ @@ -1630,7 +1630,8 @@ detect_coding_iso2022 (src, src_end, multibytep) c = -1; while (src < src_end) { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, + mask & mask_found); if (c < 0xA0) break; i++; @@ -1648,7 +1649,6 @@ detect_coding_iso2022 (src, src_end, multibytep) break; } } - label_end_of_loop: return (mask & mask_found); } @@ -2919,20 +2919,18 @@ detect_coding_sjis (src, src_end, multibytep) while (1) { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, CODING_CATEGORY_MASK_SJIS); if (c < 0x80) continue; if (c == 0x80 || c == 0xA0 || c > 0xEF) return 0; if (c <= 0x9F || c >= 0xE0) { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, 0); if (c < 0x40 || c == 0x7F || c > 0xFC) return 0; } } - label_end_of_loop: - return CODING_CATEGORY_MASK_SJIS; } /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". @@ -2951,17 +2949,15 @@ detect_coding_big5 (src, src_end, multibytep) while (1) { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, CODING_CATEGORY_MASK_BIG5); if (c < 0x80) continue; if (c < 0xA1 || c > 0xFE) return 0; - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, 0); if (c < 0x40 || (c > 0x7F && c < 0xA1) || c > 0xFE) return 0; } - label_end_of_loop: - return CODING_CATEGORY_MASK_BIG5; } /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". @@ -2989,7 +2985,7 @@ detect_coding_utf_8 (src, src_end, multibytep) while (1) { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, CODING_CATEGORY_MASK_UTF_8); if (UTF_8_1_OCTET_P (c)) continue; else if (UTF_8_2_OCTET_LEADING_P (c)) @@ -3007,16 +3003,13 @@ detect_coding_utf_8 (src, src_end, multibytep) do { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, 0); if (!UTF_8_EXTRA_OCTET_P (c)) return 0; seq_maybe_bytes--; } while (seq_maybe_bytes > 0); } - - label_end_of_loop: - return CODING_CATEGORY_MASK_UTF_8; } /* See the above "GENERAL NOTES on `detect_coding_XXX ()' functions". @@ -3045,15 +3038,13 @@ detect_coding_utf_16 (src, src_end, multibytep) struct coding_system dummy_coding; struct coding_system *coding = &dummy_coding; - ONE_MORE_BYTE_CHECK_MULTIBYTE (c1, multibytep); - ONE_MORE_BYTE_CHECK_MULTIBYTE (c2, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c1, multibytep, 0); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c2, multibytep, 0); if ((c1 == 0xFF) && (c2 == 0xFE)) return CODING_CATEGORY_MASK_UTF_16_LE; else if ((c1 == 0xFE) && (c2 == 0xFF)) return CODING_CATEGORY_MASK_UTF_16_BE; - - label_end_of_loop: return 0; } @@ -3322,12 +3313,10 @@ detect_coding_ccl (src, src_end, multibytep) valid = coding_system_table[CODING_CATEGORY_IDX_CCL]->spec.ccl.valid_codes; while (1) { - ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep); + ONE_MORE_BYTE_CHECK_MULTIBYTE (c, multibytep, CODING_CATEGORY_MASK_CCL); if (! valid[c]) return 0; } - label_end_of_loop: - return CODING_CATEGORY_MASK_CCL; } -- cgit v1.2.1 From 3236e6b849ab228d0e0d466343f10b1202e1cf9d Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Tue, 15 Aug 2006 17:39:21 +0000 Subject: * keyboard.c (read_char): Don't change idle timer state at all if end_time is supplied. --- src/ChangeLog | 5 +++++ src/keyboard.c | 25 ++++++++++++------------- 2 files changed, 17 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 5026f4f10f8..936f8a2546c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-15 Chong Yidong + + * keyboard.c (read_char): Don't change idle timer state at all if + end_time is supplied. + 2006-08-15 Kenichi Handa * coding.c (ONE_MORE_BYTE_CHECK_MULTIBYTE): New arg RET. If SRC diff --git a/src/keyboard.c b/src/keyboard.c index bea35a05731..fed6fbc79dd 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -2679,13 +2679,11 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) goto non_reread; } - /* Start idle timers. If a time limit is supplied, we don't reset - idle timers. This avoids an infinite recursion in case an idle - timer calls `sit-for'. */ + /* Start idle timers if no time limit is supplied. We don't do it + if a time limit is supplied to avoid an infinite recursion in the + situation where an idle timer calls `sit-for'. */ - if (end_time) - timer_resume_idle (); - else + if (!end_time) timer_start_idle (); /* If in middle of key sequence and minibuffer not active, @@ -2756,7 +2754,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) c = read_char_x_menu_prompt (nmaps, maps, prev_event, used_mouse_menu); /* Now that we have read an event, Emacs is not idle. */ - timer_stop_idle (); + if (!end_time) + timer_stop_idle (); goto exit; } @@ -2886,9 +2885,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) /* Actually read a character, waiting if necessary. */ save_getcjmp (save_jump); restore_getcjmp (local_getcjmp); - if (end_time) - timer_resume_idle (); - else + if (!end_time) timer_start_idle (); c = kbd_buffer_get_event (&kb, used_mouse_menu, end_time); restore_getcjmp (save_jump); @@ -2941,7 +2938,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) non_reread: - timer_stop_idle (); + if (!end_time) + timer_stop_idle (); RESUME_POLLING; if (NILP (c)) @@ -2975,7 +2973,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) last_input_char = c; Fcommand_execute (tem, Qnil, Fvector (1, &last_input_char), Qt); - if (CONSP (c) && EQ (XCAR (c), Qselect_window)) + if (CONSP (c) && EQ (XCAR (c), Qselect_window) && !end_time) /* We stopped being idle for this event; undo that. This prevents automatic window selection (under mouse_autoselect_window from acting as a real input event, for @@ -3181,7 +3179,8 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu, end_time) show_help_echo (help, window, object, position, 0); /* We stopped being idle for this event; undo that. */ - timer_resume_idle (); + if (!end_time) + timer_resume_idle (); goto retry; } -- cgit v1.2.1 From 29cbc4829462914df43038b05711b71aad6e570a Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 16 Aug 2006 00:20:53 +0000 Subject: (choose_write_coding_system): Use LF for end-of-line in auto-saving. --- src/ChangeLog | 5 +++++ src/fileio.c | 2 ++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 936f8a2546c..58929cc40d2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2006-08-16 Kenichi Handa + + * fileio.c (choose_write_coding_system): Use LF for end-of-line + in auto-saving. + 2006-08-15 Chong Yidong * keyboard.c (read_char): Don't change idle timer state at all if diff --git a/src/fileio.c b/src/fileio.c index d26b2808726..4a39e7ffa19 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4845,6 +4845,8 @@ choose_write_coding_system (start, end, filename, /* ... but with the special flag to indicate not to strip off leading code of eight-bit-control chars. */ coding->flags = 1; + /* We force LF for end-of-line because that is faster. */ + coding->eol_type = CODING_EOL_LF; goto done_setup_coding; } else if (!NILP (Vcoding_system_for_write)) -- cgit v1.2.1 From c33f8948974b2c8614bec80860c6ec01a2a11d5f Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 16 Aug 2006 05:15:25 +0000 Subject: (debug_output_compilation_hack): New function. --- src/print.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/print.c b/src/print.c index c36b9476f82..ac8736d2aa4 100644 --- a/src/print.c +++ b/src/print.c @@ -924,6 +924,15 @@ to make it write to the debugging output. */) return character; } +/* This function is never called. Its purpose is to prevent + print_output_debug_flag from being optimized away. */ + +int +debug_output_compilation_hack (x) + int x; +{ + print_output_debug_flag = x; +} #if defined(GNU_LINUX) -- cgit v1.2.1 From 3cb74cd1277590da7137297c1f2e6db95d9403a0 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Wed, 16 Aug 2006 05:17:30 +0000 Subject: *** empty log message *** --- src/ChangeLog | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 58929cc40d2..b3242619d7f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-08-16 Richard Stallman + + * print.c (debug_output_compilation_hack): New function. + 2006-08-16 Kenichi Handa * fileio.c (choose_write_coding_system): Use LF for end-of-line -- cgit v1.2.1 From dae581bf8d1eb6b08fac90505e38244db2a3f3da Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 16 Aug 2006 12:33:12 +0000 Subject: (debug_output_compilation_hack): Fix return type. --- src/ChangeLog | 4 ++++ src/print.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index b3242619d7f..f37715a4b71 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2006-08-16 Andreas Schwab + + * print.c (debug_output_compilation_hack): Fix return type. + 2006-08-16 Richard Stallman * print.c (debug_output_compilation_hack): New function. diff --git a/src/print.c b/src/print.c index ac8736d2aa4..e56c231d30a 100644 --- a/src/print.c +++ b/src/print.c @@ -927,7 +927,7 @@ to make it write to the debugging output. */) /* This function is never called. Its purpose is to prevent print_output_debug_flag from being optimized away. */ -int +void debug_output_compilation_hack (x) int x; { -- cgit v1.2.1