Mercurial > hg > xemacs-beta
comparison src/xselect.c @ 169:15872534500d r20-3b11
Import from CVS: tag r20-3b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:46:53 +0200 |
parents | 538048ae2ab8 |
children | 8eaf7971accc |
comparison
equal
deleted
inserted
replaced
168:9851d5c6556e | 169:15872534500d |
---|---|
365 long dataid; | 365 long dataid; |
366 #else | 366 #else |
367 int dataid; /* 1.2 wants long, but 1.1.5 wants int... */ | 367 int dataid; /* 1.2 wants long, but 1.1.5 wants int... */ |
368 #endif | 368 #endif |
369 XmString fmh; | 369 XmString fmh; |
370 String encoding = (String) "STRING"; | 370 String encoding = "STRING"; |
371 Extbyte *data = XSTRING_DATA (selection_value); | 371 Extbyte *data = XSTRING_DATA (selection_value); |
372 Extcount bytes = XSTRING_LENGTH (selection_value); | 372 Extcount bytes = XSTRING_LENGTH (selection_value); |
373 | 373 |
374 #ifdef MULE | 374 #ifdef MULE |
375 { | 375 { |
394 | 394 |
395 chartypes = WORLD; | 395 chartypes = WORLD; |
396 break; | 396 break; |
397 } | 397 } |
398 | 398 |
399 switch (chartypes) | 399 if (chartypes == LATIN_1) |
400 GET_STRING_BINARY_DATA_ALLOCA (selection_value, data, bytes); | |
401 else if (chartypes == WORLD) | |
400 { | 402 { |
401 case LATIN_1: | |
402 GET_STRING_BINARY_DATA_ALLOCA (selection_value, data, bytes); | |
403 break; | |
404 case WORLD: | |
405 GET_STRING_CTEXT_DATA_ALLOCA (selection_value, data, bytes); | 403 GET_STRING_CTEXT_DATA_ALLOCA (selection_value, data, bytes); |
406 encoding = (String) "COMPOUND_TEXT"; | 404 encoding = "COMPOUND_TEXT"; |
407 break; | |
408 } | 405 } |
409 } | 406 } |
410 #endif /* MULE */ | 407 #endif /* MULE */ |
411 | 408 |
412 fmh = XmStringCreateLtoR ((String) "Clipboard", | 409 fmh = XmStringCreateLtoR ("Clipboard", XmSTRING_DEFAULT_CHARSET); |
413 XmSTRING_DEFAULT_CHARSET); | |
414 while (ClipboardSuccess != | 410 while (ClipboardSuccess != |
415 XmClipboardStartCopy (display, selecting_window, fmh, thyme, | 411 XmClipboardStartCopy (display, selecting_window, fmh, thyme, |
416 #ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK | 412 #ifdef MOTIF_INCREMENTAL_CLIPBOARDS_WORK |
417 widget, motif_clipboard_cb, | 413 widget, motif_clipboard_cb, |
418 #else | 414 #else |
1995 | 1991 |
1996 chartypes = WORLD; | 1992 chartypes = WORLD; |
1997 break; | 1993 break; |
1998 } | 1994 } |
1999 | 1995 |
2000 switch (chartypes) | 1996 if (chartypes == LATIN_1) |
2001 { | 1997 GET_STRING_BINARY_DATA_ALLOCA (string, data, bytes); |
2002 case LATIN_1: GET_STRING_BINARY_DATA_ALLOCA (string, data, bytes); break; | 1998 else if (chartypes == WORLD) |
2003 case WORLD: GET_STRING_CTEXT_DATA_ALLOCA (string, data, bytes); break; | 1999 GET_STRING_CTEXT_DATA_ALLOCA (string, data, bytes); |
2004 } | |
2005 #endif /* MULE */ | 2000 #endif /* MULE */ |
2006 | 2001 |
2007 bytes_remaining = bytes; | 2002 bytes_remaining = bytes; |
2008 | 2003 |
2009 while (bytes_remaining) | 2004 while (bytes_remaining) |