diff -ruN -x .gitignore -x .cvsignore xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/ChangeLog xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/ChangeLog --- xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/ChangeLog 2008-03-20 20:43:04.000000000 +0000 +++ xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/ChangeLog 1970-01-01 00:00:00.000000000 +0000 @@ -1,45 +0,0 @@ -2006-04-06 Adam Jackson - - * configure.ac: - * src/xf86Summa.c: - Unlibcwrap. Bump server version requirement. Bump to 1.1.0. - -2005-12-20 Kevin E. Martin - - * configure.ac: - Update package version for X11R7 release. - -2005-12-14 Kevin E. Martin - - * configure.ac: - Update package version number for final X11R7 release candidate. - -2005-12-06 Kevin E. Martin - - * man/Makefile.am: - Change *man_SOURCES ==> *man_PRE to fix autotools warnings. - -2005-12-03 Kevin E. Martin - - * configure.ac: - Update package version number for X11R7 RC3 release. - -2005-12-01 Kevin E. Martin - - * configure.ac: - Remove extraneous AC_MSG_RESULT. - -2005-11-29 Adam Jackson - - * configure.ac: - Only build dlloader modules by default. - -2005-11-09 Kevin E. Martin - - * configure.ac: - Update package version number for X11R7 RC2 release. - -2005-11-01 Kevin E. Martin - - * configure.ac: - Update pkgcheck dependencies to work with separate build roots. diff -ruN -x .gitignore -x .cvsignore xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/Makefile.am xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/Makefile.am --- xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/Makefile.am 2008-03-20 20:43:04.000000000 +0000 +++ xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/Makefile.am 2009-01-28 23:18:45.000000000 +0000 @@ -20,3 +20,12 @@ AUTOMAKE_OPTIONS = foreign SUBDIRS = src man + +MAINTAINERCLEANFILES = ChangeLog + +.PHONY: ChangeLog + +ChangeLog: + $(CHANGELOG_CMD) + +dist-hook: ChangeLog diff -ruN -x .gitignore -x .cvsignore xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/README xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/README --- xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/README 1970-01-01 00:00:00.000000000 +0000 +++ xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/README 2009-01-28 23:18:45.000000000 +0000 @@ -0,0 +1,20 @@ +Xorg input driver for Summagraphics tablets. + +Please submit bugs & patches to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/driver/xf86-input-summa + + http://cgit.freedesktop.org/xorg/driver/xf86-input-summa + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage diff -ruN -x .gitignore -x .cvsignore xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/configure.ac xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/configure.ac --- xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/configure.ac 2008-03-20 20:43:04.000000000 +0000 +++ xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/configure.ac 2009-01-28 23:18:45.000000000 +0000 @@ -32,6 +32,10 @@ AM_MAINTAINER_MODE +# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) + DRIVER_NAME=summa AC_SUBST([DRIVER_NAME]) @@ -41,6 +45,7 @@ AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_PROG_CC +XORG_CWARNFLAGS AH_TOP([#include "xorg-server.h"]) @@ -78,9 +83,6 @@ PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto $REQUIRED_MODULES) sdkdir=$(pkg-config --variable=sdkdir xorg-server) -CFLAGS="$CFLAGS $XORG_CFLAGS "' -I$(top_srcdir)/src' -AC_SUBST([CFLAGS]) - # Checks for libraries. # Checks for header files. @@ -88,5 +90,6 @@ XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile src/Makefile man/Makefile]) diff -ruN -x .gitignore -x .cvsignore xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/src/Makefile.am xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/src/Makefile.am --- xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/src/Makefile.am 2008-03-20 20:43:04.000000000 +0000 +++ xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/src/Makefile.am 2009-01-28 23:18:45.000000000 +0000 @@ -29,3 +29,6 @@ @DRIVER_NAME@_drv_ladir = @inputdir@ @DRIVER_NAME@_drv_la_SOURCES = xf86Summa.c + +AM_CPPFLAGS = -I$(top_srcdir)/src +AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) diff -ruN -x .gitignore -x .cvsignore xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/src/xf86Summa.c xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/src/xf86Summa.c --- xf86-input-summa-e999b46eb593b5a462ec7b462cdf5a9511ef15c6/src/xf86Summa.c 2008-03-20 20:43:04.000000000 +0000 +++ xf86-input-summa-113c24d84d39c46298af4acccc49c33834ee4305/src/xf86Summa.c 2009-01-28 23:18:45.000000000 +0000 @@ -30,14 +30,7 @@ #include "config.h" #endif -#include "xf86Version.h" - -#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(3,9,0,0,0) -#define XFREE86_V4 1 -#endif - -#ifdef XFREE86_V4 -/* post 3.9 headers */ +#include "xorgVersion.h" #include #include @@ -92,47 +85,6 @@ static InputDriverPtr sumDrv; -#else /* pre 3.9 headers */ - -#define NEED_EVENTS -#include -#include -#include "misc.h" -#include "inputstr.h" -#include "scrnintstr.h" -#include -#include - -#if defined(sun) && !defined(i386) -#define POSIX_TTY -#include -#include -#include -#include - -#include "extio.h" -#else -#include "compiler.h" - -#include "xf86.h" -#include "xf86Priv.h" -#include "xf86_OSproc.h" -#ifdef XFree86LOADER -#endif -#include "xf86Config.h" -#include "xf86Xinput.h" -#include "atKeynames.h" -#endif - -#if !defined(sun) || defined(i386) -#include "osdep.h" -#include "exevents.h" - -#include "extnsionst.h" -#include "extinit.h" -#endif -#endif - /* ** Debugging macros */ @@ -188,67 +140,9 @@ */ #define SUMMA_SECTION_NAME "SummaSketch" -#ifndef XFREE86_V4 - -#define PORT 1 -#define DEVICENAME 2 -#define THE_MODE 3 -#define CURSOR 4 -#define INCREMENT 5 -#define BORDER 6 -#define DEBUG_LEVEL 7 -#define HISTORY_SIZE 8 -#define ALWAYS_CORE 9 -#define ACTIVE_AREA 10 -#define ACTIVE_OFFSET 11 -#define COMPATIBLE 12 -#define RESOLUTION 13 -#define HITACHI_1217D 14 - -#if !defined(sun) || defined(i386) -static SymTabRec SumTab[] = { - {ENDSUBSECTION, "endsubsection"}, - {PORT, "port"}, - {DEVICENAME, "devicename"}, - {THE_MODE, "mode"}, - {CURSOR, "cursor"}, - {INCREMENT, "increment"}, - {BORDER, "border"}, - {DEBUG_LEVEL, "debuglevel"}, - {HISTORY_SIZE, "historysize"}, - {ALWAYS_CORE, "alwayscore"}, - {ACTIVE_AREA, "activearea"}, - {ACTIVE_OFFSET, "activeoffset"}, - {COMPATIBLE, "compatible"}, - {RESOLUTION, "resolution"}, - {HITACHI_1217D, "hitachi_1217d"}, - {-1, ""} -}; - -#define RELATIVE 1 -#define ABSOLUTE 2 - -static SymTabRec SumModeTabRec[] = { - {RELATIVE, "relative"}, - {ABSOLUTE, "absolute"}, - {-1, ""} -}; - -#define PUCK 1 -#define STYLUS 2 - -static SymTabRec SumPointTabRec[] = { - {PUCK, "puck"}, - {STYLUS, "stylus"}, - {-1, ""} -}; - -#endif - -#endif /* Pre 3.9 headers */ /* -** Contants and macro +** Constants and macro */ #define BUFFER_SIZE 256 /* size of reception buffer */ #define XI_NAME "SUMMA" /* X device name for the stylus */ @@ -285,216 +179,6 @@ #define LPI2CPM(res) (res * 1000 / 25.4) /* -** External declarations -*/ - -#ifndef XFREE86_V4 - -#if defined(sun) && !defined(i386) -#define ENQUEUE suneqEnqueue -#else -#define ENQUEUE xf86eqEnqueue - -extern void xf86eqEnqueue( - xEventPtr /*e*/ -); -#endif - -extern void miPointerDeltaCursor( - int /*dx*/, - int /*dy*/, - unsigned long /*time*/ -); - -#endif - -#ifndef XFREE86_V4 - -#if !defined(sun) || defined(i386) -/* -** xf86SumConfig -** Reads the SummaSketch section from the XF86Config file -*/ -static Bool -xf86SumConfig(LocalDevicePtr *array, int inx, int max, LexPtr val) -{ - LocalDevicePtr dev = array[inx]; - SummaDevicePtr priv = (SummaDevicePtr)(dev->private); - int token; - int mtoken; - - DBG(2, ErrorF("xf86SumConfig\n")); - - while ((token = xf86GetToken(SumTab)) != ENDSUBSECTION) { - switch(token) { - case DEVICENAME: - if (xf86GetToken(NULL) != STRING) - xf86ConfigError("Option string expected"); - else { - dev->name = strdup(val->str); - if (xf86Verbose) - ErrorF("%s SummaSketch X device name is %s\n", XCONFIG_GIVEN, - dev->name); - } - break; - - case PORT: - if (xf86GetToken(NULL) != STRING) - xf86ConfigError("Option string expected"); - else { - priv->sumDevice = strdup(val->str); - if (xf86Verbose) - ErrorF("%s SummaSketch port is %s\n", XCONFIG_GIVEN, - priv->sumDevice); - } - break; - - case THE_MODE: - mtoken = xf86GetToken(SumModeTabRec); - if ((mtoken == EOF) || (mtoken == STRING) || (mtoken == NUMBER)) - xf86ConfigError("Mode type token expected"); - else { - switch (mtoken) { - case ABSOLUTE: - priv->flags |= ABSOLUTE_FLAG; - break; - case RELATIVE: - priv->flags &= ~ABSOLUTE_FLAG; - break; - default: - xf86ConfigError("Illegal Mode type"); - break; - } - } - break; - - case CURSOR: - mtoken = xf86GetToken(SumPointTabRec); - if ((mtoken == EOF) || (mtoken == STRING) || (mtoken == NUMBER)) - xf86ConfigError("Cursor token expected"); - else { - switch (mtoken) { - case STYLUS: - priv->flags |= STYLUS_FLAG; - break; - case PUCK: - priv->flags &= ~STYLUS_FLAG; - break; - default: - xf86ConfigError("Illegal cursor type"); - break; - } - } - break; - - case INCREMENT: - if (xf86GetToken(NULL) != NUMBER) - xf86ConfigError("Option number expected"); - priv->sumInc = val->num; - if (xf86Verbose) - ErrorF("%s SummaSketch increment value is %d\n", XCONFIG_GIVEN, - priv->sumInc); - break; - - case DEBUG_LEVEL: - if (xf86GetToken(NULL) != NUMBER) - xf86ConfigError("Option number expected"); - debug_level = val->num; - if (xf86Verbose) { -#if DEBUG - ErrorF("%s SummaSketch debug level sets to %d\n", XCONFIG_GIVEN, - debug_level); -#else - ErrorF("%s SummaSketch debug level not sets to %d because" - " debugging is not compiled\n", XCONFIG_GIVEN, - debug_level); -#endif - } - break; - - case HISTORY_SIZE: - if (xf86GetToken(NULL) != NUMBER) - xf86ConfigError("Option number expected"); - dev->history_size = val->num; - if (xf86Verbose) - ErrorF("%s SummaSketch Motion history size is %d\n", XCONFIG_GIVEN, - dev->history_size); - break; - - case HITACHI_1217D: - priv->flags |= H1217D_FLAG; - priv->sumInc = 0; - if(xf86Verbose) - ErrorF("%s Hitach_1217D, compatible enforced.\n", XCONFIG_GIVEN); - - case COMPATIBLE: - priv->flags |= COMPATIBLE_FLAG; - if(xf86Verbose) - ErrorF("%s SummaSketch compatible - will not query firmware ID\n", XCONFIG_GIVEN); - break; - - case ALWAYS_CORE: - xf86AlwaysCore(dev, TRUE); - if (xf86Verbose) - ErrorF("%s SummaSketch device always stays core pointer\n", - XCONFIG_GIVEN); - break; - - case ACTIVE_AREA: - if (xf86GetToken(NULL) != NUMBER) - xf86ConfigError("Option number expected"); - priv->sumXSize = val->realnum * 100; - if (xf86GetToken(NULL) != NUMBER) - xf86ConfigError("Option number expected"); - priv->sumYSize = val->realnum * 100; - if (xf86Verbose) - ErrorF("%s SummaSketch active area: %d.%02dx%d.%02d" - " inches\n", XCONFIG_GIVEN, priv->sumXSize / 100, - priv->sumXSize % 100, priv->sumYSize / 100, - priv->sumYSize % 100); - break; - - case ACTIVE_OFFSET: - if (xf86GetToken(NULL) != NUMBER) - xf86ConfigError("Option number expected"); - priv->sumXOffset = val->realnum * 100; - if (xf86GetToken(NULL) != NUMBER) - xf86ConfigError("Option number expected"); - priv->sumYOffset = val->realnum * 100; - if (xf86Verbose) - ErrorF("%s SummaSketch active offsets: %d.%02d %d.%02d" - " inches\n", XCONFIG_GIVEN, priv->sumXOffset / 100, - priv->sumXOffset % 100, priv->sumYOffset / 100, - priv->sumYOffset % 100); - break; - - case RESOLUTION: - if (xf86GetToken(NULL) != NUMBER) - xf86ConfigError("Option number expected"); - priv->sumRes = val->num; - if (xf86Verbose) - ErrorF("%s SummaSketch resolution set to %d\n", XCONFIG_GIVEN, - priv->sumRes); - break; - - case EOF: - FatalError("Unexpected EOF (missing EndSubSection)"); - break; - - default: - xf86ConfigError("SummaSketch subsection keyword expected"); - break; - } - } - - DBG(2, ErrorF("xf86SumConfig name=%s\n", priv->sumDevice)); - - return Success; -} -#endif -#endif - -/* ** xf86SumConvert ** Convert device valuator values to screen X and Y. */ @@ -707,10 +391,6 @@ xf86SumWriteAndRead(int fd, char *data, char *buffer, int len, int cr_term) { int err, numread = 0; -#ifndef XFREE86_V4 - fd_set readfds; - struct timeval timeout; -#endif SYSCALL(err = write(fd, data, strlen(data))); if (err == -1) { @@ -718,19 +398,8 @@ return NULL; } -#ifndef XFREE86_V4 - FD_ZERO(&readfds); - FD_SET(fd, &readfds); -#endif while (numread < len) { -#ifndef XFREE86_V4 - timeout.tv_sec = 0; - timeout.tv_usec = 200000; - - SYSCALL(err = select(FD_SETSIZE, &readfds, NULL, NULL, &timeout)); -#else err = xf86WaitForInput(fd, 200000); -#endif if (err == -1) { Error("SummaSketch select"); return NULL; @@ -808,10 +477,6 @@ static Bool xf86SumOpen(LocalDevicePtr local) { -#ifndef XFREE86_V4 - struct termios termios_tty; - struct timeval timeout; -#endif char buffer[256], dbuffer[4]; int err, idx; int res100; @@ -819,66 +484,13 @@ SummaDevicePtr priv = (SummaDevicePtr)local->private; DBG(2, ErrorF("opening %s\n", priv->sumDevice)); -#ifdef XFREE86_V4 local->fd = xf86OpenSerial(local->options); -#else - SYSCALL(local->fd = open(priv->sumDevice, O_RDWR|O_NDELAY, 0)); -#endif if (local->fd == -1) { Error(priv->sumDevice); return !Success; } DBG(2, ErrorF("%s opened as fd %d\n", priv->sumDevice, local->fd)); -#ifndef XFREE86_V4 -#ifdef POSIX_TTY - err = tcgetattr(local->fd, &termios_tty); - if (err == -1) { - Error("SummaSketch tcgetattr"); - return !Success; - } - termios_tty.c_iflag = IXOFF; - termios_tty.c_cflag = B9600|CS8|CREAD|CLOCAL|HUPCL|PARENB|PARODD; - termios_tty.c_lflag = 0; - - /* prevent tty term discipline processing */ - termios_tty.c_cc[VINTR] = 0; - termios_tty.c_cc[VQUIT] = 0; - termios_tty.c_cc[VERASE] = 0; -#ifdef VWERASE - termios_tty.c_cc[VWERASE] = 0; -#endif -#ifdef VREPRINT - termios_tty.c_cc[VREPRINT] = 0; -#endif - termios_tty.c_cc[VKILL] = 0; - termios_tty.c_cc[VEOF] = 0; - termios_tty.c_cc[VEOL] = 0; -#ifdef VEOL2 - termios_tty.c_cc[VEOL2] = 0; -#endif - termios_tty.c_cc[VSUSP] = 0; -#ifdef VDISCARD - termios_tty.c_cc[VDISCARD] = 0; -#endif -#ifdef VLNEXT - termios_tty.c_cc[VLNEXT] = 0; -#endif - - termios_tty.c_cc[VMIN] = 1 ; - termios_tty.c_cc[VTIME] = 10 ; - - err = tcsetattr(local->fd, TCSANOW, &termios_tty); - if (err == -1) { - Error("SummaSketch tcsetattr TCSANOW"); - return !Success; - } -#else -#error Code for someone else to write to handle OSs without POSIX tty functions -#endif - -#endif /* xf_v4 */ - DBG(2, ErrorF("initializing SummaSketch tablet\n")); /* send ASCII spaces in case tablet can auto-baud */ @@ -892,13 +504,7 @@ SYSCALL(err = write(local->fd, buffer, 1)); /* Wait 400 mSecs, just in case. 200 ms isn't enough for the Genius EasyPen. */ -#ifndef XFREE86_V4 - timeout.tv_sec = 0; - timeout.tv_usec = 400000; - SYSCALL(err = select(0, NULL, NULL, NULL, &timeout)); -#else err = xf86WaitForInput(-1, 400000); -#endif if (err == -1) { Error("SummaSketch select"); return !Success; @@ -910,12 +516,7 @@ Error("SummaSketch write"); return !Success; } -#ifndef XFREE86_V4 -/* Clear any pending input */ - tcflush(local->fd, TCIFLUSH); -#else xf86FlushInput(local->fd); -#endif if ((priv->flags & COMPATIBLE_FLAG) == 0) { DBG(2, ErrorF("reading firmware ID\n")); @@ -1168,7 +769,9 @@ if (InitValuatorClassDeviceStruct(pSum, nbaxes, +#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 xf86GetMotionEvents, +#endif local->history_size, (priv->flags & ABSOLUTE_FLAG)? Absolute: Relative) == FALSE) { @@ -1177,9 +780,6 @@ } /* allocate the motion history buffer if needed */ xf86MotionHistoryAllocate(local); -#ifndef XFREE86_V4 - AssignTypeAndName(pSum, local->atom, local->name); -#endif /* open the device to gather informations */ xf86SumOpenDevice(pSum); priv->flags |= INITIALIZED; @@ -1203,11 +803,7 @@ * enagae signal handlers yet. -huver@amgraf.com mar/12/2001. */ #if 0 -# ifdef XFREE86_V4 xf86AddEnabledDevice(local); -# else - AddEnabledDevice(local->fd); -# endif #else AddEnabledDevice(local->fd); #endif @@ -1220,11 +816,7 @@ if (! pSum->public.on) break; /* already off */ if (local->fd >= 0) #if 0 -# ifdef XFREE86_V4 xf86RemoveEnabledDevice(local); -# else - RemoveEnabledDevice(local->fd); -# endif #else RemoveEnabledDevice(local->fd); #endif @@ -1259,11 +851,7 @@ { DBG(2, ErrorF("xf86SumClose local = %p, ->fd = %d\n", (void *)local, local->fd)); if (local->fd >= 0) { -#ifdef XFREE86_V4 xf86CloseSerial(local->fd); -#else - SYSCALL(close(local->fd)); -#endif } local->fd = -1; xf86SumInitPrivate (local->private); @@ -1335,11 +923,7 @@ if (!priv) return NULL; -#ifdef XFREE86_V4 local = xf86AllocateInput(sumDrv, 0); -#else - local = xalloc(sizeof(LocalDeviceRec)); -#endif if (!local) { xfree(priv); return NULL; @@ -1348,11 +932,6 @@ local->name = XI_NAME; local->type_name = "SummaSketch Tablet"; local->flags = 0; -#ifndef XFREE86_V4 -#if !defined(sun) || defined(i386) - local->device_config = xf86SumConfig; -#endif -#endif local->device_control = xf86SumProc; local->read_input = xf86SumReadInput; local->control_proc = xf86SumChangeControl; @@ -1371,42 +950,6 @@ return local; } -#ifndef XFREE86_V4 -/* -** SummaSketch device association -** Device section name and allocation function. -*/ -DeviceAssocRec summasketch_assoc = -{ - SUMMA_SECTION_NAME, /* config_section_name */ - xf86SumAllocate /* device_allocate */ -}; - -#ifdef DYNAMIC_MODULE -/* -** init_module -** Entry point for dynamic module. -*/ -int -#ifndef DLSYM_BUG -init_module(unsigned long server_version) -#else -init_xf86Summa(unsigned long server_version) -#endif -{ - xf86AddDeviceAssoc(&summasketch_assoc); - - if (server_version != XF86_VERSION_CURRENT) { - ErrorF("Warning: SummaKetch module compiled for version%s\n", - XF86_VERSION); - return 0; - } else { - return 1; - } -} -#endif /* dynamic_module */ - -#else /* below for xfree86_v4 */ /* * xf86SumUninit -- @@ -1649,7 +1192,6 @@ }; #endif /* XFree86LOADER */ -#endif /* XFREE86_V4 */ /* end of xf86Summa.c */