summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Hlusiak <saschahlusiak@arcor.de>2007-03-31 22:40:50 -0400
committerSascha Hlusiak <saschahlusiak@arcor.de>2007-03-31 22:40:50 -0400
commit76bea36fe8160e59d35a43f7062044f272b54c2f (patch)
tree15193f34a067516825fd089abf0754dc0d33c0a2
parent6d88594bd9c6729e01a5cb20447af7fc111ae53a (diff)
Added missing include files to fix warnings about implicit declarationsxf86-input-joystick-1.2.0
-rw-r--r--src/jstk_axis.c10
-rw-r--r--src/jstk_options.c2
-rw-r--r--src/linux_jstk.c4
3 files changed, 12 insertions, 4 deletions
diff --git a/src/jstk_axis.c b/src/jstk_axis.c
index b4436bc..4f96e82 100644
--- a/src/jstk_axis.c
+++ b/src/jstk_axis.c
@@ -21,7 +21,6 @@
*
*/
-// #include <xf86.h>
#ifdef HAVE_CONFIG_H
@@ -31,6 +30,9 @@
#include <xf86Xinput.h>
#include <xf86_OSproc.h>
#include <math.h>
+#include <stdlib.h>
+/* #include <xf86.h> */
+
#include "jstk.h"
#include "jstk_axis.h"
@@ -206,12 +208,13 @@ jstkAxisTimer(OsTimerPtr timer,
*/
void
jstkStartAxisTimer(LocalDevicePtr device, int number) {
+ int pixel;
JoystickDevPtr priv = device->private;
if (priv->timerrunning) return;
priv->timerrunning = TRUE;
- int pixel = 1;
+ pixel = 1;
if (priv->axis[number].value < 0) pixel = -1;
switch (priv->axis[number].mapping) {
case MAPPING_X:
@@ -251,12 +254,13 @@ jstkStartAxisTimer(LocalDevicePtr device, int number) {
void
jstkStartButtonAxisTimer(LocalDevicePtr device, int number) {
+ int pixel;
JoystickDevPtr priv = device->private;
if (priv->timerrunning) return;
priv->timerrunning = TRUE;
- int pixel = 1;
+ pixel = 1;
if (priv->button[number].value < 0) pixel = -1;
switch (priv->button[number].mapping) {
case MAPPING_X:
diff --git a/src/jstk_options.c b/src/jstk_options.c
index 1315534..70e7e8a 100644
--- a/src/jstk_options.c
+++ b/src/jstk_options.c
@@ -22,7 +22,9 @@
*/
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
#include <xf86.h>
#include "jstk.h"
#include "jstk_options.h"
diff --git a/src/linux_jstk.c b/src/linux_jstk.c
index df2c696..e128de9 100644
--- a/src/linux_jstk.c
+++ b/src/linux_jstk.c
@@ -28,9 +28,11 @@
#include <unistd.h>
#include <sys/types.h>
-#include <linux/joystick.h>
#include <fcntl.h>
#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#include <linux/joystick.h>
#include <xf86.h>
#include <xf86_OSproc.h>