--- joystick-20051019.orig/utils/jstest.c +++ joystick-20051019/utils/jstest.c @@ -106,15 +106,21 @@ printf("Driver version is %d.%d.%d.\n", version >> 16, (version >> 8) & 0xff, version & 0xff); - printf("Joystick (%s) has %d axes (", name, axes); - for (i = 0; i < axes; i++) - printf("%s%s", i > 0 ? ", " : "", axis_names[axmap[i]]); - puts(")"); - - printf("and %d buttons (", buttons); - for (i = 0; i < buttons; i++) - printf("%s%s", i > 0 ? ", " : "", button_names[btnmap[i] - BTN_MISC]); - puts(")."); + if (buttons > 0 && btnmap[0] < BTN_MISC) { + /* btnmap out of range for names. Don't print any. */ + printf("Joystick (%s) has %d axes ", name, axes); + printf("and %d buttons.\n", buttons); + } else { + printf("Joystick (%s) has %d axes (", name, axes); + for (i = 0; i < axes; i++) + printf("%s%s", i > 0 ? ", " : "", axis_names[axmap[i]]); + puts(")"); + + printf("and %d buttons (", buttons); + for (i = 0; i < buttons; i++) + printf("%s%s", i > 0 ? ", " : "", button_names[btnmap[i] - BTN_MISC]); + puts(")."); + } printf("Testing ... (interrupt to exit)\n"); --- joystick-20051019.orig/debian/changelog +++ joystick-20051019/debian/changelog @@ -0,0 +1,178 @@ +joystick (20051019-1ubuntu2) edgy; urgency=low + + * Fix segfault for USB joysticks, due to faulty button/axis name-mappings. + + -- Micah Cowan Fri, 11 Aug 2006 21:22:29 -0700 + +joystick (20051019-1ubuntu1) dapper; urgency=low + + * Depend on inputattach, which is a separate package in Ubuntu. + + -- Scott James Remnant Thu, 2 Feb 2006 19:39:22 +0000 + +joystick (20051019-1) unstable; urgency=low + + * New upstream release. Closes: #245108 + * drop joystick-device-check - leave device file handling to MAKEDEV + or udev this makes everything lots more simple, means debconf is + no longer a dependancy, and no need for an initscript. + Closes: #164592, #235168, #303682, #331872 + * debian/rules: move to CDBS + * debian/control: added 'Requires at Linux 2.4 or newer.' Closes: #111117 + * debian/control: Standards-Version: 3.6.2 + * debian/copyright: updated FSF address + * debian/README.Debian: removed + * fix spelling mistakes in manpages Closes: #311445, #311446 + + -- Edward Betts Wed, 19 Oct 2005 06:22:03 +0100 + +joystick (20010903-2) unstable; urgency=low + + * debian/control: updated Standards-Version. + * debian/control: added version number to debhelper Build-Depends. + * debian/copyright: improved with more text from the GPL and a description + of changes to the package. + * debian/template: German translation from Sebastian Feltel + . (Closes: Bug#119939) + + -- Edward Betts Wed, 26 Dec 2001 13:32:55 +0000 + +joystick (20010903-1) unstable; urgency=low + + * New upstream release + * Reorganised package to more closely resemble upstream CVS: + - joystick utils moved to utils dir + - header files moved to linux/include/linux + - debian/rules: updated to reflect moved files + * linux/Documentation: added from upstream CVS + * debian/rules: install documentation + * Patch from Eduard Bloch provides a debconf interface, init + script, joystick-device-check script, and man-page. This package now + provides better support for using joystick devices based on kernel + version. (Closes: Bug#96994) + - debian/joystick-device-check: checks and fixes joystick device + - debian/joystick-device-check.8: man page for joystick-device-check + - debian/joystick.{config,templates,postinst,postrm}: debconf support + for joystick-device-check + - debian/joystick.init: handle joystick-device-check at init + - debian/control: added Depends on debconf and joystick-device-check + description + - debian/joystick.dirs: added /usr/sbin for joystick-device-check + - debian/rules: install joystick-device-check and friends + * Lintian clean + + -- Edward Betts Tue, 4 Sep 2001 13:11:54 +0100 + +joystick (20010506-1) unstable; urgency=low + + * New upstream release + * linux/joystick.h: included to make jscal work (Closes: Bug#96546) + + -- Edward Betts Sun, 6 May 2001 16:52:29 -0600 + +joystick (20000325-1) unstable; urgency=low + + * New upstream release. (Closes: Bug#84783) + * debian/control: Standards-Version: 3.5.2 + * debian/rules: Changed to debhelper 3 + * debian/rules: Changed dh_installmanpages to dh_installman + * debian/rules: Removed dh_suidregister + * debian/rules: Removed dh_testversion + * debian/rules: Support DEB_BUILD_OPTIONS + + -- Edward Betts Sat, 3 Mar 2001 14:28:43 -0700 + +joystick (1.2.15-9) unstable; urgency=low + + * Updated Standards-Version to 3.2.1 + * Added version to debhelper build-depends to match dh_testversion + * Changed section from misc to utils (Closes: Bug#74466). + + -- Edward Betts Mon, 30 Oct 2000 15:21:03 -0700 + +joystick (1.2.15-8) unstable; urgency=low + + * Fixed a stupid bug in the postinst (Closes: Bug#69408). + + -- Edward Betts Sat, 19 Aug 2000 11:31:27 +0100 + +joystick (1.2.15-7) unstable; urgency=low + + * Only create devices if they are not there. (Closes: Bug#69104). + * debian/control: updated Standards-Version to 3.2.0 + + -- Edward Betts Thu, 17 Aug 2000 14:19:13 +0100 + +joystick (1.2.15-6) frozen unstable; urgency=low + + * debian/copyright: rewrote. + + -- Edward Betts Mon, 17 Apr 2000 15:31:53 +0100 + +joystick (1.2.15-5) frozen unstable; urgency=low + + * jstest.c: Added `tv.tv_sec = 1', stops `jstest --select' from taking 100% + CPU, thanks to Tuomas Heino for spotting the bug and + providing a suggestion for the solution. Closes: Bug#61340 + + -- Edward Betts Wed, 29 Mar 2000 21:50:18 +0100 + +joystick (1.2.15-4) frozen unstable; urgency=low + + * Changed CFLAGS to -O2 -g -Wall -pipe closes: Bug#60873 filed by + Florian Lohoff (removed -m486 from CFLAGS) + + -- Edward Betts Wed, 22 Mar 2000 10:13:56 +0000 + +joystick (1.2.15-3) frozen unstable; urgency=low + + * debian/control: added a dependancy on makedev (>= 2.3.1-24) fixes other + half of important Bug#55679 + + -- Edward Betts Sat, 5 Feb 2000 13:06:55 +0000 + +joystick (1.2.15-2) frozen unstable; urgency=low + + * debian/postinst: s!./MAKEDEV!/sbin/MAKEDEV! closes: Bug#55679 + + -- Edward Betts Fri, 28 Jan 2000 15:53:41 +0000 + +joystick (1.2.15-1) unstable; urgency=low + + * New upstream release. + * no long includes kernel module. + * debian/control: updateded Standards-Version to 3.1.1 + * debian/control: added Build-Depends. + + -- Edward Betts Thu, 6 Jan 2000 23:05:44 +0000 + +jjoystick (0.8.0-5) unstable; urgency=low + + * use update-modules. Fixes Bug#27104. + * compiled for kernel 2.0.33, 2.0.34 and 2.0.35. Fixes Bug#26700. + + -- Frederic Lepied Thu, 15 Oct 1998 08:42:15 +0200 + +joystick (0.8.0-4) unstable; urgency=low + + * oops removed stable. + + -- Frederic Lepied Sun, 6 Jul 1997 16:32:49 +0200 + +joystick (0.8.0-3) stable unstable; urgency=low + + * compiled with libc6. + + -- Frederic Lepied Sun, 6 Jul 1997 09:06:33 +0200 + +joystick (0.8.0-2) stable unstable; urgency=low + + * compiled for kernels 2.0.27 and 2.0.30 (fixes bug #9902). + + -- Frederic Lepied Thu, 5 Jun 1997 20:18:56 +0200 + +joystick (0.8.0-1) unstable; urgency=low + + * Initial Release. + + -- Frederic Lepied Fri, 31 Jan 1997 22:13:59 +0100 --- joystick-20051019.orig/debian/compat +++ joystick-20051019/debian/compat @@ -0,0 +1 @@ +4 --- joystick-20051019.orig/debian/jscal.1 +++ joystick-20051019/debian/jscal.1 @@ -0,0 +1,33 @@ +.TH JSCAL 1 +.SH NAME +jscal \- joystick calibration program +.SH SYNOPSIS +.B jscal +[options] +.SH DESCRIPTION +.B jscal +is a joystick calibration program for Linux joystick driver. +.SH OPTIONS +.TP +.I \-c, --calibrate +Calibrate the joystick. +.TP +.I \-h, --help +Print out a summary of available options. +.TP +.I \-s , --set-correction +Sets correction to specified values. +.TP +.I \-t --test-center +Tests if the joystick is correctly calibrated. Returns 2 if the axes are +not calibrated, 3 if buttons were pressed, 1 if there was any other +error, and 0 on success. +.TP +.I \-V, --version +Prints the version numbers. +.TP +.I \-p, --print-correction +Prints the current correction settings. The format of the output is +a jscal command line. +.SH SEE ALSO +\fBjstest\fP(1), \fBinputattach\fP(1). --- joystick-20051019.orig/debian/copyright +++ joystick-20051019/debian/copyright @@ -0,0 +1,29 @@ +This package was debianized by on +Fri, 31 Jan 1997 22:13:59 +0100. + +It was taken over by Edward Betts on +Thu, 6 Jan 2000 23:05:44 +0000. + +It was downloaded from CVS on http://linuxconsole.sourceforge.net/ + +Copyright: + + Copyright (C) 1999-2001 Vojtech Pavlik, Edward Betts, Eduard Bloch + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the + Free Software Foundation, Inc., + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. --- joystick-20051019.orig/debian/jstest.1 +++ joystick-20051019/debian/jstest.1 @@ -0,0 +1,33 @@ +.TH JSTEST 1 +.SH NAME +jstest \- joystick test program +.SH SYNOPSIS +.B jstest +[--normal] [--old] [--event] [--nonblock] [--select] +.SH DESCRIPTION +.B jstest +can be used to test all the features of the Linux +joystick API, including non-blocking and \fBselect\fP(2) access, as +well as version 0.x compatibility mode. +.PP +It is also intended to +serve as an example implementation for those who wish to learn +how to write their own joystick using applications. +.SH OPTIONS +.TP +.I \--normal +One-line mode showing immediate status. +.TP +.I \--old +Same as --normal, using 0.x interface. +.TP +.I \--event +Prints events as they come in. +.TP +.I \--nonblock +Same as --event, in nonblocking mode. +.TP +.I \--select +Same as --event, using \fBselect\fP(2) call. +.SH SEE ALSO +\fBjscal\fP(1), \fBinputattach\fP(1), \fBselect\fP(2). --- joystick-20051019.orig/debian/inputattach.1 +++ joystick-20051019/debian/inputattach.1 @@ -0,0 +1,28 @@ +.TH INPUTATTACH 1 +.SH NAME +inputattach \- attach a serial line to a joystick device +.SH SYNOPSIS +.B inputattach + +.SH DESCRIPTION +.B inputattach +is used for attaching a serial line to a joystick device via a +line discipline. +.PP +Exactly one of the following modes must be specified on the command +line. +.SH MODES +.TP +.I \--sball4 +Use this option for the SpaceBall 4000 FLX. +.TP +.I \--spaceorb +Use this option for the SpaceOrb 360 or SpaceBall Avenger. +.TP +.I \--magellan +Use this option for the Magellan or SpaceMouse. +.TP +.I \--warrior +Use this option for the WingMan Warrior. +.SH SEE ALSO +\fBjscal\fP(1), \fBjstest\fP(1). --- joystick-20051019.orig/debian/control +++ joystick-20051019/debian/control @@ -0,0 +1,15 @@ +Source: joystick +Section: utils +Priority: optional +Maintainer: Edward Betts +Standards-Version: 3.6.2 +Build-Depends: cdbs (>= 0.4.23-1.1), build-essential, debhelper (>= 4.1.0) + +Package: joystick +Architecture: any +Depends: ${shlibs:Depends}, makedev (>= 2.3.1-24), inputattach, ${misc:Depends} +Description: Testing and calibration tools + jstest (1) - joystick test program + jscal (1) - joystick calibration program + . + Requires at Linux 2.4 or newer. --- joystick-20051019.orig/debian/rules +++ joystick-20051019/debian/rules @@ -0,0 +1,8 @@ +#!/usr/bin/make -f + +DEB_SRCDIR = $(CURDIR)/utils + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/makefile.mk + +DEB_MAKE_BUILD_TARGET = jstest jscal --- joystick-20051019.orig/debian/joystick.install +++ joystick-20051019/debian/joystick.install @@ -0,0 +1 @@ +utils/{jscal,jstest} usr/bin --- joystick-20051019.orig/debian/joystick.manpages +++ joystick-20051019/debian/joystick.manpages @@ -0,0 +1 @@ +debian/{jscal,jstest}.1