{
const char *nameext;
- TO_EXTERNAL_FORMAT (LISP_STRING, Fsymbol_name (sym),
- C_STRING_ALLOCA, nameext,
- Qctext);
+ LISP_STRING_TO_EXTERNAL (Fsymbol_name (sym), nameext, Qctext);
return XInternAtom (display, nameext, only_if_exists ? True : False);
}
}
That assumed equivalence of time_t and Time, which is not
necessarily the case (e.g. under OSF on the Alphas, where
Time is a 64-bit quantity and time_t is a 32-bit quantity).
-
+
Opaque pointers are the clean way to go here.
*/
selection_time = make_opaque (&thyme, sizeof (thyme));
/* Whichever lazy git wrote this originally just called abort()
when anything didn't go their way... */
-
+
/* Try some other text types */
if (NILP (selection))
selection = select_convert_out (QCLIPBOARD, QSTRING, Qnil);
selection = select_convert_out (QCLIPBOARD, QTEXT, Qnil);
if (NILP (selection))
selection = select_convert_out (QCLIPBOARD, QCOMPOUND_TEXT, Qnil);
-
+
if (CONSP (selection) && SYMBOLP (XCAR (selection))
&& (EQ (XCAR (selection), QSTRING)
|| EQ (XCAR (selection), QTEXT)
if (!STRINGP (selection))
signal_error (Qselection_conversion_error,
build_string ("couldn't convert selection to string"));
-
-
+
+
XmClipboardCopyByName (dpy, window, *data_id,
(char *) XSTRING_DATA (selection),
XSTRING_LENGTH (selection) + 1,
}
local_selection_time = * (Time *) XOPAQUE_DATA (temp_obj);
-
+
if (event->time != CurrentTime &&
local_selection_time > event->time)
{
Atom type;
lisp_data_to_selection_data (d, converted_selection,
&data, &type, &size, &format);
-
+
x_reply_selection_request (event, format, data, size, type);
successful_p = Qt;
/* Tell x_selection_request_lisp_error() it's cool. */
event->type = 0;
xfree (data);
}
-
+
unbind_to (count, Qnil);
DONE_LABEL:
/* We don't own the selection, so that's fine. */
if (NILP (local_selection_time_lisp))
return;
-
+
local_selection_time = * (Time *) XOPAQUE_DATA (local_selection_time_lisp);
/* This SelectionClear is for a selection that we no longer own, so we can
if (changed_owner_time != CurrentTime &&
local_selection_time > changed_owner_time)
return;
-
+
handle_selection_clear (selection_symbol);
}