[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r105767: * xselect.c: Use signed conv
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r105767: * xselect.c: Use signed conversions more consistently (Bug#9498). |
Date: |
Wed, 14 Sep 2011 08:47:21 -0700 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 105767
fixes bug(s): http://debbugs.gnu.org/9498
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Wed 2011-09-14 08:47:21 -0700
message:
* xselect.c: Use signed conversions more consistently (Bug#9498).
(selection_data_to_lisp_data): Assume incoming selection data are
signed integers, not unsigned. This is to be consistent with
outgoing selection data, which was modified to use signed integers
in as part of the fix to Bug#9196 in response to Jan D.'s comment
in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
expects long, not unsigned long.
modified:
src/ChangeLog
src/xselect.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-09-14 05:20:23 +0000
+++ b/src/ChangeLog 2011-09-14 15:47:21 +0000
@@ -1,3 +1,13 @@
+2011-09-14 Paul Eggert <address@hidden>
+
+ * xselect.c: Use signed conversions more consistently (Bug#9498).
+ (selection_data_to_lisp_data): Assume incoming selection data are
+ signed integers, not unsigned. This is to be consistent with
+ outgoing selection data, which was modified to use signed integers
+ in as part of the fix to Bug#9196 in response to Jan D.'s comment
+ in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9196#32> that X11
+ expects long, not unsigned long.
+
2011-09-14 Eli Zaretskii <address@hidden>
* xdisp.c (try_window_reusing_current_matrix): Fix incorrect
=== modified file 'src/xselect.c'
--- a/src/xselect.c 2011-09-09 01:06:52 +0000
+++ b/src/xselect.c 2011-09-14 15:47:21 +0000
@@ -1685,9 +1685,9 @@
convert it to a cons of integers, 16 bits in each half.
*/
else if (format == 32 && size == sizeof (int))
- return INTEGER_TO_CONS (((unsigned int *) data) [0]);
+ return INTEGER_TO_CONS (((int *) data) [0]);
else if (format == 16 && size == sizeof (short))
- return make_number (((unsigned short *) data) [0]);
+ return make_number (((short *) data) [0]);
/* Convert any other kind of data to a vector of numbers, represented
as above (as an integer, or a cons of two 16 bit integers.)
@@ -1699,7 +1699,7 @@
v = Fmake_vector (make_number (size / 2), make_number (0));
for (i = 0; i < size / 2; i++)
{
- EMACS_INT j = ((unsigned short *) data) [i];
+ EMACS_INT j = ((short *) data) [i];
Faset (v, make_number (i), make_number (j));
}
return v;
@@ -1711,7 +1711,7 @@
make_number (0));
for (i = 0; i < size / X_LONG_SIZE; i++)
{
- unsigned int j = ((unsigned int *) data) [i];
+ int j = ((int *) data) [i];
Faset (v, make_number (i), INTEGER_TO_CONS (j));
}
return v;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r105767: * xselect.c: Use signed conversions more consistently (Bug#9498).,
Paul Eggert <=