summaryrefslogtreecommitdiff
path: root/dix
diff options
context:
space:
mode:
Diffstat (limited to 'dix')
-rw-r--r--dix/devices.c16
-rw-r--r--dix/events.c10
2 files changed, 13 insertions, 13 deletions
diff --git a/dix/devices.c b/dix/devices.c
index 3f6d56008..abefc2e33 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -143,19 +143,19 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart)
DeviceIntPtr dev, *prev; /* not a typo */
DeviceIntPtr devtmp;
int devid;
- char devind[MAX_DEVICES];
+ char devind[MAXDEVICES];
BOOL enabled;
/* Find next available id */
- memset(devind, 0, sizeof(char)*MAX_DEVICES);
+ memset(devind, 0, sizeof(char)*MAXDEVICES);
for (devtmp = inputInfo.devices; devtmp; devtmp = devtmp->next)
devind[devtmp->id]++;
for (devtmp = inputInfo.off_devices; devtmp; devtmp = devtmp->next)
devind[devtmp->id]++;
- for (devid = 0; devid < MAX_DEVICES && devind[devid]; devid++)
+ for (devid = 0; devid < MAXDEVICES && devind[devid]; devid++)
;
- if (devid >= MAX_DEVICES)
+ if (devid >= MAXDEVICES)
return (DeviceIntPtr)NULL;
dev = xcalloc(sizeof(DeviceIntRec) + sizeof(SpriteInfoRec), 1);
if (!dev)
@@ -291,7 +291,7 @@ EnableDevice(DeviceIntPtr dev)
ev.time = currentTime.milliseconds;
ev.devchange = DeviceEnabled;
ev.deviceid = dev->id;
- dummyDev.id = MAX_DEVICES;
+ dummyDev.id = MAXDEVICES;
SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask,
(xEvent *) &ev, 1);
@@ -369,7 +369,7 @@ DisableDevice(DeviceIntPtr dev)
ev.time = currentTime.milliseconds;
ev.devchange = DeviceDisabled;
ev.deviceid = dev->id;
- dummyDev.id = MAX_DEVICES;
+ dummyDev.id = MAXDEVICES;
SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask,
(xEvent *) &ev, 1);
@@ -409,7 +409,7 @@ ActivateDevice(DeviceIntPtr dev)
ev.deviceid = dev->id;
memset(&dummyDev, 0, sizeof(DeviceIntRec));
- dummyDev.id = MAX_DEVICES;
+ dummyDev.id = MAXDEVICES;
SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask,
(xEvent *) &ev, 1);
@@ -973,7 +973,7 @@ RemoveDevice(DeviceIntPtr dev)
ev.time = currentTime.milliseconds;
ev.devchange = DeviceRemoved;
ev.deviceid = deviceid;
- dummyDev.id = MAX_DEVICES;
+ dummyDev.id = MAXDEVICES;
SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask,
(xEvent *) &ev, 1);
}
diff --git a/dix/events.c b/dix/events.c
index 952a801cd..aa10b02d6 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -372,7 +372,7 @@ extern int DeviceMotionNotify;
* is initialized. The rest is memcpy'd in InitEvents.
*/
#define CantBeFiltered NoEventMask
-static Mask filters[MAX_DEVICES][128] = {
+static Mask filters[MAXDEVICES][128] = {
{
NoSuchEvent, /* 0 */
NoSuchEvent, /* 1 */
@@ -794,7 +794,7 @@ void
SetMaskForEvent(int deviceid, Mask mask, int event)
{
int coretype;
- if (deviceid < 0 || deviceid > MAX_DEVICES)
+ if (deviceid < 0 || deviceid > MAXDEVICES)
FatalError("SetMaskForEvent: bogus device id");
if ((event < LASTEvent) || (event >= 128))
FatalError("SetMaskForEvent: bogus event number");
@@ -5451,7 +5451,7 @@ InitEvents(void)
inputInfo.pointer = (DeviceIntPtr)NULL;
lastEventMask = OwnerGrabButtonMask;
filters[0][PointerMotionMask] = MotionNotify;
- for (i = 1; i < MAX_DEVICES; i++)
+ for (i = 1; i < MAXDEVICES; i++)
{
memcpy(&filters[i], filters[0], sizeof(filters[0]));
}
@@ -6405,7 +6405,7 @@ EnterLeaveSemaphoresIsset(WindowPtr win)
int i;
sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey);
- for (i = 0; i < (MAX_DEVICES + 7)/8; i++)
+ for (i = 0; i < (MAXDEVICES + 7)/8; i++)
set += sem->enterleave[i];
return set;
@@ -6422,7 +6422,7 @@ FocusSemaphoresIsset(WindowPtr win)
int i;
sem = (FocusSemaphoresPtr)dixLookupPrivate(&win->devPrivates, FocusPrivatesKey);
- for (i = 0; i < (MAX_DEVICES + 7)/8; i++)
+ for (i = 0; i < (MAXDEVICES + 7)/8; i++)
set += sem->focusinout[i];
return set;