diff -pNuar /home/klaws/fujitsu-extras/usbtouch/usbtouch.c xdrv/usbtouch.c
--- /home/klaws/fujitsu-extras/usbtouch/usbtouch.c	2003-10-15 12:29:40.000000000 -0400
+++ xdrv/usbtouch.c	2005-01-28 23:18:42.000000000 -0500
@@ -2,6 +2,9 @@
  *
  * Copyright 2003 by Chris Bare <chris@bareflix.com>
  *
+ * event->js interface conversion by robert jacobs in 2005.
+ * a few things were munged. oh well.
+ *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
  * the above copyright notice appear in all copies and that both that
@@ -179,11 +182,11 @@ PreInit (InputDriverPtr drv, IDevPtr dev
 	 * that requires calling ioctl */
 	priv->code_x = xf86SetIntOption (local->options, "CodeX", 0);
 	priv->code_y = xf86SetIntOption (local->options, "CodeY", 1);
-	priv->code_button = xf86SetIntOption (local->options, "CodeButton", 272);
-	priv->min_x = xf86SetIntOption (local->options, "MinX", 0);
-	priv->max_x = xf86SetIntOption (local->options, "MaxX", 1000);
-	priv->min_y = xf86SetIntOption (local->options, "MinY", 0);
-	priv->max_y = xf86SetIntOption (local->options, "MaxY", 1000);
+	priv->code_button = xf86SetIntOption (local->options, "CodeButton", 0);
+	priv->min_x = xf86SetIntOption (local->options, "MinX", -30000);
+	priv->max_x = xf86SetIntOption (local->options, "MaxX", 30000);
+	priv->min_y = xf86SetIntOption (local->options, "MinY", -30000);
+	priv->max_y = xf86SetIntOption (local->options, "MaxY", 30000);
 	priv->screen_num = xf86SetIntOption (local->options, "ScreenNumber", 0);
 	priv->button_number =
 		xf86SetIntOption (local->options, "ButtonNumber", 1);
@@ -194,7 +197,7 @@ PreInit (InputDriverPtr drv, IDevPtr dev
 	else
 		priv->reporting_mode = TS_Scaled;
 
-	priv->buffer = XisbNew (local->fd, EVENT_PACKET_SIZE * 64);
+	priv->buffer = XisbNew (local->fd, JOYSTICK_EVENT_SIZE * 64);
 
 	DBG (9, XisbTrace (priv->buffer, 1));
 
@@ -288,7 +291,7 @@ DeviceOn (DeviceIntPtr dev)
 		return (!Success);
 	}
 
-	priv->buffer = XisbNew (local->fd, EVENT_PACKET_SIZE * 64);
+	priv->buffer = XisbNew (local->fd, JOYSTICK_EVENT_SIZE * 64);
 
 	if (!priv->buffer)
 	{
@@ -378,11 +381,11 @@ DeviceInit (DeviceIntPtr dev)
 	}
 	else
 	{
-		InitValuatorAxisStruct (dev, 0, priv->min_x, priv->max_x, 1024, AXIS_MIN_RES	/* min_res 
-																						 */ ,
+
+	  /* it seems that the last two arguments are not used?! */
+		InitValuatorAxisStruct (dev, 0, priv->min_x, priv->max_x, 1024, AXIS_MIN_RES	/* min_res */ ,
 								AXIS_MAX_RES /* max_res */ );
-		InitValuatorAxisStruct (dev, 1, priv->min_y, priv->max_y, 1024, AXIS_MIN_RES	/* min_res 
-																						 */ ,
+		InitValuatorAxisStruct (dev, 1, priv->min_y, priv->max_y, 1024, AXIS_MIN_RES	/* min_res */ ,
 								AXIS_MAX_RES /* max_res */ );
 	}
 
@@ -406,7 +409,7 @@ ReadInput (LocalDevicePtr local)
 {
 	USBTouchPrivatePtr priv = (USBTouchPrivatePtr) (local->private);
 
-	struct input_event *e;
+	struct js_event *e;
 
 	/* 
 	 * set blocking to -1 on the first call because we know there is data to
@@ -414,19 +417,21 @@ ReadInput (LocalDevicePtr local)
 	 * succeeding reads are preceeded by a select with a 0 timeout to prevent
 	 * read from blocking indefinately.
 	 */
+
+#define CODE_AXIS 2
 	XisbBlockDuration (priv->buffer, -1);
 	priv->axes_seen = 0;
 	while (USBTouchGetPacket (priv) == Success)
 	{
-		e = (struct input_event*) priv->packet;
+		e = (struct js_event*) priv->packet;
 
 		xf86ErrorFVerb (4,
-						"Event: time %ld.%06ld, type %d, code %d, value %d\n",
-						e->time.tv_sec, e->time.tv_usec, e->type, e->code,
+						"Event: time %ld.%03ld, type %d, code %d, value %d\n",
+						e->time/1000, e->time%1000, e->type, e->code,
 						e->value);
 		XisbBlockDuration (priv->buffer, 500);
 
-		if (e->type == 3)		/* axis event */
+		if (e->type == CODE_AXIS)	/* axis event */
 		{
 			if (e->code == priv->code_x)
 			{
@@ -458,8 +463,10 @@ ReadInput (LocalDevicePtr local)
 		}
 
 		xf86XInputSetScreen (local, priv->screen_num, priv->x, priv->y);
+
+#define CODE_CLICK 1
 		/* if it's a button down event */
-		if ((e->type == 1) && (e->code == priv->code_button)
+		if ((e->type == CODE_CLICK) && (e->code == priv->code_button)
 			&& (e->value == 1))
 		{
 			xf86PostProximityEvent (local->dev, 1, 0, 2, priv->x, priv->y);
@@ -478,7 +485,7 @@ ReadInput (LocalDevicePtr local)
 		 * Emit a button press or release.
 		 */
 		/* if it's a button event */
-		if ((e->type == 1) && (e->code == priv->code_button))
+		if ((e->type == CODE_CLICK) && (e->code == priv->code_button))
 		{
 			xf86PostButtonEvent (local->dev, TRUE,
 								 priv->button_number, e->value, 0, 2, priv->x,
@@ -499,8 +506,8 @@ ReadInput (LocalDevicePtr local)
 
 /* static int */
 /* ControlProc (LocalDevicePtr local, xDeviceCtl * control) */
-static void
-ControlProc (DeviceIntPtr device, PtrCtrl *ctrl)
+static int 
+ControlProc (LocalDevicePtr device, xDeviceCtl * ctrl)
 {
 	/* xDeviceTSCalibrationCtl *c = (xDeviceTSCalibrationCtl *) control; */
 	/* USBTouchPrivatePtr priv = (USBTouchPrivatePtr) (local->private); */
@@ -592,7 +599,7 @@ USBTouchGetPacket (USBTouchPrivatePtr pr
 			isprint(c)?c:'.');
 
 		priv->packet[count] = c;
-		if (++count == EVENT_PACKET_SIZE)
+		if (++count == JOYSTICK_EVENT_SIZE)
 		{
 			xf86ErrorFVerb (5, "USBTouchGetPacket return packet\n");
 			USBTouchNewPacket (priv);
diff -pNuar /home/klaws/fujitsu-extras/usbtouch/usbtouch.h xdrv/usbtouch.h
--- /home/klaws/fujitsu-extras/usbtouch/usbtouch.h	2003-10-07 00:34:12.000000000 -0400
+++ xdrv/usbtouch.h	2005-01-28 23:28:37.000000000 -0500
@@ -30,27 +30,22 @@
  *  Definitions
  *  structs, typedefs, #defines, enums
  *****************************************************************************/
-struct timeval
-{
-	long int tv_sec;			/* seconds */
-	long int tv_usec;			/* microseconds */
-};
 
 /* copied from <linux/input.h> because it's difficult to include system
  * headers in drivers */
 
-struct input_event
+struct js_event
 {
-	struct timeval time;
-	unsigned short type;
-	unsigned short code;
-	unsigned int value;
+  unsigned int time;     /* in msec */
+  signed short value;
+  unsigned char type;
+  unsigned char code;
 };
 
 #define AXIS_MIN_RES       0
 #define AXIS_MAX_RES       1024
 
-#define EVENT_PACKET_SIZE sizeof (struct input_event)
+#define JOYSTICK_EVENT_SIZE sizeof (struct js_event)
 
 typedef struct _USBTouchPrivateRec
 {
@@ -66,7 +61,7 @@ typedef struct _USBTouchPrivateRec
 
 	int screen_num;				/* Screen associated with the device */
 	int screen_width;			/* Width of the associated X screen */
-	int screen_height;			/* Height of the screen */
+	int screen_height;	
 
 	int x;
 	int y;
@@ -78,7 +73,7 @@ typedef struct _USBTouchPrivateRec
 	int axes_seen;
 
 	XISBuffer *buffer;
-	unsigned char packet[EVENT_PACKET_SIZE];	/* packet being/just read */
+	unsigned char packet[JOYSTICK_EVENT_SIZE];	/* packet being/just read */
 	int packeti;				/* index into packet */
 } USBTouchPrivateRec, *USBTouchPrivatePtr;
 
@@ -90,7 +85,7 @@ static Bool DeviceOn (DeviceIntPtr dev);
 static Bool DeviceOff (DeviceIntPtr dev);
 static Bool DeviceInit (DeviceIntPtr dev);
 static void ReadInput (LocalDevicePtr local);
-static void ControlProc (DeviceIntPtr device, PtrCtrl *ctrl);
+static int ControlProc (LocalDevicePtr device, xDeviceCtl * ctrl);
 static void CloseProc (LocalDevicePtr local);
 static int SwitchMode (ClientPtr client, DeviceIntPtr dev, int mode);
 static Bool ConvertProc (LocalDevicePtr local, int first, int num, int v0,
