Instead of declaring functions in the C file and externing them from
wherever they are used, just declare them once in the header file.

Signed-off-by: Peter Hutterer <[email protected]>
---
 src/wcmCommon.c         |   13 -------------
 src/wcmConfig.c         |   10 ----------
 src/wcmTouchFilter.c    |    5 -----
 src/wcmValidateDevice.c |   10 ----------
 src/wcmXCommand.c       |   14 --------------
 src/xf86Wacom.c         |   15 ---------------
 src/xf86Wacom.h         |   38 ++++++++++++++++++++++++++++++++++++++
 7 files changed, 38 insertions(+), 67 deletions(-)

diff --git a/src/wcmCommon.c b/src/wcmCommon.c
index dd27137..afcca8d 100644
--- a/src/wcmCommon.c
+++ b/src/wcmCommon.c
@@ -25,19 +25,6 @@
 #include "Xwacom.h"
 #include <xkbsrv.h>
 
-void wcmEmitKeysym(DeviceIntPtr keydev, int keysym, int state);
-void wcmInitialScreens(LocalDevicePtr local);
-void wcmRotateTablet(LocalDevicePtr local, int value);
-void wcmRotateCoordinates(LocalDevicePtr local, int* x, int* y);
-
-extern int wcmDevSwitchModeCall(LocalDevicePtr local, int mode);
-extern void wcmChangeScreen(LocalDevicePtr local, int value);
-extern void wcmInitialCoordinates(LocalDevicePtr local, int axes);
-extern void wcmVirtualTabletSize(LocalDevicePtr local);
-extern void wcmVirtualTabletPadding(LocalDevicePtr local);
-extern void wcmTilt2R(WacomDeviceStatePtr ds);
-extern void wcmFingerTapToClick(WacomCommonPtr common);
-
 /*****************************************************************************
  * Static functions
  ****************************************************************************/
diff --git a/src/wcmConfig.c b/src/wcmConfig.c
index 6a39197..bb952e1 100644
--- a/src/wcmConfig.c
+++ b/src/wcmConfig.c
@@ -26,16 +26,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
-extern Bool wcmIsAValidType(const char* type, unsigned long* keys);
-extern int wcmIsDuplicate(char* device, LocalDevicePtr local);
-extern int wcmNeedAutoHotplug(LocalDevicePtr local,
-       const char **type, unsigned long* keys);
-extern int wcmAutoProbeDevice(LocalDevicePtr local);
-extern int wcmParseOptions(LocalDevicePtr local, unsigned long* keys);
-extern void wcmHotplugOthers(LocalDevicePtr local, unsigned long* keys);
-extern int wcmDeviceTypeKeys(LocalDevicePtr local, unsigned long* keys,
-                            int* tablet_id);
-
 /*****************************************************************************
  * wcmAllocate --
  ****************************************************************************/
diff --git a/src/wcmTouchFilter.c b/src/wcmTouchFilter.c
index 2331522..bbdcbfa 100644
--- a/src/wcmTouchFilter.c
+++ b/src/wcmTouchFilter.c
@@ -42,11 +42,6 @@
 /* Defines for Tap Add-a-Finger to Click */
 #define WACOM_TAP_TIME_IN_MS        150
 
-void wcmFingerTapToClick(WacomCommonPtr common);
-
-extern void wcmRotateCoordinates(LocalDevicePtr local, int* x, int* y);
-extern void wcmEmitKeysym(DeviceIntPtr keydev, int keysym, int state);
-
 static void wcmFingerScroll(WacomDevicePtr priv);
 static void wcmFingerZoom(WacomDevicePtr priv);
 
diff --git a/src/wcmValidateDevice.c b/src/wcmValidateDevice.c
index 8c21e59..c48246c 100644
--- a/src/wcmValidateDevice.c
+++ b/src/wcmValidateDevice.c
@@ -29,16 +29,6 @@
 #define ARRAY_SIZE(a) (sizeof(a)/sizeof((a)[0]))
 
 
-Bool wcmIsAValidType(const char *type, unsigned long* keys);
-int wcmNeedAutoHotplug(LocalDevicePtr local, const char **type,
-               unsigned long* keys);
-void wcmHotplugOthers(LocalDevicePtr local, unsigned long* keys);
-int wcmAutoProbeDevice(LocalDevicePtr local);
-int wcmParseOptions(LocalDevicePtr local, unsigned long* keys);
-int wcmIsDuplicate(char* device, LocalDevicePtr local);
-int wcmDeviceTypeKeys(LocalDevicePtr local, unsigned long* keys,
-                     int* tablet_id);
-
 /* wcmCheckSource - Check if there is another source defined this device
  * 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
diff --git a/src/wcmXCommand.c b/src/wcmXCommand.c
index cf29441..979a6dc 100644
--- a/src/wcmXCommand.c
+++ b/src/wcmXCommand.c
@@ -24,20 +24,6 @@
 #include "xf86Wacom.h"
 #include "wcmFilter.h"
 
-extern void wcmInitialCoordinates(LocalDevicePtr local, int axes);
-extern void wcmRotateTablet(LocalDevicePtr local, int value);
-extern void wcmInitialScreens(LocalDevicePtr local);
-
-int wcmDevSwitchModeCall(LocalDevicePtr local, int mode);
-int wcmDevSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode);
-void wcmChangeScreen(LocalDevicePtr local, int value);
-
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
-       int wcmSetProperty(DeviceIntPtr dev, Atom property,
-               XIPropertyValuePtr prop, BOOL checkonly);
-       void InitWcmDeviceProperties(LocalDevicePtr local);
-#endif
-
 /*****************************************************************************
  * wcmSetPadCoreMode
  ****************************************************************************/
diff --git a/src/xf86Wacom.c b/src/xf86Wacom.c
index c0b0e90..804a5c9 100644
--- a/src/xf86Wacom.c
+++ b/src/xf86Wacom.c
@@ -51,21 +51,6 @@
 #include <xkbsrv.h>
 #endif
 
-void wcmVirtualTabletPadding(LocalDevicePtr local);
-void wcmVirtualTabletSize(LocalDevicePtr local);
-Bool wcmIsWacomDevice (char* fname);
-
-#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
-    extern void InitWcmDeviceProperties(LocalDevicePtr local);
-    extern int wcmSetProperty(DeviceIntPtr dev, Atom property, 
XIPropertyValuePtr prop,
-                BOOL checkonly);
-#endif
-
-extern int wcmDevSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode);
-extern void wcmRotateTablet(LocalDevicePtr local, int value);
-extern void wcmInitialScreens(LocalDevicePtr local);
-extern void wcmInitialCoordinates(LocalDevicePtr local, int axes);
-
 static int wcmDevOpen(DeviceIntPtr pWcm);
 static int wcmReady(LocalDevicePtr local);
 static void wcmDevReadInput(LocalDevicePtr local);
diff --git a/src/xf86Wacom.h b/src/xf86Wacom.h
index 1fe72ab..32c4891 100644
--- a/src/xf86Wacom.h
+++ b/src/xf86Wacom.h
@@ -177,5 +177,43 @@ int wcmSetPadCoreMode(LocalDevicePtr local);
 /* calculate the proper tablet to screen mapping factor */
 void wcmMappingFactor(LocalDevicePtr local);
 
+/* validation */
+extern Bool wcmIsAValidType(const char* type, unsigned long* keys);
+extern Bool wcmIsWacomDevice (char* fname);
+extern int wcmIsDuplicate(char* device, LocalDevicePtr local);
+extern int wcmDeviceTypeKeys(LocalDevicePtr local, unsigned long* keys, int* 
tablet_id);
+
+/* hotplug */
+extern int wcmNeedAutoHotplug(LocalDevicePtr local, const char **type, 
unsigned long* keys);
+extern void wcmHotplugOthers(LocalDevicePtr local, unsigned long* keys);
+extern int wcmAutoProbeDevice(LocalDevicePtr local);
+
+/* setup */
+extern int wcmParseOptions(LocalDevicePtr local, unsigned long* keys);
+extern void wcmInitialCoordinates(LocalDevicePtr local, int axes);
+extern void wcmInitialScreens(LocalDevicePtr local);
+extern void wcmInitialScreens(LocalDevicePtr local);
+
+extern int wcmDevSwitchModeCall(LocalDevicePtr local, int mode);
+extern int wcmDevSwitchMode(ClientPtr client, DeviceIntPtr dev, int mode);
+
+/* run-time modifications */
+extern void wcmChangeScreen(LocalDevicePtr local, int value);
+extern void wcmTilt2R(WacomDeviceStatePtr ds);
+extern void wcmFingerTapToClick(WacomCommonPtr common);
+extern void wcmEmitKeysym(DeviceIntPtr keydev, int keysym, int state);
+
+extern void wcmRotateTablet(LocalDevicePtr local, int value);
+extern void wcmRotateCoordinates(LocalDevicePtr local, int* x, int* y);
+extern void wcmVirtualTabletSize(LocalDevicePtr local);
+extern void wcmVirtualTabletPadding(LocalDevicePtr local);
+
+/* device properties */
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 3
+extern int wcmSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr 
prop, BOOL checkonly);
+extern void InitWcmDeviceProperties(LocalDevicePtr local);
+#endif
+
+
 /****************************************************************************/
 #endif /* __XF86WACOM_H */
-- 
1.6.6.1


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Linuxwacom-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel

Reply via email to