aboutsummaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorPaul Eggert2011-05-15 10:17:44 -0700
committerPaul Eggert2011-05-15 10:17:44 -0700
commit067a69a2d38db30190997dc48dbf82988ffa3583 (patch)
treef8ce54ac9c65d32d1349cb449485ed0ba1833d57 /src/ChangeLog
parent5e9e35cd1dd6e4fb47c6720991581508b89f87f7 (diff)
parent9fbd68410f1680b5b9bc2d56c239183ea13c7d58 (diff)
downloademacs-067a69a2d38db30190997dc48dbf82988ffa3583.tar.gz
emacs-067a69a2d38db30190997dc48dbf82988ffa3583.zip
Merge: user-interface timestamps and other int overflow patches.
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog76
1 files changed, 76 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index ceb45afebc5..89c58eeb5a4 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,79 @@
12011-05-15 Paul Eggert <eggert@cs.ucla.edu>
2
3 Fixups, following up to the user-interface timestamp change.
4 * nsterm.m (last_mouse_movement_time, ns_mouse_position): Use Time
5 for UI timestamps, instead of unsigned long.
6 * msdos.c (mouse_get_pos): Likewise.
7 * w32inevt.c (movement_time, w32_console_mouse_position): Likewise.
8 * w32gui.h (Time): Define by including "systime.h" rather than by
9 declaring it ourselves. (Bug#8664)
10
11 * dispextern.h (struct image): Don't assume time_t <= unsigned long.
12 * image.c (clear_image_cache): Likewise.
13
14 * term.c (term_mouse_position): Don't assume time_t wraparound.
15
16 Be more systematic about user-interface timestamps.
17 Before, the code sometimes used 'Time', sometimes 'unsigned long',
18 and sometimes 'EMACS_UINT', to represent these timestamps. This
19 change causes it to use 'Time' uniformly, as that's what X uses.
20 This makes the code easier to follow, and makes it easier to catch
21 integer overflow bugs such as Bug#8664.
22 * frame.c (Fmouse_position, Fmouse_pixel_position):
23 Use Time, not unsigned long, for user-interface timestamps.
24 * keyboard.c (last_event_timestamp, kbd_buffer_get_event): Likewise.
25 (button_down_time, make_lispy_position, make_lispy_movement): Likewise.
26 * keyboard.h (last_event_timestamp): Likewise.
27 * menu.c (Fx_popup_menu) [!HAVE_X_WINDOWS]: Likewise.
28 * menu.h (xmenu_show): Likewise.
29 * term.c (term_mouse_position): Likewise.
30 * termhooks.h (struct input_event.timestamp): Likewise.
31 (struct terminal.mouse_position_hook): Likewise.
32 * xmenu.c (create_and_show_popup_menu, xmenu_show): Likewise.
33 * xterm.c (XTmouse_position, x_scroll_bar_report_motion): Likewise.
34 * systime.h (Time): New decl. Pull it in from <X11/X.h> if
35 HAVE_X_WINDOWS, otherwise define it as unsigned long, which is
36 what it was before.
37 * menu.h, termhooks.h: Include "systime.h", for Time.
38
39 * keyboard.c (make_lispy_event): Fix problem in integer overflow.
40 Don't assume that the difference between two unsigned long values
41 can fit into an integer. At this point, we know button_down_time
42 <= event->timestamp, so the difference must be nonnegative, so
43 there's no need to cast the result if double-click-time is
44 nonnegative, as it should be; check that it's nonnegative, just in
45 case. This bug is triggered when events are more than 2**31 ms
46 apart (about 25 days). (Bug#8664)
47
48 * xselect.c (last_event_timestamp): Remove duplicate decl.
49 (x_own_selection): Remove needless cast to unsigned long.
50
51 * xmenu.c (set_frame_menubar): Use int, not EMACS_UINT, for indexes
52 that always fit in int. Use a sentinel instead of a counter, to
53 avoid a temp and to allay GCC's concerns about possible int overflow.
54 * frame.h (struct frame): Use int for menu_bar_items_used
55 instead of EMACS_INT, since it always fits in int.
56
57 * menu.c (grow_menu_items): Check for int overflow.
58
59 * xmenu.c (set_frame_menubar): Don't mishandle vectors with no nils.
60
61 * xterm.c: Use EMACS_INT for Emacs modifiers, and int for X modifiers.
62 Before, the code was not consistent. These values cannot exceed
63 2**31 - 1 so there's no need to make them unsigned.
64 (x_x_to_emacs_modifiers): Accept int and return EMACS_INT.
65 (x_emacs_to_x_modifiers): Accept EMACS_INT and return int.
66 (x_x_to_emacs_modifiers, x_emacs_to_x_modifiers): Reject non-integers
67 as modifiers.
68 * xterm.h (x_x_to_emacs_modifiers): Adjust to signature change.
69
70 * lisp.h (XINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_INT.
71 (XUINT) [USE_LISP_UNION_TYPE]: Cast to EMACS_UINT.
72 Otherwise, GCC 4.6.0 warns about printf (pI, XINT (...)),
73 presumably because the widths might not match.
74
75 * window.c (size_window): Avoid needless test at loop start.
76
12011-05-12 Drew Adams <drew.adams@oracle.com> 772011-05-12 Drew Adams <drew.adams@oracle.com>
2 78
3 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655). 79 * textprop.c (Fprevious_single_char_property_change): Doc fix (bug#8655).