diff options
| author | Joakim Verona | 2012-05-30 14:08:12 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-05-30 14:08:12 +0200 |
| commit | 70700d8c47a35b19e29607ac5f0ed322bdd78249 (patch) | |
| tree | 4fa00d3fac00025354f0b6e23dcda1b58689a094 /src/xselect.c | |
| parent | 44fce8ffe7198991c41c985ff4e67ec7d407907e (diff) | |
| parent | 72cb32cf2f0938dd7dc733eed77b1ed1e497b053 (diff) | |
| download | emacs-70700d8c47a35b19e29607ac5f0ed322bdd78249.tar.gz emacs-70700d8c47a35b19e29607ac5f0ed322bdd78249.zip | |
upstream
Diffstat (limited to 'src/xselect.c')
| -rw-r--r-- | src/xselect.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/xselect.c b/src/xselect.c index 15ce8d487fa..48baeb32581 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -81,13 +81,13 @@ static Lisp_Object clean_local_selection_data (Lisp_Object); | |||
| 81 | 81 | ||
| 82 | #ifdef TRACE_SELECTION | 82 | #ifdef TRACE_SELECTION |
| 83 | #define TRACE0(fmt) \ | 83 | #define TRACE0(fmt) \ |
| 84 | fprintf (stderr, "%d: " fmt "\n", getpid ()) | 84 | fprintf (stderr, "%"pMd": " fmt "\n", (printmax_t) getpid ()) |
| 85 | #define TRACE1(fmt, a0) \ | 85 | #define TRACE1(fmt, a0) \ |
| 86 | fprintf (stderr, "%d: " fmt "\n", getpid (), a0) | 86 | fprintf (stderr, "%"pMd": " fmt "\n", (printmax_t) getpid (), a0) |
| 87 | #define TRACE2(fmt, a0, a1) \ | 87 | #define TRACE2(fmt, a0, a1) \ |
| 88 | fprintf (stderr, "%d: " fmt "\n", getpid (), a0, a1) | 88 | fprintf (stderr, "%"pMd": " fmt "\n", (printmax_t) getpid (), a0, a1) |
| 89 | #define TRACE3(fmt, a0, a1, a2) \ | 89 | #define TRACE3(fmt, a0, a1, a2) \ |
| 90 | fprintf (stderr, "%d: " fmt "\n", getpid (), a0, a1, a2) | 90 | fprintf (stderr, "%"pMd": " fmt "\n", (printmax_t) getpid (), a0, a1, a2) |
| 91 | #else | 91 | #else |
| 92 | #define TRACE0(fmt) (void) 0 | 92 | #define TRACE0(fmt) (void) 0 |
| 93 | #define TRACE1(fmt, a0) (void) 0 | 93 | #define TRACE1(fmt, a0) (void) 0 |
| @@ -392,7 +392,6 @@ x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, | |||
| 392 | { | 392 | { |
| 393 | Lisp_Object local_value; | 393 | Lisp_Object local_value; |
| 394 | Lisp_Object handler_fn, value, check; | 394 | Lisp_Object handler_fn, value, check; |
| 395 | int count; | ||
| 396 | 395 | ||
| 397 | local_value = LOCAL_SELECTION (selection_symbol, dpyinfo); | 396 | local_value = LOCAL_SELECTION (selection_symbol, dpyinfo); |
| 398 | 397 | ||
| @@ -409,7 +408,7 @@ x_get_local_selection (Lisp_Object selection_symbol, Lisp_Object target_type, | |||
| 409 | /* Don't allow a quit within the converter. | 408 | /* Don't allow a quit within the converter. |
| 410 | When the user types C-g, he would be surprised | 409 | When the user types C-g, he would be surprised |
| 411 | if by luck it came during a converter. */ | 410 | if by luck it came during a converter. */ |
| 412 | count = SPECPDL_INDEX (); | 411 | ptrdiff_t count = SPECPDL_INDEX (); |
| 413 | specbind (Qinhibit_quit, Qt); | 412 | specbind (Qinhibit_quit, Qt); |
| 414 | 413 | ||
| 415 | CHECK_SYMBOL (target_type); | 414 | CHECK_SYMBOL (target_type); |
| @@ -603,7 +602,7 @@ x_reply_selection_request (struct input_event *event, | |||
| 603 | Window window = SELECTION_EVENT_REQUESTOR (event); | 602 | Window window = SELECTION_EVENT_REQUESTOR (event); |
| 604 | ptrdiff_t bytes_remaining; | 603 | ptrdiff_t bytes_remaining; |
| 605 | int max_bytes = selection_quantum (display); | 604 | int max_bytes = selection_quantum (display); |
| 606 | int count = SPECPDL_INDEX (); | 605 | ptrdiff_t count = SPECPDL_INDEX (); |
| 607 | struct selection_data *cs; | 606 | struct selection_data *cs; |
| 608 | 607 | ||
| 609 | reply->type = SelectionNotify; | 608 | reply->type = SelectionNotify; |
| @@ -792,7 +791,7 @@ x_handle_selection_request (struct input_event *event) | |||
| 792 | Atom property = SELECTION_EVENT_PROPERTY (event); | 791 | Atom property = SELECTION_EVENT_PROPERTY (event); |
| 793 | Lisp_Object local_selection_data; | 792 | Lisp_Object local_selection_data; |
| 794 | int success = 0; | 793 | int success = 0; |
| 795 | int count = SPECPDL_INDEX (); | 794 | ptrdiff_t count = SPECPDL_INDEX (); |
| 796 | GCPRO2 (local_selection_data, target_symbol); | 795 | GCPRO2 (local_selection_data, target_symbol); |
| 797 | 796 | ||
| 798 | if (!dpyinfo) goto DONE; | 797 | if (!dpyinfo) goto DONE; |
| @@ -1141,7 +1140,7 @@ static void | |||
| 1141 | wait_for_property_change (struct prop_location *location) | 1140 | wait_for_property_change (struct prop_location *location) |
| 1142 | { | 1141 | { |
| 1143 | int secs, usecs; | 1142 | int secs, usecs; |
| 1144 | int count = SPECPDL_INDEX (); | 1143 | ptrdiff_t count = SPECPDL_INDEX (); |
| 1145 | 1144 | ||
| 1146 | if (property_change_reply_object) | 1145 | if (property_change_reply_object) |
| 1147 | abort (); | 1146 | abort (); |
| @@ -1702,7 +1701,7 @@ selection_data_to_lisp_data (Display *display, const unsigned char *data, | |||
| 1702 | v = Fmake_vector (make_number (size / 2), make_number (0)); | 1701 | v = Fmake_vector (make_number (size / 2), make_number (0)); |
| 1703 | for (i = 0; i < size / 2; i++) | 1702 | for (i = 0; i < size / 2; i++) |
| 1704 | { | 1703 | { |
| 1705 | EMACS_INT j = ((short *) data) [i]; | 1704 | short j = ((short *) data) [i]; |
| 1706 | Faset (v, make_number (i), make_number (j)); | 1705 | Faset (v, make_number (i), make_number (j)); |
| 1707 | } | 1706 | } |
| 1708 | return v; | 1707 | return v; |
| @@ -2623,13 +2622,12 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from, | |||
| 2623 | if (x_check_property_data (values) == -1) | 2622 | if (x_check_property_data (values) == -1) |
| 2624 | error ("Bad data in VALUES, must be number, cons or string"); | 2623 | error ("Bad data in VALUES, must be number, cons or string"); |
| 2625 | 2624 | ||
| 2626 | event.xclient.type = ClientMessage; | 2625 | if (XINT (format) != 8 && XINT (format) != 16 && XINT (format) != 32) |
| 2627 | event.xclient.format = XFASTINT (format); | ||
| 2628 | |||
| 2629 | if (event.xclient.format != 8 && event.xclient.format != 16 | ||
| 2630 | && event.xclient.format != 32) | ||
| 2631 | error ("FORMAT must be one of 8, 16 or 32"); | 2626 | error ("FORMAT must be one of 8, 16 or 32"); |
| 2632 | 2627 | ||
| 2628 | event.xclient.type = ClientMessage; | ||
| 2629 | event.xclient.format = XINT (format); | ||
| 2630 | |||
| 2633 | if (FRAMEP (dest) || NILP (dest)) | 2631 | if (FRAMEP (dest) || NILP (dest)) |
| 2634 | { | 2632 | { |
| 2635 | struct frame *fdest = check_x_frame (dest); | 2633 | struct frame *fdest = check_x_frame (dest); |