aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linuxevent.c25
-rw-r--r--linuxhid.h19
-rw-r--r--linuxjoystick.c31
-rw-r--r--linuxmouse.c30
4 files changed, 25 insertions, 80 deletions
diff --git a/linuxevent.c b/linuxevent.c
index a112430..c562243 100644
--- a/linuxevent.c
+++ b/linuxevent.c
@@ -1,31 +1,10 @@
-
-#include <m_imp.h>
-
-#ifdef NT
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
-#include <linux/input.h>
-
-#include <sys/stat.h>
-
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <termios.h>
-
#include "linuxhid.h"
-#define DEBUG(x)
-/*#define DEBUG(x) x */
-
#define LINUXEVENT_DEVICE "/dev/input/event0"
#define LINUXEVENT_OUTLETS 4
+static char *version = "$Revision: 1.2 $";
+
/*------------------------------------------------------------------------------
* CLASS DEF
*/
diff --git a/linuxhid.h b/linuxhid.h
index 9707eec..bb7f577 100644
--- a/linuxhid.h
+++ b/linuxhid.h
@@ -1,3 +1,22 @@
+#include <m_imp.h>
+
+#include <linux/input.h>
+
+#include <sys/stat.h>
+
+#include <string.h>
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/fcntl.h>
+#include <sys/ioctl.h>
+#include <unistd.h>
+
+
+#define DEBUG(x)
+/*#define DEBUG(x) x */
+
+static char *version = "$Revision: 1.2 $";
+
/*------------------------------------------------------------------------------
* from evtest.c from the ff-utils package
*/
diff --git a/linuxjoystick.c b/linuxjoystick.c
index ceb4edd..b64588c 100644
--- a/linuxjoystick.c
+++ b/linuxjoystick.c
@@ -1,33 +1,9 @@
-
-#include <m_imp.h>
-
-#ifdef NT
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
-#include <linux/input.h>
-
-#include <sys/stat.h>
-
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <termios.h>
-
#include "linuxhid.h"
-#define DEBUG(x)
-/*#define DEBUG(x) x */
-
-
#define LINUXJOYSTICK_DEVICE "/dev/input/event0"
-
#define LINUXJOYSTICK_AXES 6
-#define LINUXJOYSTICK_BUTTONS 9
+
+static char *version = "$Revision: 1.2 $";
/*------------------------------------------------------------------------------
* CLASS DEF
@@ -45,10 +21,9 @@ typedef struct _linuxjoystick {
t_outlet *x_button_num_out;
t_outlet *x_button_val_out;
t_clock *x_clock;
- double x_delaytime;
unsigned char x_buttons;
unsigned char x_axes;
-}t_linuxjoystick;
+} t_linuxjoystick;
/*------------------------------------------------------------------------------
* IMPLEMENTATION
diff --git a/linuxmouse.c b/linuxmouse.c
index 913d35b..da7147e 100644
--- a/linuxmouse.c
+++ b/linuxmouse.c
@@ -1,35 +1,9 @@
-
-#include <m_imp.h>
-
-#ifdef NT
-#pragma warning( disable : 4244 )
-#pragma warning( disable : 4305 )
-#endif
-
-
-#include <linux/input.h>
-
-#include <sys/stat.h>
-
-#include <string.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <termios.h>
-
#include "linuxhid.h"
-#define DEBUG(x)
-/*#define DEBUG(x) x */
-
-
#define LINUXMOUSE_DEVICE "/dev/input/event0"
-
#define LINUXMOUSE_AXES 3
-#define LINUXMOUSE_BUTTONS 7
+static char *version = "$Revision: 1.2 $";
/*------------------------------------------------------------------------------
* CLASS DEF
@@ -46,8 +20,6 @@ typedef struct _linuxmouse {
t_outlet *x_axis_out[LINUXMOUSE_AXES];
t_outlet *x_button_num_out;
t_outlet *x_button_val_out;
- t_clock *x_clock;
- double x_delaytime;
unsigned char x_buttons;
unsigned char x_axes;
}t_linuxmouse;