Fix off-by-one error in xsetwacom's button handling

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Add support for the Intuos5

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Add support for the DTI-520

Signed-off-by: Adam Nielsen <a.nielsen@shikadi.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
wacom 0.14.99.1

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
wacom 0.15.0

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
conf: add Intuos4 WL (PTK-540WL) to fdi file

4709394d76267df05f8dfa7f13e6beb1f9c7394f added it to the xorg.conf.d
snippet. For those stuck on HAL add it to the fdi file too.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Przemo Firszt <przemo@firszt.eu>
Add 0xED and 0xEF

Signed-off-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Remove superflous casts in getScrollDelta

../src/wcmCommon.c: In function 'getScrollDelta':
../src/wcmCommon.c:333:13: warning: cast from function call of type 'double' to non-matching type 'int' [-Wbad-function-cast]
../src/wcmCommon.c:334:9: warning: cast from function call of type 'double' to non-matching type 'int' [-Wbad-function-cast]
../src/wcmCommon.c:335:10: warning: cast from function call of type 'double' to non-matching type 'int' [-Wbad-function-cast]

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Have wcmEventAutoDevProbe return const

../src/xf86Wacom.c: In function 'wcmEventAutoDevProbe':
../src/xf86Wacom.c:527:5: warning: return discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Change default_options to be const

../src/wcmConfig.c: At top level:
../src/wcmConfig.c:212:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:212:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:213:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:213:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:214:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:214:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:215:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:215:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:216:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:216:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:217:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmConfig.c:217:2: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Constify _WacomCommonRec.device_path

../src/wcmConfig.c: In function 'wcmPreInit':
../src/wcmConfig.c:507:26: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Remove superflous 'event' pointer in usbParseBTNEvent

../src/wcmUSB.c: In function 'usbInitToolType':
../src/wcmUSB.c:1378:30: warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual]

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Constify 'name' argument of InitWcmAtom

../src/wcmXCommand.c: In function 'InitWcmDeviceProperties':
../src/wcmXCommand.c:175:3: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:179:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:186:3: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:194:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:197:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:201:3: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:205:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:209:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:212:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:216:3: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:220:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:225:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:228:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:234:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:238:3: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:244:3: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:249:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'
../src/wcmXCommand.c:254:2: warning: passing argument 2 of 'InitWcmAtom' discards 'const' qualifier from pointer target type [enabled by default]
../src/wcmXCommand.c:121:13: note: expected 'char *' but argument is of type 'const char *'

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Swap empty strings for NULL in wcmCheckSource

Also cleans up variable scope.

../src/wcmValidateDevice.c: In function 'wcmCheckSource':
../src/wcmValidateDevice.c:37:2: warning: passing argument 3 of 'xf86CheckStrOption' discards 'const' qualifier from pointer target type [enabled by default]
In file included from /usr/include/xorg/xf86str.h:43:0,
                 from /usr/include/xorg/xf86.h:44,
                 from ../src/xf86Wacom.h:33,
                 from ../src/wcmValidateDevice.c:23:
/usr/include/xorg/xf86Opt.h:87:24: note: expected 'char *' but argument is of type 'const char *'
../src/wcmValidateDevice.c:52:4: warning: passing argument 3 of 'xf86CheckStrOption' discards 'const' qualifier from pointer target type [enabled by default]
In file included from /usr/include/xorg/xf86str.h:43:0,
                 from /usr/include/xorg/xf86.h:44,
                 from ../src/xf86Wacom.h:33,
                 from ../src/wcmValidateDevice.c:23:
/usr/include/xorg/xf86Opt.h:87:24: note: expected 'char *' but argument is of type 'const char *'

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Swap empty string for NULL in wcmIsDuplicate

../src/wcmValidateDevice.c: In function 'wcmIsDuplicate':
../src/wcmValidateDevice.c:85:2: warning: passing argument 3 of 'xf86CheckStrOption' discards 'const' qualifier from pointer target type [enabled by default]
In file included from /usr/include/xorg/xf86str.h:43:0,
                 from /usr/include/xorg/xf86.h:44,
                 from ../src/xf86Wacom.h:33,
                 from ../src/wcmValidateDevice.c:23:
/usr/include/xorg/xf86Opt.h:87:24: note: expected 'char *' but argument is of type 'const char *'

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Swap empty string for NULL in wcmNeedAutoHotplug

../src/wcmValidateDevice.c: In function 'wcmNeedAutoHotplug':
../src/wcmValidateDevice.c:574:2: warning: passing argument 3 of 'xf86CheckStrOption' discards 'const' qualifier from pointer target type [enabled by default]
In file included from /usr/include/xorg/xf86str.h:43:0,
                 from /usr/include/xorg/xf86.h:44,
                 from ../src/xf86Wacom.h:33,
                 from ../src/wcmValidateDevice.c:23:
/usr/include/xorg/xf86Opt.h:87:24: note: expected 'char *' but argument is of type 'const char *'

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Swap empty string for NULL in wcmIsAValidType

../src/wcmValidateDevice.c: In function 'wcmIsAValidType':
../src/wcmValidateDevice.c:139:2: warning: passing argument 3 of 'xf86CheckStrOption' discards 'const' qualifier from pointer target type [enabled by default]
In file included from /usr/include/xorg/xf86str.h:43:0,
                 from /usr/include/xorg/xf86.h:44,
                 from ../src/xf86Wacom.h:33,
                 from ../src/wcmValidateDevice.c:23:
/usr/include/xorg/xf86Opt.h:87:24: note: expected 'char *' but argument is of type 'const char *'

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Swap empty string for NULL in wcmIsHotpluggedDevice

../src/wcmConfig.c: In function 'wcmIsHotpluggedDevice':
../src/wcmConfig.c:442:2: warning: passing argument 3 of 'xf86CheckStrOption' discards 'const' qualifier from pointer target type
[enabled by default]
In file included from /usr/include/xorg/xf86str.h:43:0,
                 from /usr/include/xorg/xf86.h:44,
                 from ../src/xf86Wacom.h:33,
                 from ../src/wcmConfig.c:24:
/usr/include/xorg/xf86Opt.h:87:24: note: expected 'char *' but argument is of type 'const char *'

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Remove variable re-definition in wcmSerialValidate

../src/wcmISDV4.c: In function 'wcmSerialValidate':
../src/wcmISDV4.c:167:7: warning: declaration of 'n' shadows a previous local [-Wshadow]
../src/wcmISDV4.c:161:6: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix warning: Re-scope variable in wcmPreInitParseOptions

../src/wcmValidateDevice.c: In function 'wcmPreInitParseOptions':
../src/wcmValidateDevice.c:801:9: warning: declaration of 'b' shadows a previous local [-Wshadow]
../src/wcmValidateDevice.c:708:22: warning: shadowed declaration is here [-Wshadow]

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>