Mercurial > hg > xemacs-beta
comparison src/select-x.c @ 4982:3c3c1d139863
Automatic merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Fri, 05 Feb 2010 11:25:00 -0600 |
parents | 4aebb0131297 16112448d484 |
children | 358aa3bb603f |
comparison
equal
deleted
inserted
replaced
4981:4aebb0131297 | 4982:3c3c1d139863 |
---|---|
691 event->type = 0; | 691 event->type = 0; |
692 /* Data need not have been allocated; cf. select-convert-to-delete in | 692 /* Data need not have been allocated; cf. select-convert-to-delete in |
693 lisp/select.el . */ | 693 lisp/select.el . */ |
694 if ((Rawbyte *)0 != data) | 694 if ((Rawbyte *)0 != data) |
695 { | 695 { |
696 xfree (data, Rawbyte *); | 696 xfree (data); |
697 } | 697 } |
698 } | 698 } |
699 | 699 |
700 unbind_to (count); | 700 unbind_to (count); |
701 | 701 |
821 { | 821 { |
822 if (prev) | 822 if (prev) |
823 prev->next = rest->next; | 823 prev->next = rest->next; |
824 else | 824 else |
825 for_whom_the_bell_tolls = rest->next; | 825 for_whom_the_bell_tolls = rest->next; |
826 xfree (rest, struct prop_location *); | 826 xfree (rest); |
827 return; | 827 return; |
828 } | 828 } |
829 prev = rest; | 829 prev = rest; |
830 rest = rest->next; | 830 rest = rest->next; |
831 } | 831 } |
862 #endif | 862 #endif |
863 if (prev) | 863 if (prev) |
864 prev->next = rest->next; | 864 prev->next = rest->next; |
865 else | 865 else |
866 for_whom_the_bell_tolls = rest->next; | 866 for_whom_the_bell_tolls = rest->next; |
867 xfree (rest, struct prop_location *); | 867 xfree (rest); |
868 return; | 868 return; |
869 } | 869 } |
870 prev = rest; | 870 prev = rest; |
871 rest = rest->next; | 871 rest = rest->next; |
872 } | 872 } |
1165 #if 0 | 1165 #if 0 |
1166 stderr_out (" read INCR done\n"); | 1166 stderr_out (" read INCR done\n"); |
1167 #endif | 1167 #endif |
1168 unexpect_property_change (prop_id); | 1168 unexpect_property_change (prop_id); |
1169 if (tmp_data) | 1169 if (tmp_data) |
1170 xfree (tmp_data, Rawbyte *); | 1170 xfree (tmp_data); |
1171 break; | 1171 break; |
1172 } | 1172 } |
1173 #if 0 | 1173 #if 0 |
1174 stderr_out (" read INCR %d\n", tmp_size_bytes); | 1174 stderr_out (" read INCR %d\n", tmp_size_bytes); |
1175 #endif | 1175 #endif |
1182 *size_bytes_ret = offset + tmp_size_bytes; | 1182 *size_bytes_ret = offset + tmp_size_bytes; |
1183 *data_ret = (Rawbyte *) xrealloc (*data_ret, *size_bytes_ret); | 1183 *data_ret = (Rawbyte *) xrealloc (*data_ret, *size_bytes_ret); |
1184 } | 1184 } |
1185 memcpy ((*data_ret) + offset, tmp_data, tmp_size_bytes); | 1185 memcpy ((*data_ret) + offset, tmp_data, tmp_size_bytes); |
1186 offset += tmp_size_bytes; | 1186 offset += tmp_size_bytes; |
1187 xfree (tmp_data, Rawbyte *); | 1187 xfree (tmp_data); |
1188 } | 1188 } |
1189 } | 1189 } |
1190 | 1190 |
1191 | 1191 |
1192 static Lisp_Object | 1192 static Lisp_Object |
1231 /* Ok, that data wasn't *the* data, it was just the beginning. */ | 1231 /* Ok, that data wasn't *the* data, it was just the beginning. */ |
1232 | 1232 |
1233 Bytecount min_size_bytes = | 1233 Bytecount min_size_bytes = |
1234 /* careful here. */ | 1234 /* careful here. */ |
1235 (Bytecount) (* ((unsigned int *) data)); | 1235 (Bytecount) (* ((unsigned int *) data)); |
1236 xfree (data, Rawbyte *); | 1236 xfree (data); |
1237 receive_incremental_selection (display, window, property, target_type, | 1237 receive_incremental_selection (display, window, property, target_type, |
1238 min_size_bytes, &data, &bytes, | 1238 min_size_bytes, &data, &bytes, |
1239 &actual_type, &actual_format, | 1239 &actual_type, &actual_format, |
1240 &actual_size); | 1240 &actual_size); |
1241 } | 1241 } |
1243 /* It's been read. Now convert it to a lisp object in some semi-rational | 1243 /* It's been read. Now convert it to a lisp object in some semi-rational |
1244 manner. */ | 1244 manner. */ |
1245 val = selection_data_to_lisp_data (d, data, bytes, | 1245 val = selection_data_to_lisp_data (d, data, bytes, |
1246 actual_type, actual_format); | 1246 actual_type, actual_format); |
1247 | 1247 |
1248 xfree (data, Rawbyte *); | 1248 xfree (data); |
1249 return val; | 1249 return val; |
1250 } | 1250 } |
1251 | 1251 |
1252 | 1252 |
1253 /* Called from the event loop to handle SelectionNotify events. | 1253 /* Called from the event loop to handle SelectionNotify events. |
1375 ret = (bytes ? | 1375 ret = (bytes ? |
1376 make_extstring ((Extbyte *) data, bytes, | 1376 make_extstring ((Extbyte *) data, bytes, |
1377 memchr (data, 0x1b, bytes) ? | 1377 memchr (data, 0x1b, bytes) ? |
1378 Qctext : Qbinary) | 1378 Qctext : Qbinary) |
1379 : Qnil); | 1379 : Qnil); |
1380 xfree (data, Rawbyte *); | 1380 xfree (data); |
1381 return ret; | 1381 return ret; |
1382 } | 1382 } |
1383 | 1383 |
1384 | 1384 |
1385 DEFUN ("x-store-cutbuffer-internal", Fx_store_cutbuffer_internal, 2, 2, 0, /* | 1385 DEFUN ("x-store-cutbuffer-internal", Fx_store_cutbuffer_internal, 2, 2, 0, /* |