Mercurial > hg > xemacs-beta
comparison lwlib/xlwgauge.c @ 2271:0dfff19d20da
[xemacs-hg @ 2004-09-14 20:26:40 by james]
Fix gcc 3.3 type-punning warnings.
author | james |
---|---|
date | Tue, 14 Sep 2004 20:26:46 +0000 |
parents | b39c14581166 |
children | 04bc9d2f42c7 |
comparison
equal
deleted
inserted
replaced
2270:0be6ff2356c8 | 2271:0dfff19d20da |
---|---|
647 XGetAtomName(XtDisplay(w),*target)); | 647 XGetAtomName(XtDisplay(w),*target)); |
648 | 648 |
649 #ifdef HAVE_XMU | 649 #ifdef HAVE_XMU |
650 if( *target == XA_TARGETS(XtDisplay(w)) ) | 650 if( *target == XA_TARGETS(XtDisplay(w)) ) |
651 { | 651 { |
652 Atom *rval, *stdTargets ; | 652 XPointer stdTargets; |
653 Atom *rval ; | |
653 unsigned long stdLength ; | 654 unsigned long stdLength ; |
654 | 655 |
655 /* XmuConvertStandardSelection can handle this. This function | 656 /* XmuConvertStandardSelection can handle this. This function |
656 * will return a list of standard targets. We prepend TEXT, | 657 * will return a list of standard targets. We prepend TEXT, |
657 * STRING and INTEGER to the list and return it. | 658 * STRING and INTEGER to the list and return it. |
658 */ | 659 */ |
659 | 660 |
660 req = XtGetSelectionRequest(w, *selection, NULL) ; | 661 req = XtGetSelectionRequest(w, *selection, NULL) ; |
661 XmuConvertStandardSelection(w, req->time, selection, target, | 662 XmuConvertStandardSelection(w, req->time, selection, target, |
662 type, (XPointer*)&stdTargets, &stdLength, format) ; | 663 type, &stdTargets, &stdLength, format) ; |
663 | 664 |
664 *type = XA_ATOM ; /* TODO: needed? */ | 665 *type = XA_ATOM ; /* TODO: needed? */ |
665 *length = stdLength + 3 ; | 666 *length = stdLength + 3 ; |
666 rval = (Atom *) XtMalloc(sizeof(Atom)*(stdLength+3)) ; | 667 rval = (Atom *) XtMalloc(sizeof(Atom)*(stdLength+3)) ; |
667 *value = (XtPointer) rval ; | 668 *value = (XtPointer) rval ; |
668 *rval++ = XA_INTEGER ; | 669 *rval++ = XA_INTEGER ; |
669 *rval++ = XA_STRING ; | 670 *rval++ = XA_STRING ; |
670 *rval++ = XA_TEXT(XtDisplay(w)) ; | 671 *rval++ = XA_TEXT(XtDisplay(w)) ; |
671 memcpy((char *)rval, (char *)stdTargets, stdLength*sizeof(Atom)) ; | 672 memcpy(rval, stdTargets, stdLength*sizeof(Atom)) ; |
672 XtFree((char*) stdTargets) ; | 673 XtFree((char*) stdTargets) ; |
673 *format = 8*sizeof(Atom) ; /* TODO: needed? */ | 674 *format = 8*sizeof(Atom) ; /* TODO: needed? */ |
674 return True ; | 675 return True ; |
675 } | 676 } |
676 | 677 |