i have a following text:
 
--- microwindows-0.91/src/drivers/mou_ser.c	2003-08-13 01:30:37.000000000 +0930
+++ /home/gumstix/mou_ser.c	2006-04-19 14:18:03.000000000 +0930
@@ -47,12 +47,12 @@
 #define	MOUSE_PORT	"/dev/ttys0"
 #else
 /* default mouse tty port: /dev/psaux or /dev/ttyS1 */
-#define MOUSE_PORT	"/dev/psaux"
-/*#define MOUSE_PORT	"/dev/ttyS1"*/
+//#define MOUSE_PORT	"/dev/psaux"
+#define MOUSE_PORT	"/dev/ttyS0"
 #endif
 /* default mouse type: ms, pc, logi, or ps2 */
-#define MOUSE_TYPE	"ps2"
-/*#define MOUSE_TYPE	"pc"*/
+/*#define MOUSE_TYPE	"ps2"*/
+#define MOUSE_TYPE	"touch"
 #endif
 
 #define MAX_BYTES	128		/* number of bytes for buffer */
@@ -85,6 +85,12 @@
 #define THIRD_FOURTH_BITS	0x0c
 #define BOTTOM_SIX_BITS  	0x3f
 
+
+/* defines for touch screen */
+#define STARTX 400
+#define STARTY 300
+
+
 /* local data*/
 static int		mouse_fd;	/* file descriptor for mouse */
 static int		state;		/* IDLE, XSET, ... */
@@ -112,6 +118,7 @@
 static int  	ParsePC(int);		/* routine to interpret PC mouse */
 static int  	ParseMS(int);		/* routine to interpret MS mouse */
 static int  	ParsePS2(int);		/* routine to interpret PS/2 mouse */
+static int  	ParseTouch(int);	/* routine to interpret Mx Touch screen mouse */
 
 MOUSEDEVICE mousedev = {
 	MOU_Open,
@@ -138,6 +145,8 @@
 	char	*port;
 	struct termios termios;
 
+	GdMoveCursor(STARTX, STARTY);
+
 	/* get mouse type and port*/
 	if( !(type = getenv("MOUSE_TYPE")))
 		type = MOUSE_TYPE;
@@ -164,6 +173,12 @@
 		right = PS2_RIGHT_BUTTON;
 		middle = 0;
 		parse = ParsePS2;
+	} else if (strcmp(type, "touch") == 0) {
+	  /* Touch Screen*/
+	  left = 1;
+	  right = 0;
+	  middle = 0;
+	  parse = ParseTouch;
 	} else
 		return -1;
 
@@ -201,25 +216,25 @@
 	tcgetattr(mouse_fd, &termios);
 
 	/* These functions appear to be broken in ELKS Dev86 */
-	if(cfgetispeed(&termios) != B1200)
-		cfsetispeed(&termios, B1200);
+	if(cfgetispeed(&termios) != B9600)
+		cfsetispeed(&termios, B9600);
 #if _MINIX
-	if(cfgetospeed(&termios) != B1200)
-		cfsetospeed(&termios, B1200);
+	if(cfgetospeed(&termios) != B9600)
+		cfsetospeed(&termios, B9600);
 #endif
 
 #if !_MINIX
 	termios.c_cflag &= ~CBAUD;
-	termios.c_cflag |= B1200;
+	termios.c_cflag |= B9600;
 #endif
 	termios.c_lflag &= ~(ECHO | ECHONL | ICANON | IEXTEN | ISIG);
 	termios.c_iflag &= ~(ICRNL | INPCK | ISTRIP | IXON | BRKINT | IGNBRK);
 	termios.c_cflag &= ~(CSIZE | PARENB);
 	/* MS and logi mice use 7 bits*/
-	if (!strcmp(type, "ps2") || !strcmp(type, "pc"))
+	//	if (!strcmp(type, "ps2") || !strcmp(type, "pc"))
 		termios.c_cflag |= CS8;
-	else
-		termios.c_cflag |= CS7;
+		//else
+		//	termios.c_cflag |= CS7;
 	termios.c_cc[VMIN] = 0;
 	termios.c_cc[VTIME] = 0;
 
@@ -453,6 +468,84 @@
 	return 0;
 }
 
+/*
+ * Input routine for Micronix Touch Screen mouse.
+ * Returns nonzero when a new mouse state has been completed.
+ */
+static int
+ParseTouch(int byte)
+{
+
+#define T_SOP 0x0A
+#define T_SYNCBIT 0x80
+
+
+#define LLX 5.0
+#define LLY 25.0
+#define URX 2012.0
+#define URY 2018.0
+
+#define PIXELX 800.0
+#define PIXELY 600.0
+
+  static int lastx=STARTX, lasty=STARTY;
+  static char msg[128];
+  static int byte_cnt = 0;
+  static int point_packet = 0;
+  static int cmd_packet = 0;
+
+  // if we are not inside a packet then check the byte to see if it starts
+  // a new packet
+  if( ((byte & 0xF0) == T_SYNCBIT) && !cmd_packet) {
+    // position packet starts with SYNCBIT set
+    byte_cnt = 0;
+    point_packet = 1;
+    cmd_packet = 0;
+  } else if ( T_SOP == byte && !point_packet && !cmd_packet) {
+    // SOP byte signals a command packet
+    byte_cnt = 0;
+    cmd_packet = 1;
+    point_packet = 0;
+  }
+
+  // make sure the buffer doesn't overflow if lots of junk comes in
+  if(byte_cnt > 100) {
+    byte_cnt = 0;
+  }
+
+  // add bytes to the message
+  msg[byte_cnt] = byte;
+  byte_cnt++;
+
+  // currently we ignore command packets... we know we have a full point packet
+  // if the flag is set and we have 5 bytes
+  if(point_packet && byte_cnt == 5) {
+    buttons = msg[0] & 0x01 ? 1 : 0; // 1 is the left button
+    
+    // ADC value in each axis
+    int a = ((msg[1] & 0x0F) << 7) | (msg[2] & 0x7F);
+    int b = ((msg[3] & 0x0F) << 7) | (msg[4] & 0x7F);
+    
+    // corresponding x,y using default calibration
+    int x = (int) ( (( ((float) a) - LLX) / (URX - LLX)) * PIXELX );
+    int y = (int) ( (( ((float) b) - LLY) / (URY - LLY)) * PIXELY );
+    
+    // calculate deltas
+    xd = x - lastx;
+    yd = lasty - y; // y coord increases as we move down the screen (ie opposite of ADC values);
+    lastx = x;
+    lasty = y;
+
+    byte_cnt = 0;
+
+    // return 1 to say we have updated the state
+    return 1;
+  } else {
+    return 0;
+  }
+}
+
+
 static int
 MOU_Poll(void)
 {
How can i patch a file called "mou_ser.c" using this text ?
 
Or i have to do it manually?