Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 197640 Details for
Bug 276599
x11-drivers/xf86-input-digitaledge-1.1.1 fails to build
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
remove old unsupported XF86 code
xf86-input-digitaledge_remove_unsupported_Xf86-3.x_code.patch (text/plain), 12.33 KB, created by
Pinky
on 2009-07-12 13:10:59 UTC
(
hide
)
Description:
remove old unsupported XF86 code
Filename:
MIME Type:
Creator:
Pinky
Created:
2009-07-12 13:10:59 UTC
Size:
12.33 KB
patch
obsolete
>--- xf86-input-digitaledge-1.1.1/src/DigitalEdge.c.orig 2009-07-12 15:07:34.000000000 +0200 >+++ xf86-input-digitaledge-1.1.1/src/DigitalEdge.c 2009-07-12 15:05:45.000000000 +0200 >@@ -36,11 +36,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 >+//#include "xorgVersion.h" > > /* post 3.9 headers */ > >@@ -150,62 +146,6 @@ > */ > #define DEDGE_SECTION_NAME "DigitalEdge" > >-#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 CLICK_THRESHOLD 13 >- >-#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"}, >- {CLICK_THRESHOLD, "clickthreshold"}, >- {-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 > */ >@@ -243,208 +183,6 @@ > #define COORD_BITS 0x7f > > /* >-** 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 */ >- ); >- >-#if !defined(sun) || defined(i386) >-/* >-** xf86SumConfig >-** Reads the DigitalEdge section from the XF86Config file >-*/ >-static Bool >-xf86SumConfig(LocalDevicePtr * array, int inx, int max, LexPtr val) >-{ >- LocalDevicePtr dev = array[inx]; >- DigitalEdgeDevicePtr priv = (DigitalEdgeDevicePtr) (dev->private); >- int token; >- int mtoken; >- >- DBG(1, 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 DigitalEdge X device name is %s\n", >- XCONFIG_GIVEN, dev->name); >- } >- break; >- >- case PORT: >- if (xf86GetToken(NULL) != STRING) >- xf86ConfigError("Option string expected"); >- else { >- priv->dedgeDevice = strdup(val->str); >- if (xf86Verbose) >- ErrorF("%s DigitalEdge port is %s\n", XCONFIG_GIVEN, >- priv->dedgeDevice); >- } >- 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->dedgeInc = val->num; >- if (xf86Verbose) >- ErrorF("%s DigitalEdge increment value is %d\n", >- XCONFIG_GIVEN, priv->dedgeInc); >- break; >- >- case CLICK_THRESHOLD: >- if (xf86GetToken(NULL) != NUMBER) >- xf86ConfigError("Option number expected"); >- priv->dedgeClickThresh = val->num; >- if (xf86Verbose) >- ErrorF("%s DigitalEdge click threshold is %d\n", >- XCONFIG_GIVEN, priv->dedgeClickThresh); >- break; >- >- case DEBUG_LEVEL: >- if (xf86GetToken(NULL) != NUMBER) >- xf86ConfigError("Option number expected"); >- debug_level = val->num; >- if (xf86Verbose) { >-#if DEBUG >- ErrorF("%s DigitalEdge debug level sets to %d\n", >- XCONFIG_GIVEN, debug_level); >-#else >- ErrorF("%s DigitalEdge 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 DigitalEdge Motion history size is %d\n", >- XCONFIG_GIVEN, dev->history_size); >- break; >- case COMPATIBLE: >- priv->flags |= COMPATIBLE_FLAG; >- if (xf86Verbose) >- ErrorF >- ("DigitalEdge compatible - will not query firmware ID\n"); >- break; >- >- case ALWAYS_CORE: >- xf86AlwaysCore(dev, TRUE); >- if (xf86Verbose) >- ErrorF("%s DigitalEdge device always stays core pointer\n", >- XCONFIG_GIVEN); >- break; >- >- case ACTIVE_AREA: >- if (xf86GetToken(NULL) != NUMBER) >- xf86ConfigError("Option number expected"); >- priv->dedgeXSize = val->num; >- if (xf86GetToken(NULL) != NUMBER) >- xf86ConfigError("Option number expected"); >- priv->dedgeYSize = val->num; >- ErrorF("%s DigitalEdge active area set to %d.%1dx%d.%1d" >- " inches\n", XCONFIG_GIVEN, priv->dedgeXSize / 10, >- priv->dedgeXSize % 10, priv->dedgeYSize / 10, >- priv->dedgeYSize % 10); >- break; >- >- case ACTIVE_OFFSET: >- if (xf86GetToken(NULL) != NUMBER) >- xf86ConfigError("Option number expected"); >- priv->dedgeXOffset = val->num; >- if (xf86GetToken(NULL) != NUMBER) >- xf86ConfigError("Option number expected"); >- priv->dedgeYOffset = val->num; >- if (xf86Verbose) >- ErrorF >- ("%s DigitalEdge active area offset set to %d.%1dx%d.%1d" >- " inches\n", XCONFIG_GIVEN, priv->dedgeXOffset / 10, >- priv->dedgeXOffset % 10, priv->dedgeYOffset / 10, >- priv->dedgeYOffset % 10); >- break; >- >- case EOF: >- FatalError("Unexpected EOF (missing EndSubSection)"); >- break; >- >- default: >- xf86ConfigError("DigitalEdge subsection keyword expected"); >- break; >- } >- } >- >- DBG(1, ErrorF("xf86SumConfig name=%s\n", priv->dedgeDevice)); >- >- return Success; >-} >-#endif >-#endif /* pre 3.9 headers */ >- >-/* > ** xf86SumConvert > ** Convert valuators to X and Y. > */ >@@ -719,78 +457,20 @@ > */ > static Bool xf86SumOpen(LocalDevicePtr local) > { >-#ifndef XFREE86_V4 >- struct termios termios_tty; >- struct timeval timeout; >-#endif > char buffer[256]; > int err, idx; > DigitalEdgeDevicePtr priv = (DigitalEdgeDevicePtr) local->private; > > DBG(1, ErrorF("opening %s\n", priv->dedgeDevice)); > >-#ifdef XFREE86_V4 > local->fd = xf86OpenSerial(local->options); >-#else >- SYSCALL(local->fd = open(priv->dedgeDevice, O_RDWR | O_NDELAY, 0)); >-#endif > if (local->fd == -1) { > Error(priv->dedgeDevice); > return !Success; > } > DBG(2, ErrorF("%s opened as fd %d\n", priv->dedgeDevice, local->fd)); > >-#ifndef XFREE86_V4 >-#ifdef POSIX_TTY >- err = tcgetattr(local->fd, &termios_tty); >- if (err == -1) { >- Error("DigitalEdge tcgetattr"); >- return !Success; >- } >- termios_tty.c_iflag = IXOFF; >- termios_tty.c_cflag = >- B9600 | CS8 | CREAD | CLOCAL | HUPCL | PARENB | PARODD; >- termios_tty.c_lflag = 0; >- >-/* I wonder what these all do, anyway */ >- 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("DigitalEdge tcsetattr TCSANOW"); >- return !Success; >- } >-#else >- Code for someone >- else >- to write to handle OSs without POSIX tty functions >-#endif >-#endif >- DBG(1, ErrorF("initializing DigitalEdge tablet\n")); >+ DBG(1, ErrorF("initializing DigitalEdge tablet\n")); > > /* Send reset (NULL) to the tablet */ > SYSCALL(err = write(local->fd, "", 1)); >@@ -800,13 +480,7 @@ > } > > /* wait 200 mSecs, just in case */ >-#ifndef XFREE86_V4 >- timeout.tv_sec = 0; >- timeout.tv_usec = 200000; >- SYSCALL(err = select(0, NULL, NULL, NULL, &timeout)); >-#else > err = xf86WaitForInput(-1, 200); >-#endif > if (err == -1) { > Error("DigitalEdge select"); > return !Success; >@@ -820,11 +494,7 @@ > return !Success; > } > /* Clear any pending input */ >-#ifndef XFREE86_V4 >- tcflush(local->fd, TCIFLUSH); >-#else > xf86FlushInput(local->fd); >-#endif > > if (priv->dedgeXOffset > 0 && priv->dedgeYOffset > 0) { > if (priv->dedgeXSize * 50 < priv->dedgeMaxX - priv->dedgeXOffset && >@@ -972,7 +642,6 @@ > > if (InitValuatorClassDeviceStruct(pSum, > nbaxes, >- xf86GetMotionEvents, > local->history_size, > (priv->flags & ABSOLUTE_FLAG) ? > Absolute : Relative) == FALSE) { >@@ -981,9 +650,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); >@@ -996,11 +662,7 @@ > return !Success; > } > SYSCALL(write(local->fd, SS_PROMPT, strlen(SS_PROMPT))); >-#ifdef XFREE86_V4 > xf86AddEnabledDevice(local); >-#else >- AddEnabledDevice(local->fd); >-#endif > pSum->public.on = TRUE; > break; > >@@ -1008,11 +670,7 @@ > DBG(1, ErrorF("xf86SumProc pSum=%p what=%s\n", (void *)pSum, > (what == DEVICE_CLOSE) ? "CLOSE" : "OFF")); > if (local->fd >= 0) >-#ifdef XFREE86_V4 > xf86RemoveEnabledDevice(local); >-#else >- RemoveEnabledDevice(local->fd); >-#endif > pSum->public.on = FALSE; > break; > >@@ -1100,11 +758,7 @@ > */ > static LocalDevicePtr xf86SumAllocate(void) > { >-#ifdef XFREE86_V4 > LocalDevicePtr local = xf86AllocateInput(dedgeDrv, 0); >-#else >- LocalDevicePtr local = (LocalDevicePtr) xalloc(sizeof(LocalDeviceRec)); >-#endif > DigitalEdgeDevicePtr priv = (DigitalEdgeDevicePtr) xalloc(sizeof(DigitalEdgeDeviceRec)); > #if defined (sun) && !defined(i386) > char *dev_name = getenv("DEDGESKETCH_DEV"); >@@ -1113,11 +767,6 @@ > local->name = XI_NAME; > local->type_name = "DigitalEdge Tablet"; > local->flags = 0; /*XI86_NO_OPEN_ON_INIT; */ >-#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; >@@ -1161,43 +810,6 @@ > return local; > } > >-#ifndef XFREE86_V4 >- >-/* >-** DigitalEdge device association >-** Device section name and allocation function. >-*/ >-DeviceAssocRec dedgemasketch_assoc = { >- DEDGE_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_xf86DigitalEdge(unsigned long server_version) >-#endif >-{ >- xf86AddDeviceAssoc(&dedgemasketch_assoc); >- >- if (server_version != XF86_VERSION_CURRENT) { >- ErrorF("Warning: DigitalEdgeKetch module compiled for version%s\n", >- XF86_VERSION); >- return 0; >- } else { >- return 1; >- } >-} >-#endif >- >-#else >- > /* > * xf86SumUninit -- > * >@@ -1422,6 +1034,5 @@ > }; > > #endif /* XFree86LOADER */ >-#endif /* XFREE86_V4 */ > > /* end of xf86DigitalEdge.c */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 276599
:
196801
| 197640