Commit 5480c537 authored by Adam Jackson's avatar Adam Jackson 🎧

ANSIfy Xi/. Mostly automated via protoize(1).

parent cc42e153
2006-02-21 Adam Jackson <ajax@freedesktop.org>
* Xi/allowev.c:
* Xi/chgdctl.c:
* Xi/chgfctl.c:
* Xi/chgkbd.c:
* Xi/chgkmap.c:
* Xi/chgprop.c:
* Xi/chgptr.c:
* Xi/closedev.c:
* Xi/devbell.c:
* Xi/exevents.c:
* Xi/extinit.c:
* Xi/getbmap.c:
* Xi/getdctl.c:
* Xi/getfctl.c:
* Xi/getfocus.c:
* Xi/getkmap.c:
* Xi/getmmap.c:
* Xi/getprop.c:
* Xi/getselev.c:
* Xi/getvers.c:
* Xi/grabdev.c:
* Xi/grabdevb.c:
* Xi/grabdevk.c:
* Xi/gtmotion.c:
* Xi/listdev.c:
* Xi/opendev.c:
* Xi/queryst.c:
* Xi/selectev.c:
* Xi/sendexev.c:
* Xi/setbmap.c:
* Xi/setdval.c:
* Xi/setfocus.c:
* Xi/setmmap.c:
* Xi/setmode.c:
* Xi/stubs.c:
* Xi/ungrdev.c:
* Xi/ungrdevb.c:
* Xi/ungrdevk.c:
ANSIfy Xi/. Mostly automated via protoize(1).
2006-02-16 Eric Anholt <anholt@FreeBSD.org>
* Xext/Makefile.am:
......
......@@ -79,9 +79,8 @@ SOFTWARE.
*/
int
SProcXAllowDeviceEvents(client)
register ClientPtr client;
{
SProcXAllowDeviceEvents(register ClientPtr client)
{
register char n;
REQUEST(xAllowDeviceEventsReq);
......@@ -98,9 +97,8 @@ SProcXAllowDeviceEvents(client)
*/
int
ProcXAllowDeviceEvents(client)
register ClientPtr client;
{
ProcXAllowDeviceEvents(register ClientPtr client)
{
TimeStamp time;
DeviceIntPtr thisdev;
......
......@@ -80,9 +80,8 @@ SOFTWARE.
*/
int
SProcXChangeDeviceControl(client)
register ClientPtr client;
{
SProcXChangeDeviceControl(register ClientPtr client)
{
register char n;
REQUEST(xChangeDeviceControlReq);
......@@ -99,9 +98,8 @@ SProcXChangeDeviceControl(client)
*/
int
ProcXChangeDeviceControl(client)
ClientPtr client;
{
ProcXChangeDeviceControl(ClientPtr client)
{
unsigned len;
int i, status;
DeviceIntPtr dev;
......@@ -205,11 +203,8 @@ ProcXChangeDeviceControl(client)
*/
void
SRepXChangeDeviceControl (client, size, rep)
ClientPtr client;
int size;
xChangeDeviceControlReply *rep;
{
SRepXChangeDeviceControl (ClientPtr client, int size, xChangeDeviceControlReply *rep)
{
register char n;
swaps(&rep->sequenceNumber, n);
......
......@@ -81,9 +81,8 @@ SOFTWARE.
*/
int
SProcXChangeFeedbackControl(client)
register ClientPtr client;
{
SProcXChangeFeedbackControl(register ClientPtr client)
{
register char n;
REQUEST(xChangeFeedbackControlReq);
......@@ -100,9 +99,8 @@ SProcXChangeFeedbackControl(client)
*/
int
ProcXChangeFeedbackControl(client)
ClientPtr client;
{
ProcXChangeFeedbackControl(ClientPtr client)
{
unsigned len;
DeviceIntPtr dev;
KbdFeedbackPtr k;
......@@ -233,13 +231,8 @@ ProcXChangeFeedbackControl(client)
*/
int
ChangeKbdFeedback (client, dev, mask, k, f)
ClientPtr client;
DeviceIntPtr dev;
unsigned long mask;
KbdFeedbackPtr k;
xKbdFeedbackCtl *f;
{
ChangeKbdFeedback (ClientPtr client, DeviceIntPtr dev, long unsigned int mask, KbdFeedbackPtr k, xKbdFeedbackCtl *f)
{
register char n;
KeybdCtrl kctrl;
int t;
......@@ -389,13 +382,8 @@ ChangeKbdFeedback (client, dev, mask, k, f)
*/
int
ChangePtrFeedback (client, dev, mask, p, f)
ClientPtr client;
DeviceIntPtr dev;
unsigned long mask;
PtrFeedbackPtr p;
xPtrFeedbackCtl *f;
{
ChangePtrFeedback (ClientPtr client, DeviceIntPtr dev, long unsigned int mask, PtrFeedbackPtr p, xPtrFeedbackCtl *f)
{
register char n;
PtrCtrl pctrl; /* might get BadValue part way through */
......@@ -471,13 +459,8 @@ ChangePtrFeedback (client, dev, mask, p, f)
*/
int
ChangeIntegerFeedback (client, dev, mask, i, f)
ClientPtr client;
DeviceIntPtr dev;
unsigned long mask;
IntegerFeedbackPtr i;
xIntegerFeedbackCtl *f;
{
ChangeIntegerFeedback (ClientPtr client, DeviceIntPtr dev, long unsigned int mask, IntegerFeedbackPtr i, xIntegerFeedbackCtl *f)
{
register char n;
if (client->swapped)
......@@ -498,13 +481,8 @@ ChangeIntegerFeedback (client, dev, mask, i, f)
*/
int
ChangeStringFeedback (client, dev, mask, s, f)
ClientPtr client;
DeviceIntPtr dev;
unsigned long mask;
StringFeedbackPtr s;
xStringFeedbackCtl *f;
{
ChangeStringFeedback (ClientPtr client, DeviceIntPtr dev, long unsigned int mask, StringFeedbackPtr s, xStringFeedbackCtl *f)
{
register char n;
register long *p;
int i, j;
......@@ -556,13 +534,8 @@ ChangeStringFeedback (client, dev, mask, s, f)
*/
int
ChangeBellFeedback (client, dev, mask, b, f)
ClientPtr client;
DeviceIntPtr dev;
unsigned long mask;
BellFeedbackPtr b;
xBellFeedbackCtl *f;
{
ChangeBellFeedback (ClientPtr client, DeviceIntPtr dev, long unsigned int mask, BellFeedbackPtr b, xBellFeedbackCtl *f)
{
register char n;
int t;
BellCtrl bctrl; /* might get BadValue part way through */
......@@ -631,13 +604,8 @@ ChangeBellFeedback (client, dev, mask, b, f)
*/
int
ChangeLedFeedback (client, dev, mask, l, f)
ClientPtr client;
DeviceIntPtr dev;
unsigned long mask;
LedFeedbackPtr l;
xLedFeedbackCtl *f;
{
ChangeLedFeedback (ClientPtr client, DeviceIntPtr dev, long unsigned int mask, LedFeedbackPtr l, xLedFeedbackCtl *f)
{
register char n;
LedCtrl lctrl; /* might get BadValue part way through */
......
......@@ -82,9 +82,8 @@ SOFTWARE.
*/
int
SProcXChangeKeyboardDevice(client)
register ClientPtr client;
{
SProcXChangeKeyboardDevice(register ClientPtr client)
{
register char n;
REQUEST(xChangeKeyboardDeviceReq);
......@@ -101,9 +100,8 @@ SProcXChangeKeyboardDevice(client)
*/
int
ProcXChangeKeyboardDevice (client)
register ClientPtr client;
{
ProcXChangeKeyboardDevice (register ClientPtr client)
{
int i;
DeviceIntPtr xkbd = inputInfo.keyboard;
DeviceIntPtr dev;
......@@ -203,11 +201,8 @@ ProcXChangeKeyboardDevice (client)
*/
void
SRepXChangeKeyboardDevice (client, size, rep)
ClientPtr client;
int size;
xChangeKeyboardDeviceReply *rep;
{
SRepXChangeKeyboardDevice (ClientPtr client, int size, xChangeKeyboardDeviceReply *rep)
{
register char n;
swaps(&rep->sequenceNumber, n);
......
......@@ -79,9 +79,8 @@ SOFTWARE.
*/
int
SProcXChangeDeviceKeyMapping(client)
register ClientPtr client;
{
SProcXChangeDeviceKeyMapping(register ClientPtr client)
{
register char n;
register long *p;
register int i, count;
......@@ -106,9 +105,8 @@ SProcXChangeDeviceKeyMapping(client)
*/
int
ProcXChangeDeviceKeyMapping(client)
register ClientPtr client;
{
ProcXChangeDeviceKeyMapping(register ClientPtr client)
{
int ret;
unsigned len;
DeviceIntPtr dev;
......
......@@ -81,9 +81,8 @@ SOFTWARE.
*/
int
SProcXChangeDeviceDontPropagateList(client)
register ClientPtr client;
{
SProcXChangeDeviceDontPropagateList(register ClientPtr client)
{
register char n;
register long *p;
register int i;
......@@ -109,9 +108,8 @@ SProcXChangeDeviceDontPropagateList(client)
*/
int
ProcXChangeDeviceDontPropagateList (client)
register ClientPtr client;
{
ProcXChangeDeviceDontPropagateList (register ClientPtr client)
{
int i;
WindowPtr pWin;
struct tmask tmp[EMASKSIZE];
......
......@@ -85,9 +85,8 @@ SOFTWARE.
*/
int
SProcXChangePointerDevice(client)
register ClientPtr client;
{
SProcXChangePointerDevice(register ClientPtr client)
{
register char n;
REQUEST(xChangePointerDeviceReq);
......@@ -103,9 +102,8 @@ SProcXChangePointerDevice(client)
*/
int
ProcXChangePointerDevice (client)
register ClientPtr client;
{
ProcXChangePointerDevice (register ClientPtr client)
{
DeviceIntPtr xptr = inputInfo.pointer;
DeviceIntPtr dev;
ValuatorClassPtr v;
......@@ -182,9 +180,8 @@ ProcXChangePointerDevice (client)
}
void
DeleteFocusClassDeviceStruct(dev)
DeviceIntPtr dev;
{
DeleteFocusClassDeviceStruct(DeviceIntPtr dev)
{
xfree(dev->focus->trace);
xfree(dev->focus);
dev->focus = NULL;
......@@ -197,12 +194,8 @@ DeleteFocusClassDeviceStruct(dev)
*/
void
SendEventToAllWindows (dev, mask, ev, count)
DeviceIntPtr dev;
Mask mask;
xEvent *ev;
int count;
{
SendEventToAllWindows (DeviceIntPtr dev, Mask mask, xEvent *ev, int count)
{
int i;
WindowPtr pWin, p1;
......@@ -223,13 +216,8 @@ SendEventToAllWindows (dev, mask, ev, count)
*/
void
FindInterestedChildren (dev, p1, mask, ev, count)
DeviceIntPtr dev;
WindowPtr p1;
Mask mask;
xEvent *ev;
int count;
{
FindInterestedChildren (DeviceIntPtr dev, WindowPtr p1, Mask mask, xEvent *ev, int count)
{
WindowPtr p2;
while (p1)
......@@ -249,11 +237,8 @@ FindInterestedChildren (dev, p1, mask, ev, count)
*/
void
SRepXChangePointerDevice (client, size, rep)
ClientPtr client;
int size;
xChangePointerDeviceReply *rep;
{
SRepXChangePointerDevice (ClientPtr client, int size, xChangePointerDeviceReply *rep)
{
register char n;
swaps(&rep->sequenceNumber, n);
......
......@@ -80,9 +80,8 @@ SOFTWARE.
*/
int
SProcXCloseDevice(client)
register ClientPtr client;
{
SProcXCloseDevice(register ClientPtr client)
{
register char n;
REQUEST(xCloseDeviceReq);
......@@ -98,9 +97,8 @@ SProcXCloseDevice(client)
*/
int
ProcXCloseDevice(client)
register ClientPtr client;
{
ProcXCloseDevice(register ClientPtr client)
{
int i;
WindowPtr pWin, p1;
DeviceIntPtr d;
......@@ -142,11 +140,8 @@ ProcXCloseDevice(client)
*/
void
DeleteEventsFromChildren(dev, p1, client)
DeviceIntPtr dev;
WindowPtr p1;
ClientPtr client;
{
DeleteEventsFromChildren(DeviceIntPtr dev, WindowPtr p1, ClientPtr client)
{
WindowPtr p2;
while (p1)
......@@ -166,11 +161,8 @@ DeleteEventsFromChildren(dev, p1, client)
*/
void
DeleteDeviceEvents (dev, pWin, client)
DeviceIntPtr dev;
WindowPtr pWin;
ClientPtr client;
{
DeleteDeviceEvents (DeviceIntPtr dev, WindowPtr pWin, ClientPtr client)
{
InputClientsPtr others;
OtherInputMasks *pOthers;
GrabPtr grab, next;
......
......@@ -78,9 +78,8 @@ SOFTWARE.
*/
int
SProcXDeviceBell(client)
register ClientPtr client;
{
SProcXDeviceBell(register ClientPtr client)
{
register char n;
REQUEST(xDeviceBellReq);
......@@ -95,9 +94,8 @@ SProcXDeviceBell(client)
*/
int
ProcXDeviceBell (client)
register ClientPtr client;
{
ProcXDeviceBell (register ClientPtr client)
{
DeviceIntPtr dev;
KbdFeedbackPtr k;
BellFeedbackPtr b;
......
<
......@@ -100,8 +100,7 @@ static Bool MakeInputMasks (
*/
void
RegisterOtherDevice (device)
DeviceIntPtr device;
RegisterOtherDevice (DeviceIntPtr device)
{
device->public.processInputProc = ProcessOtherEvent;
device->public.realInputProc = ProcessOtherEvent;
......@@ -111,10 +110,7 @@ RegisterOtherDevice (device)
/*ARGSUSED*/
void
ProcessOtherEvent (xE, other, count)
xEventPtr xE;
register DeviceIntPtr other;
int count;
ProcessOtherEvent (xEventPtr xE, register DeviceIntPtr other, int count)
{
register BYTE *kptr;
register int i;
......@@ -298,7 +294,7 @@ ProcessOtherEvent (xE, other, count)
}
_X_EXPORT int
InitProximityClassDeviceStruct( DeviceIntPtr dev)
InitProximityClassDeviceStruct(DeviceIntPtr dev)
{
register ProximityClassPtr proxc;
......@@ -310,13 +306,8 @@ InitProximityClassDeviceStruct( DeviceIntPtr dev)
}
_X_EXPORT void
InitValuatorAxisStruct( DeviceIntPtr dev,
int axnum,
int minval,
int maxval,
int resolution,
int min_res,
int max_res )
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval,
int resolution, int min_res, int max_res)
{
register AxisInfoPtr ax = dev->valuator->axes + axnum;
......@@ -328,13 +319,8 @@ InitValuatorAxisStruct( DeviceIntPtr dev,
}
static void
FixDeviceStateNotify (
DeviceIntPtr dev,
deviceStateNotify *ev,
KeyClassPtr k,
ButtonClassPtr b,
ValuatorClassPtr v,
int first)
FixDeviceStateNotify (DeviceIntPtr dev, deviceStateNotify *ev, KeyClassPtr k,
ButtonClassPtr b, ValuatorClassPtr v, int first)
{
ev->type = DeviceStateNotify;
ev->deviceid = dev->id;
......@@ -373,11 +359,8 @@ FixDeviceStateNotify (
}
static void
FixDeviceValuator (
DeviceIntPtr dev,
deviceValuator *ev,
ValuatorClassPtr v,
int first)
FixDeviceValuator(DeviceIntPtr dev, deviceValuator *ev, ValuatorClassPtr v,
int first)
{
int nval = v->numAxes - first;
......@@ -398,10 +381,8 @@ FixDeviceValuator (
}
void
DeviceFocusEvent(dev, type, mode, detail, pWin)
DeviceIntPtr dev;
int type, mode, detail;
register WindowPtr pWin;
DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail,
register WindowPtr pWin)
{
deviceFocus event;
......@@ -520,19 +501,10 @@ DeviceFocusEvent(dev, type, mode, detail, pWin)
}
int
GrabButton(
ClientPtr client,
DeviceIntPtr dev,
BYTE this_device_mode,
BYTE other_devices_mode,
CARD16 modifiers,
DeviceIntPtr modifier_device,
CARD8 button,
Window grabWindow,
BOOL ownerEvents,
Cursor rcursor,
Window rconfineTo,
Mask eventMask)
GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
BYTE other_devices_mode, CARD16 modifiers,
DeviceIntPtr modifier_device, CARD8 button, Window grabWindow,
BOOL ownerEvents, Cursor rcursor, Window rconfineTo, Mask eventMask)
{
WindowPtr pWin, confineTo;
CursorPtr cursor;
......@@ -594,17 +566,9 @@ GrabButton(
}
int
GrabKey(
ClientPtr client,
DeviceIntPtr dev,
BYTE this_device_mode,
BYTE other_devices_mode,
CARD16 modifiers,
DeviceIntPtr modifier_device,
CARD8 key,
Window grabWindow,
BOOL ownerEvents,
Mask mask)
GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode,
BYTE other_devices_mode, CARD16 modifiers, DeviceIntPtr modifier_device,
CARD8 key, Window grabWindow, BOOL ownerEvents, Mask mask)
{
WindowPtr pWin;
GrabPtr grab;
......@@ -656,13 +620,8 @@ GrabKey(
}
int
SelectForWindow(dev, pWin, client, mask, exclusivemasks, validmasks)
DeviceIntPtr dev;
WindowPtr pWin;
ClientPtr client;
Mask mask;
Mask exclusivemasks;
Mask validmasks;
SelectForWindow(DeviceIntPtr dev, WindowPtr pWin, ClientPtr client, Mask mask,
Mask exclusivemasks, Mask validmasks)
{
int mskidx = dev->id;
int i, ret;
......@@ -731,11 +690,7 @@ maskSet:
}
int
AddExtensionClient (pWin, client, mask, mskidx)
WindowPtr pWin;
ClientPtr client;
Mask mask;
int mskidx;
AddExtensionClient (WindowPtr pWin, ClientPtr client, Mask mask, int mskidx)
{
InputClientsPtr others;
......@@ -757,8 +712,7 @@ AddExtensionClient (pWin, client, mask, mskidx)
}
static Bool
MakeInputMasks (pWin)
WindowPtr pWin;
MakeInputMasks (WindowPtr pWin)
{
struct _OtherInputMasks *imasks;
......@@ -772,8 +726,7 @@ MakeInputMasks (pWin)
}
void
RecalculateDeviceDeliverableEvents(pWin)
WindowPtr pWin;
RecalculateDeviceDeliverableEvents(WindowPtr pWin)
{
register InputClientsPtr others;
struct _OtherInputMasks *inputMasks; /* default: NULL */
......@@ -814,9 +767,7 @@ RecalculateDeviceDeliverableEvents(pWin)
}
int
InputClientGone(pWin, id)
register WindowPtr pWin;
XID id;
InputClientGone(register WindowPtr pWin, XID id)
{
register InputClientsPtr other, prev;
if (!wOtherInputMasks(pWin))
......@@ -861,18 +812,11 @@ InputClientGone(pWin, id)
prev = other;
}
FatalError("client not on device event list");
/*NOTREACHED*/
}
int
SendEvent (client, d, dest, propagate, ev, mask, count)
ClientPtr client;
DeviceIntPtr d;
Window dest;
Bool propagate;
xEvent *ev;
Mask mask;
int count;
SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate,
xEvent *ev, Mask mask, int count)
{