]> diplodocus.org Git - xorg-xinput/commitdiff
Merge branch 'master' into mpx
authorPeter Hutterer <peter@cs.unisa.edu.au>
Mon, 7 Apr 2008 07:54:16 +0000 (17:24 +0930)
committerPeter Hutterer <peter@cs.unisa.edu.au>
Mon, 7 Apr 2008 07:54:16 +0000 (17:24 +0930)
Conflicts:

src/xinput.c

(just a whitespace conflict)

21 files changed:
.gitignore
AUTHORS
COPYING
Imakefile [deleted file]
Makefile.am
NEWS
README
configure.ac
man/xinput.man
src/Makefile.am
src/buttonmap.c
src/feedback.c
src/list.c
src/setint.c
src/setmode.c
src/setptr.c
src/state.c
src/test.c
src/version.c
src/xinput.c
src/xinput.h

index 892c51b..1024dee 100644 (file)
@@ -1,3 +1,6 @@
+ChangeLog
+xinput-*.tar.bz2
+xinput-*.tar.gz
 *.o
 config.*
 Makefile
diff --git a/AUTHORS b/AUTHORS
index e69de29..73bc34e 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -0,0 +1,2 @@
+Maintainer: Philip Langdale <philipl@alumni.utexas.net>
+Creator: Frederic Lepied <Frederic.Lepied@sugix.frmug.org>
diff --git a/COPYING b/COPYING
index eef49c2..8662bd6 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -4,15 +4,15 @@ 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
 copyright  notice   and   this  permission   notice  appear  in  supporting
-documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+documentation, and that   the  name of  the authors   not  be  used  in
 advertising or publicity pertaining to distribution of the software without
-specific,  written      prior  permission.     Frederic  Lepied   makes  no
+specific,  written      prior  permission.     The authors  make  no
 representations about the suitability of this software for any purpose.  It
 is provided "as is" without express or implied warranty.                   
                                                                            
-FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+THE AUTHORS  DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
 INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
-EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
 DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
 TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
diff --git a/Imakefile b/Imakefile
deleted file mode 100644 (file)
index 1a439f6..0000000
--- a/Imakefile
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# Copyright 1996-1997 by Frederic Lepied, France. <Frederic.Lepied@sugix.frmug.org>
-#                                                                            
-# 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
-# copyright  notice   and   this  permission   notice  appear  in  supporting
-# documentation, and that   the  name of  Frederic   Lepied not  be  used  in
-# advertising or publicity pertaining to distribution of the software without
-# specific,  written      prior  permission.     Frederic  Lepied   makes  no
-# representations about the suitability of this software for any purpose.  It
-# is provided "as is" without express or implied warranty.                   
-#                                                                            
-# FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
-# INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
-# EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
-# CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
-# DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
-# TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
-# PERFORMANCE OF THIS SOFTWARE.
-#
-# $Id: Imakefile,v 1.7 1997/06/14 19:11:49 fred Exp $
-
-# must be kept in synch with version.c
-VERSION = 1.2
-
-DEPLIBS = $(DEPXILIB) $(DEPXLIB)
-LOCAL_LIBRARIES = $(XILIB) $(XLIB)
-
-OBJS = xinput.o feedback.o buttonmap.o setptr.o setmode.o list.o test.o version.o setint.o state.o
-SRCS = xinput.c feedback.c buttonmap.c setptr.c setmode.c list.c test.c version.c setint.c state.c
-HDRS = xinput.h
-AUX  = xinput.man Imakefile README ChangeLog COPYRIGHT
-
-ComplexProgramTarget(xinput)
-
-distrib:
-       @test -f setptr.c
-       rm -rf xinput-$(VERSION) xinput-$(VERSION).tar.gz
-       mkdir xinput-$(VERSION)
-       ln $(AUX) $(HDRS) $(SRCS) xinput-$(VERSION)
-       tar cvf xinput-$(VERSION).tar xinput-$(VERSION)
-       gzip --best --verbose xinput-$(VERSION).tar
-
-clean::
-       @test -f setptr.c
-       rm -rf xinput-$(VERSION) xinput-$(VERSION).tar.gz
-
-# end of Imakefile
index 7c1d8f4..b04f7aa 100644 (file)
@@ -1 +1,33 @@
-SUBDIRS=src man
+#  Copyright 2005 Adam Jackson.
+#
+#  Permission is hereby granted, free of charge, to any person obtaining a
+#  copy of this software and associated documentation files (the "Software"),
+#  to deal in the Software without restriction, including without limitation
+#  on the rights to use, copy, modify, merge, publish, distribute, sub
+#  license, and/or sell copies of the Software, and to permit persons to whom
+#  the Software is furnished to do so, subject to the following conditions:
+#
+#  The above copyright notice and this permission notice (including the next
+#  paragraph) shall be included in all copies or substantial portions of the
+#  Software.
+#
+#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
+#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+AUTOMAKE_OPTIONS = foreign
+SUBDIRS = src man
+
+EXTRA_DIST=ChangeLog
+
+CLEANFILES=ChangeLog
+
+.PHONY: ChangeLog
+
+ChangeLog:
+       (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+
+dist-hook: ChangeLog
diff --git a/NEWS b/NEWS
index e69de29..b81f91a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -0,0 +1,5 @@
+xinput 1.3.0 - 2008/01/09
+=========================
+
+ * Add support for Xorg 1.4
+ * Warn if a specified device name is ambiguous.
diff --git a/README b/README
index 3c8605f..08a4ec9 100644 (file)
--- a/README
+++ b/README
@@ -1,22 +1,29 @@
-         xinput 1.x by Frederic Lepied <Frederic.Lepied@sugix.frmug.org>
+                               xinput
+                               ======
 
-1. Introduction
-===============
+Overview
+========
 
-xinput is an  utility  I have built  to  configure and test my  XInput
-devices.    The functionalities aren't    complete  but  they fill  my
-needs. If you have  some ideas or needs  for improvement, feel free to
-contact me.  Any feedback welcome.
+xinput is a utility to configure and test XInput devices. It wasn't
+originally designed to be the primary tool for doing this but it's
+still pretty much the only program out there for doing it. :-)
 
-2. Requirements
-===============
+Requirements
+============
 
-You'll need  an ANSI   C   compiler.  I  know   it works  under  Linux
-ELF/XFree86 and Solaris 2.4 Sparc/X11R6.1.
+xinput depends on the X11 headers and particularly the XInput headers.
+As xinput now supports the new device types added in Xserver 1.4 (Xorg 7.3),
+your headers must be from that version or newer.
 
-3. Installation
-===============
+Otherwise it will just require a working ANSI C compiler.
 
-xmkmf -a
+Building and Installation
+=========================
+
+xinput uses autotools so the usual pattern applies:
+
+./configure
+make
 make install
-make install.man
+
+See the INSTALL file for details.
index 5f57880..f38914f 100644 (file)
@@ -12,7 +12,7 @@ AC_PROG_CC
 AC_PROG_INSTALL
 
 # Checks for pkg-config packages
-PKG_CHECK_MODULES(XINPUT, x11 xext xi)
+PKG_CHECK_MODULES(XINPUT, x11 xext xi [inputproto >= 1.4])
 AC_SUBST(XINPUT_CFLAGS)
 AC_SUBST(XINPUT_LIBS)
 
index 410ecd0..6f340dc 100644 (file)
@@ -67,10 +67,13 @@ device.
 
 .SH COPYRIGHT
 Copyright 1996,1997, Frederic Lepied.
+.PP
+Copyright 2008, Philip Langdale.
 
 .SH AUTHOR
 
 .nf
+Philip Langdale, <philipl@alumni.utexas.net>
 Frederic Lepied, France <Frederic.Lepied@sugix.frmug.org>
 .fi
 
index 5b09539..39580a5 100644 (file)
@@ -21,8 +21,8 @@
 
 bin_PROGRAMS = xinput
 
-xinput_CFLAGS = $(XINPUT_CFLAGS)
-xinput_LDADD = $(XINPUT_LIBS) -lm
+AM_CFLAGS = $(XINPUT_CFLAGS)
+xinput_LDADD = $(XINPUT_LIBS)
 
 xinput_SOURCES = \
     buttonmap.c \
index 72afc1e..21669e3 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
index 7f4da57..3fad9a9 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
index a802c10..a509872 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
@@ -162,10 +162,10 @@ list(Display      *display,
        int     ret = EXIT_SUCCESS;
 
        for(loop=0; loop<argc; loop++) {
-           info = find_device_info(display, argv[0], False);
+           info = find_device_info(display, argv[loop], False);
 
            if (!info) {
-               fprintf(stderr, "unable to find device %s\n", argv[0]);
+               fprintf(stderr, "unable to find device %s\n", argv[loop]);
                ret = EXIT_FAILURE;
            } else {
                print_info(info, shortformat);
index bbf52ef..7e7870a 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
index 1f97af8..4bac6df 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
index 4b926e2..f6f9410 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
index 39c1b74..8b800cb 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
index be6b119..4e2c2e6 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
index be35d43..93a50d8 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
index 0fe8878..32a7833 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR
@@ -128,6 +128,7 @@ find_device_info(Display    *display,
                 Bool           only_extended)
 {
     XDeviceInfo        *devices;
+    XDeviceInfo *found = NULL;
     int                loop;
     int                num_devices;
     int                len = strlen(name);
@@ -151,14 +152,21 @@ find_device_info(Display  *display,
        if ((!only_extended || (devices[loop].use >= IsXExtensionDevice)) &&
            ((!is_id && strcmp(devices[loop].name, name) == 0) ||
             (is_id && devices[loop].id == id))) {
-           return &devices[loop];
+           if (found) {
+               fprintf(stderr,
+                       "Warning: There are multiple devices named \"%s\".\n"
+                       "To ensure the correct one is selected, please use "
+                       "the device ID instead.\n\n", name);
+           } else {
+               found = &devices[loop];
+           }
        }
     }
-    return NULL;
+    return found;
 }
 
 static void
-usage()
+usage(void)
 {
     entry      *pdriver = drivers;
 
index 961d1f7..add9aab 100644 (file)
@@ -5,15 +5,15 @@
  * documentation for any purpose is  hereby granted without fee, provided that
  * the  above copyright   notice appear  in   all  copies and  that both  that
  * copyright  notice   and   this  permission   notice  appear  in  supporting
- * documentation, and that   the  name of  Frederic   Lepied not  be  used  in
+ * documentation, and that   the  name of  the authors  not  be  used  in
  * advertising or publicity pertaining to distribution of the software without
- * specific,  written      prior  permission.     Frederic  Lepied   makes  no
+ * specific,  written      prior  permission.     The authors  make  no
  * representations about the suitability of this software for any purpose.  It
  * is provided "as is" without express or implied warranty.
  *
- * FREDERIC  LEPIED DISCLAIMS ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
+ * THE AUTHORS DISCLAIM ALL   WARRANTIES WITH REGARD  TO  THIS SOFTWARE,
  * INCLUDING ALL IMPLIED   WARRANTIES OF MERCHANTABILITY  AND   FITNESS, IN NO
- * EVENT  SHALL FREDERIC  LEPIED BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
+ * EVENT  SHALL THE AUTHORS  BE   LIABLE   FOR ANY  SPECIAL, INDIRECT   OR
  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
  * DATA  OR PROFITS, WHETHER  IN  AN ACTION OF  CONTRACT,  NEGLIGENCE OR OTHER
  * TORTIOUS  ACTION, ARISING    OUT OF OR   IN  CONNECTION  WITH THE USE    OR