comparison src/select-x.c @ 771:943eaba38521

[xemacs-hg @ 2002-03-13 08:51:24 by ben] The big ben-mule-21-5 check-in! Various files were added and deleted. See CHANGES-ben-mule. There are still some test suite failures. No crashes, though. Many of the failures have to do with problems in the test suite itself rather than in the actual code. I'll be addressing these in the next day or so -- none of the test suite failures are at all critical. Meanwhile I'll be trying to address the biggest issues -- i.e. build or run failures, which will almost certainly happen on various platforms. All comments should be sent to ben@xemacs.org -- use a Cc: if necessary when sending to mailing lists. There will be pre- and post- tags, something like pre-ben-mule-21-5-merge-in, and post-ben-mule-21-5-merge-in.
author ben
date Wed, 13 Mar 2002 08:54:06 +0000
parents fdefd0186b75
children e38acbeb1cae
comparison
equal deleted inserted replaced
770:336a418893b5 771:943eaba38521
1 /* X Selection processing for XEmacs 1 /* X Selection processing for XEmacs
2 Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. 2 Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
3 Copyright (C) 2001 Ben Wing.
3 4
4 This file is part of XEmacs. 5 This file is part of XEmacs.
5 6
6 XEmacs is free software; you can redistribute it and/or modify it 7 XEmacs is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the 8 under the terms of the GNU General Public License as published by the
23 /* Rewritten by jwz */ 24 /* Rewritten by jwz */
24 25
25 #include <config.h> 26 #include <config.h>
26 #include "lisp.h" 27 #include "lisp.h"
27 28
28 #include "buffer.h" 29 #include "charset.h"
29 #include "console-x.h" 30 #include "console-x.h"
30 #include "objects-x.h" 31 #include "objects-x.h"
31 32
32 #include "frame.h" 33 #include "frame.h"
33 #include "opaque.h" 34 #include "opaque.h"
174 if (atom == XA_CUT_BUFFER6) return QCUT_BUFFER6; 175 if (atom == XA_CUT_BUFFER6) return QCUT_BUFFER6;
175 if (atom == XA_CUT_BUFFER7) return QCUT_BUFFER7; 176 if (atom == XA_CUT_BUFFER7) return QCUT_BUFFER7;
176 #endif 177 #endif
177 178
178 { 179 {
179 char *intstr; 180 Intbyte *intstr;
180 char *str = XGetAtomName (display, atom); 181 Extbyte *str = XGetAtomName (display, atom);
181 182
182 if (! str) return Qnil; 183 if (! str) return Qnil;
183 184
184 TO_INTERNAL_FORMAT (C_STRING, str, 185 TO_INTERNAL_FORMAT (C_STRING, str,
185 C_STRING_ALLOCA, intstr, 186 C_STRING_ALLOCA, intstr,
186 Qctext); 187 Qctext);
187 XFree (str); 188 XFree (str);
188 return intern (intstr); 189 return intern_int (intstr);
189 } 190 }
190 } 191 }
191 192
192 #define PROCESSING_X_CODE 193 #define PROCESSING_X_CODE
193 #include "select-common.h" 194 #include "select-common.h"
636 /* Tell x_selection_request_lisp_error() it's cool. */ 637 /* Tell x_selection_request_lisp_error() it's cool. */
637 event->type = 0; 638 event->type = 0;
638 xfree (data); 639 xfree (data);
639 } 640 }
640 641
641 unbind_to (count, Qnil); 642 unbind_to (count);
642 643
643 DONE_LABEL: 644 DONE_LABEL:
644 645
645 UNGCPRO; 646 UNGCPRO;
646 647
928 wait_delaying_user_input (selection_reply_done, 0); 929 wait_delaying_user_input (selection_reply_done, 0);
929 930
930 if (selection_reply_timed_out) 931 if (selection_reply_timed_out)
931 signal_error (Qselection_conversion_error, "timed out waiting for reply from selection owner", Qunbound); 932 signal_error (Qselection_conversion_error, "timed out waiting for reply from selection owner", Qunbound);
932 933
933 unbind_to (speccount, Qnil); 934 unbind_to (speccount);
934 935
935 /* otherwise, the selection is waiting for us on the requested property. */ 936 /* otherwise, the selection is waiting for us on the requested property. */
936 937
937 return select_convert_in (selection_symbol, 938 return select_convert_in (selection_symbol,
938 target_type, 939 target_type,