[Xquartz-dev] 2.3.2_beta3 on Tiger in X11R7.2

Peter Dyballa Peter_Dyballa at Freenet.DE
Tue Nov 18 12:36:59 PST 2008


Am 18.11.2008 um 06:05 schrieb Jeremy Huddleston:

> Try changing them to size_t or unsigned.


Now I get:

darwin.c: In function 'DarwinMouseProc':
darwin.c:343: warning: passing argument 4 of  
'InitPointerDeviceStruct' from incompatible pointer type
darwin.c:343: warning: passing argument 5 of  
'InitPointerDeviceStruct' makes integer from pointer without a cast
darwin.c:343: error: too many arguments to function  
'InitPointerDeviceStruct'
darwin.c: In function 'DarwinTabletProc':
darwin.c:374: warning: passing argument 4 of  
'InitPointerDeviceStruct' from incompatible pointer type
darwin.c:374: warning: passing argument 5 of  
'InitPointerDeviceStruct' makes integer from pointer without a cast
darwin.c:374: error: too many arguments to function  
'InitPointerDeviceStruct'
darwin.c: In function 'InitInput':
darwin.c:473: warning: passing argument 1 of 'AddInputDevice' from  
incompatible pointer type
darwin.c:473: warning: passing argument 2 of 'AddInputDevice' makes  
pointer from integer without a cast
darwin.c:473: error: too few arguments to function 'AddInputDevice'
darwin.c:491: warning: passing argument 1 of 'AddInputDevice' from  
incompatible pointer type
darwin.c:491: warning: passing argument 2 of 'AddInputDevice' makes  
pointer from integer without a cast
darwin.c:491: error: too few arguments to function 'AddInputDevice'
darwin.c:495: warning: passing argument 1 of 'AddInputDevice' from  
incompatible pointer type
darwin.c:495: warning: passing argument 2 of 'AddInputDevice' makes  
pointer from integer without a cast
darwin.c:495: error: too few arguments to function 'AddInputDevice'
darwin.c:499: warning: passing argument 1 of 'AddInputDevice' from  
incompatible pointer type
darwin.c:499: warning: passing argument 2 of 'AddInputDevice' makes  
pointer from integer without a cast
darwin.c:499: error: too few arguments to function 'AddInputDevice'
darwin.c:503: warning: passing argument 1 of 'AddInputDevice' from  
incompatible pointer type
darwin.c:503: warning: passing argument 2 of 'AddInputDevice' makes  
pointer from integer without a cast
darwin.c:503: error: too few arguments to function 'AddInputDevice'
make[3]: *** [darwin.lo] Error 1


The InitPointerDeviceStruct used in xserver/hw/xquartz/darwin.c is:


             InitPointerDeviceStruct((DevicePtr)pPointer, map, 7,
                                     GetMotionHistory,
                                     (PtrCtrlProcPtr)NoopDDA,
                                     GetMotionHistorySize(), 2);
			InitAbsoluteClassDeviceStruct(pPointer);

             InitPointerDeviceStruct((DevicePtr)pPointer, map, 3,
                                     GetMotionHistory,
                                     (PtrCtrlProcPtr)NoopDDA,
                                     GetMotionHistorySize(), 5);

Both times GetMotionHistory is incorrect according to this  
declaration in xserver/include/input.h:

extern Bool InitPointerDeviceStruct(
     DevicePtr /*device*/,
     CARD8* /*map*/,
     int /*numButtons*/,
     PtrCtrlProcPtr /*controlProc*/,
     int /*numMotionEvents*/,
     int /*numAxes*/);


The problem with AddInputDevice stems from these:

473:    darwinKeyboard = AddInputDevice(DarwinKeybdProc, TRUE);
491:    darwinPointer = AddInputDevice(DarwinMouseProc, TRUE);
495:    darwinTabletStylus = AddInputDevice(DarwinTabletProc, TRUE);
499:    darwinTabletCursor = AddInputDevice(DarwinTabletProc, TRUE);
503:    darwinTabletEraser = AddInputDevice(DarwinTabletProc, TRUE);

while xserver/include/input.h has:

extern DeviceIntPtr AddInputDevice(
     ClientPtr /*client*/,
     DeviceProc /*deviceProc*/,
     Bool /*autoStart*/);


Here is its correct use:

xserver/hw/kdrive/src/kinput.c:1017:    ki->dixdev = AddInputDevice 
(serverClient, KdKeyboardProc, TRUE);
xserver/hw/kdrive/src/kinput.c:1086:    pi->dixdev = AddInputDevice 
(serverClient, KdPointerProc, TRUE);

and here its faulty again:

xserver/hw/xquartz/darwinXinput.c:122:    dev = (DeviceIntPtr)  
AddInputDevice(deviceProc, TRUE);
xserver/hw/xwin/InitInput.c:141:  pMouse = AddInputDevice  
(winMouseProc, TRUE);
xserver/hw/xwin/InitInput.c:142:  pKeyboard = AddInputDevice  
(winKeybdProc, TRUE);
xserver/Xi/stubs.c:124:    dev = (DeviceIntPtr) AddInputDevice 
(deviceProc, TRUE);

Source code is since a few days unchanged (except your patch).

--
Greetings

   Pete

There are three types of people in this world: those who can count,  
and those who cannot.




More information about the Xquartz-dev mailing list