According to the XtVaGetApplicationResources() manual, the recommended way is:

struct dummy {
  Pixel alcol,
  void *addrbase,
  ...
}:
static struct dummy foo;
static XtResource resources[] =
{
    {"alloc", XmCColor, XmRPixel, sizeof(Pixel),
     (Cardinal) (&(foo.alcol) - &foo), XmRString, (XtPointer) "black"},
    {"base", "Base", XmRInt, sizeof(void *),
     (Cardinal) (&(foo.addrbase) - &foo), XmRImmediate, (XtPointer) NULL},
    ...
}:
...
    XtVaGetApplicationResources(appwidget, &foo, resources,
                                XtNumber(resources), NULL);

I don't think a pad between members of a struct is larger than 2^32 bit,
but it is not guaranteed.  Something is wrong with the base+offset design of X.

-- 
Oohara Yuuma <[EMAIL PROTECTED]>
Debian developer
PGP key (key ID F464A695) http://www.interq.or.jp/libra/oohara/pub-key.txt
Key fingerprint = 6142 8D07 9C5B 159B C170  1F4A 40D6 F42E F464 A695

Lord, what fools these mortals be!
--- William Shakespeare, "A Midsummer-Night's Dream"



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to