Commit ea0591783f7c32dc9c650bc1b1f12a7c62379991

  • avatar
  • Peter Hutterer <peter.hutterer @wh…t.net>
  • Thu Dec 24 00:00:24 CET 2009
Merge the function name into the DBG macro.

Each time DBG is called, prefix with __func__ regardless of the actual
message. An empty DBG string thus prints "function name:".

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
  
5656void xf86WcmMappingFactor(LocalDevicePtr local)
5757{
5858 WacomDevicePtr priv = (WacomDevicePtr) local->private;
59
60 DBG(10, priv->debugLevel, "xf86WcmMappingFactor \n");
6159
60 DBG(10, priv->debugLevel, "\n"); /* just prints function name */
61
6262 xf86WcmVirtualTabletSize(local);
6363
6464 if (!(priv->flags & ABSOLUTE_FLAG) || !priv->wcmMMonitor)
8181 if (priv->currentScreen == -1) /* tool on the tablet */
8282 priv->currentScreen = 0;
8383
84 DBG(10, priv->debugLevel, "xf86WcmMappingFactor"
85 " Active tablet area x=%d y=%d (virtual tablet area x=%d y=%d) map"
86 " to maxWidth =%d maxHeight =%d\n",
84 DBG(10, priv->debugLevel,
85 "Active tablet area x=%d y=%d (virtual tablet area x=%d y=%d) map"
86 " to maxWidth =%d maxHeight =%d\n",
8787 priv->bottomX, priv->bottomY, priv->sizeX, priv->sizeY,
8888 priv->maxWidth, priv->maxHeight);
8989
106106 WacomDevicePtr priv = (WacomDevicePtr) local->private;
107107 int screenToSet = -1, i, j, x, y, tabletSize = 0;
108108
109 DBG(6, priv->debugLevel, "xf86WcmSetScreen v0=%d v1=%d "
109 DBG(6, priv->debugLevel, "v0=%d v1=%d "
110110 "currentScreen=%d\n", v0, v1, priv->currentScreen);
111111
112112 if (priv->screen_no != -1 && priv->screen_no >= priv->numScreen)
152152 if (v0 > priv->topY && v0 <= priv->topY + priv->tvoffsetY)
153153 priv->currentScreen = 1;
154154 }
155 DBG(10, priv->debugLevel, "xf86WcmSetScreen TwinView setup screenToSet=%d\n",
155 DBG(10, priv->debugLevel, "TwinView setup screenToSet=%d\n",
156156 priv->currentScreen);
157157 }
158158
194194
195195 if (screenToSet == -1)
196196 {
197 DBG(3, priv->debugLevel, "xf86WcmSetScreen Error: "
197 DBG(3, priv->debugLevel, "Error: "
198198 "Can not find valid screen (currentScreen=%d)\n",
199199 priv->currentScreen);
200200 return;
210210 y = screenInfo.screens[screenToSet]->height - 1;
211211
212212 xf86XInputSetScreen(local, screenToSet, x, y);
213 DBG(10, priv->debugLevel, "xf86WcmSetScreen current=%d ToSet=%d\n",
213 DBG(10, priv->debugLevel, "current=%d ToSet=%d\n",
214214 priv->currentScreen, screenToSet);
215215 priv->currentScreen = screenToSet;
216216}
227227 int button, mask;
228228 WacomDevicePtr priv = (WacomDevicePtr) local->private;
229229 WacomCommonPtr common = priv->common;
230 DBG(6, priv->debugLevel, "xf86WcmSendButtons "
231 "buttons=%d for %s\n", buttons, local->name);
230 DBG(6, priv->debugLevel, "buttons=%d for %s\n", buttons, local->name);
232231
233232 /* Tablet PC buttons only apply to penabled devices */
234233 if (common->wcmTPCButton && (priv->flags & STYLUS_ID))
460460 if (!priv->button[button]) /* ignore this button event */
461461 return;
462462
463 DBG(4, priv->debugLevel, "sendAButton TPCButton(%s) button=%d state=%d "
463 DBG(4, priv->debugLevel, "TPCButton(%s) button=%d state=%d "
464464 "code=%08x, for %s coreEvent=%s \n",
465465 common->wcmTPCButton ? "on" : "off",
466466 button, mask, priv->button[button],
577577 unsigned *keyP = 0;
578578 int is_absolute = priv->flags & ABSOLUTE_FLAG;
579579
580 DBG(10, priv->debugLevel, "sendWheelStripEvents for %s \n", local->name);
580 DBG(10, priv->debugLevel, "strip events for %s \n", local->name);
581581
582582 /* emulate events for relative wheel */
583583 if ( ds->relwheel )
667667
668668 if (!fakeButton) return;
669669
670 DBG(10, priv->debugLevel, "sendWheelStripEvents "
671 "send fakeButton %x with value = %d \n",
670 DBG(10, priv->debugLevel, "send fakeButton %x with value = %d \n",
672671 fakeButton, value);
673672
674673 switch (fakeButton & AC_TYPE)
10661066 dsNew->y = dsOrig->y;
10671067 }
10681068
1069 DBG(10, common->debugLevel, "xf86WcmSuppress at level = %d"
1069 DBG(10, common->debugLevel, "level = %d"
10701070 " return value = %d\n", suppress, returnV);
10711071 return returnV;
10721072}
11011101 pChannel = common->wcmChannel + channel;
11021102 pLast = &pChannel->valid.state;
11031103
1104 DBG(10, common->debugLevel, "wcmEvent at channel = %d\n", channel);
1104 DBG(10, common->debugLevel, "channel = %d\n", channel);
11051105
11061106 /* sanity check the channel */
11071107 if (channel >= MAX_CHANNELS)
11131113
11141114 /* timestamp the state for velocity and acceleration analysis */
11151115 ds.sample = (int)GetTimeInMillis();
1116 DBG(10, common->debugLevel, "wcmEvent: "
1116 DBG(10, common->debugLevel,
11171117 "c=%d i=%d t=%d s=%u x=%d y=%d b=%d "
11181118 "p=%d rz=%d tx=%d ty=%d aw=%d rw=%d "
11191119 "t=%d df=%d px=%d st=%d cs=%d \n",
13351335 }
13361336 }
13371337
1338 DBG(10, common->debugLevel, "commonDispatchDevice device type = %d\n", ds->device_type);
1338 DBG(10, common->debugLevel, "device type = %d\n", ds->device_type);
13391339 /* Find the device the current events are meant for */
13401340 /* 1: Find the tool (the one with correct serial or in second
13411341 * hand, the one with serial set to 0 if no match with the
18021802 priv->screenBottomY[1] = priv->tvResolution[1];
18031803 }
18041804
1805 DBG(10, priv->debugLevel, "xf86WcmInitialTVScreens for \"%s\" "
1805 DBG(10, priv->debugLevel, "\"%s\":"
18061806 "topX0=%d topY0=%d bottomX0=%d bottomY0=%d "
18071807 "topX1=%d topY1=%d bottomX1=%d bottomY1=%d \n",
18081808 local->name, priv->screenTopX[0], priv->screenTopY[0],
18201820 WacomDevicePtr priv = (WacomDevicePtr)local->private;
18211821 int i;
18221822
1823 DBG(2, priv->debugLevel, "xf86WcmInitialScreens for \"%s\" "
1823 DBG(2, priv->debugLevel, "\"%s\":"
18241824 "number of screen=%d \n", local->name, screenInfo.numScreens);
18251825 priv->tvoffsetX = 0;
18261826 priv->tvoffsetY = 0;
18451845 priv->screenBottomX[i] = dixScreenOrigins[i].x;
18461846 priv->screenBottomY[i] = dixScreenOrigins[i].y;
18471847
1848 DBG(10, priv->debugLevel, "xf86WcmInitialScreens from dix for \"%s\" "
1848 DBG(10, priv->debugLevel, "from dix for \"%s\" "
18491849 "ScreenOrigins[%d].x=%d ScreenOrigins[%d].y=%d \n",
18501850 local->name, i, priv->screenTopX[i], i,
18511851 priv->screenTopY[i]);
18541854 priv->screenBottomX[i] += screenInfo.screens[i]->width;
18551855 priv->screenBottomY[i] += screenInfo.screens[i]->height;
18561856
1857 DBG(10, priv->debugLevel, "xf86WcmInitialScreens for \"%s\" "
1857 DBG(10, priv->debugLevel, "\"%s\":"
18581858 "topX[%d]=%d topY[%d]=%d bottomX[%d]=%d bottomY[%d]=%d \n",
18591859 local->name, i, priv->screenTopX[i], i, priv->screenTopY[i],
18601860 i, priv->screenBottomX[i], i, priv->screenBottomY[i]);
18711871 WacomToolAreaPtr area = priv->toolarea;
18721872 int tmpTopX, tmpTopY, tmpBottomX, tmpBottomY, oldMaxX, oldMaxY;
18731873
1874 DBG(10, priv->debugLevel, "rotateOneTool for \"%s\" \n", priv->local->name);
1874 DBG(10, priv->debugLevel, "\"%s\"", priv->local->name);
18751875
18761876 if (!IsTouch(priv))
18771877 {
19481948 int oldRotation;
19491949 int tmpTopX, tmpTopY, tmpBottomX, tmpBottomY, oldMaxX, oldMaxY;
19501950
1951 DBG(10, priv->debugLevel, "xf86WcmRotateTablet for \"%s\" \n", local->name);
1951 DBG(10, priv->debugLevel, "\"%s\":\n", local->name);
19521952
19531953 if (common->wcmRotate == value) /* initialization */
19541954 {
  
229229 WacomDevicePtr dev;
230230 WacomDevicePtr *prev;
231231
232 DBG(1, priv->debugLevel, "xf86WcmUninit\n");
232 DBG(1, priv->debugLevel, "\n");
233233
234234 if (priv->isParent)
235235 {
290290 !strcmp(privMatch->common->wcmDevice, common->wcmDevice))
291291 {
292292 DBG(2, priv->debugLevel,
293 "xf86WcmInit wacom port share between"
293 "port share between"
294294 " %s and %s\n", pLocal->name, pMatch->name);
295295 type = xf86FindOptionValue(pMatch->options, "Type");
296296 if ( type && (strstr(type, "eraser")) )
  
248248 WacomDeviceState *pLast;
249249 int *x, *y, i;
250250
251 DBG(10, common->debugLevel, "wcmFilterCoord with "
251 DBG(10, common->debugLevel,
252252 "common->wcmRawSample = %d \n", common->wcmRawSample);
253253 x = pChannel->rawFilter.x;
254254 y = pChannel->rawFilter.y;
  
281281 if (!common->wcmMaxX || !common->wcmMaxY)
282282 common->tablet_id = 0xE2;
283283
284 DBG(2, priv->debugLevel, "isdv4GetRanges Pen speed=%d "
284 DBG(2, priv->debugLevel, "Pen speed=%d "
285285 "maxX=%d maxY=%d maxZ=%d resX=%d resY=%d \n",
286286 common->wcmISDV4Speed, common->wcmMaxX, common->wcmMaxY,
287287 common->wcmMaxZ, common->wcmResolX, common->wcmResolY);
367367 common->wcmVersion = ( data[10] | (data[9] << 7) );
368368 ret = Success;
369369
370 DBG(2, priv->debugLevel, "isdv4GetRanges touch speed=%d "
370 DBG(2, priv->debugLevel, "touch speed=%d "
371371 "maxTouchX=%d maxTouchY=%d TouchresX=%d TouchresY=%d \n",
372372 common->wcmISDV4Speed, common->wcmMaxTouchX,
373373 common->wcmMaxTouchY, common->wcmTouchResolX,
401401 WacomDeviceState* ds;
402402 int n, cur_type, channel = 0;
403403
404 DBG(10, common->debugLevel, "isdv4Parse \n");
404 DBG(10, common->debugLevel, "\n");
405405
406406 /* determine the type of message (touch or stylus) */
407407 if (data[0] & 0x10) /* a touch data */
484484 }
485485 }
486486
487 DBG(8, priv->debugLevel, "isdv4Parse MultiTouch "
487 DBG(8, priv->debugLevel, "MultiTouch "
488488 "%s proximity \n", ds->proximity ? "in" : "out of");
489489 }
490490 else
536536 ds->device_id = ERASER_DEVICE_ID;
537537 }
538538
539 DBG(8, priv->debugLevel, "isdv4Parse %s\n",
539 DBG(8, priv->debugLevel, "%s\n",
540540 ds->device_type == ERASER_ID ? "ERASER " :
541541 ds->device_type == STYLUS_ID ? "STYLUS" : "NONE");
542542 }
  
129129 secondChannel->valid.states[1] };
130130 int direction = 0;
131131
132 DBG(10, priv->debugLevel, "xf86WcmFingerTapToClick \n");
132 DBG(10, priv->debugLevel, "\n");
133133
134134 /* skip initial second finger event */
135135 if (!dsLast[1].proximity)
316316 int gesture = 0;
317317 WacomFilterState filterd; /* borrow this struct */
318318
319 DBG(10, priv->debugLevel, "xf86WcmFingerScroll \n");
319 DBG(10, priv->debugLevel, "\n");
320320
321321 /* initialize the points so we can rotate them */
322322 filterd.x[0] = ds[0].x;
391391 int dist = touchDistance(common->wcmGestureState[0],
392392 common->wcmGestureState[1]);
393393
394 DBG(10, priv->debugLevel, "xf86WcmFingerZoom \n");
394 DBG(10, priv->debugLevel, "\n");
395395
396396 dist = touchDistance(ds[0], ds[1]) - dist;
397397
src/wcmUSB.c
(10 / 10)
  
372372#ifdef DEBUG
373373 WacomDevicePtr priv = (WacomDevicePtr)local->private;
374374
375 DBG(1, priv->debugLevel, "usbDetect\n");
375 DBG(1, priv->debugLevel, "\n");
376376#endif
377377
378378 SYSCALL(err = ioctl(local->fd, EVIOCGVERSION, &version));
722722 WacomDevicePtr priv = (WacomDevicePtr)local->private;
723723 WacomCommonPtr common = priv->common;
724724
725 DBG(10, common->debugLevel, "usbDetectConfig \n");
725 DBG(10, common->debugLevel, "\n");
726726 if (IsPad (priv))
727727 priv->nbuttons = common->npadkeys;
728728 else
813813 wcmEvent(common, i, &common->wcmChannel[i].work);
814814 }
815815 }
816 DBG(1, common->debugLevel, "usbParse (device with serial number: %u)"
816 DBG(1, common->debugLevel, "device with serial number: %u"
817817 " at %d: Exceeded channel count; ignoring the events.\n",
818818 serial, (int)GetTimeInMillis());
819819 }
830830 WacomDevicePtr priv = (WacomDevicePtr)local->private;
831831 WacomCommonPtr common = priv->common;
832832
833 DBG(10, common->debugLevel, "usbParseEvent \n");
833 DBG(10, common->debugLevel, "\n");
834834 /* store events until we receive the MSC_SERIAL containing
835835 * the serial number; without it we cannot determine the
836836 * correct channel. */
890890 /* ignore events without information */
891891 if (common->wcmEventCnt <= 2)
892892 {
893 DBG(3, common->debugLevel, "%s - usbParse: dropping empty event"
893 DBG(3, common->debugLevel, "%s: dropping empty event"
894894 " for serial %d\n", local->name, common->wcmLastToolSerial);
895895 goto skipEvent;
896896 }
923923 WacomDevicePtr priv = (WacomDevicePtr)local->private;
924924 WacomCommonPtr common = priv->common;
925925
926 DBG(6, common->debugLevel, "usbParseChannel %d events received\n", common->wcmEventCnt);
926 DBG(6, common->debugLevel, "%d events received\n", common->wcmEventCnt);
927927 #define MOD_BUTTONS(bit, value) do { \
928928 shift = 1<<bit; \
929929 ds->buttons = (((value) != 0) ? \
931931 } while (0)
932932
933933 if (common->wcmEventCnt == 1 && !common->wcmEvents->type) {
934 DBG(6, common->debugLevel, "usbParseChannel no real events received\n");
934 DBG(6, common->debugLevel, "no real events received\n");
935935 return;
936936 }
937 DBG(6, common->debugLevel, "usbParseChannel %d events received\n", common->wcmEventCnt);
937 DBG(6, common->debugLevel, "%d events received\n", common->wcmEventCnt);
938938
939939 /* all USB data operates from previous context except relative values*/
940940 ds = &common->wcmChannel[channel].work;
945945 for (i=0; i<common->wcmEventCnt; ++i)
946946 {
947947 event = common->wcmEvents + i;
948 DBG(11, common->debugLevel, "usbParseChannel "
948 DBG(11, common->debugLevel,
949949 "event[%d]->type=%d code=%d value=%d\n",
950950 i, event->type, event->code, event->value);
951951
11151115 if (((common->tablet_id == 0xC0) || (common->tablet_id == 0xC2)) &&
11161116 (ds->device_type == ERASER_ID))
11171117 {
1118 DBG(10, common->debugLevel, "usbParseChannel "
1118 DBG(10, common->debugLevel,
11191119 "DTF 720 doesn't support eraser ");
11201120 return;
11211121 }
  
5050 /* Pad is always in relative mode when it's a core device.
5151 * Always in absolute mode when it is not a core device.
5252 */
53 DBG(10, priv->debugLevel, "xf86WcmSetPadCoreMode (%p)"
53 DBG(10, priv->debugLevel, "%p"
5454 " is always in %s mode when it %s core device\n",
5555 (void *)local->dev,
5656 !is_core ? "absolute" : "relative",
7171 WacomDevicePtr priv = (WacomDevicePtr)local->private;
7272 int is_absolute = priv->flags & ABSOLUTE_FLAG;
7373
74 DBG(3, priv->debugLevel, "xf86WcmSwitchModeCall for %s to mode=%d\n",
74 DBG(3, priv->debugLevel, "%s to mode=%d\n",
7575 local->name, mode);
7676
7777 /* Pad is always in relative mode when it's a core device.
9696 }
9797 else if ( (mode != Absolute) && (mode != Relative))
9898 {
99 DBG(10, priv->debugLevel, "xf86WcmSwitchModeCall"
100 " for %s invalid mode=%d\n", local->name, mode);
99 DBG(10, priv->debugLevel,
100 "%s invalid mode=%d\n", local->name, mode);
101101 return BadMatch;
102102 }
103103
114114#ifdef DEBUG
115115 WacomDevicePtr priv = (WacomDevicePtr)local->private;
116116
117 DBG(3, priv->debugLevel, "xf86WcmSwitchMode dev=%p mode=%d\n",
117 DBG(3, priv->debugLevel, "dev=%p mode=%d\n",
118118 (void *)dev, mode);
119119#endif
120120 /* Share this call with sendAButton in wcmCommon.c */
211211 WacomCommonPtr common = priv->common;
212212 int values[WCM_MAX_MOUSE_BUTTONS];
213213
214 DBG(10, priv->debugLevel, "InitWcmDeviceProperties for %s \n", local->name);
214 DBG(10, priv->debugLevel, "%s\n", local->name);
215215
216216 values[0] = priv->topX;
217217 values[1] = priv->topY;
299299 WacomDevicePtr priv = (WacomDevicePtr) local->private;
300300 WacomCommonPtr common = priv->common;
301301
302 DBG(10, priv->debugLevel, "xf86WcmSetProperty for %s \n", local->name);
302 DBG(10, priv->debugLevel, "%s\n", local->name);
303303
304304 if (property == prop_tablet_area)
305305 {
497497 {
498498 screen = -1;
499499 priv->currentScreen = 0;
500 DBG(10, priv->debugLevel, "xf86WcmSetProperty TwinView sets to "
500 DBG(10, priv->debugLevel, "TwinView sets to "
501501 "TV_NONE: can't change screen_no. \n");
502502 }
503503 xf86WcmChangeScreen(local, screen);
  
148148 double screenRatio, tabletRatio;
149149 int bottomx = common->wcmMaxX, bottomy = common->wcmMaxY;
150150
151 DBG(10, priv->debugLevel, "xf86WcmInitArea\n");
151 DBG(10, priv->debugLevel, "\n");
152152
153153 if (IsTouch(priv))
154154 {
296296 priv->topPadding = (int)((double)(priv->screenTopY[i] * priv->topPadding)
297297 / ((double)(priv->screenBottomY[i] - priv->screenTopY[i])) + 0.5);
298298 }
299 DBG(10, priv->debugLevel, "xf86WcmVirtualTabletPadding for \"%s\" "
299 DBG(10, priv->debugLevel, "\"%s\" "
300300 "x=%d y=%d \n", local->name, priv->leftPadding, priv->topPadding);
301301 return;
302302}
336336 priv->sizeY += (int)((double)((priv->maxHeight - priv->screenBottomY[i])
337337 * tabletSize) / ((double)(priv->screenBottomY[i] - priv->screenTopY[i])) + 0.5);
338338 }
339 DBG(10, priv->debugLevel, "xf86WcmVirtualTabletSize for \"%s\" "
339 DBG(10, priv->debugLevel, "\"%s\" "
340340 "x=%d y=%d \n", local->name, priv->sizeX, priv->sizeY);
341341 return;
342342}
656656 * This is only a workaround.
657657 */
658658
659 DBG(10, priv->debugLevel, "xf86WcmRegisterX11Devices "
659 DBG(10, priv->debugLevel,
660660 "(%s) %d buttons, %d keys, %d axes\n",
661661 IsStylus(priv) ? "stylus" :
662662 IsCursor(priv) ? "cursor" :
10351035 WacomCommonPtr common = priv->common;
10361036 struct stat st;
10371037
1038 DBG(10, priv->debugLevel, "xf86WcmDevOpen\n");
1038 DBG(10, priv->debugLevel, "\n");
10391039
10401040 /* Device has been open and not autoprobed */
10411041 if (priv->wcmDevOpenCount)
10981098 WacomDevicePtr priv = (WacomDevicePtr)local->private;
10991099#endif
11001100 int n = xf86WaitForInput(local->fd, 0);
1101 DBG(10, priv->debugLevel, "xf86WcmReady for %s with %d numbers of data\n", local->name, n);
1101 DBG(10, priv->debugLevel, "%s with %d numbers of data\n", local->name, n);
11021102
11031103 if (n >= 0) return n ? 1 : 0;
11041104 xf86Msg(X_ERROR, "%s: select error: %s\n", local->name, strerror(errno));
11301130
11311131 /* report how well we're doing */
11321132 if (loop >= MAX_READ_LOOPS)
1133 DBG(1, priv->debugLevel, "xf86WcmDevReadInput: Can't keep up!!!\n");
1133 DBG(1, priv->debugLevel, "Can't keep up!!!\n");
11341134 else if (loop > 0)
1135 DBG(10, priv->debugLevel, "xf86WcmDevReadInput: Read (%d)\n",loop);
1135 DBG(10, priv->debugLevel, "Read (%d)\n",loop);
11361136}
11371137
11381138void wcmReadPacket(LocalDevicePtr local)
11421142 int len, pos, cnt, remaining;
11431143 unsigned char * data;
11441144
1145 DBG(10, common->debugLevel, "wcmReadPacket: device=%s"
1145 DBG(10, common->debugLevel, "device=%s"
11461146 " fd=%d \n", common->wcmDevice, local->fd);
11471147
11481148 remaining = sizeof(common->buffer) - common->bufpos;
11491149
1150 DBG(1, common->debugLevel, "wcmReadPacket: pos=%d"
1150 DBG(1, common->debugLevel, "pos=%d"
11511151 " remaining=%d\n", common->bufpos, remaining);
11521152
11531153 /* fill buffer with as much data as we can handle */
11711171
11721172 /* account for new data */
11731173 common->bufpos += len;
1174 DBG(10, common->debugLevel, "wcmReadPacket buffer has %d bytes\n",
1174 DBG(10, common->debugLevel, "buffer has %d bytes\n",
11751175 common->bufpos);
11761176
11771177 pos = 0;
12321232{
12331233#ifdef DEBUG
12341234 WacomDevicePtr priv = (WacomDevicePtr)local->private;
1235 DBG(3, priv->debugLevel, "xf86WcmDevChangeControl called\n");
1235 DBG(3, priv->debugLevel, "\n");
12361236#endif
12371237 return Success;
12381238}
12471247 LocalDevicePtr local = (LocalDevicePtr)device->public.devicePrivate;
12481248 WacomDevicePtr priv = (WacomDevicePtr)local->private;
12491249
1250 DBG(4, priv->debugLevel, "Wacom Dev Control Proc called\n");
1250 DBG(4, priv->debugLevel, "called\n");
12511251#endif
12521252 return;
12531253}
12841284 LocalDevicePtr local = (LocalDevicePtr)pWcm->public.devicePrivate;
12851285 WacomDevicePtr priv = (WacomDevicePtr)local->private;
12861286
1287 DBG(2, priv->debugLevel, "BEGIN xf86WcmProc dev=%p priv=%p "
1287 DBG(2, priv->debugLevel, "BEGIN dev=%p priv=%p "
12881288 "type=%s(%s) flags=%d fd=%d what=%s\n",
12891289 (void *)pWcm, (void *)priv,
12901290 IsStylus(priv) ? "stylus" :
13061306 priv->wcmInitKeyClassCount = 0;
13071307 if (!xf86WcmDevOpen(pWcm))
13081308 {
1309 DBG(1, priv->debugLevel, "xf86WcmProc INIT FAILED\n");
1309 DBG(1, priv->debugLevel, "INIT FAILED\n");
13101310 return !Success;
13111311 }
13121312 priv->wcmInitKeyClassCount++;
13161316 case DEVICE_ON:
13171317 if (!xf86WcmDevOpen(pWcm))
13181318 {
1319 DBG(1, priv->debugLevel, "xf86WcmProc ON FAILED\n");
1319 DBG(1, priv->debugLevel, "ON FAILED\n");
13201320 return !Success;
13211321 }
13221322 priv->wcmDevOpenCount++;
13411341 break;
13421342 } /* end switch */
13431343
1344 DBG(2, priv->debugLevel, "END xf86WcmProc Success \n");
1344 DBG(2, priv->debugLevel, "END Success \n");
13451345 return Success;
13461346}
13471347
13561356{
13571357 WacomDevicePtr priv = (WacomDevicePtr) local->private;
13581358
1359 DBG(6, priv->debugLevel, "xf86WcmDevConvert v0=%d v1=%d on screen %d \n",
1359 DBG(6, priv->debugLevel, "v0=%d v1=%d on screen %d \n",
13601360 v0, v1, priv->currentScreen);
13611361
13621362 if (first != 0 || num == 1)
13921392 if (*y < 0) *y = 0;
13931393
13941394 }
1395 DBG(6, priv->debugLevel, "xf86WcmDevConvert v0=%d v1=%d to x=%d y=%d\n", v0, v1, *x, *y);
1395 DBG(6, priv->debugLevel, "v0=%d v1=%d to x=%d y=%d\n", v0, v1, *x, *y);
13961396 return TRUE;
13971397}
13981398
14091409 WacomDevicePtr priv = (WacomDevicePtr) local->private;
14101410 int i = 0;
14111411
1412 DBG(6, priv->debugLevel, "xf86WcmDevReverseConvert x=%d y=%d \n", x, y);
1412 DBG(6, priv->debugLevel, "x=%d y=%d \n", x, y);
14131413 priv->currentSX = x;
14141414 priv->currentSY = y;
14151415
  
7676#if DEBUG
7777#define DBG(lvl, dLevel, ...) \
7878 do { \
79 if ((lvl) <= dLevel) \
80 xf86Msg(X_INFO, __VA_ARGS__); \
79 if ((lvl) <= dLevel) { \
80 xf86Msg(X_INFO, "%s: ", __func__); \
81 xf86Msg(X_NONE, __VA_ARGS__); \
82 } \
8183 } while (0)
8284#else
8385#define DBG(lvl, dLevel, ...)