]> 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 892c51b9248426db4157f04ff32dcad3881561aa..1024deec618bf413d55ee28bbacf5fca02653e1b 100644 (file)
@@ -1,3 +1,6 @@
+ChangeLog
+xinput-*.tar.bz2
+xinput-*.tar.gz
 *.o
 config.*
 Makefile
diff --git a/AUTHORS b/AUTHORS
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..73bc34e6c76e3cc9f5b6872f41a54bef340ba3c0 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 eef49c267c040fd3e747a784ec1a6a5169127027..8662bd6c73c40c49127c339c7fa9bdf0a7657f28 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 7c1d8f44ba4c4e8696fa73feb3bed804fa64b6b6..b04f7aaf390d989aa8c618e8afbf668ab24f7159 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 e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..b81f91a791ae80c7fe99fe9796631bf8e6d23872 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 3c8605f51d0d3ba402cc3f722dc532d0014f1c2d..08a4ec98a7c458322c8ae64d066c66ab3619a6a5 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 5f5788072c68b770119bf99603169fa838c8bbc2..f38914f00fc962bb17814cb046fd1b0f20665c23 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 410ecd0dcd3b47701a3aacff3f5a99aafd62a6cd..6f340dc590f2e2d9eff3de80e56f458e52eed7e2 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 5b09539fd45266a74ebd1e01d199d7438270777c..39580a5876d89e72b49a0a1837d1bb8d32849083 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 72afc1ef20f512c4f435760f044a35d940006a0d..21669e394209fcc80bb15eb159be5c01e44e1b78 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 7f4da57ebc0704847175238af62153241c22dfa5..3fad9a94bf444cf3e088a4463a79c51754827b4b 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 a802c10caddc4fa28789faa728b96bf3d40e5630..a50987265e9d10b11cc6c22f11e2b290db4c748a 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 bbf52efa188b47824564bce678a09fa01ceb97b8..7e7870a5f40c17faf21576cc552b6faa488917d3 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 1f97af8f678fe92040110f51e77caddf3fa78d56..4bac6df34653c1354eff5d3a06ea9849349f308d 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 4b926e2cdff89e0e5fa653b3918cb410fa4c5843..f6f9410f80fd34f318cc7d1eb22eb75aee9b3475 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 39c1b74c666ff415959a527a804f46737baacdf7..8b800cbfec0557cde587367ff0fbe430fae1650b 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 be6b119821b7ac7e7099a0ae5eaa5701b9c82406..4e2c2e670b7db1f7e1da128833d4d7ecc6260b50 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 be35d436c9243ef5ec307951edbb5ee8cce402ae..93a50d8be41521dd9ef6fa2c8427a23ea02fcf63 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 0fe88789c816b39e84ee40ecb7740c6aa79b9844..32a78335a8cdcc0dd590bd9f8b594acf0260dde9 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 961d1f756203f0f65c83f86a33b813b6dac5a2a6..add9aab946d3b5e85a6f77d879b4c3957c189fa4 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