Fix build on ABI < 16 - touch_mask isn't defined

Fixes: http://sourceforge.net/p/linuxwacom/bugs/232

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
wacom 0.22.1

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Print list of supported models on wcmPlug

When the driver starts, print the list of supported models. This should
help with any questions like "does my driver support this or that model".

For those models that don't have a defined name, print "usb:1234:5678"
instead, so users can at least try to match the usb IDs.

Sample log output:
[ 25950.166] (II) wacom: Driver for Wacom graphics tablets: PenPartner, PenPartner,
        Graphire, Graphire2 4x5, Graphire2 5x7, Graphire3 4x5, Graphire3 6x8,
        Graphire4 4x5, Graphire4 6x8, BambooFun 4x5, BambooFun 6x8,
        Bamboo1 Medium, Graphire4 6x8 BlueTooth, CTL-460, CTH-461, CTL-660,
        CTL-461/S, Bamboo Touch, CTH-460/K, CTH-461/S, CTH-661/S1, CTH-461/L,
        CTH-661/L, Intuos 4x5, Intuos 6x8, Intuos 9x12, Intuos 12x12,
        Intuos 12x18, PTU600, PL400, PL500, PL600, PL600SX, PL550, PL800,
        PL700, PL510, PL710, DTI520, DTF720, DTF720a, DTF521, DTU1931,
        DTU2231, DTU1631, Intuos2 4x5, Intuos2 6x8, Intuos2 9x12,
        Intuos2 12x12, Intuos2 12x18, Intuos2 6x8 , Volito, PenStation,
        Volito2 4x5, Volito2 2x3, PenPartner2, Bamboo, Bamboo1, Bamboo1 4x6,
        Bamboo1 5x8, Intuos3 4x5, Intuos3 6x8, Intuos3 9x12, Intuos3 12x12,
        Intuos3 12x19, Intuos3 6x11, Intuos3 4x6, Intuos4 4x6, Intuos4 6x9,
        Intuos4 8x13, Intuos4 12x19, Intuos4 WL USB Endpoint,
        Intuos4 WL Bluetooth Endpoint, Intuos5 touch S, Intuos5 touch M,
        Intuos5 touch L, Intuos5 S, Intuos5 M, Cintiq 21UX, Cintiq 20WSX,
        Cintiq 12WX, Cintiq 21UX2, Cintiq 24HD, Cintiq 22HD,
        Cintiq 24HD touch (EMR digitizer), Cintiq 13HD, DTK2241, DTH2242,
        Cintiq 22HDT, TabletPC 0x90, TabletPC 0x93, TabletPC 0x97,
        TabletPC 0x9A, CapPlus  0x9F, TabletPC 0xE2, TabletPC 0xE3,
        TabletPC 0xE5, TabletPC 0xE6, TabletPC 0xEC, TabletPC 0xED,
        TabletPC 0xEF, TabletPC 0x100, TabletPC 0x101, TabletPC 0x10D,
        TabletPC 0x4001, usb:172f:0024, usb:172f:0025, usb:172f:0026,
        usb:172f:0027, usb:172f:0028, usb:172f:0030, usb:172f:0031,
        usb:172f:0032, usb:172f:0033, usb:172f:0034, usb:172f:0035,
        usb:172f:0036, usb:172f:0037, usb:172f:0038, usb:172f:0039,
        usb:172f:0051, usb:172f:0052, usb:172f:0053, usb:172f:0054,
        usb:172f:0055, usb:172f:0056, usb:172f:0057, usb:172f:0058,
        usb:172f:0500, usb:172f:0501, usb:172f:0502, usb:172f:0503,
        usb:1b96:0001, usb:17ef:6004
[ 25950.167] (II) Using input driver 'wacom' for 'Wacom Intuos4 6x9'

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pinglinux@gmail.com>
strdup the option key/values in our input_option_new

This is a interface for servers with ABI < 14 (up to server 1.11).
The server version of it strdups the values, so we must do the same.

Otherwise the values assigned to the InputOption list in
wcmOptionDupConvert are freed during xf86OptionListFree().

That later causes a SIGABORT when NewInputDeviceRequest starts using
those options.

https://sourceforge.net/p/linuxwacom/bugs/233/

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pinglinux@gmail.com>
Add support for Intuos Pro series

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Fix buffer overflows in 'special_map_*'

Each of the 'special_map_*' functions is given free reign to write
to the end of a buffer, but is never given the size of the buffer
itself. It is trivial to trigger an overflow simply by feeding the
program more actions to perform than space to store them.

This patch adds an argument to each function which contains the
buffer's size. The functions check for sufficient space before
writing to the buffer and will print out an error message if
it isn't available.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Correct return value of special_map_button

The 'special_map_*' functions called by 'parse_actions' are expected
to return a count of the number of words of input they have consumed.
The 'special_map_buttom' function errounously returns the number of
actions added instead, causing the program to potentially skip over
requested actions which follow a list of "button" actions.

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

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