[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: SIAG on an Alpha machine
On Mon, 5 Oct 1998, Brian E.W. Wood wrote:
> On 05-Oct-98 Ulric Eriksson wrote:
> > 1. The conversion between XtPointer and int is something many X programs
> > do and IIRC the definition of XtPointer is supposed to allow the
> > conversion.
> I would think that going from a 32-bit integer to a 64-bit pointer would work
> OK but I can see trouble going the other way.
The conversion is from an integer to an XtPointer and back. Here is the
relevant quote from "X Toolkit Intrinsics - C Language Interface":
1.5. Implementation-specific Types
A datum large enough to contain the largest of a char*, int*, function
pointer, structure pointer, or long value. A pointer to any type or
function, or a long value may be converted to an XtPointer and back again
and the result will compare equal to the original value. In ANSI C
environments it is expected that XtPointer will be defined as void*.
IOW, if X on the Alpha doesn't allow the conversion, then X on the Alpha
is broken. The C compiler is allowed to warn about it though (a C compiler
is allowed to warn about anything, including correct code).
But I seriously doubt that X on the Alpha is broken. In any case, it is
much easier to fix if the problem is with Siag.
- Does tsiag work? In that case, the problem can be narrowed down to the
X specific code.
- There is much widget code where resources are declared as int, but set
through calls to XtVaSetValues(w, XtNtableMaxRow, blah, ...) where blah is
in reality a long. There is no type checking done by XtVaSetValues,
because it is a variadic function. I would expect this to cause trouble;
in fact I wouldn't expect it to work at all, no matter how slowly the
mouse is moved.