.gitignore | 83 ++++++++--- ChangeLog | 413 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 11 - configure.ac | 82 +++------- debian/changelog | 8 + debian/control | 1 man/Makefile.am | 68 +++------ src/Makefile.am | 8 - src/acecad.c | 156 ++++++++++++-------- src/acecad.h | 20 +- 10 files changed, 654 insertions(+), 196 deletions(-)
New commits: commit 2fd2ff2fa8530b62fac505857d55539e613af6c8 Author: Cyril Brulebois <[email protected]> Date: Thu May 5 01:08:26 2011 +0200 Upload to unstable. diff --git a/debian/changelog b/debian/changelog index c05da05..fd7f030 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,10 +1,10 @@ -xserver-xorg-input-acecad (1:1.5.0-1) UNRELEASED; urgency=low +xserver-xorg-input-acecad (1:1.5.0-1) unstable; urgency=low * New upstream release: - Compatible with xorg-server 1.10 (Closes: #624890). * Add x11proto-kb-dev build-dep accordingly. - -- Cyril Brulebois <[email protected]> Thu, 05 May 2011 01:04:31 +0200 + -- Cyril Brulebois <[email protected]> Thu, 05 May 2011 01:08:17 +0200 xserver-xorg-input-acecad (1:1.4.0-4) unstable; urgency=low commit 8047940d8e999e04cf8e2cf99f65e2d1ddc612e5 Author: Cyril Brulebois <[email protected]> Date: Thu May 5 01:07:23 2011 +0200 Add x11proto-kb-dev build-dep accordingly. diff --git a/debian/changelog b/debian/changelog index 0d29352..c05da05 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ xserver-xorg-input-acecad (1:1.5.0-1) UNRELEASED; urgency=low * New upstream release: - Compatible with xorg-server 1.10 (Closes: #624890). + * Add x11proto-kb-dev build-dep accordingly. -- Cyril Brulebois <[email protected]> Thu, 05 May 2011 01:04:31 +0200 diff --git a/debian/control b/debian/control index 3f3cc59..f610d28 100644 --- a/debian/control +++ b/debian/control @@ -12,6 +12,7 @@ Build-Depends: x11proto-core-dev, x11proto-randr-dev, x11proto-input-dev, + x11proto-kb-dev, xutils-dev Standards-Version: 3.9.1 Vcs-Git: git://git.debian.org/git/pkg-xorg/driver/xserver-xorg-input-acecad commit 317c0c1eb1924ee5564ae13b3906a4c3b3c4873f Author: Cyril Brulebois <[email protected]> Date: Thu May 5 01:05:41 2011 +0200 Bump changelogs. diff --git a/ChangeLog b/ChangeLog index adb5987..269eca9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,416 @@ +commit ba7205b258a92886e2b2b269bd92a607b50a9984 +Author: Cyril Brulebois <[email protected]> +Date: Thu May 5 00:23:24 2011 +0200 + + acecad 1.5.0 + + Signed-off-by: Cyril Brulebois <[email protected]> + +commit f8e87eaf4031774ad319bff3756494728614d73d +Author: Peter Hutterer <[email protected]> +Date: Thu Dec 2 10:44:20 2010 +1000 + + The driver doesn't need libXext + + Signed-off-by: Peter Hutterer <[email protected]> + Reviewed-by: Gaetan Nadon <[email protected]> + +commit db1153d0d463da2e1e894beebbcb293141fa3ac5 +Author: Peter Hutterer <[email protected]> +Date: Thu Dec 2 10:36:48 2010 +1000 + + Bump to 1.4.99 + + Signed-off-by: Peter Hutterer <[email protected]> + +commit 802dd194dc8a571f600e05a93505681ae1ce13c7 +Author: Peter Hutterer <[email protected]> +Date: Thu Nov 25 13:01:53 2010 +1000 + + Add mode field to InitValuatorAxisStruct + + Signed-off-by: Peter Hutterer <[email protected]> + +commit f85c4b580c074f7054eac98753d1f4e91f08305e +Author: Peter Hutterer <[email protected]> +Date: Fri Sep 10 10:26:47 2010 +1000 + + Adjust to new PreInit for ABI 12. + + Most of the init is now handled by the server, not by the driver. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit ca93073692a4b8fab32945d76a1d1d16a435c800 +Author: Peter Hutterer <[email protected]> +Date: Fri Sep 10 10:33:01 2010 +1000 + + Use a local variable for history_size. + + Field was removed from InputInfoRec in ABI and the server hasn't actually + accessed this field for quite a while. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit 053f56d3086082f8335cef906baba23ef8482a73 +Author: Peter Hutterer <[email protected]> +Date: Fri Sep 10 10:23:19 2010 +1000 + + Purge close_proc, hasn't been called by the server for ages. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit b4e69d500dc0087bedafd7221abcb8e62800b84a +Author: Peter Hutterer <[email protected]> +Date: Fri Sep 10 10:20:00 2010 +1000 + + Move default_options up, preparation work for ABI 12. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit eab975ab3e576a6d223df07f0d9501e7bed317f0 +Author: Peter Hutterer <[email protected]> +Date: Fri Sep 10 10:10:08 2010 +1000 + + Remove libc wrapper usage for xcalloc, xfree, etc. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit a48b52684e184cac7979247c4a5af4250a9aa809 +Author: Peter Hutterer <[email protected]> +Date: Fri Sep 10 10:08:41 2010 +1000 + + Replace LocalDevicePtr with InputInfoPtr. + + LocalDevicePtr was removed with input ABI 12, but InputInfoPtr has been + around for years anyway. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit 4e8963e7b157aa61331824e57c16f467b2570c6b +Author: Peter Hutterer <[email protected]> +Date: Fri Sep 10 10:04:41 2010 +1000 + + Remove usage of XI86_POINTER_CAPABLE. + + Flag was a write-only flag in both the server and the driver has now been + removed from the server. + + Signed-off-by: Peter Hutterer <[email protected]> + +commit e282087cfe70917232ff520929ccbdbe6b4c521e +Author: Alan Coopersmith <[email protected]> +Date: Wed Oct 27 22:19:19 2010 -0700 + + Remove refcnt field from InputDriverRec. + + Wasn't used in the server and is now removed. + + Fixes compiler error: + "acecad.c", line 111: too many struct/union initializers + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit 96a383c95f8d97b966249eccb31734375df2c295 +Author: Gaetan Nadon <[email protected]> +Date: Wed Jun 9 16:34:03 2010 -0400 + + config: requires RANDR through xf86.h + + The xf86.h file contains external declarations specific to RANDR + Will not compile if this extension is not installed. + Because this is an optional extension, XORG_DRIVER_CHECK_EXT + must be used. + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit af91ec0384790896ccece958fbd6aeb192102691 +Author: Gaetan Nadon <[email protected]> +Date: Wed Jun 9 16:32:39 2010 -0400 + + config: requires xext, kb and input extensions through xf86.h + + The xf86.h file includes headers from these protocols. + Will not compile if these extensions are not installed. + Because these extensions are always defined in the server, XORG_DRIVER_CHECK_EXT + should not be used. + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit e0ae1a1068508dabe046c124c480591371573b31 +Author: Gaetan Nadon <[email protected]> +Date: Thu May 27 19:26:56 2010 -0400 + + config: use AC_PROG_INSTALL now supplied by XORG_DEFAULT_OPTIONS + + It depends on util-macros 1.8 + The existing statement can now be removed from the configuration file. + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 23d6e6ad46a4636bf47be127eb770458d45904db +Author: Gaetan Nadon <[email protected]> +Date: Thu May 27 19:25:22 2010 -0400 + + config: upgrade to util-macros 1.8 for additional man page support + + Use MAN_SUBST now supplied in XORG_MANPAGE_SECTIONS + The value of MAN_SUBST is the same for all X.Org packages. + + Use AC_PROG_SED now supplied by XORG_DEFAULT_OPTIONS + The existing statement can now be removed from the configuration file. + + Use Automake recommened $() for makefile variables. + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit bb15c68091a78871196aa9366b22c00589601fb4 +Author: Gaetan Nadon <[email protected]> +Date: Mon May 10 20:40:45 2010 -0400 + + config: acecad does not use the input protocol + + There is no need to PKG_CHECK_MODULES inputproto + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 25cf54dc5973be1427daf33e9bc6d907ccebc596 +Author: Gaetan Nadon <[email protected]> +Date: Mon May 10 21:17:43 2010 -0400 + + config: AC_PROG_SED is required explicitly on Solaris + + It sets the SED env variable with an appropriate sed program path + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 72b78672b172453f14811a3c1877a88292b496b3 +Author: Gaetan Nadon <[email protected]> +Date: Sat Apr 17 19:04:02 2010 -0400 + + man: Use Autoconf provided $(AM_V_GEN)$(SED) + + Enables silent rule and use platform appropriate version of sed. + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit e2795bba90fb0b332d6ba8c3f453e4f6359fb24e +Author: Gaetan Nadon <[email protected]> +Date: Fri Apr 16 15:09:19 2010 -0400 + + config: optional extension check for inputproto not required + + The check should be in PKG_CHECK_MODULES permanently. + + The XORG_DRIVER_CHECK_EXT will add inputproto to PKG_CHECK_MODULES + only if the extension is available. By definition, this extension + is always available and the acecad driver cannot function without it. + + This is evidenced by the absence of XINPUT conditional code. + + Acked-by: Peter Hutterer <[email protected]> + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 6751ab441bd35916926e24607599509a610a00be +Author: Gaetan Nadon <[email protected]> +Date: Thu Apr 15 20:01:51 2010 -0400 + + config: remove extension check for unused RANDR extension + + The randr protocol is not used, no randr*.h are included. + + Acked-by: Peter Hutterer <[email protected]> + Signed-off-by: Gaetan Nadon <[email protected]> + +commit a86cb44b1dfe5ccfb05879ca49caf4288df540e4 +Author: Gaetan Nadon <[email protected]> +Date: Thu Apr 15 16:41:35 2010 -0400 + + config: fix checking for extensions section + + A hidden dependency on statement order was discovered. + The REQUIRE_MODULES variable was removed but needed. + Comments added to clarify the situation. + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit e9770dfe4e54993c2c53922fe9b37976e4e147cd +Author: Gaetan Nadon <[email protected]> +Date: Mon Apr 12 16:42:08 2010 -0400 + + config: remove AC_PROG_CC as it overrides AC_PROG_C_C99 + + XORG_STRICT_OPTION from XORG_DEFAULT_OPTIONS calls + AC_PROG_C_C99. This sets gcc with -std=gnu99. + If AC_PROG_CC macro is called afterwards, it resets CC to gcc. + + Acked-by: Peter Hutterer <[email protected]> + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 35fd1d69c7377d26eae631033b93bccd1b7fd1d7 +Author: Gaetan Nadon <[email protected]> +Date: Sat Apr 10 22:13:17 2010 -0400 + + config: fix warnings and layout + + Minor upgrades. Layout and comment statements. + Remove AC_PROG_CC as it overrides AC_PROG_C_C99 from + XORG_STRICT_OPTION. + + Acked-by: Peter Hutterer <[email protected]> + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 47dc3a9b851de8dd4b915ca8da43e7c744ee1730 +Author: Gaetan Nadon <[email protected]> +Date: Thu Apr 15 08:41:27 2010 -0400 + + config: replace deprecated AM_CONFIG_HEADER with AC_CONFIG_HEADERS + + Regroup AC statements at the top. + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 9071703d43771a57bab00e33238fd0f99e9ce302 +Author: Gaetan Nadon <[email protected]> +Date: Sat Apr 10 20:41:06 2010 -0400 + + config: update AC_PREREQ statement to 2.60 + + Unrelated to the previous patches, the new value simply reflects + the reality that the minimum level for autoconf to configure + all x.org modules is 2.60 dated June 2006. + + ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz + + Acked-by: Peter Hutterer <[email protected]> + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 0b601a14627538877ee89492e4b884da8152ff4c +Author: Gaetan Nadon <[email protected]> +Date: Sat Apr 10 19:46:47 2010 -0400 + + config: simplify configuration regarding sysfs headers and library. + + Replace deprecated AC_HEADER_CHECK with AC_CHECK_HEADERS + AC_CHECK_LIB ensures sysfs library is present and adds -lsysfs + AC_CHECK_HEADERS verifies sysfs and linux input headers are present + + Acked-by: Peter Hutterer <[email protected]> + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 64a899b00564fd16250068da1eab1e3dacdd3477 +Author: Gaetan Nadon <[email protected]> +Date: Mon Apr 12 09:13:39 2010 -0400 + + config: add conditional inclusion of config.h + + Acked-by: Peter Hutterer <[email protected]> + Signed-off-by: Gaetan Nadon <[email protected]> + +commit d0a76a2343f8e3c07db3de7874fc8c2f38f98f09 +Author: Gaetan Nadon <[email protected]> +Date: Fri Apr 9 14:12:28 2010 -0400 + + config: remove AH_TOP autoheader statement + + The generated config.h does not need to include xorg-server.h + for the content it provides. + Add #include <xorg-server.h> in .[hc] files as needed. + + Acked-by: Peter Hutterer <[email protected]> + Signed-off-by: Gaetan Nadon <[email protected]> + +commit b64d7594acf3e41f8ac0868d972be0e75fdcb35b +Author: Gaetan Nadon <[email protected]> +Date: Thu Feb 11 10:08:07 2010 -0500 + + config: move CWARNFLAGS from configure.ac to Makefile.am + + Compiler warning flags should be explicitly set in the makefile + rather than being merged with other packages compiler flags. + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 1119b9057b41435cfdde6822e3a637a2c18e7ca1 +Author: Alan Coopersmith <[email protected]> +Date: Fri Jan 15 15:13:24 2010 -0800 + + Update Sun license notices to current X.Org standard form + + Signed-off-by: Alan Coopersmith <[email protected]> + +commit cf02cd53e7152c4effe036abb8b2849b88f4f54b +Author: Gaetan Nadon <[email protected]> +Date: Tue Dec 15 22:01:02 2009 -0500 + + configure.ac: remove unused sdkdir=$(pkg-config...) statement + + The sdkdir variable isn't use, so remove the statement. + + Acked-by: Dan Nicholson <[email protected]> + + Signed-off-by: Gaetan Nadon <[email protected]> + +commit 276cfbdc35ec63da046391a07a760a6844f9db6b +Author: Gaetan Nadon <[email protected]> +Date: Mon Nov 23 09:25:05 2009 -0500 + + Makefile.am: add ChangeLog and INSTALL on MAINTAINERCLEANFILES + + Now that the INSTALL file is generated. + Allows running make maintainer-clean. + +commit 258301f0346a343b27ea716ff60099eddd1a02ad +Author: Gaetan Nadon <[email protected]> +Date: Wed Oct 28 14:41:08 2009 -0400 + + INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 + + Automake 'foreign' option is specified in configure.ac. + Remove from Makefile.am + +commit cb547fb807f05a7e0a45ebfabaf5d02802296788 +Author: Gaetan Nadon <[email protected]> +Date: Wed Oct 28 14:09:09 2009 -0400 + + INSTALL, NEWS, README or AUTHORS files are missing/incorrect #24206 + + Add missing INSTALL file. Use standard GNU file on building tarball + README may have been updated + Remove AUTHORS file as it is empty and no content available yet. + Remove NEWS file as it is empty and no content available yet. + +commit 3f64aba434c97ee7c6433994375b3038201d805a +Author: Gaetan Nadon <[email protected]> +Date: Mon Oct 26 12:54:20 2009 -0400 + + Several driver modules do not have a ChangeLog target in Makefile.am #23814 + + The git generated ChangeLog replaces the hand written one. + Update configure.ac to xorg-macros level 1.3. + Use XORG_DEFAULT_OPTIONS which replaces four XORG_* macros + Update Makefile.am to add ChangeLog target if missing + Remove ChangeLog from EXTRA_DIST or *CLEAN variables + This is a pre-req for the INSTALL_CMD + +commit 934a53decdb9d0d8890e7d6d6b67d4c0c64fbc4f +Author: Gaetan Nadon <[email protected]> +Date: Thu Oct 22 12:34:16 2009 -0400 + + .gitignore: use common defaults with custom section # 24239 + + Using common defaults will reduce errors and maintenance. + Only the very small or inexistent custom section need periodic maintenance + when the structure of the component changes. Do not edit defaults. + +commit 0f7ea63f28fb5314a58f9179bab6269f5184579f +Author: Peter Hutterer <[email protected]> +Date: Fri Sep 11 12:06:19 2009 +1000 + + Remove some unused crap from configure + + Signed-off-by: Peter Hutterer <[email protected]> + commit da1d7acc20a1b9ef4450b40781f1f207d9fa4e3d Author: Peter Hutterer <[email protected]> Date: Wed Sep 9 12:44:10 2009 +1000 diff --git a/debian/changelog b/debian/changelog index a6c8ce3..0d29352 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +xserver-xorg-input-acecad (1:1.5.0-1) UNRELEASED; urgency=low + + * New upstream release: + - Compatible with xorg-server 1.10 (Closes: #624890). + + -- Cyril Brulebois <[email protected]> Thu, 05 May 2011 01:04:31 +0200 + xserver-xorg-input-acecad (1:1.4.0-4) unstable; urgency=low * Switch to dh: commit ba7205b258a92886e2b2b269bd92a607b50a9984 Author: Cyril Brulebois <[email protected]> Date: Thu May 5 00:23:24 2011 +0200 acecad 1.5.0 Signed-off-by: Cyril Brulebois <[email protected]> diff --git a/configure.ac b/configure.ac index 0794f82..4c76754 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-acecad], - [1.4.99], + [1.5.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-acecad]) commit f8e87eaf4031774ad319bff3756494728614d73d Author: Peter Hutterer <[email protected]> Date: Thu Dec 2 10:44:20 2010 +1000 The driver doesn't need libXext Signed-off-by: Peter Hutterer <[email protected]> Reviewed-by: Gaetan Nadon <[email protected]> diff --git a/configure.ac b/configure.ac index 94d16e1..0794f82 100644 --- a/configure.ac +++ b/configure.ac @@ -55,7 +55,7 @@ AC_CHECK_HEADERS([linux/input.h sysfs/libsysfs.h]) XORG_DRIVER_CHECK_EXT(RANDR, randrproto) # Obtain compiler/linker options from server and required extensions -PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto xext kbproto inputproto $REQUIRED_MODULES) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto kbproto inputproto $REQUIRED_MODULES) # Define a configure option for an alternate input module directory AC_ARG_WITH(xorg-module-dir, commit db1153d0d463da2e1e894beebbcb293141fa3ac5 Author: Peter Hutterer <[email protected]> Date: Thu Dec 2 10:36:48 2010 +1000 Bump to 1.4.99 Signed-off-by: Peter Hutterer <[email protected]> diff --git a/configure.ac b/configure.ac index cc6916a..94d16e1 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ # Initialize Autoconf AC_PREREQ([2.60]) AC_INIT([xf86-input-acecad], - [1.4.0], + [1.4.99], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-input-acecad]) commit 802dd194dc8a571f600e05a93505681ae1ce13c7 Author: Peter Hutterer <[email protected]> Date: Thu Nov 25 13:01:53 2010 +1000 Add mode field to InitValuatorAxisStruct Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/acecad.c b/src/acecad.c index da788a0..6259f21 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -720,7 +720,11 @@ DeviceInit (DeviceIntPtr dev) #endif 1000, /* resolution */ 0, /* min_res */ - 1000); /* max_res */ + 1000 /* max_res */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 + , Absolute +#endif + ); InitValuatorAxisStruct(dev, 1, #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 @@ -734,7 +738,11 @@ DeviceInit (DeviceIntPtr dev) #endif 1000, /* resolution */ 0, /* min_res */ - 1000); /* max_res */ + 1000 /* max_res */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 + , Absolute +#endif + ); InitValuatorAxisStruct(dev, 2, #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 @@ -744,7 +752,11 @@ DeviceInit (DeviceIntPtr dev) priv->acecadMaxZ, /* max val */ 1000, /* resolution */ 0, /* min_res */ - 1000); /* max_res */ + 1000 /* max_res */ +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 + , Absolute +#endif + ); } commit f85c4b580c074f7054eac98753d1f4e91f08305e Author: Peter Hutterer <[email protected]> Date: Fri Sep 10 10:26:47 2010 +1000 Adjust to new PreInit for ABI 12. Most of the init is now handled by the server, not by the driver. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/acecad.c b/src/acecad.c index e81c141..da788a0 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -125,7 +125,10 @@ _X_EXPORT InputDriverRec ACECAD = NULL, AceCadPreInit, NULL, - NULL + NULL, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12 + default_options +#endif }; static XF86ModuleVersionInfo VersionRec = @@ -328,20 +331,18 @@ ProbeFound: #endif +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 +static int NewAceCadPreInit(InputDriverPtr drv, InputInfoPtr dev, int flags); + static InputInfoPtr AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) { InputInfoPtr local = xf86AllocateInput(drv, 0); AceCadPrivatePtr priv = calloc (1, sizeof(AceCadPrivateRec)); - int speed; - int msgtype; - char *s; - if ((!local) || (!priv)) + if ((!local)) goto SetupProc_fail; - memset(priv, 0, sizeof(AceCadPrivateRec)); - local->name = dev->identifier; local->type_name = XI_TABLET; local->flags = XI86_SEND_DRAG_EVENTS; @@ -356,13 +357,38 @@ AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) local->private = priv; local->private_flags = 0; local->conf_idev = dev; - local->device_control = DeviceControl; /*local->always_core_feedback = 0;*/ xf86CollectInputOptions(local, default_options, NULL); xf86OptionListReport(local->options); + if (NewAceCadPreInit(drv, local, flags) == Success) + return local; + +SetupProc_fail: + return NULL; +} + +static int +NewAceCadPreInit(InputDriverPtr drv, InputInfoPtr local, int flags) +#else +static int +AceCadPreInit(InputDriverPtr drv, InputInfoPtr local, int flags) +#endif +{ + AceCadPrivatePtr priv = calloc (1, sizeof(AceCadPrivateRec)); + int speed; + int msgtype; + char *s; + + if (!priv) + return BadAlloc; + + memset(priv, 0, sizeof(AceCadPrivateRec)); + + local->device_control = DeviceControl; + priv->acecadInc = xf86SetIntOption(local->options, "Increment", 0 ); s = xf86FindOptionValue(local->options, "Device"); @@ -457,11 +483,11 @@ AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) xf86Msg(msgtype, "%s is in %s mode\n", local->name, (priv->flags & ABSOLUTE_FLAG) ? "absolute" : "relative"); DBG (9, XisbTrace (priv->buffer, 1)); - local->history_size = xf86SetIntOption(local->options , "HistorySize", 0); - xf86ProcessCommonOptions(local, local->options); +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 local->flags |= XI86_CONFIGURED; +#endif if (local->fd != -1) { @@ -475,7 +501,7 @@ AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) } RemoveEnabledDevice (local->fd); local->fd = -1; - return local; + return Success; /* * If something went wrong, cleanup and return NULL @@ -491,7 +517,7 @@ SetupProc_fail: local->private = NULL; } xf86DeleteInput(local, 0); - return NULL; + return BadAlloc; } static Bool diff --git a/src/acecad.h b/src/acecad.h index 342b940..a2b5c66 100644 --- a/src/acecad.h +++ b/src/acecad.h @@ -106,7 +106,11 @@ static Bool ReverseConvertProc(InputInfoPtr , int , int , int*); static Bool QueryHardware (AceCadPrivatePtr); static void NewPacket (AceCadPrivatePtr priv); static Bool AceCadGetPacket (AceCadPrivatePtr); +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12 static InputInfoPtr AceCadPreInit(InputDriverPtr, IDevPtr , int); +#else +static int AceCadPreInit(InputDriverPtr, InputInfoPtr , int); +#endif #ifdef HAVE_LINUX_INPUT_H static void USBReadInput (InputInfoPtr); static Bool USBQueryHardware (InputInfoPtr); commit ca93073692a4b8fab32945d76a1d1d16a435c800 Author: Peter Hutterer <[email protected]> Date: Fri Sep 10 10:33:01 2010 +1000 Use a local variable for history_size. Field was removed from InputInfoRec in ABI and the server hasn't actually accessed this field for quite a while. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/acecad.c b/src/acecad.c index 2cad693..e81c141 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -615,6 +615,7 @@ DeviceInit (DeviceIntPtr dev) InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate; AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private); unsigned char map[] = {0, 1, 2, 3}; + int history_size; #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 Atom btn_labels[3]; Atom axes_labels[3]; @@ -660,6 +661,7 @@ DeviceInit (DeviceIntPtr dev) return !Success; } + history_size = xf86SetIntOption(local->options , "HistorySize", 0); /* 3 axes */ if (InitValuatorClassDeviceStruct (dev, 3, @@ -669,7 +671,7 @@ DeviceInit (DeviceIntPtr dev) #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 xf86GetMotionEvents, #endif - local->history_size, + history_size, ((priv->flags & ABSOLUTE_FLAG)? Absolute: Relative)|OutOfProximity) == FALSE) { commit 053f56d3086082f8335cef906baba23ef8482a73 Author: Peter Hutterer <[email protected]> Date: Fri Sep 10 10:23:19 2010 +1000 Purge close_proc, hasn't been called by the server for ages. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/acecad.c b/src/acecad.c index 31ac14b..2cad693 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -349,7 +349,6 @@ AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) local->motion_history_proc = xf86GetMotionEvents; #endif local->control_proc = NULL; - local->close_proc = CloseProc; local->switch_mode = NULL; local->conversion_proc = ConvertProc; local->reverse_conversion_proc = ReverseConvertProc; @@ -1010,11 +1009,6 @@ USBReadInput (InputInfoPtr local) } #endif -static void -CloseProc (InputInfoPtr local) -{ -} - /* * The ConvertProc function may need to be tailored for your device. * This function converts the device's valuator outputs to x and y coordinates diff --git a/src/acecad.h b/src/acecad.h index 49721e0..342b940 100644 --- a/src/acecad.h +++ b/src/acecad.h @@ -101,7 +101,6 @@ static Bool DeviceOff (DeviceIntPtr); static Bool DeviceClose (DeviceIntPtr); static Bool DeviceInit (DeviceIntPtr); static void ReadInput (InputInfoPtr); -static void CloseProc (InputInfoPtr); static Bool ConvertProc (InputInfoPtr, int, int, int, int, int, int, int, int, int *, int *); static Bool ReverseConvertProc(InputInfoPtr , int , int , int*); static Bool QueryHardware (AceCadPrivatePtr); commit b4e69d500dc0087bedafd7221abcb8e62800b84a Author: Peter Hutterer <[email protected]> Date: Fri Sep 10 10:20:00 2010 +1000 Move default_options up, preparation work for ABI 12. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/acecad.c b/src/acecad.c index 97d475a..31ac14b 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -106,6 +106,18 @@ /* max number of input events to read in one read call */ #define MAX_EVENTS 50 +static const char *default_options[] = +{ + "BaudRate", "9600", + "StopBits", "1", + "DataBits", "8", + "Parity", "Odd", + "Vmin", "1", + "Vtime", "10", + "FlowControl", "Xoff", + NULL +}; + _X_EXPORT InputDriverRec ACECAD = { 1, @@ -156,18 +168,6 @@ TearDownProc( pointer p ) { } -static const char *default_options[] = -{ - "BaudRate", "9600", - "StopBits", "1", - "DataBits", "8", - "Parity", "Odd", - "Vmin", "1", - "Vtime", "10", - "FlowControl", "Xoff", - NULL -}; - #ifdef HAVE_LINUX_INPUT_H static int IsUSBLine(int fd) commit eab975ab3e576a6d223df07f0d9501e7bed317f0 Author: Peter Hutterer <[email protected]> Date: Fri Sep 10 10:10:08 2010 +1000 Remove libc wrapper usage for xcalloc, xfree, etc. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/acecad.c b/src/acecad.c index 2c2ff27..97d475a 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -332,7 +332,7 @@ static InputInfoPtr AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) { InputInfoPtr local = xf86AllocateInput(drv, 0); - AceCadPrivatePtr priv = xcalloc (1, sizeof(AceCadPrivateRec)); + AceCadPrivatePtr priv = calloc (1, sizeof(AceCadPrivateRec)); int speed; int msgtype; char *s; @@ -487,7 +487,7 @@ SetupProc_fail: if ((priv) && (priv->buffer)) XisbFree (priv->buffer); if (priv) { - xfree (priv); + free (priv); if (local) local->private = NULL; } commit a48b52684e184cac7979247c4a5af4250a9aa809 Author: Peter Hutterer <[email protected]> Date: Fri Sep 10 10:08:41 2010 +1000 Replace LocalDevicePtr with InputInfoPtr. LocalDevicePtr was removed with input ABI 12, but InputInfoPtr has been around for years anyway. Signed-off-by: Peter Hutterer <[email protected]> diff --git a/src/acecad.c b/src/acecad.c index 7bb80e4..2c2ff27 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -215,7 +215,7 @@ static char acecad_driver_name[11] = "usb_acecad"; #endif static Bool -AceCadAutoDevProbe(LocalDevicePtr local, int verb) +AceCadAutoDevProbe(InputInfoPtr local, int verb) { /* We are trying to find the right eventX device */ int i = 0; @@ -331,7 +331,7 @@ ProbeFound: static InputInfoPtr AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) { - LocalDevicePtr local = xf86AllocateInput(drv, 0); + InputInfoPtr local = xf86AllocateInput(drv, 0); AceCadPrivatePtr priv = xcalloc (1, sizeof(AceCadPrivateRec)); int speed; int msgtype; @@ -526,7 +526,7 @@ static Bool DeviceOn (DeviceIntPtr dev) { char buffer[256]; - LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; + InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate; AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private); xf86MsgVerb(X_INFO, 4, "%s Device On\n", local->name); @@ -569,7 +569,7 @@ DeviceOn (DeviceIntPtr dev) static Bool DeviceOff (DeviceIntPtr dev) { - LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; + InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate; AceCadPrivatePtr priv = (AceCadPrivatePtr) (local->private); xf86MsgVerb(X_INFO, 4, "%s Device Off\n", local->name); @@ -594,7 +594,7 @@ DeviceOff (DeviceIntPtr dev) static Bool DeviceClose (DeviceIntPtr dev) { - LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; + InputInfoPtr local = (InputInfoPtr) dev->public.devicePrivate; xf86MsgVerb(X_INFO, 4, "%s Device Close\n", local->name); @@ -604,7 +604,7 @@ DeviceClose (DeviceIntPtr dev) static void -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

