summaryrefslogtreecommitdiff
path: root/src/xf86Wacom.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xf86Wacom.c')
-rw-r--r--src/xf86Wacom.c84
1 files changed, 42 insertions, 42 deletions
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index 3e5d33b..d91376d 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -148,7 +148,7 @@ static int xf86WcmInitArea(LocalDevicePtr local)
double screenRatio, tabletRatio;
int bottomx = common->wcmMaxX, bottomy = common->wcmMaxY;
- DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmInitArea\n"));
+ DBG(10, priv->debugLevel, "xf86WcmInitArea\n");
if (IsTouch(priv))
{
@@ -208,8 +208,8 @@ static int xf86WcmInitArea(LocalDevicePtr local)
tabletRatio = ((double)(bottomx - priv->topX) /
(double)(bottomy - priv->topY));
- DBG(2, priv->debugLevel, xf86Msg(X_INFO, "screenRatio = %.3g, "
- "tabletRatio = %.3g\n", screenRatio, tabletRatio));
+ DBG(2, priv->debugLevel, "screenRatio = %.3g, "
+ "tabletRatio = %.3g\n", screenRatio, tabletRatio);
if (screenRatio > tabletRatio)
{
@@ -296,8 +296,8 @@ void xf86WcmVirtualTabletPadding(LocalDevicePtr local)
priv->topPadding = (int)((double)(priv->screenTopY[i] * priv->topPadding)
/ ((double)(priv->screenBottomY[i] - priv->screenTopY[i])) + 0.5);
}
- DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmVirtualTabletPadding for \"%s\" "
- "x=%d y=%d \n", local->name, priv->leftPadding, priv->topPadding));
+ DBG(10, priv->debugLevel, "xf86WcmVirtualTabletPadding for \"%s\" "
+ "x=%d y=%d \n", local->name, priv->leftPadding, priv->topPadding);
return;
}
@@ -336,8 +336,8 @@ void xf86WcmVirtualTabletSize(LocalDevicePtr local)
priv->sizeY += (int)((double)((priv->maxHeight - priv->screenBottomY[i])
* tabletSize) / ((double)(priv->screenBottomY[i] - priv->screenTopY[i])) + 0.5);
}
- DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmVirtualTabletSize for \"%s\" "
- "x=%d y=%d \n", local->name, priv->sizeX, priv->sizeY));
+ DBG(10, priv->debugLevel, "xf86WcmVirtualTabletSize for \"%s\" "
+ "x=%d y=%d \n", local->name, priv->sizeX, priv->sizeY);
return;
}
@@ -656,12 +656,12 @@ static int xf86WcmRegisterX11Devices (LocalDevicePtr local)
* This is only a workaround.
*/
- DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmRegisterX11Devices "
+ DBG(10, priv->debugLevel, "xf86WcmRegisterX11Devices "
"(%s) %d buttons, %d keys, %d axes\n",
IsStylus(priv) ? "stylus" :
IsCursor(priv) ? "cursor" :
IsPad(priv) ? "pad" : "eraser",
- nbbuttons, nbkeys, nbaxes));
+ nbbuttons, nbkeys, nbaxes);
for(loop=1; loop<=nbbuttons; loop++)
butmap[loop] = loop;
@@ -976,7 +976,7 @@ static Bool xf86WcmOpen(LocalDevicePtr local)
int rc;
struct serial_struct ser;
- DBG(1, priv->debugLevel, xf86Msg(X_INFO, "opening %s\n", common->wcmDevice));
+ DBG(1, priv->debugLevel, "opening %s\n", common->wcmDevice);
local->fd = xf86OpenSerial(local->options);
if (local->fd < 0)
@@ -1035,7 +1035,7 @@ static int xf86WcmDevOpen(DeviceIntPtr pWcm)
WacomCommonPtr common = priv->common;
struct stat st;
- DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevOpen\n"));
+ DBG(10, priv->debugLevel, "xf86WcmDevOpen\n");
/* Device has been open and not autoprobed */
if (priv->wcmDevOpenCount)
@@ -1052,11 +1052,11 @@ static int xf86WcmDevOpen(DeviceIntPtr pWcm)
if ((xf86WcmOpen (local) != Success) || (local->fd < 0) ||
!common->wcmDevice)
{
- DBG(1, priv->debugLevel, xf86Msg(X_INFO, "Failed to open "
- "device (fd=%d)\n", local->fd));
+ DBG(1, priv->debugLevel, "Failed to open "
+ "device (fd=%d)\n", local->fd);
if (local->fd >= 0)
{
- DBG(1, priv->debugLevel, xf86Msg(X_INFO, "Closing device\n"));
+ DBG(1, priv->debugLevel, "Closing device\n");
xf86CloseSerial(local->fd);
}
local->fd = -1;
@@ -1066,8 +1066,8 @@ static int xf86WcmDevOpen(DeviceIntPtr pWcm)
if (fstat(local->fd, &st) == -1)
{
/* can not access major/minor */
- DBG(1, priv->debugLevel, xf86Msg(X_ERROR, "%s: stat failed (%s). "
- "cannot check status.\n", local->name, strerror(errno)));
+ DBG(1, priv->debugLevel, "%s: stat failed (%s). "
+ "cannot check status.\n", local->name, strerror(errno));
/* older systems don't support the required ioctl.
* So, we have to let it pass */
@@ -1098,7 +1098,7 @@ static int xf86WcmReady(LocalDevicePtr local)
WacomDevicePtr priv = (WacomDevicePtr)local->private;
#endif
int n = xf86WaitForInput(local->fd, 0);
- DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmReady for %s with %d numbers of data\n", local->name, n));
+ DBG(10, priv->debugLevel, "xf86WcmReady for %s with %d numbers of data\n", local->name, n);
if (n >= 0) return n ? 1 : 0;
xf86Msg(X_ERROR, "%s: select error: %s\n", local->name, strerror(errno));
@@ -1130,9 +1130,9 @@ static void xf86WcmDevReadInput(LocalDevicePtr local)
/* report how well we're doing */
if (loop >= MAX_READ_LOOPS)
- DBG(1, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevReadInput: Can't keep up!!!\n"));
+ DBG(1, priv->debugLevel, "xf86WcmDevReadInput: Can't keep up!!!\n");
else if (loop > 0)
- DBG(10, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevReadInput: Read (%d)\n",loop));
+ DBG(10, priv->debugLevel, "xf86WcmDevReadInput: Read (%d)\n",loop);
}
void wcmReadPacket(LocalDevicePtr local)
@@ -1142,13 +1142,13 @@ void wcmReadPacket(LocalDevicePtr local)
int len, pos, cnt, remaining;
unsigned char * data;
- DBG(10, common->debugLevel, xf86Msg(X_INFO, "wcmReadPacket: device=%s"
- " fd=%d \n", common->wcmDevice, local->fd));
+ DBG(10, common->debugLevel, "wcmReadPacket: device=%s"
+ " fd=%d \n", common->wcmDevice, local->fd);
remaining = sizeof(common->buffer) - common->bufpos;
- DBG(1, common->debugLevel, xf86Msg(X_INFO, "wcmReadPacket: pos=%d"
- " remaining=%d\n", common->bufpos, remaining));
+ DBG(1, common->debugLevel, "wcmReadPacket: pos=%d"
+ " remaining=%d\n", common->bufpos, remaining);
/* fill buffer with as much data as we can handle */
len = xf86ReadSerial(local->fd,
@@ -1171,8 +1171,8 @@ void wcmReadPacket(LocalDevicePtr local)
/* account for new data */
common->bufpos += len;
- DBG(10, common->debugLevel, xf86Msg(X_INFO, "wcmReadPacket buffer has %d bytes\n",
- common->bufpos));
+ DBG(10, common->debugLevel, "wcmReadPacket buffer has %d bytes\n",
+ common->bufpos);
pos = 0;
@@ -1203,7 +1203,7 @@ void wcmReadPacket(LocalDevicePtr local)
cnt = common->wcmModel->Parse(local, common->buffer + pos);
if (cnt <= 0)
{
- DBG(1, common->debugLevel, xf86Msg(X_INFO, "Misbehaving parser returned %d\n",cnt));
+ DBG(1, common->debugLevel, "Misbehaving parser returned %d\n",cnt);
break;
}
pos += cnt;
@@ -1214,7 +1214,7 @@ void wcmReadPacket(LocalDevicePtr local)
/* if half a packet remains, move it down */
if (pos < common->bufpos)
{
- DBG(7, common->debugLevel, xf86Msg(X_INFO, "MOVE %d bytes\n", common->bufpos - pos));
+ DBG(7, common->debugLevel, "MOVE %d bytes\n", common->bufpos - pos);
memmove(common->buffer,common->buffer+pos,
common->bufpos-pos);
common->bufpos -= pos;
@@ -1232,7 +1232,7 @@ int xf86WcmDevChangeControl(LocalDevicePtr local, xDeviceCtl * control)
{
#ifdef DEBUG
WacomDevicePtr priv = (WacomDevicePtr)local->private;
- DBG(3, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevChangeControl called\n"));
+ DBG(3, priv->debugLevel, "xf86WcmDevChangeControl called\n");
#endif
return Success;
}
@@ -1247,7 +1247,7 @@ static void xf86WcmDevControlProc(DeviceIntPtr device, PtrCtrl* ctrl)
LocalDevicePtr local = (LocalDevicePtr)device->public.devicePrivate;
WacomDevicePtr priv = (WacomDevicePtr)local->private;
- DBG(4, priv->debugLevel, xf86Msg(X_INFO, "Wacom Dev Control Proc called\n"));
+ DBG(4, priv->debugLevel, "Wacom Dev Control Proc called\n");
#endif
return;
}
@@ -1261,14 +1261,14 @@ static void xf86WcmDevClose(LocalDevicePtr local)
WacomDevicePtr priv = (WacomDevicePtr)local->private;
WacomCommonPtr common = priv->common;
- DBG(4, priv->debugLevel, xf86Msg(X_INFO, "Wacom number of open devices = %d\n", common->fd_refs));
+ DBG(4, priv->debugLevel, "Wacom number of open devices = %d\n", common->fd_refs);
if (local->fd >= 0)
{
local->fd = -1;
if (!--common->fd_refs)
{
- DBG(1, common->debugLevel, xf86Msg(X_INFO, "Closing device; uninitializing.\n"));
+ DBG(1, common->debugLevel, "Closing device; uninitializing.\n");
xf86CloseSerial (common->fd);
}
}
@@ -1284,7 +1284,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
LocalDevicePtr local = (LocalDevicePtr)pWcm->public.devicePrivate;
WacomDevicePtr priv = (WacomDevicePtr)local->private;
- DBG(2, priv->debugLevel, xf86Msg(X_INFO, "BEGIN xf86WcmProc dev=%p priv=%p "
+ DBG(2, priv->debugLevel, "BEGIN xf86WcmProc dev=%p priv=%p "
"type=%s(%s) flags=%d fd=%d what=%s\n",
(void *)pWcm, (void *)priv,
IsStylus(priv) ? "stylus" :
@@ -1294,7 +1294,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
(what == DEVICE_INIT) ? "INIT" :
(what == DEVICE_OFF) ? "OFF" :
(what == DEVICE_ON) ? "ON" :
- (what == DEVICE_CLOSE) ? "CLOSE" : "???"));
+ (what == DEVICE_CLOSE) ? "CLOSE" : "???");
switch (what)
{
@@ -1306,7 +1306,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
priv->wcmInitKeyClassCount = 0;
if (!xf86WcmDevOpen(pWcm))
{
- DBG(1, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmProc INIT FAILED\n"));
+ DBG(1, priv->debugLevel, "xf86WcmProc INIT FAILED\n");
return !Success;
}
priv->wcmInitKeyClassCount++;
@@ -1316,7 +1316,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
case DEVICE_ON:
if (!xf86WcmDevOpen(pWcm))
{
- DBG(1, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmProc ON FAILED\n"));
+ DBG(1, priv->debugLevel, "xf86WcmProc ON FAILED\n");
return !Success;
}
priv->wcmDevOpenCount++;
@@ -1341,7 +1341,7 @@ static int xf86WcmDevProc(DeviceIntPtr pWcm, int what)
break;
} /* end switch */
- DBG(2, priv->debugLevel, xf86Msg(X_INFO, "END xf86WcmProc Success \n"));
+ DBG(2, priv->debugLevel, "END xf86WcmProc Success \n");
return Success;
}
@@ -1356,8 +1356,8 @@ static Bool xf86WcmDevConvert(LocalDevicePtr local, int first, int num,
{
WacomDevicePtr priv = (WacomDevicePtr) local->private;
- DBG(6, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevConvert v0=%d v1=%d on screen %d \n",
- v0, v1, priv->currentScreen));
+ DBG(6, priv->debugLevel, "xf86WcmDevConvert v0=%d v1=%d on screen %d \n",
+ v0, v1, priv->currentScreen);
if (first != 0 || num == 1)
return FALSE;
@@ -1392,7 +1392,7 @@ static Bool xf86WcmDevConvert(LocalDevicePtr local, int first, int num,
if (*y < 0) *y = 0;
}
- DBG(6, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevConvert v0=%d v1=%d to x=%d y=%d\n", v0, v1, *x, *y));
+ DBG(6, priv->debugLevel, "xf86WcmDevConvert v0=%d v1=%d to x=%d y=%d\n", v0, v1, *x, *y);
return TRUE;
}
@@ -1409,7 +1409,7 @@ static Bool xf86WcmDevReverseConvert(LocalDevicePtr local, int x, int y,
WacomDevicePtr priv = (WacomDevicePtr) local->private;
int i = 0;
- DBG(6, priv->debugLevel, xf86Msg(X_INFO, "xf86WcmDevReverseConvert x=%d y=%d \n", x, y));
+ DBG(6, priv->debugLevel, "xf86WcmDevReverseConvert x=%d y=%d \n", x, y);
priv->currentSX = x;
priv->currentSY = y;
@@ -1430,10 +1430,10 @@ static Bool xf86WcmDevReverseConvert(LocalDevicePtr local, int x, int y,
priv->devReverseCount = 0;
}
- DBG(6, priv->debugLevel, xf86Msg(X_INFO, "Wacom converted x=%d y=%d"
+ DBG(6, priv->debugLevel, "Wacom converted x=%d y=%d"
" to v0=%d v1=%d v2=%d v3=%d v4=%d v5=%d\n", x, y,
valuators[0], valuators[1], valuators[2],
- valuators[3], valuators[4], valuators[5]));
+ valuators[3], valuators[4], valuators[5]);
return TRUE;
}