[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r103876: Merge from emacs-23; up to r
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r103876: Merge from emacs-23; up to r100544. |
Date: |
Sat, 09 Apr 2011 10:40:29 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 103876 [merge]
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2011-04-09 10:40:29 -0700
message:
Merge from emacs-23; up to r100544.
modified:
lisp/ChangeLog
src/ChangeLog
src/ftfont.c
src/xmenu.c
src/xselect.c
src/xterm.c
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2011-04-09 06:59:26 +0000
+++ b/lisp/ChangeLog 2011-04-09 17:40:29 +0000
@@ -684,7 +684,7 @@
(emerge-protect-metachars): Quote correctly for ms-dos and
windows-nt systems.
-2011-03-19 Ralph Schleicher <address@hidden>
+2011-03-19 Ralph Schleicher <address@hidden> (tiny change)
* info.el (info-initialize): Replace all uses of `:' with
path-separator for compatibility with non-Unix systems.
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-04-09 16:35:19 +0000
+++ b/src/ChangeLog 2011-04-09 17:40:29 +0000
@@ -1,3 +1,13 @@
+2011-04-09 Chong Yidong <address@hidden>
+
+ * ftfont.c (get_adstyle_property, ftfont_pattern_entity): Use
+ unsigned char, to match FcChar8 type definition.
+
+ * xterm.c (handle_one_xevent):
+ * xmenu.c (create_and_show_popup_menu):
+ * xselect.c (x_decline_selection_request)
+ (x_reply_selection_request): Avoid type-punned deref of X events.
+
2011-04-09 Eli Zaretskii <address@hidden>
Fix some uses of `int' instead of EMACS_INT.
@@ -39,7 +49,7 @@
* ccl.c (Fccl_execute_on_string): Declare some variables
EMACS_INT.
-2011-04-08 Svante Signell <address@hidden> (tiny change)
+2011-04-08 Samuel Thibault <address@hidden> (tiny change)
* term.c (init_tty): Fix incorrect ifdef placement (Bug#8450).
=== modified file 'src/ftfont.c'
--- a/src/ftfont.c 2011-03-19 05:03:30 +0000
+++ b/src/ftfont.c 2011-04-09 17:40:29 +0000
@@ -160,7 +160,7 @@
static Lisp_Object
get_adstyle_property (FcPattern *p)
{
- char *str, *end;
+ unsigned char *str, *end;
Lisp_Object adstyle;
if (FcPatternGetString (p, FC_STYLE, 0, (FcChar8 **) &str) != FcResultMatch)
@@ -189,7 +189,7 @@
ftfont_pattern_entity (FcPattern *p, Lisp_Object extra)
{
Lisp_Object key, cache, entity;
- char *file, *str;
+ unsigned char *file, *str;
int idx;
int numeric;
double dbl;
=== modified file 'src/xmenu.c'
--- a/src/xmenu.c 2011-04-05 20:26:55 +0000
+++ b/src/xmenu.c 2011-04-09 17:40:29 +0000
@@ -1529,7 +1529,8 @@
int i;
Arg av[2];
int ac = 0;
- XButtonPressedEvent dummy;
+ XEvent dummy;
+ XButtonPressedEvent *event = &(dummy.xbutton);
LWLIB_ID menu_id;
Widget menu;
@@ -1547,36 +1548,35 @@
popup_deactivate_callback,
menu_highlight_callback);
- dummy.type = ButtonPress;
- dummy.serial = 0;
- dummy.send_event = 0;
- dummy.display = FRAME_X_DISPLAY (f);
- dummy.time = CurrentTime;
- dummy.root = FRAME_X_DISPLAY_INFO (f)->root_window;
- dummy.window = dummy.root;
- dummy.subwindow = dummy.root;
- dummy.x = x;
- dummy.y = y;
+ event->type = ButtonPress;
+ event->serial = 0;
+ event->send_event = 0;
+ event->display = FRAME_X_DISPLAY (f);
+ event->time = CurrentTime;
+ event->root = FRAME_X_DISPLAY_INFO (f)->root_window;
+ event->window = event->subwindow = event->root;
+ event->x = x;
+ event->y = y;
/* Adjust coordinates to be root-window-relative. */
x += f->left_pos + FRAME_OUTER_TO_INNER_DIFF_X (f);
y += f->top_pos + FRAME_OUTER_TO_INNER_DIFF_Y (f);
- dummy.x_root = x;
- dummy.y_root = y;
+ event->x_root = x;
+ event->y_root = y;
- dummy.state = 0;
- dummy.button = 0;
+ event->state = 0;
+ event->button = 0;
for (i = 0; i < 5; i++)
if (FRAME_X_DISPLAY_INFO (f)->grabbed & (1 << i))
- dummy.button = i;
+ event->button = i;
/* Don't allow any geometry request from the user. */
XtSetArg (av[ac], XtNgeometry, 0); ac++;
XtSetValues (menu, av, ac);
/* Display the menu. */
- lw_popup_menu (menu, (XEvent *) &dummy);
+ lw_popup_menu (menu, &dummy);
popup_activated_flag = 1;
x_activate_timeout_atimer ();
=== modified file 'src/xselect.c'
--- a/src/xselect.c 2011-04-02 02:02:18 +0000
+++ b/src/xselect.c 2011-04-09 17:40:29 +0000
@@ -499,22 +499,23 @@
static void
x_decline_selection_request (struct input_event *event)
{
- XSelectionEvent reply;
+ XEvent reply_base;
+ XSelectionEvent *reply = &(reply_base.xselection);
- reply.type = SelectionNotify;
- reply.display = SELECTION_EVENT_DISPLAY (event);
- reply.requestor = SELECTION_EVENT_REQUESTOR (event);
- reply.selection = SELECTION_EVENT_SELECTION (event);
- reply.time = SELECTION_EVENT_TIME (event);
- reply.target = SELECTION_EVENT_TARGET (event);
- reply.property = None;
+ reply->type = SelectionNotify;
+ reply->display = SELECTION_EVENT_DISPLAY (event);
+ reply->requestor = SELECTION_EVENT_REQUESTOR (event);
+ reply->selection = SELECTION_EVENT_SELECTION (event);
+ reply->time = SELECTION_EVENT_TIME (event);
+ reply->target = SELECTION_EVENT_TARGET (event);
+ reply->property = None;
/* The reason for the error may be that the receiver has
died in the meantime. Handle that case. */
BLOCK_INPUT;
- x_catch_errors (reply.display);
- XSendEvent (reply.display, reply.requestor, False, 0L, (XEvent *) &reply);
- XFlush (reply.display);
+ x_catch_errors (reply->display);
+ XSendEvent (reply->display, reply->requestor, False, 0L, &reply_base);
+ XFlush (reply->display);
x_uncatch_errors ();
UNBLOCK_INPUT;
}
@@ -617,7 +618,8 @@
static void
x_reply_selection_request (struct input_event *event, int format, unsigned
char *data, int size, Atom type)
{
- XSelectionEvent reply;
+ XEvent reply_base;
+ XSelectionEvent *reply = &(reply_base.xselection);
Display *display = SELECTION_EVENT_DISPLAY (event);
Window window = SELECTION_EVENT_REQUESTOR (event);
int bytes_remaining;
@@ -629,15 +631,15 @@
if (max_bytes > MAX_SELECTION_QUANTUM)
max_bytes = MAX_SELECTION_QUANTUM;
- reply.type = SelectionNotify;
- reply.display = display;
- reply.requestor = window;
- reply.selection = SELECTION_EVENT_SELECTION (event);
- reply.time = SELECTION_EVENT_TIME (event);
- reply.target = SELECTION_EVENT_TARGET (event);
- reply.property = SELECTION_EVENT_PROPERTY (event);
- if (reply.property == None)
- reply.property = reply.target;
+ reply->type = SelectionNotify;
+ reply->display = display;
+ reply->requestor = window;
+ reply->selection = SELECTION_EVENT_SELECTION (event);
+ reply->time = SELECTION_EVENT_TIME (event);
+ reply->target = SELECTION_EVENT_TARGET (event);
+ reply->property = SELECTION_EVENT_PROPERTY (event);
+ if (reply->property == None)
+ reply->property = reply->target;
BLOCK_INPUT;
/* The protected block contains wait_for_property_change, which can
@@ -648,8 +650,8 @@
#ifdef TRACE_SELECTION
{
- char *sel = XGetAtomName (display, reply.selection);
- char *tgt = XGetAtomName (display, reply.target);
+ char *sel = XGetAtomName (display, reply->selection);
+ char *tgt = XGetAtomName (display, reply->target);
TRACE3 ("%s, target %s (%d)", sel, tgt, ++x_reply_selection_request_cnt);
if (sel) XFree (sel);
if (tgt) XFree (tgt);
@@ -664,10 +666,10 @@
{
/* Send all the data at once, with minimal handshaking. */
TRACE1 ("Sending all %d bytes", bytes_remaining);
- XChangeProperty (display, window, reply.property, type, format,
+ XChangeProperty (display, window, reply->property, type, format,
PropModeReplace, data, size);
/* At this point, the selection was successfully stored; ack it. */
- XSendEvent (display, window, False, 0L, (XEvent *) &reply);
+ XSendEvent (display, window, False, 0L, &reply_base);
}
else
{
@@ -693,19 +695,19 @@
error ("Attempt to transfer an INCR to ourself!");
TRACE2 ("Start sending %d bytes incrementally (%s)",
- bytes_remaining, XGetAtomName (display, reply.property));
- wait_object = expect_property_change (display, window, reply.property,
+ bytes_remaining, XGetAtomName (display, reply->property));
+ wait_object = expect_property_change (display, window, reply->property,
PropertyDelete);
TRACE1 ("Set %s to number of bytes to send",
- XGetAtomName (display, reply.property));
+ XGetAtomName (display, reply->property));
{
/* XChangeProperty expects an array of long even if long is more than
32 bits. */
long value[1];
value[0] = bytes_remaining;
- XChangeProperty (display, window, reply.property, dpyinfo->Xatom_INCR,
+ XChangeProperty (display, window, reply->property, dpyinfo->Xatom_INCR,
32, PropModeReplace,
(unsigned char *) value, 1);
}
@@ -714,7 +716,7 @@
/* Tell 'em the INCR data is there... */
TRACE0 ("Send SelectionNotify event");
- XSendEvent (display, window, False, 0L, (XEvent *) &reply);
+ XSendEvent (display, window, False, 0L, &reply_base);
XFlush (display);
had_errors = x_had_errors_p (display);
@@ -725,7 +727,7 @@
if (! had_errors)
{
TRACE1 ("Waiting for ACK (deletion of %s)",
- XGetAtomName (display, reply.property));
+ XGetAtomName (display, reply->property));
wait_for_property_change (wait_object);
}
else
@@ -741,15 +743,15 @@
BLOCK_INPUT;
wait_object
- = expect_property_change (display, window, reply.property,
+ = expect_property_change (display, window, reply->property,
PropertyDelete);
TRACE1 ("Sending increment of %d elements", i);
TRACE1 ("Set %s to increment data",
- XGetAtomName (display, reply.property));
+ XGetAtomName (display, reply->property));
/* Append the next chunk of data to the property. */
- XChangeProperty (display, window, reply.property, type, format,
+ XChangeProperty (display, window, reply->property, type, format,
PropModeAppend, data, i);
bytes_remaining -= i * format_bytes;
if (format == 32)
@@ -766,7 +768,7 @@
/* Now wait for the requester to ack this chunk by deleting the
property. This can run random lisp code or signal. */
TRACE1 ("Waiting for increment ACK (deletion of %s)",
- XGetAtomName (display, reply.property));
+ XGetAtomName (display, reply->property));
wait_for_property_change (wait_object);
}
@@ -777,8 +779,8 @@
XSelectInput (display, window, 0L);
TRACE1 ("Set %s to a 0-length chunk to indicate EOF",
- XGetAtomName (display, reply.property));
- XChangeProperty (display, window, reply.property, type, format,
+ XGetAtomName (display, reply->property));
+ XChangeProperty (display, window, reply->property, type, format,
PropModeReplace, data, 0);
TRACE0 ("Done sending incrementally");
}
=== modified file 'src/xterm.c'
--- a/src/xterm.c 2011-04-01 20:14:03 +0000
+++ b/src/xterm.c 2011-04-09 17:40:29 +0000
@@ -4045,7 +4045,7 @@
return XSCROLL_BAR (bar);
}
- return 0;
+ return NULL;
}
@@ -6008,7 +6008,7 @@
goto OTHER;
#endif /* USE_X_TOOLKIT */
{
- XSelectionClearEvent *eventp = (XSelectionClearEvent *) &event;
+ XSelectionClearEvent *eventp = &(event.xselectionclear);
inev.ie.kind = SELECTION_CLEAR_EVENT;
SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;
@@ -6025,8 +6025,7 @@
goto OTHER;
#endif /* USE_X_TOOLKIT */
{
- XSelectionRequestEvent *eventp
- = (XSelectionRequestEvent *) &event;
+ XSelectionRequestEvent *eventp = &(event.xselectionrequest);
inev.ie.kind = SELECTION_REQUEST_EVENT;
SELECTION_EVENT_DISPLAY (&inev.sie) = eventp->display;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r103876: Merge from emacs-23; up to r100544.,
Glenn Morris <=