aboutsummaryrefslogtreecommitdiffstats
path: root/src/xselect.c
diff options
context:
space:
mode:
authorKarl Heuer1997-11-15 20:16:49 +0000
committerKarl Heuer1997-11-15 20:16:49 +0000
commit4feb31b211710cb8e646bdc11bc090804c1bbf34 (patch)
tree7ffc8e3b5ce4b64477d1a242727f0c5947992a8b /src/xselect.c
parentddcb46713be0f67f70dbaeea589c7b74591eb370 (diff)
downloademacs-4feb31b211710cb8e646bdc11bc090804c1bbf34.tar.gz
emacs-4feb31b211710cb8e646bdc11bc090804c1bbf34.zip
(x_handle_selection_request): Use xfree, not free.
(unexpect_property_change, x_get_window_property_as_lisp_data): Ditto. (x_handle_property_notify, receive_incremental_selection): Ditto. (selection_data_to_lisp_data, Fx_get_cut_buffer_internal): Ditto.
Diffstat (limited to 'src/xselect.c')
-rw-r--r--src/xselect.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/xselect.c b/src/xselect.c
index 88efb842950..7d43f07071d 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -730,10 +730,10 @@ x_handle_selection_request (event)
730 /* Indicate we have successfully processed this event. */ 730 /* Indicate we have successfully processed this event. */
731 x_selection_current_request = 0; 731 x_selection_current_request = 0;
732 732
733 /* Use free, not XFree, because lisp_data_to_selection_data 733 /* Use xfree, not XFree, because lisp_data_to_selection_data
734 calls xmalloc itself. */ 734 calls xmalloc itself. */
735 if (!nofree) 735 if (!nofree)
736 free (data); 736 xfree (data);
737 } 737 }
738 unbind_to (count, Qnil); 738 unbind_to (count, Qnil);
739 739
@@ -936,7 +936,7 @@ unexpect_property_change (location)
936 prev->next = rest->next; 936 prev->next = rest->next;
937 else 937 else
938 property_change_wait_list = rest->next; 938 property_change_wait_list = rest->next;
939 free (rest); 939 xfree (rest);
940 return; 940 return;
941 } 941 }
942 prev = rest; 942 prev = rest;
@@ -1025,7 +1025,7 @@ x_handle_property_notify (event)
1025 prev->next = rest->next; 1025 prev->next = rest->next;
1026 else 1026 else
1027 property_change_wait_list = rest->next; 1027 property_change_wait_list = rest->next;
1028 free (rest); 1028 xfree (rest);
1029 return; 1029 return;
1030 } 1030 }
1031 prev = rest; 1031 prev = rest;
@@ -1169,7 +1169,7 @@ x_get_foreign_selection (selection_symbol, target_type)
1169 1169
1170/* Subroutines of x_get_window_property_as_lisp_data */ 1170/* Subroutines of x_get_window_property_as_lisp_data */
1171 1171
1172/* Use free, not XFree, to free the data obtained with this function. */ 1172/* Use xfree, not XFree, to free the data obtained with this function. */
1173 1173
1174static void 1174static void
1175x_get_window_property (display, window, property, data_ret, bytes_ret, 1175x_get_window_property (display, window, property, data_ret, bytes_ret,
@@ -1252,7 +1252,7 @@ x_get_window_property (display, window, property, data_ret, bytes_ret,
1252 *bytes_ret = offset; 1252 *bytes_ret = offset;
1253} 1253}
1254 1254
1255/* Use free, not XFree, to free the data obtained with this function. */ 1255/* Use xfree, not XFree, to free the data obtained with this function. */
1256 1256
1257static void 1257static void
1258receive_incremental_selection (display, window, property, target_type, 1258receive_incremental_selection (display, window, property, target_type,
@@ -1314,9 +1314,9 @@ receive_incremental_selection (display, window, property, target_type,
1314 if (! waiting_for_other_props_on_window (display, window)) 1314 if (! waiting_for_other_props_on_window (display, window))
1315 XSelectInput (display, window, STANDARD_EVENT_SET); 1315 XSelectInput (display, window, STANDARD_EVENT_SET);
1316 unexpect_property_change (wait_object); 1316 unexpect_property_change (wait_object);
1317 /* Use free, not XFree, because x_get_window_property 1317 /* Use xfree, not XFree, because x_get_window_property
1318 calls xmalloc itself. */ 1318 calls xmalloc itself. */
1319 if (tmp_data) free (tmp_data); 1319 if (tmp_data) xfree (tmp_data);
1320 break; 1320 break;
1321 } 1321 }
1322 1322
@@ -1341,9 +1341,9 @@ receive_incremental_selection (display, window, property, target_type,
1341 } 1341 }
1342 bcopy (tmp_data, (*data_ret) + offset, tmp_size_bytes); 1342 bcopy (tmp_data, (*data_ret) + offset, tmp_size_bytes);
1343 offset += tmp_size_bytes; 1343 offset += tmp_size_bytes;
1344 /* Use free, not XFree, because x_get_window_property 1344 /* Use xfree, not XFree, because x_get_window_property
1345 calls xmalloc itself. */ 1345 calls xmalloc itself. */
1346 free (tmp_data); 1346 xfree (tmp_data);
1347 } 1347 }
1348} 1348}
1349 1349
@@ -1398,9 +1398,9 @@ x_get_window_property_as_lisp_data (display, window, property, target_type,
1398 1398
1399 unsigned int min_size_bytes = * ((unsigned int *) data); 1399 unsigned int min_size_bytes = * ((unsigned int *) data);
1400 BLOCK_INPUT; 1400 BLOCK_INPUT;
1401 /* Use free, not XFree, because x_get_window_property 1401 /* Use xfree, not XFree, because x_get_window_property
1402 calls xmalloc itself. */ 1402 calls xmalloc itself. */
1403 free ((char *) data); 1403 xfree ((char *) data);
1404 UNBLOCK_INPUT; 1404 UNBLOCK_INPUT;
1405 receive_incremental_selection (display, window, property, target_type, 1405 receive_incremental_selection (display, window, property, target_type,
1406 min_size_bytes, &data, &bytes, 1406 min_size_bytes, &data, &bytes,
@@ -1418,9 +1418,9 @@ x_get_window_property_as_lisp_data (display, window, property, target_type,
1418 val = selection_data_to_lisp_data (display, data, bytes, 1418 val = selection_data_to_lisp_data (display, data, bytes,
1419 actual_type, actual_format); 1419 actual_type, actual_format);
1420 1420
1421 /* Use free, not XFree, because x_get_window_property 1421 /* Use xfree, not XFree, because x_get_window_property
1422 calls xmalloc itself. */ 1422 calls xmalloc itself. */
1423 free ((char *) data); 1423 xfree ((char *) data);
1424 return val; 1424 return val;
1425} 1425}
1426 1426
@@ -1507,7 +1507,7 @@ selection_data_to_lisp_data (display, data, size, type, format)
1507 buf = (unsigned char *) xmalloc (bufsize); 1507 buf = (unsigned char *) xmalloc (bufsize);
1508 size = decode_coding (&coding, data, buf, size, bufsize, &dummy); 1508 size = decode_coding (&coding, data, buf, size, bufsize, &dummy);
1509 str = make_string ((char *) buf, size); 1509 str = make_string ((char *) buf, size);
1510 free (buf); 1510 xfree (buf);
1511 } 1511 }
1512 return str; 1512 return str;
1513 } 1513 }
@@ -1568,7 +1568,7 @@ selection_data_to_lisp_data (display, data, size, type, format)
1568} 1568}
1569 1569
1570 1570
1571/* Use free, not XFree, to free the data obtained with this function. */ 1571/* Use xfree, not XFree, to free the data obtained with this function. */
1572 1572
1573static void 1573static void
1574lisp_data_to_selection_data (display, obj, 1574lisp_data_to_selection_data (display, obj,
@@ -2099,9 +2099,9 @@ DEFUN ("x-get-cut-buffer-internal", Fx_get_cut_buffer_internal,
2099 Fcons (make_number (format), Qnil)))); 2099 Fcons (make_number (format), Qnil))));
2100 2100
2101 ret = (bytes ? make_string ((char *) data, bytes) : Qnil); 2101 ret = (bytes ? make_string ((char *) data, bytes) : Qnil);
2102 /* Use free, not XFree, because x_get_window_property 2102 /* Use xfree, not XFree, because x_get_window_property
2103 calls xmalloc itself. */ 2103 calls xmalloc itself. */
2104 free (data); 2104 xfree (data);
2105 return ret; 2105 return ret;
2106} 2106}
2107 2107