[7858] in Athena Bugs
vax 7.2R: X11 Intrinsics
daemon@ATHENA.MIT.EDU (Joseph Wang)
Thu Aug 1 21:12:53 1991
To: bugs@ATHENA.MIT.EDU, swick@ATHENA.MIT.EDU
Date: Thu, 01 Aug 91 21:13:06 EDT
From: Joseph Wang <joe@ATHENA.MIT.EDU>
System name: CALCULUS-1
Type and version: CVAXSTAR 7.2R (3 update(s) to same version)
Display type: SM
What were you trying to do?
Use XtVaSetValues to set a resource of type XtRDouble
What's wrong:
Resource was not set properly
What should have happened:
Either the VarArgs interface should have set the resource, or else sent an
error message saying that it was unable to set the resource.
Please describe any relevant documentation references:
In the procedure _XtTypedArgToArg of VarArgs.c,
if (strcmp(to_type, XtRString) == 0) {
arg_return->value = (XtArgVal) to_val.addr;
}
else {
if (to_val.size == sizeof(long))
arg_return->value = (XtArgVal) *(long *)to_val.addr;
else if (to_val.size == sizeof(short))
arg_return->value = (XtArgVal) *(short *)to_val.addr;
else if (to_val.size == sizeof(char))
arg_return->value = (XtArgVal) *(char *)to_val.addr;
else if (to_val.size == sizeof(XtArgVal))
arg_return->value = *(XtArgVal *)to_val.addr;
}
If it happens that the resource is intended to be a double (8 bytes),
this algorithm will not set arg_return->value and not return an error
saying that something is wrong.