Page 1 of 1

inputevent->ie_Qualifier on wiki (Input_Device)

Posted: Sat Aug 22, 2015 11:48 am
by javierdlr
Looking on the wiki http://wiki.amigaos.net/wiki/Input_Device found that 'inputevent->ie_Qualifier = NULL' throws a "warning: assignment makes integer from pointer without a cast", changing to 'inputevent->ie_Qualifier = 0' solves it.

Should then the wiki example/doc where it says '...ie_Qualifier...NULL' be changed to '...ie_Qualifier...0', or maybe add a new #define IEQUALIFIER_ABSOLUTEMOUSE 0x0000?

SDK inputevent.h:

Code: Select all

..
struct InputEvent
{
    struct InputEvent *ie_NextEvent; /* the chronologically next event */
    uint8              ie_Class;     /* the input event class */
    uint8              ie_SubClass;  /* optional subclass of the class */
    uint16             ie_Code;      /* the input event code */
    uint16             ie_Qualifier; /* qualifiers in effect for the event */
..

Re: inputevent->ie_Qualifier on wiki (Input_Device)

Posted: Sat Aug 22, 2015 3:36 pm
by tonyw
Clearly the use of NULL to initialise a uint16 is going to cause an error. I'll try to correct it.

Re: inputevent->ie_Qualifier on wiki (Input_Device)

Posted: Sat Aug 22, 2015 9:57 pm
by trixie
I've done this for you. Changed the bogus instruction
Absolute positioning is done by setting ie_Qualifier to NULL and relative positioning is done by setting ie_Qualifier to RELATIVE_MOUSE.
to the correct
Absolute positioning is done by setting ie_Qualifier to 0 and relative positioning is done by setting ie_Qualifier to IEQUALIFIER_RELATIVEMOUSE.
+ modified two more places where ie_Qualifier was set to NULL instead of 0.

Re: inputevent->ie_Qualifier on wiki (Input_Device)

Posted: Sun Aug 23, 2015 4:37 am
by Belxjander
The original C= NDK had NULL defined as an integer, use of GCC includes redefines this as a Pointer.
pointer vs integer inconsistency from that update.

not the only time I've seen it (TagItems are another use case to be clear with)

Re: inputevent->ie_Qualifier on wiki (Input_Device)

Posted: Sun Aug 23, 2015 11:36 pm
by javierdlr
thx trixie for fixing the wiki and Belxjander for explanation about NULL diff.