sanitise debug output

Don't spit out huge chunks of pointless ephemera, especially without
--enable-debug.
This commit is contained in:
Daniel Stone 2006-07-20 16:49:17 -04:00 committed by Daniel Stone
parent 463e0fe35b
commit f18c3122a5
2 changed files with 7 additions and 10 deletions

View File

@ -408,7 +408,9 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
switch (onoff)
{
case DEVICE_INIT:
#ifdef DEBUG
ErrorF("initialising pointer %s ...\n", pi->name);
#endif
if (!pi->driver) {
if (!pi->driverPrivate) {
ErrorF("no driver specified for %s\n", pi->name);
@ -468,7 +470,6 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
}
if ((*pi->driver->Enable) (pi) == Success) {
ErrorF("initialised fine, returning success\n");
pDev->on = TRUE;
return Success;
}
@ -495,13 +496,11 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
return Success;
case DEVICE_CLOSE:
ErrorF("D_C\n");
if (pDev->on) {
if (!pi->driver->Disable) {
return BadImplementation;
}
(*pi->driver->Disable) (pi);
ErrorF("disabled\n");
pDev->on = FALSE;
}
@ -509,10 +508,8 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff)
return BadImplementation;
(*pi->driver->Fini) (pi);
ErrorF("finished\n");
KdRemovePointer(pi);
ErrorF("removed\n");
return Success;
}

View File

@ -101,7 +101,10 @@ mieqEnqueue (xEvent *e)
deviceKeyButtonPointer *lastkbp = (deviceKeyButtonPointer *)
&laste->event[0];
#ifdef DEBUG
ErrorF("mieqEnqueue: slamming an event on to the queue from %d\n", kbp->deviceid & DEVICE_BITS);
#endif
if (e->u.u.type == MotionNotify) {
miPointerAbsoluteCursor(e->u.keyButtonPointer.rootX,
e->u.keyButtonPointer.rootY,
@ -135,7 +138,6 @@ mieqEnqueue (xEvent *e)
return;
}
laste->event[laste->nevents++] = *e;
ErrorF("put a valuator event into the queue\n");
return;
}
else if (e->u.u.type == DeviceMotionNotify) {
@ -174,9 +176,11 @@ mieqEnqueue (xEvent *e)
if (e->u.keyButtonPointer.time < miEventQueue.lastEventTime &&
miEventQueue.lastEventTime - e->u.keyButtonPointer.time < 10000)
{
#ifdef DEBUG
ErrorF("mieq: rewinding event time from %d to %d\n",
miEventQueue.lastEventTime,
miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time);
#endif
miEventQueue.events[oldtail].event[0].u.keyButtonPointer.time =
miEventQueue.lastEventTime;
}
@ -186,7 +190,6 @@ mieqEnqueue (xEvent *e)
miEventQueue.events[oldtail].pDev = pDev;
miEventQueue.lastMotion = isMotion;
ErrorF("bottom of mieqEnqueue\n");
}
void
@ -206,8 +209,6 @@ void mieqProcessInputEvents ()
EventRec *e;
int x, y;
ErrorF("mieqPIE: head %p, tail %p\n", miEventQueue.head, miEventQueue.tail);
while (miEventQueue.head != miEventQueue.tail)
{
if (screenIsSaved == SCREEN_SAVER_ON)
@ -234,7 +235,6 @@ void mieqProcessInputEvents ()
miEventQueue.head = 0;
else
++miEventQueue.head;
ErrorF("calling pIP from mieqPIE\n");
(*e->pDev->public.processInputProc)(e->event, e->pDev, e->nevents);
}
}