--- xboing-2.4.orig/debian/menu +++ xboing-2.4/debian/menu @@ -0,0 +1,2 @@ +?package(xboing):needs="x11" section="Games/Blocks" title="Xboing" \ + command="/usr/games/xboing" --- xboing-2.4.orig/debian/dirs +++ xboing-2.4/debian/dirs @@ -0,0 +1,4 @@ +var/games +usr/share/man/man6 +usr/share/applications +usr/share/pixmaps --- xboing-2.4.orig/debian/watch +++ xboing-2.4/debian/watch @@ -0,0 +1,3 @@ +version=3 + +http://www.techrescue.org/xboing/xboing([\d.]+)\.tar\.gz --- xboing-2.4.orig/debian/postrm +++ xboing-2.4/debian/postrm @@ -0,0 +1,10 @@ +#!/bin/sh -e + +SCOREFILE=/var/games/xboing.score + +# Remove high score file on purge. +if [ "$1" = "purge" ]; then + rm -f "$SCOREFILE" +fi + +#DEBHELPER# --- xboing-2.4.orig/debian/xboing.xpm +++ xboing-2.4/debian/xboing.xpm @@ -0,0 +1,190 @@ +/* XPM */ +static char * xboing_xpm[] = { +"32 32 155 2", +" c None", +". c #000000", +"+ c #120000", +"@ c #700000", +"# c #240000", +"$ c #000055", +"% c #000070", +"& c #000028", +"* c #005100", +"= c #007000", +"- c #002D00", +"; c #4C4C00", +"> c #707000", +", c #313100", +"' c #290000", +") c #FF0000", +"! c #520000", +"~ c #0000C2", +"{ c #0000FF", +"] c #00005C", +"^ c #00B800", +"/ c #00FF00", +"( c #006600", +"_ c #ADAD00", +": c #FFFF00", +"< c #050000", +"[ c #1F0000", +"} c #0A0000", +"| c #000017", +"1 c #00001F", +"2 c #00000B", +"3 c #001600", +"4 c #001F00", +"5 c #000C00", +"6 c #151500", +"7 c #1F1F00", +"8 c #0D0D00", +"9 c #000027", +"0 c #0000F5", +"a c #00004E", +"b c #998366", +"c c #CAAD86", +"d c #493E30", +"e c #B00000", +"f c #F50000", +"g c #620000", +"h c #00A600", +"i c #00F500", +"j c #006C00", +"k c #000029", +"l c #000052", +"m c #A0896A", +"n c #D2B48C", +"o c #4C4132", +"p c #B80000", +"q c #660000", +"r c #00AD00", +"s c #000018", +"t c #000099", +"u c #000031", +"v c #605240", +"w c #7E6C54", +"x c #2D271E", +"y c #6E0000", +"z c #990000", +"A c #3D0000", +"B c #006800", +"C c #009900", +"D c #004300", +"E c #141400", +"F c #7A7A00", +"G c #272700", +"H c #005D00", +"I c #007A00", +"J c #002C00", +"K c #000058", +"L c #00007A", +"M c #535300", +"N c #363600", +"O c #292900", +"P c #525200", +"Q c #00C200", +"R c #005C00", +"S c #0000B8", +"T c #000066", +"U c #030300", +"V c #070700", +"W c #001000", +"X c #001400", +"Y c #000700", +"Z c #00000F", +"` c #000014", +" . c #000008", +".. c #0E0E00", +"+. c #090900", +"@. c #1A0526", +"#. c #A020F0", +"$. c #330A4D", +"%. c #3B0000", +"&. c #4E0000", +"*. c #550000", +"=. c #330000", +"-. c #890000", +";. c #210000", +">. c #8F7A5F", +",. c #5C4F3E", +"'. c #300000", +"). c #590000", +"!. c #090909", +"~. c #141414", +"{. c #0A0A0A", +"]. c #0E0316", +"^. c #5A1286", +"/. c #1D062B", +"(. c #110000", +"_. c #4A0000", +":. c #5B0000", +"<. c #500000", +"[. c #AF7E7E", +"}. c #FF8F8F", +"|. c #B57F7F", +"1. c #0D0D0D", +"2. c #504535", +"3. c #76654E", +"4. c #342C22", +"5. c #978787", +"6. c #FF1D1D", +"7. c #FF1B1B", +"8. c #A18989", +"9. c #000015", +"0. c #000085", +"a. c #00002A", +"b. c #B8A3A3", +"c. c #C2A3A3", +"d. c #390B55", +"e. c #53117D", +"f. c #250737", +"g. c #232121", +"h. c #DD7676", +"i. c #FF3D3D", +"j. c #DF7272", +"k. c #2B2727", +"l. c #6D16A3", +"m. c #460E6A", +"n. c #2D2D2D", +"o. c #666666", +"p. c #313131", +"q. c #000002", +"r. c #00000A", +"s. c #000003", +"t. c #040107", +"u. c #06010A", +"v. c #030104", +"w. c #3B3B00", +"x. c #CFCF00", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . + @ @ @ @ # . $ % % % % & . * = = = = - . ; > > > > , . . ", +". . . ' ) ) ) ) ! . ~ { { { { ] . ^ / / / / ( . _ : : : : > . . ", +". . . ' ) ) ) ) ! . ~ { { { { ] . ^ / / / / ( . _ : : : : > . . ", +". . . < [ [ [ [ } . | 1 1 1 1 2 . 3 4 4 4 4 5 . 6 7 7 7 7 8 . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . 9 0 0 0 0 a . b c c c c d . e f f f f g . h i i i i j . . ", +". . . k { { { { l . m n n n n o . p ) ) ) ) q . r / / / / = . . ", +". . . s t t t t u . v w w w w x . y z z z z A . B C C C C D . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . E F F F F G . H I I I I J . K L L L L u . M F F F F N . . ", +". . . O : : : : P . Q / / / / R . S { { { { T . _ : : : : > . . ", +". . . O : : : : P . Q / / / / R . S { { { { T . _ : : : : > . . ", +". . . U E E E E V . W X X X X Y . Z ` ` ` ` .. ..E E E E +.. . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . @.#.#.#.#.$.. %.&.*.=.-.;.. . . . . . . . >.n n n n ,.. . ", +". . . @.#.#.#.#.$.. '.).*.=.-.;.. . !.~.{.. . . >.n n n n ,.. . ", +". . . ].^.^.^.^./.. (._.:.<.=.=.. !.[.}.|.1.. . 2.3.3.3.3.4.. . ", +". . . . . . . . . . . . . . . . . 5.6.) 7.8.. . . . . . . . . . ", +". . . 9.0.0.0.0.a.. . . . . . . . b.) ) ) c.. . d.e.e.e.e.f.. . ", +". . . k { { { { l . . . . . . . . g.h.i.j.k.. . l.#.#.#.#.m.. . ", +". . . k { { { { l . . . . . . . . . n.o.p.. . . l.#.#.#.#.m.. . ", +". . . q.r.r.r.r.s.. . . . . . . . . . . . . . . t.u.u.u.u.v.. . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . w.F F F F F F F F w.. . . . . . . . . . . ", +". . . . . . . . . . E x.: : : : : : : : x.E . . . . . . . . . . ", +". . . . . . . . . . . N > > > > > > > > N . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . "}; --- xboing-2.4.orig/debian/xboing.desktop +++ xboing-2.4/debian/xboing.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] + +Name=XBoing II +GenericName=XBoing II +Comment=Destroy some blocks + +Type=Application +Exec=xboing +Icon=xboing +Terminal=false +Categories=Game;ArcadeGame; + --- xboing-2.4.orig/debian/changelog +++ xboing-2.4/debian/changelog @@ -0,0 +1,323 @@ +xboing (2.4-31) unstable; urgency=low + + [ Ansgar Burchardt ] + * debian/control: Change XS-Vcs-* to Vcs-* + * debian/control: Add Homepage field + + [ Eddy Petrișor ] + * fix Vcs-Svn URL to point to svn, not the incomplete ssh location + + [ Barry deFreese ] + * Add build-dep on xutils-dev. (Closes: #485536). + + Remove xutils and x-dev build-deps. + * Add call to dh_desktop. + * 040_manpage_errors.diff - Fix manpage lintian issues. + * Update watch file regexp. + * Bump Standards Version to 3.8.0. (No changes needed). + + -- Barry deFreese Fri, 13 Jun 2008 11:58:30 -0400 + +xboing (2.4-30) unstable; urgency=low + + [ Barry deFreese ] + * Add watch file + * debian/rules: make xboing group games and SGID so it can save to scores file + * (Closes: #406307) + * Move prerm to postrm to purge score file (Closes: #443453) + * Also typo in filename .score not .scores + * Bump debhelper b-d to 5 + * Add desktop file + * Use icon.xpm as debian/xboing.xpm for desktop icon (resized to 32x32) + * Set menu section to Games/Blocks + * Don't let make clean ignore errors + * Add VCS tags + * Add myself to Uploaders + + -- Barry deFreese Fri, 19 Oct 2007 20:39:59 -0400 + +xboing (2.4-29) unstable; urgency=low + + [ Sam Hocevar (Debian packages) ] + * debian/patches/030_auto_validate_yn.diff: + + Do not wait for the user to press enter after a [y/n] question + (Closes: #22224). + + [ Jon Dowland ] + * update menu section to "Games/Action" for menu policy transition. + Thanks Linas Žvirblis. + + -- Jon Dowland Thu, 12 Jul 2007 12:08:58 +0100 + +xboing (2.4-28) unstable; urgency=low + + * New maintainer. + * Maintainer upload. + * Acknowledge previous NMUs (Closes: #141656, #333286, #235599, #230617, + Closes: #367840, #346791, #174924). Thanks to Marc 'HE' Brockschmidt + and Steve Kemp. + + * Moved packaging to the Debian Games Team. + * Use quilt for patch management. + * debian/control: + + Build-depend on quilt. + + Removed deprecated conflict with suidmanager. + + Uncapitalised short description. + * debian/rules: + + Use dh_installman instead of dh_installmanpages. + + Ship the executable root:root 0755, it is changed in the postinst + script instead. + + Fixed bashisms in the package rules. + + -- Sam Hocevar (Debian packages) Tue, 30 May 2006 12:43:58 +0200 + +xboing (2.4-27) unstable; urgency=low + + * QA upload. + * Orphan package. + + * Fix xpm include path. (Closes: #367840) + * debian/menu: Quote all strings. + * debian/postinst: Fix deprecated chown-usage to use : as uid/gid separator + * debian/postrm: Move to prerm to remove scorefile before dpkg tries to + removes /var/games (Closes: #333286) + * Fix xboing man page section. + * Update build system minimally to use debhelper 4. + + * debian/control: Bump Standards-Version. + + -- Marc 'HE' Brockschmidt Sat, 27 May 2006 10:13:36 +0200 + +xboing (2.4-26.3) unstable; urgency=low + + * Brown paper bag-Non-maintainer upload. + * This package actually uses a patch system, so USE it, damnit. + + -- Marc 'HE' Brockschmidt Wed, 18 Jan 2006 00:13:20 +0100 + +xboing (2.4-26.2) unstable; urgency=low + + * Non-maintainer upload (xlibs-dev transition) + * Removed dep on xlibs-dev and replaced it by fitting -dev packages. + (Closes: 346791) + * Applied patch from Andreas Schmidt to + slow down the game speed to useable values. (Closes: #230617) + * Fixed wording of description. (Closes: #141656) + + -- Marc 'HE' Brockschmidt Tue, 17 Jan 2006 23:25:23 +0100 + +xboing (2.4-26.1) unstable; urgency=high + + * Repackage security update for unstable + + -- Matt Zimmerman Fri, 27 Feb 2004 13:56:25 -0800 + +xboing (2.4-26woody1) stable-security; urgency=high + + * Non maintainer upload by the Security Team. + * Fix buffer overflows allowing execution of arbitary code with GID(games). + (CAN-2004-0149) + + -- Steve Kemp Mon, 16 Feb 2004 11:15:37 +0000 + +xboing (2.4-26) unstable; urgency=low + + * applied patch from Will French to fix paddle movement + (closes: #133969) + * description changed (closes: #129144) + + -- Alexander Kotelnikov Sun, 3 Mar 2002 00:30:58 +0300 + +xboing (2.4-25) unstable; urgency=low + + * fixed paths according to FHS (closes:#115856) + + -- Alexander Kotelnikov Mon, 7 Jan 2002 17:26:36 +0300 + +xboing (2.4-24) unstable; urgency=low + + * closes: #103837 + * previous upload fixed #91941 (closes: #91941) + + -- Alexander Kotelnikov Sun, 26 Aug 2001 15:18:36 +0400 + +xboing (2.4-23) unstable; urgency=low + + * xpm4g-dev removed from Build-Depends + * closes #91941 + * Conflicts: suidmanager (<< 0.50) added + + -- Alexander Kotelnikov Tue, 17 Apr 2001 12:43:24 +0400 + +xboing (2.4-22) unstable; urgency=low + + * rebuild to make xboing running in X4 + * -usedefcmap, -sound and -grab are now swiched on by default + * -no-usedefcmap, -no-sound and -no-grab are added as debian/init.c.diff + * closes: #76745, #62325 + + -- Alexander Kotelnikov Tue, 21 Nov 2000 00:21:04 +0300 + +xboing (2.4-21) unstable; urgency=low + + * fixed contents of debian/, that I missed in my first release. + + -- Alexander Kotelnikov Tue, 21 Nov 2000 00:20:54 +0300 + +xboing (2.4-20) unstable; urgency=low + + * xboing changed its maintainer. + + -- Alexander Kotelnikov Thu, 14 Sep 2000 19:37:54 +0400 + +xboing (2.4-19) unstable; urgency=low + + * Build deps. + + -- Joey Hess Sat, 4 Dec 1999 18:10:38 -0800 + +xboing (2.4-18) unstable; urgency=low + + * debian/rules: Don't call outdated dh_du. + + -- Joey Hess Sun, 28 Nov 1999 21:37:47 -0800 + +xboing (2.4-17) unstable; urgency=low + + * New upstream web page address. + + -- Joey Hess Thu, 23 Sep 1999 20:38:22 -0700 + +xboing (2.4-16) unstable; urgency=low + + * Checked into CVS with some difficulty; it has upstream CVS dirs and + cvs-inject bombs. + * FHS + + -- Joey Hess Mon, 20 Sep 1999 20:56:58 -0700 + +xboing (2.4-15) unstable; urgency=low + + * Sparc fix from Christian Meder + (closes: #33061) + + -- Joey Hess Tue, 9 Feb 1999 14:50:45 -0800 + +xboing (2.4-14) unstable; urgency=low + + * Finally applied the patch in bug #22887, inside #ifdef __alpha__ so + it only affects alpha (it makes i386 too slow). Also closes #29361. + + -- Joey Hess Mon, 7 Dec 1998 20:43:57 -0800 + +xboing (2.4-13) unstable; urgency=low + + * Rebuilt with latest debhelper to change how the sgid binay is registered. + + -- Joey Hess Tue, 27 Oct 1998 22:23:42 -0800 + +xboing (2.4-12) unstable; urgency=medium + + * Installed a workaround for a DISPLAY overrun security hole, that could + get you access to the games group (#26003). + + -- Joey Hess Fri, 21 Aug 1998 00:40:24 -0700 + +xboing (2.4-11) unstable; urgency=low + + * Fixed == bashism. + + -- Joey Hess Thu, 20 Aug 1998 00:50:48 -0700 + +xboing (2.4-10) unstable; urgency=low + + * Fixed minor lintian problems. + * Moved binary to /usr/games and mqanpage to /usr/man/man6. + * Made score file not be a conffile. + + -- Joey Hess Sat, 30 May 1998 21:10:40 -0400 + +xboing (2.4-9) unstable; urgency=low + + * Fixed lintain detected: + - old standards-version + - mode 444 files (rebult with debhelper 0.60 to fix). + + -- Joey Hess Mon, 9 Feb 1998 11:42:54 -0800 + +xboing (2.4-8) unstable; urgency=low + + * Use debhelper. + * Removed shlibs.local file that is no longer necessary. + + -- Joey Hess Sat, 7 Feb 1998 20:14:42 -0800 + +xboing (2.4-7) unstable; urgency=low + + * Libc6. + * Use shlibs.local file to override broken xpm4g shlibs file. + * Updated menu file to new format. + * Routine update of debian/rules: + Fixed binary-indep target. + + -- Joey Hess Sat, 13 Sep 1997 13:11:33 -0400 + +xboing (2.4-6) unstable; urgency=low + + * Fixed copyright file. + + -- Joey Hess Mon, 10 Feb 1997 20:12:19 -0500 + +xboing (2.4-5) unstable; urgency=low + + * Built with alternate sound driver and the soundIt library, to provide + sound effects that no longer get out of sync with the gameplay. (#7090) + + -- Joey Hess Sat, 1 Feb 1997 22:15:45 -0500 + +xboing (2.4-4) unstable; urgency=low + + * Added dependancy on xpm4.7. + * Moved menu entry to Games/Arcade. + * Don't call debstd with package name as parameter. + + -- Joey Hess Sat, 1 Feb 1997 22:15:45 -0500 + +xboing (2.4-3) unstable; urgency=low + + * Made score file a conffile. + * Let debstd install the menu-file. + * Routine update of debian/rules: + New email address. + + -- Joey Hess Fri, 20 Dec 1996 23:52:56 -0500 + +xboing (2.4-2) unstable; urgency=low + + * Moved man page into section 6 (#5880) + * Use update-menus instead of install-fvwm2menu + + -- Joey Hess Mon, 9 Dec 1996 00:53:40 -0500 + +xboing (2.4-1) unstable; urgency=low + + * New upstream release. + * Routine update of debian/rules (now uses debmake). + * Fixed permissions on high-score file. + * Xboing now knows the right path and filenames for its doc files. + (closed #5530) + + -- Joey Hess Fri, 22 Nov 1996 22:04:35 -0500 + +xboing (2.3-2) unstable; urgency=low + + * Updated to new source format. + * Now registers itself with install-fvwm2menu. + + -- Joey Hess Sun, 6 Oct 1996 15:09:04 -0400 + +2.3-1 +* Initial release. + +Local variables: +mode: debian-changelog +End: --- xboing-2.4.orig/debian/control +++ xboing-2.4/debian/control @@ -0,0 +1,28 @@ +Source: xboing +Section: games +Priority: optional +Build-Depends: debhelper (>= 5.0), quilt, libx11-dev, libxpm-dev (>= 3.5.4.2), libxext-dev, xutils-dev +Maintainer: Debian Games Team +Uploaders: Sam Hocevar (Debian packages) , Barry deFreese +Standards-Version: 3.8.0 +Vcs-Svn: svn://svn.debian.org/svn/pkg-games/packages/trunk/xboing/ +Vcs-Browser: http://svn.debian.org/wsvn/pkg-games/packages/trunk/xboing/?op=log +Homepage: http://xboing.techrescue.org + +Package: xboing +Architecture: any +Depends: ${shlibs:Depends} +Description: blockout game for X + XBoing is a blockout type game where you have a paddle which + you control to bounce a proton ball around the game zone + destroying blocks. + . + Each block carries a different point value. The more blocks + you destroy, the better your score. The person with the + highest score wins. + . + The arena is filled with blocks and other objects. You have + a paddle that can move from left to right at the bottom of + the arena. You control the paddle so that the proton ball + bounces around blowing up blocks and that it does not go + past the paddle and out the bottom, much like a pinball game. --- xboing-2.4.orig/debian/copyright +++ xboing-2.4/debian/copyright @@ -0,0 +1,55 @@ +This is the Debian Linux prepackaged version of xboing, the breakout game. + +This package was put together by Joey Hess , +with sources obtained from: + http://www.techrescue.org/xboing/ +And the soundIt library, from: + ftp://sunsite.unc.edu/pub/Linux/devel/soundIt0.03.tar.gz + +The following copyright applies to this software: + +Xboing is linked with the soundIt library, which has the following +copyright: + +/* SoundIt library 0.021 + + Copyright 1994 Brad Pitzel pitzel@cs.sfu.ca + + Feel free to use/distribute/modify as long as proper credits + are included. +*/ + +Xboing's copyright: + +/* + * XBoing - An X11 blockout style computer game + * + * (c) Copyright 1993-1997, Justin C. Kibell, All Rights Reserved + * + * The X Consortium, and any party obtaining a copy of these files from + * the X Consortium, directly or indirectly, is granted, free of charge, a + * full and unrestricted irrevocable, world-wide, paid up, royalty-free, + * nonexclusive right and license to deal in this software and + * documentation files (the "Software"), including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons who receive + * copies from any such party to do so. This license includes without + * limitation a license to do the foregoing actions under any patents of + * the party supplying this software to the X Consortium. + * + * In no event shall the author be liable to any party for direct, indirect, + * special, incidental, or consequential damages arising out of the use of + * this software and its documentation, even if the author has been advised + * of the possibility of such damage. + * + * The author specifically disclaims any warranties, including, but not limited + * to, the implied warranties of merchantability and fitness for a particular + * purpose. The software provided hereunder is on an "AS IS" basis, and the + * author has no obligation to provide maintenance, support, updates, + * enhancements, or modifications. + * + * Author: Justin Christopher Kibell + * email: jck@catt.rmit.edu.au + * phone: 61 39282 2456 b/h + * Address: PO BOX 260, Eltham, Victoria, Australia, 3095. + */ --- xboing-2.4.orig/debian/postinst +++ xboing-2.4/debian/postinst @@ -0,0 +1,16 @@ +#!/bin/sh -e + +OLDSCOREFILE=/var/lib/games/xboing.score +SCOREFILE=/var/games/xboing.score + +if [ -e "$OLDSCOREFILE" ]; then + mv $OLDSCOREFILE $SCOREFILE +fi + +if [ ! -e "$SCOREFILE" ]; then + touch "$SCOREFILE" + chown root:games "$SCOREFILE" + chmod 664 "$SCOREFILE" +fi + +#DEBHELPER# --- xboing-2.4.orig/debian/compat +++ xboing-2.4/debian/compat @@ -0,0 +1 @@ +5 --- xboing-2.4.orig/debian/rules +++ xboing-2.4/debian/rules @@ -0,0 +1,58 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +build: build-stamp +build-stamp: + dh_testdir + QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2 + xmkmf -a + $(MAKE) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + [ ! -f Makefile ] || $(MAKE) -i clean + QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2 + dh_clean .version audio.c sta13622 version.c audio/soundIt.o Makefile + +# Build architecture-independent files here. +binary-indep: build + +# Build architecture-dependent files here. +binary-arch: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs usr/share/man/man6 + $(MAKE) PREFIX=debian/xboing install + install -D -m 644 debian/xboing.desktop debian/xboing/usr/share/applications/xboing.desktop + install -D -m 644 debian/xboing.xpm debian/xboing/usr/share/pixmaps/xboing.xpm + dh_installdocs README docs/problems.doc docs/todo.doc + dh_installexamples + dh_installmenu + dh_desktop + dh_installcron + dh_installman xboing.man + dh_installchangelogs docs/changes.doc + dh_strip + dh_compress + dh_fixperms + # Make it group games so it can save to the scores file + chgrp games debian/xboing/usr/games/xboing + chmod 2755 debian/xboing/usr/games/xboing + # these files come out mode 444. + chmod u+w debian/xboing/usr/share/games/xboing/sounds/* + chmod u+w debian/xboing/usr/share/games/xboing/levels/* + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary --- xboing-2.4.orig/debian/patches/040_manpage_errors.diff +++ xboing-2.4/debian/patches/040_manpage_errors.diff @@ -0,0 +1,86 @@ +Index: xboing-2.4.orig/xboing.man +=================================================================== +--- xboing-2.4.orig.orig/xboing.man 2008-06-13 15:16:25.000000000 -0400 ++++ xboing-2.4.orig/xboing.man 2008-06-13 17:25:52.000000000 -0400 +@@ -40,46 +40,45 @@ + .\" ========================================================================= + .\" + .TH XBOING 6x "November 1996" "X Version 11" +-.AU Justin C. Kibell + .SH NAME + xboing \- An X Window System based blockout clone. V2.4 + .SH SYNOPSIS + .B xboing +-[-version] [-usage] [-help] [-sync] [-display ] [-speed <1-10>] [-scores] [-keys] [-sound] [-setup] [-nosfx] [-grab] [-maxvol <1-100>] [-startlevel <1-MAXLEVELS>] [-usedefcmap] [-nickname ] [-noicon] ++[\-version] [\-usage] [\-help] [\-sync] [\-display ] [\-speed <1-10>] [\-scores] [\-keys] [\-sound] [\-setup] [\-nosfx] [\-grab] [\-maxvol <1-100>] [\-startlevel <1-MAXLEVELS>] [\-usedefcmap] [\-nickname ] [\-noicon] + .IP +--speed - The game speed, 1 - 9. 9=Fast ++\-speed \- The game speed, 1 - 9. 9=Fast + .br +--maxvol - The maximum volume as percentage ++\-maxvol \- The maximum volume as percentage + .br +--startlevel - The starting level for game ++\-startlevel \- The starting level for game + .br +--help - Produce this help message ++\-help \- Produce this help message + .br +--sync - Turn on X synchronisation ++\-sync \- Turn on X synchronisation + .br +--usage - Print a brief help message ++\-usage \- Print a brief help message + .br +--version - Print out the current version ++\-version \- Print out the current version + .br +--scores - Print out current highscores ++\-scores \- Print out current highscores + .br +--keys - Use keys instead of mouse control ++\-keys \- Use keys instead of mouse control + .br +--sound - Turn audio ON for game ++\-sound \- Turn audio ON for game + .br +--setup - Print setup information ++\-setup \- Print setup information + .br +--nosfx - Turn off special effects ++\-nosfx \- Turn off special effects + .br +--grab - Turn pointer grabbing on ++\-grab \- Turn pointer grabbing on + .br +--usedefcmap - Use the default colourmap ++\-usedefcmap \- Use the default colourmap + .br +--nickname - Use nickname instead of real one ++\-nickname \- Use nickname instead of real one + .br +--noicon - Do not create a custom icon ++\-noicon \- Do not create a custom icon + .br +--display - Set the display for the game ++\-display \- Set the display for the game + .RE + + .SH DESCRIPTION +@@ -380,7 +379,7 @@ + + level format: (case sensitive) + .IP +-. = blank ++\&. = blank + .br + w = wall block + .br +@@ -480,6 +479,6 @@ + + See README documents in source distribution for list of bugs and bug fixes. + +-Mail all bug reports/suggestions to jck@catt.rmit.edu.au specifying the version and machine type you are using. Use 'uname -a' to explain the machine type. Please note the version of X11 that you have installed as well, ie: X11R6, X11R5, X11R4, etc. ++Mail all bug reports/suggestions to jck@catt.rmit.edu.au specifying the version and machine type you are using. Use 'uname \-a' to explain the machine type. Please note the version of X11 that you have installed as well, ie: X11R6, X11R5, X11R4, etc. + + Please read all documentation before asking for help - only fair. --- xboing-2.4.orig/debian/patches/010_initial_patches.diff +++ xboing-2.4/debian/patches/010_initial_patches.diff @@ -0,0 +1,909 @@ +Index: xboing-2.4/audio/soundIt.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ xboing-2.4/audio/soundIt.c 2006-05-30 12:53:03.000000000 +0200 +@@ -0,0 +1,483 @@ ++/* SoundIt library 0.021 ++ ++ Copyright 1994 Brad Pitzel pitzel@cs.sfu.ca ++ ++ Feel free to use/distribute/modify as long as proper credits ++ are included. ++*/ ++ ++#include "soundIt.h" ++#include ++#include /* PATH_MAX */ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++/*==========================================================================*/ ++/* the mix buff, where the channels are mixed into. The mix buffer is then ++ dumped to the sound device (/dev/dsp). Samples are mixed in ++ Vunclipbuf (buffer of ints), then the values in Vunclipbuf are clipped to ++ values between 0 and 255, and stored into Vclippedbuf (buffer of unsigned ++ chars). ++*/ ++ ++struct Mix ++ { ++ unsigned char *Vclippedbuf; ++ int *Vunclipbuf; ++ int Vsize; ++ }; ++typedef struct Mix Mix; ++ ++/*==========================================================================*/ ++struct Channel ++ { ++ unsigned char *Vstart,*Vcurrent; /* ptr's into a playing sample */ ++ int Vlen; /* length of sample in bytes */ ++ int Vleft; /* bytes left of sample to play */ ++ }; ++typedef struct Channel Channel; ++ ++/*==========================================================================*/ ++ ++/* variables prefixed with S_ are static */ ++/* 0 if mixer isn't initialized or init failed, 1 if mixer is good */ ++static int sampleMixerStatus = 0; ++ ++static const Sample *S_sounds = NULL; /* ptr to array of samples */ ++static int S_num_sounds = 0; /* size of 'sounds' array above */ ++static int S_fd_snddev = -1; /* file # for sound device once open */ ++static int S_fd_pipe[2] = { -1, -1 }; /* pipe to talk to child process */ ++static int S_son_pid = -1; /* process ID for the forked sound mixer */ ++static const char *S_snddev = NULL; /* char string for device, ie "/dev/dsp" */ ++static int S_num_channels = 6; /* number of channels to mix */ ++static int S_playback_freq = 0; /* playback frequency (in Hz) */ ++/*==========================================================================*/ ++/* non-public functions, used only within this file*/ ++ ++int Snd_init_dev(); ++int Snd_restore_dev(); ++ ++void Chan_reset( Channel *chan ); /* init channel structure */ ++ ++ /* start a sample playing on a channel */ ++void Chan_assign( Channel *chan, const Sample *snd ); ++ ++ /* mix all channels together into the 'mix' structure */ ++int Chan_mixAll( Mix *mix, Channel *ch ); ++ ++ /* used by Chan_mixAll to mix the 1st channel */ ++int Chan_copyIn( Channel *chan, Mix *mix ); ++ ++ /* used by Chan_mixAll to mix the middle channels */ ++int Chan_mixIn( Channel *chan, Mix *mix ); ++ ++ /* used by Chan_mixAll to mix the last channel */ ++int Chan_finalMixIn( Channel *chan, Mix *mix ); ++ ++ ++/* alloc mem for mix buffer, and deallocate function */ ++/* The sound channels are mixed together into the mix buffer */ ++/* then the mix buffer data is sent directly to the sound device */ ++void Mix_alloc( Mix *mix, int size ); ++void Mix_dealloc( Mix *mix ); ++ ++/*==========================================================================*/ ++/* justing for testing, normally not called */ ++void dump_snd_list() ++ { ++ int i=0; ++ ++ for(i=0; iVstart=NULL; ++ chan->Vcurrent=NULL; ++ chan->Vlen=0; ++ chan->Vleft=0; ++ } ++ ++/*==========================================================================*/ ++void Chan_assign( Channel *chan, const Sample *snd ) ++ { ++ chan->Vstart = snd->data; ++ chan->Vcurrent= chan->Vstart; ++ chan->Vlen = snd->len; ++ chan->Vleft = snd->len; ++ } ++ ++/*==========================================================================*/ ++int Chan_copyIn( Channel *chan, Mix *mix ) ++ { ++ int i,*p = mix->Vunclipbuf, result, min; ++ ++ result = (chan->Vleft>0) ? 1 : 0; ++ min = (chan->Vleft < mix->Vsize) ? chan->Vleft : mix->Vsize; ++ ++ for(i=0; iVcurrent++; ++ } ++ chan->Vleft -= i; ++ ++ /* fill the remaining (if any) part of the mix buffer with silence */ ++ while (iVsize) ++ { ++ *p++ = 128; ++ i++; ++ } ++ return result; ++ } ++ ++/*==========================================================================*/ ++int Chan_mixIn( Channel *chan, Mix *mix ) ++ { ++ int i,*p = mix->Vunclipbuf, result, min; ++ ++ result = (chan->Vleft>0) ? 1 : 0; ++ min = (chan->Vleft < mix->Vsize) ? chan->Vleft : mix->Vsize; ++ ++ for(i=0; iVcurrent++) - 128; ++ } ++ ++ chan->Vleft -= i; ++ return result; ++ } ++ ++/*========================================================================*/ ++/* clip an int to a value between 0 and 255 */ ++static inline ++unsigned char clip(int i) ++ { ++ return (i<0) ? 0 : ( (i>255) ? 255 : i ); ++ } ++ ++/*==========================================================================*/ ++int Chan_finalMixIn( Channel *chan, Mix *mix ) ++ { ++ register int i; ++ int *p = mix->Vunclipbuf, result, min; ++ unsigned char *final = mix->Vclippedbuf; ++ ++ result = (chan->Vleft>0) ? 1 : 0; ++ min = (chan->Vleft < mix->Vsize) ? chan->Vleft : mix->Vsize; ++ ++ for(i=0; iVcurrent++) - 128; ++ *final++ = clip(*p++); ++ } ++ chan->Vleft -= i; ++ ++ /* copy rest of Vunclipbuf over to Vclippedbuf */ ++ while (iVsize) ++ { ++ *final++ = clip(*p++); ++ i++; ++ } ++ ++ return result; ++ } ++ ++ ++/*==========================================================================*/ ++void Mix_alloc(Mix *mix, int size) ++ { ++ mix->Vclippedbuf = (unsigned char *)calloc( sizeof(char), size); ++ mix->Vunclipbuf = (int *)calloc( sizeof(int), size); ++ mix->Vsize = size; ++ ++ if ((mix->Vclippedbuf==NULL)||(mix->Vunclipbuf==NULL)) ++ { ++ fprintf(stderr,"Unable to allocate memory for mixer buffer\n"); ++ exit(-1); ++ } ++ } ++ ++/*==========================================================================*/ ++void Mix_dealloc( Mix *mix) ++ { ++ if (mix->Vclippedbuf) free(mix->Vclippedbuf); ++ if (mix->Vunclipbuf) free(mix->Vunclipbuf); ++ } ++ ++/*==========================================================================*/ ++/* Mixes together the channels into one sound. ++ Returns # of channels currently playing *any* sound ++ Therefore, return 0 means to channels have a sample, therefore no ++ sound is playing ++*/ ++int Chan_mixAll( Mix *mix, Channel *chan ) ++ { ++ int result = 0,i=0; ++ ++ result = Chan_copyIn( chan, mix); ++ ++ /* we want to loop for S_num_channels-2 */ ++ for(i=2;idata = NULL; ++ sample->len = 0; ++ ++ fp = fopen(file,"r"); ++ ++ if (fp==NULL) return -1; ++ ++ /* get length of the file */ ++ sample->len = lseek( fileno(fp), 0, SEEK_END ); ++ ++ /* go back to beginning of file */ ++ lseek( fileno(fp), 0, SEEK_SET ); ++ ++ /* alloc memory for sample */ ++ sample->data = (unsigned char *)malloc( sample->len ); ++ ++ if (sample->data==NULL) ++ { ++ fclose(fp); ++ return -2; ++ } ++ ++ fread( sample->data, 1, sample->len, fp ); ++ ++ fclose(fp); ++ ++ return 0; ++ } +Index: xboing-2.4/audio/soundIt.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ xboing-2.4/audio/soundIt.h 2006-05-30 12:53:03.000000000 +0200 +@@ -0,0 +1,82 @@ ++/* SoundIt library 0.03 ++ ++ Copyright 1994 Brad Pitzel pitzel@cs.sfu.ca ++ ++ Feel free to use/distribute/modify as long as proper credits ++ are included. ++*/ ++ ++/* Designed for digital sound effects in games. ++ ++ Will mix channels of mono 8-bit raw samples, & play back in "real-time". ++ Each channel can only play one sample at a time, but all ++ channels can play a different sample simultaneously. ++ ++ If you have sox, use the ' -t .ub ' option to make samples ++ that this library will play properly. ++ ++ I wrote this in C, instead of C++, so hopefully a few more people will ++ take a look and make it better :-) ++*/ ++ ++#ifndef SOUNDIT_VERS ++#define SOUNDIT_VERS "0.03" ++ ++#include ++#include ++ ++/* 00002 = 2 fragments */ ++/* 00007 = means each fragment is 2^7 or 128 bytes */ ++/* See voxware docs (in /usr/src/linux/drivers/sound) for more info */ ++#define FRAG_SPEC 0x00020007 ++ ++/*==========================================================================*/ ++struct Sample ++ { ++ unsigned char *data; /* unsigned 8-bit raw samples */ ++ int len; /* length of sample in bytes */ ++ }; ++ ++typedef struct Sample Sample; ++ ++/* given the name of a .raw sound file, load it into the Sample struct */ ++/* pointed to by 'sample' */ ++int ++Snd_loadRawSample( const char *file, Sample *sample ); ++ ++ ++/*==========================================================================*/ ++/* init sound device, etc.. */ ++/* num_snd = the number of samples in the sample array *sa */ ++/* sa = the sample array */ ++/* freq = the rate (Hz) to play back the samples */ ++/* channels = # of channels to mix */ ++/* sound_device = a char string for the sound device, eg, "/dev/dsp" */ ++/* returns: 0=success, -1=failure.*/ ++int ++Snd_init( int num_snd, const Sample *sa, int freq, ++ int channels, const char *sound_device ); ++ ++ ++/* shutdown sample player, free mem, etc/etc..*/ ++int ++Snd_restore(); ++ ++ ++/* play a sound effect in the given channel 1..n*/ ++/* volume = integers from 0 (off) to 100 (full volume)*/ ++int ++Snd_effect( int nr, int channel ); ++ ++ ++/* stop a channel (1..n) from playing*/ ++/*void ++Snd_reset(enum snd_channel channel);*/ ++ ++ ++/* stop all channels from playing*/ ++/*void ++Snd_reset();*/ ++ ++ ++#endif +Index: xboing-2.4/Imakefile +=================================================================== +--- xboing-2.4.orig/Imakefile 2006-05-30 12:52:57.000000000 +0200 ++++ xboing-2.4/Imakefile 2006-05-30 12:53:03.000000000 +0200 +@@ -24,18 +24,24 @@ + XCOMM This is the directory where the highscore, level & sound data will be + XCOMM placed. Default will be the current directory. + +- XBOING_DIR = . ++ XBOING_DIR = /usr/lib/games/xboing ++ ++XCOMM Added these to override defaults so make install installs into ++XCOMM $PREFIX and /usr/games -- Joey Hess. ++ ++ BINDIR = $(PREFIX)/usr/games + + XCOMM These are some defines that must be set. Some may be overwritten in the + XCOMM machine arch section. + +- XPMLIB = -L/usr/X11/lib -lXpm ++ XPMLIB = -lXpm + XPMINCLUDE = -I/usr/X11/include/X11 + XBOINGINCLUDE = -I./include + LEVEL_INSTALL_DIR = $(XBOING_DIR)/levels + SOUNDS_DIR = $(XBOING_DIR)/sounds + BACKUP_DIR = $(XBOING_DIR)/../backups +- HIGH_SCORE_FILE = $(XBOING_DIR)/.xboing.scr ++ HIGH_SCORE_DIR = /var/lib/games ++ HIGH_SCORE_FILE = $(HIGH_SCORE_DIR)/xboing.score + AUDIO_AVAILABLE = False + AUDIO_SRC = audio/NOaudio.c + AUDIO_INCLUDE = +@@ -44,6 +50,7 @@ + + XCOMM Uncomment this if you want to use ANY of the AUDIO sound systems + #define COMPILE_IN_AUDIO ++#define linux + + XCOMM Uncomment this if you want to use RPLAY sound system + XCOMM #define USE_RPLAY +@@ -62,9 +69,9 @@ + + #if defined(LinuxArchitecture) && defined(COMPILE_IN_AUDIO) + AUDIO_AVAILABLE = True +- AUDIO_SRC = audio/LINUXaudio.c ++ AUDIO_SRC = audio/LINUXaudio2.c + AUDIO_INCLUDE = +- AUDIO_LIB = ++ AUDIO_LIB = + #endif /* linux */ + + #if defined(svr4) && defined(COMPILE_IN_AUDIO) +@@ -81,7 +88,7 @@ + AUDIO_LIB = -laudio + #endif /* SGIArchitecture */ + +-#if defined(SparcArchitecture) && defined(COMPILE_IN_AUDIO) ++#if defined(SparcArchitecture) && !defined(LinuxArchitecture) && defined(COMPILE_IN_AUDIO) + AUDIO_AVAILABLE = True + AUDIO_SRC = audio/SUNaudio.c + +@@ -132,7 +139,7 @@ + -DLEVEL_INSTALL_DIR=\"$(LEVEL_INSTALL_DIR)\" \ + -DAUDIO_AVAILABLE=\"$(AUDIO_AVAILABLE)\" \ + -DSOUNDS_DIR=\"$(SOUNDS_DIR)\" \ +- -DREADMEP_FILE=\"$(XBOING_DIR)/docs/problems.doc\" ++ -DREADMEP_FILE=\"/usr/share/doc/xboing/problems.doc.gz\" + XCOMM -DUSE_FLOCK=\"True\" \ + XCOMM -DNEED_USLEEP=\"True\" \ + XCOMM -DNO_LOCKING=\"True\" +@@ -159,7 +166,7 @@ + highscore.o misc.o inst.o gun.o keys.o \ + audio.o special.o presents.o demo.o file.o \ + preview.o dialogue.o eyedude.o editor.o \ +- keysedit.o ++ keysedit.o audio/soundIt.o + + PROGRAMS = xboing + +@@ -174,6 +181,10 @@ + $(RM) $@ + $(LN) $? $@ + ++audio/soundIt.c: ++ cd audio && \ ++ gcc -Wall -O2 -finline-functions -fomit-frame-pointer -ffast-math -I. -c soundIt.c -o soundIt.o ++ + depend:: version.c audio.c + + ComplexProgramTarget_1($(PROGRAMS), $(LOCAL_LIBRARIES), ) +@@ -182,30 +193,31 @@ + @echo "XBoing directory is " $(XBOING_DIR) + @: + @echo "Creating directory " $(XBOING_DIR) +- @if [ ! -d $(XBOING_DIR) ]; then mkdir $(XBOING_DIR); fi +- $(INSTALL) -c $(INSTDATFLAGS) docs/problems.doc $(XBOING_DIR) ++ @if [ ! -d $(PREFIX)/$(XBOING_DIR) ]; then install -d $(PREFIX)/$(XBOING_DIR); fi ++ # $(INSTALL) -c $(INSTDATFLAGS) docs/problems.doc $(XBOING_DIR) + @: + @echo "Creating directory " $(LEVEL_INSTALL_DIR) +- @if [ ! -d $(LEVEL_INSTALL_DIR) ]; then mkdir $(LEVEL_INSTALL_DIR); fi ++ @if [ ! -d $(PREFIX)/$(LEVEL_INSTALL_DIR) ]; then install -d $(PREFIX)/$(LEVEL_INSTALL_DIR); fi + @: + @echo "Copying level data into directory " $(LEVEL_INSTALL_DIR) + @cd ./levels; set -x; for file in *.data; do \ +- $(INSTALL) -c $(INSTDATFLAGS) $$file $(LEVEL_INSTALL_DIR);\ ++ $(INSTALL) -c $(INSTDATFLAGS) $$file ../$(PREFIX)/$(LEVEL_INSTALL_DIR);\ + done + @: + @if [ "$(AUDIO_AVAILABLE)" = "True" ]; \ + then \ + echo "Creating directory " $(SOUNDS_DIR); \ +- if [ ! -d $(SOUNDS_DIR) ]; then mkdir $(SOUNDS_DIR); fi;\ ++ if [ ! -d $(PREFIX)/$(SOUNDS_DIR) ]; then install -d $(PREFIX)/$(SOUNDS_DIR); fi;\ + echo "Copying sound files into directory " $(SOUNDS_DIR);\ + cd ./sounds; set -x; for file in *.au; do \ +- $(INSTALL) -c $(INSTDATFLAGS) $$file $(SOUNDS_DIR); \ ++ $(INSTALL) -c $(INSTDATFLAGS) $$file ../$(PREFIX)/$(SOUNDS_DIR); \ + done; \ + fi + @: + @echo "Creating a highscore file " $(HIGH_SCORE_FILE) +- @touch $(HIGH_SCORE_FILE); +- @chmod a+rw $(HIGH_SCORE_FILE); ++ $(INSTALL) -d $(PREFIX)/$(HIGH_SCORE_DIR); ++# @touch $(PREFIX)/$(HIGH_SCORE_FILE); ++# @chmod 664 $(PREFIX)/$(HIGH_SCORE_FILE); + + XCOMM I use this for my daily backup of my code. + +Index: xboing-2.4/demo.c +=================================================================== +--- xboing-2.4.orig/demo.c 2006-05-30 12:52:57.000000000 +0200 ++++ xboing-2.4/demo.c 2006-05-30 12:53:03.000000000 +0200 +@@ -154,7 +154,7 @@ + + /* Construct the demo level filename */ + if ((str = getenv("XBOING_LEVELS_DIR")) != NULL) +- sprintf(levelPath, "%s/demo.data", str); ++ snprintf(levelPath, sizeof(levelPath),"%s/demo.data", str); + else + sprintf(levelPath, "%s/demo.data", LEVEL_INSTALL_DIR); + +Index: xboing-2.4/editor.c +=================================================================== +--- xboing-2.4.orig/editor.c 2006-05-30 12:52:57.000000000 +0200 ++++ xboing-2.4/editor.c 2006-05-30 12:53:03.000000000 +0200 +@@ -213,7 +213,7 @@ + + /* Construct the Edit level filename */ + if ((str = getenv("XBOING_LEVELS_DIR")) != NULL) +- sprintf(levelPath, "%s/editor.data", str); ++ snprintf(levelPath,sizeof(levelPath)-1, "%s/editor.data", str); + else + sprintf(levelPath, "%s/editor.data", LEVEL_INSTALL_DIR); + +@@ -958,8 +958,8 @@ + if ((num > 0) && (num <= MAX_NUM_LEVELS)) + { + /* Construct the Edit level filename */ +- if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL) +- sprintf(levelPath, "%s/level%02ld.data", str2, (u_long) num); ++ if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL) ++ snprintf(levelPath, sizeof(levelPath)-1,"%s/level%02ld.data", str2, (u_long) num); + else + sprintf(levelPath, "%s/level%02ld.data", + LEVEL_INSTALL_DIR, (u_long) num); +@@ -1017,9 +1017,9 @@ + num = atoi(str); + if ((num > 0) && (num <= MAX_NUM_LEVELS)) + { +- /* Construct the Edit level filename */ +- if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL) +- sprintf(levelPath, "%s/level%02ld.data", str2, (u_long) num); ++ /* Construct the Edit level filename */ ++ if ((str2 = getenv("XBOING_LEVELS_DIR")) != NULL) ++ snprintf(levelPath, sizeof(levelPath)-1,"%s/level%02ld.data", str2, (u_long) num); + else + sprintf(levelPath, "%s/level%02ld.data", + LEVEL_INSTALL_DIR, (u_long) num); +Index: xboing-2.4/error.c +=================================================================== +--- xboing-2.4.orig/error.c 2006-05-30 12:52:58.000000000 +0200 ++++ xboing-2.4/error.c 2006-05-30 12:53:03.000000000 +0200 +@@ -87,8 +87,8 @@ + + #ifndef READMEP_FILE + /* Repeated to generate a message when compiling */ +-#define READMEP_FILE "README.problems" +-#define READMEP_FILE "README.problems" ++#define READMEP_FILE "README.problems.doc.gz" ++#define READMEP_FILE "README.problems.doc.gz" + #endif + /* Print a standard error message to stdout and flush it */ + fprintf(stdout, "XBoing - Error: %s\n", message); +Index: xboing-2.4/file.c +=================================================================== +--- xboing-2.4.orig/file.c 2006-05-30 12:52:58.000000000 +0200 ++++ xboing-2.4/file.c 2006-05-30 12:53:03.000000000 +0200 +@@ -139,7 +139,7 @@ + + /* Construct the level filename */ + if ((str = getenv("XBOING_LEVELS_DIR")) != NULL) +- sprintf(levelPath, "%s/level%02ld.data", str, newLevel); ++ snprintf(levelPath,sizeof(levelPath), "%s/level%02ld.data", str, newLevel); + else + sprintf(levelPath, "%s/level%02ld.data", LEVEL_INSTALL_DIR, newLevel); + +@@ -177,7 +177,7 @@ + static int bgrnd = 1; + + /* Save the file in home directory - construct path */ +- sprintf(levelPath, "%s/.xboing-saveinfo", GetHomeDir()); ++ snprintf(levelPath, sizeof(levelPath)-1, "%s/.xboing-saveinfo", GetHomeDir()); + + /* Open the save file info for reading */ + if ((saveFile = fopen(levelPath, "r+")) == NULL) +@@ -239,7 +239,7 @@ + DisplayLevelInfo(display, levelWindow, level); + + /* Load the saved file in home directory - construct path */ +- sprintf(levelPath, "%s/.xboing-savelevel", GetHomeDir()); ++ snprintf(levelPath, sizeof(levelPath)-1, "%s/.xboing-savelevel", GetHomeDir()); + + /* Read in the saved level data */ + if (ReadNextLevel(display, window, levelPath, True) == False) +@@ -283,7 +283,7 @@ + saveGame.numBullets = GetNumberBullets(); + + /* Save the file in home directory - construct path */ +- sprintf(levelPath, "%s/.xboing-saveinfo", GetHomeDir()); ++ snprintf(levelPath, sizeof(levelPath)-1, "%s/.xboing-saveinfo", GetHomeDir()); + + /* Open the save file info for writing */ + if ((saveFile = fopen(levelPath, "w+")) == NULL) +@@ -309,7 +309,7 @@ + WarningMessage("Cannot close save game info file."); + + /* Save the file in home directory - construct path */ +- sprintf(levelPath, "%s/.xboing-savelevel", GetHomeDir()); ++ snprintf(levelPath, sizeof(levelPath)-1, "%s/.xboing-savelevel", GetHomeDir()); + + if (SaveLevelDataFile(display, levelPath) == True) + { +Index: xboing-2.4/highscore.c +=================================================================== +--- xboing-2.4.orig/highscore.c 2006-05-30 12:52:58.000000000 +0200 ++++ xboing-2.4/highscore.c 2006-05-30 12:53:03.000000000 +0200 +@@ -1023,7 +1023,7 @@ + { + /* Use the environment variable if it exists */ + if ((str = getenv("XBOING_SCORE_FILE")) != NULL) +- strcpy(filename, str); ++ strncpy(filename, str, sizeof(filename)-1); + else + strcpy(filename, HIGH_SCORE_FILE); + } +@@ -1095,7 +1095,7 @@ + { + /* Use the environment variable if it exists */ + if ((str = getenv("XBOING_SCORE_FILE")) != NULL) +- strcpy(filename, str); ++ strncpy(filename, str, sizeof(filename)-1); + else + strcpy(filename, HIGH_SCORE_FILE); + } +@@ -1218,7 +1218,7 @@ + + /* Use the environment variable if it exists */ + if ((str = getenv("XBOING_SCORE_FILE")) != NULL) +- strcpy(filename, str); ++ strncpy(filename, str, sizeof(filename)-1); + else + strcpy(filename, HIGH_SCORE_FILE); + +Index: xboing-2.4/init.c +=================================================================== +--- xboing-2.4.orig/init.c 2006-05-30 12:52:58.000000000 +0200 ++++ xboing-2.4/init.c 2006-05-30 12:53:03.000000000 +0200 +@@ -438,7 +438,7 @@ + WarningMessage("Your X Window system display variable is not set."); + else + { +- sprintf(string, "Cannot connect to display called <%s>.", displayName); ++ snprintf(string, sizeof(string) - 1, "Cannot connect to display called <%s>.", displayName); + WarningMessage(string); + } + } +Index: xboing-2.4/misc.c +=================================================================== +--- xboing-2.4.orig/misc.c 2006-05-30 12:52:58.000000000 +0200 ++++ xboing-2.4/misc.c 2006-05-30 12:53:03.000000000 +0200 +@@ -116,6 +116,10 @@ + long SyncTime; + static unsigned long accu; + ++#ifdef __alpha__ ++ ms *= 1000; /* convert from milliseconds to microseconds for usleep */ ++#endif ++ + gettimeofday(&st, NULL); + XSync(display, False); + gettimeofday(&et, NULL); +@@ -427,7 +431,7 @@ + */ + + if ((ptr = getenv("HOME")) != NULL) +- (void) strcpy(dest, ptr); ++ (void) strncpy(dest, ptr,sizeof(dest)-1); + else + { + /* HOME variable is not present so get USER var */ +@@ -441,7 +445,7 @@ + } + + if (pw) +- (void) strcpy(dest, pw->pw_dir); ++ (void) strncpy(dest, pw->pw_dir, sizeof(dest)-1); + else + *dest = '\0'; + } +Index: xboing-2.4/preview.c +=================================================================== +--- xboing-2.4.orig/preview.c 2006-05-30 12:52:58.000000000 +0200 ++++ xboing-2.4/preview.c 2006-05-30 12:53:03.000000000 +0200 +@@ -139,7 +139,7 @@ + + /* Construct the Preview level filename */ + if ((str = getenv("XBOING_LEVELS_DIR")) != NULL) +- sprintf(levelPath, "%s/level%02d.data", str, lnum); ++ snprintf(levelPath, sizeof(levelPath)-1, "%s/level%02d.data", str, lnum); + else + sprintf(levelPath, "%s/level%02d.data", LEVEL_INSTALL_DIR, lnum); + --- xboing-2.4.orig/debian/patches/series +++ xboing-2.4/debian/patches/series @@ -0,0 +1,8 @@ +010_initial_patches.diff +Imakefile.fhs.diff -p0 +init.c.diff -p0 +mousemove.diff -p0 +speed_fix.diff -p0 +xboing.6x_man_section.diff -p0 +030_auto_validate_yn.diff +040_manpage_errors.diff --- xboing-2.4.orig/debian/patches/xboing.6x_man_section.diff +++ xboing-2.4/debian/patches/xboing.6x_man_section.diff @@ -0,0 +1,11 @@ +--- xboing.man.orig 2006-05-27 10:45:51.000000000 +0200 ++++ xboing.man 2006-05-27 10:46:04.000000000 +0200 +@@ -39,7 +39,7 @@ + .\" + .\" ========================================================================= + .\" +-.TH XBOING 6 "November 1996" "X Version 11" ++.TH XBOING 6x "November 1996" "X Version 11" + .AU Justin C. Kibell + .SH NAME + xboing \- An X Window System based blockout clone. V2.4 --- xboing-2.4.orig/debian/patches/init.c.diff +++ xboing-2.4/debian/patches/init.c.diff @@ -0,0 +1,131 @@ +Index: init.c +=================================================================== +--- init.c.orig 2006-05-30 12:53:03.000000000 +0200 ++++ init.c 2006-05-30 12:53:07.000000000 +0200 +@@ -470,12 +470,11 @@ + fprintf(stdout, "%s%s", + "Usage: XBoing [-version] [-usage] [-help] [-sync] ", + "[-display ]\n"); +- fprintf(stdout, "%s%s\n%s%s\n%s\n", +- " [-speed <1-9>] [-scores] [-keys] [-sound] [-setup]", +- " [-nosfx]", +- " [-grab] [-maxvol <1-100>] [-startlevel <1-MAX>]", +- " [-usedefcmap]", +- " [-nickname ] [-noicon]"); ++ fprintf(stdout, "%s\n%s\n%s\n%s\n", ++ " [-speed <1-9>] [-scores] [-keys] [-sound] [-no-sound] [-setup]", ++ " [-nosfx] [-grab] [-no-grab] [-maxvol <1-100>]", ++ " [-startlevel <1-MAX>] [-usedefcmap] [-no-usedefcmap]", ++ " [-nickname ] [-noicon] [-debug]"); + + /* Exit now */ + ExitProgramNow(0); +@@ -537,8 +536,8 @@ + VERSION, REVNUM + buildNum, c_string); + + fprintf(stdout, "Help: \n"); +- fprintf(stdout, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", +- " -speed - The game speed, 1 - 9. 9 = fast\n", ++ fprintf(stdout, "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", ++ " -speed - The game speed, 1 - 9. 9 = fast (default is 4)\n", + " -maxvol - The maximum volume out of 100%.\n", + " -startlevel - The starting level for game.\n", + " -help - Produce this help message.\n", +@@ -547,14 +546,17 @@ + " -version - Print out the current version.\n", + " -scores - Print out the current highscores.\n", + " -keys - Use keys instead of mouse control.\n", +- " -sound - Turn audio ON for game.\n", ++ " -sound - Turn audio ON for game (default).\n", ++ " -no-sound - Turn audio OFF for game.\n", + " -setup - Print setup information.\n", + " -nosfx - Do not use some special effects.\n", + " -grab - Turn ON pointer grab.\n", +- " -usedefcmap - Use the default colourmap.\n", +- " -nickname - Use nickname instead of real name.\n", ++ " -usedefcmap - Use the default colourmap (default).\n", ++ " -no-usedefcmap - Do not use the default colourmap.\n", ++ " -nickname - Use nickname instead of real name.\n", + " -noicon - Do not create a custom icon.\n", +- " -display - Set the display for the game.\n"); ++ " -display - Set the display for the game.\n", ++ " -debug - Turn debug messages on (use with -sync, please).\n"); + + /* Exit now */ + ExitProgramNow(0); +@@ -598,14 +600,14 @@ + /* Initialise some variables */ + syncOn = False; + debug = False; +- grabPointer = False; +- useDefaultColourmap = False; ++ grabPointer = True; ++ useDefaultColourmap = True; + + /* This will force the use of the users real name */ + SetNickName(""); + + /* The audio is off by default */ +- noSound = True; ++ noSound = False; + noicon = False; + + /* So the audio code will use system default */ +@@ -616,7 +618,7 @@ + SetLevelNumber(1); + + /* Average Speed */ +- SetUserSpeed(5); ++ SetUserSpeed(6); + + useSpecialEffects(True); + score = 0L; +@@ -694,6 +696,12 @@ + + DEBUG("Sound turned on.") + ++ } else if (!compareArgument(argv[i], "-no-sound", 7)) ++ { ++ /* Enable the sound in the game */ ++ noSound = True; ++ ++ DEBUG("Sound turned on.") + } else if (!compareArgument(argv[i], "-keys", 4)) + { + /* Set the paddle control mode to use keys */ +@@ -726,6 +734,13 @@ + + DEBUG("Pointer grabbing turned on.") + ++ } else if (!compareArgument(argv[i], "-no-grab", 7)) ++ { ++ /* Turn off pointer grabbing */ ++ grabPointer = False; ++ ++ DEBUG("Pointer grabbing turned on.") ++ + } else if (!compareArgument(argv[i], "-nickname", 8)) + { + /* Use a nick name instead of real name */ +@@ -751,6 +766,12 @@ + + DEBUG("Using default colourmap please.") + ++ } else if (!compareArgument(argv[i], "-no-usedefcmap", 13)) ++ { ++ /* Try to use the default colourmap */ ++ useDefaultColourmap = False; ++ ++ DEBUG("Using default colourmap please.") + } else if (!compareArgument(argv[i], "-speed", 5)) + { + /* Set the speed for the game */ +@@ -936,7 +957,7 @@ + char str[80]; + + /* Setup the default speed for game */ +- SetUserSpeed(5); ++ SetUserSpeed(6); + + /* Set the paddle control mode to mouse */ + SetPaddleControlMode(CONTROL_MOUSE); --- xboing-2.4.orig/debian/patches/Imakefile.fhs.diff +++ xboing-2.4/debian/patches/Imakefile.fhs.diff @@ -0,0 +1,28 @@ +Index: Imakefile +=================================================================== +--- Imakefile.orig 2006-05-30 12:53:25.000000000 +0200 ++++ Imakefile 2006-05-30 12:53:45.000000000 +0200 +@@ -24,7 +24,7 @@ + XCOMM This is the directory where the highscore, level & sound data will be + XCOMM placed. Default will be the current directory. + +- XBOING_DIR = /usr/lib/games/xboing ++ XBOING_DIR = /usr/share/games/xboing + + XCOMM Added these to override defaults so make install installs into + XCOMM $PREFIX and /usr/games -- Joey Hess. +@@ -35,12 +35,12 @@ + XCOMM machine arch section. + + XPMLIB = -lXpm +- XPMINCLUDE = -I/usr/X11/include/X11 ++ XPMINCLUDE = -I/usr/include/X11/ + XBOINGINCLUDE = -I./include + LEVEL_INSTALL_DIR = $(XBOING_DIR)/levels + SOUNDS_DIR = $(XBOING_DIR)/sounds + BACKUP_DIR = $(XBOING_DIR)/../backups +- HIGH_SCORE_DIR = /var/lib/games ++ HIGH_SCORE_DIR = /var/games + HIGH_SCORE_FILE = $(HIGH_SCORE_DIR)/xboing.score + AUDIO_AVAILABLE = False + AUDIO_SRC = audio/NOaudio.c --- xboing-2.4.orig/debian/patches/030_auto_validate_yn.diff +++ xboing-2.4/debian/patches/030_auto_validate_yn.diff @@ -0,0 +1,13 @@ +Index: xboing-2.4/dialogue.c +=================================================================== +--- xboing-2.4.orig/dialogue.c 1996-11-22 02:28:46.000000000 +0100 ++++ xboing-2.4/dialogue.c 2006-05-30 21:49:22.000000000 +0200 +@@ -403,6 +403,8 @@ + + default: + validateDialogueKeys(display, keysym, str); ++ if (validation == YES_NO_ENTRY) ++ dialogueState = DIALOGUE_UNMAP; + break; + } + --- xboing-2.4.orig/debian/patches/speed_fix.diff +++ xboing-2.4/debian/patches/speed_fix.diff @@ -0,0 +1,477 @@ +Index: bonus.c +=================================================================== +--- bonus.c.orig 2006-05-30 12:52:54.000000000 +0200 ++++ bonus.c 2006-05-30 12:53:10.000000000 +0200 +@@ -311,7 +311,7 @@ + XFlush(display); + + SetBonusWait(BONUS_SCORE, frame + 5); +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + DEBUG("set bonus mode to BONUS_SCORE.") + } +@@ -326,7 +326,7 @@ + { + DEBUG("in function DoScore() in bonus.c") + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + /* Nice message rewarding you for your efforts */ + strcpy(string, "Congratulations on finishing this level."); +@@ -336,7 +336,7 @@ + + ypos += (35 + GAP); + SetBonusWait(BONUS_BONUS, frame + LINE_DELAY); +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + DEBUG("set bonus mode to BONUS_BONUS.") + } + +@@ -363,7 +363,7 @@ + DrawShadowCentredText(display, window, textFont, + string, ypos, blue, TOTAL_WIDTH); + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + /* Now skip to the next sequence */ + SetBonusWait(BONUS_LEVEL, frame + LINE_DELAY); +@@ -387,7 +387,7 @@ + DrawShadowCentredText(display, window, textFont, + string, ypos, blue, TOTAL_WIDTH); + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + /* Now skip to the next sequence */ + SetBonusWait(BONUS_LEVEL, frame + LINE_DELAY); +@@ -411,7 +411,7 @@ + bonusScore += ComputeScore(SUPER_BONUS_SCORE); + DisplayScore(display, scoreWindow, bonusScore); + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + /* Now skip to the next sequence */ + SetBonusWait(BONUS_LEVEL, frame + LINE_DELAY); +@@ -454,7 +454,7 @@ + ypos += (int) (textFont->ascent + GAP * 1.5); + firstTime = True; + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + } + } + +@@ -468,7 +468,7 @@ + { + int secs, theLevel; + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + /* Get the number of seconds left on the clock */ + secs = GetLevelTimeBonus(); +@@ -533,7 +533,7 @@ + /* Play the sound for the super bonus */ + if (noSound == False) playSoundFile("Doh3", 80); + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + /* Get ready for the next sequence */ + SetBonusWait(BONUS_TIME, frame + LINE_DELAY); +@@ -569,7 +569,7 @@ + SetBonusWait(BONUS_TIME, frame + LINE_DELAY); + ypos += (textFont->ascent + GAP/2); + firstTime = True; +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + } + } + +@@ -583,7 +583,7 @@ + { + int secs = 0; + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + /* Get the number of seconds left on the clock */ + secs = GetLevelTimeBonus(); +@@ -627,7 +627,7 @@ + int myrank = 0; + char str[5]; + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + /* Obtain current ranking for this score */ + myrank = GetHighScoreRanking(score); +@@ -680,7 +680,7 @@ + { + DEBUG("DoEndText in bonus screen.") + +- SetGameSpeed(SLOW_SPEED); ++ SetGameSpeed(MEDIUM_SPEED); + + /* Finishing sentence - so you know what level to do */ + sprintf(string, "Prepare for level %ld", level+1); +Index: main.c +=================================================================== +--- main.c.orig 2006-05-30 12:53:09.000000000 +0200 ++++ main.c 2006-05-30 12:53:10.000000000 +0200 +@@ -156,7 +156,7 @@ + + /* Set an entire game speedup or slowdown speed */ + temp = (speed / (long) userDelay); +- userDelay = delay; ++ userDelay = delay/2 + 3; + speed = (long) (temp * userDelay); + speedLevel = 10 - delay; + } +Index: misc.c +=================================================================== +--- misc.c.orig 2006-05-30 12:53:03.000000000 +0200 ++++ misc.c 2006-05-30 12:53:10.000000000 +0200 +@@ -89,8 +89,8 @@ + #ifdef SYSV + #ifdef __clipper__ + struct timeval tv; +- tv.tv_sec=((usec)/1000); +- tv.tv_usec=(((usec)%1000)*1000); ++ tv.tv_sec=((usec)/1000000); ++ tv.tv_usec=((usec)%1000000); + select(1,NULL,NULL,NULL,&tv); + #else + poll((struct poll *) 0, (size_t) 0, usec / 1000); /* ms resolution */ +@@ -105,6 +105,68 @@ + #endif + + #if NeedFunctionPrototypes ++static int kudelay(unsigned long count) ++#else ++static int kudelay(count) ++unsigned long count; ++#endif ++{ ++ unsigned int bluff = 1; ++ ++ while( count-- != 0 ) /* this can hardly be "optimised out" */ ++ bluff = (bluff ^ ((bluff & 1) * 0x6110)) >> 1; ++ ++ return( bluff ); ++} ++ ++#if NeedFunctionPrototypes ++static void kusleep(unsigned long usec) ++#else ++static void kusleep(usec) ++ unsigned long usec; ++#endif ++{ ++ static float kuliber_time = 0.0; ++ static float kuliber_count = 0.0; ++ static unsigned long kutimerswap = (1000000 / 15); ++ struct timeval st, et; ++ long gap; ++ unsigned long count; ++ ++ if( kuliber_time == 0.0 ) ++ { ++ count = 0x1000; /* calibrate delay loop */ ++ gettimeofday(&st, NULL); ++ ++ while( True ) ++ { ++ kudelay( count ); ++ count = (count << 1); ++ gettimeofday(&et, NULL); ++ gap = (((et.tv_sec - st.tv_sec) * 1000000) + ++ (et.tv_usec - st.tv_usec) ); ++ ++ if( gap > 400*1000 ) ++ break; ++ } ++ ++ kuliber_time = (float)(gap/4); ++ kuliber_count = (float)(((count-1)&~0xFFF)>>2); ++ } ++ ++ if( usec > kutimerswap ) ++ { ++ kutimerswap = (1000000 / 30); ++ usleep( usec ); /* using usleep() for low resolution only */ ++ } ++ else ++ { ++ kutimerswap = (1000000 / 15); ++ kudelay( (unsigned long)(kuliber_count*((float)usec/kuliber_time)) ); ++ } ++} ++ ++#if NeedFunctionPrototypes + void sleepSync(Display *display, unsigned long ms) + #else + void sleepSync(display, ms) +@@ -112,31 +174,85 @@ + unsigned long ms; + #endif + { +- struct timeval st, et; +- long SyncTime; +- static unsigned long accu; ++ static long Expected_time = 0; ++ static long Ref_sec = 0; ++ static long Ref_usec = 0; ++ static long Sleeping_time = 0; ++ static int PLL_filter = 0; ++ struct timeval st; ++ long elapsed; ++ long dodelay; ++ float x; + +-#ifdef __alpha__ +- ms *= 1000; /* convert from milliseconds to microseconds for usleep */ +-#endif +- +- gettimeofday(&st, NULL); + XSync(display, False); +- gettimeofday(&et, NULL); + +- SyncTime = (((et.tv_sec - st.tv_sec) * 1000) + +- ((et.tv_usec - st.tv_usec) / 1000) ); ++ gettimeofday(&st, NULL); ++ ++ if( Ref_sec == 0 ) ++ { ++ Ref_sec = st.tv_sec; /* take the initial reference point */ ++ Ref_usec = st.tv_usec; ++ Sleeping_time = ms * 1000; ++ } ++ ++ elapsed = (st.tv_sec - Ref_sec) * 1000000 + (st.tv_usec - Ref_usec); ++ dodelay = Sleeping_time; ++ ++ if( PLL_filter > 0 && elapsed != 0 ) /* Phase lock loop */ ++ { ++ dodelay = Expected_time + Sleeping_time - elapsed; ++ ++ if( dodelay < 0 ) ++ { ++ dodelay = 0; PLL_filter--; ++ } ++ else ++ if( dodelay > 2*Sleeping_time ) ++ { ++ dodelay = 2*Sleeping_time; PLL_filter--; ++ } ++ else ++ PLL_filter = 3; ++ ++ if( elapsed > 40*Sleeping_time && Expected_time > 40*Sleeping_time ) ++ { ++ elapsed -= 20*Sleeping_time; /* Ref. point shouldn't be far away*/ ++ Expected_time -= 20*Sleeping_time; ++ Ref_usec += 20*Sleeping_time; ++ Ref_sec += Ref_usec/1000000; Ref_usec %= 1000000; ++ } ++ } + +-/* if ((ms) > ((1000 / 60) + SyncTime)) +- usleep(ms - SyncTime); +-*/ +- if ((ms + accu) > ((1000 / 30) + SyncTime)) ++ if( PLL_filter <= 0 && elapsed > 40000 ) /* Frequency lock loop */ + { +- usleep(ms +accu - SyncTime); +- accu = 0; ++ /* feedback filter */ ++ x = 0.5 + 0.5 * (float)Expected_time / (float)elapsed; ++ ++ if( x < 0.966 ) /* Acceleration must be strongly limited */ ++ x = 0.966; ++ ++ if( x > 2.0 ) ++ x = 2.0; ++ ++ Sleeping_time = (long)((float)Sleeping_time * x); ++ ++ if( Sleeping_time < 500 ) ++ Sleeping_time = 500; ++ ++ if( x > 0.99 && x < 1.01 && Sleeping_time > ms*500 ) ++ PLL_filter = -1 - 4*PLL_filter; /* locked - it's time to try PLL */ ++ else ++ PLL_filter = 0; ++ ++ Ref_sec = st.tv_sec; ++ Ref_usec = st.tv_usec; ++ Expected_time = 0; ++ dodelay = Sleeping_time; + } +- else if (ms > SyncTime) +- accu += (ms - SyncTime); ++ ++ kusleep( dodelay ); ++ ++ Expected_time += ms * 1000; + } + + #if NeedFunctionPrototypes +Index: presents.c +=================================================================== +--- presents.c.orig 2006-05-30 12:52:54.000000000 +0200 ++++ presents.c 2006-05-30 12:53:10.000000000 +0200 +@@ -287,7 +287,7 @@ + } + #endif + +- SetPresentWait(PRESENT_TEXT1, frame + 800); ++ SetPresentWait(PRESENT_TEXT1, frame + 200); + } + + #if NeedFunctionPrototypes +@@ -309,7 +309,7 @@ + RenderShape(display, window, justin, justinM, + x, y, 285, 44, True); + +- SetPresentWait(PRESENT_TEXT2, frame + 300); ++ SetPresentWait(PRESENT_TEXT2, frame + 100); + } + + #if NeedFunctionPrototypes +@@ -331,7 +331,7 @@ + RenderShape(display, window, kibell, kibellM, + x, y, 260, 40, True); + +- SetPresentWait(PRESENT_TEXT3, frame + 500); ++ SetPresentWait(PRESENT_TEXT3, frame + 200); + } + + #if NeedFunctionPrototypes +@@ -355,7 +355,7 @@ + RenderShape(display, window, presents, presentsM, + x, y, 410, 44, True); + +- SetPresentWait(PRESENT_TEXT_CLEAR, frame + 750); ++ SetPresentWait(PRESENT_TEXT_CLEAR, frame + 250); + } + + #if NeedFunctionPrototypes +@@ -375,7 +375,7 @@ + + FadeAwayArea(display, window, x, y, 410, 44); + +- SetPresentWait(PRESENT_LETTERS, frame + 10); ++ SetPresentWait(PRESENT_LETTERS, frame + 5); + } + + /* The distances for the gap inbetwen blocks */ +@@ -404,7 +404,7 @@ + DrawLetter(display, window, i, x, y); + x += 10 + dists[i]; + +- SetPresentWait(PRESENT_LETTERS, frame + 300); ++ SetPresentWait(PRESENT_LETTERS, frame + 100); + } + else + { +@@ -416,7 +416,7 @@ + x += dists[3]; + DrawLetter(display, window, 3, x, y); + +- SetPresentWait(PRESENT_SHINE, frame + 200); ++ SetPresentWait(PRESENT_SHINE, frame + 100); + } + + i++; +@@ -463,7 +463,7 @@ + if (in == 11) + { + XCopyArea(display, store, window, gc, 0, 0, 20, 20, x, y); +- SetPresentWait(PRESENT_SPECIAL_TEXT1, frame + 500); ++ SetPresentWait(PRESENT_SPECIAL_TEXT1, frame + 100); + } + } + } +@@ -499,7 +499,7 @@ + len = strlen(wisdom); + x = ((PLAY_WIDTH + MAIN_WIDTH) / 2) - + (XTextWidth(dataFont, wisdom, len) / 2); +- nextFrame = frame + 10; ++ nextFrame = frame + 5; + first = False; + } + +@@ -508,11 +508,11 @@ + if (noSound == False) playSoundFile("key", 60); + DrawText(display, window, x, y, dataFont, red, wisdom, i); + +- nextFrame = frame + 30; ++ nextFrame = frame + 15; + + i++; + if (i > len) +- SetPresentWait(PRESENT_SPECIAL_TEXT2, frame + 700); ++ SetPresentWait(PRESENT_SPECIAL_TEXT2, frame + 150); + } + } + +@@ -542,7 +542,7 @@ + len = strlen(wisdom2); + x = ((PLAY_WIDTH + MAIN_WIDTH) / 2) - + (XTextWidth(dataFont, wisdom2, len) / 2); +- nextFrame = frame + 10; ++ nextFrame = frame + 5; + first = False; + } + +@@ -551,11 +551,11 @@ + if (noSound == False) playSoundFile("key", 60); + DrawText(display, window, x, y, dataFont, red, wisdom2, i); + +- nextFrame = frame + 30; ++ nextFrame = frame + 15; + + i++; + if (i > len) +- SetPresentWait(PRESENT_SPECIAL_TEXT3, frame + 700); ++ SetPresentWait(PRESENT_SPECIAL_TEXT3, frame + 150); + } + } + +@@ -584,7 +584,7 @@ + len = strlen(wisdom3); + x = ((PLAY_WIDTH + MAIN_WIDTH) / 2) - + (XTextWidth(dataFont, wisdom3, len) / 2); +- nextFrame = frame + 10; ++ nextFrame = frame + 5; + first = False; + } + +@@ -593,11 +593,11 @@ + if (noSound == False) playSoundFile("key", 60); + DrawText(display, window, x, y, dataFont, red, wisdom3, i); + +- nextFrame = frame + 30; ++ nextFrame = frame + 15; + + i++; + if (i > len) +- SetPresentWait(PRESENT_CLEAR, frame + 800); ++ SetPresentWait(PRESENT_CLEAR, frame + 200); + } + } + +@@ -642,7 +642,7 @@ + yb -= 10; + + if (yt > ((PLAY_HEIGHT + MAIN_HEIGHT) / 2)) +- SetPresentWait(PRESENT_FINISH, frame + 20); ++ SetPresentWait(PRESENT_FINISH, frame + 10); + + nextFrame = frame + 20; + } --- xboing-2.4.orig/debian/patches/mousemove.diff +++ xboing-2.4/debian/patches/mousemove.diff @@ -0,0 +1,12 @@ +Index: main.c +=================================================================== +--- main.c.orig 2006-05-30 12:52:54.000000000 +0200 ++++ main.c 2006-05-30 12:53:09.000000000 +0200 +@@ -254,6 +254,7 @@ + if (ObtainMousePosition(display, playWindow, &x, &y)) + { + /* Has the pointer moved since our last poll */ ++ if (x < MAIN_WIDTH / 2) x = MAIN_WIDTH / 2; + if (x != oldx) + { + paddleDx = x - oldx;