[xserver-commit] xserver/dix cursor.c,3.13,3.14 devices.c,3.23,3.24 resource.c,3.16,3.17
Warren Turkal
xserver-commit@pdx.freedesktop.org
Committed by: wt
Update of /cvs/xserver/xserver/dix
In directory pdx:/tmp/cvs-serv2291/dix
Modified Files:
cursor.c devices.c resource.c
Log Message:
* ansify many function declarations
Index: cursor.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/cursor.c,v
retrieving revision 3.13
retrieving revision 3.14
diff -u -d -r3.13 -r3.14
--- a/cursor.c 18 Feb 2004 03:23:36 -0000 3.13
+++ b/cursor.c 18 Feb 2004 05:47:07 -0000 3.14
@@ -105,12 +105,11 @@
/*
* To be called indirectly by DeleteResource; must use exactly two args
+ * value - must conform to DeleteType
*/
/*ARGSUSED*/
int
-FreeCursor(value, cid)
- pointer value; /* must conform to DeleteType */
- XID cid;
+FreeCursor(pointer value, XID cid)
{
int nscr;
CursorPtr pCurs = (CursorPtr)value;
@@ -141,7 +140,7 @@
int n = BitmapBytePad(bits->width) * bits->height;
bits->emptyMask = FALSE;
- while(n--)
+ while(n--)
if(*(msk++) != 0) return;
#ifdef ARGB_CURSOR
if (bits->argb)
@@ -158,16 +157,17 @@
/*
* does nothing about the resource table, just creates the data structure.
* does not copy the src and mask bits
+ * psrcbits - server-defined padding
+ * pmaskbits - server-defined padding
+ * argb - no padding
*/
-CursorPtr
-AllocCursorARGB(psrcbits, pmaskbits, argb, cm,
- foreRed, foreGreen, foreBlue, backRed, backGreen, backBlue)
- unsigned char * psrcbits; /* server-defined padding */
- unsigned char * pmaskbits; /* server-defined padding */
- CARD32 * argb; /* no padding */
- CursorMetricPtr cm;
- unsigned foreRed, foreGreen, foreBlue;
- unsigned backRed, backGreen, backBlue;
+CursorPtr
+AllocCursorARGB(unsigned char *psrcbits, unsigned char *pmaskbits,
+ CARD32 *argb, CursorMetricPtr cm,
+ unsigned int foreRed, unsigned int foreGreen,
+ unsigned int foreBlue,
+ unsigned int backRed, unsigned int backGreen,
+ unsigned int backBlue)
{
CursorBitsPtr bits;
CursorPtr pCurs;
@@ -195,7 +195,7 @@
CheckForEmptyMask(bits);
pCurs->bits = bits;
- pCurs->refcnt = 1;
+ pCurs->refcnt = 1;
#ifdef XFIXES
pCurs->serialNumber = ++cursorSerial;
pCurs->name = None;
@@ -230,14 +230,17 @@
return pCurs;
}
-CursorPtr
-AllocCursor(psrcbits, pmaskbits, cm,
- foreRed, foreGreen, foreBlue, backRed, backGreen, backBlue)
- unsigned char * psrcbits; /* server-defined padding */
- unsigned char * pmaskbits; /* server-defined padding */
- CursorMetricPtr cm;
- unsigned foreRed, foreGreen, foreBlue;
- unsigned backRed, backGreen, backBlue;
+/*
+ * psrcbits - server-defined padding
+ * pmaskbits - server-defined padding
+ */
+CursorPtr
+AllocCursor(unsigned char *psrcbits, unsigned char *pmaskbits,
+ CursorMetricPtr cm,
+ unsigned int foreRed, unsigned int foreGreen,
+ unsigned int foreBlue,
+ unsigned int backRed, unsigned int backGreen,
+ unsigned int backBlue)
{
return AllocCursorARGB (psrcbits, pmaskbits, (CARD32 *) 0, cm,
foreRed, foreGreen, foreBlue,
@@ -245,15 +248,13 @@
}
int
-AllocGlyphCursor(source, sourceChar, mask, maskChar,
- foreRed, foreGreen, foreBlue, backRed, backGreen, backBlue,
- ppCurs, client)
- Font source, mask;
- unsigned int sourceChar, maskChar;
- unsigned foreRed, foreGreen, foreBlue;
- unsigned backRed, backGreen, backBlue;
- CursorPtr *ppCurs;
- ClientPtr client;
+AllocGlyphCursor(Font source, unsigned int sourceChar,
+ Font mask, unsigned int maskChar,
+ unsigned int foreRed, unsigned int foreGreen,
+ unsigned int foreBlue,
+ unsigned int backRed, unsigned int backGreen,
+ unsigned int backBlue,
+ CursorPtr *ppCurs, ClientPtr client)
{
FontPtr sourcefont, maskfont;
unsigned char *srcbits;
@@ -436,9 +437,7 @@
*************************************************************/
CursorPtr
-CreateRootCursor(pfilename, glyph)
- char * pfilename;
- unsigned int glyph;
+CreateRootCursor(char *pfilename, unsigned int glyph)
{
CursorPtr curs;
FontPtr cursorfont;
Index: devices.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/devices.c,v
retrieving revision 3.23
retrieving revision 3.24
diff -u -d -r3.23 -r3.24
--- a/devices.c 18 Feb 2004 03:23:36 -0000 3.23
+++ b/devices.c 18 Feb 2004 05:47:07 -0000 3.24
@@ -81,9 +81,7 @@
#include "dixevents.h"
DeviceIntPtr
-_AddInputDevice(deviceProc, autoStart)
- DeviceProc deviceProc;
- Bool autoStart;
+_AddInputDevice(DeviceProc deviceProc, Bool autoStart)
{
register DeviceIntPtr dev;
@@ -130,8 +128,7 @@
}
Bool
-EnableDevice(dev)
- register DeviceIntPtr dev;
+EnableDevice(register DeviceIntPtr dev)
{
register DeviceIntPtr *prev;
@@ -149,8 +146,7 @@
}
Bool
-DisableDevice(dev)
- register DeviceIntPtr dev;
+DisableDevice(register DeviceIntPtr dev)
{
register DeviceIntPtr *prev;
@@ -168,7 +164,7 @@
}
int
-InitAndStartDevices()
+InitAndStartDevices(void)
{
register DeviceIntPtr dev, next;
@@ -284,7 +280,7 @@
}
void
-CloseDownDevices()
+CloseDownDevices(void)
{
register DeviceIntPtr dev, next;
@@ -305,8 +301,7 @@
}
void
-RemoveDevice(dev)
- register DeviceIntPtr dev;
+RemoveDevice(register DeviceIntPtr dev)
{
register DeviceIntPtr prev,tmp,next;
@@ -350,14 +345,13 @@
}
int
-NumMotionEvents()
+NumMotionEvents(void)
{
return inputInfo.pointer->valuator->numMotionEvents;
}
void
-_RegisterPointerDevice(device)
- DeviceIntPtr device;
+_RegisterPointerDevice(DeviceIntPtr device)
{
inputInfo.pointer = device;
#ifdef XKB
@@ -383,8 +377,7 @@
}
void
-_RegisterKeyboardDevice(device)
- DeviceIntPtr device;
+_RegisterKeyboardDevice(DeviceIntPtr device)
{
inputInfo.keyboard = device;
#ifdef XKB
@@ -410,20 +403,19 @@
}
DevicePtr
-LookupKeyboardDevice()
+LookupKeyboardDevice(void)
{
return inputInfo.keyboard ? &inputInfo.keyboard->public : NULL;
}
DevicePtr
-LookupPointerDevice()
+LookupPointerDevice(void)
{
return inputInfo.pointer ? &inputInfo.pointer->public : NULL;
}
DevicePtr
-LookupDevice(id)
- int id;
+LookupDevice(int id)
{
DeviceIntPtr dev;
@@ -439,8 +431,7 @@
}
void
-QueryMinMaxKeyCodes(minCode, maxCode)
- KeyCode *minCode, *maxCode;
+QueryMinMaxKeyCodes(KeyCode *minCode, KeyCode *maxCode)
{
if (inputInfo.keyboard) {
*minCode = inputInfo.keyboard->key->curKeySyms.minKeyCode;
@@ -449,8 +440,7 @@
}
Bool
-SetKeySymsMap(dst, src)
- register KeySymsPtr dst, src;
+SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src)
{
int i, j;
int rowDif = src->minKeyCode - dst->minKeyCode;
@@ -541,10 +531,7 @@
}
Bool
-InitKeyClassDeviceStruct(dev, pKeySyms, pModifiers)
- DeviceIntPtr dev;
- KeySymsPtr pKeySyms;
- CARD8 pModifiers[];
+InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers[])
{
int i;
register KeyClassPtr keyc;
@@ -582,10 +569,8 @@
}
Bool
-InitButtonClassDeviceStruct(dev, numButtons, map)
- register DeviceIntPtr dev;
- int numButtons;
- CARD8 *map;
+InitButtonClassDeviceStruct(register DeviceIntPtr dev, int numButtons,
+ CARD8 *map)
{
register ButtonClassPtr butc;
int i;
@@ -608,12 +593,9 @@
}
Bool
-InitValuatorClassDeviceStruct(dev, numAxes, motionProc, numMotionEvents, mode)
- DeviceIntPtr dev;
- ValuatorMotionProcPtr motionProc;
- int numAxes;
- int numMotionEvents;
- int mode;
+InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes,
+ ValuatorMotionProcPtr motionProc,
+ int numMotionEvents, int mode)
{
int i;
register ValuatorClassPtr valc;
@@ -637,8 +619,7 @@
}
Bool
-InitFocusClassDeviceStruct(dev)
- DeviceIntPtr dev;
+InitFocusClassDeviceStruct(DeviceIntPtr dev)
{
register FocusClassPtr focc;
@@ -656,10 +637,8 @@
}
Bool
-InitKbdFeedbackClassDeviceStruct(dev, bellProc, controlProc)
- DeviceIntPtr dev;
- BellProcPtr bellProc;
- KbdCtrlProcPtr controlProc;
+InitKbdFeedbackClassDeviceStruct(DeviceIntPtr dev, BellProcPtr bellProc,
+ KbdCtrlProcPtr controlProc)
{
register KbdFeedbackPtr feedc;
@@ -686,9 +665,7 @@
}
Bool
-InitPtrFeedbackClassDeviceStruct(dev, controlProc)
- DeviceIntPtr dev;
- PtrCtrlProcPtr controlProc;
+InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
{
register PtrFeedbackPtr feedc;
@@ -729,13 +706,10 @@
0};
Bool
-InitStringFeedbackClassDeviceStruct (dev, controlProc, max_symbols,
- num_symbols_supported, symbols)
- DeviceIntPtr dev;
- StringCtrlProcPtr controlProc;
- int max_symbols;
- int num_symbols_supported;
- KeySym *symbols;
+InitStringFeedbackClassDeviceStruct (DeviceIntPtr dev,
+ StringCtrlProcPtr controlProc,
+ int max_symbols, int num_symbols_supported,
+ KeySym *symbols)
{
int i;
register StringFeedbackPtr feedc;
@@ -773,10 +747,8 @@
}
Bool
-InitBellFeedbackClassDeviceStruct (dev, bellProc, controlProc)
- DeviceIntPtr dev;
- BellProcPtr bellProc;
- BellCtrlProcPtr controlProc;
+InitBellFeedbackClassDeviceStruct (DeviceIntPtr dev, BellProcPtr bellProc,
+ BellCtrlProcPtr controlProc)
{
register BellFeedbackPtr feedc;
@@ -795,9 +767,7 @@
}
Bool
-InitLedFeedbackClassDeviceStruct (dev, controlProc)
- DeviceIntPtr dev;
- LedCtrlProcPtr controlProc;
+InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
{
register LedFeedbackPtr feedc;
@@ -818,9 +788,8 @@
}
Bool
-InitIntegerFeedbackClassDeviceStruct (dev, controlProc)
- DeviceIntPtr dev;
- IntegerCtrlProcPtr controlProc;
+InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev,
+ IntegerCtrlProcPtr controlProc)
{
register IntegerFeedbackPtr feedc;
@@ -838,14 +807,10 @@
}
Bool
-InitPointerDeviceStruct(device, map, numButtons, motionProc, controlProc,
- numMotionEvents)
- DevicePtr device;
- CARD8 *map;
- int numButtons;
- PtrCtrlProcPtr controlProc;
- ValuatorMotionProcPtr motionProc;
- int numMotionEvents;
+InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons,
+ ValuatorMotionProcPtr motionProc,
+ PtrCtrlProcPtr controlProc,
+ int numMotionEvents)
{
DeviceIntPtr dev = (DeviceIntPtr)device;
@@ -856,12 +821,9 @@
}
Bool
-InitKeyboardDeviceStruct(device, pKeySyms, pModifiers, bellProc, controlProc)
- DevicePtr device;
- KeySymsPtr pKeySyms;
- CARD8 pModifiers[];
- BellProcPtr bellProc;
- KbdCtrlProcPtr controlProc;
+InitKeyboardDeviceStruct(DevicePtr device, KeySymsPtr pKeySyms,
+ CARD8 pModifiers[], BellProcPtr bellProc,
+ KbdCtrlProcPtr controlProc)
{
DeviceIntPtr dev = (DeviceIntPtr)device;
@@ -871,10 +833,8 @@
}
void
-SendMappingNotify(request, firstKeyCode, count, client)
- unsigned int request, count;
- unsigned int firstKeyCode;
- ClientPtr client;
+SendMappingNotify(unsigned int request, unsigned int firstKeyCode,
+ unsigned int count, ClientPtr client)
{
int i;
xEvent event;
@@ -917,11 +877,8 @@
* sort it to do the checking. How often is it called? Just being lazy?
*/
Bool
-BadDeviceMap(buff, length, low, high, errval)
- register BYTE *buff;
- int length;
- unsigned low, high;
- XID *errval;
+BadDeviceMap(register BYTE *buff, int length,
+ unsigned int low, unsigned int high, XID *errval)
{
register int i, j;
@@ -944,10 +901,8 @@
}
Bool
-AllModifierKeysAreUp(dev, map1, per1, map2, per2)
- register DeviceIntPtr dev;
- register CARD8 *map1, *map2;
- int per1, per2;
+AllModifierKeysAreUp(register DeviceIntPtr dev, CARD8 *map1, int per1,
+ CARD8 *map2, int per2)
{
register int i, j, k;
register CARD8 *down = dev->key->down;
@@ -969,8 +924,7 @@
}
int
-ProcSetModifierMapping(client)
- ClientPtr client;
+ProcSetModifierMapping(ClientPtr client)
{
xSetModifierMappingReply rep;
REQUEST(xSetModifierMappingReq);
@@ -979,7 +933,7 @@
register int i;
DeviceIntPtr keybd = inputInfo.keyboard;
register KeyClassPtr keyc = keybd->key;
-
+
REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq);
if (client->req_len != ((stuff->numKeyPerModifier<<1) +
@@ -1009,7 +963,7 @@
#ifdef XCSECURITY
if (!SecurityCheckDeviceAccess(client, keybd, TRUE))
return BadAccess;
-#endif
+#endif
#ifdef LBX
LbxFlushModifierMapTag();
@@ -1081,8 +1035,7 @@
}
int
-ProcGetModifierMapping(client)
- ClientPtr client;
+ProcGetModifierMapping(ClientPtr client)
{
xGetModifierMappingReply rep;
register KeyClassPtr keyc = inputInfo.keyboard->key;
@@ -1103,8 +1056,7 @@
}
int
-ProcChangeKeyboardMapping(client)
- ClientPtr client;
+ProcChangeKeyboardMapping(ClientPtr client)
{
REQUEST(xChangeKeyboardMappingReq);
unsigned len;
@@ -1112,7 +1064,7 @@
register KeySymsPtr curKeySyms = &inputInfo.keyboard->key->curKeySyms;
REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq);
- len = client->req_len - (sizeof(xChangeKeyboardMappingReq) >> 2);
+ len = client->req_len - (sizeof(xChangeKeyboardMappingReq) >> 2);
if (len != (stuff->keyCodes * stuff->keySymsPerKeyCode))
return BadLength;
if ((stuff->firstKeyCode < curKeySyms->minKeyCode) ||
@@ -1132,7 +1084,7 @@
if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard,
TRUE))
return BadAccess;
-#endif
+#endif
keysyms.minKeyCode = stuff->firstKeyCode;
keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1;
keysyms.mapWidth = stuff->keySymsPerKeyCode;
@@ -1149,8 +1101,7 @@
}
int
-ProcSetPointerMapping(client)
- ClientPtr client;
+ProcSetPointerMapping(ClientPtr client)
{
REQUEST(xSetPointerMappingReq);
BYTE *map;
@@ -1189,8 +1140,7 @@
}
int
-ProcGetKeyboardMapping(client)
- ClientPtr client;
+ProcGetKeyboardMapping(ClientPtr client)
{
xGetKeyboardMappingReply rep;
REQUEST(xGetKeyboardMappingReq);
@@ -1228,8 +1178,7 @@
}
int
-ProcGetPointerMapping(client)
- ClientPtr client;
+ProcGetPointerMapping(ClientPtr client)
{
xGetPointerMappingReply rep;
ButtonClassPtr butc = inputInfo.pointer->button;
@@ -1241,14 +1190,11 @@
rep.length = ((unsigned)rep.nElts + (4-1))/4;
WriteReplyToClient(client, sizeof(xGetPointerMappingReply), &rep);
(void)WriteToClient(client, (int)rep.nElts, (char *)&butc->map[1]);
- return Success;
+ return Success;
}
void
-NoteLedState(keybd, led, on)
- DeviceIntPtr keybd;
- int led;
- Bool on;
+NoteLedState(DeviceIntPtr keybd, int led, Bool on)
{
KeybdCtrl *ctrl = &keybd->kbdfeed->ctrl;
if (on)
@@ -1258,8 +1204,7 @@
}
int
-Ones(mask) /* HACKMEM 169 */
- unsigned long mask;
+Ones(unsigned long mask) /* HACKMEM 169 */
{
register unsigned long y;
@@ -1269,8 +1214,7 @@
}
int
-ProcChangeKeyboardControl (client)
- ClientPtr client;
+ProcChangeKeyboardControl (ClientPtr client)
{
#define DO_ALL (-1)
KeybdCtrl ctrl;
@@ -1290,7 +1234,7 @@
#ifdef XCSECURITY
if (!SecurityCheckDeviceAccess(client, keybd, TRUE))
return BadAccess;
-#endif
+#endif
vlist = (XID *)&stuff[1]; /* first word of values */
ctrl = keybd->kbdfeed->ctrl;
while (vmask)
@@ -1299,7 +1243,7 @@
vmask &= ~index2;
switch (index2)
{
- case KBKeyClickPercent:
+ case KBKeyClickPercent:
t = (INT8)*vlist;
vlist++;
if (t == -1)
@@ -1457,11 +1401,10 @@
(*keybd->kbdfeed->CtrlProc)(keybd, &keybd->kbdfeed->ctrl);
return Success;
#undef DO_ALL
-}
+}
int
-ProcGetKeyboardControl (client)
- ClientPtr client;
+ProcGetKeyboardControl (ClientPtr client)
{
int i;
register KeybdCtrl *ctrl = &inputInfo.keyboard->kbdfeed->ctrl;
@@ -1484,8 +1427,7 @@
}
int
-ProcBell(client)
- ClientPtr client;
+ProcBell(ClientPtr client)
{
register DeviceIntPtr keybd = inputInfo.keyboard;
int base = keybd->kbdfeed->ctrl.bell;
@@ -1504,18 +1446,17 @@
newpercent = base - newpercent + stuff->percent;
#ifdef XKB
if (!noXkbExtension)
- XkbHandleBell(FALSE,FALSE, keybd, newpercent, &keybd->kbdfeed->ctrl, 0,
+ XkbHandleBell(FALSE,FALSE, keybd, newpercent, &keybd->kbdfeed->ctrl, 0,
None, NULL, client);
else
#endif
(*keybd->kbdfeed->BellProc)(newpercent, keybd,
(pointer) &keybd->kbdfeed->ctrl, 0);
return Success;
-}
+}
int
-ProcChangePointerControl(client)
- ClientPtr client;
+ProcChangePointerControl(ClientPtr client)
{
DeviceIntPtr mouse = inputInfo.pointer;
PtrCtrl ctrl; /* might get BadValue part way through */
@@ -1566,11 +1507,10 @@
mouse->ptrfeed->ctrl = ctrl;
(*mouse->ptrfeed->CtrlProc)(mouse, &mouse->ptrfeed->ctrl);
return Success;
-}
+}
int
-ProcGetPointerControl(client)
- ClientPtr client;
+ProcGetPointerControl(ClientPtr client)
{
register PtrCtrl *ctrl = &inputInfo.pointer->ptrfeed->ctrl;
xGetPointerControlReply rep;
@@ -1587,9 +1527,7 @@
}
void
-MaybeStopHint(dev, client)
- register DeviceIntPtr dev;
- ClientPtr client;
+MaybeStopHint(register DeviceIntPtr dev, ClientPtr client)
{
GrabPtr grab = dev->grab;
@@ -1605,8 +1543,7 @@
}
int
-ProcGetMotionEvents(client)
- ClientPtr client;
+ProcGetMotionEvents(ClientPtr client)
{
WindowPtr pWin;
xTimecoord * coords = (xTimecoord *) NULL;
@@ -1673,8 +1610,7 @@
}
int
-ProcQueryKeymap(client)
- ClientPtr client;
+ProcQueryKeymap(ClientPtr client)
{
xQueryKeymapReply rep;
int i;
Index: resource.c
===================================================================
RCS file: /cvs/xserver/xserver/dix/resource.c,v
retrieving revision 3.16
retrieving revision 3.17
diff -u -d -r3.16 -r3.17
--- a/resource.c 18 Feb 2004 03:23:36 -0000 3.16
+++ b/resource.c 18 Feb 2004 05:47:07 -0000 3.17
@@ -143,8 +143,7 @@
#endif
RESTYPE
-CreateNewResourceType(deleteFunc)
- DeleteType deleteFunc;
+CreateNewResourceType(DeleteType deleteFunc)
{
RESTYPE next = lastResourceType + 1;
DeleteType *funcs;
@@ -174,7 +173,7 @@
}
RESTYPE
-CreateNewResourceClass()
+CreateNewResourceClass(void)
{
RESTYPE next = lastResourceClass >> 1;
@@ -194,11 +193,10 @@
*****************/
Bool
-InitClientResources(client)
- ClientPtr client;
+InitClientResources(ClientPtr client)
{
register int i, j;
-
+
if (client == serverClient)
{
lastResourceType = RT_LASTPREDEF;
@@ -245,7 +243,7 @@
(client->index ? SERVER_BIT : SERVER_MINID);
clientTable[i].endFakeID = (clientTable[i].fakeID | RESOURCE_ID_MASK) + 1;
clientTable[i].expectID = client->clientAsMask;
- for (j=0; j<INITBUCKETS; j++)
+ for (j=0; j<INITBUCKETS; j++)
{
clientTable[i].resources[j] = NullResource;
}
@@ -298,10 +296,7 @@
}
void
-GetXIDRange(client, server, minp, maxp)
- int client;
- Bool server;
- XID *minp, *maxp;
+GetXIDRange(int client, Bool server, XID *minp, XID *maxp)
{
register XID id, maxid;
register ResourcePtr *resp;
@@ -336,7 +331,7 @@
}
/* GetXIDList is called by the XC-MISC extension's MiscGetXIDList function.
- * This function tries to find count unused XIDs for the given client. It
+ * This function tries to find count unused XIDs for the given client. It
* puts the IDs in the array pids and returns the number found, which should
* almost always be the number requested.
*
@@ -351,10 +346,7 @@
*/
unsigned int
-GetXIDList(pClient, count, pids)
- ClientPtr pClient;
- unsigned int count;
- XID *pids;
+GetXIDList(ClientPtr pClient, unsigned int count, XID *pids)
{
unsigned int found = 0;
XID id = pClient->clientAsMask;
@@ -381,8 +373,7 @@
*/
XID
-FakeClientID(client)
- register int client;
+FakeClientID(register int client)
{
XID id, maxid;
@@ -403,15 +394,12 @@
}
Bool
-AddResource(id, type, value)
- XID id;
- RESTYPE type;
- pointer value;
+AddResource(XID id, RESTYPE type, pointer value)
{
int client;
register ClientResourceRec *rrec;
register ResourcePtr res, *head;
-
+
client = CLIENT_ID(id);
rrec = &clientTable[client];
if (!rrec->buckets)
@@ -442,8 +430,7 @@
}
static void
-RebuildTable(client)
- int client;
+RebuildTable(int client)
{
register int j;
register ResourcePtr res, next;
@@ -492,9 +479,7 @@
}
void
-FreeResource(id, skipDeleteFuncType)
- XID id;
- RESTYPE skipDeleteFuncType;
+FreeResource(XID id, RESTYPE skipDeleteFuncType)
{
int cid;
register ResourcePtr res;
@@ -540,10 +525,7 @@
void
-FreeResourceByType(id, type, skipFree)
- XID id;
- RESTYPE type;
- Bool skipFree;
+FreeResourceByType(XID id, RESTYPE type, Bool skipFree)
{
int cid;
register ResourcePtr res;
@@ -583,10 +565,7 @@
*/
Bool
-ChangeResourceValue (id, rtype, value)
- XID id;
- RESTYPE rtype;
- pointer value;
+ChangeResourceValue (XID id, RESTYPE rtype, pointer value)
{
int cid;
register ResourcePtr res;
@@ -630,7 +609,7 @@
resources = clientTable[client->index].resources;
eltptr = &clientTable[client->index].elements;
- for (i = 0; i < clientTable[client->index].buckets; i++)
+ for (i = 0; i < clientTable[client->index].buckets; i++)
{
for (this = resources[i]; this; this = next)
{
@@ -735,8 +714,7 @@
}
void
-FreeClientResources(client)
- ClientPtr client;
+FreeClientResources(ClientPtr client)
{
register ResourcePtr *resources;
register ResourcePtr this;
@@ -782,11 +760,11 @@
}
void
-FreeAllResources()
+FreeAllResources(void)
{
int i;
- for (i = currentMaxClients; --i >= 0; )
+ for (i = currentMaxClients; --i >= 0; )
{
if (clientTable[i].buckets)
FreeClientResources(clients[i]);
@@ -826,11 +804,7 @@
*/
pointer
-SecurityLookupIDByType(client, id, rtype, mode)
- ClientPtr client;
- XID id;
- RESTYPE rtype;
- Mask mode;
+SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode)
{
int cid;
register ResourcePtr res;
@@ -859,11 +833,7 @@
pointer
-SecurityLookupIDByClass(client, id, classes, mode)
- ClientPtr client;
- XID id;
- RESTYPE classes;
- Mask mode;
+SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode)
{
int cid;
register ResourcePtr res = NULL;
@@ -895,18 +865,14 @@
*/
pointer
-LookupIDByType(id, rtype)
- XID id;
- RESTYPE rtype;
+LookupIDByType(XID id, RESTYPE rtype)
{
return SecurityLookupIDByType(NullClient, id, rtype,
SecurityUnknownAccess);
}
pointer
-LookupIDByClass(id, classes)
- XID id;
- RESTYPE classes;
+LookupIDByClass(XID id, RESTYPE classes)
{
return SecurityLookupIDByClass(NullClient, id, classes,
SecurityUnknownAccess);
@@ -916,11 +882,9 @@
/*
* LookupIDByType returns the object with the given id and type, else NULL.
- */
+ */
pointer
-LookupIDByType(id, rtype)
- XID id;
- RESTYPE rtype;
+LookupIDByType(XID id, RESTYPE rtype)
{
int cid;
register ResourcePtr res;
@@ -940,11 +904,9 @@
/*
* LookupIDByClass returns the object with the given id and any one of the
* given classes, else NULL.
- */
+ */
pointer
-LookupIDByClass(id, classes)
- XID id;
- RESTYPE classes;
+LookupIDByClass(XID id, RESTYPE classes)
{
int cid;
register ResourcePtr res;