Winfried, I'm afraid that, in most cases, I don't know what you're saying. It's probably me :-) Could you elaborate ?
On Sun, 2006-04-23 at 19:14 +0200, [EMAIL PROTECTED] wrote:
> First I have to add some lines. The compilation broke at:
> =========================================================
> TextOut.c:369: error: invalid lvalue in assignment
I don't see that, and in my version, line 369 is a #ifdef.
> I have attached all three changes although only line 366 ff
> is missing in the patch I already have sent.
What does the "ff" abbreviation stand for?
> Replacing (e.g. lib/Xm-2.1/Xme.c, line 265 ff):
> ===============================================
> pix = _XmAccessColorData(_XmGetColors(XtScreenOfObject(widget),
> ColormapOfObject(widget),
> XmIsGadget(widget) ?
> XmParentBackground(widget) :
> XtBackground(widget)),
> type);
>
>
> with:
> =====
> bg = XtBackground(widget);
> if(XmIsGadget(widget))
> bg = XmParentBackground(widget);
>
> pix = _XmAccessColorData(_XmGetColors(XtScreenOfObject(widget),
> ColormapOfObject(widget),
> bg), type);
>
> seems to be necessary because of:
> =================================
> Xme.c:281: warning: operation on '_Xm_fastPtr' may be undefined
(a) I don't see that
(b) I don't understand why there would be this difference : the code
appears fully equivalent to me, except for the fact that your code
always does an XtBackground() call, the original code doesn't.
> Comment: 100% 'defined' means 0% 'undefined'.
Apart from the cryptic comment, I agree fully that we need to avoid
compiler warnings: they indicate problems in the code.
However, as I said,
a = b ? c : d;
is not a worse statement than
if (b)
a = c;
else
a = d;
because, according to the C textbooks I saw, they're equivalent.
And your version
a = d;
if (b)
a = c;
is (theoretically) not an equivalent !
> Inserting (e.g. lib/Xm-2.1/TextF.c, line 1667 ff:
> =================================================
> memset(&a, 0, sizeof(XtWidgetGeometry));
I applied that patch. Do you have the latest version ?
Thanks for the help!
Danny
--
Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info
signature.asc
Description: This is a digitally signed message part

