patches/xf86-input-synaptics-02-synclient.diff
author jurikm
Sun, 12 Feb 2012 14:04:10 +0000
changeset 8245 383896da4129
parent 2212 82f60d1f7c90
permissions -rw-r--r--
SFEsauerbraten.spec: add IPS package name
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2212
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
     1
--- xf86-input-synaptics-1.1.3.orig/tools/synclient.c	2009-08-02 21:04:24.000000000 -0400
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
     2
+++ xf86-input-synaptics-1.1.3/tools/synclient.c	2009-09-10 11:52:09.787558852 -0400
1720
8131cabd4fe0 2009-03-10 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     3
@@ -36,6 +36,7 @@
8131cabd4fe0 2009-03-10 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     4
 #include <sys/time.h>
8131cabd4fe0 2009-03-10 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     5
 #include <unistd.h>
8131cabd4fe0 2009-03-10 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     6
 #include <string.h>
8131cabd4fe0 2009-03-10 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     7
+#include <strings.h>
8131cabd4fe0 2009-03-10 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     8
 #include <stddef.h>
8131cabd4fe0 2009-03-10 Albert Lee <[email protected]>
trisk
parents:
diff changeset
     9
 #include <math.h>
8131cabd4fe0 2009-03-10 Albert Lee <[email protected]>
trisk
parents:
diff changeset
    10
 
2212
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    11
@@ -258,9 +259,10 @@
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    12
     if (eqp) {
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    13
 	int j;
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    14
 	int found = 0;
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    15
-	*eqp = 0;
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    16
+	int len = eqp - cmd;
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    17
 	for (j = 0; params[j].name; j++) {
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    18
-	    if (strcasecmp(cmd, params[j].name) == 0) {
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    19
+	    if ((strncasecmp(cmd, params[j].name, len) == 0) &&
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    20
+	        (params[j].name[len] == '\0')) {
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    21
 		found = 1;
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    22
 		break;
82f60d1f7c90 2009-10-15 Albert Lee <[email protected]>
trisk
parents: 1720
diff changeset
    23
 	    }