gtpntrmppn.m

Geoff Clare,,,, gwc at kemper.freedesktop.org
Thu Dec 7 07:51:30 PST 2006


Update of /cvs/xtest/xts5/tset/Xlib13/gtpntrmppn
In directory kemper:/tmp/cvs-serv23755

Modified Files:
	gtpntrmppn.m 
Log Message:
Patch from bug #7428 - remove MAXBUTTON=5 constraints

Index: gtpntrmppn.m
===================================================================
RCS file: /cvs/xtest/xts5/tset/Xlib13/gtpntrmppn/gtpntrmppn.m,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- gtpntrmppn.m	3 Nov 2005 08:42:40 -0000	1.2
+++ gtpntrmppn.m	7 Dec 2006 15:51:28 -0000	1.3
@@ -31,6 +31,9 @@
 >># 
 >># Modifications:
 >># $Log$
+>># Revision 1.3  2006/12/07 15:51:28  gwc
+>># Patch from bug #7428 - remove MAXBUTTON=5 constraints
+>>#
 >># Revision 1.2  2005/11/03 08:42:40  jmichael
 >># clean up all vsw5 paths to use xts5 instead.
 >>#
@@ -106,11 +109,7 @@
 int 	nmap = MAPSIZE;
 >>EXTERN
 
-/*
- * The number of buttons should be between 1 and 5 -- allow more space
- * in the array than this.
- */
-#define	MAPSIZE	20
+#define	MAPSIZE	32
 static	unsigned char	Map[MAPSIZE];
 
 >>ASSERTION Good B 3
@@ -192,9 +191,9 @@
 returns the number of physical buttons actually on the pointer.
 >>STRATEGY
 Call xname to get number of buttons.
-Check this lies within the protocol limit of 1..5.
+Check this lies within the limit.
 If extension available:
-  Simulate the pressing of buttons 1..5 and check that
+  Simulate the pressing of buttons 1..n and check that
     we got Success for buttons in the range returned by xname, and
     we got BadValue for the rest.
   Release all buttons.
@@ -203,8 +202,8 @@
 int	i;
 
 	nbuttons = XCALL;
-	if (nbuttons < 1 || nbuttons > 5) {
-		report("Protocol limit of 1..5 buttons exceeded (%d).", nbuttons);
+	if (nbuttons < 1 || nbuttons > MAPSIZE) {
+		report("Limit of 1..%d buttons exceeded (%d).", MAPSIZE, nbuttons);
 		FAIL;
 	} else
 		CHECK;
@@ -216,7 +215,7 @@
 	} else
 		CHECK;
 
-	for(i=0; i<5; i++) {
+	for(i=0; i<MAPSIZE; i++) {
 		_startcall(display); /* install and reset error handlers */
 		buttonpress(display, (unsigned int)i+1);
 		if (geterr() != ((i<nbuttons)?Success:BadValue)) {
@@ -228,7 +227,7 @@
 		relalldev();
 		_endcall(display); /* back to catching unexpected ones */
 	}
-	CHECKPASS(2+5);
+	CHECKPASS(2+MAPSIZE);
 
 >>ASSERTION Good A
 When the



More information about the xorg-test-commit mailing list