aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2006-04-10 14:52:24 +0000
committerKaroly Lorentey2006-04-10 14:52:24 +0000
commite349ae3b6b6db99d11321622fadff88bc42c1125 (patch)
tree7a24a5dad70d4b3695f227681fc37e179551d24a /src
parent2518de51d20e848711c712f5030e8c207a4e2840 (diff)
parent4f07f2e8a5458758dcf2bfbdf9b0cf8c91a8572e (diff)
downloademacs-e349ae3b6b6db99d11321622fadff88bc42c1125.tar.gz
emacs-e349ae3b6b6db99d11321622fadff88bc42c1125.zip
Merged from
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-188 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-189 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-190 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-191 Undo incorrect merge of etc/images/README from Gnus 5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-192 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-193 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-194 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-195 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-196 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-197 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-198 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-199 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-200 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-201 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-202 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-203 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-204 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-205 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-206 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-73 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-74 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-75 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-76 Update from CVS: README: Addition from 5.10.6 tar ball. * emacs@sv.gnu.org/gnus--rel--5.10--patch-77 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-78 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-79 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-80 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-547
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog79
-rw-r--r--src/alloc.c20
-rw-r--r--src/config.in4
-rw-r--r--src/editfns.c34
-rw-r--r--src/image.c11
-rw-r--r--src/keymap.c2
-rw-r--r--src/lisp.h39
-rw-r--r--src/macterm.c4
-rw-r--r--src/process.c96
-rw-r--r--src/process.h19
-rw-r--r--src/puresize.h2
-rw-r--r--src/search.c4
-rw-r--r--src/w32fns.c15
13 files changed, 234 insertions, 95 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ba816a9e2f0..d5e4d20111e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,82 @@
12006-04-09 Richard Stallman <rms@gnu.org>
2
3 * lisp.h (Fkill_emacs): Undo previous change.
4
52006-04-08 Richard Stallman <rms@gnu.org>
6
7 * search.c (boyer_moore): Test ch >= 0400, not >.
8
92006-04-09 Dan Nicolaescu <dann@ics.uci.edu>
10
11 * puresize.h (pure_write_error): Mark as NO_RETURN.
12
13 * lisp.h (args_out_of_range, args_out_of_range_3)
14
152006-04-08 Eli Zaretskii <eliz@gnu.org>
16
17 * w32fns.c (w32_wnd_proc) <WM_MOUSEMOVE>: Ignore mouse movements
18 if a menu is active on this frame.
19
202006-04-08 Dan Nicolaescu <dann@ics.uci.edu>
21
22 * lisp.h (report_file_error): Mark as NO_RETURN.
23
242006-04-08 Eli Zaretskii <eliz@gnu.org>
25
26 * alloc.c [STDC_HEADERS]: Include stddef.h.
27
28 * lisp.h (PSEUDOVECSIZE): Fix last change.
29
302006-04-08 Stefan Monnier <monnier@iro.umontreal.ca>
31
32 * process.h (struct Lisp_Process): Replace Lisp_Objects `pid',
33 `raw_status_high', and `raw_status_low' with plain integers, and move
34 them to the end of the structure.
35
36 * alloc.c (allocate_process): Use PSEUDOVECSIZE to initialize the
37 pseudovector's size field so only the Lisp_Object fields get GC'd.
38
39 * process.c (update_status, make_process, Fdelete_process)
40 (Fprocess_status, list_processes_1, start_process_unwind)
41 (create_process, Fmake_network_process, server_accept_connection)
42 (wait_reading_process_output, send_process, Fprocess_running_child_p)
43 (process_send_signal, proc_encode_coding_system, Fprocess_send_eof)
44 (sigchld_handler, status_notify): Adjust to new non-Lisp fields for
45 `pid' and `raw_status'.
46 (Fprocess_id, Fsignal_process): Same, and additionally use floats when
47 representing PIDs that are larger than most-positive-fixnum.
48
49 * keymap.c (describe_map): Only use XINT if we checked INTEGERP.
50
51 * lisp.h (OFFSETOF, PSEUDOVECSIZE): New macros.
52
532006-04-08 Eli Zaretskii <eliz@gnu.org>
54
55 * w32fns.c (Fx_show_tip): Add 3 to the 5th arg of SetWindowPos.
56
572006-04-03 Paul Eggert <eggert@cs.ucla.edu>
58
59 * editfns.c (TM_YEAR_IN_ASCTIME_RANGE): New macro, identical to
60 ../lib-src/b2m.c and ../lib-src/editfns.c.
61 (Fcurrent_time_string): Use it.
62 Document that the year might not consume 4 columns if it's outside
63 the range 1000-9999.
64 Check for asctime failure.
65 Don't assume that the output string length is always exactly 24.
66
672006-04-03 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
68
69 * macterm.c (XTread_socket): Initialize variable `f' before its use.
70
712006-04-03 Kenichi Handa <handa@m17n.org>
72
73 * image.c: Include "charset.h" and "coding.h".
74 (x_find_image_file): Return an encoded file name.
75
762006-04-01 Eli Zaretskii <eliz@gnu.org>
77
78 * configure: Regenerated.
79
12006-03-31 Kenichi Handa <handa@m17n.org> 802006-03-31 Kenichi Handa <handa@m17n.org>
2 81
3 * xfns.c (xg_set_icon): Delete superfluous UNGCPRO. 82 * xfns.c (xg_set_icon): Delete superfluous UNGCPRO.
diff --git a/src/alloc.c b/src/alloc.c
index 259143ffad8..8088540bb6b 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -23,6 +23,10 @@ Boston, MA 02110-1301, USA. */
23#include <stdio.h> 23#include <stdio.h>
24#include <limits.h> /* For CHAR_BIT. */ 24#include <limits.h> /* For CHAR_BIT. */
25 25
26#ifdef STDC_HEADERS
27#include <stddef.h> /* For offsetof, used by PSEUDOVECSIZE. */
28#endif
29
26#ifdef ALLOC_DEBUG 30#ifdef ALLOC_DEBUG
27#undef INLINE 31#undef INLINE
28#endif 32#endif
@@ -3005,13 +3009,17 @@ allocate_frame ()
3005struct Lisp_Process * 3009struct Lisp_Process *
3006allocate_process () 3010allocate_process ()
3007{ 3011{
3008 EMACS_INT len = VECSIZE (struct Lisp_Process); 3012 /* Memory-footprint of the object in nb of Lisp_Object fields. */
3009 struct Lisp_Vector *v = allocate_vectorlike (len, MEM_TYPE_PROCESS); 3013 EMACS_INT memlen = VECSIZE (struct Lisp_Process);
3014 /* Size if we only count the actual Lisp_Object fields (which need to be
3015 traced by the GC). */
3016 EMACS_INT lisplen = PSEUDOVECSIZE (struct Lisp_Process, pid);
3017 struct Lisp_Vector *v = allocate_vectorlike (memlen, MEM_TYPE_PROCESS);
3010 EMACS_INT i; 3018 EMACS_INT i;
3011 3019
3012 for (i = 0; i < len; ++i) 3020 for (i = 0; i < lisplen; ++i)
3013 v->contents[i] = Qnil; 3021 v->contents[i] = Qnil;
3014 v->size = len; 3022 v->size = lisplen;
3015 3023
3016 return (struct Lisp_Process *) v; 3024 return (struct Lisp_Process *) v;
3017} 3025}
@@ -5563,6 +5571,10 @@ mark_object (arg)
5563 if (size & PSEUDOVECTOR_FLAG) 5571 if (size & PSEUDOVECTOR_FLAG)
5564 size &= PSEUDOVECTOR_SIZE_MASK; 5572 size &= PSEUDOVECTOR_SIZE_MASK;
5565 5573
5574 /* Note that this size is not the memory-footprint size, but only
5575 the number of Lisp_Object fields that we should trace.
5576 The distinction is used e.g. by Lisp_Process which places extra
5577 non-Lisp_Object fields at the end of the structure. */
5566 for (i = 0; i < size; i++) /* and then mark its elements */ 5578 for (i = 0; i < size; i++) /* and then mark its elements */
5567 mark_object (ptr->contents[i]); 5579 mark_object (ptr->contents[i]);
5568 } 5580 }
diff --git a/src/config.in b/src/config.in
index b6730d0284e..ddbbbce97d2 100644
--- a/src/config.in
+++ b/src/config.in
@@ -1,8 +1,8 @@
1/* src/config.in. Generated from configure.in by autoheader. */ 1/* src/config.in. Generated from configure.in by autoheader. */
2 2
3/* GNU Emacs site configuration template file. 3/* GNU Emacs site configuration template file.
4 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2002, 2004, 2005, 4 Copyright (C) 1988, 1993, 1994, 1999, 2000, 2002, 2004, 2005, 2006
5 2006 Free Software Foundation, Inc. 5 Free Software Foundation, Inc.
6 6
7This file is part of GNU Emacs. 7This file is part of GNU Emacs.
8 8
diff --git a/src/editfns.c b/src/editfns.c
index 888bbe3062b..450a7684584 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -74,6 +74,13 @@ extern char **environ;
74 74
75#define TM_YEAR_BASE 1900 75#define TM_YEAR_BASE 1900
76 76
77/* Nonzero if TM_YEAR is a struct tm's tm_year value that causes
78 asctime to have well-defined behavior. */
79#ifndef TM_YEAR_IN_ASCTIME_RANGE
80# define TM_YEAR_IN_ASCTIME_RANGE(tm_year) \
81 (1000 - TM_YEAR_BASE <= (tm_year) && (tm_year) <= 9999 - TM_YEAR_BASE)
82#endif
83
77extern size_t emacs_strftimeu P_ ((char *, size_t, const char *, 84extern size_t emacs_strftimeu P_ ((char *, size_t, const char *,
78 const struct tm *, int)); 85 const struct tm *, int));
79static int tm_diff P_ ((struct tm *, struct tm *)); 86static int tm_diff P_ ((struct tm *, struct tm *));
@@ -1833,7 +1840,8 @@ usage: (encode-time SECOND MINUTE HOUR DAY MONTH YEAR &optional ZONE) */)
1833DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0, 1840DEFUN ("current-time-string", Fcurrent_time_string, Scurrent_time_string, 0, 1, 0,
1834 doc: /* Return the current time, as a human-readable string. 1841 doc: /* Return the current time, as a human-readable string.
1835Programs can use this function to decode a time, 1842Programs can use this function to decode a time,
1836since the number of columns in each field is fixed. 1843since the number of columns in each field is fixed
1844if the year is in the range 1000-9999.
1837The format is `Sun Sep 16 01:03:52 1973'. 1845The format is `Sun Sep 16 01:03:52 1973'.
1838However, see also the functions `decode-time' and `format-time-string' 1846However, see also the functions `decode-time' and `format-time-string'
1839which provide a much more powerful and general facility. 1847which provide a much more powerful and general facility.
@@ -1847,31 +1855,23 @@ but this is considered obsolete. */)
1847 Lisp_Object specified_time; 1855 Lisp_Object specified_time;
1848{ 1856{
1849 time_t value; 1857 time_t value;
1850 char buf[30];
1851 struct tm *tm; 1858 struct tm *tm;
1852 register char *tem; 1859 register char *tem;
1853 1860
1854 if (! lisp_time_argument (specified_time, &value, NULL)) 1861 if (! lisp_time_argument (specified_time, &value, NULL))
1855 error ("Invalid time specification"); 1862 error ("Invalid time specification");
1856 /* Do not use ctime, since it has undefined behavior with 1863
1857 out-of-range time stamps. This avoids a core dump triggered by 1864 /* Convert to a string, checking for out-of-range time stamps.
1858 (current-time-string '(2814749767106 0)) on 64-bit Solaris 8. See 1865 Don't use 'ctime', as that might dump core if VALUE is out of
1859 <http://www.opengroup.org/austin/mailarchives/ag/msg09294.html> 1866 range. */
1860 for more details about this portability problem. */
1861 tm = localtime (&value); 1867 tm = localtime (&value);
1862 /* Checking for out-of-range time stamps avoids buffer overruns that 1868 if (! (tm && TM_YEAR_IN_ASCTIME_RANGE (tm->tm_year) && (tem = asctime (tm))))
1863 cause core dump on some systems (e.g., 64-bit Solaris), and also
1864 preserves the historic behavior of always returning a fixed-size
1865 24-character string. */
1866 if (! (tm && -999 - TM_YEAR_BASE <= tm->tm_year
1867 && tm->tm_year <= 9999 - TM_YEAR_BASE))
1868 error ("Specified time is not representable"); 1869 error ("Specified time is not representable");
1869 tem = asctime (tm);
1870 1870
1871 strncpy (buf, tem, 24); 1871 /* Remove the trailing newline. */
1872 buf[24] = 0; 1872 tem[strlen (tem) - 1] = '\0';
1873 1873
1874 return build_string (buf); 1874 return build_string (tem);
1875} 1875}
1876 1876
1877/* Yield A - B, measured in seconds. 1877/* Yield A - B, measured in seconds.
diff --git a/src/image.c b/src/image.c
index 8e3a0afe91a..0d52399327e 100644
--- a/src/image.c
+++ b/src/image.c
@@ -39,6 +39,8 @@ Boston, MA 02110-1301, USA. */
39#include "blockinput.h" 39#include "blockinput.h"
40#include "systime.h" 40#include "systime.h"
41#include <epaths.h> 41#include <epaths.h>
42#include "charset.h"
43#include "coding.h"
42 44
43 45
44#ifdef HAVE_X_WINDOWS 46#ifdef HAVE_X_WINDOWS
@@ -2248,8 +2250,8 @@ static unsigned char *slurp_file P_ ((char *, int *));
2248 2250
2249 2251
2250/* Find image file FILE. Look in data-directory, then 2252/* Find image file FILE. Look in data-directory, then
2251 x-bitmap-file-path. Value is the full name of the file found, or 2253 x-bitmap-file-path. Value is the encoded full name of the file
2252 nil if not found. */ 2254 found, or nil if not found. */
2253 2255
2254Lisp_Object 2256Lisp_Object
2255x_find_image_file (file) 2257x_find_image_file (file)
@@ -2269,7 +2271,10 @@ x_find_image_file (file)
2269 if (fd == -1) 2271 if (fd == -1)
2270 file_found = Qnil; 2272 file_found = Qnil;
2271 else 2273 else
2272 close (fd); 2274 {
2275 file_found = ENCODE_FILE (file_found);
2276 close (fd);
2277 }
2273 2278
2274 UNGCPRO; 2279 UNGCPRO;
2275 return file_found; 2280 return file_found;
diff --git a/src/keymap.c b/src/keymap.c
index 92c67ed1f1a..af881d73ccd 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -3336,7 +3336,7 @@ describe_map (map, prefix, elt_describer, partial, shadow,
3336 if (INTEGERP (vect[i].event)) 3336 if (INTEGERP (vect[i].event))
3337 { 3337 {
3338 while (i + 1 < slots_used 3338 while (i + 1 < slots_used
3339 && XINT (vect[i + 1].event) == XINT (vect[i].event) + 1 3339 && EQ (vect[i+1].event, make_number (XINT (vect[i].event) + 1))
3340 && !NILP (Fequal (vect[i + 1].definition, definition)) 3340 && !NILP (Fequal (vect[i + 1].definition, definition))
3341 && vect[i].shadowed == vect[i + 1].shadowed) 3341 && vect[i].shadowed == vect[i + 1].shadowed)
3342 i++; 3342 i++;
diff --git a/src/lisp.h b/src/lisp.h
index efc8a8f19de..c28c981daf9 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -297,7 +297,11 @@ enum pvec_type
297#endif 297#endif
298}; 298};
299 299
300/* For convenience, we also store the number of elements in these bits. */ 300/* For convenience, we also store the number of elements in these bits.
301 Note that this size is not necessarily the memory-footprint size, but
302 only the number of Lisp_Object fields (that need to be traced by the GC).
303 The distinction is used e.g. by Lisp_Process which places extra
304 non-Lisp_Object fields at the end of the structure. */
301#define PSEUDOVECTOR_SIZE_MASK 0x1ff 305#define PSEUDOVECTOR_SIZE_MASK 0x1ff
302 306
303/* Number of bits to put in each character in the internal representation 307/* Number of bits to put in each character in the internal representation
@@ -702,12 +706,12 @@ struct Lisp_String
702 unsigned char *data; 706 unsigned char *data;
703 }; 707 };
704 708
705/* If a struct is made to look like a vector, this macro returns the length 709#ifdef offsetof
706 of the shortest vector that would hold that struct. */ 710#define OFFSETOF(type,field) offsetof(type,field)
707#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \ 711#else
708 - sizeof (Lisp_Object)) \ 712#define OFFSETOF(type,field) \
709 + sizeof(Lisp_Object) - 1) /* round up */ \ 713 ((int)((char*)&((type*)0)->field - (char*)0))
710 / sizeof (Lisp_Object)) 714#endif
711 715
712struct Lisp_Vector 716struct Lisp_Vector
713 { 717 {
@@ -716,6 +720,20 @@ struct Lisp_Vector
716 Lisp_Object contents[1]; 720 Lisp_Object contents[1];
717 }; 721 };
718 722
723/* If a struct is made to look like a vector, this macro returns the length
724 of the shortest vector that would hold that struct. */
725#define VECSIZE(type) ((sizeof (type) - (sizeof (struct Lisp_Vector) \
726 - sizeof (Lisp_Object)) \
727 + sizeof(Lisp_Object) - 1) /* round up */ \
728 / sizeof (Lisp_Object))
729
730/* Like VECSIZE, but used when the pseudo-vector has non-Lisp_Object fields
731 at the end and we need to compute the number of Lisp_Object fields (the
732 ones that the GC needs to trace). */
733#define PSEUDOVECSIZE(type, nonlispfield) \
734 ((OFFSETOF(type, nonlispfield) - OFFSETOF(struct Lisp_Vector, contents[0])) \
735 / sizeof (Lisp_Object))
736
719/* A char table is a kind of vectorlike, with contents are like a 737/* A char table is a kind of vectorlike, with contents are like a
720 vector but with a few other slots. For some purposes, it makes 738 vector but with a few other slots. For some purposes, it makes
721 sense to handle a chartable with type struct Lisp_Vector. An 739 sense to handle a chartable with type struct Lisp_Vector. An
@@ -2225,8 +2243,9 @@ EXFUN (Fmake_variable_buffer_local, 1);
2225extern Lisp_Object indirect_variable P_ ((Lisp_Object)); 2243extern Lisp_Object indirect_variable P_ ((Lisp_Object));
2226extern Lisp_Object long_to_cons P_ ((unsigned long)); 2244extern Lisp_Object long_to_cons P_ ((unsigned long));
2227extern unsigned long cons_to_long P_ ((Lisp_Object)); 2245extern unsigned long cons_to_long P_ ((Lisp_Object));
2228extern void args_out_of_range P_ ((Lisp_Object, Lisp_Object)); 2246extern void args_out_of_range P_ ((Lisp_Object, Lisp_Object)) NO_RETURN;
2229extern void args_out_of_range_3 P_ ((Lisp_Object, Lisp_Object, Lisp_Object)); 2247extern void args_out_of_range_3 P_ ((Lisp_Object, Lisp_Object,
2248 Lisp_Object)) NO_RETURN;
2230extern Lisp_Object wrong_type_argument P_ ((Lisp_Object, Lisp_Object)); 2249extern Lisp_Object wrong_type_argument P_ ((Lisp_Object, Lisp_Object));
2231extern void store_symval_forwarding P_ ((Lisp_Object, Lisp_Object, 2250extern void store_symval_forwarding P_ ((Lisp_Object, Lisp_Object,
2232 Lisp_Object, struct buffer *)); 2251 Lisp_Object, struct buffer *));
@@ -2844,7 +2863,7 @@ EXFUN (Ffile_readable_p, 1);
2844EXFUN (Ffile_executable_p, 1); 2863EXFUN (Ffile_executable_p, 1);
2845EXFUN (Fread_file_name, 6); 2864EXFUN (Fread_file_name, 6);
2846extern Lisp_Object close_file_unwind P_ ((Lisp_Object)); 2865extern Lisp_Object close_file_unwind P_ ((Lisp_Object));
2847extern void report_file_error P_ ((const char *, Lisp_Object)); 2866extern void report_file_error P_ ((const char *, Lisp_Object)) NO_RETURN;
2848extern int internal_delete_file P_ ((Lisp_Object)); 2867extern int internal_delete_file P_ ((Lisp_Object));
2849extern void syms_of_fileio P_ ((void)); 2868extern void syms_of_fileio P_ ((void));
2850extern void init_fileio_once P_ ((void)); 2869extern void init_fileio_once P_ ((void));
diff --git a/src/macterm.c b/src/macterm.c
index 77558eb320d..7c946a9fd3f 100644
--- a/src/macterm.c
+++ b/src/macterm.c
@@ -10455,6 +10455,8 @@ XTread_socket (sd, expected, hold_quit)
10455 10455
10456 ObscureCursor (); 10456 ObscureCursor ();
10457 10457
10458 f = mac_focus_frame (dpyinfo);
10459
10458 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight) 10460 if (!dpyinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
10459 && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window)) 10461 && !EQ (f->tool_bar_window, dpyinfo->mouse_face_window))
10460 { 10462 {
@@ -10500,7 +10502,7 @@ XTread_socket (sd, expected, hold_quit)
10500 inev.modifiers |= (extra_keyboard_modifiers 10502 inev.modifiers |= (extra_keyboard_modifiers
10501 & (meta_modifier | alt_modifier 10503 & (meta_modifier | alt_modifier
10502 | hyper_modifier | super_modifier)); 10504 | hyper_modifier | super_modifier));
10503 XSETFRAME (inev.frame_or_window, mac_focus_frame (dpyinfo)); 10505 XSETFRAME (inev.frame_or_window, f);
10504 break; 10506 break;
10505 10507
10506 case kHighLevelEvent: 10508 case kHighLevelEvent:
diff --git a/src/process.c b/src/process.c
index e3fa187565f..003f27b77b8 100644
--- a/src/process.c
+++ b/src/process.c
@@ -414,10 +414,10 @@ update_status (p)
414 struct Lisp_Process *p; 414 struct Lisp_Process *p;
415{ 415{
416 union { int i; WAITTYPE wt; } u; 416 union { int i; WAITTYPE wt; } u;
417 u.i = XFASTINT (p->raw_status_low) + (XFASTINT (p->raw_status_high) << 16); 417 eassert (p->raw_status_new);
418 u.i = p->raw_status;
418 p->status = status_convert (u.wt); 419 p->status = status_convert (u.wt);
419 p->raw_status_low = Qnil; 420 p->raw_status_new = 0;
420 p->raw_status_high = Qnil;
421} 421}
422 422
423/* Convert a process status word in Unix format to 423/* Convert a process status word in Unix format to
@@ -619,11 +619,10 @@ make_process (name)
619 619
620 XSETINT (p->infd, -1); 620 XSETINT (p->infd, -1);
621 XSETINT (p->outfd, -1); 621 XSETINT (p->outfd, -1);
622 XSETFASTINT (p->pid, 0);
623 XSETFASTINT (p->tick, 0); 622 XSETFASTINT (p->tick, 0);
624 XSETFASTINT (p->update_tick, 0); 623 XSETFASTINT (p->update_tick, 0);
625 p->raw_status_low = Qnil; 624 p->pid = 0;
626 p->raw_status_high = Qnil; 625 p->raw_status_new = 0;
627 p->status = Qrun; 626 p->status = Qrun;
628 p->mark = Fmake_marker (); 627 p->mark = Fmake_marker ();
629 628
@@ -789,8 +788,7 @@ nil, indicating the current buffer's process. */)
789 process = get_process (process); 788 process = get_process (process);
790 p = XPROCESS (process); 789 p = XPROCESS (process);
791 790
792 p->raw_status_low = Qnil; 791 p->raw_status_new = 0;
793 p->raw_status_high = Qnil;
794 if (NETCONN1_P (p)) 792 if (NETCONN1_P (p))
795 { 793 {
796 p->status = Fcons (Qexit, Fcons (make_number (0), Qnil)); 794 p->status = Fcons (Qexit, Fcons (make_number (0), Qnil));
@@ -840,7 +838,7 @@ nil, indicating the current buffer's process. */)
840 return process; 838 return process;
841 839
842 p = XPROCESS (process); 840 p = XPROCESS (process);
843 if (!NILP (p->raw_status_low)) 841 if (p->raw_status_new)
844 update_status (p); 842 update_status (p);
845 status = p->status; 843 status = p->status;
846 if (CONSP (status)) 844 if (CONSP (status))
@@ -865,7 +863,7 @@ If PROCESS has not yet exited or died, return 0. */)
865 register Lisp_Object process; 863 register Lisp_Object process;
866{ 864{
867 CHECK_PROCESS (process); 865 CHECK_PROCESS (process);
868 if (!NILP (XPROCESS (process)->raw_status_low)) 866 if (XPROCESS (process)->raw_status_new)
869 update_status (XPROCESS (process)); 867 update_status (XPROCESS (process));
870 if (CONSP (XPROCESS (process)->status)) 868 if (CONSP (XPROCESS (process)->status))
871 return XCAR (XCDR (XPROCESS (process)->status)); 869 return XCAR (XCDR (XPROCESS (process)->status));
@@ -880,7 +878,9 @@ For a network connection, this value is nil. */)
880 register Lisp_Object process; 878 register Lisp_Object process;
881{ 879{
882 CHECK_PROCESS (process); 880 CHECK_PROCESS (process);
883 return XPROCESS (process)->pid; 881 return (XPROCESS (process)->pid
882 ? make_fixnum_or_float (XPROCESS (process)->pid)
883 : Qnil);
884} 884}
885 885
886DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0, 886DEFUN ("process-name", Fprocess_name, Sprocess_name, 1, 1, 0,
@@ -1362,7 +1362,7 @@ list_processes_1 (query_only)
1362 Finsert (1, &p->name); 1362 Finsert (1, &p->name);
1363 Findent_to (i_status, minspace); 1363 Findent_to (i_status, minspace);
1364 1364
1365 if (!NILP (p->raw_status_low)) 1365 if (p->raw_status_new)
1366 update_status (p); 1366 update_status (p);
1367 symbol = p->status; 1367 symbol = p->status;
1368 if (CONSP (p->status)) 1368 if (CONSP (p->status))
@@ -1734,7 +1734,7 @@ start_process_unwind (proc)
1734 abort (); 1734 abort ();
1735 1735
1736 /* Was PROC started successfully? */ 1736 /* Was PROC started successfully? */
1737 if (XINT (XPROCESS (proc)->pid) <= 0) 1737 if (XPROCESS (proc)->pid <= 0)
1738 remove_process (proc); 1738 remove_process (proc);
1739 1739
1740 return Qnil; 1740 return Qnil;
@@ -1945,7 +1945,7 @@ create_process (process, new_argv, current_dir)
1945 in the table after this function has returned; if it does 1945 in the table after this function has returned; if it does
1946 it might cause call-process to hang and subsequent asynchronous 1946 it might cause call-process to hang and subsequent asynchronous
1947 processes to get their return values scrambled. */ 1947 processes to get their return values scrambled. */
1948 XSETINT (XPROCESS (process)->pid, -1); 1948 XPROCESS (process)->pid = -1;
1949 1949
1950 BLOCK_INPUT; 1950 BLOCK_INPUT;
1951 1951
@@ -2136,7 +2136,7 @@ create_process (process, new_argv, current_dir)
2136 else 2136 else
2137 { 2137 {
2138 /* vfork succeeded. */ 2138 /* vfork succeeded. */
2139 XSETFASTINT (XPROCESS (process)->pid, pid); 2139 XPROCESS (process)->pid = pid;
2140 2140
2141#ifdef WINDOWSNT 2141#ifdef WINDOWSNT
2142 register_child (pid, inchannel); 2142 register_child (pid, inchannel);
@@ -3354,7 +3354,7 @@ usage: (make-network-process &rest ARGS) */)
3354 p->kill_without_query = Qt; 3354 p->kill_without_query = Qt;
3355 if ((tem = Fplist_get (contact, QCstop), !NILP (tem))) 3355 if ((tem = Fplist_get (contact, QCstop), !NILP (tem)))
3356 p->command = Qt; 3356 p->command = Qt;
3357 p->pid = Qnil; 3357 p->pid = 0;
3358 XSETINT (p->infd, inch); 3358 XSETINT (p->infd, inch);
3359 XSETINT (p->outfd, outch); 3359 XSETINT (p->outfd, outch);
3360 if (is_server && socktype == SOCK_STREAM) 3360 if (is_server && socktype == SOCK_STREAM)
@@ -4070,7 +4070,7 @@ server_accept_connection (server, channel)
4070 p->sentinel = ps->sentinel; 4070 p->sentinel = ps->sentinel;
4071 p->filter = ps->filter; 4071 p->filter = ps->filter;
4072 p->command = Qnil; 4072 p->command = Qnil;
4073 p->pid = Qnil; 4073 p->pid = 0;
4074 XSETINT (p->infd, s); 4074 XSETINT (p->infd, s);
4075 XSETINT (p->outfd, s); 4075 XSETINT (p->outfd, s);
4076 p->status = Qrun; 4076 p->status = Qrun;
@@ -4370,9 +4370,9 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
4370 4370
4371 /* Don't wait for output from a non-running process. Just 4371 /* Don't wait for output from a non-running process. Just
4372 read whatever data has already been received. */ 4372 read whatever data has already been received. */
4373 if (wait_proc != 0 && !NILP (wait_proc->raw_status_low)) 4373 if (wait_proc && wait_proc->raw_status_new)
4374 update_status (wait_proc); 4374 update_status (wait_proc);
4375 if (wait_proc != 0 4375 if (wait_proc
4376 && ! EQ (wait_proc->status, Qrun) 4376 && ! EQ (wait_proc->status, Qrun)
4377 && ! EQ (wait_proc->status, Qconnect)) 4377 && ! EQ (wait_proc->status, Qconnect))
4378 { 4378 {
@@ -4756,7 +4756,7 @@ wait_reading_process_output (time_limit, microsecs, read_kbd, do_display,
4756 /* Preserve status of processes already terminated. */ 4756 /* Preserve status of processes already terminated. */
4757 XSETINT (XPROCESS (proc)->tick, ++process_tick); 4757 XSETINT (XPROCESS (proc)->tick, ++process_tick);
4758 deactivate_process (proc); 4758 deactivate_process (proc);
4759 if (!NILP (XPROCESS (proc)->raw_status_low)) 4759 if (XPROCESS (proc)->raw_status_new)
4760 update_status (XPROCESS (proc)); 4760 update_status (XPROCESS (proc));
4761 if (EQ (XPROCESS (proc)->status, Qrun)) 4761 if (EQ (XPROCESS (proc)->status, Qrun))
4762 XPROCESS (proc)->status 4762 XPROCESS (proc)->status
@@ -5293,7 +5293,7 @@ send_process (proc, buf, len, object)
5293 VMS_PROC_STUFF *vs, *get_vms_process_pointer(); 5293 VMS_PROC_STUFF *vs, *get_vms_process_pointer();
5294#endif /* VMS */ 5294#endif /* VMS */
5295 5295
5296 if (! NILP (p->raw_status_low)) 5296 if (p->raw_status_new)
5297 update_status (p); 5297 update_status (p);
5298 if (! EQ (p->status, Qrun)) 5298 if (! EQ (p->status, Qrun))
5299 error ("Process %s not running", SDATA (p->name)); 5299 error ("Process %s not running", SDATA (p->name));
@@ -5557,8 +5557,7 @@ send_process (proc, buf, len, object)
5557 proc = process_sent_to; 5557 proc = process_sent_to;
5558 p = XPROCESS (proc); 5558 p = XPROCESS (proc);
5559#endif 5559#endif
5560 p->raw_status_low = Qnil; 5560 p->raw_status_new = 0;
5561 p->raw_status_high = Qnil;
5562 p->status = Fcons (Qexit, Fcons (make_number (256), Qnil)); 5561 p->status = Fcons (Qexit, Fcons (make_number (256), Qnil));
5563 XSETINT (p->tick, ++process_tick); 5562 XSETINT (p->tick, ++process_tick);
5564 deactivate_process (proc); 5563 deactivate_process (proc);
@@ -5673,7 +5672,7 @@ return t unconditionally. */)
5673 5672
5674 gid = emacs_get_tty_pgrp (p); 5673 gid = emacs_get_tty_pgrp (p);
5675 5674
5676 if (gid == XFASTINT (p->pid)) 5675 if (gid == p->pid)
5677 return Qnil; 5676 return Qnil;
5678 return Qt; 5677 return Qt;
5679} 5678}
@@ -5720,7 +5719,7 @@ process_send_signal (process, signo, current_group, nomsg)
5720 /* If we are using pgrps, get a pgrp number and make it negative. */ 5719 /* If we are using pgrps, get a pgrp number and make it negative. */
5721 if (NILP (current_group)) 5720 if (NILP (current_group))
5722 /* Send the signal to the shell's process group. */ 5721 /* Send the signal to the shell's process group. */
5723 gid = XFASTINT (p->pid); 5722 gid = p->pid;
5724 else 5723 else
5725 { 5724 {
5726#ifdef SIGNALS_VIA_CHARACTERS 5725#ifdef SIGNALS_VIA_CHARACTERS
@@ -5839,7 +5838,7 @@ process_send_signal (process, signo, current_group, nomsg)
5839 if (gid == -1) 5838 if (gid == -1)
5840 /* If we can't get the information, assume 5839 /* If we can't get the information, assume
5841 the shell owns the tty. */ 5840 the shell owns the tty. */
5842 gid = XFASTINT (p->pid); 5841 gid = p->pid;
5843 5842
5844 /* It is not clear whether anything really can set GID to -1. 5843 /* It is not clear whether anything really can set GID to -1.
5845 Perhaps on some system one of those ioctls can or could do so. 5844 Perhaps on some system one of those ioctls can or could do so.
@@ -5849,12 +5848,12 @@ process_send_signal (process, signo, current_group, nomsg)
5849#else /* ! defined (TIOCGPGRP ) */ 5848#else /* ! defined (TIOCGPGRP ) */
5850 /* Can't select pgrps on this system, so we know that 5849 /* Can't select pgrps on this system, so we know that
5851 the child itself heads the pgrp. */ 5850 the child itself heads the pgrp. */
5852 gid = XFASTINT (p->pid); 5851 gid = p->pid;
5853#endif /* ! defined (TIOCGPGRP ) */ 5852#endif /* ! defined (TIOCGPGRP ) */
5854 5853
5855 /* If current_group is lambda, and the shell owns the terminal, 5854 /* If current_group is lambda, and the shell owns the terminal,
5856 don't send any signal. */ 5855 don't send any signal. */
5857 if (EQ (current_group, Qlambda) && gid == XFASTINT (p->pid)) 5856 if (EQ (current_group, Qlambda) && gid == p->pid)
5858 return; 5857 return;
5859 } 5858 }
5860 5859
@@ -5862,8 +5861,7 @@ process_send_signal (process, signo, current_group, nomsg)
5862 { 5861 {
5863#ifdef SIGCONT 5862#ifdef SIGCONT
5864 case SIGCONT: 5863 case SIGCONT:
5865 p->raw_status_low = Qnil; 5864 p->raw_status_new = 0;
5866 p->raw_status_high = Qnil;
5867 p->status = Qrun; 5865 p->status = Qrun;
5868 XSETINT (p->tick, ++process_tick); 5866 XSETINT (p->tick, ++process_tick);
5869 if (!nomsg) 5867 if (!nomsg)
@@ -5882,7 +5880,7 @@ process_send_signal (process, signo, current_group, nomsg)
5882#endif 5880#endif
5883 case SIGKILL: 5881 case SIGKILL:
5884#ifdef VMS 5882#ifdef VMS
5885 sys$forcex (&(XFASTINT (p->pid)), 0, 1); 5883 sys$forcex (&(p->pid), 0, 1);
5886 whoosh: 5884 whoosh:
5887#endif 5885#endif
5888 flush_pending_output (XINT (p->infd)); 5886 flush_pending_output (XINT (p->infd));
@@ -5894,7 +5892,7 @@ process_send_signal (process, signo, current_group, nomsg)
5894 obvious alternative. */ 5892 obvious alternative. */
5895 if (no_pgrp) 5893 if (no_pgrp)
5896 { 5894 {
5897 kill (XFASTINT (p->pid), signo); 5895 kill (p->pid, signo);
5898 return; 5896 return;
5899 } 5897 }
5900 5898
@@ -5907,7 +5905,7 @@ process_send_signal (process, signo, current_group, nomsg)
5907 } 5905 }
5908 else 5906 else
5909 { 5907 {
5910 gid = - XFASTINT (p->pid); 5908 gid = - p->pid;
5911 kill (gid, signo); 5909 kill (gid, signo);
5912 } 5910 }
5913#else /* ! defined (TIOCSIGSEND) */ 5911#else /* ! defined (TIOCSIGSEND) */
@@ -6027,11 +6025,17 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6027 (process, sigcode) 6025 (process, sigcode)
6028 Lisp_Object process, sigcode; 6026 Lisp_Object process, sigcode;
6029{ 6027{
6030 Lisp_Object pid; 6028 pid_t pid;
6031 6029
6032 if (INTEGERP (process)) 6030 if (INTEGERP (process))
6033 { 6031 {
6034 pid = process; 6032 pid = XINT (process);
6033 goto got_it;
6034 }
6035
6036 if (FLOATP (process))
6037 {
6038 pid = (pid_t) XFLOAT (process);
6035 goto got_it; 6039 goto got_it;
6036 } 6040 }
6037 6041
@@ -6040,8 +6044,8 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6040 Lisp_Object tem; 6044 Lisp_Object tem;
6041 if (tem = Fget_process (process), NILP (tem)) 6045 if (tem = Fget_process (process), NILP (tem))
6042 { 6046 {
6043 pid = Fstring_to_number (process, make_number (10)); 6047 pid = XINT (Fstring_to_number (process, make_number (10)));
6044 if (XINT (pid) != 0) 6048 if (pid > 0)
6045 goto got_it; 6049 goto got_it;
6046 } 6050 }
6047 process = tem; 6051 process = tem;
@@ -6054,7 +6058,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6054 6058
6055 CHECK_PROCESS (process); 6059 CHECK_PROCESS (process);
6056 pid = XPROCESS (process)->pid; 6060 pid = XPROCESS (process)->pid;
6057 if (!INTEGERP (pid) || XINT (pid) <= 0) 6061 if (pid <= 0)
6058 error ("Cannot signal process %s", SDATA (XPROCESS (process)->name)); 6062 error ("Cannot signal process %s", SDATA (XPROCESS (process)->name));
6059 6063
6060 got_it: 6064 got_it:
@@ -6173,7 +6177,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6173 6177
6174#undef handle_signal 6178#undef handle_signal
6175 6179
6176 return make_number (kill (XINT (pid), XINT (sigcode))); 6180 return make_number (kill (pid, XINT (sigcode)));
6177} 6181}
6178 6182
6179DEFUN ("process-send-eof", Fprocess_send_eof, Sprocess_send_eof, 0, 1, 0, 6183DEFUN ("process-send-eof", Fprocess_send_eof, Sprocess_send_eof, 0, 1, 0,
@@ -6197,7 +6201,7 @@ text to PROCESS after you call this function. */)
6197 coding = proc_encode_coding_system[XINT (XPROCESS (proc)->outfd)]; 6201 coding = proc_encode_coding_system[XINT (XPROCESS (proc)->outfd)];
6198 6202
6199 /* Make sure the process is really alive. */ 6203 /* Make sure the process is really alive. */
6200 if (! NILP (XPROCESS (proc)->raw_status_low)) 6204 if (XPROCESS (proc)->raw_status_new)
6201 update_status (XPROCESS (proc)); 6205 update_status (XPROCESS (proc));
6202 if (! EQ (XPROCESS (proc)->status, Qrun)) 6206 if (! EQ (XPROCESS (proc)->status, Qrun))
6203 error ("Process %s not running", SDATA (XPROCESS (proc)->name)); 6207 error ("Process %s not running", SDATA (XPROCESS (proc)->name));
@@ -6222,7 +6226,7 @@ text to PROCESS after you call this function. */)
6222 for communication with the subprocess, call shutdown to cause EOF. 6226 for communication with the subprocess, call shutdown to cause EOF.
6223 (In some old system, shutdown to socketpair doesn't work. 6227 (In some old system, shutdown to socketpair doesn't work.
6224 Then we just can't win.) */ 6228 Then we just can't win.) */
6225 if (NILP (XPROCESS (proc)->pid) 6229 if (XPROCESS (proc)->pid == 0
6226 || XINT (XPROCESS (proc)->outfd) == XINT (XPROCESS (proc)->infd)) 6230 || XINT (XPROCESS (proc)->outfd) == XINT (XPROCESS (proc)->infd))
6227 shutdown (XINT (XPROCESS (proc)->outfd), 1); 6231 shutdown (XINT (XPROCESS (proc)->outfd), 1);
6228 /* In case of socketpair, outfd == infd, so don't close it. */ 6232 /* In case of socketpair, outfd == infd, so don't close it. */
@@ -6359,7 +6363,7 @@ sigchld_handler (signo)
6359 { 6363 {
6360 proc = XCDR (XCAR (tail)); 6364 proc = XCDR (XCAR (tail));
6361 p = XPROCESS (proc); 6365 p = XPROCESS (proc);
6362 if (GC_EQ (p->childp, Qt) && XINT (p->pid) == pid) 6366 if (GC_EQ (p->childp, Qt) && p->pid == pid)
6363 break; 6367 break;
6364 p = 0; 6368 p = 0;
6365 } 6369 }
@@ -6371,7 +6375,7 @@ sigchld_handler (signo)
6371 { 6375 {
6372 proc = XCDR (XCAR (tail)); 6376 proc = XCDR (XCAR (tail));
6373 p = XPROCESS (proc); 6377 p = XPROCESS (proc);
6374 if (GC_INTEGERP (p->pid) && XINT (p->pid) == -1) 6378 if (p->pid == -1)
6375 break; 6379 break;
6376 p = 0; 6380 p = 0;
6377 } 6381 }
@@ -6384,8 +6388,8 @@ sigchld_handler (signo)
6384 6388
6385 XSETINT (p->tick, ++process_tick); 6389 XSETINT (p->tick, ++process_tick);
6386 u.wt = w; 6390 u.wt = w;
6387 XSETINT (p->raw_status_low, u.i & 0xffff); 6391 p->raw_status = u.i;
6388 XSETINT (p->raw_status_high, u.i >> 16); 6392 p->raw_status_new = 1;
6389 6393
6390 /* If process has terminated, stop waiting for its output. */ 6394 /* If process has terminated, stop waiting for its output. */
6391 if ((WIFSIGNALED (w) || WIFEXITED (w)) 6395 if ((WIFSIGNALED (w) || WIFEXITED (w))
@@ -6582,7 +6586,7 @@ status_notify (deleting_process)
6582 buffer = p->buffer; 6586 buffer = p->buffer;
6583 6587
6584 /* Get the text to use for the message. */ 6588 /* Get the text to use for the message. */
6585 if (!NILP (p->raw_status_low)) 6589 if (p->raw_status_new)
6586 update_status (p); 6590 update_status (p);
6587 msg = status_message (p); 6591 msg = status_message (p);
6588 6592
diff --git a/src/process.h b/src/process.h
index 9625556888c..c4b4281fedf 100644
--- a/src/process.h
+++ b/src/process.h
@@ -51,8 +51,6 @@ struct Lisp_Process
51 Lisp_Object log; 51 Lisp_Object log;
52 /* Buffer that output is going to */ 52 /* Buffer that output is going to */
53 Lisp_Object buffer; 53 Lisp_Object buffer;
54 /* Number of this process */
55 Lisp_Object pid;
56 /* t if this is a real child process. 54 /* t if this is a real child process.
57 For a net connection, it is a plist based on the arguments to make-network-process. */ 55 For a net connection, it is a plist based on the arguments to make-network-process. */
58 Lisp_Object childp; 56 Lisp_Object childp;
@@ -63,10 +61,6 @@ struct Lisp_Process
63 /* Non-nil means kill silently if Emacs is exited. 61 /* Non-nil means kill silently if Emacs is exited.
64 This is the inverse of the `query-on-exit' flag. */ 62 This is the inverse of the `query-on-exit' flag. */
65 Lisp_Object kill_without_query; 63 Lisp_Object kill_without_query;
66 /* Record the process status in the raw form in which it comes from `wait'.
67 This is to avoid consing in a signal handler. */
68 Lisp_Object raw_status_low;
69 Lisp_Object raw_status_high;
70 /* Symbol indicating status of process. 64 /* Symbol indicating status of process.
71 This may be a symbol: run, open, or closed. 65 This may be a symbol: run, open, or closed.
72 Or it may be a list, whose car is stop, exit or signal 66 Or it may be a list, whose car is stop, exit or signal
@@ -112,6 +106,19 @@ struct Lisp_Process
112 Lisp_Object read_output_delay; 106 Lisp_Object read_output_delay;
113 /* Skip reading this process on next read. */ 107 /* Skip reading this process on next read. */
114 Lisp_Object read_output_skip; 108 Lisp_Object read_output_skip;
109
110 /* After this point, there are no Lisp_Objects any more. */
111
112 /* Number of this process.
113 allocate_process assumes this is the first non-Lisp_Object field.
114 A value 0 is used for pseudo-processes such as network connections. */
115 pid_t pid;
116 /* Record the process status in the raw form in which it comes from `wait'.
117 This is to avoid consing in a signal handler. The `raw_status_new'
118 flag indicates that `raw_status' contains a new status that still
119 needs to be synced to `status'. */
120 int raw_status_new : 1;
121 int raw_status;
115}; 122};
116 123
117/* Every field in the preceding structure except for the first two 124/* Every field in the preceding structure except for the first two
diff --git a/src/puresize.h b/src/puresize.h
index 7d6179dc078..168e1e7980a 100644
--- a/src/puresize.h
+++ b/src/puresize.h
@@ -65,7 +65,7 @@ Boston, MA 02110-1301, USA. */
65 { if (PURE_P (obj)) \ 65 { if (PURE_P (obj)) \
66 pure_write_error (); } 66 pure_write_error (); }
67 67
68extern void pure_write_error P_ ((void)); 68extern void pure_write_error P_ ((void)) NO_RETURN;
69 69
70/* Define PURE_P. */ 70/* Define PURE_P. */
71 71
diff --git a/src/search.c b/src/search.c
index b92812597d5..dfbf66fc7ed 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1720,7 +1720,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
1720 ch = -1; 1720 ch = -1;
1721 } 1721 }
1722 1722
1723 if (ch > 0400) 1723 if (ch >= 0400)
1724 j = ((unsigned char) ch) | 0200; 1724 j = ((unsigned char) ch) | 0200;
1725 else 1725 else
1726 j = *ptr; 1726 j = *ptr;
@@ -1739,7 +1739,7 @@ boyer_moore (n, base_pat, len, len_byte, trt, inverse_trt,
1739 while (1) 1739 while (1)
1740 { 1740 {
1741 TRANSLATE (ch, inverse_trt, ch); 1741 TRANSLATE (ch, inverse_trt, ch);
1742 if (ch > 0400) 1742 if (ch >= 0400)
1743 j = ((unsigned char) ch) | 0200; 1743 j = ((unsigned char) ch) | 0200;
1744 else 1744 else
1745 j = (unsigned char) ch; 1745 j = (unsigned char) ch;
diff --git a/src/w32fns.c b/src/w32fns.c
index 55f4af03d6e..093739d1603 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -3297,6 +3297,14 @@ w32_wnd_proc (hwnd, msg, wParam, lParam)
3297 return (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONUP); 3297 return (msg == WM_XBUTTONDOWN || msg == WM_XBUTTONUP);
3298 3298
3299 case WM_MOUSEMOVE: 3299 case WM_MOUSEMOVE:
3300 /* Ignore mouse movements as long as the menu is active. These
3301 movements are processed by the window manager anyway, and
3302 it's wrong to handle them as if they happened on the
3303 underlying frame. */
3304 f = x_window_to_frame (dpyinfo, hwnd);
3305 if (f && f->output_data.w32->menubar_active)
3306 return 0;
3307
3300 /* If the mouse has just moved into the frame, start tracking 3308 /* If the mouse has just moved into the frame, start tracking
3301 it, so we will be notified when it leaves the frame. Mouse 3309 it, so we will be notified when it leaves the frame. Mouse
3302 tracking only works under W98 and NT4 and later. On earlier 3310 tracking only works under W98 and NT4 and later. On earlier
@@ -7668,9 +7676,12 @@ Text larger than the specified size is clipped. */)
7668 AdjustWindowRect (&rect, f->output_data.w32->dwStyle, 7676 AdjustWindowRect (&rect, f->output_data.w32->dwStyle,
7669 FRAME_EXTERNAL_MENU_BAR (f)); 7677 FRAME_EXTERNAL_MENU_BAR (f));
7670 7678
7671 /* Position and size tooltip, and put it in the topmost group. */ 7679 /* Position and size tooltip, and put it in the topmost group.
7680 The add-on of 3 to the 5th argument is a kludge: without it,
7681 some fonts cause the last character of the tip to be truncated,
7682 for some obscure reason. */
7672 SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST, 7683 SetWindowPos (FRAME_W32_WINDOW (f), HWND_TOPMOST,
7673 root_x, root_y, rect.right - rect.left, 7684 root_x, root_y, rect.right - rect.left + 3,
7674 rect.bottom - rect.top, SWP_NOACTIVATE); 7685 rect.bottom - rect.top, SWP_NOACTIVATE);
7675 7686
7676 /* Ensure tooltip is on top of other topmost windows (eg menus). */ 7687 /* Ensure tooltip is on top of other topmost windows (eg menus). */