aboutsummaryrefslogtreecommitdiff
path: root/linuxmouse.c
diff options
context:
space:
mode:
authorHans-Christoph Steiner <eighthave@users.sourceforge.net>2004-05-28 01:03:21 +0000
committerHans-Christoph Steiner <eighthave@users.sourceforge.net>2004-05-28 01:03:21 +0000
commit59975e541343e6782ed8ada7ada1d28f3a5b7929 (patch)
treec187f0e74f15f98a19eabd2cb46af0aa02564bfa /linuxmouse.c
parent77f6224967e5cd688026b5c3f988708b6d6b05e4 (diff)
cleaned up code a bit following Miller's naming scheme
svn path=/trunk/externals/hcs/; revision=1781
Diffstat (limited to 'linuxmouse.c')
-rw-r--r--linuxmouse.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/linuxmouse.c b/linuxmouse.c
index 51e3d51..2dd4b56 100644
--- a/linuxmouse.c
+++ b/linuxmouse.c
@@ -3,7 +3,7 @@
#define LINUXMOUSE_DEVICE "/dev/input/event0"
#define LINUXMOUSE_AXES 3
-static char *version = "$Revision: 1.4 $";
+static char *version = "$Revision: 1.5 $";
/*------------------------------------------------------------------------------
* CLASS DEF
@@ -14,8 +14,8 @@ typedef struct _linuxmouse {
t_object x_obj;
t_int x_fd;
t_symbol *x_devname;
- int read_ok;
- int started;
+ int x_read_ok;
+ int x_started;
#ifdef __gnu_linux__
struct input_event x_input_event;
#endif
@@ -35,10 +35,10 @@ void linuxmouse_stop(t_linuxmouse* x) {
DEBUG(post("linuxmouse_stop"););
#ifdef __gnu_linux__
- if (x->x_fd >= 0 && x->started) {
+ if (x->x_fd >= 0 && x->x_started) {
sys_rmpollfn(x->x_fd);
post("[linuxmouse] stopped");
- x->started = 0;
+ x->x_started = 0;
}
#endif
}
@@ -210,10 +210,10 @@ void linuxmouse_start(t_linuxmouse* x) {
DEBUG(post("linuxmouse_start"););
#ifdef __gnu_linux__
- if (x->x_fd >= 0 && !x->started) {
+ if (x->x_fd >= 0 && !x->x_started) {
sys_addpollfn(x->x_fd, (t_fdpollfn)linuxmouse_read, x);
post("[linuxmouse] started");
- x->started = 1;
+ x->x_started = 1;
} else {
post("You need to set a input device (i.e /dev/input/event0)");
}
@@ -244,8 +244,8 @@ static void *linuxmouse_new(t_symbol *s) {
/* init vars */
x->x_fd = -1;
- x->read_ok = 1;
- x->started = 0;
+ x->x_read_ok = 1;
+ x->x_started = 0;
/* create outlets for each axis */
for (i = 0; i < LINUXMOUSE_AXES; i++)