From e50d70f38e90bde903c91dcd6f47cf01165fe977 Mon Sep 17 00:00:00 2001 From: Kaleb Keithley Date: Tue, 25 Nov 2003 19:28:46 +0000 Subject: [PATCH] XFree86 4.3.99.16 Bring the tree up to date for the Cygwin folks --- src/acecad.c | 46 +++++++++++++++++++++++++++------------------- src/acecad.h | 10 +++++++--- 2 files changed, 34 insertions(+), 22 deletions(-) diff --git a/src/acecad.c b/src/acecad.c index 7365114..f0e3e2d 100644 --- a/src/acecad.c +++ b/src/acecad.c @@ -23,7 +23,7 @@ * * */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/input/acecad/acecad.c,v 1.2 2001/11/26 16:25:52 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/input/acecad/acecad.c,v 1.5 2003/11/05 20:56:29 alanh Exp $ */ #define _ACECAD_C_ /***************************************************************************** @@ -72,7 +72,7 @@ #define MAX_EVENTS 50 -static InputDriverRec ACECAD = +InputDriverRec ACECAD = { 1, "acecad", @@ -83,7 +83,7 @@ static InputDriverRec ACECAD = 0 }; - +#ifdef XFree86LOADER static XF86ModuleVersionInfo VersionRec = { "acecad", @@ -99,18 +99,6 @@ static XF86ModuleVersionInfo VersionRec = }; -static const char *default_options[] = -{ - "BaudRate", "9600", - "StopBits", "1", - "DataBits", "8", - "Parity", "Odd", - "Vmin", "1", - "Vtime", "10", - "FlowControl", "Xoff", - NULL -}; - XF86ModuleData acecadModuleData = { &VersionRec, SetupProc, TearDownProc}; /***************************************************************************** @@ -143,7 +131,21 @@ TearDownProc( pointer p ) xfree (local); #endif } +#endif +static const char *default_options[] = +{ + "BaudRate", "9600", + "StopBits", "1", + "DataBits", "8", + "Parity", "Odd", + "Vmin", "1", + "Vtime", "10", + "FlowControl", "Xoff", + NULL +}; + +#ifdef LINUX_INPUT static int IsUSBLine(int fd) { @@ -160,7 +162,7 @@ IsUSBLine(int fd) return 0; } } - +#endif static InputInfoPtr AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) @@ -205,6 +207,7 @@ AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) } xf86ErrorFVerb( 6, "tty port opened successfully\n" ); +#ifdef LINUX_INPUT if(IsUSBLine(local->fd)){ priv->acecadUSB=1; @@ -215,8 +218,9 @@ AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) ErrorF ("Unable to query/initialize AceCad hardware.\n"); goto SetupProc_fail; } - } - else{ + } else +#endif + { priv->acecadUSB=0; local->read_input = ReadInput; @@ -297,7 +301,7 @@ AceCadPreInit(InputDriverPtr drv, IDevPtr dev, int flags) if ((local) && (local->fd)) xf86CloseSerial (local->fd); if (local) - xfree (local); + xf86DeleteInput (local, 0); if ((priv) && (priv->buffer)) XisbFree (priv->buffer); @@ -609,6 +613,7 @@ ReadInput (LocalDevicePtr local) /*xf86Msg(X_CONFIG, "Acecad Tablet Sortie Read Input\n");*/ } +#ifdef LINUX_INPUT #define set_bit(byte,nb,bit) (bit ? byte | (1<acecadMaxX,priv->acecadMaxY,priv->acecadMaxZ); return (Success); } +#endif static void NewPacket (AceCadPrivatePtr priv) diff --git a/src/acecad.h b/src/acecad.h index d1ec950..ef4431b 100644 --- a/src/acecad.h +++ b/src/acecad.h @@ -23,7 +23,7 @@ * * */ -/* $XFree86: xc/programs/Xserver/hw/xfree86/input/acecad/acecad.h,v 1.1 2001/08/13 19:35:00 dawes Exp $ */ +/* $XFree86: xc/programs/Xserver/hw/xfree86/input/acecad/acecad.h,v 1.3 2003/11/06 18:38:11 tsi Exp $ */ #ifndef _ACECAD_H_ #define _ACECAD_H_ @@ -88,24 +88,28 @@ typedef struct /****************************************************************************** * Declarations *****************************************************************************/ +#ifdef XFree86LOADER static MODULESETUPPROTO( SetupProc ); static void TearDownProc (void *); +#endif static Bool DeviceControl (DeviceIntPtr, int); static Bool DeviceOn (DeviceIntPtr); static Bool DeviceOff (DeviceIntPtr); static Bool DeviceClose (DeviceIntPtr); static Bool DeviceInit (DeviceIntPtr); static void ReadInput (LocalDevicePtr); -static void USBReadInput (LocalDevicePtr); static void CloseProc (LocalDevicePtr); static Bool ConvertProc (LocalDevicePtr, int, int, int, int, int, int, int, int, int *, int *); static Bool ReverseConvertProc(LocalDevicePtr , int , int , int*); static Bool QueryHardware (AceCadPrivatePtr); -static Bool USBQueryHardware (LocalDevicePtr); static void NewPacket (AceCadPrivatePtr priv); static Bool AceCadGetPacket (AceCadPrivatePtr); static InputInfoPtr AceCadPreInit(InputDriverPtr, IDevPtr , int); +#ifdef LINUX_INPUT +static void USBReadInput (LocalDevicePtr); +static Bool USBQueryHardware (LocalDevicePtr); static int IsUSBLine(int); +#endif #endif -- 2.32.0.93.g670b81a890