aboutsummaryrefslogtreecommitdiffstats
path: root/src/xselect.c
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-12 06:36:06 +0000
committerRichard M. Stallman1997-07-12 06:36:06 +0000
commite607a484ef8e91a4630bbca56291de98a7b2bf80 (patch)
tree4d84ae4aa7d21296711ce4b65f47d751972aa9fd /src/xselect.c
parentb264791c6b905daeb082fb5a1fa13b3457c7f82a (diff)
downloademacs-e607a484ef8e91a4630bbca56291de98a7b2bf80.tar.gz
emacs-e607a484ef8e91a4630bbca56291de98a7b2bf80.zip
(selection_data_to_lisp_data): Convert Fmake_vector
and Faset arguments to Lisp_Integer. (clean_local_selection_data): Likewise.
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/xselect.c b/src/xselect.c
index 81896816b1a..5ac5f773614 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1513,10 +1513,11 @@ selection_data_to_lisp_data (display, data, size, type, format)
1513 return x_atom_to_symbol (dpyinfo, display, *((Atom *) data)); 1513 return x_atom_to_symbol (dpyinfo, display, *((Atom *) data));
1514 else 1514 else
1515 { 1515 {
1516 Lisp_Object v = Fmake_vector (size / sizeof (Atom), 0); 1516 Lisp_Object v = Fmake_vector (make_number (size / sizeof (Atom)),
1517 make_number (0));
1517 for (i = 0; i < size / sizeof (Atom); i++) 1518 for (i = 0; i < size / sizeof (Atom); i++)
1518 Faset (v, i, x_atom_to_symbol (dpyinfo, display, 1519 Faset (v, make_number (i),
1519 ((Atom *) data) [i])); 1520 x_atom_to_symbol (dpyinfo, display, ((Atom *) data) [i]));
1520 return v; 1521 return v;
1521 } 1522 }
1522 } 1523 }
@@ -1536,22 +1537,22 @@ selection_data_to_lisp_data (display, data, size, type, format)
1536 else if (format == 16) 1537 else if (format == 16)
1537 { 1538 {
1538 int i; 1539 int i;
1539 Lisp_Object v = Fmake_vector (size / 4, 0); 1540 Lisp_Object v = Fmake_vector (make_number (size / 4), make_number (0));
1540 for (i = 0; i < size / 4; i++) 1541 for (i = 0; i < size / 4; i++)
1541 { 1542 {
1542 int j = (int) ((unsigned short *) data) [i]; 1543 int j = (int) ((unsigned short *) data) [i];
1543 Faset (v, i, make_number (j)); 1544 Faset (v, make_number (i), make_number (j));
1544 } 1545 }
1545 return v; 1546 return v;
1546 } 1547 }
1547 else 1548 else
1548 { 1549 {
1549 int i; 1550 int i;
1550 Lisp_Object v = Fmake_vector (size / 4, 0); 1551 Lisp_Object v = Fmake_vector (make_number (size / 4), make_number (0));
1551 for (i = 0; i < size / 4; i++) 1552 for (i = 0; i < size / 4; i++)
1552 { 1553 {
1553 unsigned long j = ((unsigned long *) data) [i]; 1554 unsigned long j = ((unsigned long *) data) [i];
1554 Faset (v, i, long_to_cons (j)); 1555 Faset (v, make_number (i), long_to_cons (j));
1555 } 1556 }
1556 return v; 1557 return v;
1557 } 1558 }
@@ -1796,7 +1797,7 @@ clean_local_selection_data (obj)
1796 Lisp_Object copy; 1797 Lisp_Object copy;
1797 if (size == 1) 1798 if (size == 1)
1798 return clean_local_selection_data (XVECTOR (obj)->contents [0]); 1799 return clean_local_selection_data (XVECTOR (obj)->contents [0]);
1799 copy = Fmake_vector (size, Qnil); 1800 copy = Fmake_vector (make_number (size), Qnil);
1800 for (i = 0; i < size; i++) 1801 for (i = 0; i < size; i++)
1801 XVECTOR (copy)->contents [i] 1802 XVECTOR (copy)->contents [i]
1802 = clean_local_selection_data (XVECTOR (obj)->contents [i]); 1803 = clean_local_selection_data (XVECTOR (obj)->contents [i]);