--- xgalaga-2.0.34.orig/README +++ xgalaga-2.0.34/README @@ -3,7 +3,7 @@ Copyright (c) 1995-1998 Joe Rumsey - XGalaga Home Page: http://ogresoft.dyn.ml.org/xgalaga.html + XGalaga Home Page: http://rumsey.org/xgal.html Please see the file INSTALL for installation instructions. --- xgalaga-2.0.34.orig/Makefile.in +++ xgalaga-2.0.34/Makefile.in @@ -30,29 +30,34 @@ INSTALL = @INSTALL@ OBJS = main.o images.o data.o paths.o pathfile.o title.o explosions.o \ - score.o highscore.o prize.o sound.o nas_sound.o + score.o highscore.o prize.o sound.o nas_sound.o frate.o linux-joystick.o +OBJS_HYPER = $(patsubst %.o,%.o.hyper,$(OBJS)) SRCS = `echo $(OBJS) | sed -e 's/\.o/.c/g'` TARGET = xgalaga +TARGET2 = xgalaga-hyperspace SUBDIRS = libsprite -all: $(TARGET) $(SOUNDSRV) +all: $(TARGET) $(TARGET2) $(SOUNDSRV) $(SOUNDSRV): $(SOUNDOBJS) $(CC) $(LDFLAGS) -o $(SOUNDSRV) $(SOUNDOBJS) $(SOUNDLIBS) install: all - ./mkinstalldirs $(bindir) - ./mkinstalldirs $(prefix) - $(INSTALL) $(TARGET) $(bindir)/$(TARGET) - $(INSTALL) $(SOUNDSRV) $(prefix)/$(SOUNDSRV) - ./mkinstalldirs $(prefix)/sounds - ./mkinstalldirs $(prefix)/levels - for i in levels/*.xgl; do $(INSTALL) $$i $(prefix)/$$i ; done - for i in sounds/*.raw; do $(INSTALL) $$i $(prefix)/$$i ; done - touch $(prefix)/scores - chmod 666 $(prefix)/scores + ./mkinstalldirs $(DESTDIR)/$(bindir) + ./mkinstalldirs $(DESTDIR)/$(prefix) + $(INSTALL) $(TARGET) $(DESTDIR)/$(bindir)/$(TARGET) + $(INSTALL) $(TARGET2) $(DESTDIR)/$(bindir)/$(TARGET2) + if test ! "$(SOUNDSRV)" = ""; then \ + $(INSTALL) $(SOUNDSRV) $(DESTDIR)/$(prefix)/$(SOUNDSRV); \ + fi + ./mkinstalldirs $(DESTDIR)/$(prefix)/sounds + ./mkinstalldirs $(DESTDIR)/$(prefix)/levels + for i in levels/*.xgl; do $(INSTALL) $$i $(DESTDIR)/$(prefix)/$$i ; done + for i in sounds/*.raw; do $(INSTALL) $$i $(DESTDIR)/$(prefix)/$$i ; done +# touch $(prefix)/scores +# chmod 666 $(prefix)/scores subdirs: for i in $(SUBDIRS); do cd $$i ; make ; done @@ -61,8 +66,18 @@ $(RM) $(TARGET) $(CC) $(LDFLAGS) -o $(TARGET) $(OBJS) $(LIBS) +$(TARGET2): subdirs $(OBJS_HYPER) + $(RM) $(TARGET2) + $(CC) $(LDFLAGS) -o $(TARGET2) $(OBJS_HYPER) $(LIBS) + +%.o: %.c + $(CC) $(CFLAGS) -DORIGINAL_XGALAGA -c $< -o $@ + +%.o.hyper: %.c + $(CC) $(CFLAGS) -UORIGINAL_XGALAGA -c $< -o $@ + clean: - $(RM) core *.o $(OBJS) $(TARGET) + $(RM) core *.o $(OBJS) $(OBJS_HYPER) $(TARGET) $(TARGET2) dist: clean cd libsprite;make clean @@ -78,4 +93,4 @@ cd libsprite;$(MAKE) distclean depend: - makedepend $(CFLAGS) $(SRCS) \ No newline at end of file + makedepend $(CFLAGS) $(SRCS) --- xgalaga-2.0.34.orig/Wlib.h +++ xgalaga-2.0.34/Wlib.h @@ -91,6 +91,22 @@ extern int autoPoint, W_KeyDepth, animPointers, useWorkbench; extern unsigned long w_socket; + +/* For XF86VIDMODE Support */ +#ifdef XF86VIDMODE +#include +#include + +struct xf86vidmode_data { + int vidmode_available; + XF86VidModeModeInfo orig_mode; + int orig_viewport_x; + int orig_viewport_y; +}; + +extern struct xf86vidmode_data XF86VidModeData; +#endif + #endif /* AMIGA */ #if 0 --- xgalaga-2.0.34.orig/Wproto.h +++ xgalaga-2.0.34/Wproto.h @@ -63,6 +63,7 @@ W_Window W_MakeTextWindow(char *name, int x, int y, int width, int height, W_Window parent, char *cursname, int border); W_Window W_MakeScrollingWindow(char *name, int x, int y, int width, int height, W_Window parent, char *cursname, int border); void W_SetIconWindow(W_Window win, W_Window icon); +void W_ToggleFullscreen(W_Window win); /* point.c */ void W_DrawPoint(W_Window window, int x, int y, W_Color color); void FlushPointCache(Window win, int color); --- xgalaga-2.0.34.orig/data.c +++ xgalaga-2.0.34/data.c @@ -10,7 +10,7 @@ int buttonDown = 0; -W_Window baseWin; +W_Window shellWin, baseWin; W_Image *playerShip, *playerTorp, *enemyTorp, *shieldImage; @@ -30,6 +30,11 @@ int counter; int mouseControl = 0; +int wantStars = 1; + +/* Modified slightly to better fit on 800x600 in fullscreen mode */ +int winwidth = 468; /* was 400 */ +int winheight = 596; /* was 511 */ int alien_shape[ALIENSHAPES] = { I_ALIEN1, @@ -55,6 +60,7 @@ int maxtorps = 4, numtorps = 0; int plx = 200; +int pldead = 0; int movespeed = MINSPEED; @@ -67,6 +73,8 @@ #endif int plshield = 0; +int shieldsleft = 0; +int shieldon = 0; int title_page=0, pagetimer=300; --- xgalaga-2.0.34.orig/config.guess +++ xgalaga-2.0.34/config.guess @@ -1,7 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 93, 94, 95, 1996 Free Software Foundation, Inc. -# +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-01-10' + # This file 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 @@ -21,59 +24,313 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. -# Written by Per Bothner . -# The master version of this file is at the FSF in /home/gd/gnu/lib. +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you -# don't specify an explicit system type (host/target name). -# -# Only a few systems have been added to this list; please add others -# (but try to keep the structure clean). -# +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 8/24/94.) +# (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15 - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:MicroBSD:*:*) + echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE} + exit 0 ;; alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//'` + eval $set_cc_for_build + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null + if test "$?" = 0 ; then + case `$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; + esac + fi + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix exit 0 ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit 0 ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-cbm-sysv4 + echo m68k-unknown-sysv4 exit 0;; - amiga:NetBSD:*:*) - echo m68k-cbm-netbsd${UNAME_RELEASE} - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-cbm-openbsd${UNAME_RELEASE} - exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit 0;; - Pyramid*:OSx*:*:*|MIS*:OSx*:*:*) + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 @@ -81,9 +338,16 @@ echo pyramid-pyramid-bsd fi exit 0 ;; - NILE:*:*:dcosx) + NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; @@ -108,27 +372,47 @@ sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit 0 ;; - atari*:NetBSD:*:*) - echo m68k-atari-netbsd${UNAME_RELEASE} - exit 0 ;; - atari*:OpenBSD:*:*) - echo m68k-atari-openbsd${UNAME_RELEASE} + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; - sun3*:NetBSD:*:*) - echo m68k-sun-netbsd${UNAME_RELEASE} - exit 0 ;; - sun3*:OpenBSD:*:*) - echo m68k-sun-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:NetBSD:*:*) - echo m68k-apple-netbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-apple-openbsd${UNAME_RELEASE} + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit 0 ;; @@ -141,9 +425,18 @@ VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; mips:*:*:UMIPS | mips:*:*:RISCos) - sed 's/^ //' << EOF >dummy.c - int main (argc, argv) int argc; char **argv; { + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); @@ -158,12 +451,20 @@ exit (-1); } EOF - ${CC-cc} dummy.c -o dummy \ - && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 echo mips-mips-riscos${UNAME_RELEASE} exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit 0 ;; @@ -179,15 +480,18 @@ AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \ - -o ${TARGET_BINARY_INTERFACE}x = x ] ; then + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then echo m88k-dg-dgux${UNAME_RELEASE} - else + else echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} fi - else echo i586-dg-dgux${UNAME_RELEASE} - fi exit 0 ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 @@ -208,12 +512,21 @@ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i?86:AIX:*:*) + i*86:AIX:*:*) echo i386-ibm-aix exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - sed 's/^ //' << EOF >dummy.c + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #include main() @@ -224,8 +537,7 @@ exit(0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo rs6000-ibm-aix3.2.5 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 @@ -233,8 +545,9 @@ echo rs6000-ibm-aix3.2 fi exit 0 ;; - *:AIX:*:4) - if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc @@ -242,7 +555,7 @@ if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else - IBM_REV=4.${UNAME_RELEASE} + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit 0 ;; @@ -252,7 +565,7 @@ ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit 0 ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC NetBSD and + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit 0 ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) @@ -267,18 +580,85 @@ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit 0 ;; - 9000/[3478]??:HP-UX:*:*) + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;; - 9000/8?? ) HP_ARCH=hppa1.0 ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; esac - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; 3050*:HI-UX:*:*) - sed 's/^ //' << EOF >dummy.c + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c #include int main () @@ -303,8 +683,7 @@ exit (0); } EOF - ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 echo unknown-hitachi-hiuxwe2 exit 0 ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) @@ -313,13 +692,16 @@ 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit 0 ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit 0 ;; - i?86:OSF1:*:*) + i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else @@ -347,129 +729,306 @@ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit 0 ;; - CRAY*X-MP:*:*:*) - echo xmp-cray-unicos - exit 0 ;; CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' exit 0 ;; CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit 0 ;; - CRAY-2:*:*:*) - echo cray2-cray-unicos - exit 0 ;; - F300:UNIX_System_V:*:*) - FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'` + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit 0 ;; - F301:UNIX_System_V:*:*) - echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'` - exit 0 ;; - hp3[0-9][05]:NetBSD:*:*) - echo m68k-hp-netbsd${UNAME_RELEASE} + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit 0 ;; - hp3[0-9][05]:OpenBSD:*:*) - echo m68k-hp-openbsd${UNAME_RELEASE} + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} exit 0 ;; - i?86:BSD/386:*:* | *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit 0 ;; *:FreeBSD:*:*) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} exit 0 ;; - *:NetBSD:*:*) - echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin exit 0 ;; - *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 exit 0 ;; - i*:CYGWIN*:*) - echo i386-pc-cygwin32 + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:3*) + echo i586-pc-interix3 + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin exit 0 ;; p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin32 + echo powerpcle-unknown-cygwin exit 0 ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit 0 ;; *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac exit 0 ;; - *:Linux:*:*) + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so - # first see if it will tell us. - ld_help_string=`ld --help 2>&1` - if echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf_i.86"; then - echo "${UNAME_MACHINE}-pc-linux" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86linux"; then - echo "${UNAME_MACHINE}-pc-linux-aout" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: i.86coff"; then - echo "${UNAME_MACHINE}-pc-linux-coff" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68kelf"; then - echo "${UNAME_MACHINE}-unknown-linux" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: m68klinux"; then - echo "${UNAME_MACHINE}-unknown-linux-aout" ; exit 0 - elif echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations: elf32ppc"; then - echo "powerpc-unknown-linux" ; exit 0 - elif test "${UNAME_MACHINE}" = "alpha" ; then - echo alpha-unknown-linux ; exit 0 - elif test "${UNAME_MACHINE}" = "sparc" ; then - echo sparc-unknown-linux ; exit 0 - else - # Either a pre-BFD a.out linker (linux-gnuoldld) or one that does not give us - # useful --help. Gcc wants to distinguish between linux-gnuoldld and linux-gnuaout. - test ! -d /usr/lib/ldscripts/. \ - && echo "${UNAME_MACHINE}-pc-linux-oldld" && exit 0 - # Determine whether the default compiler is a.out or elf - cat >dummy.c <&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif EOF - ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0 - rm -f dummy.c dummy - fi ;; -# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions -# are messed up and put the nodename in both sysname and nodename. - i?86:DYNIX/ptx:4*:*) + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. echo i386-sequent-sysv4 exit 0 ;; - i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*) + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE} + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit 0 ;; - i?86:*:3.2:*) + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` - (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit 0 ;; @@ -487,9 +1046,15 @@ # "miniframe" echo m68010-convergent-sysv exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; M68*:*:R3V[567]*:*) test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` @@ -500,24 +1065,27 @@ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && echo i486-ncr-sysv4 && exit 0 ;; - m68*:LynxOS:2.*:*) + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit 0 ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit 0 ;; - i?86:LynxOS:2.*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit 0 ;; - rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*) + rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit 0 ;; @@ -529,6 +1097,10 @@ echo ns32k-sni-sysv fi exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -538,26 +1110,113 @@ # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit 0 ;; - R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*) + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit 0 ;; - PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 -cat >dummy.c <$dummy.c < # include @@ -595,7 +1254,10 @@ #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif @@ -640,11 +1302,24 @@ #endif #if defined (vax) -#if !defined (ultrix) - printf ("vax-dec-bsd\n"); exit (0); -#else - printf ("vax-dec-ultrix\n"); exit (0); -#endif +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif #endif #if defined (alliant) && defined (i860) @@ -655,8 +1330,7 @@ } EOF -${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0 -rm -f dummy.c dummy +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 # Apollos put the system type in the environment. @@ -688,6 +1362,48 @@ esac fi -#echo '(Unable to guess system type)' 1>&2 +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: --- xgalaga-2.0.34.orig/config.sub +++ xgalaga-2.0.34/config.sub @@ -1,6 +1,10 @@ #! /bin/sh -# Configuration validation subroutine script, version 1.1. -# Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc. +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-01-03' + # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. @@ -25,6 +29,9 @@ # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. @@ -45,30 +52,73 @@ # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. -if [ x$1 = x ] -then - echo Configuration name missing. 1>&2 - echo "Usage: $0 CPU-MFR-OPSYS" 1>&2 - echo "or $0 ALIAS" 1>&2 - echo where ALIAS is a recognized configuration type. 1>&2 - exit 1 -fi +me=`echo "$0" | sed -e 's,.*/,,'` -# First pass through any local machine types. -case $1 in - *local*) - echo $1 - exit 0 - ;; - *) - ;; +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - linux-gnu*) + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; @@ -94,15 +144,33 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple) + -apple | -axis) os= basic_machine=$1 ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; -hiux*) os=-hiuxwe2 ;; -sco5) - os=sco3.2v5 + os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) @@ -121,6 +189,9 @@ os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -143,25 +214,72 @@ -psos*) os=-psos ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. - tahoe | i860 | m68k | m68000 | m88k | ns32k | arm \ - | arme[lb] | pyramid \ - | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 \ - | alpha | we32k | ns16k | clipper | i370 | sh \ - | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \ - | pdp11 | mips64el | mips64orion | mips64orionel \ - | sparc | sparclet | sparclite | sparc64) + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. - i[3456]86) + i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. @@ -170,23 +288,79 @@ exit 1 ;; # Recognize the basic CPU types with company name. - vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \ - | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \ - | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \ - | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \ - | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \ - | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \ - | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \ - | mips64el-* | mips64orion-* | mips64orionel-* | f301-*) + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; alliant | fx80) basic_machine=fx80-alliant ;; @@ -202,20 +376,24 @@ os=-sysv ;; amiga | amiga-*) - basic_machine=m68k-cbm + basic_machine=m68k-unknown ;; - amigados) - basic_machine=m68k-cbm - os=-amigados + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos ;; amigaunix | amix) - basic_machine=m68k-cbm + basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; aux) basic_machine=m68k-apple os=-aux @@ -224,6 +402,10 @@ basic_machine=ns32k-sequent os=-dynix ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -244,27 +426,30 @@ basic_machine=c38-convex os=-bsd ;; - cray | ymp) - basic_machine=ymp-cray - os=-unicos - ;; - cray2) - basic_machine=cray2-cray - os=-unicos - ;; - [ctj]90-cray) - basic_machine=c90-cray + cray | j90) + basic_machine=j90-cray os=-unicos ;; crds | unos) basic_machine=m68k-crds ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola @@ -292,6 +477,10 @@ encore | umax | mmax) basic_machine=ns32k-encore ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; fx2800) basic_machine=i860-alliant ;; @@ -302,6 +491,10 @@ basic_machine=tron-gmicro os=-sysv ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -310,6 +503,14 @@ basic_machine=h8300-hitachi os=-hms ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; harris) basic_machine=m88k-harris os=-sysv3 @@ -325,13 +526,30 @@ basic_machine=m68k-hp os=-hpux ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; - hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7) + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) @@ -340,27 +558,42 @@ hppa-next) os=-nextstep3 ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; i370-ibm* | ibm*) basic_machine=i370-ibm - os=-mvs ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? - i[3456]86v32) + i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; - i[3456]86v4*) + i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; - i[3456]86v) + i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; - i[3456]86sol2) + i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; iris | iris4d) basic_machine=mips-sgi case $os in @@ -386,19 +619,55 @@ basic_machine=ns32k-utek os=-sysv ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; miniframe) basic_machine=m68000-convergent ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos @@ -411,6 +680,10 @@ basic_machine=mips-sony os=-newsos ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; next | m*-next ) basic_machine=m68k-next case $os in @@ -436,9 +709,40 @@ basic_machine=i960-intel os=-nindy ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; np1) basic_machine=np1-gould ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 @@ -453,53 +757,85 @@ pbb) basic_machine=m68k-tti ;; - pc532 | pc532-*) + pc532 | pc532-*) basic_machine=ns32k-pc532 ;; - pentium | p5) - basic_machine=i586-intel + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc ;; - pentiumpro | p6) - basic_machine=i686-intel + pentiumii | pentium2) + basic_machine=i686-pc ;; - pentium-* | p5-*) + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - pentiumpro-* | p6-*) + pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; - k5) - # We don't have specific support for AMD's K5 yet, so just call it a Pentium - basic_machine=i586-amd - ;; - nexen) - # We don't have specific support for Nexgen yet, so just call it a Pentium - basic_machine=i586-nexgen + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; - power) basic_machine=rs6000-ibm + power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown - ;; + ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown - ;; + ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; ps2) basic_machine=i386-ibm ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; sequent) basic_machine=i386-sequent ;; @@ -507,6 +843,10 @@ basic_machine=sh-hitachi os=-hms ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; sps7) basic_machine=m68k-bull os=-sysv2 @@ -514,6 +854,13 @@ spur) basic_machine=spur-unknown ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; sun2) basic_machine=m68000-sun ;; @@ -554,10 +901,40 @@ sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; symmetry) basic_machine=i386-sequent os=-dynix ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; tower | tower-32) basic_machine=m68k-ncr ;; @@ -569,6 +946,10 @@ basic_machine=a29k-nyu os=-sym1 ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; vaxv) basic_machine=vax-dec os=-sysv @@ -577,9 +958,9 @@ basic_machine=vax-dec os=-vms ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; vxworks960) basic_machine=i960-wrs os=-vxworks @@ -592,13 +973,25 @@ basic_machine=a29k-wrs os=-vxworks ;; - xmp) - basic_machine=xmp-cray - os=-unicos + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf ;; - xps | xps100) + xps | xps100) basic_machine=xps100-honeywell ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -606,8 +999,14 @@ # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. - mips) - basic_machine=mips-mips + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm @@ -618,16 +1017,26 @@ vax) basic_machine=vax-dec ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; - sparc) + sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; - cydra) + cydra) basic_machine=cydra-cydrome ;; orion) @@ -636,6 +1045,15 @@ orion105) basic_machine=clipper-highlevel ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 @@ -668,11 +1086,14 @@ -solaris) os=-solaris2 ;; - -unixware* | svr4*) + -svr4*) os=-sysv4 ;; + -unixware*) + os=-sysv4.2uw + ;; -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux|'` + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. @@ -681,19 +1102,48 @@ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -linux* | -uxpv*) + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -microbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; -linux*) - os=`echo $os | sed -e 's|linux|linux|'` + os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` @@ -701,6 +1151,12 @@ -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; -osfrose*) os=-osfrose ;; @@ -716,11 +1172,23 @@ -acis*) os=-aos ;; + -atheos*) + os=-atheos + ;; + -386bsd) + os=-bsd + ;; -ctix* | -uts*) os=-sysv ;; + -nova*) + os=-rtmk-nova + ;; -ns2 ) - os=-nextstep2 + os=-nextstep2 + ;; + -nsk*) + os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) @@ -747,9 +1215,18 @@ # This must come after -sysvr4. -sysv*) ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; -xenix) os=-xenix ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; -none) ;; *) @@ -775,10 +1252,17 @@ *-acorn) os=-riscix1.2 ;; + arm*-rebel) + os=-linux + ;; arm*-semi) os=-aout ;; - pdp11-*) + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) os=-none ;; *-dec | vax-*) @@ -796,15 +1280,39 @@ # default. # os=-sunos4 ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; + *-be) + os=-beos + ;; *-ibm) os=-aix ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; *-hp) os=-hpux ;; @@ -815,7 +1323,7 @@ os=-sysv ;; *-cbm) - os=-amigados + os=-amigaos ;; *-dg) os=-dgux @@ -847,27 +1355,39 @@ *-next) os=-nextstep3 ;; - *-gould) + *-gould) os=-sysv ;; - *-highlevel) + *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; - *-sgi) + *-sgi) os=-irix ;; - *-siemens) + *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; - f301-fujitsu) + f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; *) os=-none ;; @@ -889,9 +1409,15 @@ -aix*) vendor=ibm ;; + -beos*) + vendor=be + ;; -hpux*) vendor=hp ;; + -mpeix*) + vendor=hp + ;; -hiux*) vendor=hitachi ;; @@ -907,21 +1433,41 @@ -genix*) vendor=ns ;; - -mvs*) + -mvs* | -opened*) vendor=ibm ;; -ptx*) vendor=sequent ;; - -vxsim* | -vxworks*) + -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: --- xgalaga-2.0.34.orig/configure.in +++ xgalaga-2.0.34/configure.in @@ -24,7 +24,9 @@ AC_MSG_ERROR([Can't find X, you need X!]) else INCS="$INCS -I$x_includes" - LIBS="-L$x_libraries" + if test -n "$x_libraries"; then + LIBS="-L$x_libraries" + fi if test -n "$xpm_lib"; then LIBS="$LIBS -L$xpm_lib" --- xgalaga-2.0.34.orig/data.h +++ xgalaga-2.0.34/data.h @@ -1,11 +1,12 @@ #include "Wlib.h" +#include "struct.h" -extern W_Window gal, baseWin; +extern W_Window gal, shellWin, baseWin; extern char *imagedir; extern int verbose_image_loading; extern int forceMono; -extern int xpm, useOR; +extern int xpm, useOR, useClipMask, useBuffered; extern W_Color backColor; @@ -18,6 +19,8 @@ extern int paused; extern int ships; +extern int shieldsleft; +extern int shieldon; extern int level, metaLevel; extern int startLevel; @@ -30,6 +33,10 @@ extern int counter; extern int mouseControl; +extern int wantStars; + +extern int winwidth; +extern int winheight; extern int alien_shape[]; @@ -37,6 +44,7 @@ extern int maxtorps, numtorps; extern int plx; +extern int pldead; extern int movespeed; @@ -55,3 +63,6 @@ extern int gotlemon; extern struct alien aliens[]; + +extern struct js_state js_curstate; +extern int js_device; --- xgalaga-2.0.34.orig/defs.h +++ xgalaga-2.0.34/defs.h @@ -1,5 +1,20 @@ #define VERSION "2.0.34" +/* Area for setting flags to enable changes by Bryce and Neelix */ + +/* #define ORIGINAL_XGALAGA */ + + +#ifndef ORIGINAL_XGALAGA +# define ENABLE_SHIP_WRAP +# define ENABLE_SPREAD_SHOT +# define ENABLE_MACHINE_GUN +# define DISABLE_RESET_ON_DEATH +# define ACTIVATED_SHIELD +# define SHOW_SHIELD_BAR +# define NO_PRIZE_WHILE_DEAD +#endif + #define MAXTORPS 10 #define MINTORPS 3 #define TORPSPEED 12 @@ -11,8 +26,8 @@ #define TORPDELAY 5 -#define WINWIDTH 400 -#define WINHEIGHT 500 +#define WINWIDTH winwidth /* was 400 */ +#define WINHEIGHT winheight /* was 500 */ #define NUMSTARS 30 @@ -38,15 +53,29 @@ # endif #endif -#define NUMWEAPONS 3 +#define NUMWEAPONS 3 + ENABLE_SPREAD_SHOT + ENABLE_MACHINE_GUN #define SINGLESHOT 0 #define DOUBLESHOT 1 #define TRIPLESHOT 2 +#define SPREADSHOT 3 +#define MACHINEGUN 4 -#define PRIZECHANCE 30 +#ifdef ORIGINAL_XGALAGA +# define PRIZECHANCE 30 +#else +# define PRIZECHANCE 25 +#endif #define TORPCHANCE 60 -#define SHIELDTIME 300 +#ifdef ORIGINAL_XGALAGA +# define SHIELDTIME 300 +#else +# define STARTSHIELDS 0 +# define MAXSHIELDS 800 +# define SHIELDTIME 200 +#endif + + #define ALIENSHAPES 17 --- xgalaga-2.0.34.orig/images.h +++ xgalaga-2.0.34/images.h @@ -41,6 +41,22 @@ #define I_PR_DOUB 29 #define I_PR_EXTRABULLET 30 #define I_PR_LEMON 31 + +#ifndef ORIGINAL_XGALAGA +#define I_PR_MACHINE 32 +#define I_PR_SHIELD 33 +#define I_PR_SING 34 +#define I_PR_SPEED 35 +#define I_PR_SPREAD 36 +#define I_PR_TRIP 37 +#define I_S1000 38 +#define I_S2000 39 +#define I_S4000 40 +#define I_S500 41 +#define I_SHIELD 42 +#define I_TITLE 43 +#define I_LAST 44 +#else #define I_PR_SHIELD 32 #define I_PR_SING 33 #define I_PR_SPEED 34 @@ -51,4 +67,6 @@ #define I_S500 39 #define I_SHIELD 40 #define I_TITLE 41 -#define I_LAST 41 +#define I_LAST 42 +#endif /* ORIGINAL_XGALAGA */ + --- xgalaga-2.0.34.orig/highscore.c +++ xgalaga-2.0.34/highscore.c @@ -31,7 +31,13 @@ #include "proto.h" #include "data.h" +/* Global score file is insecure and rather useless today. */ +#define NO_GLOBAL_SCORES 1 +#ifdef NO_GLOBAL_SCORES +#define NUM_GLOBAL_SCORES 0 +#else #define NUM_GLOBAL_SCORES 20 +#endif #define NUM_MY_SCORES 10 static char new_name[20]; @@ -45,12 +51,16 @@ char name[20]; long score; long level; -} global_scores[NUM_GLOBAL_SCORES], my_scores[NUM_MY_SCORES]; +} +#ifndef NO_GLOBAL_SCORES + global_scores[NUM_GLOBAL_SCORES], +#endif + my_scores[NUM_MY_SCORES]; void undo_name() { W_ClearArea(baseWin, - WINWIDTH/2-(20*W_Textwidth), 200, + WINWIDTH/2-(20*W_Textwidth), 250, (40*W_Textwidth), W_Textheight*2); } @@ -64,9 +74,9 @@ nnpos = strlen(new_name); init = 1; } - center_text("Great score! Enter your name:", 200, W_Red); + center_text("Great score! Enter your name:", 250, W_Red); sprintf(buf, "%s_", new_name); - center_text(buf, 200 + W_Textheight, W_Cyan); + center_text(buf, 250 + W_Textheight, W_Cyan); } char *getUsersFullName() @@ -115,7 +125,7 @@ } /* shorten to 20 chars */ - fullname[20] = 0; + fullname[19] = 0; /* Return their name without any trailing stuff */ return(fullname); @@ -127,12 +137,13 @@ int hsf; long x; char my_file_name [256], *home; - +#ifndef NO_GLOBAL_SCORES hsf = open(SCOREFILE, O_WRONLY | O_TRUNC | O_CREAT, 0666); if(hsf < 0) { printf("Couldn't write scores file %s\n", SCOREFILE); return; } + for(i=0;i my_scores[i].score) { @@ -299,6 +327,7 @@ int i; load_scores(); /* in case someone else has gotten a high score */ +#ifndef NO_GLOBAL_SCORES for(i=0;i global_scores[i].score) { return 1; @@ -309,7 +338,7 @@ } #endif } - +#endif /* NO_GLOBAL_SCORES */ for(i=0;i my_scores[i].score) return 1; @@ -332,6 +361,7 @@ color = W_DarkGrey; +#ifndef NO_GLOBAL_SCORES center_text("Global high scores", 90, W_Yellow); sprintf(buf, "Rank Name Score Level"); center_text(buf, 100, W_Yellow); @@ -342,7 +372,8 @@ global_scores[i].name, global_scores[i].score,global_scores[i].level); center_text(buf, 112+i*W_Textheight, (i==thisplace ? color : W_Grey)); } - +#endif + center_text("Your high scores", 112+NUM_GLOBAL_SCORES*W_Textheight, W_Yellow); sprintf(buf, "Rank Name Score Level"); center_text(buf, 112+(NUM_GLOBAL_SCORES+1)*W_Textheight, W_Yellow); @@ -362,6 +393,7 @@ int hsf; char my_file_name[256], *home; +#ifndef NO_GLOBAL_SCORES hsf = open(SCOREFILE, O_RDONLY); if(hsf <0 ) { printf("Trouble opening high scores file '%s'\n", SCOREFILE); @@ -393,9 +425,10 @@ } } close(hsf); +#endif /* NO_GLOBAL_SCORES */ if((home = getenv("HOME"))) { - sprintf(my_file_name, "%s/.xgalscores", home); + snprintf(my_file_name, sizeof(my_file_name)-1, "%s/.xgalscores", home); hsf = open(my_file_name, O_RDONLY); if(hsf <0 ) { printf("Trouble opening high scores file '%s'\n", my_file_name); @@ -426,6 +459,7 @@ } } return; +#ifndef NO_GLOBAL_SCORES error: if(i>0) printf("Error reading high scores file '%s'\n", SCOREFILE); @@ -439,6 +473,7 @@ } close(hsf); return; +#endif error2: if(i>0) printf("Error reading high scores file '%s'\n", my_file_name); @@ -454,6 +489,7 @@ int i; load_scores(); +#ifndef NO_GLOBAL_SCORES printf("\nGlobal High Scores:\n"); printf("-----------------------------------------------\n"); printf("%8s %-20s %8s %8s\n", "uid", "name", "score", "level"); @@ -471,6 +507,7 @@ global_scores[i].level); #endif } +#endif /* NO_GLOBAL_SCORES */ printf("-----------------------------------------------\n"); printf("\nYour High Scores:\n"); printf("--------------------------------------\n"); --- xgalaga-2.0.34.orig/images.c +++ xgalaga-2.0.34/images.c @@ -6576,6 +6576,27 @@ " .... OOO XXX. ", " .... .... "}; +#ifndef ORIGINAL_XGALAGA +/* XPM */ +static char * pr_machine_xpm[] = { +"15 10 5 1", +" c None", +". c #868600000000", +"X c #aaaa00000000", +"o c #FFFF00000000", +"= c #ffffffffffff", +" .XoooooooX. ", +" XXo oooooooX ", +"XXX == oooooooX", +"XXo == oooooooo", +"XXX == oo oooo", +"XXXo oo == ooo", +"XXXooooo == ooo", +"XXXXXooo == ooX", +" XXXXXooo ooX ", +" .XXXXXXXXX. "}; +#endif + /* XPM */ static char * pr_shield_xpm[] = { "15 10 5 1", @@ -6632,6 +6653,26 @@ " .... XXXX. ", " ........... "}; +#ifndef ORIGINAL_XGALAGA +/* XPM */ +static char * pr_spread_xpm[] = { +"15 10 4 1", +" c None", +". c #00009f", +"X c #0000ff", +"o c #ffffff", +" ..XXXXXXX.. ", +" ..XXXXXXXXXX. ", +"...XXXXXXXXXXX.", +"..ooXXXXXXXooXX", +".. oXXXXXo XX", +"...X oXXXo XXXX", +"....X oXo XXXXX", +".....X o XXXXX.", +" .....X XXXXX. ", +" ........... "}; +#endif + /* XPM */ static char * pr_trip_xpm[] = { "15 10 4 1", @@ -6830,9 +6871,15 @@ {0, 0, 0, 0, "/pr_doub", 0, I_DEFAULT, 0, 1, NULL, (char**)pr_doub_xpm, 0, 0}, {0, 0, 0, 0, "/pr_extrabullet", 0, I_DEFAULT, 0, 1, NULL, (char**)pr_extrabullet_xpm, 0, 0}, {0, 0, 0, 0, "/pr_lemon", 0, I_DEFAULT, 0, 1, NULL, (char**)pr_lemon_xpm, 0, 0}, +#ifndef ORIGINAL_XGALAGA + {0, 0, 0, 0, "/pr_machine", 0, I_DEFAULT, 0, 1, NULL, (char**)pr_machine_xpm, 0, 0}, +#endif {0, 0, 0, 0, "/pr_shield", 0, I_DEFAULT, 0, 1, NULL, (char**)pr_shield_xpm, 0, 0}, {0, 0, 0, 0, "/pr_sing", 0, I_DEFAULT, 0, 1, NULL, (char**)pr_sing_xpm, 0, 0}, {0, 0, 0, 0, "/pr_speed", 0, I_DEFAULT, 0, 1, NULL, (char**)pr_speed_xpm, 0, 0}, +#ifndef ORIGINAL_XGALAGA + {0, 0, 0, 0, "/pr_spread", 0, I_DEFAULT, 0, 1, NULL, (char**)pr_spread_xpm, 0, 0}, +#endif {0, 0, 0, 0, "/pr_trip", 0, I_DEFAULT, 0, 1, NULL, (char**)pr_trip_xpm, 0, 0}, {0, 0, 0, 0, "/s1000", 0, I_DEFAULT, 0, 1, NULL, (char**)s1000_xpm, 0, 0}, {0, 0, 0, 0, "/s2000", 0, I_DEFAULT, 0, 1, NULL, (char**)s2000_xpm, 0, 0}, --- xgalaga-2.0.34.orig/main.c +++ xgalaga-2.0.34/main.c @@ -31,45 +31,59 @@ static int starspeed = 1; static int attacking = 0, maxattacking, entering=0; static int maxetorps = 5, numetorps=0; -static int pldead = 0; static int plflash = 50; +static int fullscreen = 0; +#ifndef ORIGINAL_XGALAGA +static int shots = 0; +static int hits = 0; +#endif #define convoy_x_pos(i) (convoyx+(20 * (i - 10 * (i/10)))) #define convoy_y_pos(i) (20 + (20*(i/10))) static int moves[16][2] = { - 0,-4, - 1,-4, - 3,-3, - 4,-1, - 4,0, - 4,1, - 3,3, - 1,4, - 0,4, - -1,4, - -3,3, - -4,1, - -4,0, - -4,-1, - -3,-3, - -1,-4 + {0,-4}, + {1,-4}, + {3,-3}, + {4,-1}, + {4,0}, + {4,1}, + {3,3}, + {1,4}, + {0,4}, + {-1,4}, + {-3,3}, + {-4,1}, + {-4,0}, + {-4,-1}, + {-3,-3}, + {-1,-4} }; void xgal_exit(int v) { /* W_AutoRepeatOn();*/ + /* Destroy our main window so the fullscreen mode gets unset if we're + running fullscreen. (We should really clean up much more here!) */ + W_DestroyWindow(shellWin); #ifdef SOUND kill_sound(); #endif /* sleep(1);*/ /* Without this, the auto-repeat request fails on my machine... */ + /* Note if we ever need this autorepeat thingie again, the sleep can and should be replaced by a call to XSync() */ exit(v); } static void print_usage() { +#ifdef SOUND +#define PRINT_SOUND " -nosound Turn sound OFF\n" +#else +#define PRINT_SOUND "" +#endif + printf("\ XGalaga v%s\n\ Copyright (c) 1995-1998 Joe Rumsey\n\ @@ -80,6 +94,8 @@ -mouse Use mouse control (same as 'm' at the title screen)\n\ -keyboard Use keyboard control (same as 'k')\n%s\ -level Choose starting level (>= 1)\n\ +-window Start in windowed mode instead of fullscreen\n\ +-winsize Window size (default 468 x 596)\n\ -b turn buffered mode off, use this if it runs\n\ too slowly. Will cause flicker, maybe lots,\n\ maybe only a little.\n\ @@ -96,12 +112,9 @@ p - pauses\n\ q - end this game\n\ b - Toggle buffering (flicker vs. speed.)\n\ -o - Toggle OR mode. Don't use this, it sucks.\n", VERSION, -#ifdef SOUND - " -nosound Turn sound OFF\n" -#else - "" -#endif +o - Toggle OR mode. Don't use this, it sucks.\n\ +alt + enter - Toggle fullscreen - window\n", VERSION, + PRINT_SOUND ); } @@ -140,8 +153,10 @@ { int i; - for(i=0;i= WINHEIGHT) { - stars[i].y-=WINHEIGHT+starspeed; - stars[i].x = random() % WINWIDTH; - switch(random()%5) { - case 0: - stars[i].color = W_White; - break; - case 1: - stars[i].color = W_Green; - break; - case 2: - stars[i].color = W_Cyan; - break; - case 3: - stars[i].color = W_Red; - break; - default: - stars[i].color = W_Yellow; - break; + if(wantStars) { + for(i=0;i= WINHEIGHT) { + stars[i].y-=WINHEIGHT+starspeed; + stars[i].x = random() % WINWIDTH; + switch(random()%5) { + case 0: + stars[i].color = W_White; + break; + case 1: + stars[i].color = W_Green; + break; + case 2: + stars[i].color = W_Cyan; + break; + case 3: + stars[i].color = W_Red; + break; + default: + stars[i].color = W_Yellow; + break; + } } + W_DrawPoint(baseWin, stars[i].x, stars[i].y, stars[i].color); } - W_DrawPoint(baseWin, stars[i].x, stars[i].y, stars[i].color); +#ifdef SHOW_SHIELD_BAR + if ((plshield > 0) || (shieldsleft > 0)) { + int shieldcount = 0; + int total_shields = (plshield + shieldsleft) * 19 / SHIELDTIME + 1; + while (total_shields > 0) { + shieldcount++; + total_shields -= 19; + W_DrawImage(baseWin, WINWIDTH - 20 * shieldcount, 0, 0, shieldImage, W_Cyan); + } + while (total_shields < 0) { + int column; + column = WINWIDTH - 20 * shieldcount - total_shields++; + W_MakeLine(baseWin, column, 0, column, 20, W_Black); + W_MakeLine(baseWin, column - 1, 0, column - 1, 20, W_Black); + } + } +#endif /* SHOW_SHIELD_BAR */ + + } if(starspeed != 1) { char buf[20]; +#ifndef ORIGINAL_XGALAGA + int y; +#endif drewlevel = 1; sprintf(buf, "LEVEL %d", level+1); - W_MaskText(baseWin, WINWIDTH/2 - (W_StringWidth(buf, W_BigFont)/2), WINHEIGHT/2-W_BigTextheight/2, - W_Red, buf, strlen(buf), W_BigFont); +#ifndef ORIGINAL_XGALAGA + y = WINHEIGHT/2-W_BigTextheight/2; +#endif + W_MaskText(baseWin, WINWIDTH/2 - (W_StringWidth(buf, W_BigFont)/2), WINHEIGHT/2-W_BigTextheight/2, W_Red, buf, strlen(buf), W_BigFont); +#ifndef ORIGINAL_XGALAGA + if (shots > 0) { + int x = WINWIDTH/2 - 14 * W_Textwidth; + y += W_BigTextheight + 20; + + sprintf(buf, "Torps: %d Hits: %d", shots, hits); + W_MaskText(baseWin, x, y, W_Yellow, buf, strlen(buf), W_RegularFont); + + x += 23 * W_Textwidth; + sprintf(buf, "(%d%%)", 100 * hits / shots); + W_MaskText(baseWin, x, y, W_Green, buf, strlen(buf), W_RegularFont); + } +#endif } } @@ -424,8 +478,8 @@ if(convoyx <= 0) { convoyx=0; convoymove = -convoymove; - } else if(convoyx >= WINWIDTH/2) { - convoyx = WINWIDTH/2; + } else if(convoyx >= (WINWIDTH-180)) { + convoyx = WINWIDTH - 180; convoymove = -convoymove; } } @@ -576,7 +630,7 @@ } } } - if(livecount == 0) { + if(livecount == 0 && !paused) { starspeed++; #ifdef SOUND if(starspeed == 2) @@ -769,10 +823,13 @@ playerShip->width, h); } -static void do_player() +static void do_player(mx, my, but) +int mx, my, but; { - int mx, my, but; static int torpok; +#ifdef ENABLE_MACHINE_GUN + static int shotside = 0; +#endif W_Event wev; static int keys = 0; @@ -795,6 +852,14 @@ case 'm': mouseControl = 2; break; + case '\r'+256: + W_ToggleFullscreen(shellWin); + fullscreen = !fullscreen; + if (fullscreen) + W_BlankCursor(baseWin); + else + W_RevertCursor(baseWin); + break; default: break; } @@ -809,6 +874,12 @@ weapon = 0; movespeed = MINSPEED; ships=2; +#ifdef ACTIVATED_SHIELD + shieldsleft = STARTSHIELDS; + shieldon = 0; +#else + shieldsleft = 0; +#endif level=startLevel; /* change made here */ init_aliens(level); gotlemon = 0; @@ -819,6 +890,10 @@ W_ClearWindow(baseWin); } break; + case W_EV_EXPOSE: + if (wev.Window == shellWin) + draw_score(); + break; } } return; @@ -839,6 +914,13 @@ case ' ': keys &= ~(FIREKEY); break; +#ifdef ACTIVATED_SHIELD + case 'x': + shieldsleft += plshield; + plshield = 0; + shieldon = 0; + break; +#endif } break; case W_EV_KEY: @@ -860,8 +942,15 @@ mouseControl = 1; W_GrabPointer(baseWin); break; +#ifdef ACTIVATED_SHIELD + case 'x': + plshield += shieldsleft; + shieldsleft = 0; + shieldon = 1; + break; +#endif case 'q': - if(!pldead) { + if(!pldead && !paused) { new_explosion(plx, WINHEIGHT - ((playerShip->height)/2), 2); ships = 0; pldead = 1; @@ -924,20 +1013,29 @@ maxtorps = MINTORPS; break; #endif /* IM_A_BIG_FAT_CHEATER */ + case '\r'+256: + W_ToggleFullscreen(shellWin); + fullscreen = !fullscreen; + if (fullscreen) + W_BlankCursor(baseWin); + else + W_RevertCursor(baseWin); + break; default: break; } + case W_EV_EXPOSE: + if (wev.Window == shellWin) + draw_score(); + break; } } if(!paused) { torpok--; - W_GetMouse(baseWin, &mx, &my, &but); - if(!mouseControl) { - /* W_GetMouse(baseWin, &mx, &my, &but); - } else { - */ + if((!mouseControl && ! js_device) || + (js_device && mx == plx && but == 0)) { if(keys & LEFTKEY) mx = 0; else if(keys & RIGHTKEY) @@ -966,10 +1064,51 @@ #endif } } else { +#ifdef DISABLE_RESET_ON_DEATH + ships--; + maxtorps--; + if (maxtorps < MINTORPS) + maxtorps = MINTORPS; + switch (weapon) + { + case SINGLESHOT: + if (maxtorps < 3) + { + maxtorps = 3; + weapon = SINGLESHOT; + } + break; + case DOUBLESHOT: + if (maxtorps < 4) + { + maxtorps = 4; + } + break; + case SPREADSHOT: + if (maxtorps < 5) + { + maxtorps = 5; + } + break; + case TRIPLESHOT: + if (maxtorps < 6) + { + maxtorps = 6; + } + break; + case MACHINEGUN: + if (maxtorps < 3) + { + maxtorps = 3; + } + break; + } +#else ships--; maxtorps = MINTORPS; weapon = 0; movespeed = MINSPEED; +#endif /* DISABLE_RESET_ON_DEATH */ pldead = 0; plflash = 50; plx = WINWIDTH/2; @@ -983,11 +1122,13 @@ case SINGLESHOT: if(numtorps < maxtorps) new_torp(plx, WINHEIGHT - playerShip->height, 0, -TORPSPEED); + torpok = TORPDELAY; break; case DOUBLESHOT: if(numtorps < maxtorps-1) { new_torp(plx-5, WINHEIGHT - playerShip->height, 0, -TORPSPEED); new_torp(plx+5, WINHEIGHT - playerShip->height, 0, -TORPSPEED); + torpok = TORPDELAY; } break; case TRIPLESHOT: @@ -995,11 +1136,62 @@ new_torp(plx-5, WINHEIGHT - playerShip->height, -2, 1-TORPSPEED); new_torp(plx, WINHEIGHT - playerShip->height, 0, -TORPSPEED); new_torp(plx+5, WINHEIGHT - playerShip->height, 2, 1-TORPSPEED); + torpok = TORPDELAY; } break; - } - torpok = TORPDELAY; - } +#ifdef ENABLE_SPREAD_SHOT + case SPREADSHOT: + if (numtorps == 0) + { + if ((maxtorps % 2) == 1) + new_torp(plx, WINHEIGHT - playerShip->height, 0, -TORPSPEED*1.15); + else + { + new_torp(plx - 5, WINHEIGHT - playerShip->height, 0, -TORPSPEED*1.15); + new_torp(plx + 5, WINHEIGHT - playerShip->height, 0, -TORPSPEED*1.15); + } + if (maxtorps > 2) + { + new_torp(plx, WINHEIGHT - playerShip->height - 15, -2, -TORPSPEED*1.15); + new_torp(plx, WINHEIGHT - playerShip->height - 15, 2, -TORPSPEED*1.15); + } + if (maxtorps > 4) + { + new_torp(plx, WINHEIGHT - playerShip->height - 25, -4, -TORPSPEED*1.15); + new_torp(plx, WINHEIGHT - playerShip->height - 25, 4, -TORPSPEED*1.15); + } + if (maxtorps > 6) + { + new_torp(plx, WINHEIGHT - playerShip->height - 35, -6, -TORPSPEED*1.15); + new_torp(plx, WINHEIGHT - playerShip->height - 35, 6, -TORPSPEED*1.15); + } + if (maxtorps > 8) + { + new_torp(plx, WINHEIGHT - playerShip->height - 50, -8, -TORPSPEED*1.15); + new_torp(plx, WINHEIGHT - playerShip->height - 50, 8, -TORPSPEED*1.15); + } + if (maxtorps > 10) + { + new_torp(plx, WINHEIGHT - playerShip->height - 60, -10, -TORPSPEED*1.15); + new_torp(plx, WINHEIGHT - playerShip->height - 60, 10, -TORPSPEED*1.15); + } + torpok = TORPDELAY; + } + break; +#endif /* ENABLE_SPREAD_SHOT */ +#ifdef ENABLE_MACHINE_GUN + case MACHINEGUN: + if(numtorps < maxtorps) + { + shotside = (shotside == -15) ? 15 : -15; + new_torp(plx + shotside, WINHEIGHT - playerShip->height, 0, -TORPSPEED * 1.3); + torpok = TORPDELAY - 2; + } + break; +#endif /* ENABLE_MACHINE_GUN */ + } + } + if(!but) torpok=0; @@ -1008,11 +1200,20 @@ plx+=movespeed; else if((mx/movespeed) < (plx/movespeed)) plx-=movespeed; +#ifdef ENABLE_SHIP_WRAP + + if(plx < 10) + plx=WINWIDTH - 10; + if(plx > WINWIDTH - 10) + plx=10; +#else + if(plx < playerShip->width/2) plx=playerShip->width/2; if(plx> WINWIDTH - playerShip->width/2) plx=WINWIDTH - playerShip->width/2; +#endif if(plflash > 0) plflash--; @@ -1024,7 +1225,7 @@ W_DrawImage(baseWin, plx-(shieldImage->width/2), WINHEIGHT - shieldImage->height - 3, 0, shieldImage, W_Cyan); } - } else { /* paused */ + } else if (!pldead) { /* paused */ W_DrawImage(baseWin, plx-(playerShip->width/2), WINHEIGHT - playerShip->height, counter, playerShip, W_Red); } } @@ -1036,12 +1237,12 @@ { int ac; char *dpyname = 0; - struct timeval tv, otv; - long ut; + int mx, my, but; + int start_fullscreen = 1; - gettimeofday(&otv, 0); for(ac = 1; ac < argc; ac++) { if(*argv[ac] == '-') { + int w, h; if(strcmp(argv[ac], "-scores") == 0) { print_scores(); exit(0); @@ -1049,10 +1250,8 @@ if(strcmp(argv[ac], "-display") == 0 && (ac+1 < argc)) { dpyname = argv[ac+1]; ac++; -#if 0 } else if (strcmp(argv[ac], "-b") == 0) { useBuffered = !useBuffered; -#endif } else if (strcmp(argv[ac], "-keyboard") == 0) { mouseControl = 0; } else if (strcmp(argv[ac], "-mouse") == 0) { @@ -1066,6 +1265,18 @@ && atoi(argv[ac+1]) >= 1) { startLevel = atoi(argv[ac+1]); ac++; + } else if (strcmp(argv[ac], "-nostars") == 0) { + wantStars = 0; + } else if (strcmp(argv[ac], "-nouseor") == 0) { + useOR = 0; + } else if (strcmp(argv[ac], "-noclipmask") == 0) { + useClipMask = 0; + } else if (strcmp(argv[ac], "-window") == 0) { + start_fullscreen = 0; + } else if ((strcmp(argv[ac], "-winsize") == 0) && (++ac < argc) && + (sscanf(argv[ac], "%dx%d", &w, &h) == 2)) { + WINWIDTH = w; + WINHEIGHT = h; } else { print_usage(); exit(0); @@ -1079,8 +1290,18 @@ W_Initialize(dpyname); backColor = W_Black; - baseWin = W_MakeWindow("XGalaga", 0, 0, WINWIDTH, WINHEIGHT, 0, "tiny", 0, W_White); + WINHEIGHT -= (W_Textheight+1); + shellWin = W_MakeWindow("XGalaga", 0, 0, WINWIDTH, WINHEIGHT + W_Textheight+1, 0, "tiny", 0, W_White); + baseWin = W_MakeWindow("", 0, W_Textheight+1, WINWIDTH, WINHEIGHT, shellWin, "tiny", 0, W_White); + W_Buffer(shellWin, 0); + W_MapWindow(shellWin); W_MapWindow(baseWin); + if (start_fullscreen) + { + W_ToggleFullscreen(shellWin); + W_BlankCursor(baseWin); + fullscreen = 1; + } /* W_AutoRepeatOff();*/ @@ -1106,59 +1327,62 @@ init_sound(); #endif init_aliens(level); + init_framerate(); +#ifdef __linux__ + init_joystick(); +#endif ships = 2; nextBonus = 20000; while(1) { counter++; - if(gameOver && getting_name) - undo_name(); - undo_score(); + /* For the benefit of unbuffered mode, the most important things are + * erased/redrawn closest together so they spend the least time blanked. + * player, aliens and etorps are most important for game play. + * pause, title and name are important in their modes and aren't done + * otherwise. + * + * The title, name, pause and score "extra ship" want to overlay + * everything else drawn, so they come last. + */ + undo_stars(); undo_explosions(); - undo_stars(); - undo_aliens(); undo_prizes(); - undo_etorps(); undo_torps(); + undo_etorps(); + undo_aliens(); undo_player(); - - if(paused) - undo_pause(); + if(gameOver && getting_name) undo_name(); + if(paused) undo_pause(); + undo_score(); W_FlushClearAreaCache(baseWin); - if(paused) - do_pause(); - - do_stars(); - do_player(); - do_torps(); do_etorps(); - do_prizes(); + do_player(mx, my, but); do_aliens(); + do_torps(); + do_prizes(); do_explosions(); + do_stars(); do_score(); - if(gameOver) { - do_title(); - if(getting_name) - do_name(); - } + if(gameOver) { do_title(); if(getting_name) do_name(); } + if(paused) do_pause(); + W_DisplayBuffer(baseWin); - W_Flush(); - gettimeofday(&tv, 0); - if(tv.tv_sec > otv.tv_sec) - tv.tv_usec += (tv.tv_sec - otv.tv_sec) * 1000000; - ut = tv.tv_usec - otv.tv_usec; - if(UTIMER - ut > 0) { - struct timeval tv; - unsigned long usecs = UTIMER - ut; - tv.tv_sec = usecs / 1000000L; - tv.tv_usec = usecs % 1000000L; - (void) select (0, 0, 0, 0, &tv); - } - gettimeofday(&otv, 0); + /* This is an XSync style round trip to the server with the bonus of + * getting the mouse position. + * If the server can't draw at the UTIMER frame rate then this will be + * the only delay in the loop. + */ + W_GetMouse(baseWin, &mx, &my, &but); +#ifdef __linux__ + do_joystick(&mx, &my, &but); +#endif + + do_framerate(); } } --- xgalaga-2.0.34.orig/nas_sound.c +++ xgalaga-2.0.34/nas_sound.c @@ -60,6 +60,10 @@ int i; char *displayname = XDisplayString(W_Display); + /* Do not initialize sound if it is not going to be used -- JEH */ + if (!playSounds) + return; + if(unixSoundPath[0] == '?') { return; }; --- xgalaga-2.0.34.orig/pathfile.c +++ xgalaga-2.0.34/pathfile.c @@ -319,9 +319,18 @@ sprintf(filename, "%s/level%d.xgl", real_level_path, lev); lf = fopen(filename, "r"); if(!lf) { + /* Dont use recursion, to avoid stack overflow if start level is + * very high (or the game is played for a _very_ long time. :-) + * -- JEH */ + for (lev = lev - maxLevel; lev > 0 && ! lf ;lev = lev - maxLevel) { + metaLevel++; + /* real_level_path is already set, so.. */ + sprintf(filename, "%s/level%d.xgl", real_level_path, lev); + lf = fopen(filename, "r"); + } + //fprintf(stderr, "Can't open level file %s\n", filename); - metaLevel++; - return read_level(lev - maxLevel); + //return read_level(lev - maxLevel); } if(lev > maxLevel) @@ -378,8 +387,8 @@ void get_xy(int anum, int* x, int* y) { - *x = pathinfo[al_paths[anum]].startx; - *y = pathinfo[al_paths[anum]].starty; + *x = (WINWIDTH * pathinfo[al_paths[anum]].startx) / 400; + *y = (WINHEIGHT * pathinfo[al_paths[anum]].starty) / 500; } int get_delay(int anum) --- xgalaga-2.0.34.orig/paths.c +++ xgalaga-2.0.34/paths.c @@ -159,6 +159,8 @@ { 6,80, -1,-1, }, }; +/* These aren't used anymore! (see filepath.c) Maybe we should nuke them? */ +#if 0 /* enter_paths are for new ships. consists of starting co-ordinates, number of frames to wait at the start (presumably offscreen) and a path to follow. path -1 means this ship is not used on this level @@ -1159,6 +1161,8 @@ }, }; +#endif /* This isn't used anymore! Maybe we should nuke it */ + void path_dir(int path, int pos, int *dir, int *steer) { *dir = paths[path][pos][0]; @@ -1197,8 +1201,6 @@ void new_alien(int level, int anum, struct alien *al) { - int l = (level-1) % NUMLEVELS; - if(get_shape(anum) >= 0) { al->alive = 1; al->dying = 0; --- xgalaga-2.0.34.orig/proto.h +++ xgalaga-2.0.34/proto.h @@ -1,3 +1,5 @@ +#include + /* main.c */ void xgal_exit(int v); int main(int argc, char **argv); @@ -27,6 +29,7 @@ /* score.c */ void undo_score(void); void do_score(void); +void draw_score(void); void init_score(void); /* highscore.c */ void undo_name(void); @@ -57,3 +60,9 @@ int get_duration(int, int); int get_shape(int); int read_level(int); +/* frate.c */ +void init_framerate(void); +void do_framerate(void); +/* linux-joystick.c */ +void init_joystick(void); +void do_joystick(int* x, int* y, int* but); --- xgalaga-2.0.34.orig/prize.c +++ xgalaga-2.0.34/prize.c @@ -20,7 +20,27 @@ #define PR_SMART 5 #define PR_LEMON 6 #define PR_EXTRABULLET 7 -#define NUMPRIZES 8 + +#ifdef ENABLE_SPREAD_SHOT +#define PR_SPREAD 8 +#endif + +#ifdef ENABLE_MACHINE_GUN +# ifdef ENABLE_SPREAD_SHOT +# define PR_MACHINE 9 +# define NUMPRIZES 10 +# else +# define PR_MACHINE 8 +# define NUMPRIZES 9 +# endif /* ENABLE_SPREAD_SHOT */ +#else +# ifdef ENABLE_SPREAD_SHOT +# define PR_SPREAD 8 +# define NUMPRIZES 9 +# else +# define NUMPRIZES 8 +# endif /* ENABLE_SPREAD_SHOT */ +#endif /* ENABLE_MACHINE_GUN */ #define PRIZESPEED 3 @@ -41,6 +61,13 @@ prizeImages[5] = getImage(I_PR_BRAIN); prizeImages[6] = getImage(I_PR_LEMON); prizeImages[7] = getImage(I_PR_EXTRABULLET); +#ifdef ENABLE_SPREAD_SHOT + prizeImages[8] = getImage(I_PR_SPREAD); +#endif + +#ifdef ENABLE_MACHINE_GUN + prizeImages[NUMPRIZES - 1] = getImage(I_PR_MACHINE); +#endif } void new_prize(int x, int y) @@ -97,7 +124,11 @@ p->x-prizeImages[p->type]->width/2, p->y-prizeImages[p->type]->width/2, 0, prizeImages[p->type], W_Green); - if(p->y > (WINHEIGHT-20) && (ABS(p->x - plx) < 15)) { + if(p->y > (WINHEIGHT-20) && (ABS(p->x - plx) < 15) +#ifdef NO_PRIZE_WHILE_DEAD + && !pldead +#endif + ) { p->dying = 1; #ifdef SOUND play_sound(SND_DDLOO); @@ -131,11 +162,51 @@ if(movespeed < MAXSPEED) movespeed++; break; +#ifdef ENABLE_SPREAD_SHOT + case PR_SPREAD: + if (weapon == SPREADSHOT) + maxtorps++; + else { + weapon = SPREADSHOT; + if (maxtorps < 5) + maxtorps = 5; + } + break; +#endif /* ENABLE_SPREAD_SHOT */ +#ifdef ENABLE_MACHINE_GUN + case PR_MACHINE: + if (weapon == MACHINEGUN) + maxtorps++; + else { + weapon = MACHINEGUN; + if (maxtorps < 3) + maxtorps = 3; + } + break; +#endif /* ENABLE_MACHINE_GUN */ case PR_SHIELD: +#ifdef ACTIVATED_SHIELD + if (shieldon) + plshield += SHIELDTIME; + else + shieldsleft += SHIELDTIME; + if (shieldsleft + plshield > MAXSHIELDS) + { + if (shieldon) + { + shieldsleft = 0; + plshield = MAXSHIELDS; + } else { + shieldsleft = MAXSHIELDS; + plshield = 0; + } + } +#else plshield = SHIELDTIME; #ifdef SOUND play_sound(SND_SHIELD); -#endif +#endif /* SOUND */ +#endif /* ACTIVATED_SHIELD */ break; case PR_SMART: #ifdef SOUND --- xgalaga-2.0.34.orig/sound.c +++ xgalaga-2.0.34/sound.c @@ -40,6 +40,11 @@ char *argv[4]; char filename[512]; + + /* Do not initialize sound if it is not going to be used -- JEH */ + if (! playSounds) + return; + signal(SIGCHLD, SIG_IGN); if(unixSoundPath[0] == '?') { @@ -49,7 +54,10 @@ /* Create a pipe, set the write end to close when we exec the sound server, and set both (is the write end necessary?) ends to non-blocking */ - pipe(fd); + if (pipe(fd)) { + audioOK = 0; + return; + } soundfd=fd[1]; if( !(child=fork()) ) { @@ -83,7 +91,9 @@ char c; c = k; - if ((playSounds) && (audioOK)) write (soundfd, &c, sizeof (c)); + if ((playSounds) && (audioOK)) + if(write (soundfd, &c, sizeof (c)) != sizeof (c)) + audioOK = 0; } @@ -98,7 +108,9 @@ sound_flags[k] |= 1; c = (unsigned char)(k); - if ((playSounds) && (audioOK)) write (soundfd, &c, sizeof (c)); + if ((playSounds) && (audioOK)) + if(write (soundfd, &c, sizeof (c)) != sizeof (c)) + audioOK = 0; } @@ -116,7 +128,9 @@ char c; c = -1; - if ((playSounds) && (audioOK)) write (soundfd, &c, sizeof (c)); + if ((playSounds) && (audioOK)) + if(write (soundfd, &c, sizeof (c)) != sizeof (c)) + audioOK = 0; } #endif /* SOUND */ --- xgalaga-2.0.34.orig/score.c +++ xgalaga-2.0.34/score.c @@ -17,13 +17,6 @@ void undo_score() { - int basex; - - basex = WINWIDTH/2 - ((strlen(scorestr)/2)*W_Textwidth); - W_ClearArea(baseWin, basex, 0, strlen(scorestr) * W_Textwidth + 1, W_Textheight + 1); - W_ClearArea(baseWin, 0, 0, (miniship->width+2)*6, miniship->height); - basex = 6*(miniship->width+2) + 2; - W_ClearArea(baseWin, basex, 0, strlen(shipstr) * W_Textwidth + 1, W_Textheight + 1); if(drawExtra) W_ClearArea(baseWin, extrax-(extraImage->width/2), extray-(extraImage->height/2), extraImage->width, extraImage->height); @@ -31,24 +24,8 @@ void do_score() { - int basex; - int i; - static int lastscore; + static int lastscore, lastlevel, lastships; - sprintf(scorestr, "Score: %07d Level: %02d", score, level); - basex = WINWIDTH/2 - ((strlen(scorestr)/2)*W_Textwidth); - W_MaskText(baseWin, basex, 1, W_Grey, scorestr, strlen(scorestr), W_RegularFont); - W_MaskText(baseWin, basex+1, 0, W_Yellow, scorestr, strlen(scorestr), W_RegularFont); - - for(i=0;i<((ships < 6) ? ships : 6);i++) { - W_DrawImage(baseWin, i*(miniship->width+2), 0, 0, miniship, W_White); - } - if(ships>6) { - sprintf(shipstr, "%d", ships); - basex = 6*(miniship->width+2) + 2; - W_MaskText(baseWin, basex, 1, W_Grey, shipstr, strlen(shipstr), W_RegularFont); - W_MaskText(baseWin, basex+1, 0, W_Yellow, shipstr, strlen(shipstr), W_RegularFont); - } if(lastscore != score) { if((score > 0) && (score >= nextBonus)) { ships++; @@ -60,8 +37,16 @@ else nextBonus += BONUSSHIPSCORE; } + } + + if(lastscore != score || lastlevel != level || lastships != ships) { + W_ClearArea(shellWin, 0, 0, WINWIDTH, W_Textheight + 1); + draw_score(); lastscore=score; + lastlevel=level; + lastships=ships; } + if(drawExtra) { extrax += 10; W_DrawImage(baseWin, extrax-(extraImage->width/2), extray-(extraImage->height/2), 0, extraImage, W_White); @@ -70,6 +55,29 @@ } } +void draw_score() +{ + int basex; + int i; + + sprintf(scorestr, "Score: %07d Level: %02d", score, level); + + basex = WINWIDTH/2 - ((strlen(scorestr)/2)*W_Textwidth); + W_MaskText(shellWin, basex, 1, W_Grey, scorestr, strlen(scorestr), W_RegularFont); + W_MaskText(shellWin, basex+1, 0, W_Yellow, scorestr, strlen(scorestr), W_RegularFont); + + for(i=0;i<((ships < 6) ? ships : 6);i++) { + W_DrawImage(shellWin, i*(miniship->width+2), 0, 0, miniship, W_White); + } + + if(ships>6) { + sprintf(shipstr, "%d", ships); + basex = 6*(miniship->width+2) + 2; + W_MaskText(shellWin, basex, 1, W_Grey, shipstr, strlen(shipstr), W_RegularFont); + W_MaskText(shellWin, basex+1, 0, W_Yellow, shipstr, strlen(shipstr), W_RegularFont); + } +} + void init_score() { miniship = getImage(I_MINISHIP); --- xgalaga-2.0.34.orig/struct.h +++ xgalaga-2.0.34/struct.h @@ -1,3 +1,6 @@ +#ifndef STRUCT_H +#define STRUCT_H + #include "Wlib.h" struct torp { @@ -38,3 +41,10 @@ int count; W_Image *shape; }; + +struct js_state { + signed short but; + signed long dir; +}; + +#endif --- xgalaga-2.0.34.orig/title.c +++ xgalaga-2.0.34/title.c @@ -73,7 +73,7 @@ static void show_help() { - int top = 220; + int top = 270; center_text(" Keyboard controls ", top, W_Red); center_text(" left/right arrow move ", top+10, W_Yellow); @@ -83,12 +83,15 @@ center_text(" Q quick quit ", top+50, W_Cyan); center_text(" k keyboard control", top+60, W_Cyan); center_text(" m mouse control ", top+70, W_Cyan); +#ifndef ORIGINAL_XGALAGA + center_text(" x toggle shields ", top+80, W_Cyan); +#endif #ifdef SOUND - center_text(" s toggle sound ", top+80, W_Cyan); + center_text(" s toggle sound ", top+90, W_Cyan); #endif - center_text("Bonus ships at 20,000, 50,000, then every 50,000.", top+100, W_Green); - center_text("XGalaga Home page: http://ogresoft.dyn.ml.org/xgalaga.html", + center_text("Bonus ships at 20,000, 50,000, then every 50,000.", top+120, W_Green); + center_text("XGalaga Home page: http://rumsey.org/xgal.html", top+150, W_Cyan); } void do_title() @@ -107,7 +110,12 @@ case 0: center_text("Copyright (c) 1995-1998 Joe Rumsey", ty, W_Green); ty+= W_Textheight; center_text("", ty, W_Green); ty+= 2*W_Textheight; - +#ifndef ORIGINAL_XGALAGA + center_text("XGalaga: Hyperspace 0.9", ty, W_Green); ty+= W_Textheight; + center_text("Modifications by:", ty, W_Green); ty+= W_Textheight; + center_text("Bryce Wagner - John Strickland - David Enderson", ty, W_Green); ty+= 2*W_Textheight; +#endif + center_text("This game is free software, covered by the GPL", ty, W_Yellow); ty += W_Textheight; center_text("If you enjoy it, visit http://www.gnu.org and help", ty, W_Yellow); ty+= W_Textheight; center_text("support the Free Software Foundation", ty, W_Yellow);ty+= W_Textheight; @@ -122,6 +130,11 @@ break; } +#ifdef __linux__ + if (js_device) + center_text("Press k for keyboard or joystick control, m for mouse", WINHEIGHT - 2*W_Textheight, W_Yellow); + else /* no joystick, so use message below */ +#endif center_text("Press k for keyboard control, m for mouse", WINHEIGHT - 2*W_Textheight, W_Yellow); center_text("Or q to quit", WINHEIGHT - W_Textheight, W_Yellow); pagetimer--; --- xgalaga-2.0.34.orig/xgal.sndsrv.linux.c +++ xgalaga-2.0.34/xgal.sndsrv.linux.c @@ -10,13 +10,14 @@ /* $Id: xgal.sndsrv.linux.c,v 1.3 1998/05/11 06:37:20 mrogre Exp $ */ #include +#include #include #include #include #include #include #include -/*#include "linux_pcsp.h" /* /usr/include/linux/pcsp.h */ +/*#include "linux_pcsp.h" /usr/include/linux/pcsp.h */ #include #include #include @@ -38,7 +39,7 @@ #define NUM_SOUNDS (sizeof(FILENAME)/sizeof(char*)) -signed char *sound_buffer[NUM_SOUNDS]; +char *sound_buffer[NUM_SOUNDS]; int sound_size[NUM_SOUNDS]; int fragsize; @@ -55,7 +56,7 @@ { int i; char s[1024]; - + if (argc != 3) { printf ("This program is only executed by xgal\n"); @@ -74,7 +75,7 @@ sound_size[i]=0; } - signal(SIGTERM, quit); /* Setup Terminate Signal Handler */ + signal(SIGTERM, quit); /* Setup Terminate Signal Handler */ } @@ -136,17 +137,6 @@ return dsp; } -/* - This just keeps the pipe from breaking... - Eventually I'll look at the xgal signal handlers and - just trap this. -*/ -int do_nothing(void) -{ - fprintf(stderr,"xgal.sndsrv: Sound not available\n"); - while(1) sleep (5); -} - int read_sound(int k) { int i,fd,size; @@ -171,10 +161,12 @@ return(0); }; lseek(fd,0,SEEK_SET); - read(fd,sound_buffer[k],size); + size = read(fd,sound_buffer[k],size); close(fd); - for(i=0;i +#include + +struct xf86vidmode_data { + int vidmode_available; + XF86VidModeModeInfo orig_mode; + int orig_viewport_x; + int orig_viewport_y; +}; + +extern struct xf86vidmode_data XF86VidModeData; +#endif + #endif /* AMIGA */ #if 0 --- xgalaga-2.0.34.orig/libsprite/Wproto.h +++ xgalaga-2.0.34/libsprite/Wproto.h @@ -63,6 +63,7 @@ W_Window W_MakeTextWindow(char *name, int x, int y, int width, int height, W_Window parent, char *cursname, int border); W_Window W_MakeScrollingWindow(char *name, int x, int y, int width, int height, W_Window parent, char *cursname, int border); void W_SetIconWindow(W_Window win, W_Window icon); +void W_ToggleFullscreen(W_Window win); /* point.c */ void W_DrawPoint(W_Window window, int x, int y, W_Color color); void FlushPointCache(Window win, int color); --- xgalaga-2.0.34.orig/libsprite/data.c +++ xgalaga-2.0.34/libsprite/data.c @@ -61,7 +61,7 @@ /* GC used for drawing the borders [BDyess] */ GC borderGC; int controlkey = 0; -#define BillsScrewyAltMask (Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask) +unsigned BillsScrewyAltMask = Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask; int altkey = 0; int W_FastClear = 0; #ifdef CONTINUOUS_MOUSE @@ -79,8 +79,9 @@ W_Color W_White = WHITE, W_Black = BLACK, W_Red = RED, W_Green = GREEN; W_Color W_Yellow = YELLOW, W_Cyan = CYAN, W_Grey = LIGHT_GREY, W_DarkGrey = DARK_GREY; int W_Textwidth, W_Textheight, W_BigTextwidth, W_BigTextheight; +#ifndef strdup char *strdup(); - +#endif int W_in_message = 0; /* jfy -- for Jerry's warp message hack */ #ifdef RJC @@ -147,7 +148,7 @@ int forceMono = 0; -int xpm = 1, useOR = 1; +int xpm = 1, useOR = 1, useClipMask = 1; int backColor; @@ -157,3 +158,6 @@ int useBuffered = 1; +#ifdef XF86VIDMODE +struct xf86vidmode_data XF86VidModeData = { 1, { 0 }, 0, 0 }; +#endif --- xgalaga-2.0.34.orig/libsprite/data.h +++ xgalaga-2.0.34/libsprite/data.h @@ -20,6 +20,7 @@ #include "Wlib.h" #include "defs.h" +#include "struct.h" extern int nplanes; extern int xpmORplanes ; @@ -80,7 +81,7 @@ extern unsigned char solid[]; extern int forceMono; -extern int xpm, useOR; +extern int xpm, useOR, useClipMask; extern int backColor; extern char *imagedir; @@ -88,4 +89,6 @@ extern int useBuffered; +extern unsigned BillsScrewyAltMask; + #endif /* _data_h_ */ --- xgalaga-2.0.34.orig/libsprite/defs.h +++ xgalaga-2.0.34/libsprite/defs.h @@ -106,7 +106,4 @@ } #endif /* ABORT_ON_ERROR */ -#define BillsScrewyAltMask (Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask) - - #endif /* _defs_h_ */ --- xgalaga-2.0.34.orig/libsprite/image.c +++ xgalaga-2.0.34/libsprite/image.c @@ -210,7 +210,7 @@ if(image->compiled_in) { if(image->xbmdata) { image->clipmask = XCreateBitmapFromData(W_Display, W_Root, - image->xbmdata, image->width, image->height); + (char *)image->xbmdata, image->width, image->height); ErrorStatus = BitmapSuccess; } else { ErrorStatus = !BitmapSuccess; @@ -402,18 +402,22 @@ width = image->width; if(xpm && !useOR) { if(image->xpm) { - XSetClipOrigin(W_Display, colortable[color].contexts[BITMASKGC], x, - (int)(y - (height * frame))); - XSetClipMask(W_Display, colortable[color].contexts[BITMASKGC], - image->clipmask); + if (useClipMask) { + XSetClipOrigin(W_Display, colortable[color].contexts[BITMASKGC], x, + (int)(y - (height * frame))); + XSetClipMask(W_Display, colortable[color].contexts[BITMASKGC], + image->clipmask); + } XCopyArea(W_Display, image->pixmap, W_Void2Window(window)->drawable, colortable[color].contexts[BITMASKGC], 0, (int)(height * frame), width, height, x, y); } else { - XSetClipOrigin(W_Display, colortable[color].contexts[BITMASKGC], x, - (int)(y - (height * frame))); - XSetClipMask(W_Display, colortable[color].contexts[BITMASKGC], - image->clipmask); + if (useClipMask) { + XSetClipOrigin(W_Display, colortable[color].contexts[BITMASKGC], x, + (int)(y - (height * frame))); + XSetClipMask(W_Display, colortable[color].contexts[BITMASKGC], + image->clipmask); + } XCopyPlane(W_Display, image->pixmap, W_Void2Window(window)->drawable, colortable[color].contexts[BITMASKGC], 0, (int)(height * frame), --- xgalaga-2.0.34.orig/libsprite/init.c +++ xgalaga-2.0.34/libsprite/init.c @@ -326,6 +326,61 @@ XSetForeground(W_Display, maskGC, 0); } +/* Any of Mod1 through Mod5 that are generated by XK_Num_Lock or + * XK_Scroll_Lock are excluded from BillsScrewyAltMask. + */ +static void +GetAltMask() +{ + XModifierKeymap *m; + int i, j; + KeySym k; + + m = XGetModifierMapping(W_Display); + if (m == NULL) { + printf("Not enough memory\n"); + exit(1); + } + + for (i = 3; i < 8; i++) { + for (j = 0; j < m->max_keypermod; j++) { + k = XKeycodeToKeysym(W_Display, + m->modifiermap [i*m->max_keypermod + j], 0); + if (k == XK_Num_Lock || k == XK_Scroll_Lock) { + BillsScrewyAltMask &= ~(1 << i); + break; + } + } + } + + XFreeModifiermap(m); +} + +#ifdef XF86VIDMODE +static void +xf86_vidmode_init ( void ) +{ + int i,j; + XF86VidModeModeLine *l = (XF86VidModeModeLine *)((char *) + &XF86VidModeData.orig_mode + sizeof XF86VidModeData.orig_mode.dotclock); + + if (!XF86VidModeQueryVersion(W_Display, &i, &j)) + XF86VidModeData.vidmode_available = 0; + else if (!XF86VidModeQueryExtension(W_Display, &i, &j)) + XF86VidModeData.vidmode_available = 0; + else if (!XF86VidModeGetModeLine(W_Display, W_Screen, + (int *)&XF86VidModeData.orig_mode.dotclock, l)) + XF86VidModeData.vidmode_available = 0; + else if (!XF86VidModeGetViewPort(W_Display, W_Screen, + &XF86VidModeData.orig_viewport_x, + &XF86VidModeData.orig_viewport_y)) + XF86VidModeData.vidmode_available = 0; + + if (!XF86VidModeData.vidmode_available) + fprintf(stderr, "Warning: XF86VidMode not available\n"); +} +#endif + void W_Initialize(str) char *str; @@ -362,7 +417,12 @@ */ GetFonts(); GetColors(); + GetAltMask(); backColor = W_Black; + +#ifdef XF86VIDMODE + xf86_vidmode_init(); +#endif } --- xgalaga-2.0.34.orig/libsprite/line.c +++ xgalaga-2.0.34/libsprite/line.c @@ -37,7 +37,7 @@ W_Window window; { Window win = W_Void2Window(window)->drawable; - register i; + int i; for (i = 0; i < NCOLORS; i++) { if (_lcache_index[i]) FlushLineCache(win, i); --- xgalaga-2.0.34.orig/libsprite/makewindow.c +++ xgalaga-2.0.34/libsprite/makewindow.c @@ -4,20 +4,20 @@ #define tiny_height 3 #define tiny_x_hot 1 #define tiny_y_hot 1 -static unsigned char tiny_bits[] = { +static char tiny_bits[] = { 0x05, 0x02, 0x05, }; -static unsigned char tinymask_bits[] = { +static char tinymask_bits[] = { 0x05, 0x02, 0x05, }; #define cross_width 16 #define cross_height 16 #define cross_x_hot 7 #define cross_y_hot 7 -static unsigned char cross_bits[] = { +static char cross_bits[] = { 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0xc0, 0x01, 0x80, 0x00, 0x10, 0x04, 0x3f, 0x7e, 0x10, 0x04, 0x80, 0x00, 0xc0, 0x01, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00}; -static unsigned char crossmask_bits[] = { +static char crossmask_bits[] = { 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xe0, 0x03, 0xd0, 0x05, 0xbf, 0x7e, 0x7f, 0x7f, 0xbf, 0x7e, 0xd0, 0x05, 0xe0, 0x03, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0xc0, 0x01, 0x00, 0x00}; @@ -236,6 +236,10 @@ neww->type = type; neww->mapped = 0; neww->insensitive = 0; +#ifdef XF86VIDMODE + neww->wm_window = NULL; + neww->fs_window = None; +#endif addToHash(neww); return (neww); } @@ -454,6 +458,22 @@ int border; W_Color color; { + /* When creating a toplevel window create a real toplevel + window and a child window of the same dimensions. Then when switching + fullscreen we can create a fullscreen window and reparent the child + window to the fullscreen window and back again when switching to + windowed mode again. */ + if(parent == NULL) + { + W_Window wm_window = w_MakeWindow(name, x, y, width, height, 0, + cursname, border, color, WIN_GRAPH); + struct window *child_window = (struct window *)w_MakeWindow( + name, x, y, width, height, + wm_window, cursname, border, color, + WIN_GRAPH); + child_window->wm_window = wm_window; + return (W_Window)child_window; + } return w_MakeWindow(name, x, y, width, height, parent, cursname, border, color, WIN_GRAPH); } @@ -498,5 +518,197 @@ XSetWMHints(W_Display, W_Void2Window(win)->window, &hints); } +#ifdef XF86VIDMODE +/* qsort comparison function for sorting the modes */ +static int cmpmodes(const void *va, const void *vb) +{ + const XF86VidModeModeInfo *a = *(const XF86VidModeModeInfo **)va; + const XF86VidModeModeInfo *b = *(const XF86VidModeModeInfo **)vb; + if ( a->hdisplay == b->hdisplay ) + return b->vdisplay - a->vdisplay; + else + return b->hdisplay - a->hdisplay; +} +#endif +void W_ToggleFullscreen(_win) + W_Window _win; +{ +#ifdef XF86VIDMODE + int i; + XF86VidModeModeLine mode; + XF86VidModeModeInfo **modes; + int mode_count; +#endif + struct window *win = (struct window *)_win; + static int mouse_grabbed = 0; + static int keyboard_grabbed = 0; + /* Check we get a nested toplevel WIN_GRAPH window passed */ + if (win->wm_window == NULL) + return; + + /* If there is no fullscreen window enter fullscreen mode, otherwise exit + fullscreen mode */ + if (win->fs_window == None) + { + XEvent event; + XSetWindowAttributes setattr; + /* local width and height vars used for fullscreen window size and for + storing the video_mode size which is then used to center the window */ + int fs_width = DisplayWidth(W_Display, W_Screen); + int fs_height = DisplayHeight(W_Display, W_Screen); + + /* Create the fullscreen window */ + setattr.override_redirect = True; + setattr.background_pixel = XBlackPixel(W_Display, W_Screen); + setattr.border_pixel = XBlackPixel(W_Display, W_Screen); + setattr.event_mask = StructureNotifyMask; + setattr.colormap = W_Colormap; + win->fs_window = XCreateWindow(W_Display, W_Root, + 0, 0, fs_width, fs_height, 0, + CopyFromParent, InputOutput, + CopyFromParent, CWOverrideRedirect | + CWBackPixel | CWColormap | CWBorderPixel | + CWEventMask, &setattr); + + /* Map the fullscreen window */ + XMapRaised(W_Display, win->fs_window); + /* wait until we are mapped. (shamelessly borrowed from SDL) */ + do { + XMaskEvent(W_Display, StructureNotifyMask, &event); + } while ( (event.type != MapNotify) || + (event.xmap.event != win->fs_window) ); + /* Make sure we got to the top of the window stack */ + XRaiseWindow(W_Display, win->fs_window); + + /* Reparent the real window */ + XReparentWindow(W_Display, win->window, win->fs_window, 0, 0); + + /* Grab the keyboard and mouse. */ + if (XGrabKeyboard(W_Display, win->window, False, GrabModeAsync, + GrabModeAsync, CurrentTime) != GrabSuccess) + fprintf(stderr, "Warning can not grab keyboard\n"); + else + keyboard_grabbed = 1; + + if (XGrabPointer(W_Display, win->window, False, + PointerMotionMask | ButtonPressMask | ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, win->window, None, + CurrentTime) != GrabSuccess) + fprintf(stderr, "Warning can not grab mouse\n"); + else + mouse_grabbed = 1; + +#ifdef XF86VIDMODE + /* Try to switch video mode. This must be done after the pointer is + grabbed, because otherwise it can be outside the window negating the + XF86VidModeSetViewPort. */ + if (XF86VidModeGetModeLine(W_Display, W_Screen, &i, &mode)) + { + fs_width = mode.hdisplay; + fs_height = mode.vdisplay; + } + else /* If we can't get the currentmode force setting of a new mode. */ + mode.hdisplay = 0; + + /* Get list of modelines. */ + if (!XF86VidModeGetAllModeLines(W_Display, W_Screen, &mode_count, &modes)) + mode_count = 0; + + /* Search for an exact matching video mode. */ + for (i = 0; i < mode_count; i++) { + if ((modes[i]->hdisplay == win->width) && + (modes[i]->vdisplay == win->height)) + break; + } + + /* Search for a non exact match (smallest bigger res). */ + if (i == mode_count) { + int best_width = 0, best_height = 0; + qsort(modes, mode_count, sizeof(void *), cmpmodes); + for (i = mode_count-1; i > 0; i--) { + if ( ! best_width ) { + if ( (modes[i]->hdisplay >= win->width) && + (modes[i]->vdisplay >= win->height) ) { + best_width = modes[i]->hdisplay; + best_height = modes[i]->vdisplay; + } + } else { + if ( (modes[i]->hdisplay != best_width) || + (modes[i]->vdisplay != best_height) ) { + i++; + break; + } + } + } + } + + /* Switch video mode. */ + if (((modes[i]->hdisplay != mode.hdisplay) || + (modes[i]->vdisplay != mode.vdisplay)) && + XF86VidModeSwitchToMode(W_Display, W_Screen, modes[i])) + { + fs_width = modes[i]->hdisplay; + fs_height = modes[i]->vdisplay; + } + + /* Lock mode switching. */ + XF86VidModeLockModeSwitch(W_Display, W_Screen, True); + + /* Set viewport. */ + XF86VidModeSetViewPort(W_Display, W_Screen, 0, 0); +#endif + + /* Center the window (if nescesarry) */ + if ((fs_width != win->width) || (fs_height != win->height)) + XMoveWindow(W_Display, win->window, (fs_width - win->width) / 2, + (fs_height - win->height) / 2); + + /* And last blank the cursor */ + W_BlankCursor(_win); + } + else + { + struct window *wm_window = (struct window *)win->wm_window; + + if (mouse_grabbed) { + XUngrabPointer(W_Display, CurrentTime); + mouse_grabbed = 0; + } + if (keyboard_grabbed) { + XUngrabKeyboard(W_Display, CurrentTime); + keyboard_grabbed = 0; + } + +#ifdef XF86VIDMODE + /* Unlock mode switching. */ + XF86VidModeLockModeSwitch(W_Display, W_Screen, False); + + if (!XF86VidModeGetModeLine(W_Display, W_Screen, &i, &mode) || + (mode.hdisplay != XF86VidModeData.orig_mode.hdisplay) || + (mode.vdisplay != XF86VidModeData.orig_mode.vdisplay)) + { + if (!XF86VidModeSwitchToMode(W_Display, W_Screen, + &XF86VidModeData.orig_mode)) + fprintf(stderr, "XF86VidMode couldnot restore original resolution\n"); + } + if (XF86VidModeData.orig_viewport_x || XF86VidModeData.orig_viewport_y) + { + if (!XF86VidModeSetViewPort(W_Display, W_Screen, + XF86VidModeData.orig_viewport_x, + XF86VidModeData.orig_viewport_y)) + fprintf(stderr, "XF86VidMode couldnot restore original viewport\n"); + } + XSync(W_Display, False); +#endif + /* Reparent the real window! */ + XReparentWindow(W_Display, win->window, wm_window->window, 0, 0); + XUnmapWindow(W_Display, win->fs_window); + XDestroyWindow(W_Display, win->fs_window); + win->fs_window = None; + + /* And last unblank the cursor */ + W_RevertCursor(_win); + } +} --- xgalaga-2.0.34.orig/libsprite/mapwindow.c +++ xgalaga-2.0.34/libsprite/mapwindow.c @@ -13,6 +13,8 @@ if(win->type != WIN_BORDER && win->borderwin) { W_MapWindow(win->borderwin); } + if (win->wm_window) + W_MapWindow(win->wm_window); if (win->mapped) return; win->mapped = 1; @@ -36,6 +38,8 @@ if(win->type != WIN_BORDER && win->borderwin) { W_UnmapWindow(win->borderwin); } + if (win->wm_window) + W_UnmapWindow(win->wm_window); } int @@ -75,17 +79,25 @@ W_Window window; { struct window *win; - + W_Window wm_window; #ifdef DEBUG printf("Destroying %d\n", window); #endif win = W_Void2Window(window); + wm_window = win->wm_window; + + if(win->fs_window != None) + W_ToggleFullscreen(window); + deleteWindow(win); XDestroyWindow(W_Display, win->window); if(win->buffer) XFreePixmap(W_Display, win->buffer); if(win->type != WIN_BORDER && win->borderwin) W_DestroyWindow(win->borderwin); free((char *) win); + + if (wm_window) + W_DestroyWindow(wm_window); } void --- xgalaga-2.0.34.orig/libsprite/point.c +++ xgalaga-2.0.34/libsprite/point.c @@ -49,7 +49,7 @@ W_Window window; { Window win = W_Void2Window(window)->drawable; - register i; + int i; for (i = 0; i < NCOLORS; i++) { if (_pcache_index[i]) FlushPointCache(win, i); --- xgalaga-2.0.34.orig/libsprite/scroll.c +++ xgalaga-2.0.34/libsprite/scroll.c @@ -9,12 +9,11 @@ char *str; int len; { - struct stringList **strings; char *newstring; - int count; + char **p = & (win->data); + struct stringList **strings = (struct stringList **)p ; + int count = 0; - strings = (struct stringList **) & (win->data); - count = 0; while ((*strings) != NULL) { count++; strings = &((*strings)->next); --- xgalaga-2.0.34.orig/libsprite/struct.h +++ xgalaga-2.0.34/libsprite/struct.h @@ -55,6 +55,8 @@ W_Callback handle_button; W_Callback handle_expose; #endif /* 0 */ + W_Window wm_window; + Window fs_window; }; struct stringList { --- xgalaga-2.0.34.orig/configure +++ xgalaga-2.0.34/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -56,6 +56,7 @@ # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -339,7 +340,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -509,9 +510,11 @@ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -552,26 +555,26 @@ # Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:561: checking host system type" >&5 +echo "configure:564: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) - if host_alias=`$ac_config_guess`; then : + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac -host=`$ac_config_sub $host_alias` +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -581,15 +584,16 @@ # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:585: checking for $ac_word" >&5 +echo "configure:588: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -610,16 +614,17 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:614: checking for $ac_word" >&5 +echo "configure:618: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -654,25 +659,61 @@ echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:669: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:662: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:701: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross -cat > conftest.$ac_ext < conftest.$ac_ext << EOF + +#line 712 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -686,18 +727,24 @@ ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:696: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:743: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:701: checking whether we are using GNU C" >&5 +echo "configure:748: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -706,7 +753,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:710: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:757: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -717,11 +764,15 @@ if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:725: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:776: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -736,20 +787,24 @@ fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:753: checking how to run the C preprocessor" >&5 +echo "configure:808: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -764,14 +819,14 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:829: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -781,14 +836,31 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:791: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:863: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -801,6 +873,8 @@ rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -816,28 +890,30 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:824: checking for a BSD compatible install" >&5 +echo "configure:899: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -867,10 +943,12 @@ # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:874: checking whether ln -s works" >&5 +echo "configure:952: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -891,7 +969,7 @@ fi echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:895: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:973: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -920,15 +998,16 @@ # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:924: checking for $ac_word" >&5 +echo "configure:1002: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" @@ -965,7 +1044,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:969: checking for X" >&5 +echo "configure:1048: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1027,13 +1106,13 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1036: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1115: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* # We can compile using X headers with no special include directory. @@ -1101,14 +1180,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1191: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -1214,17 +1293,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:1218: checking whether -R must be followed by a space" >&5 +echo "configure:1297: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -1240,14 +1319,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -1279,7 +1358,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:1283: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:1362: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1287,7 +1366,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1320,7 +1399,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:1324: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:1403: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1328,7 +1407,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1368,12 +1447,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:1372: checking for gethostbyname" >&5 +echo "configure:1451: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -1417,7 +1496,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:1421: checking for gethostbyname in -lnsl" >&5 +echo "configure:1500: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1425,7 +1504,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1466,12 +1545,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:1470: checking for connect" >&5 +echo "configure:1549: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -1515,7 +1594,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:1519: checking for connect in -lsocket" >&5 +echo "configure:1598: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1523,7 +1602,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1558,12 +1637,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:1562: checking for remove" >&5 +echo "configure:1641: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -1607,7 +1686,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:1611: checking for remove in -lposix" >&5 +echo "configure:1690: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1615,7 +1694,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1650,12 +1729,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:1654: checking for shmat" >&5 +echo "configure:1733: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -1699,7 +1778,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:1703: checking for shmat in -lipc" >&5 +echo "configure:1782: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1707,7 +1786,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1751,15 +1830,15 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:1755: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:1834: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lICE $LIBS" +LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1798,7 +1877,9 @@ { echo "configure: error: Can't find X, you need X!" 1>&2; exit 1; } else INCS="$INCS -I$x_includes" - LIBS="-L$x_libraries" + if test -n "$x_libraries"; then + LIBS="-L$x_libraries" + fi if test -n "$xpm_lib"; then LIBS="$LIBS -L$xpm_lib" @@ -1911,7 +1992,7 @@ echo $ac_n "checking for main in -lX11""... $ac_c" 1>&6 -echo "configure:1915: checking for main in -lX11" >&5 +echo "configure:1994: checking for main in -lX11" >&5 ac_lib_var=`echo X11'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1919,14 +2000,14 @@ ac_save_LIBS="$LIBS" LIBS="-lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2009: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1947,7 +2028,7 @@ fi echo $ac_n "checking for main in -lXmu""... $ac_c" 1>&6 -echo "configure:1951: checking for main in -lXmu" >&5 +echo "configure:2030: checking for main in -lXmu" >&5 ac_lib_var=`echo Xmu'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1955,14 +2036,14 @@ ac_save_LIBS="$LIBS" LIBS="-lXmu -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1983,7 +2064,7 @@ fi echo $ac_n "checking for main in -lXt""... $ac_c" 1>&6 -echo "configure:1987: checking for main in -lXt" >&5 +echo "configure:2066: checking for main in -lXt" >&5 ac_lib_var=`echo Xt'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1991,14 +2072,14 @@ ac_save_LIBS="$LIBS" LIBS="-lXt -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2019,7 +2100,7 @@ fi echo $ac_n "checking for main in -lXext""... $ac_c" 1>&6 -echo "configure:2023: checking for main in -lXext" >&5 +echo "configure:2102: checking for main in -lXext" >&5 ac_lib_var=`echo Xext'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2027,14 +2108,14 @@ ac_save_LIBS="$LIBS" LIBS="-lXext -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2117: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2055,7 +2136,7 @@ fi echo $ac_n "checking for main in -lXExExt""... $ac_c" 1>&6 -echo "configure:2059: checking for main in -lXExExt" >&5 +echo "configure:2138: checking for main in -lXExExt" >&5 ac_lib_var=`echo XExExt'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2063,14 +2144,14 @@ ac_save_LIBS="$LIBS" LIBS="-lXExExt -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2091,7 +2172,7 @@ fi echo $ac_n "checking for main in -lXpm""... $ac_c" 1>&6 -echo "configure:2095: checking for main in -lXpm" >&5 +echo "configure:2174: checking for main in -lXpm" >&5 ac_lib_var=`echo Xpm'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2099,14 +2180,14 @@ ac_save_LIBS="$LIBS" LIBS="-lXpm -lX11 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2129,12 +2210,12 @@ echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2133: checking for ANSI C header files" >&5 +echo "configure:2212: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2142,8 +2223,8 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2146: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes @@ -2159,7 +2240,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2177,7 +2258,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2198,7 +2279,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2209,7 +2290,7 @@ exit (0); } EOF -if { (eval echo configure:2213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2236,18 +2317,18 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2240: checking for $ac_hdr" >&5 +echo "configure:2319: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2329: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -2274,12 +2355,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2278: checking for working const" >&5 +echo "configure:2357: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2349,12 +2430,12 @@ fi echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 -echo "configure:2353: checking whether time.h and sys/time.h may both be included" >&5 +echo "configure:2432: checking whether time.h and sys/time.h may both be included" >&5 if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2363,7 +2444,7 @@ struct tm *tp; ; return 0; } EOF -if { (eval echo configure:2367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yes else @@ -2386,13 +2467,13 @@ if test $ac_cv_prog_gcc = yes; then echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6 -echo "configure:2390: checking whether ${CC-cc} needs -traditional" >&5 +echo "configure:2469: checking whether ${CC-cc} needs -traditional" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_pattern="Autoconf.*'x'" cat > conftest.$ac_ext < Autoconf TIOCGETP @@ -2410,7 +2491,7 @@ if test $ac_cv_prog_gcc_traditional = no; then cat > conftest.$ac_ext < Autoconf TCGETA @@ -2432,12 +2513,12 @@ fi echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:2436: checking return type of signal handlers" >&5 +echo "configure:2515: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2454,7 +2535,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:2458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -2475,12 +2556,12 @@ for ac_func in gettimeofday select random lrand48 do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2479: checking for $ac_func" >&5 +echo "configure:2558: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2551,7 +2632,7 @@ # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -2618,7 +2699,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2638,9 +2719,11 @@ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -2667,6 +2750,7 @@ s%@CC@%$CC%g s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@LN_S@%$LN_S%g s%@SET_MAKE@%$SET_MAKE%g --- xgalaga-2.0.34.orig/debian/xgalaga-icon.xpm +++ xgalaga-2.0.34/debian/xgalaga-icon.xpm @@ -0,0 +1,55 @@ +/* XPM */ +static char *xgalaga-icon[] = { +/* columns rows colors chars-per-pixel */ +"32 32 17 1", +" c None", +". c #191919", +"X c #00007F", +"o c #7F0000", +"O c #7F7F00", +"+ c #4C4C4C", +"@ c gray50", +"# c blue", +"$ c green", +"% c red", +"& c yellow", +"* c gray60", +"= c #B2B2B2", +"- c gray80", +"; c gray90", +": c gray100", +"> c None", +/* pixels */ +" O-O ", +" %o& ", +" : &O O ", +" ", +" $ ", +" ", +" ", +" .oO O ", +" &%OO. ", +" O;o ", +" OOo% ", +" .O O& . ", +" .o%o. ", +" oOO%o ", +" .%%XOO. ", +" oOo%o%o ", +" o;o. ", +" @ @;@ @ ", +" +;+ .@-@ +;+ . ", +" @;@ .@;* @;@ OO ", +" @;@@ @;@.@@-@ Oo%& ", +" @;@--=;===@;@ .O-O ", +" % @;=@@@-*@@=-@ %O%O ", +" @;@@+@-@+@@;@ &Oo ", +" @;@. *-* @-* ", +" +*+ +;+ +*+ ", +" X#X @ X#X ", +" X#X X#X ", +" X#X X#X ", +" XXX XXX ", +" ", +" " +}; --- xgalaga-2.0.34.orig/debian/postrm +++ xgalaga-2.0.34/debian/postrm @@ -0,0 +1,10 @@ +#!/bin/sh -e + +OLDSCOREFILE=/var/games/xgalaga_scores + +# Remove old high score file on purge. +if [ "$1" = "purge" ]; then + rm -f $OLDSCOREFILE +fi + +#DEBHELPER# --- xgalaga-2.0.34.orig/debian/xgalaga.desktop +++ xgalaga-2.0.34/debian/xgalaga.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=XGalaga +Comment=Play Galaga Game +Exec=xgalaga +Icon=xgalaga-icon.xpm +Terminal=false +Type=Application +Categories=Application;Game; --- xgalaga-2.0.34.orig/debian/menu +++ xgalaga-2.0.34/debian/menu @@ -0,0 +1,6 @@ +?package(xgalaga):needs="x11" section="Games/Arcade" title="Galaga" \ + command="/usr/games/xgalaga" \ + icon="/usr/share/pixmaps/xgalaga-icon.xpm" +?package(xgalaga):needs="x11" section="Games/Arcade" title="Galaga:Hyperspace" \ + command="/usr/games/xgalaga-hyperspace" \ + icon="/usr/share/pixmaps/xgalaga-icon.xpm" --- xgalaga-2.0.34.orig/debian/README.Debian +++ xgalaga-2.0.34/debian/README.Debian @@ -0,0 +1,7 @@ +The Debian xgalaga package is patched with joystick support. If you have a +joystick and a kernel that speaks a new enough version of the joystick API +(linux 2.2 or higher), then the joystick on /dev/js0 will be active when +the keyboard controls are active. + +Some other improvements in the Debian package include full screen support +and the xgalaga-hyperspace variant of the game. --- xgalaga-2.0.34.orig/debian/changelog +++ xgalaga-2.0.34/debian/changelog @@ -0,0 +1,431 @@ +xgalaga (2.0.34-41ubuntu1) feisty; urgency=low + + * Merge from Debian unstable, remaining Ubuntu changes: + - debian/rules: install desktop file + + -- Richard A. Johnson Thu, 23 Nov 2006 11:32:00 -0600 + +xgalaga (2.0.34-41) unstable; urgency=low + + * No change upload to get buildds to rebuild it now that + linux-kernel-headers is fixed. Closes: #389324 + + -- Joey Hess Tue, 3 Oct 2006 15:34:13 -0400 + +xgalaga (2.0.34-40) unstable; urgency=low + + * Fix a fencepost error in gecos name retreival code spotted by + Thue Janus Kristensen. Closes: #386718 + + -- Joey Hess Sat, 9 Sep 2006 17:54:15 -0400 + +xgalaga (2.0.34-39) unstable; urgency=low + + * Revert last change, this was a linux-kernel-headers bug. + + -- Joey Hess Thu, 7 Sep 2006 21:50:19 -0400 + +xgalaga (2.0.34-38) unstable; urgency=low + + * Include linux/types.h in linux-joystick.c to avoid a FTBFS when including + linux/joystick.h with the latest gcc. + + -- Joey Hess Thu, 7 Sep 2006 21:35:49 -0400 + +xgalaga (2.0.34-37ubuntu1) edgy; urgency=low + + * Merge from debian unstable: + - debian/rules: Merge Debian Sid's changes; still install desktop + file. + + -- Daniel T Chen Fri, 30 Jun 2006 20:00:35 +0100 + +xgalaga (2.0.34-37) unstable; urgency=low + + * Patch from Hans de Goede to make window size configurable at run time. + This includes fixes for the behavior in #369016 when running at + nonstandard window sizes, it also sets the default window size to 468x586 + again. + * Finally removed the old xgal compatability symlink to xgalaga. + + -- Joey Hess Wed, 31 May 2006 19:38:58 -0400 + +xgalaga (2.0.34-36) unstable; urgency=low + + * Set window size back to 400x500 which makes fullscreen not quite that but + avoids gameplay and display issues from changing the size. Closes: #369016 + + -- Joey Hess Fri, 26 May 2006 16:31:50 -0400 + +xgalaga (2.0.34-35) unstable; urgency=low + + * Patch from Hans de Goede of Fedora Extras to remove + all the build warnings. + * Patch from Hans de Goede to add fullscreen support. Note that full screen + mode is enabled by default. + * Update man page to document fullscreen support. + * Moved a lot of stuff to /usr/share. + + -- Joey Hess Wed, 24 May 2006 18:13:41 -0400 + +xgalaga (2.0.34-34) unstable; urgency=low + + * Fix FTBFS due to xorg transition causing $x_libraries not to be set. + Closes: #365160 + + -- Joey Hess Fri, 28 Apr 2006 13:42:47 -0400 + +xgalaga (2.0.34-33) unstable; urgency=low + + * Minor improvement to man page. Closes: #349647 + + -- Joey Hess Tue, 24 Jan 2006 13:03:39 -0500 + +xgalaga (2.0.34-32ubuntu1) dapper; urgency=low + + * Resynchronise with Debian: + - debian/control: Remove superfluous libdnet-dev build dependency + (from Ubuntu). + + -- Daniel T Chen Thu, 08 Dec 2005 20:08:29 +0000 + +xgalaga (2.0.34-32) unstable; urgency=low + + * Debhelper v5. + * Move away from xlibs-dev. + * Current policy. + + -- Joey Hess Wed, 30 Nov 2005 20:35:07 -0500 + +xgalaga (2.0.34-31ubuntu1) breezy; urgency=low + + * Update from Debian + * Add desktop files + * --x-libraries=/usr/lib to debian/rules + * Add build-dep for libdnet-dev + + -- Barry deFreese Fri, 7 Oct 2005 18:59:46 -0400 + +xgalaga (2.0.34-31) unstable; urgency=low + + * Build with -O2 not -O3 so it's debuggable. + * Add NO_GLOBAL_SCORES define that rips out all support for global score + file. The old global score file is not deleted until xgalaga is purged, + but it will not be used anymore. + * Remove insecure sgid bit. Closes: #319686 + + -- Joey Hess Sat, 23 Jul 2005 20:18:10 -0400 + +xgalaga (2.0.34-30) unstable; urgency=low + + * Patch from Andreas Jochens to support building with gcc 4. + Closes: #300374 + + -- Joey Hess Sat, 19 Mar 2005 11:47:18 -0500 + +xgalaga (2.0.34-29) unstable; urgency=low + + * Add support for building a xgalaga-hyperspace binary, + based on a patch by Paul Telford. Closes: #280975 + + -- Joey Hess Fri, 12 Nov 2004 18:02:02 -0500 + +xgalaga (2.0.34-28) unstable; urgency=low + + * Fix non-POSIX chown call in postinst. Closes: #236524 + * And one in the rules file. + * Quote all strings in menu file. + + -- Joey Hess Sat, 6 Mar 2004 12:44:45 -0900 + +xgalaga (2.0.34-27) unstable; urgency=low + + * Make the sound server deal with any buffer size the sound card returns. + Thanks to Chris Capoccia for helping to track this down. See #196979, + which is not all fixed, since larger buffer sizes make xgalagas sound + effects lose sync. + + -- Joey Hess Sun, 15 Jun 2003 19:09:43 -0400 + +xgalaga (2.0.34-26) unstable; urgency=low + + * Joystick patch fix for when two buttons are pressed and one released. + + -- Joey Hess Fri, 6 Jun 2003 16:24:14 -0400 + +xgalaga (2.0.34-25) unstable; urgency=low + + * Joystick support patch from Wouter Verhelst , also + sent upstream. Closes: #190241 + * Add README.Debian with info about the joystick patch. Also update man + page. + * Fixed icon to use Debian icon color map. + + -- Joey Hess Thu, 24 Apr 2003 12:28:24 -0400 + +xgalaga (2.0.34-24) unstable; urgency=low + + * Updated config.sub and config.guess so they know about + parisc64-unknown-linux-gnu host system type. Closes: #174786 + + -- Joey Hess Mon, 3 Feb 2003 14:06:53 -0500 + +xgalaga (2.0.34-23) unstable; urgency=medium + + * More paranioa: When writing the ~/.xgalscores, first drop the games gid + so the program opens the file with only the perms of the user who ran it, + to protect against numerous attacks (like setting HOME, or using a + symlink..) that let the caller trick xgalaga into overwriting any file + writable by group games. + + -- Joey Hess Sun, 29 Dec 2002 21:25:35 -0500 + +xgalaga (2.0.34-22) unstable; urgency=low + + * Passing xgalaga a huge HOME variable could crash it. Patch from Steve Kemp + to make it use snprintf. Closes: #174624 + + -- Joey Hess Sun, 29 Dec 2002 12:29:56 -0500 + +xgalaga (2.0.34-21) unstable; urgency=low + + * If a huge initial level was given, read_level() would recurse backwards + looking for a real level. After a few hundred recusions, it would overflow + the stack of course. I don't think this is exploitable, but I have changed + it to use a loop looking backward for the level so there is no stack + overflow. It will still take a _very_ long time to start from level + 11111111111 or so. Closes: #154291 + + -- Joey Hess Thu, 25 Jul 2002 17:50:53 -0400 + +xgalaga (2.0.34-20) unstable; urgency=low + + * Debhelper v4. + * Fixed man page section. + + -- Joey Hess Thu, 13 Jun 2002 17:25:54 -0400 + +xgalaga (2.0.34-19) unstable; urgency=low + + * make k a signed char in xgal.sndsrv.linux.c; chars do not default to + signed on all arches. + + -- Joey Hess Fri, 28 Dec 2001 23:07:07 -0500 + +xgalaga (2.0.34-18) unstable; urgency=low + + * Makefile.in: if there is no sound server, don't try to install one. + For the Hurd. Closes: #107995 + + -- Joey Hess Wed, 8 Aug 2001 15:28:25 -0400 + +xgalaga (2.0.34-17) unstable; urgency=low + + * printf is a macro in gcc 3.0, which broke an internally #ifdef'd printf + (sigh). Patched. + * Updated config.* files for PARISC, Closes: #97379 + + -- Joey Hess Mon, 14 May 2001 15:36:05 -0400 + +xgalaga (2.0.34-16) unstable; urgency=low + + * Fixed three bugs relating to pausing the program, patch from + Rune Broberg , Closes: #89254 + Also sent upstream. + * (This upload slightly delayed by accident.) + + -- Joey Hess Sun, 11 Mar 2001 15:21:18 -0800 + +xgalaga (2.0.34-15) unstable; urgency=low + + * No changes, Closes: #92689 (which I long ago fixed in CVS, but didn't + consider RC..) + + -- Joey Hess Tue, 3 Apr 2001 13:30:03 -0700 + +xgalaga (2.0.34-14) unstable; urgency=low + + * statoverride transition + + -- Joey Hess Wed, 10 Jan 2001 15:09:20 -0800 + +xgalaga (2.0.34-13) unstable; urgency=low + + * Added a menu icon, Closes: #75767 + * The icon is by Robert Cleaver Ancell , and is GPL. + + -- Joey Hess Fri, 5 Jan 2001 17:38:18 -0800 + +xgalaga (2.0.34-12) unstable; urgency=low + + * Made -nosound mode not try to open the sound device. Closes: #78734 + Fix sent upstream. + + -- Joey Hess Thu, 4 Jan 2001 16:08:40 -0800 + +xgalaga (2.0.34-11) unstable; urgency=low + + * Updated to fhs /var/games. + * Remove score file on purge. + + -- Joey Hess Sun, 5 Nov 2000 23:05:39 -0800 + +xgalaga (2.0.34-10) unstable; urgency=low + + * Build deps. + + -- Joey Hess Sat, 4 Dec 1999 18:24:58 -0800 + +xgalaga (2.0.34-9) unstable; urgency=low + + * README, debian/copyright, title.c: Home page change, Closes: #51569 + * debian/changelog, debian/control: removed 'master' + * libsprite/data.c, libsprite/data.h, libsprite/defs.h, libsprite/init.c: + Patch from Kevin Ryde to fix the numlock problem. + Closes: #50903 + + -- Joey Hess Mon, 29 Nov 1999 15:03:32 -0800 + +xgalaga (2.0.34-8) unstable; urgency=low + + * Patch from Kevin Ryde , to improve smoothness and + speed in xgalaga, especially on slower video cards. + + -- Joey Hess Tue, 5 Oct 1999 12:34:03 -0700 + +xgalaga (2.0.34-7) unstable; urgency=low + + * FHS + + -- Joey Hess Mon, 6 Sep 1999 18:41:48 -0700 + +xgalaga (2.0.34-6) unstable; urgency=low + + * Modified the sound server to just exit if there is no sound support. + xgalaga seems to handle this ok now, without crashing as it used to. The + sound server was sleeping and blocking the SIGTERM signal that was supposed + to kill it, resulting in it not quitting when the game quit. (#37165) + + -- Joey Hess Tue, 4 May 1999 16:26:32 -0700 + +xgalaga (2.0.34-5) unstable; urgency=low + + * Actually xgalaga doesn't accept -f at all so removed it from man page. + + -- Joey Hess Mon, 28 Dec 1998 19:42:18 -0800 + +xgalaga (2.0.34-4) unstable; urgency=low + + * xgal.6x: no they arn't fishes, they are enemy spaceships. (#31203) + + -- Joey Hess Sun, 27 Dec 1998 23:20:57 -0500 + +xgalaga (2.0.34-3) unstable; urgency=low + + * glibc 2.1 strdup fix. (#29542). + + -- Joey Hess Mon, 16 Nov 1998 12:12:07 -0800 + +xgalaga (2.0.34-2) unstable; urgency=low + + * Rebuilt with latest debhelper to change how sgid binary is registered. + + -- Joey Hess Tue, 27 Oct 1998 22:29:42 -0800 + +xgalaga (2.0.34-1) unstable; urgency=low + + * New upstream release. + + -- Joey Hess Mon, 11 May 1998 08:16:08 -0700 + +xgalaga (2.0-1) unstable; urgency=low + + * New upstream release. + - fixes bug #11296, now works on systems w/o sound support. + * Covered by the GPL now, it is now free! + + -- Joey Hess Thu, 30 Apr 1998 00:32:39 -0700 + +xgalaga (1.6c-11) unstable; urgency=low + + * Moved xgal.sndsrv.linux to /usr/lib/games/xgalaga/, so I don't need to + write a man page for it. + * Moved xgalaga to /usr/games, and it's man page to /usr/man/man6. + + -- Joey Hess Sat, 21 Feb 1998 23:13:30 -0800 + +xgalaga (1.6c-10) unstable; urgency=low + + * Rebuilt with debhelper 0.60 to fix mode 444 files. + * Updated standards-version. + + -- Joey Hess Mon, 9 Feb 1998 13:08:56 -0800 + +xgalaga (1.6c-9) unstable; urgency=low + + * Use debhelper. + + -- Joey Hess Sat, 7 Feb 1998 20:26:30 -0800 + +xgalaga (1.6c-8) unstable; urgency=low + + * Rebuilt to use xpm4g (#12942). + + -- Joey Hess Sun, 14 Sep 1997 20:12:17 -0400 + +xgalaga (1.6c-7) unstable; urgency=low + + * New maintainer. + * Changed it to use my generic debian/rules file. + * Changed the description. + * Updated url to home page in copyright file, and trimmed out some other + non-copyright info from that file (same info was duplicated in the + README). Added libsprite copyright info. Updated author's mailing + address. + * Got rid of shlibs.local. + * Added a menu file. + + -- Joey Hess Tue, 9 Sep 1997 15:31:17 -0400 + +xgalaga (1.6c-6) non-free; urgency=low + + * Rebuilt with libc6. + * Orphaned the package. + * Cosmetic change (fix bug #9675). + + -- Vincent Renardias Fri, 9 May 1997 14:41:58 +0200 + +xgalaga (1.6c-5) non-free; urgency=low + + * Fixed problem with soundfiles (Bug #6991). + * Removed empty directory /var/lib/games (Bug #6992). + * Changed some src code to get rid of compilation warnings. + + -- Vincent Renardias Sat, 1 Feb 1997 18:01:05 +0100 + +xgalaga (1.6c-4) non-free; urgency=low + + * Wrote manpage (Corrects Bug #5593) + + -- Vincent Renardias Tue, 17 Dec 1996 23:19:13 +0100 + +xgalaga (1.6c-3) non-free; urgency=low + + * Changed location and mode of scorefile (Bug #5876) + + -- Vincent Renardias Tue, 10 Dec 1996 23:33:33 +0100 + +xgalaga (1.6c-2) non-free; urgency=low + + * Maintainer changed + * No man page: added link to undocumented.7 + * Tuned compile options + + -- Vincent Renardias Sat, 19 Oct 1996 04:49:33 +0200 + +xgalaga (1.6c-1) non-free; urgency=low + + * Initial Release + + -- Christoph Lameter Thu, 01 Sep 1996 15:37:25 +0100 + --- xgalaga-2.0.34.orig/debian/compat +++ xgalaga-2.0.34/debian/compat @@ -0,0 +1 @@ +4 --- xgalaga-2.0.34.orig/debian/control +++ xgalaga-2.0.34/debian/control @@ -0,0 +1,15 @@ +Source: xgalaga +Section: games +Priority: optional +Build-Depends: debhelper (>= 5), libx11-dev, libxmu-dev, libxpm-dev, x-dev, dpkg-dev (>= 1.9.0), libxxf86vm-dev, libxxf86dga-dev +Maintainer: Joey Hess +Standards-Version: 3.7.2 + +Package: xgalaga +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Conflicts: suidmanager (<< 0.50) +Description: X11 version of the famous Galaga game + A clone of the classic game Galaga for the X Window System. + Xgalaga is a space-invader like game with additional features to produce + a more interesting game. --- xgalaga-2.0.34.orig/debian/copyright +++ xgalaga-2.0.34/debian/copyright @@ -0,0 +1,21 @@ +This is a Debian prepackaged version of the xgalaga video game. + +The source to this package can be found on the xgalaga home page, +http://rumsey.org/xgal.html, or at ftp://ftp.netcom.com/pub/og/ogre/games/ + +Xgalaga is Copyright (c) 1995 Joe Rumsey + +Xgalaga is licensed under the GNU Public License GPL. On Debian systems the +complete text of the GPL is in /usr/share/common-licenses/GPL + +Xgalaga contains the libsprite library, with the following copyright: + +/* + Copyright 1989 Kevin P. Smith + Scott Silvey + +Permission to use, copy, modify, and distribute this +software and its documentation for any purpose and without +fee is hereby granted, provided that the above copyright +notice appear in all copies. +*/ --- xgalaga-2.0.34.orig/debian/rules +++ xgalaga-2.0.34/debian/rules @@ -0,0 +1,57 @@ +#!/usr/bin/make -f + +export CFLAGS=-O2 -g -DXF86VIDMODE +export LDFLAGS=-lXxf86vm + +build: build-stamp +build-stamp: + dh_testdir + ./configure \ + --prefix=/usr/share/games/xgalaga \ + --exec-prefix=/usr/games + $(MAKE) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + -$(MAKE) -i distclean + dh_clean xgal.sndsrv.linux config.k.bak + +binary-indep: build + +binary-arch: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs var/games usr/lib/games/xgalaga usr/games usr/share/man/man6 + $(MAKE) DESTDIR=`pwd`/debian/xgalaga install + install -m0644 xgal.6x debian/xgalaga/usr/share/man/man6/xgalaga.6x + # move the sound-server binary out of usr/share + mv debian/xgalaga/usr/share/games/xgalaga/xgal.sndsrv.linux \ + debian/xgalaga/usr/lib/games/xgalaga + dh_link usr/lib/games/xgalaga/xgal.sndsrv.linux \ + usr/share/games/xgalaga/xgal.sndsrv.linux + dh_install xgalaga-icon.xpm usr/share/pixmaps/ + install -D -m 644 $(CURDIR)/debian/xgalaga.desktop $(CURDIR)/debian/xgalaga/usr/share/applications/xgalaga.desktop + install -D -m 644 $(CURDIR)/debian/xgalaga-hyperspace.desktop $(CURDIR)/debian/xgalaga/usr/share/applications/xgalaga-hyperspace.desktop + dh_installman + dh_link usr/share/man/man6/xgalaga.6x usr/share/man/man6/xgalaga-hyperspace.6x + dh_installdocs README* libsprite/README.libsprite + dh_installexamples + dh_installmenu + dh_installchangelogs CHANGES + dh_strip + dh_compress + chmod 644 debian/xgalaga/usr/share/games/xgalaga/levels/* \ + debian/xgalaga/usr/share/games/xgalaga/sounds/* + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary --- xgalaga-2.0.34.orig/debian/xgalaga-hyperspace.desktop +++ xgalaga-2.0.34/debian/xgalaga-hyperspace.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=XGalaga-Hyperspace +Comment=Play Galaga Game +Exec=xgalaga-hyperspace +Icon=xgalaga-icon.xpm +Terminal=false +Type=Application +Categories=Application;Game; --- xgalaga-2.0.34.orig/linux-joystick.c +++ xgalaga-2.0.34/linux-joystick.c @@ -0,0 +1,83 @@ +/* + * Support for joysticks under Linux + * + * Wouter Verhelst , 2003 + * + * Distribute under the terms of the GPL. + */ +#ifdef __linux__ +#include +#include +#include +#include +#include +#include +#include +#include +#include "data.h" +#include "struct.h" +#include "defs.h" + +struct js_state js_curstate; +int js_device; + +/* make struct js_state be up-to-date */ +void update_curstate() { + struct js_event event; + int npval; + + while(read(js_device,&event,sizeof(struct js_event))>0) { + npval=event.type&JS_EVENT_INIT?0:-1; + event.type &= ~JS_EVENT_INIT; + if(event.type==JS_EVENT_BUTTON) { + js_curstate.but+=event.value?1:npval; + } else if(event.type==JS_EVENT_AXIS) { + if(event.number%2==0) { + js_curstate.dir=event.value; + } + } + } + if (errno !=EAGAIN) { + perror("reading joystick device"); + return; + } +} + +/* + * Initialize the joystick device + */ +void init_joystick() { + int ioc=0; + js_device = open("/dev/js0",O_RDONLY|O_NONBLOCK); + if(js_device<0) { +// perror("open(/dev/js0)"); + close(js_device); + js_device=0; + } + else if(ioctl(js_device,JSIOCGVERSION,&ioc)==-1) { + /* Driver too old */ + fprintf(stderr,"Can't read joystick: driver too old\n"); + close(js_device); + js_device=0; + } + else { + update_curstate(); + } +} + +void do_joystick(int* x, int* y, int* but) { + if (js_device>0 && !mouseControl) { + update_curstate(); + *but=(js_curstate.but?W_LBUTTON:0); + if(*but && gameOver) { + gameOver=0; + } + if (js_curstate.dir>0 && !mouseControl) + *x = WINWIDTH; + else if(js_curstate.dir<0) + *x = 0; + else + *x=plx; + } +} +#endif /* __linux__ */ --- xgalaga-2.0.34.orig/frate.c +++ xgalaga-2.0.34/frate.c @@ -0,0 +1,205 @@ +/* frate.c -- Frame rate code. */ + +#include "config.h" + +#include +#include +#include +#ifdef HAVE_SYS_TIME_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif + +#include "defs.h" + + +#define FPS 30 + + +/*****************************************************************************/ +#if defined(linux) + +/* ITIMER_REAL is used for the time base, in a "one-shot" mode. SIGALRM is + generated when it expires, but this signal is held blocked. sigsuspend() + waits for SIGALRM to go off, or lets it go immediately if it's already + pending. Then a new ITIMER_REAL is started. If for any reason the main + loop takes longer than the desired time, no catch-ups are attempted, + further loops just run normal times. + + The time desired for each loop varies. A normal kernel runs the clock at + 10 milliseconds, so to get 30 frames per second loops are run in the + pattern 30, 30, 40 milliseconds for an average 33.3ms. The pattern is + generated based on sysconf(_SC_CLK_TCK) and FPS, and it should work for + any values of those settings. Essentially, CLK_TCK ticks per second are + divided up into FPS many buckets, as evenly as possible. + + Linux ITIMER_REAL does the traditional Unix timing thing which is to + round up the requested delay to get clock ticks, and add this to the + current tick. For example if "jiffies" tick is 12345 and an interval of + 35ms is requested the interval is converted to 4 ticks and the alarm goes + off when jiffies tick 12349 is reached. This pays no attention to how + much of the current tick has elapsed when the request is made. + + select(), poll(), usleep() and nanosleep() do it differently, they don't + start counting time until the end of the current tick (by adding one tick + to the requested time). See /usr/src/linux/kernel/sched.c + sys_nanosleep() where it adds "(t.tv_sec || t.tv_nsec)". In the example + the alarm would go off at jiffies tick 12350. As far as I can tell it's + impossible for those functions to do a delay that goes only to the next + tick boundary, and because that could well be wanted on a slowish system, + ITIMER_REAL is used instead. + + An alternative to the code here, for x86 PCs at least, would be /dev/rtc, + which can be set to give high resolution timer interrupts that can be + counted and blocked on (with read()). See + /usr/src/linux/Documentation/rtc.txt. + + */ + +static struct itimerval table[FPS]; +static int upto = 0; +static sigset_t alrmonly; + + +static void sigalrm(int signum) +{ +} + +void init_framerate(void) +{ + /* create table[] times */ + { + long clktck, period, quot, rem, r, t; + int i; + + clktck = sysconf (_SC_CLK_TCK); + if (clktck == -1) + { + perror ("sysconf _SC_CLK_TCK"); + exit (1); + } + period = 1000000 / clktck; + + quot = clktck / FPS; + rem = clktck % FPS; + r = 0; + for (i = 0; i < FPS; i++) + { + t = quot; + r += rem; + if (r >= FPS) + { + t++; + r -= FPS; + } + + /* The actual tv_usec set up is just under "t" ticks because the + kernel will round up the requested value. */ + table[i].it_value.tv_usec = t*period - period/2; + + /* printf ("table[%d] = %ld\n", i, table[i].it_value.tv_usec); */ + } + } + + /* make SIGALRM blocked */ + { + sigset_t set; + sigemptyset (&set); + sigaddset (&set, SIGALRM); + sigprocmask (SIG_BLOCK, &set, NULL); + } + + /* install dummy SIGALRM handler */ + { + struct sigaction act; + act.sa_handler = sigalrm; + sigemptyset (&act.sa_mask); + act.sa_flags = SA_RESTART; + sigaction (SIGALRM, &act, NULL); + } + + /* sigset with only SIGALRM unmasked */ + sigfillset (&alrmonly); + sigdelset (&alrmonly, SIGALRM); + + /* start initial timer */ + setitimer (ITIMER_REAL, &table[0], NULL); +} + +void do_framerate(void) +{ + /* wait for SIGALRM */ + sigsuspend (&alrmonly); + + /* new timer */ + setitimer (ITIMER_REAL, &table[upto], NULL); + if (++upto >= FPS) + upto = 0; + + /* Enable this code to print how long each loop is taking. Redirect + output to a file so results aren't affected by the time taken to draw + the screen. First print is bogus because "t" starts out zero. */ +#if 0 + { + static struct timeval t; + struct timeval n; + long d; + gettimeofday (&n, NULL); + d = 1000000*(n.tv_sec-t.tv_sec) + n.tv_usec-t.tv_usec; + t = n; + + printf ("%ld\n", d); + /* if (d < 29000 || d > 41000) printf ("BAD %ld\n", d); */ + } +#endif +} + + +/*****************************************************************************/ +#else /* !defined(linux) */ + +/* Old code, using select(). */ + + +static struct timeval otv; + +void init_framerate(void) +{ + gettimeofday(&otv, 0); +} + +void do_framerate(void) +{ + static struct timeval ut; + struct timeval tv; + + gettimeofday(&tv, 0); + ut.tv_usec = UTIMER + - (1000000 * (tv.tv_sec - otv.tv_sec) + (tv.tv_usec - otv.tv_usec)); + + /* Checking u<2*UTIMER guards against a hang if the system time changes. */ + if (ut.tv_usec > 0 && ut.tv_usec < 2*UTIMER) + (void) select (0, 0, 0, 0, &ut); + + gettimeofday(&otv, 0); + + /* Enable this code to print how long each loop is taking. Redirect + output to a file so results aren't affected by the time taken to draw + the screen. First print is bogus because "t" starts out zero. */ +#if 0 + { + static struct timeval t; + struct timeval n; + long d; + gettimeofday (&n, 0); + d = 1000000*(n.tv_sec-t.tv_sec) + n.tv_usec-t.tv_usec; + t = n; + + printf ("%ld\n", d); + } +#endif +} + +#endif --- xgalaga-2.0.34.orig/xgal.6x +++ xgalaga-2.0.34/xgal.6x @@ -0,0 +1,91 @@ +.TH XGALAGA 6x "23 April 2003" "2.0.34" +.SH NAME +xgalaga \- X11 version of the famous Galaga game +.SH SYNOPSIS +.B xgalaga +[-scores] [-display display] [-mouse] [-keyboard] [-nosound] [-b] +[-window] [-winsize widthxheight] [-b] [-noclipmask] [-nouseor] [-nostars] +.P +.B xgalaga-hyperspace +[-scores] [-display display] [-mouse] [-keyboard] [-nosound] [-b] +[-window] [-winsize widthxheight] [-b] [-noclipmask] [-nouseor] [-nostars] +.SH INSTRUCTIONS +.LP +It's Galaga, you know how to play Galaga, stop bothering me. +(Ship follows the mouse, button fires. Auto-fire by holding it +down, so no-one accuses me of breaking their mouse!) +.P +The xgalaga-hyperspace version features some new weapons and different +gameplay. +.SH OPTIONS +.TP 8 +.B \-scores +Prints out the high score file and exits +.TP 8 +.B \-display \fIhost:dpy\fP +Set your display +.TP 8 +.B \-mouse +Use mouse control (same as 'm'). +.TP 8 +.B \-keyboard +Use keyboard control (same as 'k'). +If you have a joystick it can also be used if you select keyboard control. +.TP 8 +.B \-nosound +Turn sound OFF +.TP 8 +.B \-level \fIlvl\fP +Choose starting level (>= 1) +.TP 8 +.B \-window +Run in a window, not full screen. Full screen is the default. +.TP 8 +.B \-winsize \fIwidthxheight\fP +Set windowsize, default 468x596. +.TP 8 +.B \-b +Turn buffered mode off, use this if it runs too slowly. Will cause +flicker, maybe lots, maybe only a little. +.TP 8 +.B \-noclipmask +Don't use clip masks for drawing (affects unbuffered mode only). +.TP 8 +.B \-nouseor +Don't draw using OR mode. +.TP 8 +.B \-nostars +Don't draw stars in the background. +.P +Combinations of the last four options can be used to get faster +drawing if the video card can't keep up with the required 30 +frames/sec. The fastest drawing will come from +.IP +xgalaga -b -noclipmask -nouseor -nostars +.SH KEYBOARD COMMANDS +.TP 8 +p - pauses +.TP 8 +q - end this game +.TP 8 +b - Toggle buffering (flicker vs. speed.) +.TP 8 +o - Toggle OR mode. Don't use this, it sucks. +.TP 8 +m - Use mouse control. Note that you may switch in mid-game. +.TP 8 +k - Use keyboard control +.TP 8 +x - use your shields (xgalaga-hyperspace only) +.TP 8 +alt-enter - Toggle full screen node. +.SH "SEE ALSO" +Xgalaga home page +.RI < http://rumsey.org/xgal.html > +.SH AUTHORS +Joe Rumsey, <\fIjoe@rumsey.org\fP> (Original author) +.LP +Vincent Renardias <\fIvincent@waw.com\fP> (man page) +.LP +Send bugs (or their reports, or fixes) here: +.RI < http://www.debian.org/Bugs/ >. --- xgalaga-2.0.34.orig/xgalaga-icon.xpm +++ xgalaga-2.0.34/xgalaga-icon.xpm @@ -0,0 +1,55 @@ +/* XPM */ +static char *xgalaga-icon[] = { +/* columns rows colors chars-per-pixel */ +"32 32 17 1", +" c None", +". c #191919", +"X c #00007F", +"o c #7F0000", +"O c #7F7F00", +"+ c #4C4C4C", +"@ c gray50", +"# c blue", +"$ c green", +"% c red", +"& c yellow", +"* c gray60", +"= c #B2B2B2", +"- c gray80", +"; c gray90", +": c gray100", +"> c None", +/* pixels */ +" O-O ", +" %o& ", +" : &O O ", +" ", +" $ ", +" ", +" ", +" .oO O ", +" &%OO. ", +" O;o ", +" OOo% ", +" .O O& . ", +" .o%o. ", +" oOO%o ", +" .%%XOO. ", +" oOo%o%o ", +" o;o. ", +" @ @;@ @ ", +" +;+ .@-@ +;+ . ", +" @;@ .@;* @;@ OO ", +" @;@@ @;@.@@-@ Oo%& ", +" @;@--=;===@;@ .O-O ", +" % @;=@@@-*@@=-@ %O%O ", +" @;@@+@-@+@@;@ &Oo ", +" @;@. *-* @-* ", +" +*+ +;+ +*+ ", +" X#X @ X#X ", +" X#X X#X ", +" X#X X#X ", +" XXX XXX ", +" ", +" " +};