if (screen->wide_chars && *target == XA_STRING) { return
else if (screen->wide_chars && *target == XA_STRING) { result =
ConvertSelection(Widget w,		 Atom * selection,		 Atom * target,		 Atom * type,		 XtPointer * value,		 unsigned long *length,		 int *format){    Display *d = XtDisplay(w);    TScreen *screen;    if (!IsXtermWidget(w))	return False;    screen = &((XtermWidget) w)->screen;    if (screen->selection_data == NULL)	return False;		/* can this happen? */    if (*target == XA_TARGETS(d)) {	Atom *targetP;	Atom *std_targets;	unsigned long std_length;	XmuConvertStandardSelection(w, screen->selection_time, selection,				    target, type, (XPointer *) & std_targets,				    &std_length, format);	*length = std_length + 6;	targetP = (Atom *) XtMalloc(sizeof(Atom) * (*length));	*value = (XtPointer) targetP;	*targetP++ = XA_STRING;	*targetP++ = XA_TEXT(d);#ifdef X_HAVE_UTF8_STRING	*targetP++ = XA_COMPOUND_TEXT(d);	*targetP++ = XA_UTF8_STRING(d);#else	*targetP = XA_COMPOUND_TEXT(d);	if_OPT_WIDE_CHARS(screen, {	    *targetP = XA_UTF8_STRING(d);	});	targetP++;#endif	*targetP++ = XA_LENGTH(d);	*targetP++ = XA_LIST_LENGTH(d);	memcpy((char *) targetP, (char *) std_targets, sizeof(Atom) * std_length);	XtFree((char *) std_targets);	*type = XA_ATOM;	*format = 32;	return True;    }#if OPT_WIDE_CHARS    if (screen->wide_chars && *target == XA_STRING) {	return	    _ConvertSelectionHelper(w,				    type, value, length, format,				    Xutf8TextListToTextProperty,				    XStringStyle);    }    if (screen->wide_chars && *target == XA_UTF8_STRING(d)) {	return	    _ConvertSelectionHelper(w,				    type, value, length, format,				    Xutf8TextListToTextProperty,				    XUTF8StringStyle);    }    if (screen->wide_chars && *target == XA_TEXT(d)) {	return	    _ConvertSelectionHelper(w,				    type, value, length, format,				    Xutf8TextListToTextProperty,				    XStdICCTextStyle);    }    if (screen->wide_chars && *target == XA_COMPOUND_TEXT(d)) {	return	    _ConvertSelectionHelper(w,				    type, value, length, format,				    Xutf8TextListToTextProperty,				    XCompoundTextStyle);    }#endif    if (*target == XA_STRING) {	/* not wide_chars */	/* We can only reach this point if the selection requestor	   requested STRING before any of TEXT, COMPOUND_TEXT or	   UTF8_STRING.  We therefore assume that the requestor is not	   properly internationalised, and dump raw eight-bit data	   with no conversion into the selection.  Yes, this breaks	   the ICCCM in non-Latin-1 locales. */	*type = XA_STRING;	*value = screen->selection_data;	*length = screen->selection_length;	*format = 8;	return True;    }    if (*target == XA_TEXT(d)) {	/* not wide_chars */	return	    _ConvertSelectionHelper(w,				    type, value, length, format,				    XmbTextListToTextProperty,				    XStdICCTextStyle);    }    if (*target == XA_COMPOUND_TEXT(d)) {	/* not wide_chars */	return	    _ConvertSelectionHelper(w,				    type, value, length, format,				    XmbTextListToTextProperty,				    XCompoundTextStyle);    }#ifdef X_HAVE_UTF8_STRING    if (*target == XA_UTF8_STRING(d)) {		/* not wide_chars */	return	    _ConvertSelectionHelper(w,				    type, value, length, format,				    XmbTextListToTextProperty,				    XUTF8StringStyle);    }#endif    if (*target == XA_LIST_LENGTH(d)) {	*value = XtMalloc(4);	if (sizeof(long) == 4)	     *(long *) *value = 1;	else {	    long temp = 1;	    memcpy((char *) *value, ((char *) &temp) + sizeof(long) - 4, 4);	}	*type = XA_INTEGER;	*length = 1;	*format = 32;	return True;    }    if (*target == XA_LENGTH(d)) {	/* This value is wrong if we have UTF-8 text */	*value = XtMalloc(4);	if (sizeof(long) == 4)	     *(long *) *value = screen->selection_length;	else {	    long temp = screen->selection_length;	    memcpy((char *) *value, ((char *) &temp) + sizeof(long) - 4, 4);	}	*type = XA_INTEGER;	*length = 1;	*format = 32;	return True;    }    if (XmuConvertStandardSelection(w, screen->selection_time, selection,				    target, type, (XPointer *) value,				    length, format))	return True;    /* else */    return False;}