This is a hack for the unit tests. They rebuild the driver without any
static symbols so we can hook into each function and test it independently
if needed.

Signed-off-by: Peter Hutterer <[email protected]>
---
 src/wcmCommon.c         |   46 ++++++++++++++++----------------
 src/wcmConfig.c         |   30 ++++++++++----------
 src/wcmFilter.c         |   16 +++++-----
 src/wcmISDV4.c          |   62 +++++++++++++++++++++---------------------
 src/wcmTouchFilter.c    |   20 +++++++-------
 src/wcmUSB.c            |   68 +++++++++++++++++++++++-----------------------
 src/wcmValidateDevice.c |   12 ++++----
 src/wcmXCommand.c       |   22 +++++++-------
 src/xf86Wacom.c         |   36 ++++++++++++------------
 src/xf86Wacom.h         |    9 ++++++
 10 files changed, 165 insertions(+), 156 deletions(-)

diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index 0636169..0c2285d 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -36,7 +36,7 @@
  * data beforehand.
  */
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 11
-static int *VCOPY(const int *valuators, int nvals)
+STATIC int *VCOPY(const int *valuators, int nvals)
 {
        static int v[MAX_VALUATORS];
        memcpy(v, valuators, nvals * sizeof(int));
@@ -52,10 +52,10 @@ static int *VCOPY(const int *valuators, int nvals)
  * Static functions
  ****************************************************************************/
 
-static void transPressureCurve(WacomDevicePtr pDev, WacomDeviceStatePtr 
pState);
-static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel, 
+STATIC void transPressureCurve(WacomDevicePtr pDev, WacomDeviceStatePtr 
pState);
+STATIC void commonDispatchDevice(WacomCommonPtr common, unsigned int channel,
        const WacomChannelPtr pChannel, int suppress);
-static void sendAButton(InputInfoPtr pInfo, int button, int mask,
+STATIC void sendAButton(InputInfoPtr pInfo, int button, int mask,
                        int first_val, int num_vals, int *valuators);
 
 /*****************************************************************************
@@ -118,7 +118,7 @@ void wcmMappingFactor(InputInfoPtr pInfo)
  *   previous one.
  ****************************************************************************/
 
-static void wcmSendButtons(InputInfoPtr pInfo, int buttons,
+STATIC void wcmSendButtons(InputInfoPtr pInfo, int buttons,
                           int first_val, int num_vals, int *valuators)
 {
        int button, mask, first_button;
@@ -175,7 +175,7 @@ void wcmEmitKeycode (DeviceIntPtr keydev, int keycode, int 
state)
  *   Count the number of key/button presses not released for the given key
  *   array.
  ****************************************************************************/
-static int countPresses(int keybtn, unsigned int* keys, int size)
+STATIC int countPresses(int keybtn, unsigned int* keys, int size)
 {
        int i, act, count = 0;
 
@@ -189,7 +189,7 @@ static int countPresses(int keybtn, unsigned int* keys, int 
size)
        return count;
 }
 
-static void sendAction(InputInfoPtr pInfo, int press,
+STATIC void sendAction(InputInfoPtr pInfo, int press,
                       unsigned int *keys, int nkeys,
                       int first_val, int num_val, int *valuators)
 {
@@ -272,7 +272,7 @@ static void sendAction(InputInfoPtr pInfo, int press,
  * sendAButton --
  *   Send one button event, called by wcmSendButtons
  ****************************************************************************/
-static void sendAButton(InputInfoPtr pInfo, int button, int mask,
+STATIC void sendAButton(InputInfoPtr pInfo, int button, int mask,
                        int first_val, int num_val, int *valuators)
 {
        WacomDevicePtr priv = (WacomDevicePtr) pInfo->private;
@@ -312,7 +312,7 @@ static void sendAButton(InputInfoPtr pInfo, int button, int 
mask,
  *   Get the wheel button to be sent for the current device state.
  ****************************************************************************/
 
-static int getWheelButton(InputInfoPtr pInfo, const WacomDeviceState* ds,
+STATIC int getWheelButton(InputInfoPtr pInfo, const WacomDeviceState* ds,
                          unsigned int **fakeKey)
 {
        WacomDevicePtr priv = (WacomDevicePtr) pInfo->private;
@@ -379,7 +379,7 @@ static int getWheelButton(InputInfoPtr pInfo, const 
WacomDeviceState* ds,
  *   Send events defined for relative/absolute wheels or strips
  ****************************************************************************/
 
-static void sendWheelStripEvents(InputInfoPtr pInfo, const WacomDeviceState* 
ds,
+STATIC void sendWheelStripEvents(InputInfoPtr pInfo, const WacomDeviceState* 
ds,
                                 int first_val, int num_vals, int *valuators)
 {
        WacomDevicePtr priv = (WacomDevicePtr) pInfo->private;
@@ -415,7 +415,7 @@ static void sendWheelStripEvents(InputInfoPtr pInfo, const 
WacomDeviceState* ds,
  *   Send events common between pad and stylus/cursor/eraser.
  ****************************************************************************/
 
-static void sendCommonEvents(InputInfoPtr pInfo, const WacomDeviceState* ds,
+STATIC void sendCommonEvents(InputInfoPtr pInfo, const WacomDeviceState* ds,
                             int first_val, int num_vals, int *valuators)
 {
        WacomDevicePtr priv = (WacomDevicePtr) pInfo->private;
@@ -482,7 +482,7 @@ void wcmRotateAndScaleCoordinates(InputInfoPtr pInfo, int* 
x, int* y)
        DBG(10, priv, "rotate/scaled to %d/%d\n", *x, *y);
 }
 
-static void wcmUpdateOldState(const InputInfoPtr pInfo,
+STATIC void wcmUpdateOldState(const InputInfoPtr pInfo,
                              const WacomDeviceState *ds)
 {
        const WacomDevicePtr priv = (WacomDevicePtr) pInfo->private;
@@ -513,7 +513,7 @@ static void wcmUpdateOldState(const InputInfoPtr pInfo,
        priv->oldThrottle = ds->throttle;
 }
 
-static void
+STATIC void
 wcmSendPadEvents(InputInfoPtr pInfo, const WacomDeviceState* ds,
                 int first_val, int num_vals, int *valuators)
 {
@@ -549,7 +549,7 @@ wcmSendPadEvents(InputInfoPtr pInfo, const 
WacomDeviceState* ds,
 }
 
 /* Send events for all tools but pads */
-static void
+STATIC void
 wcmSendNonPadEvents(InputInfoPtr pInfo, const WacomDeviceState *ds,
                    int first_val, int num_vals, int *valuators)
 {
@@ -762,7 +762,7 @@ void wcmSendEvents(InputInfoPtr pInfo, const 
WacomDeviceState* ds)
  *  if not.
  ****************************************************************************/
 
-static int wcmCheckSuppress(WacomCommonPtr common,
+STATIC int wcmCheckSuppress(WacomCommonPtr common,
                            const WacomDeviceState* dsOrig,
                            WacomDeviceState* dsNew)
 {
@@ -930,7 +930,7 @@ void wcmEvent(WacomCommonPtr common, unsigned int channel,
                commonDispatchDevice(common,channel,pChannel, suppress);
 }
 
-static int idtotype(int id)
+STATIC int idtotype(int id)
 {
        int type = CURSOR_ID;
 
@@ -973,7 +973,7 @@ static int idtotype(int id)
  * Identify the device type (STYLUS_ID, etc.) based on the device_id or the
  * current tool serial number.
  */
-static int findDeviceType(const WacomCommonPtr common,
+STATIC int findDeviceType(const WacomCommonPtr common,
                          const WacomDeviceState *ds)
 {
        WacomToolPtr tool = NULL;
@@ -1013,7 +1013,7 @@ static int findDeviceType(const WacomCommonPtr common,
 }
 
 /* Find the device the current events are meant for */
-static WacomToolPtr findTool(const WacomCommonPtr common,
+STATIC WacomToolPtr findTool(const WacomCommonPtr common,
                             const WacomDeviceState *ds)
 {
        WacomToolPtr tooldef = NULL;
@@ -1099,7 +1099,7 @@ static WacomToolPtr findTool(const WacomCommonPtr common,
  * from the raw pressure to prevent a potential
  * left-click before the pen touches the tablet.
  */
-static int
+STATIC int
 normalizePressure(WacomDevicePtr priv, const WacomDeviceState *ds)
 {
        WacomCommonPtr common = priv->common;
@@ -1126,7 +1126,7 @@ normalizePressure(WacomDevicePtr priv, const 
WacomDeviceState *ds)
  * Returns the state of all buttons, but buttons other than button 1 are
  * unmodified.
  */
-static int
+STATIC int
 setPressureButton(const WacomDevicePtr priv, const WacomDeviceState *ds)
 {
        WacomCommonPtr common = priv->common;
@@ -1153,7 +1153,7 @@ setPressureButton(const WacomDevicePtr priv, const 
WacomDeviceState *ds)
        return buttons;
 }
 
-static void commonDispatchDevice(WacomCommonPtr common, unsigned int channel,
+STATIC void commonDispatchDevice(WacomCommonPtr common, unsigned int channel,
                                 const WacomChannelPtr pChannel, Bool suppress)
 {
        InputInfoPtr pDev = NULL;
@@ -1400,7 +1400,7 @@ void wcmSoftOutEvent(InputInfoPtr pInfo)
 ** Transformations
 *****************************************************************************/
 
-static void transPressureCurve(WacomDevicePtr pDev, WacomDeviceStatePtr pState)
+STATIC void transPressureCurve(WacomDevicePtr pDev, WacomDeviceStatePtr pState)
 {
        /* clip the pressure */
        int p = max(0, pState->pressure);
@@ -1436,7 +1436,7 @@ Bool wcmPointInArea(WacomToolAreaPtr area, int x, int y)
 
 /* wcmAreasOverlap - check if two areas are overlapping */
 
-static Bool wcmAreasOverlap(WacomToolAreaPtr area1, WacomToolAreaPtr area2)
+STATIC Bool wcmAreasOverlap(WacomToolAreaPtr area1, WacomToolAreaPtr area2)
 {
        if (wcmPointInArea(area1, area2->topX, area2->topY) ||
            wcmPointInArea(area1, area2->topX, area2->bottomY) ||
diff --git a/src/wcmConfig.c b/src/wcmConfig.c
index c2d4fba..4adf845 100644
--- a/src/wcmConfig.c
+++ b/src/wcmConfig.c
@@ -33,7 +33,7 @@
  * Allocate the generic bits needed by any wacom device, regardless of type.
  ****************************************************************************/
 
-static int wcmAllocate(InputInfoPtr pInfo)
+STATIC int wcmAllocate(InputInfoPtr pInfo)
 {
        WacomDevicePtr   priv   = NULL;
        WacomCommonPtr   common = NULL;
@@ -151,7 +151,7 @@ error:
  * Free the memory allocated by wcmAllocate
  ****************************************************************************/
 
-static void wcmFree(InputInfoPtr pInfo)
+STATIC void wcmFree(InputInfoPtr pInfo)
 {
        WacomDevicePtr priv = pInfo->private;
 
@@ -166,7 +166,7 @@ static void wcmFree(InputInfoPtr pInfo)
        pInfo->private = NULL;
 }
 
-static int wcmSetType(InputInfoPtr pInfo, const char *type)
+STATIC int wcmSetType(InputInfoPtr pInfo, const char *type)
 {
        WacomDevicePtr priv = pInfo->private;
 
@@ -239,7 +239,7 @@ int wcmGetPhyDeviceID(WacomDevicePtr priv)
  * starts making sense again.
  */
 
-static char *default_options[] =
+STATIC char *default_options[] =
 {
        "StopBits",    "1",
        "DataBits",    "8",
@@ -252,7 +252,7 @@ static char *default_options[] =
 
 /* wcmUninit - called when the device is no longer needed. */
 
-static void wcmUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+STATIC void wcmUninit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 {
        WacomDevicePtr priv = (WacomDevicePtr) pInfo->private;
        WacomDevicePtr dev;
@@ -344,7 +344,7 @@ static void wcmUninit(InputDriverPtr drv, InputInfoPtr 
pInfo, int flags)
  * Returns 1 on a found match or 0 otherwise.
  * Common_return is set to the common struct in use by this device.
  */
-static Bool wcmMatchDevice(InputInfoPtr pLocal, WacomCommonPtr *common_return)
+STATIC Bool wcmMatchDevice(InputInfoPtr pLocal, WacomCommonPtr *common_return)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pLocal->private;
        WacomCommonPtr common = priv->common;
@@ -381,7 +381,7 @@ static Bool wcmMatchDevice(InputInfoPtr pLocal, 
WacomCommonPtr *common_return)
  * USB and ISDV4. Let each class try to detect the type by checking what's
  * behind the fd.
  */
-static Bool
+STATIC Bool
 wcmDetectDeviceClass(const InputInfoPtr pInfo)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -401,7 +401,7 @@ wcmDetectDeviceClass(const InputInfoPtr pInfo)
        return (common->wcmDevCls != NULL);
 }
 
-static Bool
+STATIC Bool
 wcmInitModel(InputInfoPtr pInfo)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -420,9 +420,9 @@ wcmInitModel(InputInfoPtr pInfo)
 /* wcmPreInit - called for each input devices with the driver set to
  * "wacom" */
 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
-static int NewWcmPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
+STATIC int NewWcmPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags);
 
-static InputInfoPtr wcmPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
+STATIC InputInfoPtr wcmPreInit(InputDriverPtr drv, IDevPtr dev, int flags)
 {
        InputInfoPtr pInfo = NULL;
 
@@ -447,9 +447,9 @@ static InputInfoPtr wcmPreInit(InputDriverPtr drv, IDevPtr 
dev, int flags)
        }
 }
 
-static int NewWcmPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+STATIC int NewWcmPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 #else
-static int wcmPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
+STATIC int wcmPreInit(InputDriverPtr drv, InputInfoPtr pInfo, int flags)
 #endif
 {
        WacomDevicePtr priv = NULL;
@@ -570,20 +570,20 @@ InputDriverRec WACOM =
 
 /* wcmUnplug - Uninitialize the device */
 
-static void wcmUnplug(pointer p)
+STATIC void wcmUnplug(pointer p)
 {
 }
 
 /* wcmPlug - called by the module loader */
 
-static pointer wcmPlug(pointer module, pointer options, int* errmaj,
+STATIC pointer wcmPlug(pointer module, pointer options, int* errmaj,
                int* errmin)
 {
        xf86AddInputDriver(&WACOM, module, 0);
        return module;
 }
 
-static XF86ModuleVersionInfo wcmVersionRec =
+STATIC XF86ModuleVersionInfo wcmVersionRec =
 {
        "wacom",
        MODULEVENDORSTRING,
diff --git a/src/wcmFilter.c b/src/wcmFilter.c
index 9f4f366..47d5d3f 100644
--- a/src/wcmFilter.c
+++ b/src/wcmFilter.c
@@ -29,12 +29,12 @@
  * Static functions
  ****************************************************************************/
 
-static void filterCurveToLine(int* pCurve, int nMax, double x0, double y0,
+STATIC void filterCurveToLine(int* pCurve, int nMax, double x0, double y0,
                double x1, double y1, double x2, double y2,
                double x3, double y3);
-static int filterOnLine(double x0, double y0, double x1, double y1,
+STATIC int filterOnLine(double x0, double y0, double x1, double y1,
                double a, double b);
-static void filterLine(int* pCurve, int nMax, int x0, int y0, int x1, int y1);
+STATIC void filterLine(int* pCurve, int nMax, int x0, int y0, int x1, int y1);
 void wcmTilt2R(WacomDeviceStatePtr ds);
 
 
@@ -92,7 +92,7 @@ void wcmResetSampleCounter(const WacomChannelPtr pChannel)
 }
 
 
-static void filterNearestPoint(double x0, double y0, double x1, double y1,
+STATIC void filterNearestPoint(double x0, double y0, double x1, double y1,
                double a, double b, double* x, double* y)
 {
        double vx, vy, wx, wy, d1, d2, c;
@@ -123,7 +123,7 @@ static void filterNearestPoint(double x0, double y0, double 
x1, double y1,
        }
 }
 
-static int filterOnLine(double x0, double y0, double x1, double y1,
+STATIC int filterOnLine(double x0, double y0, double x1, double y1,
                double a, double b)
 {
         double x, y, d;
@@ -132,7 +132,7 @@ static int filterOnLine(double x0, double y0, double x1, 
double y1,
        return d < 0.00001; /* within 100th of a point (1E-2 squared) */
 }
 
-static void filterCurveToLine(int* pCurve, int nMax, double x0, double y0,
+STATIC void filterCurveToLine(int* pCurve, int nMax, double x0, double y0,
                double x1, double y1, double x2, double y2,
                double x3, double y3)
 {
@@ -165,7 +165,7 @@ static void filterCurveToLine(int* pCurve, int nMax, double 
x0, double y0,
        filterCurveToLine(pCurve,nMax,e,f,c2,d2,x32,y32,x3,y3);
 }
 
-static void filterLine(int* pCurve, int nMax, int x0, int y0, int x1, int y1)
+STATIC void filterLine(int* pCurve, int nMax, int x0, int y0, int x1, int y1)
 {
        int dx, dy, ax, ay, sx, sy, x, y, d;
 
@@ -214,7 +214,7 @@ static void filterLine(int* pCurve, int nMax, int x0, int 
y0, int x1, int y1)
                }
        }
 }
-static void storeRawSample(WacomCommonPtr common, WacomChannelPtr pChannel,
+STATIC void storeRawSample(WacomCommonPtr common, WacomChannelPtr pChannel,
                           WacomDeviceStatePtr ds)
 {
        WacomFilterState *fs;
diff --git a/src/wcmISDV4.c b/src/wcmISDV4.c
index 2c3ca9a..f8fc44d 100644
--- a/src/wcmISDV4.c
+++ b/src/wcmISDV4.c
@@ -64,18 +64,18 @@ typedef struct {
        int baudrate;
 } wcmISDV4Data;
 
-static Bool isdv4Detect(InputInfoPtr);
-static Bool isdv4ParseOptions(InputInfoPtr pInfo);
-static Bool isdv4Init(InputInfoPtr, char* id, float *version);
-static int isdv4ProbeKeys(InputInfoPtr pInfo);
-static void isdv4InitISDV4(WacomCommonPtr, const char* id, float version);
-static int isdv4GetRanges(InputInfoPtr);
-static int isdv4StartTablet(InputInfoPtr);
-static int isdv4StopTablet(InputInfoPtr);
-static int isdv4Parse(InputInfoPtr, const unsigned char* data, int len);
-static int wcmSerialValidate(InputInfoPtr pInfo, const unsigned char* data);
-static int wcmWaitForTablet(InputInfoPtr pInfo, char * data, int size);
-static int wcmWriteWait(InputInfoPtr pInfo, const char* request);
+STATIC Bool isdv4Detect(InputInfoPtr);
+STATIC Bool isdv4ParseOptions(InputInfoPtr pInfo);
+STATIC Bool isdv4Init(InputInfoPtr, char* id, float *version);
+STATIC int isdv4ProbeKeys(InputInfoPtr pInfo);
+STATIC void isdv4InitISDV4(WacomCommonPtr, const char* id, float version);
+STATIC int isdv4GetRanges(InputInfoPtr);
+STATIC int isdv4StartTablet(InputInfoPtr);
+STATIC int isdv4StopTablet(InputInfoPtr);
+STATIC int isdv4Parse(InputInfoPtr, const unsigned char* data, int len);
+STATIC int wcmSerialValidate(InputInfoPtr pInfo, const unsigned char* data);
+STATIC int wcmWaitForTablet(InputInfoPtr pInfo, char * data, int size);
+STATIC int wcmWriteWait(InputInfoPtr pInfo, const char* request);
 
        WacomDeviceClass gWacomISDV4Device =
        {
@@ -95,7 +95,7 @@ static int wcmWriteWait(InputInfoPtr pInfo, const char* 
request);
                isdv4Parse,
        };
 
-static void memdump(InputInfoPtr pInfo, char *buffer, unsigned int len)
+STATIC void memdump(InputInfoPtr pInfo, char *buffer, unsigned int len)
 {
 #ifdef DEBUG
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -116,7 +116,7 @@ static void memdump(InputInfoPtr pInfo, char *buffer, 
unsigned int len)
 }
 
 
-static int wcmWait(int t)
+STATIC int wcmWait(int t)
 {
        int err = xf86WaitForInput(-1, ((t) * 1000));
        if (err != -1)
@@ -132,7 +132,7 @@ static int wcmWait(int t)
  * The ISDV protocol requires that the first byte of a new packet has the
  * HEADER_BIT set and subsequent packets do not.
  ****************************************************************************/
-static int wcmSkipInvalidBytes(const unsigned char* data, int len)
+STATIC int wcmSkipInvalidBytes(const unsigned char* data, int len)
 {
        int n = 0;
 
@@ -149,7 +149,7 @@ static int wcmSkipInvalidBytes(const unsigned char* data, 
int len)
  *   positive number of bytes to skip on error.
  ****************************************************************************/
 
-static int wcmSerialValidate(InputInfoPtr pInfo, const unsigned char* data)
+STATIC int wcmSerialValidate(InputInfoPtr pInfo, const unsigned char* data)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
@@ -186,7 +186,7 @@ static int wcmSerialValidate(InputInfoPtr pInfo, const 
unsigned char* data)
  * isdv4Detect -- Test if the attached device is ISDV4.
  ****************************************************************************/
 
-static Bool isdv4Detect(InputInfoPtr pInfo)
+STATIC Bool isdv4Detect(InputInfoPtr pInfo)
 {
        struct serial_struct ser;
        int rc;
@@ -201,7 +201,7 @@ static Bool isdv4Detect(InputInfoPtr pInfo)
 /*****************************************************************************
  * isdv4ParseOptions -- parse ISDV4-specific options
  ****************************************************************************/
-static Bool isdv4ParseOptions(InputInfoPtr pInfo)
+STATIC Bool isdv4ParseOptions(InputInfoPtr pInfo)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
@@ -248,7 +248,7 @@ static Bool isdv4ParseOptions(InputInfoPtr pInfo)
  * isdv4Init --
  ****************************************************************************/
 
-static Bool isdv4Init(InputInfoPtr pInfo, char* id, float *version)
+STATIC Bool isdv4Init(InputInfoPtr pInfo, char* id, float *version)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
@@ -275,7 +275,7 @@ static Bool isdv4Init(InputInfoPtr pInfo, char* id, float 
*version)
  * isdv4Query -- Query the device
  ****************************************************************************/
 
-static int isdv4Query(InputInfoPtr pInfo, const char* query, char* data)
+STATIC int isdv4Query(InputInfoPtr pInfo, const char* query, char* data)
 {
 #ifdef DEBUG
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -310,7 +310,7 @@ static int isdv4Query(InputInfoPtr pInfo, const char* 
query, char* data)
  * isdv4InitISDV4 -- Setup the device
  ****************************************************************************/
 
-static void isdv4InitISDV4(WacomCommonPtr common, const char* id, float 
version)
+STATIC void isdv4InitISDV4(WacomCommonPtr common, const char* id, float 
version)
 {
        /* set parameters */
        common->wcmProtocolLevel = WCM_PROTOCOL_4;
@@ -330,7 +330,7 @@ static void isdv4InitISDV4(WacomCommonPtr common, const 
char* id, float version)
  * isdv4GetRanges -- get ranges of the device
  ****************************************************************************/
 
-static int isdv4GetRanges(InputInfoPtr pInfo)
+STATIC int isdv4GetRanges(InputInfoPtr pInfo)
 {
        char data[BUFFER_SIZE];
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -534,7 +534,7 @@ out:
        return ret;
 }
 
-static int isdv4StartTablet(InputInfoPtr pInfo)
+STATIC int isdv4StartTablet(InputInfoPtr pInfo)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
@@ -550,7 +550,7 @@ static int isdv4StartTablet(InputInfoPtr pInfo)
        return Success;
 }
 
-static int isdv4StopTablet(InputInfoPtr pInfo)
+STATIC int isdv4StopTablet(InputInfoPtr pInfo)
 {
 #if DEBUG
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -579,7 +579,7 @@ static int isdv4StopTablet(InputInfoPtr pInfo)
        return Success;
 }
 
-static int isdv4Parse(InputInfoPtr pInfo, const unsigned char* data, int len)
+STATIC int isdv4Parse(InputInfoPtr pInfo, const unsigned char* data, int len)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
@@ -768,7 +768,7 @@ static int isdv4Parse(InputInfoPtr pInfo, const unsigned 
char* data, int len)
  *   send a request
  ****************************************************************************/
 
-static int wcmWriteWait(InputInfoPtr pInfo, const char* request)
+STATIC int wcmWriteWait(InputInfoPtr pInfo, const char* request)
 {
        int len, maxtry = MAXTRY;
 
@@ -799,7 +799,7 @@ static int wcmWriteWait(InputInfoPtr pInfo, const char* 
request)
  *   wait for tablet data
  ****************************************************************************/
 
-static int wcmWaitForTablet(InputInfoPtr pInfo, char* answer, int size)
+STATIC int wcmWaitForTablet(InputInfoPtr pInfo, char* answer, int size)
 {
        int len, maxtry = MAXTRY;
 
@@ -827,7 +827,7 @@ static int wcmWaitForTablet(InputInfoPtr pInfo, char* 
answer, int size)
        return maxtry;
 }
 
-static int set_keybits_wacom(int id, unsigned long *keys)
+STATIC int set_keybits_wacom(int id, unsigned long *keys)
 {
        int tablet_id = 0;
 
@@ -860,7 +860,7 @@ static int set_keybits_wacom(int id, unsigned long *keys)
        return tablet_id;
 }
 
-static int set_keybits_fujitsu(int id, unsigned long *keys)
+STATIC int set_keybits_fujitsu(int id, unsigned long *keys)
 {
        int tablet_id = 0x90; /* default to penabled */
 
@@ -880,7 +880,7 @@ typedef struct {
        int (*set_bits)(int id, unsigned long* keys);
 } ISDV4ModelDesc;
 
-static ISDV4ModelDesc isdv4_models[] = {
+STATIC ISDV4ModelDesc isdv4_models[] = {
        { "WACf%x", set_keybits_wacom },
        { "FUJ%x", set_keybits_fujitsu },
        { NULL, 0 }
@@ -893,7 +893,7 @@ static ISDV4ModelDesc isdv4_models[] = {
  * device ID. This matching only works for known devices (see the
  * isdv4_model list), all others are simply assumed to be pen + erasor.
  */
-static int isdv4ProbeKeys(InputInfoPtr pInfo)
+STATIC int isdv4ProbeKeys(InputInfoPtr pInfo)
 {
        int id;
        int tablet_id = 0x90;
diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c
index 793d649..4e12be3 100644
--- a/src/wcmTouchFilter.c
+++ b/src/wcmTouchFilter.c
@@ -39,10 +39,10 @@
 #define WCM_SCROLL_LEFT               6        /* horizontal left */
 #define WCM_SCROLL_RIGHT              7        /* horizontal right */
 
-static void wcmFingerScroll(WacomDevicePtr priv);
-static void wcmFingerZoom(WacomDevicePtr priv);
+STATIC void wcmFingerScroll(WacomDevicePtr priv);
+STATIC void wcmFingerZoom(WacomDevicePtr priv);
 
-static double touchDistance(WacomDeviceState ds0, WacomDeviceState ds1)
+STATIC double touchDistance(WacomDeviceState ds0, WacomDeviceState ds1)
 {
        int xDelta = ds0.x - ds1.x;
        int yDelta = ds0.y - ds1.y;
@@ -50,7 +50,7 @@ static double touchDistance(WacomDeviceState ds0, 
WacomDeviceState ds1)
        return distance;
 }
 
-static Bool pointsInLine(WacomCommonPtr common, WacomDeviceState ds0,
+STATIC Bool pointsInLine(WacomCommonPtr common, WacomDeviceState ds0,
                WacomDeviceState ds1)
 {
        Bool ret = FALSE;
@@ -84,7 +84,7 @@ static Bool pointsInLine(WacomCommonPtr common, 
WacomDeviceState ds0,
 }
 
 /* send a button event */
-static void wcmSendButtonClick(WacomDevicePtr priv, int button, int state)
+STATIC void wcmSendButtonClick(WacomDevicePtr priv, int button, int state)
 {
        int x = 0;
        int y = 0;
@@ -110,7 +110,7 @@ static void wcmSendButtonClick(WacomDevicePtr priv, int 
button, int state)
  *   translate second finger tap to right click
  ****************************************************************************/
 
-static void wcmFingerTapToClick(WacomDevicePtr priv)
+STATIC void wcmFingerTapToClick(WacomDevicePtr priv)
 {
        WacomCommonPtr common = priv->common;
        WacomChannelPtr firstChannel = common->wcmChannel;
@@ -144,7 +144,7 @@ static void wcmFingerTapToClick(WacomDevicePtr priv)
 /* process single finger Relative mode events
  * if touch is not in an active gesture mode.
  */
-static void wcmFirstFingerClick(WacomCommonPtr common)
+STATIC void wcmFirstFingerClick(WacomCommonPtr common)
 {
        static int tmpStamp = 0;
        WacomChannelPtr aChannel = common->wcmChannel;
@@ -291,7 +291,7 @@ ret:
                wcmFirstFingerClick(common);
 }
 
-static void wcmSendScrollEvent(WacomDevicePtr priv, int dist,
+STATIC void wcmSendScrollEvent(WacomDevicePtr priv, int dist,
                         int buttonUp, int buttonDn)
 {
        int button = (dist > 0) ? buttonUp : buttonDn;
@@ -322,7 +322,7 @@ static void wcmSendScrollEvent(WacomDevicePtr priv, int 
dist,
        }
 }
 
-static void wcmFingerScroll(WacomDevicePtr priv)
+STATIC void wcmFingerScroll(WacomDevicePtr priv)
 {
        WacomCommonPtr common = priv->common;
        WacomChannelPtr firstChannel = common->wcmChannel;
@@ -421,7 +421,7 @@ static void wcmFingerScroll(WacomDevicePtr priv)
        }
 }
 
-static void wcmFingerZoom(WacomDevicePtr priv)
+STATIC void wcmFingerZoom(WacomDevicePtr priv)
 {
        WacomCommonPtr common = priv->common;
        WacomChannelPtr firstChannel = common->wcmChannel;
diff --git a/src/wcmUSB.c b/src/wcmUSB.c
index cfaf920..5a4dab6 100644
--- a/src/wcmUSB.c
+++ b/src/wcmUSB.c
@@ -40,23 +40,23 @@ typedef struct {
        struct input_event wcmEvents[MAX_USB_EVENTS];
 } wcmUSBData;
 
-static Bool usbDetect(InputInfoPtr);
-static Bool usbWcmInit(InputInfoPtr pDev, char* id, float *version);
-static int usbProbeKeys(InputInfoPtr pInfo);
-static int usbStart(InputInfoPtr pInfo);
-static void usbInitProtocol5(WacomCommonPtr common, const char* id,
+STATIC Bool usbDetect(InputInfoPtr);
+STATIC Bool usbWcmInit(InputInfoPtr pDev, char* id, float *version);
+STATIC int usbProbeKeys(InputInfoPtr pInfo);
+STATIC int usbStart(InputInfoPtr pInfo);
+STATIC void usbInitProtocol5(WacomCommonPtr common, const char* id,
        float version);
-static void usbInitProtocol4(WacomCommonPtr common, const char* id,
+STATIC void usbInitProtocol4(WacomCommonPtr common, const char* id,
        float version);
 int usbWcmGetRanges(InputInfoPtr pInfo);
-static int usbParse(InputInfoPtr pInfo, const unsigned char* data, int len);
-static int usbDetectConfig(InputInfoPtr pInfo);
-static void usbParseEvent(InputInfoPtr pInfo,
+STATIC int usbParse(InputInfoPtr pInfo, const unsigned char* data, int len);
+STATIC int usbDetectConfig(InputInfoPtr pInfo);
+STATIC void usbParseEvent(InputInfoPtr pInfo,
        const struct input_event* event);
-static void usbParseSynEvent(InputInfoPtr pInfo,
+STATIC void usbParseSynEvent(InputInfoPtr pInfo,
                             const struct input_event *event);
-static void usbDispatchEvents(InputInfoPtr pInfo);
-static int usbChooseChannel(WacomCommonPtr common);
+STATIC void usbDispatchEvents(InputInfoPtr pInfo);
+STATIC int usbChooseChannel(WacomCommonPtr common);
 
        WacomDeviceClass gWacomUSBDevice =
        {
@@ -67,7 +67,7 @@ static int usbChooseChannel(WacomCommonPtr common);
        };
 
 #define DEFINE_MODEL(mname, identifier, protocol) \
-static struct _WacomModel mname =              \
+STATIC struct _WacomModel mname =              \
 {                                              \
        .name = identifier,                     \
        .Initialize = usbInitProtocol##protocol,\
@@ -104,7 +104,7 @@ DEFINE_MODEL(usbTabletPC,   "USB TabletPC",         4);
  *   Test if the attached device is USB.
  ****************************************************************************/
 
-static Bool usbDetect(InputInfoPtr pInfo)
+STATIC Bool usbDetect(InputInfoPtr pInfo)
 {
        int version;
        int err;
@@ -128,7 +128,7 @@ static Bool usbDetect(InputInfoPtr pInfo)
 /*****************************************************************************
  * usbStart --
  ****************************************************************************/
-static int
+STATIC int
 usbStart(InputInfoPtr pInfo)
 {
        int err;
@@ -149,7 +149,7 @@ usbStart(InputInfoPtr pInfo)
 /* Key codes used to mark tablet buttons -- must be in sync
  * with the keycode array in wacom kernel drivers.
  */
-static unsigned short padkey_codes [] = {
+STATIC unsigned short padkey_codes [] = {
        BTN_0, BTN_1, BTN_2, BTN_3, BTN_4,
        BTN_5, BTN_6, BTN_7, BTN_8, BTN_9,
        BTN_A, BTN_B, BTN_C, BTN_X, BTN_Y, BTN_Z,
@@ -163,12 +163,12 @@ static unsigned short padkey_codes [] = {
 #define WCM_USB_MAX_MOUSE_BUTTONS 5
 #define WCM_USB_MAX_STYLUS_BUTTONS 3
 
-static unsigned short mouse_codes [] = {
+STATIC unsigned short mouse_codes [] = {
        BTN_LEFT, BTN_MIDDLE, BTN_RIGHT, BTN_BACK, BTN_FORWARD,
        BTN_SIDE, BTN_EXTRA
 };
 
-static struct
+STATIC struct
 {
        const unsigned int vendor_id;
        const unsigned int model_id;
@@ -308,7 +308,7 @@ static struct
        { LENOVO_VENDOR_ID, 0x6004, 2540, 2540, &usbTabletPC   } /* Pen-only */
 };
 
-static Bool usbWcmInit(InputInfoPtr pInfo, char* id, float *version)
+STATIC Bool usbWcmInit(InputInfoPtr pInfo, char* id, float *version)
 {
        int i;
        struct input_id sID;
@@ -383,7 +383,7 @@ static Bool usbWcmInit(InputInfoPtr pInfo, char* id, float 
*version)
        return Success;
 }
 
-static void usbInitProtocol5(WacomCommonPtr common, const char* id,
+STATIC void usbInitProtocol5(WacomCommonPtr common, const char* id,
        float version)
 {
        common->wcmProtocolLevel = WCM_PROTOCOL_5;
@@ -399,7 +399,7 @@ static void usbInitProtocol5(WacomCommonPtr common, const 
char* id,
 
 }
 
-static void usbInitProtocol4(WacomCommonPtr common, const char* id,
+STATIC void usbInitProtocol4(WacomCommonPtr common, const char* id,
        float version)
 {
        common->wcmProtocolLevel = WCM_PROTOCOL_4;
@@ -528,7 +528,7 @@ int usbWcmGetRanges(InputInfoPtr pInfo)
        return Success;
 }
 
-static int usbDetectConfig(InputInfoPtr pInfo)
+STATIC int usbDetectConfig(InputInfoPtr pInfo)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
@@ -545,7 +545,7 @@ static int usbDetectConfig(InputInfoPtr pInfo)
        return TRUE;
 }
 
-static int usbParse(InputInfoPtr pInfo, const unsigned char* data, int len)
+STATIC int usbParse(InputInfoPtr pInfo, const unsigned char* data, int len)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
@@ -560,7 +560,7 @@ static int usbParse(InputInfoPtr pInfo, const unsigned 
char* data, int len)
 /* Up to MAX_CHANNEL tools can be tracked concurrently by driver.
  * Chose a channel to use to track current batch of events.
  */
-static int usbChooseChannel(WacomCommonPtr common)
+STATIC int usbChooseChannel(WacomCommonPtr common)
 {
        /* figure out the channel to use based on serial number */
        int i, channel = -1;
@@ -700,7 +700,7 @@ static int usbChooseChannel(WacomCommonPtr common)
        return channel;
 }
 
-static void usbParseEvent(InputInfoPtr pInfo,
+STATIC void usbParseEvent(InputInfoPtr pInfo,
        const struct input_event* event)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -735,7 +735,7 @@ static void usbParseEvent(InputInfoPtr pInfo,
  * values and process them. At this point, all events up to the EV_SYN are
  * queued up in wcmEvents.
  */
-static void usbParseSynEvent(InputInfoPtr pInfo,
+STATIC void usbParseSynEvent(InputInfoPtr pInfo,
                             const struct input_event *event)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -791,7 +791,7 @@ skipEvent:
        private->wcmEventCnt = 0;
 }
 
-static int usbFilterEvent(WacomCommonPtr common, struct input_event *event)
+STATIC int usbFilterEvent(WacomCommonPtr common, struct input_event *event)
 {
        wcmUSBData* private = common->private;
 
@@ -840,7 +840,7 @@ static int usbFilterEvent(WacomCommonPtr common, struct 
input_event *event)
        return 0;
 }
 
-static int usbParseAbsEvent(WacomCommonPtr common,
+STATIC int usbParseAbsEvent(WacomCommonPtr common,
                            struct input_event *event, WacomDeviceState *ds)
 {
        int change = 1;
@@ -896,7 +896,7 @@ static int usbParseAbsEvent(WacomCommonPtr common,
        return change;
 }
 
-static int usbParseAbsMTEvent(WacomCommonPtr common, struct input_event *event)
+STATIC int usbParseAbsMTEvent(WacomCommonPtr common, struct input_event *event)
 {
        int change = 1;
        wcmUSBData* private = common->private;
@@ -937,7 +937,7 @@ static int usbParseAbsMTEvent(WacomCommonPtr common, struct 
input_event *event)
        return change;
 }
 
-static struct
+STATIC struct
 {
        unsigned long device_type;
        unsigned long tool_key;
@@ -962,7 +962,7 @@ static struct
                       (ds->buttons | (shift)) : (ds->buttons & ~(shift))); \
         } while (0)
 
-static int usbParseKeyEvent(WacomCommonPtr common,
+STATIC int usbParseKeyEvent(WacomCommonPtr common,
                            struct input_event *event, WacomDeviceState *ds,
                            WacomDeviceState *dslast)
 {
@@ -1105,7 +1105,7 @@ static int usbParseKeyEvent(WacomCommonPtr common,
 }
 
 /* Handle all button presses except for stylus buttons */
-static int usbParseBTNEvent(WacomCommonPtr common,
+STATIC int usbParseBTNEvent(WacomCommonPtr common,
                            struct input_event *event, WacomDeviceState *ds)
 {
        int shift, nkeys;
@@ -1150,7 +1150,7 @@ static int usbParseBTNEvent(WacomCommonPtr common,
        return change;
 }
 
-static void usbDispatchEvents(InputInfoPtr pInfo)
+STATIC void usbDispatchEvents(InputInfoPtr pInfo)
 {
        int i;
        WacomDeviceState *ds, *btn_ds;
@@ -1336,7 +1336,7 @@ static void usbDispatchEvents(InputInfoPtr pInfo)
  * on success or 0 on failure.
  * For USB devices, we simply copy the information the kernel gives us.
  */
-static int usbProbeKeys(InputInfoPtr pInfo)
+STATIC int usbProbeKeys(InputInfoPtr pInfo)
 {
        struct input_id wacom_id;
        WacomDevicePtr  priv = (WacomDevicePtr)pInfo->private;
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index e56350a..7050519 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -30,7 +30,7 @@
  * before or not: don't add the tool by hal/udev if user has defined at least
  * one tool for the device in xorg.conf. One device can have multiple tools
  * with the same type to individualize tools with serial number or areas */
-static Bool wcmCheckSource(InputInfoPtr pInfo, dev_t min_maj)
+STATIC Bool wcmCheckSource(InputInfoPtr pInfo, dev_t min_maj)
 {
        int match = 0;
        char* device;
@@ -117,7 +117,7 @@ ret:
        return isInUse;
 }
 
-static struct
+STATIC struct
 {
        const char* type;
        __u16 tool[3]; /* tool array is terminated by 0 */
@@ -306,7 +306,7 @@ int wcmDeviceTypeKeys(InputInfoPtr pInfo)
 /**
  * Duplicate xf86 options, replace the "type" option with the given type
  * (and the name with "$name $type" and convert them to InputOption */
-static InputOption *wcmOptionDupConvert(InputInfoPtr pInfo, const char* 
basename, const char *type)
+STATIC InputOption *wcmOptionDupConvert(InputInfoPtr pInfo, const char* 
basename, const char *type)
 {
        pointer original = pInfo->options;
        InputOption *iopts = NULL, *new;
@@ -347,7 +347,7 @@ static InputOption *wcmOptionDupConvert(InputInfoPtr pInfo, 
const char* basename
        return iopts;
 }
 
-static void wcmFreeInputOpts(InputOption* opts)
+STATIC void wcmFreeInputOpts(InputOption* opts)
 {
        InputOption *tmp = opts;
        while(opts)
@@ -366,7 +366,7 @@ static void wcmFreeInputOpts(InputOption* opts)
  * appended, so a device of product "Wacom" will then have a product "Wacom
  * eraser", "Wacom cursor", etc.
  */
-static InputAttributes* wcmDuplicateAttributes(InputInfoPtr pInfo,
+STATIC InputAttributes* wcmDuplicateAttributes(InputInfoPtr pInfo,
                                               const char *type)
 {
        int rc;
@@ -385,7 +385,7 @@ static InputAttributes* wcmDuplicateAttributes(InputInfoPtr 
pInfo,
  * erasor, stylus, pad, touch, cursor, etc.
  * Name of the new device is set automatically to "<device name> <type>".
  */
-static void wcmHotplug(InputInfoPtr pInfo, const char* basename, const char 
*type)
+STATIC void wcmHotplug(InputInfoPtr pInfo, const char* basename, const char 
*type)
 {
        DeviceIntPtr dev; /* dummy */
        InputOption *input_options;
diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index 8b9e0cd..12cf352 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -91,7 +91,7 @@ Atom prop_debuglevels;
 #endif
 
 /* Special case: format -32 means type is XA_ATOM */
-static Atom InitWcmAtom(DeviceIntPtr dev, char *name, int format, int nvalues, 
int *values)
+STATIC Atom InitWcmAtom(DeviceIntPtr dev, char *name, int format, int nvalues, 
int *values)
 {
        int i;
        Atom atom;
@@ -226,7 +226,7 @@ void InitWcmDeviceProperties(InputInfoPtr pInfo)
 
 /* Returns the offset of the property in the list given. If the property is
  * not found, a negative error code is returned. */
-static int wcmFindProp(Atom property, Atom *prop_list, int nprops)
+STATIC int wcmFindProp(Atom property, Atom *prop_list, int nprops)
 {
        int i;
 
@@ -241,7 +241,7 @@ static int wcmFindProp(Atom property, Atom *prop_list, int 
nprops)
        return i;
 }
 
-static int wcmSanityCheckProperty(XIPropertyValuePtr prop)
+STATIC int wcmSanityCheckProperty(XIPropertyValuePtr prop)
 {
        CARD32 *data;
        int j;
@@ -280,7 +280,7 @@ static int wcmSanityCheckProperty(XIPropertyValuePtr prop)
  * property handler lists. Properties stored there will be checked for value
  * changes whenever updated.
  */
-static void wcmUpdateActionPropHandlers(XIPropertyValuePtr prop, Atom 
*handlers)
+STATIC void wcmUpdateActionPropHandlers(XIPropertyValuePtr prop, Atom 
*handlers)
 {
        int i;
        CARD32 *values = (CARD32*)prop->data;
@@ -290,7 +290,7 @@ static void wcmUpdateActionPropHandlers(XIPropertyValuePtr 
prop, Atom *handlers)
                handlers[i] = values[i];
 }
 
-static void wcmUpdateButtonKeyActions(DeviceIntPtr dev, XIPropertyValuePtr 
prop,
+STATIC void wcmUpdateButtonKeyActions(DeviceIntPtr dev, XIPropertyValuePtr 
prop,
                                        unsigned int (*keys)[256], int skeys)
 {
        Atom *values = (Atom*)prop->data;
@@ -313,7 +313,7 @@ static void wcmUpdateButtonKeyActions(DeviceIntPtr dev, 
XIPropertyValuePtr prop,
 }
 
 /* Change the properties that hold the actual button actions */
-static int wcmSetActionProperties(DeviceIntPtr dev, Atom property,
+STATIC int wcmSetActionProperties(DeviceIntPtr dev, Atom property,
                                  XIPropertyValuePtr prop, BOOL checkonly)
 {
        InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate;
@@ -362,7 +362,7 @@ static int wcmSetActionProperties(DeviceIntPtr dev, Atom 
property,
        return abs(i);
 }
 
-static int wcmCheckActionProp(DeviceIntPtr dev, Atom property, 
XIPropertyValuePtr prop)
+STATIC int wcmCheckActionProp(DeviceIntPtr dev, Atom property, 
XIPropertyValuePtr prop)
 {
        InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate;
        XIPropertyValuePtr val;
@@ -386,7 +386,7 @@ static int wcmCheckActionProp(DeviceIntPtr dev, Atom 
property, XIPropertyValuePt
 
 /* Change the property that refers to which properties the actual button
  * actions are stored in */
-static int wcmSetPropertyButtonActions(DeviceIntPtr dev, Atom property,
+STATIC int wcmSetPropertyButtonActions(DeviceIntPtr dev, Atom property,
                                       XIPropertyValuePtr prop, BOOL checkonly)
 {
        InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate;
@@ -439,7 +439,7 @@ struct wheel_strip_update_t {
        unsigned int (*keys)[256];
 };
 
-static int wcmSetWheelOrStripProperty(DeviceIntPtr dev, Atom property,
+STATIC int wcmSetWheelOrStripProperty(DeviceIntPtr dev, Atom property,
                                      XIPropertyValuePtr prop, BOOL checkonly,
                                      struct wheel_strip_update_t *wsup)
 {
@@ -496,7 +496,7 @@ static int wcmSetWheelOrStripProperty(DeviceIntPtr dev, 
Atom property,
 }
 
 
-static int wcmSetWheelProperty(DeviceIntPtr dev, Atom property,
+STATIC int wcmSetWheelProperty(DeviceIntPtr dev, Atom property,
                               XIPropertyValuePtr prop, BOOL checkonly)
 {
        InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate;
@@ -516,7 +516,7 @@ static int wcmSetWheelProperty(DeviceIntPtr dev, Atom 
property,
        return wcmSetWheelOrStripProperty(dev, property, prop, checkonly, 
&wsup);
 }
 
-static int wcmSetStripProperty(DeviceIntPtr dev, Atom property,
+STATIC int wcmSetStripProperty(DeviceIntPtr dev, Atom property,
                               XIPropertyValuePtr prop, BOOL checkonly)
 {
        InputInfoPtr pInfo = (InputInfoPtr) dev->public.devicePrivate;
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index e8c4710..cdeeff0 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -55,13 +55,13 @@
 #define XIGetKnownProperty(prop) 0
 #endif
 
-static int wcmDevOpen(DeviceIntPtr pWcm);
-static int wcmReady(InputInfoPtr pInfo);
-static void wcmDevReadInput(InputInfoPtr pInfo);
-static void wcmDevControlProc(DeviceIntPtr device, PtrCtrl* ctrl);
+STATIC int wcmDevOpen(DeviceIntPtr pWcm);
+STATIC int wcmReady(InputInfoPtr pInfo);
+STATIC void wcmDevReadInput(InputInfoPtr pInfo);
+STATIC void wcmDevControlProc(DeviceIntPtr device, PtrCtrl* ctrl);
 int wcmDevChangeControl(InputInfoPtr pInfo, xDeviceCtl * control);
-static void wcmDevClose(InputInfoPtr pInfo);
-static int wcmDevProc(DeviceIntPtr pWcm, int what);
+STATIC void wcmDevClose(InputInfoPtr pInfo);
+STATIC int wcmDevProc(DeviceIntPtr pWcm, int what);
 
 WacomModule gWacomModule =
 {
@@ -77,15 +77,15 @@ WacomModule gWacomModule =
        wcmDevSwitchMode,
 };
 
-static void wcmKbdLedCallback(DeviceIntPtr di, LedCtrl * lcp)
+STATIC void wcmKbdLedCallback(DeviceIntPtr di, LedCtrl * lcp)
 {
 }
 
-static void wcmKbdCtrlCallback(DeviceIntPtr di, KeybdCtrl* ctrl)
+STATIC void wcmKbdCtrlCallback(DeviceIntPtr di, KeybdCtrl* ctrl)
 {
 }
 
-static int wcmInitArea(InputInfoPtr pInfo)
+STATIC int wcmInitArea(InputInfoPtr pInfo)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomToolAreaPtr area = priv->toolarea, inlist;
@@ -206,7 +206,7 @@ void wcmVirtualTabletPadding(InputInfoPtr pInfo)
  *    Initialize logical size and resolution for individual tool.
  ****************************************************************************/
 
-static void wcmInitialToolSize(InputInfoPtr pInfo)
+STATIC void wcmInitialToolSize(InputInfoPtr pInfo)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
@@ -245,7 +245,7 @@ static void wcmInitialToolSize(InputInfoPtr pInfo)
        return;
 }
 
-static int
+STATIC int
 wcmInitAxes(DeviceIntPtr pWcm)
 {
        InputInfoPtr pInfo = (InputInfoPtr)pWcm->public.devicePrivate;
@@ -438,7 +438,7 @@ wcmInitAxes(DeviceIntPtr pWcm)
  *    Set up the device's buttons, axes and keys
  ****************************************************************************/
 
-static int wcmDevInit(DeviceIntPtr pWcm)
+STATIC int wcmDevInit(DeviceIntPtr pWcm)
 {
        InputInfoPtr pInfo = (InputInfoPtr)pWcm->public.devicePrivate;
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -666,7 +666,7 @@ Bool wcmOpen(InputInfoPtr pInfo)
  *    Open the physical device and init information structs.
  ****************************************************************************/
 
-static int wcmDevOpen(DeviceIntPtr pWcm)
+STATIC int wcmDevOpen(DeviceIntPtr pWcm)
 {
        InputInfoPtr pInfo = (InputInfoPtr)pWcm->public.devicePrivate;
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -720,7 +720,7 @@ static int wcmDevOpen(DeviceIntPtr pWcm)
        return TRUE;
 }
 
-static int wcmReady(InputInfoPtr pInfo)
+STATIC int wcmReady(InputInfoPtr pInfo)
 {
 #ifdef DEBUG
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
@@ -738,7 +738,7 @@ static int wcmReady(InputInfoPtr pInfo)
  *   Read the device on IO signal
  ****************************************************************************/
 
-static void wcmDevReadInput(InputInfoPtr pInfo)
+STATIC void wcmDevReadInput(InputInfoPtr pInfo)
 {
        int loop=0;
        #define MAX_READ_LOOPS 10
@@ -836,7 +836,7 @@ int wcmDevChangeControl(InputInfoPtr pInfo, xDeviceCtl * 
control)
  * wcmDevControlProc --
  ****************************************************************************/
 
-static void wcmDevControlProc(DeviceIntPtr device, PtrCtrl* ctrl)
+STATIC void wcmDevControlProc(DeviceIntPtr device, PtrCtrl* ctrl)
 {
 #ifdef DEBUG
        InputInfoPtr pInfo = (InputInfoPtr)device->public.devicePrivate;
@@ -851,7 +851,7 @@ static void wcmDevControlProc(DeviceIntPtr device, PtrCtrl* 
ctrl)
  * wcmDevClose --
  ****************************************************************************/
 
-static void wcmDevClose(InputInfoPtr pInfo)
+STATIC void wcmDevClose(InputInfoPtr pInfo)
 {
        WacomDevicePtr priv = (WacomDevicePtr)pInfo->private;
        WacomCommonPtr common = priv->common;
@@ -877,7 +877,7 @@ static void wcmDevClose(InputInfoPtr pInfo)
  *   and disabled. DEVICE_CLOSE is called before removal of the device.
  ****************************************************************************/
 
-static int wcmDevProc(DeviceIntPtr pWcm, int what)
+STATIC int wcmDevProc(DeviceIntPtr pWcm, int what)
 {
        InputInfoPtr pInfo = (InputInfoPtr)pWcm->public.devicePrivate;
 #ifdef DEBUG
diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
index 2fc8850..6503820 100644
--- a/src/xf86Wacom.h
+++ b/src/xf86Wacom.h
@@ -61,6 +61,15 @@
 #endif
 
 /*****************************************************************************
+ * Unit test hack
+ ****************************************************************************/
+#ifndef NO_STATIC
+#define STATIC static
+#else
+#define STATIC
+#endif
+
+/*****************************************************************************
  * General Macros
  ****************************************************************************/
 
-- 
1.7.3.4


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to