Mercurial > hg > xemacs-beta
diff src/xselect.c @ 2:ac2d302a0011 r19-15b2
Import from CVS: tag r19-15b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:46:35 +0200 |
parents | 376386a54a3c |
children | 0293115a14e9 |
line wrap: on
line diff
--- a/src/xselect.c Mon Aug 13 08:45:53 2007 +0200 +++ b/src/xselect.c Mon Aug 13 08:46:35 2007 +0200 @@ -353,7 +353,7 @@ /* No, this is no good, because then Motif text fields don't bother to look up the new value, and you can't Copy from a buffer, Paste into a text field, then Copy something else from the buffer and - paste it intot he text field -- it pastes the first thing again. */ + paste it into the text field -- it pastes the first thing again. */ /* && !owned_p */ ) { @@ -367,7 +367,8 @@ int dataid; /* 1.2 wants long, but 1.1.5 wants int... */ #endif XmString fmh; - fmh = XmStringCreateLtoR ("Clipboard", XmSTRING_DEFAULT_CHARSET); + fmh = XmStringCreateLtoR ((String) "Clipboard", + XmSTRING_DEFAULT_CHARSET); while (ClipboardSuccess != XmClipboardStartCopy (display, selecting_window, fmh, thyme, #ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK @@ -379,7 +380,8 @@ ; XmStringFree (fmh); while (ClipboardSuccess != - XmClipboardCopy (display, selecting_window, itemid, "STRING", + XmClipboardCopy (display, selecting_window, itemid, + (String) "STRING", #ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK /* O'Reilly examples say size can be 0, but this clearly is not the case. */ @@ -503,8 +505,8 @@ if (STRINGP (check) || VECTORP (check) || SYMBOLP (check) || - INTP (check) || - CHARP (check) || + INTP (check) || + CHARP (check) || NILP (value)) return value; @@ -2112,17 +2114,18 @@ Xatoms_of_xselect (struct device *d) { #define ATOM(x) XInternAtom (DEVICE_X_DISPLAY (d), (x), False) +#define ATOMIZE(x) DEVICE_XATOM_##x (d) = ATOM(#x) /* Non-predefined atoms that we might end up using a lot */ - DEVICE_XATOM_CLIPBOARD (d) = ATOM ("CLIPBOARD"); - DEVICE_XATOM_TIMESTAMP (d) = ATOM ("TIMESTAMP"); - DEVICE_XATOM_TEXT (d) = ATOM ("TEXT"); - DEVICE_XATOM_DELETE (d) = ATOM ("DELETE"); - DEVICE_XATOM_MULTIPLE (d) = ATOM ("MULTIPLE"); - DEVICE_XATOM_INCR (d) = ATOM ("INCR"); - DEVICE_XATOM_EMACS_TMP (d) = ATOM ("_EMACS_TMP_"); - DEVICE_XATOM_TARGETS (d) = ATOM ("TARGETS"); - DEVICE_XATOM_NULL (d) = ATOM ("NULL"); - DEVICE_XATOM_ATOM_PAIR (d) = ATOM ("ATOM_PAIR"); - DEVICE_XATOM_COMPOUND_TEXT (d) = ATOM ("COMPOUND_TEXT"); + ATOMIZE (CLIPBOARD); + ATOMIZE (TIMESTAMP); + ATOMIZE (TEXT); + ATOMIZE (DELETE); + ATOMIZE (MULTIPLE); + ATOMIZE (INCR); + ATOMIZE (TARGETS); + ATOMIZE (NULL); + ATOMIZE (ATOM_PAIR); + ATOMIZE (COMPOUND_TEXT); + DEVICE_XATOM_EMACS_TMP (d) = ATOM ("_EMACS_TMP_"); }