http://www.tienza.es/crux/src/www.jwz.org/xscreensaver/xscreensaver-5.05.tar.gz
authorZygo Blaxell <zblaxell@hungrycats.org>
Mon, 2 Mar 2009 05:43:49 +0000 (00:43 -0500)
committerZygo Blaxell <zblaxell@faye.furryterror.org>
Fri, 8 Feb 2013 17:54:47 +0000 (12:54 -0500)
-rw-r--r-- 1 zblaxell zblaxell 5468293 Mar  2  2008 xscreensaver-5.05.tar.gz
6f23422b17dd8a06cdaf419fd16d398eee50601b  xscreensaver-5.05.tar.gz

147 files changed:
Makefile.in
OSX/._XScreenSaver.icns [deleted file]
OSX/._bindist-DS_Store [deleted file]
OSX/Makefile
OSX/SaverTester.plist
OSX/XScreenSaver.plist
OSX/XScreenSaverConfigSheet.m
OSX/XScreenSaverView.m
OSX/bindist.rtf
OSX/jwxyz.h
OSX/jwxyz.m
OSX/update-info-plist.pl
README
config.guess
config.h.in
config.sub
configure
configure.in
driver/Makefile.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/demo-Gtk.c
driver/lock.c
driver/passwd-pam.c
driver/passwd.c
driver/screensaver-properties.desktop.in
driver/subprocs.c
driver/test-passwd.c
driver/timers.c
driver/windows.c
driver/xscreensaver-command.c
driver/xscreensaver-getimage-desktop
driver/xscreensaver-getimage-file
driver/xscreensaver-getimage-video
driver/xscreensaver-text
driver/xscreensaver.c
hacks/Makefile.in
hacks/apple2-main.c
hacks/asm6502.c
hacks/asm6502.h
hacks/boxfit.c
hacks/compile_axp.com
hacks/compile_decc.com
hacks/config/README
hacks/config/boxed.xml
hacks/config/cubicgrid.xml [new file with mode: 0644]
hacks/config/glcells.xml
hacks/config/hypnowheel.xml [new file with mode: 0644]
hacks/config/kaleidescope.xml
hacks/config/lcdscrub.xml [new file with mode: 0644]
hacks/flag.c
hacks/glx/Makefile.in
hacks/glx/antinspect.c
hacks/glx/antspotlight.c
hacks/glx/boing.c
hacks/glx/bouncingcow.c
hacks/glx/boxed.c
hacks/glx/carousel.c
hacks/glx/cubenetic.c
hacks/glx/cubestorm.c
hacks/glx/cubicgrid.c [new file with mode: 0644]
hacks/glx/cubicgrid.man [new file with mode: 0644]
hacks/glx/dangerball.c
hacks/glx/dnalogo.c
hacks/glx/endgame.c
hacks/glx/engine.c
hacks/glx/extrusion.c
hacks/glx/flipflop.c
hacks/glx/flipscreen3d.c
hacks/glx/flyingtoasters.c
hacks/glx/gears.c
hacks/glx/gflux.c
hacks/glx/glblur.c
hacks/glx/glforestfire.c
hacks/glx/glhanoi.c
hacks/glx/glhanoi.man
hacks/glx/glknots.c
hacks/glx/glplanet.c
hacks/glx/glslideshow.c
hacks/glx/gltext.c
hacks/glx/gltrackball.c
hacks/glx/gltrackball.h
hacks/glx/glxfonts.c
hacks/glx/grab-ximage.c
hacks/glx/hypnowheel.c [new file with mode: 0644]
hacks/glx/hypnowheel.man [new file with mode: 0644]
hacks/glx/jigglypuff.c
hacks/glx/juggler3d.c
hacks/glx/klein.c
hacks/glx/lament.c
hacks/glx/lavalite.c
hacks/glx/lockward.c
hacks/glx/menger.c
hacks/glx/moebius.c
hacks/glx/moebiusgears.c
hacks/glx/molecule.c
hacks/glx/noof.c
hacks/glx/pinion.c
hacks/glx/polyhedra-gl.c
hacks/glx/queens.c
hacks/glx/sballs.c
hacks/glx/sierpinski3d.c
hacks/glx/spheremonics.c
hacks/glx/stonerview.c
hacks/glx/timetunnel.c
hacks/glx/topblock.c
hacks/images/m6502/breakout.asm [new file with mode: 0644]
hacks/images/m6502/byterun.asm [new file with mode: 0644]
hacks/images/m6502/cellular-30.asm [new file with mode: 0644]
hacks/images/m6502/cellular-600.asm [new file with mode: 0644]
hacks/images/m6502/crunch6502.asm [new file with mode: 0644]
hacks/images/m6502/demoscene.asm [new file with mode: 0644]
hacks/images/m6502/dmsc.asm [new file with mode: 0644]
hacks/images/m6502/dragon-fractal.asm [new file with mode: 0644]
hacks/images/m6502/fullscreenlogo.asm [new file with mode: 0644]
hacks/images/m6502/keftal.asm [new file with mode: 0644]
hacks/images/m6502/matrix.asm [new file with mode: 0644]
hacks/images/m6502/noise.asm [new file with mode: 0644]
hacks/images/m6502/random-walk.asm [new file with mode: 0644]
hacks/images/m6502/random.asm [new file with mode: 0644]
hacks/images/m6502/random2.asm [new file with mode: 0644]
hacks/images/m6502/rorschach.asm [new file with mode: 0644]
hacks/images/m6502/santa.asm [new file with mode: 0644]
hacks/images/m6502/selfmodify.asm [new file with mode: 0644]
hacks/images/m6502/sierpinsky.asm [new file with mode: 0644]
hacks/images/m6502/spacer.asm [new file with mode: 0644]
hacks/images/m6502/wave6502.asm [new file with mode: 0644]
hacks/images/m6502/zookeeper.asm [new file with mode: 0644]
hacks/imsmap.c
hacks/juggle.c
hacks/lcdscrub [new file with mode: 0755]
hacks/lcdscrub.c [new file with mode: 0644]
hacks/m6502.c
hacks/m6502.sh [new file with mode: 0755]
hacks/memscroller.c
hacks/phosphor.c
hacks/screenhack.c
hacks/screenhackI.h
hacks/webcollage-helper-cocoa.m
hacks/xmatrix.c
po/POTFILES.in
setup.com
utils/fade.c
utils/grabclient.c
utils/version.h
xscreensaver.spec
xscreensaver.xcodeproj/project.pbxproj

index 8f74c1f20622b4c5d73c91409f8f88195531cdb8..99b6f4a257bb5abef0f2deb39794dd6ab717bc7c 100644 (file)
@@ -121,6 +121,8 @@ configure::
                                                                             \
                s@mandir=.\$${prefix}/man.@mandir=\\\$${datadir}/man@;       \
                                                                             \
+               s@rm -f conftest@rm -rf conftest@g;                          \
+                                                                            \
                print;'                                                      \
        < configure                                                          \
        > $$TMP &&                                                           \
diff --git a/OSX/._XScreenSaver.icns b/OSX/._XScreenSaver.icns
deleted file mode 100644 (file)
index 4ec02b2..0000000
Binary files a/OSX/._XScreenSaver.icns and /dev/null differ
diff --git a/OSX/._bindist-DS_Store b/OSX/._bindist-DS_Store
deleted file mode 100644 (file)
index 309d902..0000000
Binary files a/OSX/._bindist-DS_Store and /dev/null differ
index 3f847f0575569c768540f2571f68b6ad11064adc..1a222c711ecfa58772a7a91c055b51fe040aa1a8 100644 (file)
@@ -17,17 +17,40 @@ distclean:
 
 distdepend:: update_plist_version
 
-debug:
+debug: distdepend
        cd ..; xcodebuild -target $(XCODE_TARGET) -configuration Debug   build
 
-release::
+release:: distdepend
        cd ..; xcodebuild -target $(XCODE_TARGET) -configuration Release build
 
+release:: check_versions
+
 release:: sign
 
 sign:
        codesign -vfs 'Jamie Zawinski' build/Release/*.saver
 
+check_versions:
+       @\
+  SRC=../utils/version.h ;                                             \
+  V=`sed -n 's/[^0-9]*\([0-9]\.[0-9][^. ]*\).*/\1/p' $$SRC` ;          \
+  DIR=build/Release ;                                                  \
+  RESULT=0 ;                                                           \
+  for S in $$DIR/*.saver ; do                                          \
+   for P in $$S/Contents/Info.plist ; do                               \
+     V2=`perl -0000 -n -e                                              \
+       'm@<key>CFBundleVersion</key>\s*<string>(.*?)</string>@si       \
+        && print $$1' < $$P` ;                                         \
+     if [ "$$V2" != "$$V" ] ; then                                     \
+       echo "Wrong version: $$S ($$V2)" ;                              \
+       RESULT=1 ;                                                      \
+     fi ;                                                              \
+   done ;                                                              \
+  done ;                                                               \
+  if [ "$$RESULT" = 0 ]; then echo "Versions match ($$V2)" ; fi ;      \
+  exit $$RESULT
+
+
 echo_tarfiles:
        @echo `find . \
          \( \( -name '.??*' -o -name build -o -name CVS -o -name '*~*' \
@@ -58,7 +81,7 @@ update_plist_version:
   rm $$T
 
 # -format UDBZ saves 4% (~1.2 MB) over UDZO.
-dmg::
+dmg:: distdepend check_versions
        @                                                                     \
   set -e ;                                                                   \
   SRC=../utils/version.h ;                                                   \
index cba2d95cc8167bb825796cd52789e27a7d3a74fa..e5d26f4923b4f653d8e2736b803eff41e88876ab 100644 (file)
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>5.04</string>
+       <string>5.05</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>5.04</string>
+       <string>5.05</string>
        <key>LSMinimumSystemVersion</key>
        <string>10.4.0</string>
        <key>NSMainNibFile</key>
index 1d327d77a272aecab0a1826abc7c1bf555240464..7e319f208f8361cea8460feb12cd1274c37ff2d7 100644 (file)
        <key>CFBundlePackageType</key>
        <string>BNDL</string>
        <key>CFBundleShortVersionString</key>
-       <string>5.04</string>
+       <string>5.05</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>5.04</string>
+       <string>5.05</string>
        <key>LSMinimumSystemVersion</key>
        <string>10.4.0</string>
        <key>NSMainNibFile</key>
index e1e1e78101c8e7d75a8ef29f2e65850eaffdefa3..9601eac42c1706c12aa63e1a9652d192c58b3ab6 100644 (file)
@@ -1052,15 +1052,14 @@ hreffify (NSText *nstext)
   }
 }
 
-/* Makes the first word of the text be bold.
+/* Makes the text up to the first comma be bold.
  */
 static void
 boldify (NSText *nstext)
 {
   NSString *text = [nstext string];
-  NSRange r = [text rangeOfCharacterFromSet:
-                      [NSCharacterSet whitespaceCharacterSet]];
-  r.length = r.location;
+  NSRange r = [text rangeOfString:@"," options:0];
+  r.length = r.location+1;
   r.location = 0;
 
   NSFont *font = [nstext font];
@@ -1475,7 +1474,7 @@ fix_contentview_size (NSView *parent)
 //          f.origin.y + f.size.height, [kid class]);
   }
   
-  if (maxx < 350) maxx = 350;   // leave room for the NSText paragraph...
+  if (maxx < 400) maxx = 400;   // leave room for the NSText paragraph...
   
   /* Now that we know the width of the window, set the width of the NSText to
      that, so that it can decide what its height needs to be.
@@ -1495,10 +1494,29 @@ fix_contentview_size (NSView *parent)
   miny = f.origin.y - LINE_SPACING;
   [text setFrame:f];
   
-  // Stop second-guessing us on sizing now.  Size is now locked.
+  // Lock the width of the field and unlock the height, and let it resize
+  // once more, to compute the proper height of the text for that width.
+  //
   [(NSText *) text setHorizontallyResizable:NO];
+  [(NSText *) text setVerticallyResizable:YES];
+  [(NSText *) text sizeToFit];
+
+  // Now lock the height too: no more resizing this text field.
+  //
   [(NSText *) text setVerticallyResizable:NO];
-  
+
+  // Now reposition the top edge of the text field to be back where it
+  // was before we changed the height.
+  //
+  float oh = f.size.height;
+  f = [text frame];
+  float dh = f.size.height - oh;
+  f.origin.y += dh;
+  [text setFrame:f];
+
+  // Also adjust the parent height by the change in height of the text field.
+  miny -= dh;
+
 //  NSLog(@"text new: %3.0f x %3.0f @ %3.0f %3.0f  %3.0f  %@",
 //        f.size.width, f.size.height, f.origin.x, f.origin.y,
 //        f.origin.y + f.size.height, [text class]);
@@ -1634,7 +1652,19 @@ wrap_with_buttons (NSWindow *window, NSView *panel)
   rect.origin.y += rect.size.height;
   NSBox *pbox = [[NSBox alloc] initWithFrame:rect];
   [pbox setTitlePosition:NSNoTitle];
-  [pbox setBorderType:NSNoBorder];
+  [pbox setBorderType:NSBezelBorder];
+
+  {
+    NSRect f = [panel frame];
+    int screen_height = 800 - 64;
+    if (f.size.height > screen_height) {
+      NSLog(@"%@ height was %.0f; clipping to %d", 
+          [panel class], f.size.height, screen_height);
+      f.size.height = screen_height;
+      [panel setFrame:f];
+    }
+  }
+
   [pbox addSubview:panel];
   [pbox addSubview:bbox];
   [pbox sizeToFit];
index 6caf2e8cbf5a45e0beca364f004814de154822e9..a122f7f2b50466695cc2053b005bea0ba9141419 100644 (file)
@@ -499,7 +499,11 @@ add_default_options (const XrmOptionDescRec *opts,
       xe.xbutton.y = y;
       xe.xbutton.state = state;
       if ([e type] == NSScrollWheel)
-        xe.xbutton.button = ([e deltaY] > 0 ? Button4 : Button5);
+        xe.xbutton.button = ([e deltaY] > 0 ? Button4 :
+                             [e deltaY] < 0 ? Button5 :
+                             [e deltaX] > 0 ? Button6 :
+                             [e deltaX] < 0 ? Button7 :
+                             0);
       else
         xe.xbutton.button = [e buttonNumber] + 1;
       break;
index e269d761db75e1190d5644eb0f6e278a362c2619..d6e13459c426f47014acc6a628a3f5477ed9e71a 100644 (file)
@@ -15,7 +15,7 @@ XScreenSaver
 \f1\b0 \
 by Jamie Zawinski \uc0\u8232 and many others\
 \
-version 5.04 \uc0\u8232 13-Nov-2007\
+version 5.05 \uc0\u8232 01-Mar-2008\
 \
 {\field{\*\fldinst{HYPERLINK "http://www.jwz.org/xscreensaver/"}}{\fldrslt \cf2 \ul \ulc2 http://www.jwz.org/xscreensaver/}}\
 \pard\pardeftab720\li720
index 5e1767a8a437870a0ab22c6f3dfb8f127616fe89..0835258d5321349fbbe33bf80998d8e2bfdb654e 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2007 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -377,7 +377,6 @@ extern int XTextExtents (XFontStruct *, const char *, int length,
                          XCharStruct *overall_ret);
 extern int XTextWidth (XFontStruct *, const char *, int length);
 extern int XSetFont (Display *, GC, Font);
-extern Font XGContextFromGC (GC);
 
 extern Pixmap XCreatePixmap (Display *, Drawable,
                              unsigned int width, unsigned int height,
index b7fc19fe47d493bf15598d4e104ff637ba6f17f2..559133804a75f9b3d4ea280f2d05eba526d3a82d 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -1842,6 +1842,15 @@ copy_pixmap (Pixmap p)
 static void
 query_font (Font fid)
 {
+  if (!fid || !fid->nsfont) {
+    NSLog(@"no NSFont in fid");
+    abort();
+  }
+  if (![fid->nsfont fontName]) {
+    NSLog(@"broken NSFont in fid");
+    abort();
+  }
+
   int first = 32;
   int last = 255;
 
@@ -1993,7 +2002,7 @@ copy_font (Font fid)
 
   // copy the other pointers
   fid2->ps_name = strdup (fid->ps_name);
-  [fid2->nsfont retain];
+//  [fid2->nsfont retain];
   fid2->metrics.fid = fid2;
 
   return fid2;
@@ -2004,6 +2013,7 @@ static NSFont *
 try_font (BOOL fixed, BOOL bold, BOOL ital, BOOL serif, float size,
           char **name_ret)
 {
+  Assert (size > 0, "zero font size");
   const char *prefix = (fixed ? "Monaco" : (serif ? "Times" : "Helvetica"));
   const char *suffix = (bold && ital
                         ? (serif ? "-BoldItalic" : "-BoldOblique")
@@ -2251,7 +2261,14 @@ XUnloadFont (Display *dpy, Font fid)
 {
   free (fid->ps_name);
   free (fid->metrics.per_char);
-  [fid->nsfont release];
+
+  // #### DAMMIT!  I can't tell what's going wrong here, but I keep getting
+  //      crashes in [NSFont ascender] <- query_font, and it seems to go away
+  //      if I never release the nsfont.  So, fuck it, we'll just leak fonts.
+  //      They're probably not very big...
+  //
+  //  [fid->nsfont release];
+
   free (fid);
   return 0;
 }
@@ -2290,15 +2307,10 @@ XSetFont (Display *dpy, GC gc, Font fid)
   if (gc->gcv.font)
     XUnloadFont (dpy, gc->gcv.font);
   gc->gcv.font = copy_font (fid);
+  [gc->gcv.font->nsfont retain];
   return 0;
 }
 
-Font  // really GContext
-XGContextFromGC (GC gc)    // WTF is this actually supposed to do?
-{
-  return gc->gcv.font;
-}
-
 int
 XTextExtents (XFontStruct *f, const char *s, int length,
               int *dir_ret, int *ascent_ret, int *descent_ret,
@@ -2341,8 +2353,11 @@ static void
 set_font (CGContextRef cgc, GC gc)
 {
   Font font = gc->gcv.font;
-  if (! font)
-    font = gc->gcv.font = XLoadFont (0, 0);
+  if (! font) {
+    font = XLoadFont (0, 0);
+    gc->gcv.font = font;
+    [gc->gcv.font->nsfont retain];
+  }
   CGContextSelectFont (cgc, font->ps_name, font->size, kCGEncodingMacRoman);
   CGContextSetTextMatrix (cgc, CGAffineTransformIdentity);
 }
index f3ae48283dbf024f40c493e4032ba3b002296e84..16a2bed0a444e00433f1a40710c39fec64b4e1ee 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright Â© 2006 Jamie Zawinski <jwz@jwz.org>
+# Copyright Â© 2006-2008 Jamie Zawinski <jwz@jwz.org>
 #
 # Permission to use, copy, modify, distribute, and sell this software and its
 # documentation for any purpose is hereby granted without fee, provided that
 # Created:  8-Mar-2006.
 
 require 5;
-use diagnostics;
+#use diagnostics;      # Fails on some MacOS 10.5 systems
 use strict;
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my $version = q{ $Revision: 1.6 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version = q{ $Revision: 1.7 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
 
 my $verbose = 1;
 
diff --git a/README b/README
index 9d5a60b67efff0a0e308069f57f5d49e36a68ee9..fe349aa757f71b8ab1d61c5fa2b16d2aca77ab85 100644 (file)
--- a/README
+++ b/README
@@ -38,6 +38,24 @@ XScreenSaver has an extensive manual -- please read it!
 
 ===============================================================================
 
+Changes since 5.04:   * New hacks, `cubicgrid', `hypnowheel', and
+                        `lcdscrub' (which isn't really a screen saver).
+                      * Updates to `m6502' and `gears'.
+                      * Fixed double-buffering problems in `cubestorm' and
+                        `noof'.
+                      * Better handling of horizontal scroll wheels.
+                      * Attempt to work around latest Xinerama braindamage:
+                        if the server reports overlapping screens, use the
+                        largest non-overlapping rectangles available.
+                      * Don't warning about receipt of bogus ClientMessages,
+                        since Gnome's just never going to stop sending those.
+                      * Worked around MacOS 10.5 perl bug that caused the
+                        text-displaying hacks to fail on some systems.
+                      * Hopefully fixed font-related System Preferences crashes
+                        in MacOS savers.
+                      * The recent PAM changes broke the "Caps Lock" warning
+                        in the password dialog, the failed login warnings, and
+                        syslogging.  Fixed all that.
 Changes since 5.03:   * Fixed a possible crash in the unlock dialog (more
                         fallout from the recent PAM changes...)
                       * New hacks, `moebiusgears', `abstractile', and
index 2fc3acce2ea194699db402e89d32d5b10b0369a3..951383e35544d8c861019b06e0ec4a58f1657a5f 100755 (executable)
@@ -1,9 +1,10 @@
 #! /bin/sh
 # Attempt to guess a canonical system name.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
 
-timestamp='2003-06-17'
+timestamp='2007-05-17'
 
 # 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
@@ -17,13 +18,15 @@ timestamp='2003-06-17'
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
 #
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # configuration script generated by Autoconf, you may include it under
 # the same distribution terms that you use for the rest of that program.
 
+
 # Originally written by Per Bothner <per@bothner.com>.
 # Please send patches to <config-patches@gnu.org>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
@@ -53,7 +56,7 @@ version="\
 GNU config.guess ($timestamp)
 
 Originally written by Per Bothner.
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -66,11 +69,11 @@ Try \`$me --help' for more information."
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )        # Use stdin as input.
@@ -104,7 +107,7 @@ 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" ; } ||
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
@@ -123,7 +126,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in
        ;;
  ,,*)   CC_FOR_BUILD=$CC ;;
  ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
-esac ;'
+esac ; set_cc_for_build= ;'
 
 # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
 # (ghazi@noc.rutgers.edu 1994-08-24)
@@ -136,13 +139,6 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
 UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
 
-## for Red Hat Linux
-if test -f /etc/redhat-release ; then
-    VENDOR=redhat ;
-else
-    VENDOR= ;
-fi
-
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
@@ -165,6 +161,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            arm*) machine=arm-unknown ;;
            sh3el) machine=shl-unknown ;;
            sh3eb) machine=sh-unknown ;;
+           sh5el) machine=sh5le-unknown ;;
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
        esac
        # The Operating System including object format, if it has switched
@@ -203,50 +200,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        # 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 ;;
+       exit ;;
     *:OpenBSD:*:*)
-       echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
-       exit 0 ;;
+       UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+       echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+       exit ;;
+    *:ekkoBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+       exit ;;
+    *:SolidBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+       exit ;;
+    macppc:MirBSD:*:*)
+       echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
+    *:MirBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+       exit ;;
     alpha:OSF1:*:*)
-       if test $UNAME_RELEASE = "V4.0"; then
+       case $UNAME_RELEASE in
+       *4.0)
                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
-       fi
+               ;;
+       *5.*)
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+               ;;
+       esac
        # According to Compaq, /usr/sbin/psrinfo has been available on
        # OSF/1 and Tru64 systems produced since 1995.  I hope that
        # covers most systems running today.  This code pipes the CPU
@@ -284,42 +263,49 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            "EV7.9 (21364A)")
                UNAME_MACHINE="alphaev79" ;;
        esac
+       # A Pn.n version is a patched version.
        # 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 ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
-       exit 0 ;;
-    Alpha*:OpenVMS:*:*)
-       echo alpha-hp-vms
-       exit 0 ;;
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+       exit ;;
     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 ;;
+       exit ;;
     21064:Windows_NT:50:3)
        echo alpha-dec-winnt3.5
-       exit ;;
+       exit ;;
     Amiga*:UNIX_System_V:4.0:*)
        echo m68k-unknown-sysv4
-       exit 0;;
+       exit ;;
     *:[Aa]miga[Oo][Ss]:*:*)
        echo ${UNAME_MACHINE}-unknown-amigaos
-       exit ;;
+       exit ;;
     *:[Mm]orph[Oo][Ss]:*:*)
        echo ${UNAME_MACHINE}-unknown-morphos
-       exit ;;
+       exit ;;
     *:OS/390:*:*)
        echo i370-ibm-openedition
-       exit 0 ;;
+       exit ;;
+    *:z/VM:*:*)
+       echo s390-ibm-zvmoe
+       exit ;;
+    *:OS400:*:*)
+        echo powerpc-ibm-os400
+       exit ;;
     arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
        echo arm-acorn-riscix${UNAME_RELEASE}
-       exit 0;;
+       exit ;;
+    arm:riscos:*:*|arm:RISCOS:*:*)
+       echo arm-unknown-riscos
+       exit ;;
     SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
        echo hppa1.1-hitachi-hiuxmpp
-       exit 0;;
+       exit ;;
     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
@@ -327,32 +313,32 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        else
                echo pyramid-pyramid-bsd
        fi
-       exit ;;
+       exit ;;
     NILE*:*:*:dcosx)
        echo pyramid-pyramid-svr4
-       exit ;;
+       exit ;;
     DRS?6000:unix:4.0:6*)
        echo sparc-icl-nx6
-       exit ;;
-    DRS?6000:UNIX_SV:4.2*:7*)
+       exit ;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
        case `/usr/bin/uname -p` in
-           sparc) echo sparc-icl-nx7 && exit 0 ;;
+           sparc) echo sparc-icl-nx7; exit ;;
        esac ;;
     sun4H:SunOS:5.*:*)
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
+       exit ;;
     sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
-    i86pc:SunOS:5.*:*)
+       exit ;;
+    i86pc:SunOS:5.*:* | ix86xen:SunOS:5.*:*)
        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
+       exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
        # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
        # it's likely to be more like Solaris than SunOS4.
        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
+       exit ;;
     sun4*:SunOS:*:*)
        case "`/usr/bin/arch -k`" in
            Series*|S4*)
@@ -361,10 +347,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        esac
        # Japanese Language versions have a version number like `4.1.3-JL'.
        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-       exit ;;
+       exit ;;
     sun3*:SunOS:*:*)
        echo m68k-sun-sunos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     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
@@ -376,10 +362,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                echo sparc-sun-sunos${UNAME_RELEASE}
                ;;
        esac
-       exit ;;
+       exit ;;
     aushp:SunOS:*:*)
        echo sparc-auspex-sunos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     # 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
@@ -390,37 +376,40 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     # be no problem.
     atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
        echo m68k-atari-mint${UNAME_RELEASE}
-        exit ;;
+        exit ;;
     *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
         echo m68k-atari-mint${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
         echo m68k-milan-mint${UNAME_RELEASE}
-        exit ;;
+        exit ;;
     hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
         echo m68k-hades-mint${UNAME_RELEASE}
-        exit ;;
+        exit ;;
     *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
         echo m68k-unknown-mint${UNAME_RELEASE}
-        exit 0 ;;
+        exit ;;
+    m68k:machten:*:*)
+       echo m68k-apple-machten${UNAME_RELEASE}
+       exit ;;
     powerpc:machten:*:*)
        echo powerpc-apple-machten${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     RISC*:Mach:*:*)
        echo mips-dec-mach_bsd4.3
-       exit ;;
+       exit ;;
     RISC*:ULTRIX:*:*)
        echo mips-dec-ultrix${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     VAX*:ULTRIX*:*:*)
        echo vax-dec-ultrix${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     2020:CLIX:*:* | 2430:CLIX:*:*)
        echo clipper-intergraph-clix${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     mips:*:*:UMIPS | mips:*:*:RISCos)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
@@ -444,32 +433,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
          exit (-1);
        }
 EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c \
-         && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
-         && exit 0
+       $CC_FOR_BUILD -o $dummy $dummy.c &&
+         dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+         SYSTEM_NAME=`$dummy $dummyarg` &&
+           { echo "$SYSTEM_NAME"; exit; }
        echo mips-mips-riscos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     Motorola:PowerMAX_OS:*:*)
        echo powerpc-motorola-powermax
-       exit ;;
+       exit ;;
     Motorola:*:4.3:PL8-*)
        echo powerpc-harris-powermax
-       exit ;;
+       exit ;;
     Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
        echo powerpc-harris-powermax
-       exit ;;
+       exit ;;
     Night_Hawk:Power_UNIX:*:*)
        echo powerpc-harris-powerunix
-       exit ;;
+       exit ;;
     m88k:CX/UX:7*:*)
        echo m88k-harris-cxux7
-       exit ;;
+       exit ;;
     m88k:*:4*:R4*)
        echo m88k-motorola-sysv4
-       exit ;;
+       exit ;;
     m88k:*:3*:R3*)
        echo m88k-motorola-sysv3
-       exit ;;
+       exit ;;
     AViiON:dgux:*:*)
         # DG/UX returns AViiON for all architectures
         UNAME_PROCESSOR=`/usr/bin/uname -p`
@@ -485,29 +475,29 @@ EOF
        else
            echo i586-dg-dgux${UNAME_RELEASE}
        fi
-       exit ;;
+       exit ;;
     M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
        echo m88k-dolphin-sysv3
-       exit ;;
+       exit ;;
     M88*:*:R3*:*)
        # Delta 88k system running SVR3
        echo m88k-motorola-sysv3
-       exit ;;
+       exit ;;
     XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
        echo m88k-tektronix-sysv3
-       exit ;;
+       exit ;;
     Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
        echo m68k-tektronix-bsd
-       exit ;;
+       exit ;;
     *:IRIX*:*:*)
        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
-       exit ;;
+       exit ;;
     ????????: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 '
+       echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
+       exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
     i*86:AIX:*:*)
        echo i386-ibm-aix
-       exit ;;
+       exit ;;
     ia64:AIX:*:*)
        if [ -x /usr/bin/oslevel ] ; then
                IBM_REV=`/usr/bin/oslevel`
@@ -515,7 +505,7 @@ EOF
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
-       exit ;;
+       exit ;;
     *:AIX:2:3)
        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
                eval $set_cc_for_build
@@ -530,14 +520,18 @@ EOF
                        exit(0);
                        }
 EOF
-               $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
-               echo rs6000-ibm-aix3.2.5
+               if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+               then
+                       echo "$SYSTEM_NAME"
+               else
+                       echo rs6000-ibm-aix3.2.5
+               fi
        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
                echo rs6000-ibm-aix3.2.4
        else
                echo rs6000-ibm-aix3.2
        fi
-       exit ;;
+       exit ;;
     *: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
@@ -551,28 +545,28 @@ EOF
                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
        fi
        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-       exit ;;
+       exit ;;
     *:AIX:*:*)
        echo rs6000-ibm-aix
-       exit ;;
+       exit ;;
     ibmrt:4.4BSD:*|romp-ibm:BSD:*)
        echo romp-ibm-bsd4.4
-       exit ;;
+       exit ;;
     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
+       exit ;;                             # report: romp-ibm BSD 4.3
     *:BOSX:*:*)
        echo rs6000-bull-bosx
-       exit ;;
+       exit ;;
     DPX/2?00:B.O.S.:*:*)
        echo m68k-bull-sysv3
-       exit ;;
+       exit ;;
     9000/[34]??:4.3bsd:1.*:*)
        echo m68k-hp-bsd
-       exit ;;
+       exit ;;
     hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
        echo m68k-hp-bsd4.4
-       exit ;;
+       exit ;;
     9000/[34678]??:HP-UX:*:*)
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        case "${UNAME_MACHINE}" in
@@ -634,9 +628,19 @@ EOF
        esac
        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
+           eval $set_cc_for_build
+
+           # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+           # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+           # generating 64-bit code.  GNU and HP use different nomenclature:
+           #
+           # $ CC_FOR_BUILD=cc ./config.guess
+           # => hppa2.0w-hp-hpux11.23
+           # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+           # => hppa64-hp-hpux11.23
+
+           if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+               grep __LP64__ >/dev/null
            then
                HP_ARCH="hppa2.0w"
            else
@@ -644,11 +648,11 @@ EOF
            fi
        fi
        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-       exit ;;
+       exit ;;
     ia64:HP-UX:*:*)
        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
        echo ia64-hp-hpux${HPUX_REV}
-       exit ;;
+       exit ;;
     3050*:HI-UX:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
@@ -676,150 +680,182 @@ EOF
          exit (0);
        }
 EOF
-       $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+       $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+               { echo "$SYSTEM_NAME"; exit; }
        echo unknown-hitachi-hiuxwe2
-       exit ;;
+       exit ;;
     9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
        echo hppa1.1-hp-bsd
-       exit ;;
+       exit ;;
     9000/8??:4.3bsd:*:*)
        echo hppa1.0-hp-bsd
-       exit ;;
+       exit ;;
     *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
        echo hppa1.0-hp-mpeix
-       exit ;;
+       exit ;;
     hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
        echo hppa1.1-hp-osf
-       exit ;;
+       exit ;;
     hp8??:OSF1:*:*)
        echo hppa1.0-hp-osf
-       exit ;;
+       exit ;;
     i*86:OSF1:*:*)
        if [ -x /usr/sbin/sysversion ] ; then
            echo ${UNAME_MACHINE}-unknown-osf1mk
        else
            echo ${UNAME_MACHINE}-unknown-osf1
        fi
-       exit ;;
+       exit ;;
     parisc*:Lites*:*:*)
        echo hppa1.1-hp-lites
-       exit ;;
+       exit ;;
     C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
        echo c1-convex-bsd
-        exit ;;
+        exit ;;
     C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-        exit ;;
+        exit ;;
     C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
        echo c34-convex-bsd
-        exit ;;
+        exit ;;
     C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
        echo c38-convex-bsd
-        exit ;;
+        exit ;;
     C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
        echo c4-convex-bsd
-        exit ;;
+        exit ;;
     CRAY*Y-MP:*:*:*)
        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     CRAY*[A-Z]90:*:*:*)
        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
              -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     CRAY*TS:*:*:*)
        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     CRAY*T3E:*:*:*)
        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     CRAY*SV1:*:*:*)
        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
-       exit ;;
+       exit ;;
     *:UNICOS/mp:*:*)
-       echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
-       exit ;;
+       echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+       exit ;;
     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 "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
-        exit 0 ;;
+        exit ;;
+    5000:UNIX_System_V:4.*:*)
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+       exit ;;
     i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     sparc*:BSD/OS:*:*)
        echo sparc-unknown-bsdi${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:BSD/OS:*:*)
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-       exit 0 ;;
-    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
-       # Determine whether the default compiler uses glibc.
-       eval $set_cc_for_build
-       sed 's/^        //' << EOF >$dummy.c
-       #include <features.h>
-       #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 ;;
+       exit ;;
+    *:FreeBSD:*:*)
+       case ${UNAME_MACHINE} in
+           pc98)
+               echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           amd64)
+               echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+           *)
+               echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+       esac
+       exit ;;
     i*:CYGWIN*:*)
        echo ${UNAME_MACHINE}-pc-cygwin
-       exit ;;
-    i*:MINGW*:*)
+       exit ;;
+    *:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
-       exit 0 ;;
+       exit ;;
+    i*:windows32*:*)
+       # uname -m includes "-pc" on this system.
+       echo ${UNAME_MACHINE}-mingw32
+       exit ;;
     i*:PW*:*)
        echo ${UNAME_MACHINE}-pc-pw32
-       exit 0 ;;
-    x86:Interix*:[34]*)
-       echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
-       exit 0 ;;
+       exit ;;
+    *:Interix*:[3456]*)
+       case ${UNAME_MACHINE} in
+           x86) 
+               echo i586-pc-interix${UNAME_RELEASE}
+               exit ;;
+           EM64T | authenticamd)
+               echo x86_64-unknown-interix${UNAME_RELEASE}
+               exit ;;
+       esac ;;
     [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
        echo i${UNAME_MACHINE}-pc-mks
-       exit ;;
+       exit ;;
     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 ;;
+       exit ;;
     i*:UWIN*:*)
        echo ${UNAME_MACHINE}-pc-uwin
-       exit 0 ;;
+       exit ;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+       echo x86_64-unknown-cygwin
+       exit ;;
     p*:CYGWIN*:*)
        echo powerpcle-unknown-cygwin
-       exit ;;
+       exit ;;
     prep*:SunOS:5.*:*)
        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-       exit ;;
+       exit ;;
     *:GNU:*:*)
+       # the GNU system
        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-       exit 0 ;;
+       exit ;;
+    *:GNU/*:*:*)
+       # other systems with GNU libc and userland
+       echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+       exit ;;
     i*86:Minix:*:*)
        echo ${UNAME_MACHINE}-pc-minix
-       exit ;;
+       exit ;;
     arm*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit 0 ;;
+       exit ;;
+    avr32*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     cris:Linux:*:*)
        echo cris-axis-linux-gnu
-       exit 0 ;;
+       exit ;;
+    crisv32:Linux:*:*)
+       echo crisv32-axis-linux-gnu
+       exit ;;
+    frv:Linux:*:*)
+       echo frv-unknown-linux-gnu
+       exit ;;
     ia64:Linux:*:*)
-       echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
-       exit 0 ;;
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
+    m32r*:Linux:*:*)
+       echo ${UNAME_MACHINE}-unknown-linux-gnu
+       exit ;;
     m68*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
+       exit ;;
     mips:Linux:*:*)
        eval $set_cc_for_build
        sed 's/^        //' << EOF >$dummy.c
@@ -836,8 +872,12 @@ EOF
        #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
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+           /^CPU/{
+               s: ::g
+               p
+           }'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
     mips64:Linux:*:*)
        eval $set_cc_for_build
@@ -855,15 +895,22 @@ EOF
        #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
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+           /^CPU/{
+               s: ::g
+               p
+           }'`"
+       test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
        ;;
+    or32:Linux:*:*)
+       echo or32-unknown-linux-gnu
+       exit ;;
     ppc:Linux:*:*)
-       echo powerpc-${VENDOR:-unknown}-linux-gnu
-       exit ;;
+       echo powerpc-unknown-linux-gnu
+       exit ;;
     ppc64:Linux:*:*)
-       echo powerpc64-${VENDOR:-unknown}-linux-gnu
-       exit ;;
+       echo powerpc64-unknown-linux-gnu
+       exit ;;
     alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
          EV5)   UNAME_MACHINE=alphaev5 ;;
@@ -877,7 +924,7 @@ EOF
        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 ;;
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -885,25 +932,31 @@ EOF
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
          *)    echo hppa-unknown-linux-gnu ;;
        esac
-       exit ;;
+       exit ;;
     parisc64:Linux:*:* | hppa64:Linux:*:*)
        echo hppa64-unknown-linux-gnu
-       exit ;;
+       exit ;;
     s390:Linux:*:* | s390x:Linux:*:*)
-       echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
-       exit ;;
+       echo ${UNAME_MACHINE}-ibm-linux
+       exit ;;
     sh64*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
+       exit ;;
     sh*:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit ;;
+       exit ;;
     sparc:Linux:*:* | sparc64:Linux:*:*)
        echo ${UNAME_MACHINE}-unknown-linux-gnu
-       exit 0 ;;
+       exit ;;
+    vax:Linux:*:*)
+       echo ${UNAME_MACHINE}-dec-linux-gnu
+       exit ;;
     x86_64:Linux:*:*)
-       echo x86_64-${VENDOR:-unknown}-linux-gnu
-       exit 0 ;;
+       echo x86_64-unknown-linux-gnu
+       exit ;;
+    xtensa:Linux:*:*)
+       echo xtensa-unknown-linux-gnu
+       exit ;;
     i*86:Linux:*:*)
        # The BFD linker knows what the default object file format is, so
        # first see if it will tell us. cd to the root directory to prevent
@@ -921,15 +974,15 @@ EOF
                ;;
          a.out-i386-linux)
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
-               exit ;;
+               exit ;;
          coff-i386)
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
+               exit ;;
          "")
                # 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 ;;
+               exit ;;
        esac
        # Determine whether the default compiler is a.out or elf
        eval $set_cc_for_build
@@ -946,23 +999,33 @@ EOF
        LIBC=gnulibc1
        # endif
        #else
-       #ifdef __INTEL_COMPILER
+       #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
        LIBC=gnu
        #else
        LIBC=gnuaout
        #endif
        #endif
+       #ifdef __dietlibc__
+       LIBC=dietlibc
+       #endif
 EOF
-       eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
-       test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
-       test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+       eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+           /^LIBC/{
+               s: ::g
+               p
+           }'`"
+       test x"${LIBC}" != x && {
+               echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+               exit
+       }
+       test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
        ;;
     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 ;;
+       exit ;;
     i*86:UNIX_SV:4.2MP:2.*)
         # Unixware is an offshoot of SVR4, but it has its own version
         # number series starting with 2...
@@ -970,24 +1033,27 @@ EOF
        # I just have to hope.  -- rms.
         # Use sysv4.2uw... so that sysv4* matches it.
        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
-       exit ;;
+       exit ;;
     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 ;;
+       exit ;;
     i*86:XTS-300:*:STOP)
        echo ${UNAME_MACHINE}-unknown-stop
-       exit ;;
+       exit ;;
     i*86:atheos:*:*)
        echo ${UNAME_MACHINE}-unknown-atheos
-       exit 0 ;;
+       exit ;;
+    i*86:syllable:*:*)
+       echo ${UNAME_MACHINE}-pc-syllable
+       exit ;;
     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
        echo i386-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     i*86:*DOS:*:*)
        echo ${UNAME_MACHINE}-pc-msdosdjgpp
-       exit ;;
+       exit ;;
     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
@@ -995,15 +1061,16 @@ EOF
        else
                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
        fi
-       exit 0 ;;
-    i*86:*:5:[78]*)
+       exit ;;
+    i*86:*:5:[678]*)
+       # UnixWare 7.x, OpenUNIX and OpenServer 6.
        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 ;;
+       exit ;;
     i*86:*:3.2:*)
        if test -f /usr/options/cb.name; then
                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
@@ -1021,73 +1088,73 @@ EOF
        else
                echo ${UNAME_MACHINE}-pc-sysv32
        fi
-       exit ;;
+       exit ;;
     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 ;;
+        exit ;;
     Intel:Mach:3*:*)
        echo i386-pc-mach3
-       exit ;;
+       exit ;;
     paragon:*:*:*)
        echo i860-intel-osf1
-       exit ;;
+       exit ;;
     i860:*:4.*:*) # i860-SVR4
        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
          echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
        else # Add other i860-SVR4 vendors below as they are discovered.
          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
        fi
-       exit ;;
+       exit ;;
     mini*:CTIX:SYS*5:*)
        # "miniframe"
        echo m68010-convergent-sysv
-       exit ;;
+       exit ;;
     mc68k:UNIX:SYSTEM5:3.51m)
        echo m68k-convergent-sysv
-       exit ;;
+       exit ;;
     M680?0:D-NIX:5.3:*)
        echo m68k-diab-dnix
-       exit ;;
-    M68*:*:R3V[567]*:*)
-       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 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 | SHG2:*:4.0:3.0)
+       exit ;;
+    M68*:*:R3V[5678]*:*)
+       test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*: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 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
        OS_REL=''
        test -r /etc/.relid \
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-         && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+         && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
-         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+         && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
+          && { echo i486-ncr-sysv4; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     mc68030:UNIX_System_V:4.*:*)
        echo m68k-atari-sysv4
-       exit ;;
+       exit ;;
     TSUNAMI:LynxOS:2.*:*)
        echo sparc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     rs6000:LynxOS:2.*:*)
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     SM[BE]S:UNIX_SV:*:*)
        echo mips-dde-sysv${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     RM*:ReliantUNIX-*:*:*)
        echo mips-sni-sysv4
-       exit ;;
+       exit ;;
     RM*:SINIX-*:*:*)
        echo mips-sni-sysv4
-       exit ;;
+       exit ;;
     *:SINIX-*:*:*)
        if uname -p 2>/dev/null >/dev/null ; then
                UNAME_MACHINE=`(uname -p) 2>/dev/null`
@@ -1095,68 +1162,81 @@ EOF
        else
                echo ns32k-sni-sysv
        fi
-       exit ;;
+       exit ;;
     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                       # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
-        exit ;;
+        exit ;;
     *:UNIX_System_V:4*:FTX*)
        # From Gerald Hewes <hewes@openmarket.com>.
        # How about differentiating between stratus architectures? -djm
        echo hppa1.1-stratus-sysv4
-       exit ;;
+       exit ;;
     *:*:*:FTX*)
        # From seanf@swdc.stratus.com.
        echo i860-stratus-sysv4
-       exit 0 ;;
+       exit ;;
+    i*86:VOS:*:*)
+       # From Paul.Green@stratus.com.
+       echo ${UNAME_MACHINE}-stratus-vos
+       exit ;;
     *:VOS:*:*)
        # From Paul.Green@stratus.com.
        echo hppa1.1-stratus-vos
-       exit ;;
+       exit ;;
     mc68*:A/UX:*:*)
        echo m68k-apple-aux${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     news*:NEWS-OS:6*:*)
        echo mips-sony-newsos6
-       exit ;;
+       exit ;;
     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 ;;
+        exit ;;
     BeBox:BeOS:*:*)    # BeOS running on hardware made by Be, PPC only.
        echo powerpc-be-beos
-       exit ;;
+       exit ;;
     BeMac:BeOS:*:*)    # BeOS running on Mac or Mac clone, PPC only.
        echo powerpc-apple-beos
-       exit ;;
+       exit ;;
     BePC:BeOS:*:*)     # BeOS running on Intel PC compatible.
        echo i586-pc-beos
-       exit ;;
+       exit ;;
     SX-4:SUPER-UX:*:*)
        echo sx4-nec-superux${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     SX-5:SUPER-UX:*:*)
        echo sx5-nec-superux${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     SX-6:SUPER-UX:*:*)
        echo sx6-nec-superux${UNAME_RELEASE}
-       exit 0 ;;
+       exit ;;
+    SX-7:SUPER-UX:*:*)
+       echo sx7-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8:SUPER-UX:*:*)
+       echo sx8-nec-superux${UNAME_RELEASE}
+       exit ;;
+    SX-8R:SUPER-UX:*:*)
+       echo sx8r-nec-superux${UNAME_RELEASE}
+       exit ;;
     Power*:Rhapsody:*:*)
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:Rhapsody:*:*)
        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:Darwin:*:*)
-       case `uname -p` in
-           *86) UNAME_PROCESSOR=i686 ;;
-           powerpc) UNAME_PROCESSOR=powerpc ;;
+       UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+       case $UNAME_PROCESSOR in
+           unknown) UNAME_PROCESSOR=powerpc ;;
        esac
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:procnto*:*:* | *:QNX:[0123456789]*:*)
        UNAME_PROCESSOR=`uname -p`
        if test "$UNAME_PROCESSOR" = "x86"; then
@@ -1164,22 +1244,25 @@ EOF
                UNAME_MACHINE=pc
        fi
        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:QNX:*:4*)
        echo i386-pc-qnx
-       exit 0 ;;
-    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+       exit ;;
+    NSE-?:NONSTOP_KERNEL:*:*)
+       echo nse-tandem-nsk${UNAME_RELEASE}
+       exit ;;
+    NSR-?:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:NonStop-UX:*:*)
        echo mips-compaq-nonstopux
-       exit ;;
+       exit ;;
     BS2000:POSIX*:*:*)
        echo bs2000-siemens-sysv
-       exit ;;
+       exit ;;
     DS/*:UNIX_System_V:*:*)
        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
-       exit ;;
+       exit ;;
     *:Plan9:*:*)
        # "uname -m" is not consistent, so use $cputype instead. 386
        # is converted to i386 for consistency with other x86
@@ -1190,28 +1273,47 @@ EOF
            UNAME_MACHINE="$cputype"
        fi
        echo ${UNAME_MACHINE}-unknown-plan9
-       exit ;;
+       exit ;;
     *:TOPS-10:*:*)
        echo pdp10-unknown-tops10
-       exit ;;
+       exit ;;
     *:TENEX:*:*)
        echo pdp10-unknown-tenex
-       exit ;;
+       exit ;;
     KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
        echo pdp10-dec-tops20
-       exit ;;
+       exit ;;
     XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
        echo pdp10-xkl-tops20
-       exit ;;
+       exit ;;
     *:TOPS-20:*:*)
        echo pdp10-unknown-tops20
-       exit ;;
+       exit ;;
     *:ITS:*:*)
        echo pdp10-unknown-its
-       exit ;;
+       exit ;;
     SEI:*:*:SEIUX)
         echo mips-sei-seiux${UNAME_RELEASE}
-       exit 0 ;;
+       exit ;;
+    *:DragonFly:*:*)
+       echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit ;;
+    *:*VMS:*:*)
+       UNAME_MACHINE=`(uname -p) 2>/dev/null`
+       case "${UNAME_MACHINE}" in
+           A*) echo alpha-dec-vms ; exit ;;
+           I*) echo ia64-dec-vms ; exit ;;
+           V*) echo vax-dec-vms ; exit ;;
+       esac ;;
+    *:XENIX:*:SysV)
+       echo i386-pc-xenix
+       exit ;;
+    i*86:skyos:*:*)
+       echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+       exit ;;
+    i*86:rdos:*:*)
+       echo ${UNAME_MACHINE}-pc-rdos
+       exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
@@ -1243,7 +1345,7 @@ main ()
 #endif
 
 #if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
+  printf ("arm-acorn-riscix\n"); exit (0);
 #endif
 
 #if defined (hp300) && !defined (hpux)
@@ -1332,11 +1434,12 @@ main ()
 }
 EOF
 
-$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+       { echo "$SYSTEM_NAME"; exit; }
 
 # Apollos put the system type in the environment.
 
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
 
 # Convex versions that predate uname can use getsysinfo(1)
 
@@ -1345,22 +1448,22 @@ then
     case `getsysinfo -f cpu_type` in
     c1*)
        echo c1-convex-bsd
-       exit ;;
+       exit ;;
     c2*)
        if getsysinfo -f scalar_acc
        then echo c32-convex-bsd
        else echo c2-convex-bsd
        fi
-       exit ;;
+       exit ;;
     c34*)
        echo c34-convex-bsd
-       exit ;;
+       exit ;;
     c38*)
        echo c38-convex-bsd
-       exit ;;
+       exit ;;
     c4*)
        echo c4-convex-bsd
-       exit ;;
+       exit ;;
     esac
 fi
 
@@ -1371,7 +1474,9 @@ This script, last modified $timestamp, has failed to recognize
 the operating system you are using. It is advised that you
 download the most up to date version of the config scripts from
 
-    ftp://ftp.gnu.org/pub/gnu/config/
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 
 If the version you run ($0) is already up to date, please
 send the following data and any information you think might be
index 163b5f55d0722d9a60b1f3918c06187e821447c6..c56839125f33374b19fe7188aa9afa0bf14b2e54 100644 (file)
 /* Define to 1 if you have the `sigaction' function. */
 #undef HAVE_SIGACTION
 
+/* Define to 1 if you have the `sigtimedwait' function. */
+#undef HAVE_SIGTIMEDWAIT
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
index 7cee3d6ec7fff635b629add895c58177fd8e7027..c060f4483392e413a117c86be997c656e9186f22 100755 (executable)
@@ -1,9 +1,10 @@
 #! /bin/sh
 # Configuration validation subroutine script.
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+#   Inc.
 
-timestamp='2003-06-18'
+timestamp='2007-04-29'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -21,14 +22,15 @@ timestamp='2003-06-18'
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330,
-# Boston, MA 02111-1307, USA.
-
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
 # As a special exception to the GNU General Public License, if you
 # distribute this file as part of a program that contains a
 # 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 <config-patches@gnu.org>.  Submit a context
 # diff and a properly formatted ChangeLog entry.
 #
@@ -70,7 +72,7 @@ Report bugs and patches to <config-patches@gnu.org>."
 version="\
 GNU config.sub ($timestamp)
 
-Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
 Free Software Foundation, Inc.
 
 This is free software; see the source for copying conditions.  There is NO
@@ -83,11 +85,11 @@ Try \`$me --help' for more information."
 while test $# -gt 0 ; do
   case $1 in
     --time-stamp | --time* | -t )
-       echo "$timestamp" ; exit ;;
+       echo "$timestamp" ; exit ;;
     --version | -v )
-       echo "$version" ; exit ;;
+       echo "$version" ; exit ;;
     --help | --h* | -h )
-       echo "$usage"; exit ;;
+       echo "$usage"; exit ;;
     -- )     # Stop option processing
        shift; break ;;
     - )        # Use stdin as input.
@@ -99,7 +101,7 @@ while test $# -gt 0 ; do
     *local*)
        # First pass through any local machine types.
        echo $1
-       exit 0;;
+       exit ;;
 
     * )
        break ;;
@@ -118,7 +120,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+  nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+  storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -144,7 +148,7 @@ case $os in
        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-       -apple | -axis)
+       -apple | -axis | -knuth | -cray)
                os=
                basic_machine=$1
                ;;
@@ -169,6 +173,10 @@ case $os in
        -hiux*)
                os=-hiuxwe2
                ;;
+       -sco6)
+               os=-sco5v6
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
        -sco5)
                os=-sco3.2v5
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -185,6 +193,10 @@ case $os in
                # Don't forget version if it is 3.2v4 or newer.
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
                ;;
+       -sco5v6*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+               ;;
        -sco*)
                os=-sco3.2v2
                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
@@ -228,14 +240,17 @@ case $basic_machine in
        | 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 \
+       | am33_2.0 \
+       | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+       | bfin \
        | c4x | clipper \
        | d10v | d30v | dlx | dsp16xx \
-       | fr30 | frv \
+       | fido | fr30 | frv \
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
-       | ip2k \
-       | m32r | m68000 | m68k | m88k | mcore \
+       | ip2k | iq2000 \
+       | m32c | m32r | m32rle | m68000 | m68k | m88k \
+       | maxq | mb | microblaze | mcore | mep \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
@@ -244,28 +259,33 @@ case $basic_machine in
        | mips64vr4100 | mips64vr4100el \
        | mips64vr4300 | mips64vr4300el \
        | mips64vr5000 | mips64vr5000el \
+       | mips64vr5900 | mips64vr5900el \
        | mipsisa32 | mipsisa32el \
        | mipsisa32r2 | mipsisa32r2el \
        | mipsisa64 | mipsisa64el \
+       | mipsisa64r2 | mipsisa64r2el \
        | mipsisa64sb1 | mipsisa64sb1el \
        | mipsisa64sr71k | mipsisa64sr71kel \
        | mipstx39 | mipstx39el \
        | mn10200 | mn10300 \
+       | mt \
        | msp430 \
+       | nios | nios2 \
        | ns16k | ns32k \
-       | openrisc | or32 \
+       | or32 \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
-       | s390 | s390x \
-       | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+       | score \
+       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
-       | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
-       | strongarm \
+       | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+       | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+       | spu | strongarm \
        | tahoe | thumb | tic4x | tic80 | tron \
        | v850 | v850e \
        | we32k \
-       | x86 | xscale | xstormy16 | xtensa \
+       | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
        | z8k)
                basic_machine=$basic_machine-unknown
                ;;
@@ -276,6 +296,9 @@ case $basic_machine in
                ;;
        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
                ;;
+       ms1)
+               basic_machine=mt-unknown
+               ;;
 
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
@@ -295,20 +318,20 @@ case $basic_machine in
        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
-       | avr-* \
-       | bs2000-* \
+       | avr-* | avr32-* \
+       | bfin-* | bs2000-* \
        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
-       | clipper-* | cydra-* \
+       | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
-       | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+       | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
        | h8300-* | h8500-* \
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
-       | ip2k-* \
-       | m32r-* \
+       | ip2k-* | iq2000-* \
+       | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
-       | m88110-* | m88k-* | mcore-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -317,31 +340,36 @@ case $basic_machine in
        | mips64vr4100-* | mips64vr4100el-* \
        | mips64vr4300-* | mips64vr4300el-* \
        | mips64vr5000-* | mips64vr5000el-* \
+       | mips64vr5900-* | mips64vr5900el-* \
        | mipsisa32-* | mipsisa32el-* \
        | mipsisa32r2-* | mipsisa32r2el-* \
        | mipsisa64-* | mipsisa64el-* \
+       | mipsisa64r2-* | mipsisa64r2el-* \
        | mipsisa64sb1-* | mipsisa64sb1el-* \
        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
        | mipstx39-* | mipstx39el-* \
+       | mmix-* \
+       | mt-* \
        | msp430-* \
-       | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+       | nios-* | nios2-* \
+       | none-* | np1-* | ns16k-* | ns32k-* \
        | orion-* \
        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
        | romp-* | rs6000-* \
-       | s390-* | s390x-* \
-       | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
-       | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
-       | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+       | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+       | sparclite-* \
+       | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
        | tron-* \
        | v850-* | v850e-* | vax-* \
        | we32k-* \
-       | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
-       | xtensa-* \
+       | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+       | xstormy16-* | xtensa-* \
        | ymp-* \
        | z8k-*)
                ;;
@@ -361,6 +389,9 @@ case $basic_machine in
                basic_machine=a29k-amd
                os=-udi
                ;;
+       abacus)
+               basic_machine=abacus-unknown
+               ;;
        adobe68k)
                basic_machine=m68010-adobe
                os=-scout
@@ -378,6 +409,9 @@ case $basic_machine in
        amd64)
                basic_machine=x86_64-pc
                ;;
+       amd64-*)
+               basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        amdahl)
                basic_machine=580-amdahl
                os=-sysv
@@ -437,12 +471,27 @@ case $basic_machine in
                basic_machine=j90-cray
                os=-unicos
                ;;
+       craynv)
+               basic_machine=craynv-cray
+               os=-unicosmp
+               ;;
+       cr16c)
+               basic_machine=cr16c-unknown
+               os=-elf
+               ;;
        crds | unos)
                basic_machine=m68k-crds
                ;;
+       crisv32 | crisv32-* | etraxfs*)
+               basic_machine=crisv32-axis
+               ;;
        cris | cris-* | etrax*)
                basic_machine=cris-axis
                ;;
+       crx)
+               basic_machine=crx-unknown
+               os=-elf
+               ;;
        da30 | da30-*)
                basic_machine=m68k-da30
                ;;
@@ -465,6 +514,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       djgpp)
+               basic_machine=i586-pc
+               os=-msdosdjgpp
+               ;;
        dpx20 | dpx20-*)
                basic_machine=rs6000-bull
                os=-bosx
@@ -630,6 +683,10 @@ case $basic_machine in
                basic_machine=i386-pc
                os=-mingw32
                ;;
+       mingw32ce)
+               basic_machine=arm-unknown
+               os=-mingw32ce
+               ;;
        miniframe)
                basic_machine=m68000-convergent
                ;;
@@ -643,10 +700,6 @@ case $basic_machine in
        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
@@ -659,6 +712,9 @@ case $basic_machine in
                basic_machine=i386-pc
                os=-msdos
                ;;
+       ms1-*)
+               basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+               ;;
        mvs)
                basic_machine=i370-ibm
                os=-mvs
@@ -727,10 +783,6 @@ case $basic_machine in
        np1)
                basic_machine=np1-gould
                ;;
-       nv1)
-               basic_machine=nv1-cray
-               os=-unicosmp
-               ;;
        nsr-tandem)
                basic_machine=nsr-tandem
                ;;
@@ -738,9 +790,12 @@ case $basic_machine in
                basic_machine=hppa1.1-oki
                os=-proelf
                ;;
-       or32 | or32-*)
+       openrisc | openrisc-*)
                basic_machine=or32-unknown
-               os=-coff
+               ;;
+       os400)
+               basic_machine=powerpc-ibm
+               os=-os400
                ;;
        OSE68000 | ose68000)
                basic_machine=m68000-ericsson
@@ -767,6 +822,12 @@ case $basic_machine in
        pc532 | pc532-*)
                basic_machine=ns32k-pc532
                ;;
+       pc98)
+               basic_machine=i386-pc
+               ;;
+       pc98-*)
+               basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        pentium | p5 | k5 | k6 | nexgen | viac3)
                basic_machine=i586-pc
                ;;
@@ -823,6 +884,10 @@ case $basic_machine in
                basic_machine=i586-unknown
                os=-pw32
                ;;
+       rdos)
+               basic_machine=i386-pc
+               os=-rdos
+               ;;
        rom68k)
                basic_machine=m68k-rom68k
                os=-coff
@@ -833,6 +898,12 @@ case $basic_machine in
        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
@@ -843,6 +914,10 @@ case $basic_machine in
        sb1el)
                basic_machine=mipsisa64sb1el-unknown
                ;;
+       sde)
+               basic_machine=mipsisa32-sde
+               os=-elf
+               ;;
        sei)
                basic_machine=mips-sei
                os=-seiux
@@ -854,6 +929,9 @@ case $basic_machine in
                basic_machine=sh-hitachi
                os=-hms
                ;;
+       sh5el)
+               basic_machine=sh5le-unknown
+               ;;
        sh64)
                basic_machine=sh64-unknown
                ;;
@@ -956,6 +1034,10 @@ case $basic_machine in
        tower | tower-32)
                basic_machine=m68k-ncr
                ;;
+       tpf)
+               basic_machine=s390x-ibm
+               os=-tpf
+               ;;
        udi29k)
                basic_machine=a29k-amd
                os=-udi
@@ -999,6 +1081,10 @@ case $basic_machine in
                basic_machine=hppa1.1-winbond
                os=-proelf
                ;;
+       xbox)
+               basic_machine=i686-pc
+               os=-mingw32
+               ;;
        xps | xps100)
                basic_machine=xps100-honeywell
                ;;
@@ -1029,6 +1115,9 @@ case $basic_machine in
        romp)
                basic_machine=romp-ibm
                ;;
+       mmix)
+               basic_machine=mmix-knuth
+               ;;
        rs6000)
                basic_machine=rs6000-ibm
                ;;
@@ -1045,13 +1134,10 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
-       sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
-       sh64)
-               basic_machine=sh64-unknown
-               ;;
-       sparc | sparcv9 | sparcv9b)
+       sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
                basic_machine=sparc-sun
                ;;
        cydra)
@@ -1124,19 +1210,23 @@ case $os in
              | -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* | -oabi* \
+             | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+             | -openbsd* | -solidbsd* \
+             | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+             | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -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* | -nx6 | -nx7 | -sei*)
+             | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+             | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1154,12 +1244,15 @@ case $os in
                os=`echo $os | sed -e 's|nto|nto-qnx|'`
                ;;
        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
-             | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+             | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
                ;;
        -mac*)
                os=`echo $os | sed -e 's|mac|macos|'`
                ;;
+       -linux-dietlibc)
+               os=-linux-dietlibc
+               ;;
        -linux*)
                os=`echo $os | sed -e 's|linux|linux-gnu|'`
                ;;
@@ -1172,6 +1265,9 @@ case $os in
        -opened*)
                os=-openedition
                ;;
+        -os400*)
+               os=-os400
+               ;;
        -wince*)
                os=-wince
                ;;
@@ -1193,6 +1289,9 @@ case $os in
        -atheos*)
                os=-atheos
                ;;
+       -syllable*)
+               os=-syllable
+               ;;
        -386bsd)
                os=-bsd
                ;;
@@ -1215,6 +1314,9 @@ case $os in
        -sinix*)
                os=-sysv4
                ;;
+        -tpf*)
+               os=-tpf
+               ;;
        -triton*)
                os=-sysv3
                ;;
@@ -1251,6 +1353,9 @@ case $os in
        -kaos*)
                os=-kaos
                ;;
+       -zvmoe)
+               os=-zvmoe
+               ;;
        -none)
                ;;
        *)
@@ -1273,6 +1378,12 @@ else
 # system, and we'll never get to this point.
 
 case $basic_machine in
+        score-*)
+               os=-elf
+               ;;
+        spu-*)
+               os=-elf
+               ;;
        *-acorn)
                os=-riscix1.2
                ;;
@@ -1282,8 +1393,8 @@ case $basic_machine in
        arm*-semi)
                os=-aout
                ;;
-       c4x-* | tic4x-*)
-               os=-coff
+        c4x-* | tic4x-*)
+               os=-coff
                ;;
        # This must come before the *-dec entry.
        pdp10-*)
@@ -1310,6 +1421,9 @@ case $basic_machine in
        m68*-cisco)
                os=-aout
                ;;
+        mep-*)
+               os=-elf
+               ;;
        mips*-cisco)
                os=-elf
                ;;
@@ -1328,9 +1442,15 @@ case $basic_machine in
        *-be)
                os=-beos
                ;;
+       *-haiku)
+               os=-haiku
+               ;;
        *-ibm)
                os=-aix
                ;;
+       *-knuth)
+               os=-mmixware
+               ;;
        *-wec)
                os=-proelf
                ;;
@@ -1463,9 +1583,15 @@ case $basic_machine in
                        -mvs* | -opened*)
                                vendor=ibm
                                ;;
+                       -os400*)
+                               vendor=ibm
+                               ;;
                        -ptx*)
                                vendor=sequent
                                ;;
+                       -tpf*)
+                               vendor=ibm
+                               ;;
                        -vxsim* | -vxworks* | -windiss*)
                                vendor=wrs
                                ;;
@@ -1490,7 +1616,7 @@ case $basic_machine in
 esac
 
 echo $basic_machine$os
-exit 0
+exit
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
index 6260432c7b793fac80c99d8d168378e94208d3f9..9af03d484dffff05a24c26917ce3b00fcd44551a 100755 (executable)
--- a/configure
+++ b/configure
@@ -2053,6 +2053,9 @@ echo "command line was: $0 $@"
 
 
 
+
+
+
 
 
 
@@ -2083,7 +2086,20 @@ done
 
 ###############################################################################
 #
-#       Functions to figure out how to disable // comments in ANSI C code.
+#       Check for availability of various gcc command-line options.
+#
+###############################################################################
+
+
+
+
+
+
+
+
+###############################################################################
+#
+#       Function to figure out how to disable // comments in ANSI C code.
 #
 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
@@ -2917,11 +2933,11 @@ See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-rm -f conftest$ac_cv_exeext
+rm -rf conftest$ac_cv_exeext
 { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
 echo "${ECHO_T}$ac_cv_exeext" >&6; }
 
-rm -f conftest.$ac_ext
+rm -rf conftest.$ac_ext
 EXEEXT=$ac_cv_exeext
 ac_exeext=$EXEEXT
 { echo "$as_me:$LINENO: checking for suffix of object files" >&5
@@ -2944,7 +2960,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.o conftest.obj
+rm -rf conftest.o conftest.obj
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -2974,7 +2990,7 @@ See \`config.log' for more details." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
+rm -rf conftest.$ac_cv_objext conftest.$ac_ext
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
 echo "${ECHO_T}$ac_cv_objext" >&6; }
@@ -3003,7 +3019,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3013,7 +3029,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -3061,7 +3077,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3071,7 +3087,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -3099,7 +3115,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3109,7 +3125,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -3138,7 +3154,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3148,7 +3164,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -3257,7 +3273,7 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
        -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
 do
   CC="$ac_save_CC $ac_arg"
-  rm -f conftest.$ac_objext
+  rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3267,7 +3283,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -3285,7 +3301,7 @@ fi
 rm -f core conftest.err conftest.$ac_objext
   test "x$ac_cv_prog_cc_c89" != "xno" && break
 done
-rm -f conftest.$ac_ext
+rm -rf conftest.$ac_ext
 CC=$ac_save_CC
 
 fi
@@ -3364,7 +3380,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
  main(int ac, char **av) { return 0; }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -rf conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3408,8 +3424,8 @@ fi
 echo "${ECHO_T}Turning on gcc compiler warnings." >&6; }
     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
     OBJCC="$OBJCC -Wall"
-    # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
-    # and then perhaps we can do without -pedantic?
+    # As of gcc 3.4, we have "-Wdeclaration-after-statement"
+    # and so perhaps now we can do without -pedantic?
   else
     case "$host" in
       *-irix5* |*-irix6.0-3* )
@@ -3426,14 +3442,84 @@ echo "${ECHO_T}Turning on SGI compiler warnings." >&6; }
     esac
   fi
 
+if test -n "$GCC"; then
+   { echo "$as_me:$LINENO: checking whether gcc accepts -Wno-overlength-strings" >&5
+echo $ECHO_N "checking whether gcc accepts -Wno-overlength-strings... $ECHO_C" >&6; }
+if test "${ac_cv_gcc_accepts_no_overlength+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -rf conftest.$ac_ext
+     touch conftest.$ac_ext
+     if ( ( gcc -c -Wno-overlength-strings conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
+          grep unrecognized >/dev/null ); then
+       ac_cv_gcc_accepts_no_overlength=no
+     else
+       ac_cv_gcc_accepts_no_overlength=yes
+     fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_overlength" >&5
+echo "${ECHO_T}$ac_cv_gcc_accepts_no_overlength" >&6; }
+   ac_gcc_accepts_no_overlength="$ac_cv_gcc_accepts_no_overlength"
+  fi
+
+if test -n "$GCC"; then
+   { echo "$as_me:$LINENO: checking whether gcc accepts -Wdeclaration-after-statement" >&5
+echo $ECHO_N "checking whether gcc accepts -Wdeclaration-after-statement... $ECHO_C" >&6; }
+if test "${ac_cv_gcc_accepts_no_decl_after+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -rf conftest.$ac_ext
+     touch conftest.$ac_ext
+     if ( ( gcc -c -Wdeclaration-after-statement conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
+          grep unrecognized >/dev/null ); then
+       ac_cv_gcc_accepts_no_decl_after=no
+     else
+       ac_cv_gcc_accepts_no_decl_after=yes
+     fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_decl_after" >&5
+echo "${ECHO_T}$ac_cv_gcc_accepts_no_decl_after" >&6; }
+   ac_gcc_accepts_no_decl_after="$ac_cv_gcc_accepts_no_decl_after"
+  fi
+
 if test -n "$GCC"; then
    if test -n "$GCC"; then
-   { echo "$as_me:$LINENO: checking whether gcc accepts -std" >&5
-echo $ECHO_N "checking whether gcc accepts -std... $ECHO_C" >&6; }
+   { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
+echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
+if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  rm -rf conftest.$ac_ext
+     touch conftest.$ac_ext
+     if ( ( gcc -c -no-cpp-precomp conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
+          grep unrecognized >/dev/null ); then
+       ac_cv_gcc_accepts_no_cpp_precomp=no
+     else
+       ac_cv_gcc_accepts_no_cpp_precomp=yes
+     fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
+echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
+   ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
+  fi
+
+   if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
+     { echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
+echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6; }
+     CC="$CC -no-cpp-precomp"
+   fi
+  fi
+
+if test -n "$GCC"; then
+   if test -n "$GCC"; then
+   { echo "$as_me:$LINENO: checking whether gcc accepts -std=c89" >&5
+echo $ECHO_N "checking whether gcc accepts -std=c89... $ECHO_C" >&6; }
 if test "${ac_cv_gcc_accepts_std+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
+  rm -rf conftest.$ac_ext
+     touch conftest.$ac_ext
+     if ( ( gcc -c -std=c89 conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
           grep unrecognized >/dev/null ); then
        ac_cv_gcc_accepts_std=no
      else
@@ -3473,32 +3559,6 @@ echo "${ECHO_T}Disabling C++ comments in ANSI C code." >&6; }
    fi
   fi
 
-if test -n "$GCC"; then
-   if test -n "$GCC"; then
-   { echo "$as_me:$LINENO: checking whether gcc accepts -no-cpp-precomp" >&5
-echo $ECHO_N "checking whether gcc accepts -no-cpp-precomp... $ECHO_C" >&6; }
-if test "${ac_cv_gcc_accepts_no_cpp_precomp+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
-          grep unrecognized >/dev/null ); then
-       ac_cv_gcc_accepts_no_cpp_precomp=no
-     else
-       ac_cv_gcc_accepts_no_cpp_precomp=yes
-     fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_gcc_accepts_no_cpp_precomp" >&5
-echo "${ECHO_T}$ac_cv_gcc_accepts_no_cpp_precomp" >&6; }
-   ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
-  fi
-
-   if test "$ac_gcc_accepts_no_cpp_precomp" = yes ; then
-     { echo "$as_me:$LINENO: result: Disabling Objective C extensions in ANSI C code." >&5
-echo "${ECHO_T}Disabling Objective C extensions in ANSI C code." >&6; }
-     CC="$CC -no-cpp-precomp"
-   fi
-  fi
-
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -3548,7 +3608,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -3564,7 +3624,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 continue
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -3585,7 +3645,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -3603,11 +3663,11 @@ ac_preproc_ok=:
 break
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then
   break
 fi
@@ -3653,7 +3713,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -3669,7 +3729,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 continue
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 
   # OK, works on sane cases.  Now check whether nonexistent headers
   # can be detected and how.
@@ -3690,7 +3750,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -3708,11 +3768,11 @@ ac_preproc_ok=:
 break
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 
 done
 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 if $ac_preproc_ok; then
   :
 else
@@ -3798,7 +3858,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3808,7 +3868,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -3855,7 +3915,7 @@ $ac_kw foo_t foo () {return 0; }
 #endif
 
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -3865,7 +3925,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -4077,7 +4137,7 @@ case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *)
     eval ac_cv_prog_make_${ac_make}_set=no;;
 esac
-rm -f conftest.make
+rm -rf conftest.make
 fi
 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
   { echo "$as_me:$LINENO: result: yes" >&5
@@ -4146,7 +4206,7 @@ case `"$ac_path_GREP" --version 2>&1` in
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break
   done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+  rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
 
@@ -4228,7 +4288,7 @@ case `"$ac_path_EGREP" --version 2>&1` in
     # 10*(2^10) chars as input seems more than enough
     test $ac_count -gt 10 && break
   done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+  rm -rf conftest.in conftest.tmp conftest.nl conftest.out;;
 esac
 
 
@@ -4285,7 +4345,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4295,7 +4355,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -4329,7 +4389,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -rf conftest*
 
 fi
 
@@ -4350,7 +4410,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -rf conftest*
 
 fi
 
@@ -4390,7 +4450,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -rf conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4464,7 +4524,7 @@ $ac_includes_default
 
 #include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4474,7 +4534,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -4530,7 +4590,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4540,7 +4600,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -4579,7 +4639,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -4594,7 +4654,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -4668,7 +4728,7 @@ if (sizeof (ac__type_new_))
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4678,7 +4738,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -4731,7 +4791,7 @@ if (sizeof (ac__type_new_))
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4741,7 +4801,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -4794,7 +4854,7 @@ if (sizeof (ac__type_new_))
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4804,7 +4864,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -4855,7 +4915,7 @@ return *(signal (0, 0)) (0) == 1;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4865,7 +4925,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -4914,7 +4974,7 @@ return 0;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4924,7 +4984,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -4981,7 +5041,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -4991,7 +5051,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5049,7 +5109,7 @@ return 0;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5059,7 +5119,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5125,7 +5185,7 @@ for ac_lib in '' dir; do
     ac_res=-l$ac_lib
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
+  rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5135,7 +5195,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5209,7 +5269,7 @@ for ac_lib in '' x; do
     ac_res=-l$ac_lib
     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
   fi
-  rm -f conftest.$ac_objext conftest$ac_exeext
+  rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5219,7 +5279,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5281,7 +5341,7 @@ struct timeval tv; struct timezone tzp;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5291,7 +5351,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5319,7 +5379,7 @@ struct timeval tv; gettimeofday(&tv);
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5329,7 +5389,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5437,7 +5497,7 @@ return $ac_func ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5447,7 +5507,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5534,7 +5594,7 @@ return $ac_func ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5544,7 +5604,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5628,7 +5688,7 @@ return $ac_func ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5638,7 +5698,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5721,7 +5781,7 @@ struct icmp i;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5731,7 +5791,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5804,7 +5864,7 @@ struct icmphdr i;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5814,7 +5874,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5866,7 +5926,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -5876,7 +5936,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -5915,7 +5975,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -5930,7 +5990,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -6165,7 +6225,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -6186,7 +6246,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
 done
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 fi # $ac_x_includes = no
 
 if test "$ac_x_libraries" = no; then
@@ -6210,7 +6270,7 @@ XrmInitialize ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6220,7 +6280,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6323,7 +6383,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6333,7 +6393,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6364,7 +6424,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6374,7 +6434,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6436,7 +6496,7 @@ return XOpenDisplay ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6446,7 +6506,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6488,7 +6548,7 @@ return dnet_ntoa ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6498,7 +6558,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6554,7 +6614,7 @@ return dnet_ntoa ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6564,7 +6624,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6655,7 +6715,7 @@ return gethostbyname ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6665,7 +6725,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6717,7 +6777,7 @@ return gethostbyname ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6727,7 +6787,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6783,7 +6843,7 @@ return gethostbyname ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6793,7 +6853,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6879,7 +6939,7 @@ return connect ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6889,7 +6949,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -6941,7 +7001,7 @@ return connect ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -6951,7 +7011,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -7030,7 +7090,7 @@ return remove ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -7040,7 +7100,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -7092,7 +7152,7 @@ return remove ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -7102,7 +7162,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -7181,7 +7241,7 @@ return shmat ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -7191,7 +7251,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -7243,7 +7303,7 @@ return shmat ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -7253,7 +7313,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -7320,7 +7380,7 @@ return IceConnectionNumber ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -7330,7 +7390,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -7604,7 +7664,7 @@ return regcmp ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -7614,7 +7674,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -7680,7 +7740,7 @@ XPointer foo = (XPointer) 0;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -7690,7 +7750,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -7990,7 +8050,7 @@ if (sizeof (ac__type_new_))
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8000,7 +8060,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -8052,7 +8112,7 @@ char *p = (char *) alloca (2 * sizeof (int));
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8062,7 +8122,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -8132,7 +8192,7 @@ char *p = (char *) alloca (1);
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8142,7 +8202,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -8207,7 +8267,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   ac_cv_os_cray=no
 fi
-rm -f conftest*
+rm -rf conftest*
 
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
@@ -8265,7 +8325,7 @@ return $ac_func ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8275,7 +8335,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -8344,7 +8404,7 @@ main ()
   return find_stack_direction () < 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -rf conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8415,7 +8475,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8425,7 +8485,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -8464,7 +8524,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -8479,7 +8539,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -8583,7 +8643,7 @@ return $ac_func ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8593,7 +8653,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -8764,7 +8824,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -rf conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8807,7 +8867,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
-rm -f conftest.mmap
+rm -rf conftest.mmap
 
 
 
@@ -8844,7 +8904,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -8854,7 +8914,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -8893,7 +8953,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -8908,7 +8968,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -9023,7 +9083,7 @@ return $ac_func ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -9033,7 +9093,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -9085,7 +9145,7 @@ return LC_MESSAGES
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -9095,7 +9155,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -9156,7 +9216,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <libintl.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -9166,7 +9226,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -9205,7 +9265,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -9220,7 +9280,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -9281,7 +9341,7 @@ return (int) dgettext ("","")
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -9291,7 +9351,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -9343,7 +9403,7 @@ return bindtextdomain ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -9353,7 +9413,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -9410,7 +9470,7 @@ return dgettext ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -9420,7 +9480,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -9556,7 +9616,7 @@ return $ac_func ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -9566,7 +9626,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -9689,7 +9749,7 @@ extern int _nl_msg_cat_cntr;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -9699,7 +9759,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -9827,7 +9887,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <linux/version.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -9837,7 +9897,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -9876,7 +9936,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -9891,7 +9951,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -10009,7 +10069,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/Xmu/Error.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -10019,7 +10079,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -10098,7 +10158,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -10108,7 +10168,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -10153,7 +10213,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -10163,7 +10223,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -10366,7 +10426,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/XScreenSaver.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -10376,7 +10436,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -10497,7 +10557,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/xidle.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -10507,7 +10567,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -10629,7 +10689,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/XSGIvc.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -10639,7 +10699,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -10716,7 +10776,7 @@ return XSGIvcQueryGammaMap ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -10726,7 +10786,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -10862,7 +10922,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/dpms.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -10872,7 +10932,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -10951,7 +11011,7 @@ return DPMSInfo ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -10961,7 +11021,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -11044,7 +11104,7 @@ return DPMSInfo ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -11054,7 +11114,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -11191,7 +11251,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/Xinerama.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -11201,7 +11261,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -11280,7 +11340,7 @@ return XineramaQueryScreens ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -11290,7 +11350,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -11373,7 +11433,7 @@ return XineramaQueryScreens ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -11383,7 +11443,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -11521,7 +11581,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/xf86vmode.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -11531,7 +11591,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -11608,7 +11668,7 @@ return XF86VidModeGetViewPort ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -11618,7 +11678,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -11759,7 +11819,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/xf86vmode.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -11769,7 +11829,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -11847,7 +11907,7 @@ return XF86VidModeSetGamma ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -11857,7 +11917,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -11942,7 +12002,7 @@ return XF86VidModeSetGammaRamp ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -11952,7 +12012,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -12103,7 +12163,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/Xrandr.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -12113,7 +12173,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -12192,7 +12252,7 @@ return XRenderSetSubpixelOrder ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -12202,7 +12262,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -12285,7 +12345,7 @@ return XRRGetScreenInfo ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -12295,7 +12355,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -12378,7 +12438,7 @@ return XRRGetScreenInfo ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -12388,7 +12448,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -12494,7 +12554,7 @@ return XF86MiscSetGrabKeysState ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -12504,7 +12564,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -12583,7 +12643,7 @@ else
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 fi
-rm -f conftest*
+rm -rf conftest*
 
   CPPFLAGS="$ac_save_CPPFLAGS"
 
 if test "${enable_locking+set}" = set; then
   enableval=$enable_locking; enable_locking="$enableval"
 else
-  enable_locking=yes
+  if test "$ac_macosx" = yes; then
+    # We can't lock on MacOS X, so default to not compiling in support for it.
+    # But allow --enable-locking to override that, so I can debug Linux locking
+    # under MacOS X11.
+    enable_locking=no
+   else
+    enable_locking=yes
+   fi
 fi
 
 if test "$enable_locking" = yes; then
@@ -12668,20 +12735,6 @@ else
   exit 1
 fi
 
-# We can't lock on MacOS X, so don't even bother compiling in support for it.
-#
-if test "$ac_macosx" = yes; then
-  if test "$enable_locking" = yes; then
-    { echo "$as_me:$LINENO: result: locking disabled: it doesn't work on MacOS X" >&5
-echo "${ECHO_T}locking disabled: it doesn't work on MacOS X" >&6; }
-    enable_locking=no
-    cat >>confdefs.h <<\_ACEOF
-#define NO_LOCKING 1
-_ACEOF
-
-  fi
-fi
-
 
 ###############################################################################
 #
@@ -12702,7 +12755,7 @@ _ACEOF
 
   true
 elif test "$enable_root_passwd" != no; then
-  echo "error: something wrong with root-passwd option. Check configure.in ."
+  echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
   exit 1
 fi
 
@@ -12818,7 +12871,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -12828,7 +12881,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -12892,7 +12945,7 @@ return dlopen ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -12902,7 +12955,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -12960,7 +13013,7 @@ return sigtimedwait ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -12970,7 +13023,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 echo "${ECHO_T}$ac_cv_lib_c_sigtimedwait" >&6; }
 if test $ac_cv_lib_c_sigtimedwait = yes; then
   have_timedwait=yes
+                  cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGTIMEDWAIT 1
+_ACEOF
+
 fi
 
     if test "$have_timedwait" = no ; then
@@ -13026,7 +13083,7 @@ return sigtimedwait ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13036,7 +13093,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
 { echo "$as_me:$LINENO: result: $ac_cv_lib_rt_sigtimedwait" >&5
 echo "${ECHO_T}$ac_cv_lib_rt_sigtimedwait" >&6; }
 if test $ac_cv_lib_rt_sigtimedwait = yes; then
-  PASSWD_LIBS="${PASSWD_LIBS} -lrt"
+  have_timedwait=yes
+                                      cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGTIMEDWAIT 1
+_ACEOF
+
+                                      PASSWD_LIBS="${PASSWD_LIBS} -lrt"
 fi
 
     fi
@@ -13069,6 +13131,13 @@ echo $ECHO_N "checking how to call pam_strerror... $ECHO_C" >&6; }
     if test "${ac_cv_pam_strerror_args+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
+
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
   cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -13076,18 +13145,18 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <stdio.h>
-                      #include <stdlib.h>
-                      #include <security/pam_appl.h>
+                        #include <stdlib.h>
+                        #include <security/pam_appl.h>
 int
 main ()
 {
 pam_handle_t *pamh = 0;
-                      char *s = pam_strerror(pamh, PAM_SUCCESS);
+                        char *s = pam_strerror(pamh, PAM_SUCCESS);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13097,7 +13166,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -13109,25 +13178,32 @@ else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-       cat >conftest.$ac_ext <<_ACEOF
+
+  ac_save_CPPFLAGS="$CPPFLAGS"
+  if test \! -z "$includedir" ; then
+    CPPFLAGS="$CPPFLAGS -I$includedir"
+  fi
+  CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+  CPPFLAGS=`eval eval eval eval eval eval eval eval eval echo $CPPFLAGS`
+  cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <stdio.h>
-                                      #include <stdlib.h>
-                                      #include <security/pam_appl.h>
+                                          #include <stdlib.h>
+                                          #include <security/pam_appl.h>
 int
 main ()
 {
 char *s =
-                                       pam_strerror(PAM_SUCCESS);
+                                           pam_strerror(PAM_SUCCESS);
   ;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13137,7 +13213,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -13153,9 +13229,11 @@ sed 's/^/| /' conftest.$ac_ext >&5
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CPPFLAGS="$ac_save_CPPFLAGS"
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  CPPFLAGS="$ac_save_CPPFLAGS"
       ac_cv_pam_strerror_args=$ac_pam_strerror_args
 fi
 
@@ -13200,7 +13278,7 @@ pam_handle_t *pamh = 0;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13210,7 +13288,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -13341,7 +13419,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13351,7 +13429,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -13398,7 +13476,7 @@ main ()
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13408,7 +13486,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -13497,7 +13575,7 @@ return krb_get_tf_realm ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13507,7 +13585,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -13612,7 +13690,7 @@ return crypt ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13622,7 +13700,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -13709,7 +13787,7 @@ return res_search ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13719,7 +13797,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -13772,7 +13850,7 @@ return res_search ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13782,7 +13860,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -13929,7 +14007,7 @@ struct passwd_adjunct *p = getpwanam("nobody");
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -13939,7 +14017,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14011,7 +14089,7 @@ struct pr_passwd *p;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14021,7 +14099,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14079,7 +14157,7 @@ return getprpwnam ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14089,7 +14167,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14143,7 +14221,7 @@ return getprpwnam ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14153,7 +14231,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14224,7 +14302,7 @@ struct s_passwd *p = getspwnam("nobody");
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14234,7 +14312,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14289,7 +14367,7 @@ return bigcrypt ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14299,7 +14377,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14400,7 +14478,7 @@ struct spwd *p = getspnam("nobody");
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14410,7 +14488,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14465,7 +14543,7 @@ return getspnam ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14475,7 +14553,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14531,7 +14609,7 @@ return getspnam ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14541,7 +14619,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14611,7 +14689,7 @@ return crypt ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14621,7 +14699,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14677,7 +14755,7 @@ return crypt ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -14687,7 +14765,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -14832,6 +14910,9 @@ if test -n "$with_login_manager_req" ; then
  fi
 
   case "$with_login_manager_req" in
+    no)
+      with_login_manager=""
+    ;;
     /*)
       # absolute path
       set dummy $with_login_manager_req ; login_manager_tmp=$2
@@ -15364,7 +15445,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <Xm/Xm.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -15374,7 +15455,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -15432,7 +15513,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <Xm/ComboBox.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -15442,7 +15523,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -15508,7 +15589,7 @@ long vers = LesstifVersion;
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -15518,7 +15599,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -15581,7 +15662,7 @@ cat >>conftest.$ac_ext <<_ACEOF
                        exit(0);
                      }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -rf conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -15621,7 +15702,7 @@ fi
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_lesstif_version_string" >&5
 echo "${ECHO_T}$ac_cv_lesstif_version_string" >&6; }
-  rm -f conftest-lt
+  rm -rf conftest-lt
   lesstif_version=$ac_cv_lesstif_version
   lesstif_version_string=$ac_cv_lesstif_version_string
 
@@ -15664,7 +15745,7 @@ cat >>conftest.$ac_ext <<_ACEOF
                        exit(0);
                      }
 _ACEOF
-rm -f conftest$ac_exeext
+rm -rf conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -15704,7 +15785,7 @@ fi
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_motif_version_string" >&5
 echo "${ECHO_T}$ac_cv_motif_version_string" >&6; }
-  rm -f conftest-mt
+  rm -rf conftest-mt
   motif_version=$ac_cv_motif_version
   motif_version_string=$ac_cv_motif_version_string
 
@@ -15803,7 +15884,7 @@ return XpQueryExtension ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -15813,7 +15894,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -15904,7 +15985,7 @@ return _Xsetlocale ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -15914,7 +15995,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -16048,7 +16129,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <GL/gl.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16058,7 +16139,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -16097,7 +16178,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -16112,7 +16193,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -16183,7 +16264,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <GL/glx.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16193,7 +16274,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -16258,7 +16339,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "Mesa|MESA" >/dev/null 2>&1; then
   ac_cv_have_mesa_gl=yes
 fi
-rm -f conftest*
+rm -rf conftest*
 
   CPPFLAGS="$ac_save_CPPFLAGS"
        fi
@@ -16328,7 +16409,7 @@ return pthread_create ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16338,7 +16419,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -16421,7 +16502,7 @@ return glXCreateContext ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16431,7 +16512,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -16513,7 +16594,7 @@ return glXCreateContext ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16523,7 +16604,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -16592,7 +16673,7 @@ if test "${ac_cv_mesagl_version_string+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 16599 "configure"
+#line 16680 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 #ifndef MESA_MAJOR_VERSION
@@ -16638,7 +16719,7 @@ EOF
              's/^configure: *\([0-9][0-9]*\)  *\([0-9].*\)$/\1.\2/p'`
 
 
-         rm -f conftest.$ac_ext
+         rm -rf conftest.$ac_ext
 
          CPPFLAGS="$ac_save_CPPFLAGS"
 
@@ -16720,7 +16801,7 @@ return glBindTexture ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16730,7 +16811,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -16865,7 +16946,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <GL/gle.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16875,7 +16956,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -16927,7 +17008,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <GL/gutil.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16937,7 +17018,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -16987,7 +17068,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <GL/tube.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -16997,7 +17078,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -17078,7 +17159,7 @@ return gleCreateGC ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -17088,7 +17169,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -17184,7 +17265,7 @@ return uview_direction ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -17194,7 +17275,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -17275,7 +17356,7 @@ return uview_direction_d ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -17285,7 +17366,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -17494,7 +17575,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <gdk-pixbuf/gdk-pixbuf.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -17504,7 +17585,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -17543,7 +17624,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -17558,7 +17639,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -17637,7 +17718,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <gdk-pixbuf/gdk-pixbuf-xlib.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -17647,7 +17728,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -17686,7 +17767,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -17701,7 +17782,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -17781,7 +17862,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <gdk-pixbuf-xlib/gdk-pixbuf-xlib.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -17791,7 +17872,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -17830,7 +17911,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -17845,7 +17926,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -17954,7 +18035,7 @@ return gdk_pixbuf_new_from_file ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -17964,7 +18045,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -18045,7 +18126,7 @@ return gdk_pixbuf_xlib_init ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18055,7 +18136,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -18188,7 +18269,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/xpm.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18198,7 +18279,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -18346,7 +18427,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <jpeglib.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18356,7 +18437,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -18395,7 +18476,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -18410,7 +18491,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -18509,7 +18590,7 @@ return jpeg_start_compress ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18519,7 +18600,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -18594,7 +18675,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <$ac_header>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18604,7 +18685,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -18643,7 +18724,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -18658,7 +18739,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -18756,7 +18837,7 @@ return forkpty ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18766,7 +18847,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -18852,7 +18933,7 @@ return forkpty ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18862,7 +18943,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -18985,7 +19066,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/XShm.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -18995,7 +19076,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -19052,7 +19133,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <sys/ipc.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -19062,7 +19143,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -19101,7 +19182,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -19116,7 +19197,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -19195,7 +19276,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 $ac_includes_default
 #include <sys/shm.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -19205,7 +19286,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -19244,7 +19325,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } >/dev/null && {
@@ -19259,7 +19340,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
   ac_header_preproc=no
 fi
 
-rm -f conftest.err conftest.$ac_ext
+rm -rf conftest.err conftest.$ac_ext
 { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 echo "${ECHO_T}$ac_header_preproc" >&6; }
 
@@ -19365,7 +19446,7 @@ return XShmQueryExtension ();
   return 0;
 }
 _ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
+rm -rf conftest.$ac_objext conftest$ac_exeext
 if { (ac_try="$ac_link"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -19375,7 +19456,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_link") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -19511,7 +19592,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/Xdbe.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -19521,7 +19602,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -19648,7 +19729,7 @@ cat >>conftest.$ac_ext <<_ACEOF
 
 #include <X11/extensions/readdisplay.h>
 _ACEOF
-rm -f conftest.$ac_objext
+rm -rf conftest.$ac_objext
 if { (ac_try="$ac_compile"
 case "(($ac_try" in
   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
@@ -19658,7 +19739,7 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
   (eval "$ac_compile") 2>conftest.er1
   ac_status=$?
   grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
+  rm -rf conftest.er1
   cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } && {
@@ -21354,7 +21435,7 @@ _ACEOF
 
 # Transform confdefs.h into a sed script `conftest.defines', that
 # substitutes the proper values into config.h.in to produce config.h.
-rm -f conftest.defines conftest.tail
+rm -rf conftest.defines conftest.tail
 # First, append a space to every undef/define line, to ease matching.
 echo 's/$/ /' >conftest.defines
 # Then, protect against being on the right side of a sed subst, or in
@@ -21421,10 +21502,10 @@ _ACEOF
   ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
   sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
   grep . conftest.tail >/dev/null || break
-  rm -f conftest.defines
+  rm -rf conftest.defines
   mv conftest.tail conftest.defines
 done
-rm -f conftest.defines conftest.tail
+rm -rf conftest.defines conftest.tail
 
 echo "ac_result=$ac_in" >>$CONFIG_STATUS
 cat >>$CONFIG_STATUS <<\_ACEOF
@@ -21898,13 +21979,20 @@ if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
   warn 'Use of shadow passwords was requested, but they were not found.'
 fi
 
+if test "$ac_macosx" = yes ; then
+  if test "$enable_locking" = yes ; then
+    warn  "You have specified --enable-locking on MacOS X."
+    warn2 "THIS DOES NOT WORK!  Don't do this!"
+  fi
+fi
+
 
 # You are in a twisty maze of namespaces and syntaxes, all alike.
 # Fuck the skull of Unix.
 #
 bindir=`eval eval eval eval eval eval eval echo $bindir`
 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
-HACKDIR_CONF_DIR=`eval eval eval eval eval eval eval echo $HACKDIR_CONF_DIR`
+HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
 
 # canonicalize slashes.
 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
index 4088bf01a5c33bdfba4c1655d3ae0741a953c30f..9a049b55a7c474936da4ddd23428cce04fa3a616 100644 (file)
@@ -232,6 +232,9 @@ AH_TEMPLATE([PAM_STRERROR_TWO_ARGS],
            [Define if you have PAM and pam_strerror() requires two
            arguments.])
 
+AH_TEMPLATE([HAVE_SIGTIMEDWAIT],
+           [Define to 1 if you have the `sigtimedwait' function.])
+
 AH_TEMPLATE([HAVE_SHADOW_PASSWD],
            [Define this if your system uses 'shadow' passwords, that is, the
            passwords live in /etc/shadow instead of /etc/passwd, and one
@@ -350,8 +353,8 @@ AC_DEFUN(AC_PROG_CC_ANSI,
     AC_MSG_RESULT(Turning on gcc compiler warnings.)
     CC="$CC -pedantic -Wall -Wstrict-prototypes -Wnested-externs -Wmissing-prototypes"
     OBJCC="$OBJCC -Wall"
-    # supposedly gcc 3.4 will have "-Wdeclaration-after-statement"
-    # and then perhaps we can do without -pedantic?
+    # As of gcc 3.4, we have "-Wdeclaration-after-statement"
+    # and so perhaps now we can do without -pedantic?
   else
     case "$host" in
       *-irix5* |*-irix6.[0-3]* )
@@ -371,7 +374,36 @@ AC_DEFUN(AC_PROG_CC_ANSI,
 
 ###############################################################################
 #
-#       Functions to figure out how to disable // comments in ANSI C code.
+#       Check for availability of various gcc command-line options.
+#
+###############################################################################
+
+AC_DEFUN(AC_CHECK_GCC_ARG,
+ [if test -n "$GCC"; then
+   AC_CACHE_CHECK([whether gcc accepts [$2]],
+     ac_cv_gcc_accepts_[$1],
+    [rm -rf conftest.$ac_ext
+     touch conftest.$ac_ext
+     if ( ( gcc -c [$2] conftest.$ac_ext -o/dev/null >/dev/null ) 2>&1 | \
+          grep unrecognized >/dev/null ); then
+       ac_cv_gcc_accepts_[$1]=no
+     else
+       ac_cv_gcc_accepts_[$1]=yes
+     fi])
+   ac_gcc_accepts_[$1]="$ac_cv_gcc_accepts_[$1]"
+  fi
+])
+
+AC_DEFUN(AC_NO_LONG_STRING_WARNINGS,
+         [AC_CHECK_GCC_ARG(no_overlength, -Wno-overlength-strings)])
+
+AC_DEFUN(AC_NO_MISPLACED_DECLARATIONS,
+         [AC_CHECK_GCC_ARG(no_decl_after, -Wdeclaration-after-statement)])
+
+
+###############################################################################
+#
+#       Function to figure out how to disable // comments in ANSI C code.
 #
 #       (With recent gcc, this is done with "-std=c89".  With older gcc, this
 #       is done by passing "-lang-c89" to cpp, by passing "-Wp,-lang-c89" to
@@ -390,18 +422,7 @@ AC_DEFUN(AC_PROG_CC_ANSI,
 ###############################################################################
 
 AC_DEFUN(AC_GCC_ACCEPTS_STD,
- [if test -n "$GCC"; then
-   AC_CACHE_CHECK([whether gcc accepts -std],
-     ac_cv_gcc_accepts_std,
-    [if ( ( gcc -E -std=c89 - </dev/null >/dev/null ) 2>&1 | \
-          grep unrecognized >/dev/null ); then
-       ac_cv_gcc_accepts_std=no
-     else
-       ac_cv_gcc_accepts_std=yes
-     fi])
-   ac_gcc_accepts_std="$ac_cv_gcc_accepts_std"
-  fi
-])
+         [AC_CHECK_GCC_ARG(std, -std=c89)])
 
 AC_DEFUN(AC_NO_CPLUSPLUS_COMMENTS_IN_C_CODE,
  [if test -n "$GCC"; then
@@ -443,18 +464,7 @@ AC_DEFUN(AC_NO_CPLUSPLUS_COMMENTS_IN_C_CODE,
 ###############################################################################
 
 AC_DEFUN(AC_GCC_ACCEPTS_NO_CPP_PRECOMP,
- [if test -n "$GCC"; then
-   AC_CACHE_CHECK([whether gcc accepts -no-cpp-precomp],
-     ac_cv_gcc_accepts_no_cpp_precomp,
-    [if ( ( gcc -E -no-cpp-precomp - </dev/null >/dev/null ) 2>&1 | \
-          grep unrecognized >/dev/null ); then
-       ac_cv_gcc_accepts_no_cpp_precomp=no
-     else
-       ac_cv_gcc_accepts_no_cpp_precomp=yes
-     fi])
-   ac_gcc_accepts_no_cpp_precomp="$ac_cv_gcc_accepts_no_cpp_precomp"
-  fi
-])
+         [AC_CHECK_GCC_ARG(no_cpp_precomp, -no-cpp-precomp)])
 
 AC_DEFUN(AC_NO_OBJECTIVE_C,
  [if test -n "$GCC"; then
@@ -1101,8 +1111,10 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 # random compiler setup
 AC_CANONICAL_HOST
 AC_PROG_CC_ANSI
-AC_NO_CPLUSPLUS_COMMENTS_IN_C_CODE
+AC_NO_LONG_STRING_WARNINGS
+AC_NO_MISPLACED_DECLARATIONS
 AC_NO_OBJECTIVE_C
+AC_NO_CPLUSPLUS_COMMENTS_IN_C_CODE
 AC_PROG_CPP
 AC_C_CONST
 AC_C_INLINE
@@ -1777,7 +1789,15 @@ fi
 AC_ARG_ENABLE(locking,[Screen locking options:
   --enable-locking        Compile in support for locking the display.
   --disable-locking       Do not allow locking at all.],
-  [enable_locking="$enableval"],[enable_locking=yes])
+  [enable_locking="$enableval"],
+  [if test "$ac_macosx" = yes; then
+    # We can't lock on MacOS X, so default to not compiling in support for it.
+    # But allow --enable-locking to override that, so I can debug Linux locking
+    # under MacOS X11.
+    enable_locking=no
+   else
+    enable_locking=yes
+   fi])
 if test "$enable_locking" = yes; then
   true
 elif test "$enable_locking" = no; then
@@ -1787,16 +1807,6 @@ else
   exit 1
 fi
 
-# We can't lock on MacOS X, so don't even bother compiling in support for it.
-#
-if test "$ac_macosx" = yes; then
-  if test "$enable_locking" = yes; then
-    AC_MSG_RESULT(locking disabled: it doesn't work on MacOS X)
-    enable_locking=no
-    AC_DEFINE(NO_LOCKING)
-  fi
-fi
-
 
 ###############################################################################
 #
@@ -1811,7 +1821,7 @@ if test "$enable_root_passwd" = yes; then
   AC_DEFINE(ALLOW_ROOT_PASSWD)
   true
 elif test "$enable_root_passwd" != no; then
-  echo "error: something wrong with root-passwd option. Check configure.in ."
+  echo "error: must be yes or no: --enable-root-passwd=$enable_root_passwd"
   exit 1
 fi
 
@@ -1866,26 +1876,30 @@ if test "$enable_locking" = yes -a "$with_pam" = yes; then
 
     # On Linux, sigtimedwait() is in libc; on Solaris, it's in librt.
     have_timedwait=no
-    AC_CHECK_LIB(c, sigtimedwait, [have_timedwait=yes])
+    AC_CHECK_LIB(c, sigtimedwait,
+                 [have_timedwait=yes
+                  AC_DEFINE(HAVE_SIGTIMEDWAIT)])
     if test "$have_timedwait" = no ; then
-      AC_CHECK_LIB(rt, sigtimedwait, [PASSWD_LIBS="${PASSWD_LIBS} -lrt"])
+      AC_CHECK_LIB(rt, sigtimedwait, [have_timedwait=yes
+                                      AC_DEFINE(HAVE_SIGTIMEDWAIT)
+                                      PASSWD_LIBS="${PASSWD_LIBS} -lrt"])
     fi
 
     AC_MSG_CHECKING(how to call pam_strerror)
     AC_CACHE_VAL(ac_cv_pam_strerror_args,
-     [AC_TRY_COMPILE([#include <stdio.h>
-                      #include <stdlib.h>
-                      #include <security/pam_appl.h>],
-                     [pam_handle_t *pamh = 0;
-                      char *s = pam_strerror(pamh, PAM_SUCCESS);],
-                     [ac_pam_strerror_args=2],
-                     [AC_TRY_COMPILE([#include <stdio.h>
-                                      #include <stdlib.h>
-                                      #include <security/pam_appl.h>],
-                                     [char *s =
-                                       pam_strerror(PAM_SUCCESS);],
-                                     [ac_pam_strerror_args=1],
-                                     [ac_pam_strerror_args=0])])
+     [AC_TRY_X_COMPILE([#include <stdio.h>
+                        #include <stdlib.h>
+                        #include <security/pam_appl.h>],
+                       [pam_handle_t *pamh = 0;
+                        char *s = pam_strerror(pamh, PAM_SUCCESS);],
+                       [ac_pam_strerror_args=2],
+                       [AC_TRY_X_COMPILE([#include <stdio.h>
+                                          #include <stdlib.h>
+                                          #include <security/pam_appl.h>],
+                                         [char *s =
+                                           pam_strerror(PAM_SUCCESS);],
+                                         [ac_pam_strerror_args=1],
+                                         [ac_pam_strerror_args=0])])
       ac_cv_pam_strerror_args=$ac_pam_strerror_args])
     ac_pam_strerror_args=$ac_cv_pam_strerror_args
     if test "$ac_pam_strerror_args" = 1 ; then
@@ -2287,6 +2301,9 @@ if test -n "$with_login_manager_req" ; then
  fi
 
   case "$with_login_manager_req" in
+    no)
+      with_login_manager=""
+    ;;
     /*)
       # absolute path
       set dummy $with_login_manager_req ; login_manager_tmp=$2
@@ -4114,13 +4131,20 @@ if test "$with_shadow_req" = yes -a "$have_shadow" = no ; then
   warn 'Use of shadow passwords was requested, but they were not found.'
 fi
 
+if test "$ac_macosx" = yes ; then
+  if test "$enable_locking" = yes ; then
+    warn  "You have specified --enable-locking on MacOS X."
+    warn2 "THIS DOES NOT WORK!  Don't do this!"
+  fi
+fi
+
 
 # You are in a twisty maze of namespaces and syntaxes, all alike.
 # Fuck the skull of Unix.
 #
 bindir=`eval eval eval eval eval eval eval echo $bindir`
 HACKDIR=`eval eval eval eval eval eval eval echo $HACKDIR`
-HACKDIR_CONF_DIR=`eval eval eval eval eval eval eval echo $HACKDIR_CONF_DIR`
+HACK_CONF_DIR=`eval eval eval eval eval eval eval echo $HACK_CONF_DIR`
 
 # canonicalize slashes.
 bindir=`echo  "${bindir}"              | sed 's@/$@@;s@//*@/@g'`
index b46239ac1c9a588332c45bcf963c2662626260c8..d9e4d755d1c065abe6f2bc4fb095c73e303a9c18 100644 (file)
@@ -692,7 +692,7 @@ tags:
        find $(srcdir) -name '*.[chly]' -print | xargs etags -a
 
 echo_tarfiles:
-       @$(MAKE) XScreenSaver_ad.h XScreenSaver_Xm_ad.h 2>&1 >&/dev/null
+       @$(MAKE) XScreenSaver_ad.h XScreenSaver_Xm_ad.h 2>&1 >/dev/null
        @echo $(TARFILES)
 
 check_men:
@@ -901,7 +901,11 @@ lock.o: $(srcdir)/types.h
 lock.o: $(UTILS_SRC)/resources.h
 lock.o: $(srcdir)/xscreensaver.h
 mlstring.o: $(srcdir)/mlstring.h
+passwd.o: $(srcdir)/auth.h
 passwd.o: ../config.h
+passwd.o: $(srcdir)/prefs.h
+passwd.o: $(srcdir)/types.h
+passwd.o: $(srcdir)/xscreensaver.h
 passwd-pwent.o: ../config.h
 prefs.o: ../config.h
 prefs.o: $(srcdir)/prefs.h
index 012f4db6eb163e4179b688ed573925d27baa56e6..3798dbeb946bd30e6d8b96022caa2efcc6a078b5 100644 (file)
@@ -4,8 +4,8 @@
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
-!                              version 5.04
-!                              13-Nov-2007
+!                              version 5.05
+!                              01-Mar-2008
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at http://www.jwz.org/xscreensaver/
@@ -305,6 +305,7 @@ GetViewPortIsFullOfLies: False
                                cwaves -root                                \n\
                                m6502 -root                                 \n\
                                abstractile -root                           \n\
+-                              lcdscrub -root                              \n\
 - default-n:                   webcollage -root                            \n\
 - default-n:  "WebCollage (whacked)"                                         \
                                webcollage -root -filter                      \
@@ -395,6 +396,10 @@ GetViewPortIsFullOfLies: False
 @GL_KLUDGE@ GL:                        voronoi -root                               \n\
 @GL_KLUDGE@ GL:                        moebiusgears -root                          \n\
 @GL_KLUDGE@ GL:                        lockward -root                              \n\
+@GL_KLUDGE@ GL:                        cubicgrid -root                             \n\
+@GL_KLUDGE@ GL:                        hypnowheel -root                            \n\
+@GL_KLUDGE@ GL:        "Hypnowheel (dense)"    hypnowheel -root -count 3 -layers 50 \n\
+@GL_KLUDGE@ GL:        "Hypnowheel (trifoil)"  hypnowheel -root -count 3 -layers 2 -speed 9 -twist 9 -wander \n\
                                                                              \
 -                              xdaliclock -root -font BUILTIN3             \n\
 -                              xplanet -vroot -wait 1 -timewarp 90000        \
@@ -468,7 +473,7 @@ XScreenSaver.bourneShell:           /bin/sh
 *passwd.uname:                  True
 
 *splash.heading.label:         XScreenSaver %s
-*splash.body.label:            Copyright Â© 1991-2006 by
+*splash.body.label:            Copyright Â© 1991-2008 by
 *splash.body2.label:           Jamie Zawinski <jwz@jwz.org>
 *splash.demo.label:            Settings
 *splash.help.label:            Help
@@ -539,6 +544,8 @@ XScreenSaver.bourneShell:           /bin/sh
 *hacks.glschool.name:       GLSchool
 *hacks.glcells.name:        GLCells
 *hacks.moebiusgears.name:   MoebiusGears
+*hacks.cubicgrid.name:      CubicGrid
+*hacks.lcdscrub.name:       LCDscrub
 
 ! obsolete, but still used by xscreensaver-demo-Xm.
 *hacks.documentation.isInstalled: True
index a12ecc94dddcd5da99b49184b2e40cbac667c6fb..e556203d6b73e660d3f473e439d6ba0195dec70d 100644 (file)
                                cwaves -root                                \\n\
                                m6502 -root                                 \\n\
                                abstractile -root                           \\n\
+-                              lcdscrub -root                              \\n\
 - default-n:                   webcollage -root                            \\n\
 - default-n:  \"WebCollage (whacked)\"                                       \
                                webcollage -root -filter                      \
           GL:                  voronoi -root                               \\n\
           GL:                  moebiusgears -root                          \\n\
           GL:                  lockward -root                              \\n\
+          GL:                  cubicgrid -root                             \\n\
+          GL:                  hypnowheel -root                            \\n\
+          GL:  \"Hypnowheel (dense)\"  hypnowheel -root -count 3 -layers 50 \\n\
+          GL:  \"Hypnowheel (trifoil)\"        hypnowheel -root -count 3 -layers 2 -speed 9 -twist 9 -wander \\n\
                                                                              \
 -                              xdaliclock -root -font BUILTIN3             \\n\
 -                              xplanet -vroot -wait 1 -timewarp 90000        \
 "*passwd.asterisks:              True",
 "*passwd.uname:                  True",
 "*splash.heading.label:                XScreenSaver %s",
-"*splash.body.label:           Copyright Â© 1991-2006 by",
+"*splash.body.label:           Copyright Â© 1991-2008 by",
 "*splash.body2.label:          Jamie Zawinski <jwz@jwz.org>",
 "*splash.demo.label:           Settings",
 "*splash.help.label:           Help",
 "*hacks.glschool.name:       GLSchool",
 "*hacks.glcells.name:        GLCells",
 "*hacks.moebiusgears.name:   MoebiusGears",
+"*hacks.cubicgrid.name:      CubicGrid",
+"*hacks.lcdscrub.name:       LCDscrub",
 "*hacks.documentation.isInstalled: True",
index 66e34773f40b8105bf0d34c302d5f5dea4706078..d1eb3c85089901c9bc840c201580c7dbc711fb85 100644 (file)
@@ -1,5 +1,5 @@
 /* demo-Gtk.c --- implements the interactive demo-mode and options dialogs.
- * xscreensaver, Copyright (c) 1993-2007 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1993-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -756,9 +756,9 @@ about_menu_cb (GtkMenuItem *menuitem, gpointer user_data)
      look as good in the plain-old default Latin1 "C" locale.)
    */
 #ifdef HAVE_GTK2
-  sprintf(copy, ("Copyright \xC2\xA9 1991-2006 %s"), s);
+  sprintf(copy, ("Copyright \xC2\xA9 1991-2008 %s"), s);
 #else  /* !HAVE_GTK2 */
-  sprintf(copy, ("Copyright \251 1991-2006 %s"), s);
+  sprintf(copy, ("Copyright \251 1991-2008 %s"), s);
 #endif /* !HAVE_GTK2 */
 
   sprintf (msg, "%s\n\n%s", copy, desc);
@@ -982,7 +982,7 @@ await_xscreensaver (state *s)
                              the length ISO C89 compilers are required to
                              support" in the following expression... */
 # endif
-        strcat (buf,
+        strcat (buf, STFU
          _("You are running as root.  This usually means that xscreensaver\n"
             "was unable to contact your X server because access control is\n"
             "turned on.  Try running this command:\n"
@@ -1127,7 +1127,7 @@ force_list_select_item (state *s, GtkWidget *list, int list_elt, Bool scroll_p)
   if (!was) gtk_widget_set_sensitive (parent, True);
 #ifdef HAVE_GTK2
   model = gtk_tree_view_get_model (GTK_TREE_VIEW (list));
-  STFU g_assert (model);
+  g_assert (model);
   if (gtk_tree_model_iter_nth_child (model, &iter, NULL, list_elt))
     {
       selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (list));
@@ -4421,6 +4421,7 @@ g_log_handler (const gchar *log_domain, GLogLevelFlags log_level,
                       the .ad file... */
 #endif
 
+STFU
 static char *defaults[] = {
 #include "XScreenSaver_ad.h"
  0
index 4e1d0b547a9193c1d00ed8a72386c07fde200362..e1d29dc92a958b31d8cbf3b6489e5997df8d012b 100644 (file)
 
 #ifndef NO_LOCKING              /* (mostly) whole file */
 
-#ifdef HAVE_SYSLOG
-# include <syslog.h>
-#endif /* HAVE_SYSLOG */
-
 #ifdef HAVE_XHPDISABLERESET
 # include <X11/XHPlib.h>
   static void hp_lock_reset (saver_info *si, Bool lock_p);
@@ -112,6 +108,7 @@ struct passwd_dialog_data {
   char *date_label;
   char *passwd_string;
   Bool passwd_changed_p; /* Whether the user entry field needs redrawing */
+  Bool caps_p;          /* Whether we saw a keypress with caps-lock on */
   char *unlock_label;
   char *login_label;
   char *uname_label;
@@ -203,9 +200,6 @@ new_passwd_window (saver_info *si)
   pw->passwd_cursor = XCreateFontCursor (si->dpy, XC_top_left_arrow);
 
   pw->prompt_screen = ssi;
-  if (si->prefs.verbose_p)
-    fprintf (stderr, "%s: %d: creating password dialog.\n",
-             blurb(), pw->prompt_screen->number);
 
   screen = pw->prompt_screen->screen;
   cmap = DefaultColormapOfScreen (screen);
@@ -444,8 +438,9 @@ make_passwd_window (saver_info *si,
 
   pw->prompt_screen = ssi;
   if (si->prefs.verbose_p)
-    fprintf (stderr, "%s: %d: creating password dialog.\n",
-             blurb(), pw->prompt_screen->number);
+    fprintf (stderr, "%s: %d: creating password dialog (\"%s\")\n",
+             blurb(), pw->prompt_screen->number,
+             info_msg ? info_msg : "");
 
   screen = pw->prompt_screen->screen;
   cmap = DefaultColormapOfScreen (screen);
@@ -1289,6 +1284,10 @@ destroy_passwd_window (saver_info *si)
 
   if (si->passwd_dialog)
     {
+      if (si->prefs.verbose_p)
+        fprintf (stderr, "%s: %d: destroying password dialog.\n",
+                 blurb(), pw->prompt_screen->number);
+
       XDestroyWindow (si->dpy, si->passwd_dialog);
       si->passwd_dialog = 0;
     }
@@ -1763,7 +1762,6 @@ passwd_event_loop (saver_info *si)
   saver_preferences *p = &si->prefs;
   char *msg = 0;
   XEvent event;
-  unsigned int caps_p = 0;
 
   passwd_animate_timer ((XtPointer) si, 0);
 
@@ -1775,7 +1773,7 @@ passwd_event_loop (saver_info *si)
       else if (event.xany.type == KeyPress)
         {
           handle_passwd_key (si, &event.xkey);
-          caps_p = (event.xkey.state & LockMask);
+          si->pw_data->caps_p = (event.xkey.state & LockMask);
         }
       else if (event.xany.type == ButtonPress || 
                event.xany.type == ButtonRelease)
@@ -1797,73 +1795,15 @@ passwd_event_loop (saver_info *si)
     default: msg = 0; break;
     }
 
-  if (si->unlock_state == ul_fail)
-    si->unlock_failures++;
-
   if (p->verbose_p)
-    switch (si->unlock_state)
-      {
-      case ul_fail:
-       fprintf (stderr, "%s: auth/input incorrect!%s\n", blurb(),
-                 (caps_p ? "  (CapsLock)" : ""));
-        break;
-      case ul_cancel:
-       fprintf (stderr, "%s: input cancelled.\n", blurb()); break;
-      case ul_time:
-       fprintf (stderr, "%s: input timed out.\n", blurb()); break;
-      case ul_finished:
-       fprintf (stderr, "%s: input finished.\n", blurb()); break;
-      default: break;
-      }
-
-#ifdef HAVE_SYSLOG
-  if (si->unlock_state == ul_fail)
-    {
-      /* If they typed a password (as opposed to just hitting return) and
-        the password was invalid, log it.
-      */
-      struct passwd *pw = getpwuid (getuid ());
-      char *d = DisplayString (si->dpy);
-      char *u = (pw && pw->pw_name ? pw->pw_name : "???");
-      int opt = 0;
-      int fac = 0;
-
-# ifdef LOG_PID
-      opt = LOG_PID;
-# endif
-
-# if defined(LOG_AUTHPRIV)
-      fac = LOG_AUTHPRIV;
-# elif defined(LOG_AUTH)
-      fac = LOG_AUTH;
-# else
-      fac = LOG_DAEMON;
-# endif
-
-      if (!d) d = "";
-      openlog (progname, opt, fac);
-      syslog (LOG_NOTICE, "FAILED LOGIN %d ON DISPLAY \"%s\", FOR \"%s\"",
-             si->unlock_failures, d, u);
-      closelog ();
-    }
-#endif /* HAVE_SYSLOG */
-
-  if (si->unlock_state == ul_fail)
-    XBell (si->dpy, False);
-
-  if (si->unlock_state == ul_success && si->unlock_failures != 0)
-    {
-      if (si->unlock_failures == 1)
-       fprintf (real_stderr,
-                "%s: WARNING: 1 failed attempt to unlock the screen.\n",
-                blurb());
-      else
-       fprintf (real_stderr,
-                "%s: WARNING: %d failed attempts to unlock the screen.\n",
-                blurb(), si->unlock_failures);
-      fflush (real_stderr);
-
-      si->unlock_failures = 0;
+    switch (si->unlock_state) {
+    case ul_cancel:
+      fprintf (stderr, "%s: input cancelled.\n", blurb()); break;
+    case ul_time:
+      fprintf (stderr, "%s: input timed out.\n", blurb()); break;
+    case ul_finished:
+      fprintf (stderr, "%s: input finished.\n", blurb()); break;
+    default: break;
     }
 
   if (msg)
@@ -2050,22 +1990,58 @@ fail:
 void
 auth_finished_cb (saver_info *si)
 {
-  if (si->unlock_state == ul_fail)
-    {
-      make_passwd_window (si, "Authentication failed!", NULL, True);
-      sleep (2); /* Not very nice, I know */
+  char buf[1024];
+  const char *s;
 
-      /* Swallow any keyboard or mouse events that were received while the
-       * dialog was up */
-      {
-       XEvent e;
-       long mask = (KeyPressMask | KeyReleaseMask |
-                    ButtonPressMask | ButtonReleaseMask);
-       while (XCheckMaskEvent (si->dpy, mask, &e))
-         ;
-      }
+  /* If we have something to say, put the dialog back up for a few seconds
+     to display it.  Otherwise, don't bother.
+   */
+
+  if (si->unlock_state == ul_fail &&           /* failed with caps lock on */
+      si->pw_data && si->pw_data->caps_p)
+    s = "Authentication failed (Caps Lock?)";
+  else if (si->unlock_state == ul_fail)                /* failed without caps lock */
+    s = "Authentication failed!";
+  else if (si->unlock_state == ul_success &&   /* good, but report failures */
+           si->unlock_failures > 0)
+    {
+      if (si->unlock_failures == 1)
+        s = "There has been\n1 failed login attempt.";
+      else
+        {
+          sprintf (buf, "There have been\n%d failed login attempts.",
+                   si->unlock_failures);
+          s = buf;
+        }
+      si->unlock_failures = 0;
     }
+  else                                         /* good, with no failures, */
+    goto END;                                  /* or timeout, or cancel. */
+
+  make_passwd_window (si, s, NULL, True);
+  XSync (si->dpy, False);
 
+  {
+    int secs = 4;
+    time_t start = time ((time_t *) 0);
+    XEvent event;
+    while (time ((time_t *) 0) < start + secs)
+      if (XPending (si->dpy))
+        {
+          XNextEvent (si->dpy, &event);
+          if (event.xany.window == si->passwd_dialog && 
+              event.xany.type == Expose)
+            draw_passwd_window (si);
+          else if (event.xany.type == ButtonPress || 
+                   event.xany.type == ButtonRelease)
+            break;
+          XSync (si->dpy, False);
+        }
+      else
+        usleep (250000);  /* 1/4 second */
+  }
+
+ END:
   if (si->pw_data)
     destroy_passwd_window (si);
 }
@@ -2084,9 +2060,6 @@ unlock_p (saver_info *si)
 
   raise_window (si, True, True, True);
 
-  if (p->verbose_p)
-    fprintf (stderr, "%s: prompting for password.\n", blurb());
-
   xss_authenticate(si, p->verbose_p);
 
   return (si->unlock_state == ul_success);
index 448cd9cbf8da80d7a06fcdaf1fe3005d8b18e83b..334d12b913c83d8d42d7822099d47b727853a86c 100644 (file)
@@ -1,7 +1,7 @@
 /* passwd-pam.c --- verifying typed passwords with PAM
  * (Pluggable Authentication Modules.)
  * written by Bill Nottingham <notting@redhat.com> (and jwz) for
- * xscreensaver, Copyright (c) 1993-2003 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1993-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -237,11 +237,17 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
 
   PAM_NO_DELAY(pamh);
 
+  if (verbose_p)
+    fprintf (stderr, "%s:   pam_authenticate (...) ...\n", blurb());
+
   timeout.tv_sec = 0;
   timeout.tv_nsec = 1;
   set = block_sigchld();
   status = pam_authenticate (pamh, 0);
+# ifdef HAVE_SIGTIMEDWAIT
   sigtimedwait (&set, NULL, &timeout);
+  /* #### What is the portable thing to do if we don't have it? */
+# endif /* HAVE_SIGTIMEDWAIT */
   unblock_sigchld();
 
   if (verbose_p)
@@ -302,7 +308,13 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
                  (status2 == PAM_SUCCESS ? "Success" : "Failure"));
     }
 
-  si->unlock_state = (status == PAM_SUCCESS) ? ul_success : ul_fail;
+  if (status == PAM_SUCCESS)
+    si->unlock_state = ul_success;          /* yay */
+  else if (si->unlock_state == ul_cancel ||
+           si->unlock_state == ul_time)
+    ;                                       /* more specific failures ok */
+  else
+    si->unlock_state = ul_fail;                     /* generic failure */
 }
 
 
@@ -382,10 +394,13 @@ pam_conversation (int nmsgs,
   struct auth_response *authresp = 0;
   struct pam_response *pam_responses;
   saver_info *si = (saver_info *) vsaver_info;
+  Bool verbose_p;
 
   /* On SunOS 5.6, the `closure' argument always comes in as random garbage. */
   si = (saver_info *) suns_pam_implementation_blows;
 
+  verbose_p = si->prefs.verbose_p;
+
   /* Converting the PAM prompts into the XScreenSaver native format.
    * It was a design goal to collapse (INFO,PROMPT) pairs from PAM
    * into a single call to the unlock_cb function. The unlock_cb function
@@ -401,23 +416,40 @@ pam_conversation (int nmsgs,
   if (!pam_responses || !messages)
     goto end;
 
+  if (verbose_p)
+    fprintf (stderr, "%s:     pam_conversation (", blurb());
+
   for (i = 0; i < nmsgs; ++i)
     {
+      if (verbose_p && i > 0) fprintf (stderr, ", ");
+
       messages[i].msg = msg[i]->msg;
 
-      /* Default fallback of PROMPT_ECHO */
-      messages[i].type = 
-       msg[i]->msg_style == PAM_PROMPT_ECHO_OFF
-       ? AUTH_MSGTYPE_PROMPT_NOECHO
-       : msg[i]->msg_style == PAM_PROMPT_ECHO_ON
-         ? AUTH_MSGTYPE_PROMPT_ECHO
-         : msg[i]->msg_style == PAM_ERROR_MSG
-           ? AUTH_MSGTYPE_ERROR
-           : msg[i]->msg_style == PAM_TEXT_INFO
-             ? AUTH_MSGTYPE_INFO
-             : AUTH_MSGTYPE_PROMPT_ECHO;
+      switch (msg[i]->msg_style) {
+      case PAM_PROMPT_ECHO_OFF: messages[i].type = AUTH_MSGTYPE_PROMPT_NOECHO;
+        if (verbose_p) fprintf (stderr, "ECHO_OFF");
+        break;
+      case PAM_PROMPT_ECHO_ON:  messages[i].type = AUTH_MSGTYPE_PROMPT_ECHO;
+        if (verbose_p) fprintf (stderr, "ECHO_ON");
+        break;
+      case PAM_ERROR_MSG:       messages[i].type = AUTH_MSGTYPE_ERROR;
+        if (verbose_p) fprintf (stderr, "ERROR_MSG");
+        break;
+      case PAM_TEXT_INFO:       messages[i].type = AUTH_MSGTYPE_INFO;
+        if (verbose_p) fprintf (stderr, "TEXT_INFO");
+        break;
+      default:                  messages[i].type = AUTH_MSGTYPE_PROMPT_ECHO;
+        if (verbose_p) fprintf (stderr, "PROMPT_ECHO");
+        break;
+      }
+
+      if (verbose_p) 
+        fprintf (stderr, "=\"%s\"", msg[i]->msg ? msg[i]->msg : "(null)");
     }
 
+  if (verbose_p)
+    fprintf (stderr, ") ...\n");
+
   ret = si->unlock_cb(nmsgs, messages, &authresp, si);
 
   if (ret == 0)
@@ -433,6 +465,10 @@ end:
   if (authresp)
     free(authresp);
 
+  if (verbose_p)
+    fprintf (stderr, "%s:     pam_conversation (...) ==> %s\n", blurb(),
+             (ret == 0 ? "PAM_SUCCESS" : "PAM_CONV_ERR"));
+
   if (ret == 0)
     {
       *resp = pam_responses;
index 99fdee08c62744b45d5df7a307dee208fa071613..066bc81f9c608d6a0178c5be12605b30556efaaf 100644 (file)
 # include <unistd.h>
 #endif
 
+#ifndef VMS
+# include <pwd.h>              /* for getpwuid() */
+#else /* VMS */
+# include "vms-pwd.h"
+#endif /* VMS */
+
+#ifdef HAVE_SYSLOG
+# include <syslog.h>
+#endif /* HAVE_SYSLOG */
+
 #include <X11/Intrinsic.h>
 
+#include "xscreensaver.h"
 #include "auth.h"
 
 extern const char *blurb(void);
@@ -159,6 +170,9 @@ try_unlock_password(saver_info *si,
 
   memset(&message, 0, sizeof(message));
 
+  if (verbose_p)
+    fprintf(stderr, "%s: non-PAM password auth.\n", blurb());
+
   /* Call the auth_conv function with "Password:", then feed
    * the result into valid_p()
    */
@@ -170,7 +184,13 @@ try_unlock_password(saver_info *si,
   if (!response)
     return;
 
-  si->unlock_state = valid_p(response->response, verbose_p) ? ul_success : ul_fail;
+  if (valid_p (response->response, verbose_p))
+    si->unlock_state = ul_success;            /* yay */
+  else if (si->unlock_state == ul_cancel ||
+           si->unlock_state == ul_time)
+    ;                                         /* more specific failures ok */
+  else
+    si->unlock_state = ul_fail;                       /* generic failure */
 
   if (response->response)
     free(response->response);
@@ -178,6 +198,48 @@ try_unlock_password(saver_info *si,
 }
 
 
+/* Write a password failure to the system log.
+ */
+static void
+do_syslog (saver_info *si, Bool verbose_p)
+{
+# ifdef HAVE_SYSLOG
+  struct passwd *pw = getpwuid (getuid ());
+  char *d = DisplayString (si->dpy);
+  char *u = (pw && pw->pw_name ? pw->pw_name : "???");
+  int opt = 0;
+  int fac = 0;
+
+#  ifdef LOG_PID
+  opt = LOG_PID;
+#  endif
+
+#  if defined(LOG_AUTHPRIV)
+  fac = LOG_AUTHPRIV;
+#  elif defined(LOG_AUTH)
+  fac = LOG_AUTH;
+#  else
+  fac = LOG_DAEMON;
+#  endif
+
+  if (!d) d = "";
+
+#  undef FMT
+#  define FMT "FAILED LOGIN %d ON DISPLAY \"%s\", FOR \"%s\""
+
+  if (verbose_p)
+    fprintf (stderr, "%s: syslog: " FMT "\n", blurb(), 
+             si->unlock_failures, d, u);
+
+  openlog (progname, opt, fac);
+  syslog (LOG_NOTICE, FMT, si->unlock_failures, d, u);
+  closelog ();
+
+# endif /* HAVE_SYSLOG */
+}
+
+
+
 /**
  * Runs through each authentication driver calling its try_unlock function.
  * Called xss_authenticate() because AIX beat us to the name authenticate().
@@ -230,6 +292,12 @@ xss_authenticate(saver_info *si, Bool verbose_p)
   if (verbose_p)
     fprintf(stderr, "%s: All authentication mechanisms failed.\n", blurb());
 
+  if (si->unlock_state == ul_fail)
+    {
+      si->unlock_failures++;
+      do_syslog (si, verbose_p);
+    }
+
 DONE:
   if (si->auth_finished_cb)
     si->auth_finished_cb (si);
index d0949083074dc72882380690f6276ec686bc5040..ff745eb4f5dcdbab660f096f3c9b97b22b684a60 100644 (file)
@@ -1,8 +1,8 @@
 [Desktop Entry]
 Exec=xscreensaver-demo
-Icon=xscreensaver.xpm
+Icon=xscreensaver
 Terminal=false
 _Name=Screensaver
 _Comment=Change screensaver properties
 Type=Application
-Categories=Application;Settings;Appearance;AdvancedSettings;
+Categories=Settings;DesktopSettings;Security;
index 009bb6dc529905286b79573e90a469c959d81194..88270d6ca0ad448ba55f374d1110faa3fb02ed5c 100644 (file)
@@ -1,5 +1,5 @@
 /* subprocs.c --- choosing, spawning, and killing screenhacks.
- * xscreensaver, Copyright (c) 1991-2007 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1991-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -1241,9 +1241,9 @@ get_best_gl_visual (saver_screen_info *ssi)
 
         execvp (av[0], av);                    /* shouldn't return. */
 
-        if (errno != ENOENT || si->prefs.verbose_p)
+        if (errno != ENOENT /* || si->prefs.verbose_p */ )
           {
-            /* Ignore "no such file or directory" errors, unless verbose.
+            /* Ignore "no such file or directory" errors.
                Issue all other exec errors, though. */
             sprintf (buf, "%s: running %s", blurb(), av[0]);
             perror (buf);
index e8eeacad28d91a2f05496f6789a070d2f2c8c510..ac5bf99213873d24138e800e23a45283b9695aad 100644 (file)
@@ -252,6 +252,7 @@ main (int argc, char **argv)
       if (which == PASS)
         {
          si->unlock_cb = gui_auth_conv;
+          si->auth_finished_cb = auth_finished_cb;
 
          xss_authenticate(si, True);
 
@@ -261,6 +262,7 @@ main (int argc, char **argv)
             fprintf (stderr, "%s: authentication FAILED!\n", progname);
 
           XSync(si->dpy, False);
+          fprintf (stderr, "\n######################################\n\n");
           sleep (3);
         }
       else
index 521929a68902ce290ee31359977c6a21ffd98f12..c7434925286b02e2d13c8ba04e0cb689457af9c2 100644 (file)
@@ -1,5 +1,5 @@
 /* timers.c --- detecting when the user is idle, and other timer-related tasks.
- * xscreensaver, Copyright (c) 1991-2004 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1991-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -1193,7 +1193,10 @@ query_proc_interrupts_available (saver_info *si, const char **why)
 
   f = fopen (PROC_INTERRUPTS, "r");
   if (!f)
-    return False;
+    {
+      if (why) *why = "does not exist";
+      return False;
+    }
 
   fclose (f);
   return True;
index 23ba01ff3fa75f9ac15e1c6272016c723731bd01..9dbb5004cfbe5428dabe4486803e038d64c49629 100644 (file)
@@ -1,5 +1,5 @@
 /* windows.c --- turning the screen black; dealing with visuals, virtual roots.
- * xscreensaver, Copyright (c) 1991-2007 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1991-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -1044,12 +1044,14 @@ get_screen_viewport (saver_screen_info *ssi,
         {
           target_x = ssi->x;
           target_y = ssi->y;
+          which = ssi->number;
         }
 
       /* Find the Xinerama rectangle that contains the mouse position. */
       for (i = 0; i < si->nscreens; i++)
         {
-          if (target_x >= si->screens[i].x &&
+          if (which == -1 &&
+              target_x >= si->screens[i].x &&
               target_y >= si->screens[i].y &&
               target_x <  si->screens[i].x + si->screens[i].width &&
               target_y <  si->screens[i].y + si->screens[i].height)
index f068b54cc1e267fab2f69db64fad3e491700b42d..de507a0a57fcb4683c04ce336df652e47b25f90e 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver-command, Copyright (c) 1991-2004 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver-command, Copyright (c) 1991-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -65,7 +65,7 @@ static char *usage = "\n\
 usage: %s -<option>\n\
 \n\
   This program provides external control of a running xscreensaver process.\n\
-  Version %s, copyright (c) 1991-2006 Jamie Zawinski <jwz@jwz.org>.\n\
+  Version %s, copyright (c) 1991-2008 Jamie Zawinski <jwz@jwz.org>.\n\
 \n\
   The xscreensaver program is a daemon that runs in the background.\n\
   You control a running xscreensaver process by sending it messages\n\
index 158dea0996d276933f93a1677d1965be5ff768bc..627cd254b2273f46c5b69dcd2ff09f91917e20ef 100755 (executable)
 # Created: 20-Oct-2003.
 
 require 5;
-use diagnostics;
+#use diagnostics;      # Fails on some MacOS 10.5 systems
 use strict;
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my $version = q{ $Revision: 1.3 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version = q{ $Revision: 1.4 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
 
 my @grabber   = ("screencapture", "-x");
 my @converter = ("pdf2jpeg");
index 9d038e8e07836dbb85ea75818e8e2fd3a42b0559..2961a91fa49e9c776626d05b71f4f9230a4e3ff9 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright Â© 2001-2006 Jamie Zawinski <jwz@jwz.org>.
+# Copyright Â© 2001-2008 Jamie Zawinski <jwz@jwz.org>.
 #
 # Permission to use, copy, modify, distribute, and sell this software and its
 # documentation for any purpose is hereby granted without fee, provided that
@@ -26,7 +26,7 @@
 # Created: 12-Apr-01.
 
 require 5;
-use diagnostics;
+#use diagnostics;      # Fails on some MacOS 10.5 systems
 use strict;
 
 use POSIX;
@@ -42,7 +42,7 @@ use bytes;  # Larry can take Unicode and shove it up his ass sideways.
             # errors about UTF-8 all over the place without this.
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my $version = q{ $Revision: 1.25 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version = q{ $Revision: 1.26 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
 
 my $verbose = 0;
 
index 6b9c1408ea87f94a661061caae1ea666ffc0eccb..32117ff23589e7cd60bc7ab24277a19a5fcaf72f 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright Â© 2001-2007 Jamie Zawinski <jwz@jwz.org>.
+# Copyright Â© 2001-2008 Jamie Zawinski <jwz@jwz.org>.
 #
 # Permission to use, copy, modify, distribute, and sell this software and its
 # documentation for any purpose is hereby granted without fee, provided that
 # Created: 13-Apr-2001.
 
 require 5;
-use diagnostics;
+#use diagnostics;      # Fails on some MacOS 10.5 systems
 use strict;
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my $version  = q{ $Revision: 1.17 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version  = q{ $Revision: 1.18 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
 
 my $tmpdir   = $ENV{TMPDIR} || "/tmp";
 my $tmpfile  = sprintf("%s/xssv.%08x.ppm", $tmpdir, rand(0xFFFFFFFF));
index e6a00226863743cca1e138b8051957ebafa38de7..2f7372516a4d020f7722ede34e2075cc77fcb3af 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright Â© 2005, 2006 Jamie Zawinski <jwz@jwz.org>
+# Copyright Â© 2005-2008 Jamie Zawinski <jwz@jwz.org>
 #
 # Permission to use, copy, modify, distribute, and sell this software and its
 # documentation for any purpose is hereby granted without fee, provided that
 # Created: 19-Mar-2005.
 
 require 5;
-use diagnostics;
+#use diagnostics;      # Fails on some MacOS 10.5 systems
 use strict;
+
 use Socket;
 use POSIX qw(strftime);
 use Text::Wrap qw(wrap);
 use bytes;
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my $version = q{ $Revision: 1.14 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
+my $version = q{ $Revision: 1.15 $ }; $version =~ s/^[^0-9]+([0-9.]+).*$/$1/;
 
 my $verbose = 0;
 my $http_proxy = undef;
index 0c4f0e9a3330ca3f40d39c9d701838a998aa8ebf..92b28625c1a6337be6cdfbc178832116194e5861 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2007 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -228,7 +228,7 @@ do_help (saver_info *si)
   fflush (stdout);
   fflush (stderr);
   fprintf (stdout, "\
-xscreensaver %s, copyright (c) 1991-2006 by Jamie Zawinski <jwz@jwz.org>\n\
+xscreensaver %s, copyright (c) 1991-2008 by Jamie Zawinski <jwz@jwz.org>\n\
 \n\
   All xscreensaver configuration is via the `~/.xscreensaver' file.\n\
   Rather than editing that file by hand, just run `xscreensaver-demo':\n\
@@ -693,7 +693,7 @@ print_banner (saver_info *si)
 
   if (p->verbose_p)
     fprintf (stderr,
-            "%s %s, copyright (c) 1991-2006 "
+            "%s %s, copyright (c) 1991-2008 "
             "by Jamie Zawinski <jwz@jwz.org>.\n",
             progname, si->version);
 
@@ -755,6 +755,111 @@ print_lock_failure_banner (saver_info *si)
 }
 
 
+#ifdef HAVE_XINERAMA
+
+static Bool
+screens_overlap_p (XineramaScreenInfo *a, XineramaScreenInfo *b)
+{
+  /* Two rectangles overlap if the max of the tops is less than the
+     min of the bottoms and the max of the lefts is less than the min
+     of the rights.
+   */
+# undef MAX
+# undef MIN
+# define MAX(A,B) ((A)>(B)?(A):(B))
+# define MIN(A,B) ((A)<(B)?(A):(B))
+
+  int maxleft  = MAX(a->x_org, b->x_org);
+  int maxtop   = MAX(a->y_org, b->y_org);
+  int minright = MIN(a->x_org + a->width  - 1, b->x_org + b->width);
+  int minbot   = MIN(a->y_org + a->height - 1, b->y_org + b->height);
+  return (maxtop < minbot && maxleft < minright);
+}
+
+
+/* Go through the list of Xinerama screen descriptions, and mark the
+   ones that appear to be insane, so that we don't use them.
+ */
+static void
+check_xinerama_sanity (int count, Bool verbose_p, XineramaScreenInfo *xsi)
+{
+  static Bool printed_p = False;
+  int i, j;
+  char err[1024];
+  *err = 0;
+
+# define X1 xsi[i].x_org
+# define X2 xsi[j].x_org
+# define Y1 xsi[i].y_org
+# define Y2 xsi[j].y_org
+# define W1 xsi[i].width
+# define W2 xsi[j].width
+# define H1 xsi[i].height
+# define H2 xsi[j].height
+
+# define WHINE() do {                                                        \
+    if (verbose_p) {                                                         \
+      if (! printed_p) {                                                     \
+        fprintf (stderr, "%s: compensating for Xinerama braindamage:\n",     \
+                 blurb());                                                   \
+        printed_p = True;                                                    \
+      }                                                                      \
+      fprintf (stderr, "%s:   %d: %s\n", blurb(), xsi[i].screen_number,err); \
+    }                                                                        \
+    xsi[i].screen_number = -1;                                               \
+  } while(0)
+
+  /* If a screen is enclosed by any other screen, that's insane.
+   */
+  for (i = 0; i < count; i++)
+    for (j = 0; j < count; j++)
+      if (i != j &&
+          xsi[i].screen_number >= 0 &&
+          xsi[j].screen_number >= 0 &&
+          X1 >= X2 && Y1 >= Y2 && (X1+W1) <= (X2+W2) && (X1+H1) <= (X2+H2))
+        {
+          sprintf (err, "%dx%d+%d+%d enclosed by %dx%d+%d+%d",
+                   W1, H1, X1, Y1,
+                   W2, H2, X2, Y2);
+          WHINE();
+          continue;
+        }
+
+  /* After checking for enclosure, check for other lossage against earlier
+     screens.  We do enclosure first so that we make sure to pick the
+     larger one.
+   */
+  for (i = 0; i < count; i++)
+    for (j = 0; j < i; j++)
+      {
+        if (xsi[i].screen_number < 0) continue; /* already marked */
+
+        *err = 0;
+        if (X1 == X2 && Y1 == Y2 && W1 == W2 && H1 == H2)
+          sprintf (err, "%dx%d+%d+%d duplicated", W1, H1, X1, Y1);
+
+        else if (screens_overlap_p (&xsi[i], &xsi[j]))
+          sprintf (err, "%dx%d+%d+%d overlaps %dx%d+%d+%d",
+                   W1, H1, X1, Y1,
+                   W2, H2, X2, Y2);
+
+        if (*err) WHINE();
+      }
+
+# undef X1
+# undef X2
+# undef Y1
+# undef Y2
+# undef W1
+# undef W2
+# undef H1
+# undef H2
+}
+
+#endif /* HAVE_XINERAMA */
+
+
+
 /* Examine all of the display's screens, and populate the `saver_screen_info'
    structures.  Make sure this is called after hack_environment() sets $PATH.
  */
@@ -782,20 +887,27 @@ initialize_per_screen_info (saver_info *si, Widget toplevel_shell)
 
   if (si->xinerama_p)
     {
-      XineramaScreenInfo *xsi = XineramaQueryScreens (si->dpy, &si->nscreens);
+      int nscreens = 0;
+      XineramaScreenInfo *xsi = XineramaQueryScreens (si->dpy, &nscreens);
       if (!xsi)
         si->xinerama_p = False;
       else
         {
+          int j = 0;
           si->screens = (saver_screen_info *)
-            calloc(sizeof(saver_screen_info), si->nscreens);
-          for (i = 0; i < si->nscreens; i++)
+            calloc(sizeof(saver_screen_info), nscreens);
+          check_xinerama_sanity (nscreens, si->prefs.verbose_p, xsi);
+          for (i = 0; i < nscreens; i++)
             {
-              si->screens[i].x      = xsi[i].x_org;
-              si->screens[i].y      = xsi[i].y_org;
-              si->screens[i].width  = xsi[i].width;
-              si->screens[i].height = xsi[i].height;
+              if (xsi[i].screen_number < 0)  /* deemed insane */
+                continue;
+              si->screens[j].x      = xsi[i].x_org;
+              si->screens[j].y      = xsi[i].y_org;
+              si->screens[j].width  = xsi[i].width;
+              si->screens[j].height = xsi[i].height;
+              j++;
             }
+          si->nscreens = j;
           XFree (xsi);
         }
       si->default_screen = &si->screens[0];
@@ -1589,6 +1701,17 @@ clientmessage_response (saver_info *si, Window w, Bool error,
 static void
 bogus_clientmessage_warning (saver_info *si, XEvent *event)
 {
+#if 0  /* Oh, fuck it.  GNOME likes to spew random ClientMessages at us
+          all the time.  This is presumably indicative of an error in
+          the sender of that ClientMessage: if we're getting it and 
+          ignoring it, then it's not reaching the intended recipient.
+          But people complain to me about this all the time ("waaah!
+          xscreensaver is printing to it's stderr and that gets my
+          panties all in a bunch!")  And I'm sick of hearing about it.
+          So we'll just ignore these messages and let GNOME go right
+          ahead and continue to stumble along in its malfunction.
+        */
+
   saver_preferences *p = &si->prefs;
   char *str = XGetAtomName_safe (si->dpy, event->xclient.message_type);
   Window w = event->xclient.window;
@@ -1649,8 +1772,11 @@ bogus_clientmessage_warning (saver_info *si, XEvent *event)
   fprintf (stderr, "%s: %d: for window 0x%lx (%s)\n",
            blurb(), screen, (unsigned long) w, wdesc);
   if (str) XFree (str);
+
+#endif /* 0 */
 }
 
+
 Bool
 handle_clientmessage (saver_info *si, XEvent *event, Bool until_idle_p)
 {
@@ -2154,11 +2280,7 @@ analyze_display (saver_info *si)
       j = strlen (buf);
       strcat (buf, exts[i].desc);
       if (!exts[i].useful_p)
-        {
-          int k = j + 18;
-          while (strlen (buf) < k) strcat (buf, " ");
-          strcat (buf, "<-- not supported at compile time!");
-        }
+        strcat (buf, " (disabled at compile time)");
       fprintf (stderr, "%s\n", buf);
     }
 
@@ -2236,6 +2358,8 @@ display_is_on_console_p (saver_info *si)
        not_on_console = False;
       else if (gethostname (localname, sizeof (localname)))
        not_on_console = True;  /* can't find hostname? */
+      else if (!strncmp (dpyname, "/tmp/launch-", 12))  /* MacOS X launchd */
+       not_on_console = False;
       else
        {
          /* We have to call gethostbyname() on the result of gethostname()
index c678226314203b69d6ba62cab2eceb3545caca70..2e26478661b6efcd888b54e5e105a7d67d08d8fa 100644 (file)
@@ -112,7 +112,7 @@ SRCS                = attraction.c blitspin.c bouboule.c braid.c bubbles.c \
                  fuzzyflakes.c anemotaxis.c memscroller.c substrate.c \
                  intermomentary.c fireworkx.c fireworkx_mmx.S fiberlamp.c \
                  boxfit.c interaggregate.c celtic.c cwaves.c m6502.c \
-                 asm6502.c abstractile.c \
+                 asm6502.c abstractile.c lcdscrub.c \
                  webcollage-cocoa.m webcollage-helper-cocoa.m
 SCRIPTS                = vidwhacker webcollage ljlatest
 
@@ -151,7 +151,8 @@ OBJS                = attraction.o blitspin.o bouboule.o braid.o bubbles.o \
                  fuzzyflakes.o anemotaxis.o memscroller.o substrate.o \
                  intermomentary.o fireworkx.o fiberlamp.o boxfit.o \
                  interaggregate.o celtic.o cwaves.o webcollage-cocoa.o \
-                 webcollage-helper-cocoa.o m6502.0 asm6502.o abstractile.o
+                 webcollage-helper-cocoa.o m6502.0 asm6502.o abstractile.o \
+                 lcdscrub.c 
 
 NEXES          = attraction blitspin bouboule braid bubbles decayscreen deco \
                  drift flag flame forest vines galaxy grav greynetic halo \
@@ -172,7 +173,7 @@ NEXES               = attraction blitspin bouboule braid bubbles decayscreen deco \
                  fontglide apple2 xanalogtv pong  wormhole mismunch \
                  pacman fuzzyflakes anemotaxis memscroller substrate \
                  intermomentary fireworkx fiberlamp boxfit interaggregate \
-                 celtic cwaves m6502 abstractile \
+                 celtic cwaves m6502 abstractile lcdscrub \
                  @JPEG_EXES@
 SEXES          = sonar
 JPEG_EXES      = webcollage-helper
@@ -220,9 +221,10 @@ MEN                = anemone.man apollonian.man attraction.man \
                  wormhole.man mismunch.man pacman.man fuzzyflakes.man \
                  anemotaxis.man memscroller.man substrate.man \
                  intermomentary.man fireworkx.man fiberlamp.man boxfit.man \
-                 interaggregate.man celtic.man cwaves.man abstractile.man
+                 interaggregate.man celtic.man cwaves.man abstractile.man \
+                 lcdscrub
 STAR           = *
-EXTRAS         = README Makefile.in xml2man.pl .gdbinit \
+EXTRAS         = README Makefile.in xml2man.pl m6502.sh .gdbinit \
                  euler2d.tex \
                  config/README \
                  config/$(STAR).xml \
@@ -234,6 +236,7 @@ EXTRAS              = README Makefile.in xml2man.pl .gdbinit \
                  images/bubbles/$(STAR).xpm \
                  images/noseguy/$(STAR).xbm \
                  images/noseguy/$(STAR).xpm \
+                 images/m6502/$(STAR).asm \
                  images/molecules/$(STAR).pdb \
                  images/pacman/$(STAR).xpm
 
@@ -384,7 +387,7 @@ uninstall-xml:
        done
 
 clean:
-       -rm -f *.o a.out core $(EXES)
+       -rm -f *.o a.out core $(EXES) m6502.h
 
 distclean: clean
        -rm -f Makefile TAGS *~ "#"*
@@ -400,7 +403,7 @@ depend:
 # close.  This excludes dependencies on files in /usr/include, etc.  It tries
 # to include only dependencies on files which are themselves a part of this
 # package.
-distdepend::
+distdepend:: m6502.h
        @echo updating dependencies in `pwd`/Makefile.in... ;               \
        $(DEPEND) -w 0 -f -                                                 \
        -s '# DO NOT DELETE: updated by make distdepend' $(DEPEND_FLAGS) -- \
@@ -413,7 +416,8 @@ distdepend::
              -e 's@ \./@ @g;s@ /[^ ]*@@g;/^.*:$$/d'                        \
              -e 's@\.\./utils@$$(UTILS_SRC)@g'                             \
              -e 's@ \([^$$]\)@ $$(srcdir)/\1@g'                            \
-             -e 's@ $$(srcdir)/\(.*config.h\)@ \1@g' ;                     \
+             -e 's@ $$(srcdir)/\(.*config.h\)@ \1@g'                       \
+             -e 's@ $$(srcdir)/\(m6502.h\)@ \1@g' ;                        \
          echo ''                                                           \
        ) > /tmp/distdepend.$$$$ &&                                         \
        mv Makefile.in Makefile.in.bak &&                                   \
@@ -856,12 +860,20 @@ celtic:           celtic.o        $(HACK_OBJS) $(COL) $(ERASE)
 cwaves:                cwaves.o        $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
+m6502.h:
+       @echo "building m6502.h from $(srcdir)/images/m6502/*.asm"; \
+       UTILS_SRC="$(UTILS_SRC)" \
+       $(srcdir)/m6502.sh m6502.h $(srcdir)/images/m6502/*.asm
+
 m6502:         m6502.o         asm6502.o $(HACK_OBJS) $(ATV)
        $(CC_HACK) -o $@ $@.o   asm6502.o $(HACK_OBJS) $(ATV) $(HACK_LIBS)
 
 abstractile:   abstractile.o   $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
+lcdscrub:      lcdscrub.o      $(HACK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(HACK_LIBS)
+
 # The rules for those hacks which follow the `xlockmore' API.
 #
 
@@ -1816,6 +1828,16 @@ laser.o: $(UTILS_SRC)/xshm.h
 laser.o: $(UTILS_SRC)/yarandom.h
 laser.o: $(srcdir)/xlockmoreI.h
 laser.o: $(srcdir)/xlockmore.h
+lcdscrub.o: ../config.h
+lcdscrub.o: $(srcdir)/screenhackI.h
+lcdscrub.o: $(srcdir)/screenhack.h
+lcdscrub.o: $(UTILS_SRC)/colors.h
+lcdscrub.o: $(UTILS_SRC)/grabscreen.h
+lcdscrub.o: $(UTILS_SRC)/hsv.h
+lcdscrub.o: $(UTILS_SRC)/resources.h
+lcdscrub.o: $(UTILS_SRC)/usleep.h
+lcdscrub.o: $(UTILS_SRC)/visual.h
+lcdscrub.o: $(UTILS_SRC)/yarandom.h
 lightning.o: ../config.h
 lightning.o: $(srcdir)/screenhackI.h
 lightning.o: $(UTILS_SRC)/colors.h
@@ -1878,6 +1900,7 @@ loop.o: $(srcdir)/xlockmore.h
 m6502.o: $(srcdir)/analogtv.h
 m6502.o: $(srcdir)/asm6502.h
 m6502.o: ../config.h
+m6502.o: m6502.h
 m6502.o: $(srcdir)/screenhackI.h
 m6502.o: $(srcdir)/screenhack.h
 m6502.o: $(UTILS_SRC)/colors.h
index 175ecb887827d90b4cc8fc172dc82d3e78203f01..dc42ae981dd36f06136a6295866429ee093d7d25 100644 (file)
@@ -944,7 +944,10 @@ terminal_read(struct terminal_controller_data *mine, unsigned char *buf, int n)
     return 1;
   }
 
-  if (!mine->input_available_p) return 0;
+  if (!mine || 
+      !mine->input_available_p ||
+      !mine->pipe)
+    return 0;
 
   rc=read (fileno (mine->pipe), (void *) buf, n);
   if (rc>0) mine->lastc=buf[rc-1];
index aeda48267efaf7b95d0ba5f5fe92d726926cc0e4..101ee5a6a416a98fbeadf7b0abca1b23f91d82a5 100644 (file)
@@ -1,3 +1,4 @@
+/*-*- indent-tabs-mode:nil -*- */
 /* Copyright (C) 2007 Jeremy English <jhe@jeremyenglish.org>
  * 
  * Permission to use, copy, modify, distribute, and sell this software and its
 
 #include "asm6502.h"
 
+#ifdef DEBUGGER
+#  define random rand
+#endif
+
 typedef enum{
   LEFT, RIGHT
     } Side;
@@ -179,10 +184,11 @@ static Bit8 stackPop(machine_6502 *machine) {
 }
 
 static void pushByte(machine_6502 *machine, Bit32 value ) {
-  Bit32 address = 0x600 + machine->codeLen;
+  Bit32 address = machine->defaultCodePC;
   checkAddress(address);
-  machine->memory[0x600 + machine->codeLen] = value & 0xff;
+  machine->memory[address] = value & 0xff;
   machine->codeLen++;
+  machine->defaultCodePC++;
 }
 
 /*
@@ -295,9 +301,9 @@ static BOOL peekValue(machine_6502 *machine, AddrMode adm, Pointer *pointer, Bit
     pointer->value = memReadByte(machine, PC);
     return TRUE;
   case INDIRECT_X:
-    zp = memReadByte(machine, PC);
+    zp = memReadByte(machine, PC) + machine->regX;
     pointer->addr = memReadByte(machine,zp) + 
-      (memReadByte(machine,zp+1)<<8) + machine->regX;
+      (memReadByte(machine,zp+1)<<8);
     pointer->value = memReadByte(machine, pointer->addr);
     return TRUE;
   case INDIRECT_Y:
@@ -360,9 +366,9 @@ static BOOL getValue(machine_6502 *machine, AddrMode adm, Pointer *pointer){
     pointer->value = popByte(machine);
     return TRUE;
   case INDIRECT_X:
-    zp = popByte(machine);
+    zp = popByte(machine) + machine->regX;
     pointer->addr = memReadByte(machine,zp) + 
-      (memReadByte(machine,zp+1)<<8) + machine->regX;
+      (memReadByte(machine,zp+1)<<8);
     pointer->value = memReadByte(machine, pointer->addr);
     return TRUE;
   case INDIRECT_Y:
@@ -408,6 +414,64 @@ static BOOL getValue(machine_6502 *machine, AddrMode adm, Pointer *pointer){
 
 }
 
+static void dismem(machine_6502 *machine, AddrMode adm, char *output){
+  Bit8 zp;
+  Bit16 n;
+  switch(adm){
+  case SINGLE:
+    output = "";
+    break;
+  case IMMEDIATE_LESS:
+  case IMMEDIATE_GREAT:
+  case IMMEDIATE_VALUE:
+    n = popByte(machine);
+    sprintf(output,"#$%x",n);
+    break;
+  case INDIRECT_X:
+    zp = popByte(machine);
+    n = memReadByte(machine,zp) + 
+      (memReadByte(machine,zp+1)<<8);
+    sprintf(output,"($%x,x)",n);
+    break;
+  case INDIRECT_Y:
+    zp = popByte(machine);
+    n = memReadByte(machine,zp) + 
+      (memReadByte(machine,zp+1)<<8);
+    sprintf(output,"($%x),y",n);
+    break;
+  case ABS_OR_BRANCH:
+  case ZERO:    
+    n = popByte(machine);
+    sprintf(output,"$%x",n);
+    break;
+  case ZERO_X:
+    n = popByte(machine);
+    sprintf(output,"$%x,x",n);
+    break;
+  case ZERO_Y:
+    n = popByte(machine);
+    sprintf(output,"$%x,y",n);
+    break;
+  case ABS_VALUE:
+    n = popWord(machine);
+    sprintf(output,"$%x",n);
+    break;
+  case ABS_LABEL_X:
+  case ABS_X:
+    n = popWord(machine);
+    sprintf(output,"$%x,x",n);
+    break;
+  case ABS_LABEL_Y:
+  case ABS_Y:
+    n = popWord(machine);
+    sprintf(output,"$%x,x",n);
+    break;
+  case DCB_PARAM:
+    output = "";
+    break;
+  }
+}
+
 /* manZeroNeg - Manage the negative and zero flags */
 static void manZeroNeg(machine_6502 *machine, Bit8 value){
   machine->regP = setBit(machine->regP, ZERO_FL, (value == 0));
@@ -867,7 +931,7 @@ static void jmpSBC(machine_6502 *machine, AddrMode adm){
     Bit8 ar = nibble(machine->regA, RIGHT);
     Bit8 br = nibble(ptr.value, RIGHT);
     Bit8 al = nibble(machine->regA, LEFT);
-    Bit8 bl = nibble(machine->regA, LEFT);
+    Bit8 bl = nibble(ptr.value, LEFT);
 
     tmp = 0xf + ar - br + c;
     if ( tmp < 0x10){
@@ -1260,15 +1324,24 @@ static BOOL ishexdigit(char c){
   }
 }
 
+/* isCmdChar() - Is this a valid character for a command. All of the
+   command are alpha except for the entry point code that is "*=" */
+static BOOL isCmdChar(char c){
+  return (isalpha(c) || c == '*' || c == '=');
+}
+  
+
 /* command() - parse a command from the source code. We pass along a
    machine so the opcode can be validated. */
 static BOOL command(machine_6502 *machine, char **s, char **cmd){
   int i = 0;
   skipSpace(s);
-  for(;isalpha(**s) && i < MAX_CMD_LEN; (*s)++)
+  for(;isCmdChar(**s) && i < MAX_CMD_LEN; (*s)++)
     (*cmd)[i++] = **s;
   if (i == 0)
     return TRUE; /* Could be a blank line. */
+  else if (strcmp(*cmd,"*=") == 0)
+    return TRUE; /* This is an entry point. */
   else
     return isCommand(machine,*cmd);
 }
@@ -1619,7 +1692,7 @@ static AsmLine *parseAssembly(machine_6502 *machine, BOOL *codeOk, const char *c
 }
     
 /* fileToBuffer() - Allocates a buffer and loads all of the file into memory. */
-static char *fileToBuffer(char *filename){
+static char *fileToBuffer(const char *filename){
   const int defaultSize = 1024;
   FILE *ifp;
   int c;
@@ -1675,7 +1748,7 @@ static void reset(machine_6502 *machine){
   machine->regX = 0;
   machine->regY = 0;
   machine->regP = setBit(machine->regP, FUTURE_FL, 1);
-  machine->regPC = 0x600
+  machine->defaultCodePC = machine->regPC = PROG_START
   machine->regSP = STACK_TOP;
   machine->runForever = FALSE;
   machine->labelPtr = 0;
@@ -1696,24 +1769,25 @@ void hexDump(machine_6502 *machine, Bit16 start, Bit16 numbytes, FILE *output){
   fprintf(output,"%s\n",(i&1)?"--":"");
 }
 
-void save_program(machine_6502 *machine, char *filename){
-  FILE *ofp;
-  Bit16 pc = 0x600;
-  Bit16 end = pc + machine->codeLen;
-  Bit16 n;
-  ofp = fopen(filename, "w");
-  if (ofp == NULL)
-    eprintf("Could not open file.");
+/* XXX */
+/* void save_program(machine_6502 *machine, char *filename){ */
+/*   FILE *ofp; */
+/*   Bit16 pc = PROG_START; */
+/*   Bit16 end = pc + machine->codeLen; */
+/*   Bit16 n; */
+/*   ofp = fopen(filename, "w"); */
+/*   if (ofp == NULL) */
+/*     eprintf("Could not open file."); */
   
-  fprintf(ofp,"Bit8 prog[%d] =\n{",machine->codeLen);
-  n = 1;
-  while(pc < end)
-    fprintf(ofp,"0x%.2x,%s",machine->memory[pc++],n++%10?" ":"\n");
-  fseek(ofp,-2,SEEK_CUR);
-  fprintf(ofp,"};\n");
+/*   fprintf(ofp,"Bit8 prog[%d] =\n{",machine->codeLen); */
+/*   n = 1; */
+/*   while(pc < end) */
+/*     fprintf(ofp,"0x%.2x,%s",machine->memory[pc++],n++%10?" ":"\n"); */
+/*   fseek(ofp,-2,SEEK_CUR); */
+/*   fprintf(ofp,"};\n"); */
   
-  fclose(ofp);
-}
+/*   fclose(ofp); */
+/* } */
 
 static BOOL translate(Opcodes *op,Param *param, machine_6502 *machine){
    switch(param->type){
@@ -1738,7 +1812,7 @@ static BOOL translate(Opcodes *op,Param *param, machine_6502 *machine){
     case IMMEDIATE_GREAT:
       if (op->Imm) {
        pushByte(machine, op->Imm);
-       pushByte(machine, param->lbladdr / 0xFF);
+       pushByte(machine, param->lbladdr >> 8);
        break;
       }
       else {
@@ -1823,7 +1897,7 @@ static BOOL translate(Opcodes *op,Param *param, machine_6502 *machine){
       else {
        if (op->BRA) {
          pushByte(machine, op->BRA);
-         if (param->lbladdr < (machine->codeLen + 0x600))
+         if (param->lbladdr < (machine->codeLen + PROG_START))
            pushByte(machine,
                     (0xff - (machine->codeLen-param->lbladdr)) & 0xff);
          else
@@ -1889,8 +1963,10 @@ static BOOL compileLine(AsmLine *asmline, void *args){
   machine_6502 *machine;
   machine = args;
   if (isBlank(asmline->command)) return TRUE;
-
-  if (strcmp("DCB",asmline->command) == 0){
+  if (strcmp("*=",asmline->command) == 0){
+    machine->defaultCodePC = asmline->param->value[0];
+  }
+  else if (strcmp("DCB",asmline->command) == 0){
     int i;
     for(i = 0; i < asmline->param->vp; i++)
       pushByte(machine, asmline->param->value[i]);
@@ -1955,7 +2031,7 @@ static BOOL compileCode(machine_6502 *machine, const char *code){
   AsmLine *asmlist;
 
   reset(machine);
-  machine->regPC = 0x600;
+  machine->defaultCodePC = machine->regPC = PROG_START;
   asmlist = parseAssembly(machine, &codeOk, code);
 
   if(codeOk){
@@ -1966,11 +2042,15 @@ static BOOL compileCode(machine_6502 *machine, const char *code){
     linkLabels(asmlist);
     /* Second pass: translate the instructions */
     machine->codeLen = 0;
+    /* Link label call push_byte which increments defaultCodePC.
+       We need to reset it so the compiled code goes in the 
+       correct spot. */
+    machine->defaultCodePC = PROG_START;
     if (!apply(asmlist, compileLine, machine))
       return FALSE;
 
-    if (machine->codeLen > 0 ){
-      machine->memory[0x600+machine->codeLen] = 0x00;
+    if (machine->defaultCodePC > PROG_START ){
+      machine->memory[machine->defaultCodePC] = 0x00;
       codeOk = TRUE;
     }
     else{
@@ -2011,8 +2091,7 @@ static void execute(machine_6502 *machine){
       fprintf(stderr,"Invalid opcode!\n");
   }
   if( (machine->regPC == 0) || 
-      (!machine->codeRunning) || 
-      (machine->regPC > (machine->codeLen+0x600)) ) {
+      (!machine->codeRunning) ) {
     machine->codeRunning = FALSE;
   }
 }
@@ -2060,13 +2139,37 @@ void trace(machine_6502 *machine, FILE *output){
   }
   fprintf(output,"STACK:");
   hexDump(machine,(STACK_TOP - stacksz) + 1, stacksz, output);
-  fprintf(output,"\n================================================================================\n");
 }
 
-    
+void disassemble(machine_6502 *machine, FILE *output){
+  /* Read the opcode
+     increment the program counter
+     print the opcode
+     loop until end of program. */
+  AddrMode adm;
+  Bit16 addr;
+  Bit8 opcode;
+  int opidx;
+  char *mem;
+  int i;
+  Bit16 opc = machine->regPC;
+  mem = calloc(20,sizeof(char));
+  machine->regPC = PROG_START;
+  do{
+    addr = machine->regPC;
+    opcode = popByte(machine);
+    opidx = opIndex(machine,opcode,&adm);
+    for (i = 0; i < 20; i++) mem[i] = '\0';
+    dismem(machine, adm, mem);
+    fprintf(output,"%x\t%s\t%s\n",
+           addr,machine->opcodes[opidx].name,mem); 
+  }while((machine->regPC - PROG_START) < machine->codeLen); /*XXX - may need to change since defaultCodePC */
+  free(mem);
+  machine->regPC = opc;
+}
 
 \f
-void eval_file(machine_6502 *machine, char *filename, Plotter plot, void *plotterState){
+void eval_file(machine_6502 *machine, const char *filename, Plotter plot, void *plotterState){
   char *code = NULL;
 
   machine->plot = plot;
@@ -2080,7 +2183,7 @@ void eval_file(machine_6502 *machine, char *filename, Plotter plot, void *plotte
 
   free(code);
 
-  machine->regPC = 0x600;
+  machine->defaultCodePC = machine->regPC = PROG_START;
   machine->codeRunning = TRUE;
   do{
     sleep(0); /* XXX */
@@ -2088,12 +2191,10 @@ void eval_file(machine_6502 *machine, char *filename, Plotter plot, void *plotte
     trace(machine);
 #endif
     execute(machine);
-    if (!machine->codeRunning) 
-      break;
-  }while((machine->regPC - 0x600) < machine->codeLen);
+  }while(machine->codeRunning);
 }
 
-void start_eval_file(machine_6502 *machine, char *filename, Plotter plot, void *plotterState){
+void start_eval_file(machine_6502 *machine, const char *filename, Plotter plot, void *plotterState){
   char *code = NULL;
   reset(machine);
 
@@ -2108,36 +2209,52 @@ void start_eval_file(machine_6502 *machine, char *filename, Plotter plot, void *
 
   free(code);
 
-  machine->regPC = 0x600;
+  machine->defaultCodePC = machine->regPC = PROG_START;
   machine->codeRunning = TRUE;
   execute(machine);
 }
 
-void start_eval_binary(machine_6502 *machine, Bit8 *program,
-                      unsigned int proglen,
+void start_eval_string(machine_6502 *machine, const char *code,
                       Plotter plot, void *plotterState){
-  unsigned int pc, n;
   reset(machine);
+
   machine->plot = plot;
   machine->plotterState = plotterState;
 
-  machine->regPC = 0x600;
-  pc = machine->regPC;
-  machine->codeLen = proglen;
-  n = 0;
-  while (n < proglen){
-    machine->memory[pc++] = program[n++];
+  if (! compileCode(machine, code) ){
+    fprintf(stderr,"Could not compile code.\n");
   }
+
+  machine->defaultCodePC = machine->regPC = PROG_START;
   machine->codeRunning = TRUE;
   execute(machine);
 }
 
+/* void start_eval_binary(machine_6502 *machine, Bit8 *program, */
+/*                    unsigned int proglen, */
+/*                    Plotter plot, void *plotterState){ */
+/*   unsigned int pc, n; */
+/*   reset(machine); */
+/*   machine->plot = plot; */
+/*   machine->plotterState = plotterState; */
+
+/*   machine->regPC = PROG_START; */
+/*   pc = machine->regPC; */
+/*   machine->codeLen = proglen; */
+/*   n = 0; */
+/*   while (n < proglen){ */
+/*     machine->memory[pc++] = program[n++]; */
+/*   } */
+/*   machine->codeRunning = TRUE; */
+/*   execute(machine); */
+/* } */
+
 void next_eval(machine_6502 *machine, int insno){
   int i = 0;
   for (i = 1; i < insno; i++){
-    if (machine->codeRunning){/* && ((machine->regPC - 0x600) < machine->codeLen))*/
+    if (machine->codeRunning){
 #if 0
-      trace(machine);
+      trace(machine, stdout);
 #endif
       execute(machine);
     }
index bd7e79ca4b08db641b9c1f2aa41883f8cea4914f..6f64d218ae4811eb0bb277dda58e3fdb16141b88 100644 (file)
@@ -46,7 +46,8 @@ enum {
   MAX_CMD_LEN = 4, /* Each assembly command is 3 characeters long */
 /* The stack works from the top down in page $100 to $1ff */
   STACK_TOP = 0x1ff,
-  STACK_BOTTOM = 0x100 
+  STACK_BOTTOM = 0x100, 
+  PROG_START = 0x600 /* The default entry point for the program */
 };
 
 typedef enum{
@@ -117,6 +118,7 @@ struct machine_6502 {
   Bit8 regP;
   Bit16 regPC; /* A pair of 8 bit registers */
   Bit16 regSP;
+  Bit16 defaultCodePC;
   Bit8 memory[MEM_64K];
   BOOL runForever;
   int labelPtr;
@@ -139,17 +141,22 @@ void destroy6502(machine_6502 *machine);
 
 /* eval_file() - Compiles and runs a file until the program is
    finished */
-void eval_file(machine_6502 *machine, char *filename, 
+void eval_file(machine_6502 *machine, const char *filename, 
               Plotter plot, void *plotterState);
 
 /* start_eval_file() - Compile the file and execute the first
    instruction */
-void start_eval_file(machine_6502 *machine, char *filename, 
+void start_eval_file(machine_6502 *machine, const char *filename, 
                     Plotter plot, void *plotterState);
 
+/* XXX
 void start_eval_binary(machine_6502 *machine, Bit8 *program,
                       unsigned int proglen,
                       Plotter plot, void *plotterState);
+*/
+
+void start_eval_string(machine_6502 *machine, const char *code,
+                      Plotter plot, void *plotterState);
 
 /* next_eval() - Execute the next insno of machine instructions */
 void next_eval(machine_6502 *machine, int insno);
@@ -158,12 +165,17 @@ void next_eval(machine_6502 *machine, int insno);
 void hexDump(machine_6502 *machine, Bit16 start, 
             Bit16 numbytes, FILE *output);
 
+/* Disassemble() - Prints the assembly code for the program currently
+   loaded in memory.*/
+void disassemble(machine_6502 *machine, FILE *output);
+
 /* trace() - Prints to output the current value of registers, the
    current nmemonic, memory address and value. */
 void trace(machine_6502 *machine, FILE *output);
 
 /* save_program() - Writes a binary file of the program loaded in
    memory. */
-void save_program(machine_6502 *machine, char *filename);
-
+/* XXX
+void save_program(machine_6502 *machine, const char *filename);
+*/
 #endif /* __ASM6502_H__ */
index 41878c0b5f52f52746b02d904975b19fb1ff6959..ce1a4ad5429012795f62631b151f173ce63d4ea6 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2005, 2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2005-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -121,8 +121,10 @@ reset_boxes (state *st)
   else
     {
       st->ncolors = get_integer_resource (st->dpy, "colors", "Colors");  /* re-get */
+      if (st->ncolors < 1) st->ncolors = 1;
       make_smooth_colormap (st->dpy, st->xgwa.visual, st->xgwa.colormap,
                             st->colors, &st->ncolors, True, 0, False);
+      if (st->ncolors < 1) abort();
       XClearWindow (st->dpy, st->window);
     }
 }
index 418b7a1946e78f2e136ed1b0ac3bec1caf8499cd..2a59158cd2c9d6471fc9f28166ff25145b822412 100644 (file)
@@ -69,6 +69,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KUMPPA.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LCDSCRUB.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LIGHTNING.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISA.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISSIE.C
index 418b7a1946e78f2e136ed1b0ac3bec1caf8499cd..2a59158cd2c9d6471fc9f28166ff25145b822412 100644 (file)
@@ -69,6 +69,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KALEIDESCOPE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) KUMPPA.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LASER.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LCDSCRUB.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LIGHTNING.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISA.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H,STANDALONE)/INCL=([],[-],[-.UTILS]) LISSIE.C
index e17ee602255aa433e0e5bd4dac206431d6b0ebd5..d1462bc73ddfaf16eb1a131e82e8594f414560eb 100644 (file)
@@ -4,8 +4,8 @@
             a screen saver and locker for the X window system
                             by Jamie Zawinski
 
-                              version 5.04
-                               13-Nov-2007
+                              version 5.05
+                               01-Mar-2008
 
                      http://www.jwz.org/xscreensaver/
 
index 480348d9350330cc97144281dc3cdb1b557b1564..c93bd2e9ba1cfbbf9becded728a7864d4dd643a7 100644 (file)
 
   <number id="decay" type="slider" arg="-decay %"
           _label="Explosion Decay" _low-label="Linger" _high-label="Pop!"
-          low="0.0" high="1.0" default="0.1"/>
+          low="0.0" high="1.0" default="0.07"/>
+
+  <number id="momentum" type="slider" arg="-momentum %"
+          _label="Explosion Momentum" _low-label="None" _high-label="Full"
+          low="0.0" high="1.0" default="0.6"/>
 
   <hgroup>
    <boolean id="showfps" _label="Show Frames-per-Second" arg-set="-fps"/>
diff --git a/hacks/config/cubicgrid.xml b/hacks/config/cubicgrid.xml
new file mode 100644 (file)
index 0000000..b3b2a30
--- /dev/null
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<screensaver name="cubicgrid" _label="CubicGrid">
+
+  <command arg="-root"/>
+
+  <number id="zoom" type="slider" arg="-zoom %"
+    _label="Dot spacing" _low-label="Close" _high-label="Far"
+    low="15" high="100" default="20"/>  
+
+  <number id="delay" type="slider" arg="-delay %"
+    _label="Animation speed" _low-label="Slow" _high-label="Fast"
+    low="0" high="30000" default="20000" convert="invert"/>
+
+  <number id="speed" type="slider" arg="-speed %"
+    _label="Rotation speed" _low-label="Slow" _high-label="Fast"
+    low="0.2" high="10.0" default="1.0"/>
+
+  <boolean id="bigdots" _label="Big Dots"            arg-unset="-no-bigdots"/>
+  <boolean id="showfps" _label="Show Frames-per-Second" arg-set="-fps"/>
+
+  <_description>
+Draws the view of an observer located inside a rotating 3D lattice of colored 
+points.
+
+Written by Vasek Potocek; 2007.
+  </_description>
+</screensaver>
index 05bcec37f77a3817eed5a936e531c6b9263c85ef..2c2c75e62c4f61fd7a3aa61c76e7b9e062685082 100644 (file)
@@ -4,55 +4,73 @@
 
   <command arg="-root"/>
 
+  <number id="seeds" type="spinbutton" arg="-seeds %"
+          _label="Seeds" low="1" high="15" default="1"/>
+
+  <hgroup>
   <number id="maxcells" type="slider" arg="-maxcells %"
-          _label="Max. number of cells" _low-label="Few" _high-label="Many"
+          _label="Max cells" _low-label="Few" _high-label="Many"
           low="50" high="5000" default="800"/>
-  
+  </hgroup>
+
+  <hgroup>
   <number id="radius" type="slider" arg="-radius %"
           _label="Cell radius" _low-label="Small" _high-label="Huge"
           low="5" high="80" default="40"/>
-  
-  <number id="seeds" type="spinbutton" arg="-seeds %"
-          _label="Seeds" low="1" high="15" default="1"/>
-  
+  </hgroup>
+
+  <hgroup>
   <number id="minfood" type="slider" arg="-minfood %"
-          _label="Min. amount of food" _low-label="Small" _high-label="A lot"
+          _label="Min food" _low-label="Starve" _high-label="Gorge"
           low="0" high="100" default="5"/>
-  
+  </hgroup>
+
+  <hgroup>
   <number id="maxfood" type="slider" arg="-maxfood %"
-          _label="Max. amount of food" _low-label="Small" _high-label="A lot"
+          _label="Max food" _low-label="Starve" _high-label="Gorge"
           low="10" high="100" default="20"/>
-  
+  </hgroup>
+
+  <hgroup>
   <number id="divideage" type="slider" arg="-divideage %"
           _label="Cell division" _low-label="Quick" _high-label="Slow"
           low="1" high="100" default="20"/>
-  
+  </hgroup>
+
+  <hgroup>
   <number id="mindist" type="slider" arg="-mindist %"
           _label="Min. distance" _low-label="Small" _high-label="Large"
           low="1.0" high="3.0" default="1.4"/>
+  </hgroup>
 
-  <boolean id="keepold" _label="Keep dead cells" arg-set="-keepold"/>
-  
+  <hgroup>
   <number id="delay" type="slider" arg="-delay %"
           _label="Animation Speed" _low-label="Slow" _high-label="Fast"
           low="0" high="50000" default="20000"
           convert="invert"/>
-  
+  </hgroup>
+
+  <hgroup>
   <number id="pause" type="slider" arg="-pause %"
           _label="Pause at end" _low-label="Short" _high-label="Long"
           low="0" high="400" default="20"/>
-  
+  </hgroup>
+
   <select id="quality">
     <option id="q0" _label="Lowest sphere detail"  arg-set="-quality 0"/>
     <option id="q1" _label="Medium sphere detail"  arg-set="-quality 1"/>
     <option id="q2" _label="Normal sphere detail"  arg-set="-quality 2"/>
-    <option id="q3" _label="More sphere detail"    arg-set="-quality 3"/>
+    <option id="q3" _label="More sphere detail"/>
     <option id="q4" _label="Highest sphere detail" arg-set="-quality 4"/>
   </select>
-  
+
+  <hgroup>
+  <boolean id="keepold" _label="Keep dead cells" arg-set="-keepold"/>
+
   <boolean id="showfps" _label="Show Frames-per-Second" arg-set="-fps"/>
-  
+
   <boolean id="wireframe" _label="Wireframe" arg-set="-wireframe"/>
+  </hgroup>
 
   <xscreensaver-image />
 
diff --git a/hacks/config/hypnowheel.xml b/hacks/config/hypnowheel.xml
new file mode 100644 (file)
index 0000000..af4a708
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<screensaver name="hypnowheel" _label="Hypnowheel">
+
+  <command arg="-root"/>
+
+  <number id="delay" type="slider" arg="-delay %"
+          _label="Frame Rate" _low-label="Slow" _high-label="Fast"
+          low="0" high="100000" default="20000"
+          convert="invert"/>
+
+  <number id="speed" type="slider" arg="-speed %"
+          _label="Speed" _low-label="Slow" _high-label="Fast"
+          low="0.1" high="20.0" default="1.0"/>
+
+  <number id="layers" type="slider" arg="-layers %"
+          _label="Layers" _low-label="1" _high-label="50"
+          low="1" high="50" default="4"/>
+
+  <number id="count" type="slider" arg="-count %"
+          _label="Arms" _low-label="2" _high-label="50"
+          low="2" high="50" default="13"/>
+
+  <number id="twistiness" type="slider" arg="-twistiness %"
+          _label="Twistiness" _low-label="Low" _high-label="High"
+          low="0.2" high="10" default="4"/>
+
+  <hgroup>
+  <boolean id="wander"    _label="Wander"             arg-set="-wander"/>
+  <boolean id="symmetric" _label="Symmetric Twisting" arg-set="-symmetric"/>
+  </hgroup>
+
+  <boolean id="showfps" _label="Show Frames-per-Second" arg-set="-fps"/>
+
+  <_description>
+Draws a series of overlapping, translucent spiral patterns.
+The tightness of their spirals fluctuates in and out.
+
+Written by Jamie Zawinski; 2008.
+  </_description>
+</screensaver>
index 2bf89bebed6a96b14408e93b80d351c20e8215e4..08ef2397363b82ba2f0699db322caf26f97ca09a 100644 (file)
@@ -27,7 +27,7 @@
   <!-- #### -spring_constant [5] -->
 
   <_description>
-A simple kaleidescope.  See also "gleidescope".
+A simple kaleidoscope.  See also "gleidescope".
 
 Written by Ron Tapia; 1997.
   </_description>
diff --git a/hacks/config/lcdscrub.xml b/hacks/config/lcdscrub.xml
new file mode 100644 (file)
index 0000000..ce8f203
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<screensaver name="lcdscrub" _label="LCDscrub">
+
+  <command arg="-root"/>
+
+  <number id="delay" type="slider" arg="-delay %"
+          _label="Speed" _low-label="Slow" _high-label="Fast"
+          low="0" high="1500000" default="1000000"
+          convert="invert"/>
+
+  <hgroup>
+  <number id="spread" type="spinbutton" arg="-spread %"
+          _label="Spread" low="2" high="64" default="8"/>
+
+  <number id="cycles" type="spinbutton" arg="-cycles %"
+          _label="Cycles" low="1" high="600" default="60"/>
+  </hgroup>
+
+  <_description>
+This screen saver is not meant to look pretty, but rather, to
+repair burn-in on LCD monitors.
+
+Believe it or not, screen burn is not a thing of the past.
+It can happen to LCD screens pretty easily, even in this modern age.
+However, leaving the screen on and displaying high contrast images
+can often repair the damage.  That's what this screen saver does.
+
+See also:
+
+       http://docs.info.apple.com/article.html?artnum=88343
+
+       http://toastycode.com/blog/2008/02/05/lcd-scrub/
+
+Inspired by the like-named program by Daniel Sandler.
+
+Written by Jamie Zawinski; 2008.
+  </_description>
+</screensaver>
index c74e921de4698e9ac3d9b07055bde42b24e016cd..c0c33b271456c0870ab5d2296fbdb993ce9a1a71 100644 (file)
@@ -407,6 +407,7 @@ init_flag(ModeInfo * mi)
        fp = &flags[MI_SCREEN(mi)];
 
        make_flag_bits(mi);
+    if (!fp->image) abort();
 
        fp->width = MI_WIN_WIDTH(mi);
        fp->height = MI_WIN_HEIGHT(mi);
@@ -476,6 +477,7 @@ draw_flag(ModeInfo * mi)
        Window      window = MI_WINDOW(mi);
        flagstruct *fp = &flags[MI_SCREEN(mi)];
 
+    if (!fp->image) abort();
     if (fp->cache == window) {  /* not double-buffering */
       XClearWindow (display, window);
     } else if (fp->width <= MAXW(fp) || fp->height <= MAXH(fp)) {
index 6f2eb9ea0a8edf941680993ce670e9ef47174827..5d73861ca31233709fb4a73587bddb32b3b62b24 100644 (file)
@@ -105,7 +105,7 @@ SRCS                = xscreensaver-gl-helper.c normals.c glxfonts.c \
                  tangram_shapes.c crackberg.c glhanoi.c cube21.c \
                  timetunnel.c juggler3d.c topblock.c glschool.c \
                  glschool_gl.c glschool_alg.c glcells.c voronoi.c \
-                 moebiusgears.c lockward.c
+                 moebiusgears.c lockward.c cubicgrid.c hypnowheel.c
 
 OBJS           = xscreensaver-gl-helper.o normals.o glxfonts.o \
                  atlantis.o b_draw.o b_lockglue.o b_sphere.o bubble3d.o \
@@ -139,7 +139,7 @@ OBJS                = xscreensaver-gl-helper.o normals.o glxfonts.o \
                  tangram_shapes.o crackberg.o glhanoi.o cube21.o \
                  timetunnel.o juggler3d.o topblock.o glschool.o \
                  glschool_gl.o glschool_alg.o glcells.o voronoi.o \
-                 moebiusgears.o lockward.o
+                 moebiusgears.o lockward.o cubicgrid.o hypnowheel.o
 
 GL_EXES                = cage gears moebius pipes sproingies stairs superquadrics \
                  morph3d rubik atlantis lament bubble3d glplanet pulsar \
@@ -153,7 +153,7 @@ GL_EXES             = cage gears moebius pipes sproingies stairs superquadrics \
                  antinspect providence pinion boing carousel fliptext \
                  antmaze tangram crackberg glhanoi cube21 timetunnel \
                  juggler3d topblock glschool glcells voronoi moebiusgears \
-                 lockward
+                 lockward cubicgrid hypnowheel
 GLE_EXES       = extrusion
 GL_UTIL_EXES   = xscreensaver-gl-helper
 HACK_EXES      = @GL_EXES@ @GLE_EXES@
@@ -195,7 +195,8 @@ GL_MEN              = atlantis.man boxed.man bubble3d.man cage.man circuit.man \
                  carousel.man fliptext.man antmaze.man tangram.man \
                  crackberg.man glhanoi.man cube21.man timetunnel.man \
                  juggler3d.man topblock.man glschool.man glcells.man \
-                 voronoi.man moebiusgears.man lockward.man
+                 voronoi.man moebiusgears.man lockward.man cubicgrid.man \
+                 hypnowheel.man
 MEN            = @GL_MEN@
 EXTRAS         = README Makefile.in dxf2gl.pl molecules.sh starwars.txt
 
@@ -722,6 +723,11 @@ voronoi:   voronoi.o       $(HACK_OBJS)
 lockward:      lockward.o      $(HACK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(HACK_LIBS)
 
+cubicgrid:     cubicgrid.o     $(HACK_TRACK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_TRACK_OBJS) $(HACK_LIBS)
+
+hypnowheel:    hypnowheel.o    $(HACK_TRACK_OBJS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_TRACK_OBJS) $(HACK_LIBS)
 
 ##############################################################################
 #
@@ -1026,6 +1032,20 @@ cubestorm.o: $(UTILS_SRC)/xshm.h
 cubestorm.o: $(UTILS_SRC)/yarandom.h
 cubestorm.o: $(HACK_SRC)/xlockmoreI.h
 cubestorm.o: $(HACK_SRC)/xlockmore.h
+cubicgrid.o: ../../config.h
+cubicgrid.o: $(srcdir)/gltrackball.h
+cubicgrid.o: $(srcdir)/rotator.h
+cubicgrid.o: $(HACK_SRC)/screenhackI.h
+cubicgrid.o: $(UTILS_SRC)/colors.h
+cubicgrid.o: $(UTILS_SRC)/grabscreen.h
+cubicgrid.o: $(UTILS_SRC)/hsv.h
+cubicgrid.o: $(UTILS_SRC)/resources.h
+cubicgrid.o: $(UTILS_SRC)/usleep.h
+cubicgrid.o: $(UTILS_SRC)/visual.h
+cubicgrid.o: $(UTILS_SRC)/xshm.h
+cubicgrid.o: $(UTILS_SRC)/yarandom.h
+cubicgrid.o: $(HACK_SRC)/xlockmoreI.h
+cubicgrid.o: $(HACK_SRC)/xlockmore.h
 dangerball.o: ../../config.h
 dangerball.o: $(srcdir)/gltrackball.h
 dangerball.o: $(srcdir)/rotator.h
@@ -1476,6 +1496,19 @@ hypertorus.o: $(UTILS_SRC)/xshm.h
 hypertorus.o: $(UTILS_SRC)/yarandom.h
 hypertorus.o: $(HACK_SRC)/xlockmoreI.h
 hypertorus.o: $(HACK_SRC)/xlockmore.h
+hypnowheel.o: ../../config.h
+hypnowheel.o: $(srcdir)/rotator.h
+hypnowheel.o: $(HACK_SRC)/screenhackI.h
+hypnowheel.o: $(UTILS_SRC)/colors.h
+hypnowheel.o: $(UTILS_SRC)/grabscreen.h
+hypnowheel.o: $(UTILS_SRC)/hsv.h
+hypnowheel.o: $(UTILS_SRC)/resources.h
+hypnowheel.o: $(UTILS_SRC)/usleep.h
+hypnowheel.o: $(UTILS_SRC)/visual.h
+hypnowheel.o: $(UTILS_SRC)/xshm.h
+hypnowheel.o: $(UTILS_SRC)/yarandom.h
+hypnowheel.o: $(HACK_SRC)/xlockmoreI.h
+hypnowheel.o: $(HACK_SRC)/xlockmore.h
 involute.o: ../../config.h
 involute.o: $(srcdir)/involute.h
 involute.o: $(srcdir)/normals.h
index 651deb2e5ee2590c161c637f176b49f53931b81a..fb19cb081a44578077cd2413f0711dad43ace8a3 100644 (file)
@@ -570,7 +570,9 @@ ENTRYPOINT Bool antinspect_handle_event (ModeInfo *mi, XEvent *event)
   }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (mp->trackball, event->xbutton.button, 5,
                               !event->xbutton.state);
index 87e34c65751374f2988d0ca88f865708a95afc1c..c7f0c605b49c4ed0cf28caa0ad22018137e6660c 100644 (file)
@@ -90,7 +90,9 @@ static Bool draw_ant(antspotlightstruct *mp,
   float sin2 = sin(ant_step + 2 * Pi / 3);
   float sin3 = sin(ant_step + 4 * Pi / 3);
   
-  glEnable(GL_POLYGON_SMOOTH);
+/* Apparently this is a performance killer on many systems...
+   glEnable(GL_POLYGON_SMOOTH);
+ */
   glEnable(GL_BLEND);
   glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
index 828c754718a66a351983b0871d313d3d5dabca58..cb09a049d17e99f32e2b230b2aa6e90958e63ec8 100644 (file)
@@ -1,4 +1,4 @@
-/* boing, Copyright (c) 2005 Jamie Zawinski <jwz@jwz.org>
+/* boing, Copyright (c) 2005-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -493,7 +493,9 @@ boing_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index e96bc647982d449c6a72b5b0493cf3db607c450d..35b0142211fa563ee191105ce4d67670b13f12fa 100644 (file)
@@ -198,7 +198,9 @@ cow_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
                               !event->xbutton.state);
index ef7e051f792cf7224281aa4ffa6fb6dba14f3e07..42f68c1c1970ffc4d86f1785063465f2c421dd94 100644 (file)
@@ -26,6 +26,10 @@ static const char sccsid[] = "@(#)boxed.c    0.9 01/09/26 xlockmore";
  *
  * 2005: opts work. added options -balls, -ballsize, -explosion
  *
+ * 2006: opts work. added option -decay
+ *
+ * 2008: opts work. added option -momentum
+ *
  */
 
 #include "boxed.h"
@@ -54,7 +58,8 @@ static const char sccsid[] = "@(#)boxed.c     0.9 01/09/26 xlockmore";
 # define DEF_BALLS     "25"
 # define DEF_BALLSIZE   "2.0"
 # define DEF_EXPLOSION "15.0"
-# define DEF_DECAY     "0.1"
+# define DEF_DECAY     "0.07"
+# define DEF_MOMENTUM  "0.6"
 
 #undef countof 
 #define countof(x) (int)(sizeof((x))/sizeof((*x)))
@@ -66,6 +71,7 @@ static int cfg_balls;
 static GLfloat cfg_ballsize;
 static GLfloat cfg_explosion;
 static GLfloat cfg_decay;
+static GLfloat cfg_momentum;
 
 
 static XrmOptionDescRec opts[] = {
@@ -74,6 +80,7 @@ static XrmOptionDescRec opts[] = {
     {"-ballsize", ".boxed.ballsize", XrmoptionSepArg, 0},
     {"-explosion", ".boxed.explosion", XrmoptionSepArg, 0},
     {"-decay", ".boxed.decay", XrmoptionSepArg, 0},
+    {"-momentum", ".boxed.momentum", XrmoptionSepArg, 0},
 };
 
 static argtype vars[] = {
@@ -82,6 +89,7 @@ static argtype vars[] = {
     {&cfg_ballsize, "ballsize", "Ball Size", DEF_BALLSIZE, t_Float},
     {&cfg_explosion, "explosion", "Explosion", DEF_EXPLOSION, t_Float},
     {&cfg_decay, "decay", "Explosion Decay", DEF_DECAY, t_Float},
+    {&cfg_momentum, "momentum", "Explosion Momentum", DEF_MOMENTUM, t_Float},
 };
 
 ENTRYPOINT ModeSpecOpt boxed_opts = {countof(opts), opts, countof(vars), vars, NULL};
@@ -153,6 +161,7 @@ typedef struct {
    float       scalefac;
    float       explosion;
    float       decay;
+   float       momentum;
    vectorf     color;
    tri         *tris;
    GLint       *indices;
@@ -165,6 +174,7 @@ typedef struct {
    float ballsize;
    float explosion;
    float decay;
+   float momentum;
    BOOL textures;
    BOOL transparent;
    float camspeed;
@@ -260,6 +270,12 @@ squaremagnitude(vectorf * v)
    return v->x * v->x + v->y * v->y + v->z * v->z;
 }
 
+static inline GLfloat
+squaremagnitudehorz(vectorf * v)
+{
+   return v->x * v->x + v->z * v->z;
+}
+
 
 
 /*
@@ -400,7 +416,10 @@ static void updateballs(ballman *bman)
               scalevector(&bman->balls[b].dir,&bman->balls[b].dir,0.80f);
               if (squaremagnitude(&bman->balls[b].dir) < 0.08f) {
                  createball(&bman->balls[b]);
-              }
+               }
+              if (squaremagnitudehorz(&bman->balls[b].dir) < 0.005f) {
+                 createball(&bman->balls[b]);
+               }
            }
         }
         
@@ -471,13 +490,15 @@ static void createtrisfromball(triman* tman, vectorf *spherev, GLint *spherei, i
 {
    int pos;
    float explosion;
+   float momentum;
    float scale;
    register int i;
-   vectorf avgdir,dvect;
+   vectorf avgdir,dvect,mvect;
 
    tman->scalefac = b->radius;
    copyvector(&tman->color,&b->color);
    explosion = 1.0f + tman->explosion * 2.0 * rnd();
+   momentum = tman->momentum;
 
    tman->num_tri = ind_num/3;
    
@@ -537,6 +558,12 @@ static void createtrisfromball(triman* tman, vectorf *spherev, GLint *spherei, i
       dvect.y = (0.15f - 0.3f*rnd());
       dvect.z = (0.1f - 0.2f*rnd());
       addvectors(&tman->tris[i].dir,&tman->tris[i].dir,&dvect);
+
+      /* add ball's momentum to each piece of the exploded ball */
+      mvect.x = b->dir.x * momentum;
+      mvect.y = 0;
+      mvect.z = b->dir.z * momentum;
+      addvectors(&tman->tris[i].dir,&tman->tris[i].dir,&mvect);
    }
 }
 
@@ -643,12 +670,14 @@ static void setdefaultconfig(boxed_config *config)
   cfg_ballsize = MAX(1.0f,MIN(5.0f,cfg_ballsize));
   cfg_explosion = MAX(0.0f,MIN(50.0f,cfg_explosion));
   cfg_decay = MAX(0.0f,MIN(1.0f,cfg_decay));
+  cfg_momentum = MAX(0.0f,MIN(1.0f,cfg_momentum));
 
   config->numballs = cfg_balls;
   config->textures = TRUE;
   config->transparent = FALSE;
   config->explosion = cfg_explosion;
   config->decay = cfg_decay;
+  config->momentum = cfg_momentum;
   config->ballsize = cfg_ballsize;
   config->camspeed = 35.0f;
 }
@@ -1082,6 +1111,10 @@ pinit(ModeInfo * mi)
    
    /* Load configuration */
    setdefaultconfig(&gp->config);
+
+   /* give the decay parameter a better curve */
+   if (gp->config.decay <= 0.8182) { gp->config.decay = gp->config.decay / 3; }
+   else                            { gp->config.decay = (gp->config.decay - 0.75) * 4; }
    
    bman = &gp->bman;
    
@@ -1096,6 +1129,7 @@ pinit(ModeInfo * mi)
    for(i=0;i<bman->num_balls;i++) {
       gp->tman[i].explosion = (float) (((int)gp->config.explosion) / 15.0f );
       gp->tman[i].decay = gp->config.decay;
+      gp->tman[i].momentum = gp->config.momentum;
       gp->tman[i].vertices = NULL;
       gp->tman[i].normals = NULL;
       gp->tman[i].tris = NULL;
index d5de4924a4aa031485d6b5bd02037f59214654c8..464035b5c3260c2ed8c7bbbbda3269cbb61889c0 100644 (file)
@@ -1,4 +1,4 @@
-/* carousel, Copyright (c) 2005-2007 Jamie Zawinski <jwz@jwz.org>
+/* carousel, Copyright (c) 2005-2008 Jamie Zawinski <jwz@jwz.org>
  * Loads a sequence of images and rotates them around.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -448,7 +448,9 @@ carousel_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (ss->trackball, event->xbutton.button, 5,
                               !event->xbutton.state);
index e632cc0380c96755c6a031b00152271ce7e22a79..694c147b55b3b4f29869ddd274e4808def5706ee 100644 (file)
@@ -1,4 +1,4 @@
-/* cubenetic, Copyright (c) 2002-2006 Jamie Zawinski <jwz@jwz.org>
+/* cubenetic, Copyright (c) 2002-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -348,7 +348,9 @@ cube_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (cc->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 09a0ff2d594b792bdc508dc7eee4d1525b85afea..1eb3073aa70847d94ccffd161d99e293c96cbe37 100644 (file)
@@ -1,4 +1,4 @@
-/* cubestorm, Copyright (c) 2003, 2004 Jamie Zawinski <jwz@jwz.org>
+/* cubestorm, Copyright (c) 2003-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -34,6 +34,7 @@
 #define DEF_SPEED       "1.0"
 #define DEF_THICKNESS   "0.06"
 #define DEF_COUNT       "4"
+#define DEF_DBUF        "False"
 
 typedef struct {
   rotator *rot;
@@ -61,6 +62,7 @@ static Bool do_spin;
 static Bool do_wander;
 static GLfloat speed;
 static GLfloat thickness;
+static Bool dbuf_p;
 
 static XrmOptionDescRec opts[] = {
   { "-spin",   ".spin",   XrmoptionNoArg, "True" },
@@ -68,7 +70,9 @@ static XrmOptionDescRec opts[] = {
   { "-wander", ".wander", XrmoptionNoArg, "True" },
   { "+wander", ".wander", XrmoptionNoArg, "False" },
   { "-speed",  ".speed",  XrmoptionSepArg, 0 },
-  { "-thickness", ".thickness",  XrmoptionSepArg, 0 },
+  { "-db",     ".doubleBuffer", XrmoptionNoArg, "True"},
+  { "+db",     ".doubleBuffer", XrmoptionNoArg, "False"},
+  { "-thickness", ".thickness", XrmoptionSepArg, 0 },
 };
 
 static argtype vars[] = {
@@ -76,6 +80,7 @@ static argtype vars[] = {
   {&do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
   {&speed,     "speed",  "Speed",  DEF_SPEED,  t_Float},
   {&thickness, "thickness", "Thickness",  DEF_THICKNESS,  t_Float},
+  {&dbuf_p, "doubleBuffer", "DoubleBuffer", DEF_DBUF, t_Bool},
 };
 
 ENTRYPOINT ModeSpecOpt cube_opts = {countof(opts), opts, countof(vars), vars, NULL};
@@ -195,7 +200,9 @@ cube_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
@@ -308,6 +315,7 @@ init_cube (ModeInfo *mi)
   draw_faces (mi);
   glEndList ();
 
+  glDrawBuffer(dbuf_p ? GL_BACK : GL_FRONT);
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 }
 
@@ -410,7 +418,8 @@ draw_cube (ModeInfo *mi)
   if (mi->fps_p) do_fps (mi);
   glFinish();
 
-  glXSwapBuffers(dpy, window);
+  if (dbuf_p)
+    glXSwapBuffers(dpy, window);
 }
 
 XSCREENSAVER_MODULE_2 ("CubeStorm", cubestorm, cube)
diff --git a/hacks/glx/cubicgrid.c b/hacks/glx/cubicgrid.c
new file mode 100644 (file)
index 0000000..a7238b8
--- /dev/null
@@ -0,0 +1,288 @@
+/*-
+ * 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 and that
+ * both that copyright notice and this permission notice appear in
+ * supporting documentation.
+ *
+ * This file is provided AS IS with no warranties of any kind.  The author
+ * shall have no liability with respect to the infringement of copyrights,
+ * trade secrets or any patents by this file or any part thereof.  In no
+ * event will the author be liable for any lost revenue or profits or
+ * other special, indirect and consequential damages.
+ *
+ * Cubic Grid - a 3D lattice. The observer is located in the centre of 
+ * a spinning finite lattice. As it rotates, various view-throughs appear and 
+ * evolve. A simple idea with interesting results.
+ * 
+ * Vasek Potocek (Dec-28-2007)
+ * vasek.potocek@post.cz
+ */
+
+#define DEFAULTS   "*delay:         20000         \n" \
+                   "*showFPS:       False         \n" \
+                   "*wireframe:     False         \n"
+
+# define refresh_cubicgrid 0
+#include "xlockmore.h"
+
+#ifdef USE_GL
+
+#define DEF_SPEED   "1.0"
+#define DEF_DIV     "30"
+#define DEF_SIZE    "20.0"
+#define DEF_BIGDOTS "True"
+
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+#include "rotator.h"
+#include "gltrackball.h"
+
+/*************************************************************************/
+
+static int ticks;
+static float size;
+static float speed;
+static Bool bigdots;
+
+static argtype vars[] = {
+  { &speed,   "speed",   "Speed",   DEF_SPEED,   t_Float },
+  { &size,    "zoom",    "Zoom",    DEF_SIZE,    t_Float },
+  { &ticks,   "ticks",   "Ticks",   DEF_DIV,     t_Int },
+  { &bigdots, "bigdots", "BigDots", DEF_BIGDOTS, t_Bool },
+};
+
+static XrmOptionDescRec opts[] = {
+  { "-speed",   ".speed",   XrmoptionSepArg, 0 },
+  { "-zoom",    ".zoom",    XrmoptionSepArg, 0 },
+  { "-ticks",   ".ticks",   XrmoptionSepArg, 0 },
+  { "-bigdots", ".bigdots", XrmoptionNoArg,  "True" },
+  { "+bigdots", ".bigdots", XrmoptionNoArg,  "False" },
+};
+
+ENTRYPOINT ModeSpecOpt cubicgrid_opts = {countof(opts), opts, countof(vars), vars, NULL};
+
+#ifdef USE_MODULES
+ModStruct   cubicgrid_description =
+{ "cubicgrid", "init_cubicgrid", "draw_cubicgrid", "release_cubicgrid",
+  "draw_cubicgrid", "change_cubicgrid", NULL, &cubicgrid_opts,
+  25000, 1, 1, 1, 1.0, 4, "",
+  "Shows a rotating 3D lattice from inside", 0, NULL
+};
+#endif
+
+typedef struct {
+  GLXContext    *glx_context;
+  GLfloat       ratio;
+  GLint         list;
+
+  rotator *rot;
+  trackball_state *trackball;
+  Bool button_down_p;
+} cubicgrid_conf;
+
+static cubicgrid_conf *cubicgrid = NULL;
+
+static const GLfloat zpos = -18.0;
+
+/*************************************************************************/
+
+ENTRYPOINT Bool
+cubicgrid_handle_event (ModeInfo *mi, XEvent *event)
+{
+  cubicgrid_conf *cp = &cubicgrid[MI_SCREEN(mi)];
+
+  if (event->xany.type == ButtonPress &&
+      event->xbutton.button == Button1)
+    {
+      cp->button_down_p = True;
+      gltrackball_start (cp->trackball,
+                         event->xbutton.x, event->xbutton.y,
+                         MI_WIDTH (mi), MI_HEIGHT (mi));
+      return True;
+    }
+  else if (event->xany.type == ButtonRelease &&
+           event->xbutton.button == Button1)
+    {
+      cp->button_down_p = False;
+      return True;
+    }
+  else if (event->xany.type == ButtonPress &&
+           (event->xbutton.button == Button4 ||
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
+    {
+      gltrackball_mousewheel (cp->trackball, event->xbutton.button, 2,
+                              !!event->xbutton.state);
+      return True;
+    }
+  else if (event->xany.type == MotionNotify &&
+           cp->button_down_p)
+    {
+      gltrackball_track (cp->trackball,
+                         event->xmotion.x, event->xmotion.y,
+                         MI_WIDTH (mi), MI_HEIGHT (mi));
+      return True;
+    }
+
+  return False;
+}
+
+
+static Bool draw_main(cubicgrid_conf *cp) 
+{
+  double x, y, z;
+
+  glClear(GL_COLOR_BUFFER_BIT);
+  glLoadIdentity();
+  glTranslatef(0, 0, zpos);
+
+  glScalef(size/ticks, size/ticks, size/ticks);
+  gltrackball_rotate (cp->trackball);
+  get_rotation (cp->rot, &x, &y, &z, !cp->button_down_p);
+  glRotatef (x * 360, 1.0, 0.0, 0.0);
+  glRotatef (y * 360, 0.0, 1.0, 0.0);
+  glRotatef (z * 360, 0.0, 0.0, 1.0);
+
+  glTranslatef(-ticks/2.0, -ticks/2.0, -ticks/2.0);
+  glCallList(cp->list);
+
+  return True;
+}
+
+static void init_gl(ModeInfo *mi) 
+{
+  cubicgrid_conf *cp = &cubicgrid[MI_SCREEN(mi)];
+  int x, y, z;
+  float tf = ticks;
+
+  glClearColor(0.0, 0.0, 0.0, 1.0);
+  glDrawBuffer(GL_BACK);
+  if(bigdots) {
+    glPointSize(2.0);
+  }
+  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+  glShadeModel(GL_FLAT);
+
+  cp->list = glGenLists(1);
+  glNewList(cp->list, GL_COMPILE);
+  if(MI_IS_MONO(mi)) {
+    glColor3f(1.0, 1.0, 1.0);
+    glBegin(GL_POINTS);
+    for(x = 0; x < ticks; x++) {
+      for(y = 0; y < ticks; y++) {
+        for(z = 0; z < ticks; z++) {
+          glVertex3f(x, y, z);
+        }
+      }
+    }
+    glEnd();
+  }
+  else
+  {
+    glBegin(GL_POINTS);
+    for(x = 0; x < ticks; x++) {
+      for(y = 0; y < ticks; y++) {
+        for(z = 0; z < ticks; z++) {
+          glColor3f(x/tf, y/tf, z/tf);
+          glVertex3f(x, y, z);
+        }
+      }
+    }
+    glEnd();
+  }
+  glEndList();
+}
+
+/*************************************************************************/
+
+ENTRYPOINT void reshape_cubicgrid(ModeInfo *mi, int width, int height) 
+{
+  cubicgrid_conf *cp = &cubicgrid[MI_SCREEN(mi)];
+  if(!height) height = 1;
+  cp->ratio = (GLfloat)width/(GLfloat)height;
+  glViewport(0, 0, (GLint) width, (GLint) height);
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+  gluPerspective(30.0, cp->ratio, 1.0, 100.0);
+  glMatrixMode(GL_MODELVIEW);
+  glClear(GL_COLOR_BUFFER_BIT);
+}
+
+ENTRYPOINT void release_cubicgrid(ModeInfo *mi) 
+{
+  if (cubicgrid != NULL) {
+    int screen;
+    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
+      cubicgrid_conf *cp = &cubicgrid[screen];
+      if (cp->glx_context) {
+        cp->glx_context = NULL;
+      }
+    }
+    free((void *)cubicgrid);
+    cubicgrid = NULL;
+  }
+  FreeAllGL(mi);
+}
+
+ENTRYPOINT void init_cubicgrid(ModeInfo *mi) 
+{
+  cubicgrid_conf *cp;
+  if(!cubicgrid) {
+    cubicgrid = (cubicgrid_conf *)calloc(MI_NUM_SCREENS(mi), sizeof(cubicgrid_conf));
+    if(!cubicgrid) return;
+  }
+  cp = &cubicgrid[MI_SCREEN(mi)];
+
+  if ((cp->glx_context = init_GL(mi)) != NULL) {
+    init_gl(mi);
+    reshape_cubicgrid(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+  } else {
+    MI_CLEARWINDOW(mi);
+  }
+
+  {
+    double spin_speed = 0.045 * speed;
+    double spin_accel = 0.005 * speed;
+
+    cp->rot = make_rotator (spin_speed, spin_speed, spin_speed,
+                            spin_accel, 0, True);
+    cp->trackball = gltrackball_init ();
+  }
+}
+
+ENTRYPOINT void draw_cubicgrid(ModeInfo * mi) 
+{
+  Display *display = MI_DISPLAY(mi);
+  Window window = MI_WINDOW(mi);
+  cubicgrid_conf *cp;
+  if (!cubicgrid) return;
+  cp = &cubicgrid[MI_SCREEN(mi)];
+  MI_IS_DRAWN(mi) = True;
+  if (!cp->glx_context) return;
+  glXMakeCurrent(display, window, *(cp->glx_context));
+  if (!draw_main(cp)) {
+    release_cubicgrid(mi);
+    return;
+  }
+  if (MI_IS_FPS(mi)) do_fps (mi);
+  glFlush();
+  glXSwapBuffers(display, window);
+}
+
+#ifndef STANDALONE
+ENTRYPOINT void change_cubicgrid(ModeInfo * mi) 
+{
+  cubicgrid_conf *cp = &cubicgrid[MI_SCREEN(mi)];
+  if (!cp->glx_context) return;
+  glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(cp->glx_context));
+  init_gl(mi);
+}
+#endif /* !STANDALONE */
+
+
+XSCREENSAVER_MODULE ("CubicGrid", cubicgrid)
+
+#endif
diff --git a/hacks/glx/cubicgrid.man b/hacks/glx/cubicgrid.man
new file mode 100644 (file)
index 0000000..ebf43c2
--- /dev/null
@@ -0,0 +1,85 @@
+.TH XScreenSaver 1 "Dec-28-07" "X Version 11"
+.SH NAME
+cubicgrid - rotating 3D lattice seen from inside
+.SH SYNOPSIS
+.B cubicgrid
+[\-display \fIhost:display.screen\fP]
+[\-visual \fIvisual\fP]
+[\-window]
+[\-root]
+[\-install]
+[\-delay \fImicroseconds\fP]
+[\-mono]
+[\-speed \fInumber\fP]
+[\-zoom \fInumber\fP]
+[\-ticks \fInumber\fP]
+[\-bigdots]
+[\-fps]
+.SH DESCRIPTION
+This program shows the view of an observer located inside a set of points 
+arranged to a 3D lattice.  As the lattice rotates, various view-throughs appear 
+and evolve.  A simple idea with interesting results.
+.SH OPTIONS
+.I cubicgrid
+accepts the following options:
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-install
+Install a private colormap for the window.
+.TP 8
+.B \-visual \fIvisual\fP\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-delay \fImicroseconds\fP
+How long to pause between frames.  Default is 20000, or 0.02 second.
+.TP 8
+.B \-mono
+Draw in black and white.  If not used, a fixed all-color scheme is chosen.
+.TP 8
+.B \-speed \fInumber\fP
+The maximum speed of the rotation.  The actual speed and axis change smoothly 
+for better effect.  0.5 - 10.  The default is 1.0.
+.TP 8
+.B \-zoom \fInumber\fP
+Size of the lattice.  Ideally it should fill all the screen, but one may find 
+other values also interesting.  5 - 50.  The default of 20 should do for common 
+screen aspect ratios.
+.TP 8
+.B \-ticks \fInumber\fP
+The count of points drawn along every axis.  10 - 100.  The default is 30.
+.TP 8
+.B \-bigdots
+Draw the points twice as big.
+.TP 8
+.B \-fps
+Display a running tally of how many frames per second are being rendered.
+In conjunction with \fB\-delay 0\fP, this can be a useful benchmark of 
+your GL performance.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.SH COPYRIGHT
+Copyright \(co 2007 by Vasek Potocek.  Permission to use, copy, modify, 
+distribute, and sell this software and its documentation for any purpose is 
+hereby granted without fee, provided that the above copyright notice appear in 
+all copies and that both that copyright notice and this permission notice
+appear in supporting documentation.  No representations are made about the 
+suitability of this software for any purpose.  It is provided "as is" without
+express or implied warranty.
+.SH AUTHOR
+Vasek Potocek <vasek.potocek@post.cz>, Dec-28-07.
index a882500a15bf54b6959af936f551e19e92412b23..b115d1895af670fd03a56e86669bcda50f333d1f 100644 (file)
@@ -1,4 +1,4 @@
-/* dangerball, Copyright (c) 2001-2004 Jamie Zawinski <jwz@jwz.org>
+/* dangerball, Copyright (c) 2001-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -196,7 +196,9 @@ ball_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 465b7ca1cb67e57f21348f398cbcd7dd11ddd02b..8cdca30fc1ad43b52de48308074dcddbb6bf6662 100644 (file)
@@ -1098,7 +1098,9 @@ logo_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (dc->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 0ccf2a3d5cee5c43dba803de404053cb49ed8e63..857183bfb69f5b4ce56abae7eb8a87c5e69d3c41 100644 (file)
@@ -4,7 +4,7 @@
  *
  * version 1.0 - June 6, 2002
  *
- * Copyright (C) 2002-2007 Blair Tennessy (tennessb@unbc.ca)
+ * Copyright (C) 2002-2008 Blair Tennessy (tennessb@unbc.ca)
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -122,7 +122,7 @@ static const GLfloat whites[WHITES][3] =
     {1.0, 0.55, 0.1},
     {0.8, 0.52, 0.8},
     {0.43, 0.54, 0.76},
-    {0.8, 0.8, 0.8},
+    {0.2, 0.2, 0.2},
     {0.35, 0.60, 0.35},
   };
 
@@ -211,7 +211,9 @@ ENTRYPOINT Bool chess_handle_event (ModeInfo *mi, XEvent *event)
   }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (cs->trackball, event->xbutton.button, 5,
                               !event->xbutton.state);
index 2f72355c84fe86fea59bf3b24e0b9370efcfe9d7..aadc1a265f8c3b640d41d34775a45326991d9e0c 100644 (file)
@@ -920,7 +920,9 @@ engine_handle_event (ModeInfo *mi, XEvent *event)
    }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (e->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 6637512f6b20dc55b66b4f13993f38c3132ccd13..7e98f5e3bf924524049e5cf24b065702a6081a73 100644 (file)
@@ -477,7 +477,9 @@ extrusion_handle_event (ModeInfo *mi, XEvent *event)
 
   if (event->xany.type == ButtonPress &&
       (event->xbutton.button == Button4 ||
-       event->xbutton.button == Button5))
+       event->xbutton.button == Button5 ||
+       event->xbutton.button == Button6 ||
+       event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (gp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index f38385e4072026d0b42925876fa5b5cee3bf20c4..229401de0e42e2d9991e809451fe368934f4b44d 100644 (file)
@@ -184,7 +184,9 @@ flipflop_handle_event (ModeInfo *mi, XEvent *event)
         }
     else if (event->xany.type == ButtonPress &&
              (event->xbutton.button == Button4 ||
-              event->xbutton.button == Button5))
+              event->xbutton.button == Button5 ||
+              event->xbutton.button == Button6 ||
+              event->xbutton.button == Button7))
         {
             gltrackball_mousewheel (c->trackball, event->xbutton.button, 5,
                                     !event->xbutton.state);
index 996d7c75b610b94327c20a889a87632e4a528f8a..ecdd37d7aae29eb5e9171955dff7d2f4baed9f4e 100644 (file)
@@ -140,7 +140,9 @@ screenflip_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (c->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 83e9c9c81d74ccc04b78564262a7945fe2db1610..52e59586db08d610b44b1ea06ea4b022111250f4 100644 (file)
@@ -323,7 +323,9 @@ toasters_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->user_trackball, event->xbutton.button, 5,
                               !event->xbutton.state);
index added7c65b840fb4fc806e38873ef7307c68dff9..054bc1c0a7b972d224b02ea8dc4dda64de33e1ed 100644 (file)
@@ -1,4 +1,4 @@
-/* gears, Copyright (c) 2007 Jamie Zawinski <jwz@jwz.org>
+/* gears, Copyright (c) 2007-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -124,7 +124,9 @@ gears_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
@@ -690,16 +692,20 @@ planetary_gears (ModeInfo *mi)
   g4->y = 0;
   g4->th = -g3->th;
 
+  /* rotate central gear 1/2 tooth-size if odd number of teeth */
+  if (g4->nteeth & 1)
+    g4->th -= (180.0 / g4->nteeth);
+
   g0->inverted_p  = True;
   g0->x           = 0;
   g0->y           = 0;
-  g0->nteeth      = g4->nteeth * 3;
-  g0->r           = g4->r * 3.05;
+  g0->nteeth      = g1->nteeth * 3;
+  g0->r           = g1->r * 3.05;
   g0->inner_r     = g0->r * 0.8;
   g0->inner_r2    = 0;
   g0->inner_r3    = 0;
-  g0->th          = -(g4->th - (180 / g0->nteeth));
-  g0->ratio       = g4->ratio / 3;
+  g0->th          = g1->th + (180 / g0->nteeth);
+  g0->ratio       = g1->ratio / 3;
 
   g0->tooth_slope = 0;
   g0->nubs        = 3;
index 78c065ae2bf33f2f4c44f5d9af075387131295f5..e5e58ae99656b798b32fec4916899c66a6ae5561 100644 (file)
@@ -241,7 +241,9 @@ gflux_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (gp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 193da13f3e85fffe4d5a80c178661546e956ddab..7d358d127fdb09c908fb4200a4bc047c0eaba7b0 100644 (file)
@@ -1,5 +1,5 @@
 /* glblur --- radial blur using GL textures
- * Copyright (c) 2002-2004 Jamie Zawinski <jwz@jwz.org>
+ * Copyright (c) 2002-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -361,7 +361,9 @@ glblur_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index c93c532d907724a83f68fb4b02180ea7a43c2525..e3434bc28ec1c2d454b789cbd52a914a4a71eef3 100644 (file)
@@ -1069,7 +1069,9 @@ fire_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (fs->trackball, event->xbutton.button, 5,
                               !!event->xbutton.state);
index 8bc9a1c909422a2d4a7f84e7febc9bb78cc32675..df62a37151bf6e763fce15c006e20eb44bd2183f 100644 (file)
@@ -136,7 +136,6 @@ typedef struct {
        float diskHeight;
        float *diskPos;                         /* pre-computed disk positions on rods */
        Disk *disk;
-       float speed;
        GLint floorList;
        GLint baseList;
        GLint poleList;
index 789b03ae6c430558d85cdc0d0b9edddb7944d4e7..fd87d27604ef7f4b210bd2359517c94c090fc5ff 100644 (file)
@@ -9,8 +9,6 @@ glhanoi - OpenGL Towers of Hanoi
 [\-root]
 [\-delay \fInumber\fP]
 [\-count \fInumber\fP]
-[\-speed \fInumber\fP]
-[\-rotspeed \fInumber\fP]
 [\-wireframe]
 [\-light]
 [\-texture]
@@ -33,12 +31,6 @@ Draw on the root window.
 .B \-delay \fInumber\fP
 Per-frame delay, in microseconds.  Default: 30000 (0.03 seconds.).
 .TP 8
-.B \-speed \fInumber\fP
-Speed of disk animation. Default: 12.0 er, units per second. Let's call them metres.
-.TP 8
-.B \-rotspeed \fInumber\fP
-Speed of disk animation. Default: 0.1 rads per second.
-.TP 8
 .B \-count \fInumber\fP
 Number of disks.  Default: 7.
 .TP 8
index f12e4348dae948c7d0dabfbb49825eb8e7633f0f..c02e16cac44a12eba5fe1018768e4848fd87d47c 100644 (file)
@@ -1,4 +1,4 @@
-/* glknots, Copyright (c) 2003-2007 Jamie Zawinski <jwz@jwz.org>
+/* glknots, Copyright (c) 2003-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -244,7 +244,9 @@ knot_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 5,
                               !!event->xbutton.state);
index a8f154700bd35d57e82b502d36eb5b704c1cade7..c0e0a573e872afbba7885512c91d7f317d70d6c2 100644 (file)
@@ -447,7 +447,9 @@ planet_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (gp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 993a797614f3606e5a9c9ae9d0329ab0256bffc9..e3108980609f7573ac3f0ab657aed18d6adee44b 100644 (file)
@@ -1,4 +1,4 @@
-/* glslideshow, Copyright (c) 2003-2006 Jamie Zawinski <jwz@jwz.org>
+/* glslideshow, Copyright (c) 2003-2008 Jamie Zawinski <jwz@jwz.org>
  * Loads a sequence of images and smoothly pans around them; crossfades
  * when loading new images.
  *
@@ -535,7 +535,12 @@ randomize_sprite (ModeInfo *mi, sprite *sp)
    */
   if ((int) (0.5 + (sp->from.w * 1000 / sp->from.h)) !=
       (int) (0.5 + (sp->to.w   * 1000 / sp->to.h)))
-    abort();
+    {
+      fprintf (stderr, "%s: botched aspect: %f x %f vs  %f x %f: %s\n",
+               progname, sp->from.w, sp->from.h, sp->to.w, sp->to.h,
+               sp->img->title);
+      abort();
+    }
 
   sp->from.x /= vp_w;
   sp->from.y /= vp_h;
index a24eefa38f1eaa6798a64fb545147e19b08a5b48..f9e6f156488bef3026c74a9d5d74072019cc19c2 100644 (file)
@@ -1,4 +1,4 @@
-/* gltext, Copyright (c) 2001-2006 Jamie Zawinski <jwz@jwz.org>
+/* gltext, Copyright (c) 2001-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -301,7 +301,9 @@ text_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (tp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 51cb72e431e045b5d4736467f89156b2f02a74dd..e3c0cd42402fdb781b03a48a0be8e502d4c7f9c9 100644 (file)
@@ -1,4 +1,4 @@
-/* gltrackball, Copyright (c) 2002, 2005 Jamie Zawinski <jwz@jwz.org>
+/* gltrackball, Copyright (c) 2002-2008 Jamie Zawinski <jwz@jwz.org>
  * GL-flavored wrapper for trackball.c
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -86,25 +86,41 @@ gltrackball_rotate (trackball_state *ts)
 
 # define Button4 4  /* X11/Xlib.h */
 # define Button5 5
+# define Button6 6
+# define Button7 7
 
 /* Call this when a mouse-wheel click is detected.
    Clicks act like horizontal or vertical drags.
    Percent is the length of the drag as a percentage of the screen size.
-   Button is 'Button4' or 'Button5'.
+   Button is 'Button4' or 'Button5' (for the vertical wheel)
+   or 'Button5' or 'Button6' (for the horizontal wheel).
+   If `flip_p' is true, swap the horizontal and vertical axes.
  */
 void
 gltrackball_mousewheel (trackball_state *ts,
-                        int button, int percent, int horizontal_p)
+                        int button, int percent, int flip_p)
 {
   int up_p;
   double move;
+  int horizontal_p;
+
+#ifdef HAVE_COCOA
+  flip_p = 0;      /* MacOS has already handled this. */
+#endif
+
   switch (button) {
-    case Button4: up_p = 1; break;
-    case Button5: up_p = 0; break;
+  case Button4: up_p = 1; horizontal_p = 0; break;
+  case Button5: up_p = 0; horizontal_p = 0; break;
+  case Button6: up_p = 1; horizontal_p = 1; break;
+  case Button7: up_p = 0; horizontal_p = 1; break;
   default: abort(); break;
   }
 
-  if (horizontal_p) up_p = !up_p;
+  if (flip_p)
+    {
+      horizontal_p = !horizontal_p;
+      up_p = !up_p;
+    }
 
   move = (up_p
           ? 1.0 - (percent / 100.0)
index 966db04a688a8a8f469a2112b416119d76641351..a56888409100dfc69f4c448e0fe0e44bbe0273ac 100644 (file)
@@ -1,4 +1,4 @@
-/* gltrackball, Copyright (c) 2002, 2005 Jamie Zawinski <jwz@jwz.org>
+/* gltrackball, Copyright (c) 2002-2008 Jamie Zawinski <jwz@jwz.org>
  * GL-flavored wrapper for trackball.c
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -40,10 +40,12 @@ extern void gltrackball_rotate (trackball_state *);
 /* Call this when a mouse-wheel click is detected.
    Clicks act like horizontal or vertical drags.
    Percent is the length of the drag as a percentage of the screen size.
-   Button is 'Button4' or 'Button5'.
+   Button is 'Button4' or 'Button5' (for the vertical wheel)
+   or 'Button5' or 'Button6' (for the horizontal wheel).
+   If `flip_p' is true, swap the horizontal and vertical axes.
  */
 void gltrackball_mousewheel (trackball_state *ts,
-                             int button, int percent, int horizontal_p);
+                             int button, int percent, int flip_p);
 
 /* Return the quaternion encapsulated by the trackball state.
  */
index d38941e6a15dc83edd61fccea7fdaba0fdea65ac..37076724f2f6bc0b226d99c1384962a653ba9b4a 100644 (file)
@@ -1,4 +1,4 @@
-/* glxfonts, Copyright (c) 2001-2006 Jamie Zawinski <jwz@jwz.org>
+/* glxfonts, Copyright (c) 2001-2008 Jamie Zawinski <jwz@jwz.org>
  * Loads X11 fonts for use with OpenGL.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -190,7 +190,7 @@ print_gl_string (Display *dpy,
         glRasterPos2f (x, y);
         for (i = 0; i < strlen(string); i++)
           {
-            char c = string[i];
+            unsigned char c = (unsigned char) string[i];
             if (c == '\n')
               {
                 glRasterPos2f (x, (y -= line_height));
index 4fea33858b00f236d553597bc115f26fe7e8bb48..063e9e313dda407f1f4cddb30d56d68fb5887f22 100644 (file)
@@ -1,5 +1,5 @@
 /* grab-ximage.c --- grab the screen to an XImage for use with OpenGL.
- * xscreensaver, Copyright (c) 2001-2006 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 2001-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -319,6 +319,9 @@ pixmap_to_gl_ximage (Screen *screen, Window window, Pixmap pixmap)
     XGetGeometry (dpy, pixmap, &root, &x, &y, &width, &height, &bw, &depth);
   }
 
+  if (width < 5 || height < 5)  /* something's gone wrong somewhere... */
+    return 0;
+
   /* Convert the server-side Pixmap to a client-side GL-ordered XImage.
    */
 # ifdef HAVE_XSHM_EXTENSION
diff --git a/hacks/glx/hypnowheel.c b/hacks/glx/hypnowheel.c
new file mode 100644 (file)
index 0000000..c05f503
--- /dev/null
@@ -0,0 +1,298 @@
+/* hypnowheel, Copyright (c) 2008 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ *
+ * Draws overlapping spirals, where the tightness of the spirals changes.
+ * Nice settings:
+ *
+ * -layers 7 -wander
+ * -count 3 -layers 50
+ * -twistiness 0.2 -layers 20
+ * -count 3 -layers 2 -speed 20 -twist 10 -wander
+ */
+
+#define DEFAULTS       "*delay:        20000       \n" \
+                       "*count:        13          \n" \
+                       "*showFPS:      False       \n" \
+                       "*fpsSolid:     True        \n" \
+                       "*wireframe:    False       \n" \
+
+# define refresh_hypnowheel 0
+# define release_hypnowheel 0
+# define hypnowheel_handle_event 0
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+#include "xlockmore.h"
+#include "colors.h"
+#include "rotator.h"
+#include <ctype.h>
+
+#ifdef USE_GL /* whole file */
+
+
+#define DEF_WANDER      "False"
+#define DEF_SYMMETRIC   "False"
+#define DEF_SPEED       "1.0"
+#define DEF_TWISTINESS  "4.0"
+#define DEF_LAYERS      "4"
+
+typedef struct {
+  int color;
+  GLfloat twist;
+  GLfloat alpha;
+  rotator *rot;
+} disc;
+
+typedef struct {
+  GLXContext *glx_context;
+  rotator *rot;
+  disc *discs;
+  int ncolors;
+  XColor *colors;
+
+} hypnowheel_configuration;
+
+static hypnowheel_configuration *bps = NULL;
+
+static GLfloat speed;
+static GLfloat twistiness;
+static GLfloat nlayers;
+static Bool do_wander;
+static Bool do_symmetric;
+
+static XrmOptionDescRec opts[] = {
+  { "-speed",      ".speed",      XrmoptionSepArg, 0 },
+  { "-twistiness", ".twistiness", XrmoptionSepArg, 0 },
+  { "-layers",     ".layers",     XrmoptionSepArg, 0 },
+  { "-wander",     ".wander",     XrmoptionNoArg, "True" },
+  { "+wander",     ".wander",     XrmoptionNoArg, "False" },
+  { "-symmetric",  ".symmetric",  XrmoptionNoArg, "True" },
+  { "+symmetric",  ".symmetric",  XrmoptionNoArg, "False" },
+};
+
+static argtype vars[] = {
+  {&do_wander,   "wander",     "Wander",     DEF_WANDER,     t_Bool},
+  {&do_symmetric, "symmetric",  "Symmetric",  DEF_SYMMETRIC,  t_Bool},
+  {&speed,       "speed",      "Speed",      DEF_SPEED,      t_Float},
+  {&twistiness,          "twistiness", "Twistiness", DEF_TWISTINESS, t_Float},
+  {&nlayers,     "layers",     "Layers",     DEF_LAYERS,     t_Float},
+};
+
+ENTRYPOINT ModeSpecOpt hypnowheel_opts = {
+  countof(opts), opts, countof(vars), vars, NULL};
+
+
+static void
+draw_spiral (ModeInfo *mi, disc *d)
+{
+  int wire = MI_IS_WIREFRAME(mi);
+  hypnowheel_configuration *bp = &bps[MI_SCREEN(mi)];
+  GLfloat rr = 0.5;
+  int n = MI_COUNT(mi);
+  int steps = n * (wire ? 3 : (n < 5 ? 60 : n < 10 ? 20 : 10));
+  GLfloat dth = M_PI*2 / n;
+  GLfloat dr = rr / steps;
+  GLfloat th;
+  GLfloat twist = d->twist;
+  GLfloat dtwist = M_PI * 2 * twist / steps;
+  double cscale = 65536.0;
+
+  if (nlayers > 3 && !wire)
+    cscale *= (nlayers-2);   /* don't wash out to white */
+
+  glColor4f (bp->colors[d->color].red   / cscale,
+             bp->colors[d->color].green / cscale, 
+             bp->colors[d->color].blue  / cscale,
+             d->alpha);
+  for (th = 0; th < M_PI*2; th += dth)
+    {
+      GLfloat th1 = th;
+      GLfloat r;
+      glBegin (wire ? GL_LINE_STRIP : GL_QUAD_STRIP);
+      for (r = 0; r <= rr; r += dr)
+        {
+          GLfloat th2 = th1 + dth/2 + dtwist;
+          th1 += dtwist;
+          glVertex3f (r * cos(th1), r * sin(th1), 0);
+          if (! wire)
+            glVertex3f (r * cos(th2), r * sin(th2), 0);
+          mi->polygon_count++;
+        }
+      glEnd();
+    }
+}
+
+
+
+/* Window management, etc
+ */
+ENTRYPOINT void
+reshape_hypnowheel (ModeInfo *mi, int width, int height)
+{
+  GLfloat h = (GLfloat) height / (GLfloat) width;
+
+  glViewport (0, 0, (GLint) width, (GLint) height);
+
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+  gluPerspective (30.0, 1/h, 1.0, 100.0);
+
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+  gluLookAt( 0.0, 0.0, 30.0,
+             0.0, 0.0, 0.0,
+             0.0, 1.0, 0.0);
+
+  glClear(GL_COLOR_BUFFER_BIT);
+}
+
+
+ENTRYPOINT void 
+init_hypnowheel (ModeInfo *mi)
+{
+  hypnowheel_configuration *bp;
+  int wire = MI_IS_WIREFRAME(mi);
+  int i;
+
+  if (!bps) {
+    bps = (hypnowheel_configuration *)
+      calloc (MI_NUM_SCREENS(mi), sizeof (hypnowheel_configuration));
+    if (!bps) {
+      fprintf(stderr, "%s: out of memory\n", progname);
+      exit(1);
+    }
+  }
+
+  bp = &bps[MI_SCREEN(mi)];
+
+  bp->glx_context = init_GL(mi);
+
+  reshape_hypnowheel (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+
+  bp->rot = make_rotator (0, 0, 0, 0, speed * 0.0025, False);
+
+  bp->ncolors = 1024;
+  bp->colors = (XColor *) calloc(bp->ncolors, sizeof(XColor));
+  make_smooth_colormap (0, 0, 0,
+                        bp->colors, &bp->ncolors,
+                        False, 0, False);
+
+  if (MI_COUNT(mi) < 2) MI_COUNT(mi) = 2;
+  if (nlayers < 1) nlayers = 1;
+  bp->discs = (disc *) calloc (nlayers, sizeof (disc));
+
+  for (i = 0; i < nlayers; i++)
+    {
+      double spin_speed   = speed * 0.2;
+      double wander_speed = speed * 0.0012;
+      double spin_accel   = 0.2;
+
+      bp->discs[i].twist = 0;
+      bp->discs[i].alpha = 1;
+      bp->discs[i].color = i * bp->ncolors / nlayers;
+
+      spin_speed   += frand (spin_speed   / 5);
+      wander_speed += frand (wander_speed * 3);
+
+      bp->discs[i].rot = make_rotator (spin_speed, spin_speed, spin_speed,
+                                       spin_accel,
+                                       (do_wander ? wander_speed : 0),
+                                       True);
+    }
+
+  glDisable (GL_LIGHTING);
+  glDisable (GL_DEPTH_TEST);
+  glDepthMask (GL_FALSE);
+  glDisable (GL_CULL_FACE);
+
+  if (! wire)
+    {
+      glEnable (GL_BLEND);
+      glBlendFunc (GL_ONE, GL_ONE);
+    }
+}
+
+
+ENTRYPOINT void
+draw_hypnowheel (ModeInfo *mi)
+{
+  hypnowheel_configuration *bp = &bps[MI_SCREEN(mi)];
+  Display *dpy = MI_DISPLAY(mi);
+  Window window = MI_WINDOW(mi);
+  int i;
+
+  if (!bp->glx_context)
+    return;
+
+  glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context));
+
+  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+  glPushMatrix ();
+
+  {
+    double x, y, z;
+    get_position (bp->rot, &x, &y, &z, True);
+    glTranslatef((x - 0.5) * 8,
+                 (y - 0.5) * 8,
+                 0);
+
+    get_rotation (bp->rot, &x, &y, &z, True);
+    glRotatef (x * 360, 1.0, 0.0, 0.0);
+    glRotatef (y * 360, 0.0, 1.0, 0.0);
+    glRotatef (z * 360, 0.0, 0.0, 1.0);
+  }
+
+  mi->polygon_count = 0;
+
+  glScalef (45, 45, 45);
+
+  for (i = 0; i < nlayers; i++)
+    {
+      disc *d = &bp->discs[i];
+      double x, y, z;
+      rotator *rot = (do_symmetric ? bp->discs[(i & ~0x1)].rot : d->rot);
+      Bool tick = (!do_symmetric || i == 0);
+
+      glPushMatrix();
+
+      d->color++;
+      if (d->color >= bp->ncolors)
+        d->color = 0;
+
+      get_position (rot, &x, &y, &z, tick);
+      x -= 0.5;
+      y -= 0.5;
+      x *= 0.1;
+      y *= 0.1;
+
+      glTranslatef (x, y, 0);
+      d->twist = (z * twistiness *
+                  ((i & 1) ? 1 : -1));
+
+      get_rotation (rot, &x, &y, &z, tick);
+
+      glRotatef (360 * z, 0, 0, 1);  /* rotation of this disc */
+
+      draw_spiral (mi, &bp->discs[i]);
+      glPopMatrix();
+    }
+
+  glPopMatrix ();
+
+  if (mi->fps_p) do_fps (mi);
+  glFinish();
+
+  glXSwapBuffers(dpy, window);
+}
+
+XSCREENSAVER_MODULE ("Hypnowheel", hypnowheel)
+
+#endif /* USE_GL */
diff --git a/hacks/glx/hypnowheel.man b/hacks/glx/hypnowheel.man
new file mode 100644 (file)
index 0000000..a8fb6e9
--- /dev/null
@@ -0,0 +1,80 @@
+.TH XScreenSaver 1 "" "X Version 11"
+.SH NAME
+hypnowheel - draws overlapping, translucent spiral patterns
+.SH SYNOPSIS
+.B hypnowheel
+[\-display \fIhost:display.screen\fP]
+[\-visual \fIvisual\fP]
+[\-window]
+[\-root]
+[\-delay \fIint\fP]
+[\-layers \fIint\fP]
+[\-count \fIint\fP]
+[\-twistiness \fIfloat\fP]
+[\-speed \fIfloat\fP]
+[\-wander\fP]
+[\-symmetric\fP]
+[\-fps]
+.SH DESCRIPTION
+Draws a series of overlapping, translucent spiral patterns.
+The tightness of their spirals fluctuates in and out.
+.SH OPTIONS
+.TP 8
+.B \-visual \fIvisual\fP
+Specify which visual to use.  Legal values are the name of a visual class,
+or the id number (decimal or hex) of a specific visual.
+.TP 8
+.B \-window
+Draw on a newly-created window.  This is the default.
+.TP 8
+.B \-root
+Draw on the root window.
+.TP 8
+.B \-delay \fIint\fP
+Delay between frames, in microseconds.  Default 20000.
+.TP 8
+.B \-layers \fIint\fP
+How many different spirals to draw at once.  Default 4.
+.TP 8
+.B \-count \fIint\fP
+How many arms each spiral should have.  Default 11.
+.TP 8
+.B \-twistiness \fIfloat\fP
+How tightly wound the spirals can become, measured in rotations.
+Default 4.0 (four times around).
+.TP 8
+.B \-speed \fIratio\fP
+Less than 1 for slower, greater than 1 for faster.  Default 1.
+.TP 8
+.B \-wander
+If specified, then the centers of the spirals will wander around,
+rather than them all having the same origin.
+.TP 8
+.B \-symmetric
+If specified, then each pair of left-wrapping and right-wrapping
+spirals will be mirror images of each other.
+.TP 8
+.B \-fps | \-no-fps
+Whether to show a frames-per-second display at the bottom of the screen.
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+to get the default host and display number.
+.TP 8
+.B XENVIRONMENT
+to get the name of a resource file that overrides the global resources
+stored in the RESOURCE_MANAGER property.
+.SH SEE ALSO
+.BR X (1),
+.BR xscreensaver (1)
+.SH COPYRIGHT
+Copyright \(co 2008 by Jamie Zawinski.  Permission to use, copy, modify, 
+distribute, and sell this software and its documentation for any purpose is 
+hereby granted without fee, provided that the above copyright notice appear 
+in all copies and that both that copyright notice and this permission notice
+appear in supporting documentation.  No representations are made about the 
+suitability of this software for any purpose.  It is provided "as is" without
+express or implied warranty.
+.SH AUTHOR
+Jamie Zawinski.
index 8191342d70922ce6e0ea0caa002088a88c482270..9ed889f8f8c642f8b9cd3380b54d547315bfcaab 100644 (file)
@@ -927,7 +927,9 @@ ENTRYPOINT Bool jigglypuff_handle_event(ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (js->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 3a3705179a59dcab59a98a86143038125a774a90..8e4c98d43b854075ffa5dfd39a9c5da4de9b02cc 100644 (file)
@@ -1,4 +1,4 @@
-/* Juggler3D, Copyright (c) 2005 Brian Apps <brian@jugglesaver.co.uk>
+/* Juggler3D, Copyright (c) 2005-2008 Brian Apps <brian@jugglesaver.co.uk>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -2101,7 +2101,9 @@ ENTRYPOINT Bool juggler3d_handle_event(ModeInfo* mi, XEvent* pEvent)
     }
     else if (pEvent->xany.type == ButtonPress &&
              (pEvent->xbutton.button == Button4 ||
-              pEvent->xbutton.button == Button5))
+              pEvent->xbutton.button == Button5 ||
+              pEvent->xbutton.button == Button6 ||
+              pEvent->xbutton.button == Button7))
     {
       gltrackball_mousewheel (pState->trackball, pEvent->xbutton.button, 2,
                               !pEvent->xbutton.state);
index faefcb25debcf46b8770493b448ebc3a80d614be..e37767e89c0205eafbf28a5604ba80455e99f86e 100644 (file)
@@ -296,7 +296,9 @@ klein_handle_event (ModeInfo *mi, XEvent *event)
                        return True;
        } else if (event->xany.type == ButtonPress &&
                (event->xbutton.button == Button4 ||
-                event->xbutton.button == Button5)) {
+                event->xbutton.button == Button5 ||
+                event->xbutton.button == Button6 ||
+                event->xbutton.button == Button7)) {
       gltrackball_mousewheel (kp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
       return True;
index 7c6f4b8a211ae6fa380b63d158107e1199627811..4c80da596e0e83d02be624c0632730f8f0a9a97c 100644 (file)
@@ -1334,7 +1334,9 @@ lament_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (lc->trackball, event->xbutton.button, 5,
                               !!event->xbutton.state);
index ce614a6aa8a0d391e7978166c2e9151a6b3b3acd..1efe40cf408dc96ba1662135bb90d5ebb104c062 100644 (file)
@@ -1260,7 +1260,9 @@ lavalite_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 5,
                               !!event->xbutton.state);
index 9e2f2b65a5f3da7b80cc00a46c75096d707dcfbf..62d6ef3bdfb41430e985f1a3a98785453e6144f2 100644 (file)
  */
 struct lockward_context;                       /*  Forward declaration.  */
 
+#define int8_t   char
+#define int16_t  short
+#define int32_t  int
+#define uint8_t  unsigned char
+#define uint16_t unsigned short
+#define uint32_t unsigned int
+
 typedef struct bladestate {
        uint8_t         outer, inner;   /*  Radii  */
 } bladestate;
index 03384a45e4611c91fbaa56601969419131b25c15..50b8d022548ca46715977954d17a20510646fba0 100644 (file)
@@ -363,7 +363,9 @@ sponge_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (sp->trackball, event->xbutton.button, 5,
                               !!event->xbutton.state);
index f99d9651aebf20320aa17b02f9cd328e8ca78fd9..5ad9ccd5f34f1ee02994670fd09e04749954aced 100644 (file)
@@ -626,7 +626,9 @@ moebius_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (mp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 67781826ea538ea3ae5f1a3b59608a26d52e625a..a17c67ca38ac9eef1e3e732cd772a08930771b5c 100644 (file)
@@ -1,4 +1,4 @@
-/* moebiusgears, Copyright (c) 2007 Jamie Zawinski <jwz@jwz.org>
+/* moebiusgears, Copyright (c) 2007-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -130,7 +130,9 @@ mgears_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 3658ada5218aba371afd9a7c9a7ad8933ead926c..5178da62e0940a121ccf1db48fc03f249a039fdf 100644 (file)
@@ -1209,7 +1209,9 @@ molecule_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (mc->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index e273082058dfc9503fd305d1d6852a3060162c97..2132b7e8f5b91156d16365b2e18dac15cb0e77b1 100644 (file)
@@ -399,7 +399,9 @@ draw_noof (ModeInfo *mi)
   if (mi->fps_p) do_fps (mi);
   glFinish();
 
-  glXSwapBuffers(MI_DISPLAY(mi), MI_WINDOW(mi));
+/* For some reason this hack screws up on Cocoa if we try to double-buffer it.
+   It looks fine single-buffered, so let's just do that. */
+/*  glXSwapBuffers(MI_DISPLAY(mi), MI_WINDOW(mi)); */
 }
 
 
@@ -442,13 +444,13 @@ init_noof (ModeInfo *mi)
       fprintf(stderr, "%s: out of memory\n", progname);
       exit(1);
     }
-    bp = &bps[MI_SCREEN(mi)];
   }
 
   bp = &bps[MI_SCREEN(mi)];
 
   bp->glx_context = init_GL(mi);
 
+  glDrawBuffer(GL_FRONT);
   glClearColor(0.0, 0.0, 0.0, 1.0);
   glEnable(GL_LINE_SMOOTH);
   glShadeModel(GL_FLAT);
index b18eb73cc5c1658fce1b1a24b9e70d4a1af0abd8..aefbe711464f687078b07d793a2bdc465706ae74 100644 (file)
@@ -1,4 +1,4 @@
-/* pinion, Copyright (c) 2004-2006 Jamie Zawinski <jwz@jwz.org>
+/* pinion, Copyright (c) 2004-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -1295,7 +1295,9 @@ pinion_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (pp->trackball, event->xbutton.button, 5,
                               !!event->xbutton.state);
index 5efec83a7569ba9f704fdc83321592da9ad1a64c..44badca99ba0314e4227c4f89b8aa32a3d61be63 100644 (file)
@@ -1,4 +1,4 @@
-/* polyhedra, Copyright (c) 2004-2006 Jamie Zawinski <jwz@jwz.org>
+/* polyhedra, Copyright (c) 2004-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -224,7 +224,9 @@ polyhedra_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 7b55ac273a17a70e1c0eab4e06e04fcf7859df25..3c671aff04b5edf087d523e97e8a471aba9082df 100644 (file)
@@ -114,7 +114,9 @@ queens_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (qs->trackball, event->xbutton.button, 5,
                               !event->xbutton.state);
index fb2c07e0643c72f292049cd6d500556016a0d0c2..420a6a6173a2a68a27fc8a87c193c6dfe77b432b 100644 (file)
@@ -798,7 +798,9 @@ sballs_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (sb->trackball, event->xbutton.button, 5,
                               !!event->xbutton.state);
index ec1d4a88f45021d89c24fb3fee086e5709a021ee..41a8fd2ea92f02bbfe0a4cbad5de6dd27050f6be 100644 (file)
@@ -463,7 +463,9 @@ gasket_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (gp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 6df1afd86d1665729cfdfbed487d5acdf2eb8bbb..29177c290a0f197f969d50a4ca5e15d2ebd3da81 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2002-2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2002-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -787,7 +787,9 @@ spheremonics_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (cc->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index 2aa5e129a5883cadaf3e8ebab0b5ae63065e6004..dc578622d60f44a7008103397c53ce90e50249fd 100644 (file)
@@ -149,7 +149,9 @@ stonerview_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (bp->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index e670341e17f33431bf1c103183280a45a1c0255d..f7afb44b5863a346984f611accc619e466c7bcf6 100644 (file)
@@ -388,7 +388,9 @@ tunnel_handle_event (ModeInfo *mi, XEvent *event)
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (tc->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
index f2161e439df63e4a3165b0ba63472503e9344aaa..2db5638d5fd76c49b3d7ab5fd15f89938464fd8f 100644 (file)
@@ -1,4 +1,5 @@
-/* topblock, Copyright (c) 2006 rednuht <topblock.xscreensaver@jumpstation.co.uk>
+/* topblock, Copyright (c) 2006-2008
+ *  rednuht <topblock.xscreensaver@jumpstation.co.uk>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -847,7 +848,9 @@ topBlock_handle_event (ModeInfo *mi, XEvent *event) {
     }
   else if (event->xany.type == ButtonPress &&
            (event->xbutton.button == Button4 ||
-            event->xbutton.button == Button5))
+            event->xbutton.button == Button5 ||
+            event->xbutton.button == Button6 ||
+            event->xbutton.button == Button7))
     {
       gltrackball_mousewheel (tb->trackball, event->xbutton.button, 10,
                               !!event->xbutton.state);
diff --git a/hacks/images/m6502/breakout.asm b/hacks/images/m6502/breakout.asm
new file mode 100644 (file)
index 0000000..a0fa694
--- /dev/null
@@ -0,0 +1,195 @@
+; Brick Out by Blake Ramsdell <blaker@gmail.com> http://www.blakeramsdell.com
+
+; A poor attempt at brick out with no player involved. Maybe someday I'll
+; let you play it, or you can view this as an exercise for the reader to put
+; in a paddle that is user-controlled.
+
+; I guess this is Copyright (C) 2007 Blake Ramsdell, and you have a license to
+; do whatever you want with it, just tell me what you did and give me a
+; mention. If you want to sell it, and you make a billion dollars, then good
+; for you. You might at least throw a party and invite me.
+
+; The gist of it is pretty simple -- you have a ball, and the ball has an X
+; and a Y velocity. When it hits something, it bounces off of it. If the thing
+; that it hits is not a wall, then it erases it. Pretty dead-simple behavior.
+
+; I don't like the vertical movement -- there's a shortcut in here somewhere
+; to make it less computationally expensive I think. Right now it just does a
+; two byte add and subtract of $20.
+
+; The ball motion is also a bit weird looking. I don't know if this is an
+; artifact of the simulation environment combined with a normal tearing
+; artifact related to refresh or what.
+
+; Blake Ramsdell, May 2007
+
+init:
+ lda #$fe
+ sta $2         ; X velocity (0 = fast, ff = slow)
+                ; (low bit is direction, 0 = down or right, 1 = up or left)
+ lda #$ee
+ sta $3         ; Y velocity
+
+drawbox:
+ lda #0         ; Use $0-$1 as a screen address for drawing the field
+ sta $0
+ lda #2
+ sta $1
+
+ ldx #$20       ; Loop $20 times
+boxloop:
+ lda #2         ; Line color (red)
+ sta $1ff,x     ; Top line
+ sta $5df,x     ; Bottom line
+ ldy #0
+ sta ($0),y     ; Left line
+ ldy #$1f
+ sta ($0),y     ; Right line
+
+ cpx #$1        ; If we're just before the bottom line...
+ beq noblocks   ; Don't draw any blocks there
+
+
+ lda #3         ; First block for this row, Cyan in color
+ ldy #$17       ; It's at X position $17
+ sta ($0),y     ; Draw it
+
+ lda #4         ; Second block for this row, Purple in color
+ iny            ; It's at the next X position
+ sta ($0),y     ; Draw it
+
+ lda #5         ; Third block for this row, Green in color
+ iny            ; It's at the next X position
+ sta ($0),y     ; Draw it
+
+ lda #6         ; Fourth block for this row, Blue in color
+ iny            ; It's at the next X position
+ sta ($0),y     ; Draw it
+
+
+noblocks:
+ clc            ; Get ready to increment the row, clear the carry for add
+ lda $0         ; Get the low byte
+ adc #$20       ; Add $20 to it for the next row
+ sta $0         ; Put it back
+ lda $1         ; Get the high byte
+ adc #0         ; Factor in the carry
+ sta $1         ; Put it back
+
+ dex            ; Decrement the loop counter
+ bne boxloop    ; Do it again unless it's zero
+
+ ldx $2         ; Load the X velocity
+ ldy $3         ; Load the Y velocity
+
+ lda #$44       ; Pick a start point
+ sta $0         ; Ball position low
+ lda #$02
+ sta $1         ; Ball position high
+
+drawball:
+ txa            ; Preserve X
+ pha
+ lda #1         ; Ball color (white)
+ ldx #0         ; Clear X for indirect addressing for writing to screen
+ sta ($0,x)     ; Draw the ball
+ pla            ; Restore X
+ tax
+
+decloop:
+ dex            ; Decrement the X velocity
+ beq updatexpos ; If it's zero, time to adjust X
+ dey            ; Decrement the Y velocity
+ bne decloop    ; If it's not zero, loop, otherwise fall through to adjust Y
+
+updateypos:
+ txa            ; Preserve X
+ pha
+ jsr clearball  ; Put background over the current ball position
+updateyposnoclear:
+ lda $3         ; Get the Y velocity
+ and #1         ; See if it's down
+ bne moveup     ; If not, then it's up, otherwise fall through to down
+
+movedown:
+ clc            ; Prepare for moving to the next Y line and doing the add
+ lda $0         ; Low byte of the current ball position
+ adc #$20       ; Next row
+ sta $0         ; Put it back
+ bcc ycollision ; If no carry, go on to check for collision
+ inc $1         ; Had a carry, fix the high byte of the address
+ bne ycollision ; Z flag is always clear ($1 will never be zero)
+
+moveup:
+ sec            ; Prepare for moving to the previous Y line and subtracting
+ lda $0         ; Low byte of the current ball position
+ sbc #$20       ; Previous row
+ sta $0         ; Put it back
+ lda $1         ; High byte
+ sbc #$0        ; Factor out the carry
+ sta $1         ; Put it back
+
+ycollision:
+ ldx #0         ; Prepare for indirect read
+ lda ($0,x)     ; Get the current pixel at the new ball position
+ bne ycollided  ; If it's not zero (the background color) then we hit
+ ldy $3         ; Otherwise, load up the current Y velocity
+ pla            ; Restore the X velocity
+ tax
+ jmp drawball   ; Back to the top
+
+ycollided:
+ cmp #$2        ; Border color?
+ beq ycollided2 ; If so, then we just bounce, don't eat a brick
+
+                ; Erase brick
+ lda #0         ; Background color (black)
+ sta ($0,x)     ; Erase it
+
+ycollided2:
+ lda #1         ; Get ready to change direction
+ eor $3         ; Flip the low bit on the Y velocity (change direction)
+ sta $3         ; Put it back
+ jmp updateyposnoclear  ; Go back to make sure we didn't hit anything else
+
+updatexpos:
+ jsr clearball  ; Put background over the current ball position
+updatexposnoclear:
+ lda $2         ; Get the current X velocity
+ and #1         ; See if it's right by testing the low bit
+ bne moveleft   ; If not, move left
+
+moveright:
+ inc $0         ; Move right
+ bne xcollision ; Z flag is always clear
+
+moveleft:
+ dec $0         ; Move left
+
+xcollision:
+ ldx #0         ; Prepare for indirect read
+ lda ($0,x)     ; Get the current pixel at the new ball position
+ bne xcollided  ; If it's not zero (the background color) then we hit
+ ldx $2         ; Otherwise, load up the current X velocity
+ jmp drawball   ; Back to the top
+
+xcollided:
+ cmp #$2        ; Border color?
+ beq xcollided2 ; If so, then we just bounce, don't eat a brick
+
+                ; Erase brick
+ lda #0         ; Background color (black)
+ sta ($0,x)     ; Erase it
+
+xcollided2:
+ lda #1         ; Get ready to change direction
+ eor $2         ; Flip the low bit on the X velocity (change direction)
+ sta $2         ; Put it back
+ jmp updatexposnoclear  ; Go back to make sure we didn't hit anything else
+
+clearball:
+ lda #0         ; Background color (black)
+ tax            ; Clear X for indirect
+ sta ($0,x)     ; Black out the ball
+ rts            ; Return to caller
+
diff --git a/hacks/images/m6502/byterun.asm b/hacks/images/m6502/byterun.asm
new file mode 100644 (file)
index 0000000..848b5c9
--- /dev/null
@@ -0,0 +1,100 @@
+; testing byterun compression
+start:
+  lda #<logo
+  sta $0
+  lda #>logo
+  sta $1
+  lda #$00
+  sta $2
+  lda #$02
+  sta $3
+
+decrunchLoop:
+  lda $3
+  cmp #$6
+  bne moreWork 
+  rts
+moreWork:
+  ldy #0
+  lda ($0),y
+  cmp #$ff
+  bne notCrunched
+  iny
+  lda ($0),y ; repeat #
+  sta $4
+  iny
+  lda ($0),y ; color
+  ldy $4
+drawLoop:
+  ldx #0
+  sta ($2,x)
+  jsr nextPixel
+  dey
+  bne drawLoop
+  jsr getNextByte
+  jsr getNextByte
+  jmp decrunchLoop
+notCrunched:
+  ldx #0
+  sta ($2,x)
+  jsr nextPixel
+  jsr getNextByte
+  jmp decrunchLoop
+
+getNextByte:
+  inc $0
+  lda $0
+  cmp #$00
+  bne notHi
+  inc $1
+notHi:
+  rts
+
+nextPixel:
+  inc $2
+  ldx $2
+  cpx #$00
+  bne notNextLine
+  inc $3
+notNextLine:
+  rts
+
+
+logo:
+ dcb $ff,43,1,$f,$f,$f,$c,$f,$f,$f,$ff,24,1,$c,$f,$c,0
+ dcb $c,$f,$c,$ff,24,1,0,$f,$c,0,$c,$f,$c,$ff,24,1
+ dcb $c,$f,$c,0,$c,$f,$c,$ff,24,1,0,$f,$c,0,$c,$f,$c
+ dcb $ff,24,1,$c,$f,0,0,$c,$f,$c,$ff,24,1,0,$f,$c,0
+ dcb $c,$f,$c,$ff,24,1,0,$f,$c,0,$c,$f,0,$ff,24,1
+ dcb 0,$f,$c,0,$c,$f,0,$ff,23,1,$f,0,$f,$c,0,$c,$f,0,$f
+ dcb $ff,22,1,$c,0,1,$c,0,$c,$f,0,$c,$ff,21,1
+ dcb $f,0,0,1,0,0,$c,1,0,0,$ff,21,1,$c,0,$c,1,$c,0
+ dcb $c,1,$c,0,$c,$ff,19,1,$f,0,0,$f,1,$c,0
+ dcb $c,1,$f,0,0,$f,$ff,17,1,$f,0,0,0,1,1,$c,0
+ dcb $c,1,1,0,0,0,$ff,16,1,$f,0,0,0,$f,1,1,0,0
+ dcb $c,1,1,$f,0,0,0,$f,$ff,13,1
+ dcb $c,0,0,0,$c,1,1,1,$c,0,$c,1,1,1,$c,0,0,0,$c
+ dcb $ff,10,1,$c,0,0,0,0,$c,1,1,1,1,0,0
+ dcb $c,1,1,1,1,0,0,0,0,0,$c,$ff,8,1
+ dcb 0,0,0,0,$c,1,1,1,1,1,0,0
+ dcb $c,1,1,1,1,1,$c,0,0,0,0,1,1,1,1,1
+ dcb 1,1,1,1,0,0,$c,1,1,1,1,1,1,1,$c,0
+ dcb $c,1,1,1,1,1,1,$f,$c,0,0,$ff,18,1,$f
+ dcb $ff,53,1,0,$f,1,0,0,0,0,0,$f,1,$c
+ dcb $c,1,1,1,$c,0,0,0,1,1,0,$f,$f,1,1,1
+ dcb 1,1,1,1,$c,0,0,1,1,1,0,$f,1,1,$f,0
+ dcb 0,$f,1,1,0,$f,1,$c,$c,1,0,$f,1,1,1,1
+ dcb 1,1,1,1,0,$f,0,$f,1,1,0,$f,1,1,$f,$c
+ dcb $c,$c,1,1,0,1,1,$f,0,1,0,$f,1,1,1,1
+ dcb 1,1,1,1,0,1,$c,$f,1,1,$c,$f,1,1,0,$f
+ dcb $f,0,1,1,0,$f,$f,0,$f,1,0,$f,1,1,1,1
+ dcb 1,1,1,$c,0,$c,0,0,1,1,0,$f,1,1,0,$c
+ dcb $c,0,$f,1,0,$f,0,$f,1,1,0,$f,1,1,1,1
+ dcb 1,1,1,0,$c,$f,$f,0,$f,1,$c,$f,1,$c,$c,$f
+ dcb $f,$c,$c,1,0,1,$f,$c,1,1,0,$f,1,1,1,1
+ dcb 1,1,$f,0,1,1,1,$c,$c,1,0,$f,1,0,$f,1
+ dcb 1,$f,0,1,0,$f,1,0,$f,1,0,$f,$ff,16,1
+ dcb $f,$ff,5,1,$f,1,1,1,$f,$ff,38,1
+
+
diff --git a/hacks/images/m6502/cellular-30.asm b/hacks/images/m6502/cellular-30.asm
new file mode 100644 (file)
index 0000000..2439561
--- /dev/null
@@ -0,0 +1,67 @@
+; Rule 30 cellular automata
+; by D.S.
+
+ lda #1
+ sta $20f
+
+l3:
+ lda #2
+ sta 3
+ sta 5
+ sta 7
+ lda #1
+ sta 9
+ sta 6
+ lda #255
+ sta 8
+ lda #0
+ sta 2
+ lda #32
+ sta 4
+ ldx #30
+l1:
+ ldy #31
+
+l2:
+ lda ($2),y
+ ora ($6),y
+ eor ($8),y
+ sta ($4),y
+ dey
+ bpl l2
+
+ lda $2
+ adc #32
+ sta $2
+ lda $3
+ adc #0
+ sta $3
+ lda $4
+ adc #32
+ sta $4
+ lda $5
+ adc #0
+ sta $5
+ lda $6
+ adc #32
+ sta $6
+ lda $7
+ adc #0
+ sta $7
+ lda $8
+ adc #32
+ sta $8
+ lda $9
+ adc #0
+ sta $9
+ dex
+ bpl l1
+
+ ldy #31
+l4:
+ lda ($2),y
+ sta $200,y
+ dey
+ bpl l4
+
+ jmp l3
diff --git a/hacks/images/m6502/cellular-600.asm b/hacks/images/m6502/cellular-600.asm
new file mode 100644 (file)
index 0000000..db5497c
--- /dev/null
@@ -0,0 +1,209 @@
+; Code 600 cellular automata - by D.S.
+ lda #1
+ sta $22f
+
+l3:
+ ldy #29
+
+l2:
+ lda  $220,y
+ adc $221,y
+ adc $222,y
+ tax
+ lda rule,x
+ sta  $201,y
+ dey
+ bpl l2
+
+ ldy #$c0
+ sec
+ll2:
+ lda $503,y
+ sta $523,y
+ sta $53b,y
+ lda $504,y
+ sta $524,y
+ sta $53a,y
+ lda $505,y
+ sta $525,y
+ sta $539,y
+ lda $506,y
+ sta $526,y
+ sta $538,y
+ lda $507,y
+ sta $527,y
+ sta $537,y
+ lda $508,y
+ sta $528,y
+ sta $536,y
+ lda $509,y
+ sta $529,y
+ sta $535,y
+ lda $50a,y
+ sta $52a,y
+ sta $534,y
+ lda $50b,y
+ sta $52b,y
+ sta $533,y
+ lda $50c,y
+ sta $52c,y
+ sta $532,y
+ lda $50d,y
+ sta $52d,y
+ sta $531,y
+ lda $50e,y
+ sta $52e,y
+ sta $530,y
+ lda $50f,y
+ sta $52f,y
+ tya
+ adc #$df
+ tay
+ bcs ll2
+
+ ldy #$e0
+ sec
+ll3:
+ lda $403,y
+ sta $423,y
+ sta $43b,y
+ lda $404,y
+ sta $424,y
+ sta $43a,y
+ lda $405,y
+ sta $425,y
+ sta $439,y
+ lda $406,y
+ sta $426,y
+ sta $438,y
+ lda $407,y
+ sta $427,y
+ sta $437,y
+ lda $408,y
+ sta $428,y
+ sta $436,y
+ lda $409,y
+ sta $429,y
+ sta $435,y
+ lda $40a,y
+ sta $42a,y
+ sta $434,y
+ lda $40b,y
+ sta $42b,y
+ sta $433,y
+ lda $40c,y
+ sta $42c,y
+ sta $432,y
+ lda $40d,y
+ sta $42d,y
+ sta $431,y
+ lda $40e,y
+ sta $42e,y
+ sta $430,y
+ lda $40f,y
+ sta $42f,y
+ tya
+ adc #$df
+ tay
+ bcs ll3
+
+ ldy #$e0
+ sec
+ll4:
+ lda $303,y
+ sta $323,y
+ sta $33b,y
+ lda $304,y
+ sta $324,y
+ sta $33a,y
+ lda $305,y
+ sta $325,y
+ sta $339,y
+ lda $306,y
+ sta $326,y
+ sta $338,y
+ lda $307,y
+ sta $327,y
+ sta $337,y
+ lda $308,y
+ sta $328,y
+ sta $336,y
+ lda $309,y
+ sta $329,y
+ sta $335,y
+ lda $30a,y
+ sta $32a,y
+ sta $334,y
+ lda $30b,y
+ sta $32b,y
+ sta $333,y
+ lda $30c,y
+ sta $32c,y
+ sta $332,y
+ lda $30d,y
+ sta $32d,y
+ sta $331,y
+ lda $30e,y
+ sta $32e,y
+ sta $330,y
+ lda $30f,y
+ sta $32f,y
+ tya
+ adc #$df
+ tay
+ bcs ll4
+
+
+ ldy #$e0
+ sec
+ll1:
+ lda $203,y
+ sta $223,y
+ sta $23b,y
+ lda $204,y
+ sta $224,y
+ sta $23a,y
+ lda $205,y
+ sta $225,y
+ sta $239,y
+ lda $206,y
+ sta $226,y
+ sta $238,y
+ lda $207,y
+ sta $227,y
+ sta $237,y
+ lda $208,y
+ sta $228,y
+ sta $236,y
+ lda $209,y
+ sta $229,y
+ sta $235,y
+ lda $20a,y
+ sta $22a,y
+ sta $234,y
+ lda $20b,y
+ sta $22b,y
+ sta $233,y
+ lda $20c,y
+ sta $22c,y
+ sta $232,y
+ lda $20d,y
+ sta $22d,y
+ sta $231,y
+ lda $20e,y
+ sta $22e,y
+ sta $230,y
+ lda $20f,y
+ sta $22f,y
+ tya
+ adc #$df
+ tay
+ bcs ll1
+
+ jmp l3
+
+; Rules, uncomment only one line of the following.
+rule:
+ dcb 0,2,0,1,1,2,0 ; CODE 600
+; dcb 0,2,1,0,2,0,0 ; CODE 177
+; dcb 0,1,2,0,2,0,1; CODE 912 
\ No newline at end of file
diff --git a/hacks/images/m6502/crunch6502.asm b/hacks/images/m6502/crunch6502.asm
new file mode 100644 (file)
index 0000000..56ea507
--- /dev/null
@@ -0,0 +1,292 @@
+;; Show "6502" on the screen waving up and down.
+;; Jeremy English 29-December-2007
+;;
+;; Each digit is stored as a pattern of vertical bits.
+;; For example:
+;;
+;;   111111     This is the digit six. We think of the digit 
+;;   111111     by it's column pattern. The column patterns 
+;;   110000     are labeled at the bottom of the example. 
+;;   110000     Pattern B is 1100110011. The basic algorithm 
+;;   111111     is that we get the pattern, paint the first
+;;   111111     bit (1 foreground, 0 background) then dec y 
+;;   110011     and get the next bit.
+;;   110011     
+;;   111111     The pattern for each digit is:
+;;   111111     6 = AABBCC
+;;   ------     5 = DDBBCC
+;;   AABBCC     0 = AAEEAA
+;;              2 = CCBBDD
+
+;; Addresses $0 and $1 are used by the paint subroutine.
+;; Addresses $2 through $6 are used by the display pattern subroutine
+;; Address $7 is used in the main loop
+;; Address $8 through $1a  are used for the start positions
+;; Address $1b is used by the display pattern subroutine
+;; Address $1c is used as the color row offset.
+;; Addresses $d0 through $ef store the font table
+
+jmp init_font_table
+start:
+
+;; Initialize the pointers to the start position.
+lda #<y_start_pos1
+sta $b
+lda #>y_start_pos1
+sta $c
+lda #<y_start_pos2
+sta $d
+lda #>y_start_pos2
+sta $e
+lda #<y_start_pos3
+sta $f
+lda #>y_start_pos3
+sta $10
+lda #<y_start_pos4
+sta $11
+lda #>y_start_pos4
+sta $12
+lda #<y_start_pos5
+sta $13
+lda #>y_start_pos5
+sta $14
+lda #<y_start_pos4
+sta $15
+lda #>y_start_pos4
+sta $16
+lda #<y_start_pos3
+sta $17
+lda #>y_start_pos3
+sta $18
+lda #<y_start_pos2
+sta $19
+lda #>y_start_pos2
+sta $1a
+
+
+lda #0        ; start position to use
+sta $8
+
+main_loop:
+inc $1c       ; increment the color offset.
+inc $1d       ; increment the starting x position
+ldy $8        ; load the current start position index
+ldx $b,y      ; get the lsb from the table
+txa
+sta $9        ; store the msb of the start position pointer
+iny           ; move to the next position in the table
+ldx $b,y      ; get the msb from the table
+txa
+sta $a        ; store the lsb of the start position pointer
+iny           ; move the index up by one
+tya
+cmp #$10       ; have we looked at all 16 start positions?
+bne store_idx ; if not then keep the index and store it
+lda #0        ; set the index back to zero
+store_idx:
+sta $8        ; save the index back in memory
+
+ldy #0
+lda #$ff
+sta $4        ; initialize the column to FF
+display_loop:
+  inc $4      ; increment the column
+  ldx $d0,y   ; load the lsb from the font table
+  stx $2
+  iny
+  ldx $d0,y   ; load the msb from the font table
+  stx $3
+  sty $7      ; save y in memory
+  jsr dis_pat ; Jump to the display pattern subroutine.
+  inc $4      ; increment the column   
+  jsr dis_pat ; Each pattern gets painted twice so we have a thicker font
+  ldy $7      ; get y out of memory
+  iny         ; increment the index
+  tya
+  cmp #$20    ; Did we display all of the columns?
+  bne display_loop ;if not continue
+jmp main_loop
+rts
+
+init_font_table:
+  ;;Setup a table in the zero page that contains the string "6502"
+  lda #<pattern_a    ;start with digit 6. It's pattern is aabbcc
+  sta $d0
+  lda #>pattern_a
+  sta $d1
+  lda #<pattern_b
+  sta $d2
+  lda #>pattern_b
+  sta $d3
+  lda #<pattern_c
+  sta $d4
+  lda #>pattern_c
+  sta $d5
+  lda #<pattern_null  ;We want to space everything out with blanks
+  sta $d6
+  lda #>pattern_null
+  sta $d7
+  lda #<pattern_d   ;load memory for digit 5 ddbbcc
+  sta $d8
+  lda #>pattern_d
+  sta $d9
+  lda #<pattern_b
+  sta $da
+  lda #>pattern_b
+  sta $db
+  lda #<pattern_c
+  sta $dc
+  lda #>pattern_c
+  sta $dd
+  lda #<pattern_null
+  sta $de
+  lda #>pattern_null
+  sta $df
+  lda #<pattern_a   ;load memory for digit 0 aaeeaa
+  sta $e0
+  lda #>pattern_a
+  sta $e1
+  lda #<pattern_e
+  sta $e2
+  lda #>pattern_e
+  sta $e3
+  lda #<pattern_a
+  sta $e4
+  lda #>pattern_a
+  sta $e5
+  lda #<pattern_null
+  sta $e6
+  lda #>pattern_null
+  sta $e7
+  lda #<pattern_c   ;load memory for digit 2 ccbbdd
+  sta $e8
+  lda #>pattern_c
+  sta $e9
+  lda #<pattern_b
+  sta $ea
+  lda #>pattern_b
+  sta $eb
+  lda #<pattern_d
+  sta $ec
+  lda #>pattern_d
+  sta $ed
+  lda #<pattern_null
+  sta $ee
+  lda #>pattern_null
+  sta $ef
+  jmp start
+
+
+;; Display a pattern on the screen. The pattern to use is 
+;; stored at $2 and $3. The current column is stored at $4.
+dis_pat:
+  ldy $4             ; Load the current column into y
+  lda ($9),y         ; Get the start position for y
+  tay
+  sty $5             ; Store the starting position in memory
+  ldy #0             ; We have 12 bits that need to be painted
+dis_pat_loop:
+  lda ($2),y         ; get a bit from the pattern
+  pha                ; save the color on the stack
+  tya                ; move the index into the accumulator
+  clc                ; clear the carry 
+  adc $5             ; add the starting position to the index
+  sty $6             ; store the index 
+  tay                ; The calculated y position
+  ldx $4             ; The x position is the current column
+  pla                ; pop the color off of the stack
+  beq go_paint       ; black just paint it
+  clc                ; get rid of any carry bit
+  sty $1b            ; save the y coordinate
+  tya
+  clc
+  adc $1c            ; add the color offset
+  and #$7            ; make sure the look up is in range
+  tay                ; move the new index into y so we can look up the color
+  lda color_row,y    ; if not black get the row color
+  ldy $1b            ; restore the y coordinate
+go_paint:
+  jsr paint          ; paint the pixel on the screen
+  ldy $6             ; get the index out of memory
+  iny                ; increment the index
+  tya
+  cmp #12            ; Have we looked at all of the bits?
+  bne dis_pat_loop   ; if not then continue looking
+  rts                ; else return from the subroutine
+
+;; Paint - Put a pixel on the screen by using the x registry for 
+;;         the x position, the y registry for the y position and 
+;;         the accumulator for the color.
+paint:
+   pha           ; Save the color
+   lda yl,y      ; Get the LSB of the memory address for y
+   sta $0        ; Store it first
+   lda yh,y      ; Get the MSB of the memory address for y
+   sta $1        ; Store it next
+   txa           ; We want x in the y registry so we transfer it to A
+   tay           ; and then A into y.
+   pla           ; Pop the color off of the stack
+   sta ($0),y    ; Store the color at the correct y + x address.
+   rts           ; return from the subroutine.
+
+;; Paint uses the following two tables to look up the 
+;; correct address for a y coordinate between 
+;; 0 and 31.
+
+;; Y cord MSB
+yh:
+       dcb $02, $02, $02, $02, $02, $02, $02, $02
+       dcb $03, $03, $03, $03, $03, $03, $03, $03
+       dcb $04, $04, $04, $04, $04, $04, $04, $04
+       dcb $05, $05, $05, $05, $05, $05, $05, $05
+;; Y cord LSB
+yl:
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0 
+
+;; A zero is on the end of each pattern to clean up 
+;; residue left by waving.
+pattern_a:
+  dcb 0,1,1,1,1,1,1,1,1,1,1,0
+
+pattern_b:
+  dcb 0,1,1,0,0,1,1,0,0,1,1,0
+
+pattern_c:
+  dcb 0,1,1,0,0,1,1,1,1,1,1,0
+
+pattern_d:
+  dcb 0,1,1,1,1,1,1,0,0,1,1,0
+
+pattern_e:
+  dcb 0,1,1,0,0,0,0,0,0,1,1,0
+
+pattern_null:
+  dcb 0,0,0,0,0,0,0,0,0,0,0,0
+
+;; Table that store the current start position 
+;; of each y column.
+y_start_pos1:
+  dcb 10,10,9,9,8,8,7,7,6,6,7,7,8,8,9,9,10,10,9,9,8,8,7,7
+  dcb 6,6,7,7,8,8
+
+y_start_pos2:
+  dcb 9,9,8,8,8,8,8,8,7,7,8,8,8,8,8,8,9,9,8,8,8,8,8,8
+  dcb 7,7,8,8,8,8
+
+y_start_pos3:
+  dcb 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
+  dcb 8,8,8,8,8,8
+
+y_start_pos4:
+  dcb 7,7,8,8,8,8,8,8,9,9,8,8,8,8,8,8,7,7,8,8,8,8,8,8
+  dcb 9,9,8,8,8,8
+
+y_start_pos5:
+  dcb  6, 6,7,7,8,8,9,9,10,10,9,9,8,8,7,7, 6, 6,7,7,8,8,9,9
+  dcb 10,10,9,9,8,8
+
+color_row:
+  dcb $7,$8,$9,$2,$4,$6,$e,$3,$d,$5
diff --git a/hacks/images/m6502/demoscene.asm b/hacks/images/m6502/demoscene.asm
new file mode 100644 (file)
index 0000000..fdd9361
--- /dev/null
@@ -0,0 +1,457 @@
+
+start:
+  ldx #0
+c:lda bottombar,x
+  cmp #$ff
+  beq init
+  sta $4e0,x
+  sta $5e0,x
+  inx
+  jmp c
+init:
+  jsr initDraw
+  lda #0
+  sta $10 ; scrptr
+  sta $11 ; txtptr
+loop:
+  jsr drawMain
+  jsr putfont
+  jsr scrollarea
+  jmp loop
+
+scrollarea:
+  ldx #0
+g:lda $521,x
+  sta $520,x
+  lda $541,x
+  sta $540,x
+  lda $561,x
+  sta $560,x
+  lda $581,x
+  sta $580,x
+  lda $5a1,x
+  sta $5a0,x
+  inx
+  cpx #31
+  bne g
+  rts
+
+putfont:
+  lda $10 ; scrptr
+  cmp #0
+  bne noNext
+  inc $11
+  ldx $11
+  lda scrolltext,x
+  tax
+  lda fontSize,x
+  sta $10
+noNext:
+  dec $10
+  ldx $11
+  lda scrolltext,x
+  cmp #$ff
+  bne notResetText
+  lda #0
+  sta $10
+  sta $11
+  rts
+
+notResetText:
+  asl
+  tax
+  lda fontlookup,x
+  sta $2
+  inx
+  lda fontlookup,x
+  sta $3
+  lda #<fonts
+  clc
+  adc $2
+  sta $0
+  lda #>fonts
+  adc $3
+  sta $1
+  ldy $10
+  lda ($00),y
+  sta $53f
+  tya
+  clc
+  adc #6
+  tay
+  lda ($00),y
+  sta $55f
+  tya
+  clc
+  adc #6
+  tay
+  lda ($00),y
+  sta $57f
+  tya
+  clc
+  adc #6
+  tay
+  lda ($00),y
+  sta $59f
+  tya
+  clc
+  adc #6
+  tay
+  lda ($00),y
+  sta $5bf
+  rts
+
+initDraw:
+  lda #<picture
+  sta $20
+  lda #>picture
+  sta $21
+  lda #$00
+  sta $22
+  lda #$02
+  sta $23
+  ldx #$0
+  rts
+drawMain:
+  ldx #0
+  lda ($20,x)
+  cmp #$ff
+  beq done
+  sta ($22,x)
+  inc $20
+  lda $20
+  cmp #$00
+  bne n1
+  inc $21
+n1:
+  inc $22
+  lda $22 
+  cmp #$00
+  bne done
+  lda $23
+  cmp #$05
+  beq done
+  inc $23
+done:
+  rts
+
+picture:
+  dcb 0,0,0,0,0,0,0,0,0,$b,$b,$c,$f,$f,$f,$f
+  dcb $f,$b,0,0,0,$b,$b,$c,$c,$f,$f,$b,0,0,0,0
+  dcb 0,0,0,0,0,0,0,0,0,$b,$c,$c,$f,$c,$f,$f
+  dcb $b,$b,$b,$b,$b,0,$b,$b,$c,$f,$f,$c,0,0,0,0
+  dcb 0,0,0,0,0,0,0,$b,0,$c,$b,$f,$c,$f,$f,$c
+  dcb $c,$b,0,$b,$c,$c,$c,$f,$f,1,$f,$c,$b,0,0,0
+  dcb 0,0,0,0,0,0,0,0,$b,$b,$c,$c,$c,$f,$f,$f
+  dcb $c,$c,$c,$c,$c,$c,$f,$c,$f,$f,$f,$f,$b,0,0,0
+  dcb 0,0,0,0,0,0,0,$b,0,0,$b,$c,$c,$f,$f,$f
+  dcb $f,$c,$f,$f,$f,$f,$f,$f,$f,1,$f,$f,$c,0,0,0
+  dcb 0,0,0,0,0,0,0,0,0,$b,$b,$b,$c,$f,$f,1
+  dcb $f,$f,$c,$f,$f,$f,1,$f,$f,$f,$f,$f,$f,0,0,0
+  dcb 0,0,0,0,0,0,0,0,0,$b,$b,$b,$b,$c,$f,1
+  dcb $f,$f,$f,$f,$f,$f,$f,$f,1,$f,$f,$f,$f,$b,0,0
+  dcb 0,0,0,0,0,0,0,0,$b,0,$b,$c,$b,$c,$c,1
+  dcb 1,$f,1,$f,1,$f,1,$f,$f,1,$f,$f,1,$b,0,0
+  dcb 0,0,0,0,0,0,0,$b,$b,$b,$c,$c,$b,$c,$f,1
+  dcb 1,1,$f,$f,1,$f,$f,1,$f,$f,$f,$f,1,$c,0,0
+  dcb 0,0,0,0,0,0,0,$b,$b,$c,$c,$c,$b,$c,$c,$f
+  dcb 1,1,1,$f,$f,1,$f,1,$f,1,$f,$f,1,$c,0,0
+  dcb 0,0,0,0,0,$b,$b,$b,$c,$c,$c,$f,$c,$c,$f,$f
+  dcb 1,1,1,1,$f,$f,$f,1,$f,1,$f,$f,$f,$f,0,0
+  dcb 0,0,0,0,0,0,$b,$c,$c,$c,$f,$c,$f,$c,$f,$f
+  dcb 1,1,1,1,1,$f,$f,1,$f,$f,$f,$f,1,$f,$b,0
+  dcb 0,0,0,0,$b,$b,$b,$c,$c,$f,$c,$f,$f,$c,$f,$f
+  dcb 1,1,1,1,1,$f,$f,$f,1,$f,$f,$f,1,$c,$b,$b
+  dcb 0,0,0,0,$b,$b,$c,$f,$c,$f,$f,$f,$f,$f,$c,$f
+  dcb 1,1,1,1,1,$f,$f,$f,1,$f,$f,$f,$f,$f,$b,$b
+  dcb 0,0,0,0,$b,$c,$c,$c,$f,$f,$f,$f,$f,$f,$f,$f
+  dcb $f,1,1,1,$f,$b,$f,$f,$f,1,$f,$f,$f,$f,$b,$b
+  dcb 0,0,0,0,$b,$c,$c,$f,$c,$f,$f,$f,$f,$f,$f,$f
+  dcb $f,$f,$f,$c,$b,$f,$f,1,$f,$f,$f,$f,$f,$f,$c,$b
+  dcb 0,0,0,0,$b,$b,$c,$c,$f,$c,$f,$f,$f,$f,$f,$f
+  dcb $c,$c,$b,$c,$c,$f,$f,1,$c,$c,$f,$f,$f,$f,$c,$b
+  dcb 0,0,0,0,$b,$b,$c,$c,$c,$f,$f,$f,$f,$f,$f,$f
+  dcb $f,$f,$f,$f,$f,1,$f,$c,$b,$f,$c,$f,$c,$f,$c,$b
+  dcb 0,0,0,0,0,$b,$c,$c,$c,$c,$f,$f,$f,$f,$f,$f
+  dcb $f,$f,$f,$f,$f,$c,$b,$c,$c,$c,$f,$f,$c,$f,$c,$c
+  dcb 0,0,0,0,0,$b,$b,$c,$c,$c,$c,$c,$f,$f,$f,$f
+  dcb $f,$f,$f,$c,$b,$b,$c,$c,$c,$f,$c,$f,$f,$f,$c,$b
+  dcb 0,0,0,0,0,$b,$b,$b,$b,$c,$c,$f,$c,$f,$f,$f
+  dcb $c,$c,$b,$b,$b,$c,$b,$b,$c,$c,$f,$c,$c,$f,$c,$c
+  dcb 0,0,0,0,0,0,$b,$b,$c,$b,$c,$c,$c,$c,$c,$c
+  dcb $b,$b,$b,$b,$c,$b,$b,$c,$c,$f,$f,$f,$c,$c,$c,$b
+  dcb 0,0,0,0,0,0,0,0,$b,$b,$b,$c,$c,$c,$c,$c
+  dcb $c,$c,$b,$b,$b,$b,$c,$c,$f,$f,$f,$c,$c,$c,$c,$c
+  dcb $ff
+
+
+fontSize:
+  dcb 5,5,5,5,5,5,5,5 ;abcdefgh
+  dcb 2,5,5,5,6,6,5,5 ;ijklmnop
+  dcb 6,5,5,4,5,6,6,6 ;qrstuvwx
+  dcb 6,5,2,3         ;yz.[SPACE]
+
+;
+; a=0, b=1, c=2, d=3....
+;
+
+scrolltext:
+  dcb 0
+
+  dcb 14,13,11,24,27           ; "only "
+  dcb 03,04,15,19,07,27        ; "depth "
+  dcb 12,0,10,4,18,27          ; "makes "
+  dcb 8,19,27                  ; "it "
+  dcb 15,14,18,18,8,1,11,4     ; "possible"
+  dcb 26,26,26                 ; "..."
+  dcb 19,7,8,18,27             ; "this "
+  dcb 8,18,27                  ; "is "
+  dcb 19,7,4,27                ; "the "
+  dcb 5,8,17,18,19,27          ; "first "
+  dcb 3,4,12,14,27             ; "demo "
+  dcb 12,0,3,4,27              ; "made "
+  dcb 8,13,27                  ; "in "
+  dcb 19,7,8,18,27             ; "this "
+  dcb 4,13,21,26,26,26,26,27   ; "env.... "
+  dcb 7,14,15,4,27             ; "hope "
+  dcb 24,14,20,27              ; "you "
+  dcb 11,8,10,4,27             ; "like "
+  dcb 8,19,26,26,26,27,27      ; "it...  "
+  dcb 22,22,22,26              ; "www."
+  dcb 3,4,15,19,7,26           ; "depth."
+  dcb 14,17,6,27,27,27,27,27   ; "org     "
+
+  dcb $ff                      ; end of text
+
+fontlookup:
+  dcb $00,$00 ;a
+  dcb $20,$00 ;b
+  dcb $40,$00 ;c
+  dcb $60,$00 ;d
+  dcb $80,$00 ;e
+  dcb $a0,$00 ;f
+  dcb $c0,$00 ;g
+  dcb $e0,$00 ;h
+  dcb $00,$01 ;i
+  dcb $20,$01 ;j
+  dcb $40,$01 ;k
+  dcb $60,$01 ;l
+  dcb $80,$01 ;m
+  dcb $a0,$01 ;n
+  dcb $c0,$01 ;o
+  dcb $e0,$01 ;p
+  dcb $00,$02 ;q
+  dcb $20,$02 ;r
+  dcb $40,$02 ;s
+  dcb $60,$02 ;t
+  dcb $80,$02 ;u
+  dcb $a0,$02 ;v
+  dcb $c0,$02 ;w
+  dcb $e0,$02 ;x
+  dcb $00,$03 ;y
+  dcb $20,$03 ;z
+  dcb $40,$03 ;.
+  dcb $60,$03 ;" "
+
+fonts:
+  dcb 0,1,1,0,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,1,1,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,0
+
+  dcb 0,1,1,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,1,1,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,1,1,1,0,0
+  dcb 0,0
+
+  dcb 0,1,1,0,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,1,1,0,0,0
+  dcb 0,0
+
+  dcb 0,1,1,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,1,1,1,0,0
+  dcb 0,0
+
+  dcb 1,1,1,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 0,1,1,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 1,1,1,1,0,0
+  dcb 0,0
+
+  dcb 1,1,1,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 0,1,1,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 0,0
+
+  dcb 1,1,1,0,0,0
+  dcb 0,0,0,1,0,0
+  dcb 1,1,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,1,1,0,0,0
+  dcb 0,0
+
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,1,1,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,0
+
+  dcb 1,0,0,0,0,0
+  dcb 1,0,0,0,0,0
+  dcb 1,0,0,0,0,0
+  dcb 1,0,0,0,0,0
+  dcb 1,0,0,0,0,0
+  dcb 0,0
+
+  dcb 1,0,0,0,0,0
+  dcb 1,0,0,0,0,0
+  dcb 1,0,0,0,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,1,1,0,0,0
+  dcb 0,0
+
+  dcb 1,0,0,1,0,0
+  dcb 0,1,0,1,0,0
+  dcb 0,0,1,1,0,0
+  dcb 0,1,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,0
+
+  dcb 0,0,0,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 1,1,1,1,0,0
+  dcb 0,0
+
+  dcb 1,0,0,0,1,0
+  dcb 1,1,0,1,1,0
+  dcb 1,0,1,0,1,0
+  dcb 1,0,0,0,1,0
+  dcb 1,0,0,0,1,0
+  dcb 0,0
+
+  dcb 1,0,0,0,1,0
+  dcb 1,0,0,1,1,0
+  dcb 1,0,1,0,1,0
+  dcb 1,1,0,0,1,0
+  dcb 1,0,0,0,1,0
+  dcb 0,0
+
+  dcb 0,1,1,0,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,1,1,0,0,0
+  dcb 0,0
+
+  dcb 0,1,1,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,1,1,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 0,0,0,1,0,0
+  dcb 0,0
+
+  dcb 0,1,1,0,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,1,0,1,0,0
+  dcb 1,0,1,0,0,0
+  dcb 0,0
+
+  dcb 0,1,1,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,1,1,1,0,0
+  dcb 0,1,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 0,0
+
+  dcb 1,1,1,0,0,0
+  dcb 0,0,0,1,0,0
+  dcb 0,1,1,0,0,0
+  dcb 1,0,0,0,0,0
+  dcb 0,1,1,1,0,0
+  dcb 0,0
+
+  dcb 1,1,1,0,0,0
+  dcb 0,1,0,0,0,0
+  dcb 0,1,0,0,0,0
+  dcb 0,1,0,0,0,0
+  dcb 0,1,0,0,0,0
+  dcb 0,0
+
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,0,0,1,0,0
+  dcb 1,1,1,0,0,0
+  dcb 0,0
+
+  dcb 1,0,0,0,1,0
+  dcb 1,0,0,0,1,0
+  dcb 1,0,0,0,1,0
+  dcb 0,1,0,1,0,0
+  dcb 0,0,1,0,0,0
+  dcb 0,0
+
+  dcb 1,0,0,0,1,0
+  dcb 1,0,0,0,1,0
+  dcb 1,0,1,0,1,0
+  dcb 1,1,0,1,1,0
+  dcb 1,0,0,0,1,0
+  dcb 0,0
+
+  dcb 1,0,0,0,1,0
+  dcb 0,1,0,1,0,0
+  dcb 0,0,1,0,0,0
+  dcb 0,1,0,1,0,0
+  dcb 1,0,0,0,1,0
+  dcb 0,0
+
+  dcb 1,0,0,0,1,0
+  dcb 0,1,0,1,0,0
+  dcb 0,0,1,0,0,0
+  dcb 0,0,1,0,0,0
+  dcb 0,0,1,0,0,0
+  dcb 0,0
+
+  dcb 1,1,1,1,0,0 ; z
+  dcb 1,0,0,0,0,0
+  dcb 0,1,1,0,0,0
+  dcb 0,0,0,1,0,0
+  dcb 1,1,1,1,0,0
+  dcb 0,0
+
+  dcb 0,0,0,0,0,0 ; .
+  dcb 0,0,0,0,0,0
+  dcb 0,0,0,0,0,0
+  dcb 0,0,0,0,0,0
+  dcb 1,0,0,0,0,0
+  dcb 0,0
+
+  dcb 0,0,0,0,0,0 ; " "
+  dcb 0,0,0,0,0,0
+  dcb 0,0,0,0,0,0
+  dcb 0,0,0,0,0,0
+  dcb 0,0,0,0,0,0
+  dcb 0,0
+
+bottombar:
+  dcb $b,$9,$b,9,8,9,8,$a,8,$a,7,$a,7,1,7,1,1
+  dcb 7,1,7,$a,7,$a,8,$a,8,9,8,9,$b,9,$b
+  dcb $ff
+
diff --git a/hacks/images/m6502/dmsc.asm b/hacks/images/m6502/dmsc.asm
new file mode 100644 (file)
index 0000000..9dfd7dd
--- /dev/null
@@ -0,0 +1,108 @@
+; By DMSC - daniel.serpell@gmail.com
+;
+; This demo was programmed in ACME:
+;     http://www.esw-heim.tu-clausthal.de/~marco/smorbrod/acme/
+;
+; If you want the source code, send me an email :-)
+;
+
+ dcb  76, 94, 11,133, 32,162,  8,160,  8,145, 16,136,208,251,165, 16
+ dcb  24,105, 32,133, 16,165, 17,105,  0,133, 17,165, 32,202,208,231
+ dcb  96,230, 48,165, 48, 41, 63,133, 48,170,189,106,  6,170,189,  8
+ dcb   3,105,  1, 41,  3,157,  8,  3,138, 73,231,170,189,  0,  2,105
+ dcb   1, 41,  3,157,  0,  2,165, 48, 73, 63,170,189,106,  6, 73,224
+ dcb 170,189,  8,  2,105,  1, 41,  3,157,  8,  2,138, 73,231,170,189
+ dcb   0,  3,105,  1, 41,  3,157,  0,  3, 96,224,192,160,128, 96,225
+ dcb  64,193,161,226,129, 32,194, 97,162,227,195,130,228, 65,163,196
+ dcb  98,229,131,164,197,230,231,132,165,198, 99, 66, 33,  0,199,166
+ dcb 133,100,167, 67,134,101,135, 34, 68,102,103, 69, 35, 70, 71, 36
+ dcb   1, 37, 38, 39,  2,  3,  4,  5,  6,  7,166, 48,189,198,  6,170
+ dcb 254, 24,  3, 73,  7,170,254, 16,  3, 73,231,170,254, 24,  2, 73
+ dcb   7,170,254, 16,  2, 96,  0, 32,  1, 33, 64,  2, 65, 34, 96, 66
+ dcb   3, 97, 35, 98, 67,128,  4,129, 36, 99,130, 68,160,  5,161,131
+ dcb 100, 37,162, 69,132,192,163,101,  6,193, 38,194, 70,164,133,195
+ dcb 102,224,  7,225, 39,165,226,196,134, 71,227,103,197,166,228,135
+ dcb 198,229,167,230,199,231,166, 49,189, 21,  7,170,189,  0,160,157
+ dcb   0,  5,230, 49, 96,195,227,194,162,228, 97,226,128,129,130,225
+ dcb  64,161,163,224, 96,160,193,196, 32, 98,192, 65,  0,131,229,164
+ dcb  33, 99,197, 66,132,  1,230, 34,165, 67,100,198,  2,  3, 68,  6
+ dcb  35,133,166,  5,101,  4,199,  7, 36,231, 69,134,167, 37, 38,102
+ dcb 135, 70,232, 71, 39,103,136,200,168,  8, 11, 10,169,233,104,  9
+ dcb  12,137,201, 13, 40, 44, 72, 43,170, 42, 45, 41,105, 73,202, 14
+ dcb 138,234, 74, 75,106,203, 76,171, 46, 77,235,107,139, 15,108,172
+ dcb 174,140,173,141,142,204,109,206,207,205, 78,175, 47,236,239,143
+ dcb 237,238,110,240,241,111,208, 16, 79,176,209,242, 48,144,243, 80
+ dcb 177,244,112,210, 17, 49,178,179, 52, 53,147, 18, 81,211,145, 19
+ dcb 146, 51, 85,180, 20, 54,113,148, 22, 50, 84,212, 21, 55,115,245
+ dcb  83,114,116, 23, 82, 86, 88, 89, 87,118,117,119,149,213, 56, 57
+ dcb 181,214, 90,121,122,150,151,182,183,215,246, 58,120,247, 24,153
+ dcb 184,152,216, 25, 26, 59, 91,248,123,185, 27, 60,217,154, 28, 92
+ dcb 249, 29,155,186, 61,218, 93,124,250,187, 30,251, 62,156, 94,125
+ dcb 219,188, 31,252,254,220,253, 63,126,255,157,221, 95,159,191,222
+ dcb 127,189,223,158,190,165, 66, 41,224,208, 72,165, 66, 24,105,  1
+ dcb  41, 31,133, 66,165, 67,240,  7,198, 67,169,  0, 76, 97,  8,198
+ dcb  69,240,247, 16, 37,166, 64,230, 64,189,177,  9, 16, 15, 41,127
+ dcb 133, 67, 73,127,208,228,169,  1,133, 70, 76, 42,  8,170,189,117
+ dcb   8,133, 69,234,234,189,181,  8,133, 65,166, 65,230, 65,189,245
+ dcb   8,133, 68,165, 66, 24,105,224,133, 66,166, 66,169,  1,102, 68
+ dcb  42,157,  0,160, 96,  3,  3,  3,  3,  3,  3,  3,  3,  3,  3,  2
+ dcb   3,  2,  3,  3,  3,  3,  3,  1,  2,  3,  1,  5,  3,  3,  3,  3
+ dcb   3,  2,  2,  3,  3,  5,  4,  3,  3,  5,  4,  4,  4,  3,  3,  4
+ dcb   4,  1,  3,  4,  3,  5,  5,  5,  4,  5,  4,  4,  3,  4,  4,  7
+ dcb   4,  4,  4,  2,  1,  0,  3,  6,  9, 12, 15, 18, 21, 24, 27, 30
+ dcb  32, 35, 35, 38, 40, 43, 46, 49, 50, 52,  4, 55, 55, 60, 63, 65
+ dcb  68, 71, 73, 75, 78, 78, 33, 83, 86, 89, 94, 98,102,106,109,112
+ dcb 116, 94,120,123,127,130,134,139,144,148,153,157,161,164,167,171
+ dcb 178,171,182,186,  5, 56, 68, 56, 36,124,  4, 76, 84, 36, 68, 84
+ dcb  40, 24, 40,124,100, 84, 88, 56, 84, 72, 76, 80, 96, 40, 84, 40
+ dcb  36, 84, 56, 44, 28,124, 36, 24, 24, 36,124, 24, 52, 16, 60, 80
+ dcb  24, 37, 30,124, 32, 28,188,  1,190,124, 24, 36, 60, 32, 28, 32
+ dcb  28, 24, 36, 24, 63, 36, 24, 36, 63, 60, 16, 32, 52, 44,120, 36
+ dcb  56,  4, 60, 56,  4, 56,  4, 56, 57,  6, 56, 44, 52, 36, 12, 48
+ dcb 208, 48, 12,252,164,164, 88,120,132,132, 72,252,132,132,120,252
+ dcb 164,132,252,160,128,120,132,164, 56,252, 32, 32,252,  8,  4,248
+ dcb 252, 48, 80,140,252,  4,  4,252, 64, 60, 64,252, 64, 48,  8,252
+ dcb 120,132,132,132,120,252,144,144, 96,120,132,134,133,120,252,144
+ dcb 144,108, 68,164,164,152,128,252,128,248,  4,  4,248,  4,  8,240
+ dcb 224, 28, 16,224, 28, 16,224,204, 48, 48,204,140,148,164,196,  0
+ dcb   0,133, 41, 10, 28, 29, 63, 63, 63,136, 15, 10, 28, 29, 14, 27
+ dcb  63, 63, 63,132, 55, 17, 18, 28, 62, 18, 28, 62, 10,136, 27, 14
+ dcb  10, 21, 21, 34,143, 15, 10, 28, 29,142, 39, 40, 48, 50,149,145
+ dcb  10, 23, 13, 62, 23, 24, 32,136, 28, 24, 22, 14,136, 11, 14, 10
+ dcb  30, 29, 18, 15, 30, 21,128, 14, 15, 15, 14, 12, 29, 28, 63, 63
+ dcb  63,144,159,255, 55, 17, 18, 28, 62, 18, 28, 62, 10, 21, 21,129
+ dcb  15, 24, 27, 62, 23, 24, 32,136, 11, 34, 14, 63, 63, 63,141, 63
+ dcb  63, 63, 11, 34, 14,150,159,143, 11, 34, 62, 39, 48, 54, 38,  2
+ dcb   0,  0,  7, 63,  5, 63,  2,  9, 11, 34, 62, 39, 48, 54, 38,  2
+ dcb   0,  0,  7, 63,  5, 63,  2,  9, 11, 34, 62, 39, 48, 54, 38,  2
+ dcb   0,  0,  7, 63,  5, 63,  2,  9,143,159,255,169,  0,133, 42,169
+ dcb   1,133, 44,133, 45,169,  0,133, 32,169,160,133, 33,165, 42,133
+ dcb  43,162, 15,160, 15,145, 32, 24,101, 44,230, 44,136, 16,246,165
+ dcb  32, 24,105, 32,133, 32,165, 33,105,  0,133, 33,169,  1,133, 44
+ dcb 165, 43, 24,101, 45,133, 43,230, 45,202, 16,215,169,  0,133, 32
+ dcb 169,160,133, 33,169,224,133, 34,169,  3,133, 35,169,  0,133, 36
+ dcb 169,  4,133, 37,169,240,133, 38,169,  3,133, 39,169, 16,133, 40
+ dcb 169,  4,133, 41,169, 15,133, 46,160, 15,177, 32, 74, 74, 74, 74
+ dcb 170,189, 62, 11,209, 34,240, 18,145, 34,145, 36,170,152, 73, 15
+ dcb 168,138,145, 38,145, 40,152, 73, 15,168,136, 16,221,165, 32, 24
+ dcb 105, 32,133, 32,165, 33,105,  0,133, 33,165, 34, 24,105,224,133
+ dcb  34,165, 35,105,255,133, 35,165, 36, 24,105, 32,133, 36,165, 37
+ dcb 105,  0,133, 37,165, 38, 24,105,224,133, 38,165, 39,105,255,133
+ dcb  39,165, 40, 24,105, 32,133, 40,165, 41,105,  0,133, 41,198, 46
+ dcb  16,150,230, 42,165, 42, 41, 63,240,  3, 76, 95, 10, 96,  0, 11
+ dcb  12, 15,  1, 15, 12, 11,  0, 11, 12, 15,  1, 15, 12, 11,  0, 11
+ dcb  12, 15,  1, 15, 12, 11,  0, 11, 12, 15,  1, 15, 12, 11,169,  1
+ dcb 162,255,134, 16,162,  1,134, 17, 32,  3,  6,169,  2,162,  7,134
+ dcb  16,162,  2,134, 17, 32,  3,  6,169,  3,162,  7,134, 16,162,  3
+ dcb 134, 17, 32,  3,  6,169, 31,133, 66,169,  0,133, 70,133, 67,133
+ dcb  64,169,  1,141,109,  8,169,  0,141,114,  8,169,160,141,115,  8
+ dcb 169, 63,133, 48,169,128,133, 49,169,  3,141,109,  8,169,  0,170
+ dcb 157,  0,160,232,208,250, 32, 33,  6, 32,170,  6, 32,  6,  7, 32
+ dcb  21,  8,165, 66, 73, 31,208, 13,173,109,  8, 24,105,  2, 41,  3
+ dcb 105,  3,141,109,  8,165, 49,208,221,173, 17,  7, 73,  1,141, 17
+ dcb   7,165, 70,240,209, 32, 29, 12, 32, 91, 10,169, 31,133, 66,169
+ dcb   0,133, 70,133, 67,141,109,  8,169,  0,141,114,  8,169,  3,141
+ dcb 115,  8, 32, 29, 12, 32, 21,  8,165, 66, 73, 31,208,247,173,115
+ dcb   8, 73,  7,141,115,  8,165, 70,240,235, 76, 94, 11,169,  0,170
+ dcb 157,  0,  2,157,  0,  3,157,  0,  4,157,  0,  5,232,208,241, 96
diff --git a/hacks/images/m6502/dragon-fractal.asm b/hacks/images/m6502/dragon-fractal.asm
new file mode 100644 (file)
index 0000000..ce05ad4
--- /dev/null
@@ -0,0 +1,49 @@
+;; dmsc
+;;     
+;; PostPosted: Thu Dec 13, 2007 11:57 pm Post subject: Dragon curve
+;; fractal 
+;;
+;; 
+;; Hi!
+;; 
+;; This draws the dragon curve fractal (really a "twin dragon"):
+
+lda #0
+ sta $0
+
+lop:
+ lda $0
+ sta $1
+ lda #3
+ sta $6
+ lda #232
+ sta $5
+
+ ldx #0
+lpN:
+ lsr $1
+ bcc nos
+ lda $5
+ clc
+ adc tL,x
+ sta $5
+ lda $6
+ adc tH,x
+ sta $6
+nos:
+ inx
+ lda $1
+ bne lpN
+ inx
+ txa
+ ldy #0
+ sta ($5),y
+
+ inc $0
+ bne lop
+ rts
+
+tL:
+ dcb 32, 31, 254, 190, 128, 132, 8, 8
+tH:
+ dcb 0, 0, 255, 255, 255, 255, 0, 1 
diff --git a/hacks/images/m6502/fullscreenlogo.asm b/hacks/images/m6502/fullscreenlogo.asm
new file mode 100644 (file)
index 0000000..6f9b079
--- /dev/null
@@ -0,0 +1,107 @@
+;\r
+;  draw image\r
+;\r
+\r
+start:\r
+  lda #<logo\r
+  sta $0\r
+  lda #>logo\r
+  sta $1\r
+\r
+  lda #$00\r
+  sta $2\r
+  lda #$02\r
+  sta $3\r
+\r
+  ldx #$0\r
+l:\r
+  lda ($0,x)\r
+  sta ($2,x)\r
+\r
+  inc $00\r
+  lda $00\r
+  cmp #$00\r
+  bne notReset1\r
+  inc $01\r
+notReset1:\r
+\r
+  inc $02\r
+  lda $02 \r
+  cmp #$00\r
+  bne notReset2\r
+  lda $03\r
+  cmp #$05\r
+  beq done\r
+  inc $03\r
+notReset2:\r
+\r
+  jmp l\r
+done:\r
+  rts\r
+\r
+logo:\r
+ dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,6,6,6\r
+ dcb 6,6,6,6,1,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,1,1,1,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,1,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,6,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,6,6,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,6,6,6,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,6,6,6,6,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,6,6,6,6,6,6,6,6,6,6,6,6,1\r
+ dcb 1,1,1,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,6,6,6,6,6,6,6,6,6,6,1,1,1\r
+ dcb 1,1,1,1,1,6,6,6,6,6,6,6,6,6,6,6\r
+ dcb 1,1,6,6,6,6,6,6,6,6,6,1,1,1,1,1\r
+ dcb 1,1,1,1,1,6,6,6,6,6,6,6,6,6,6,1\r
+ dcb 1,1,6,6,6,6,6,6,6,6,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,6,6,6,6,6,6,6,6,6,1,1\r
+ dcb 1,1,6,6,6,6,6,6,6,6,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,6,6,6,6,6,6,6,6,1,1,1\r
+ dcb 1,6,6,6,6,6,6,6,6,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,6,6,6,6,6,6,6,1,1,1,1\r
+ dcb 1,6,6,6,6,6,6,6,6,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,6,6,6,6,6,6,1,1,1,1,1\r
+ dcb 1,6,6,6,6,6,6,6,6,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,6,6,6,6,6,1,1,1,1,1,1\r
+ dcb 1,6,6,6,6,6,6,6,6,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,2,2,2,2,2,1,1,1,1,1,1\r
+ dcb 1,6,6,6,6,6,6,6,6,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,2,2,2,2,2,2,1,1,1,1,1\r
+ dcb 1,6,6,6,6,6,6,6,6,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,2,2,2,2,2,2,2,1,1,1,1\r
+ dcb 1,6,6,6,6,6,6,6,6,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,2,2,2,2,2,2,2,2,1,1,1\r
+ dcb 1,1,6,6,6,6,6,6,6,6,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,2,2,2,2,2,2,2,2,2,1,1\r
+ dcb 1,1,6,6,6,6,6,6,6,6,6,1,1,1,1,1\r
+ dcb 1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1\r
+ dcb 1,1,1,6,6,6,6,6,6,6,6,6,1,1,1,1\r
+ dcb 1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2\r
+ dcb 1,1,1,6,6,6,6,6,6,6,6,6,6,1,1,1\r
+ dcb 1,1,1,1,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,6,6,6,6,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,6,6,6,6,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,6,6,6,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,6,6,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,1,6,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,1,1,6,6,6,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,1,1,1,1,1,6,6,6,6\r
+ dcb 6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\r
+ dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1\r
+\r
diff --git a/hacks/images/m6502/keftal.asm b/hacks/images/m6502/keftal.asm
new file mode 100644 (file)
index 0000000..efb2982
--- /dev/null
@@ -0,0 +1,82 @@
+; awfully slow.. be patient
+
+init:
+  ldx #0
+  stx $0
+  inx
+  stx $2
+  stx $3
+  inx
+  stx $1
+
+loop:
+  lda $2
+  cmp #$20
+  bne notIncF2
+  inc $3
+  lda #0
+  sta $2
+notIncF2:
+  inc $2
+
+; CALCULATE START
+
+  lda $2
+  sta $f1
+  lda $2
+  sta $f2
+  jsr multiply
+
+  lda $f4
+  sta $f8
+
+  lda $3
+  sta $f1
+  lda $3
+  sta $f2
+  jsr multiply
+
+; CALCULATE STOP
+
+  lda $f4
+  clc
+  adc $f8
+
+  lsr
+  lsr
+  lsr
+  lsr
+  lsr
+  ldx #0
+  sta ($0,x)
+  inc $0
+  lda $0
+  cmp #$00
+  bne notNextY
+  inc $1
+  lda $1
+  cmp #6
+  beq exit
+notNextY:
+  jmp loop
+exit:
+  rts
+
+multiply:
+  lda #0
+  sta $f4
+  sta $f5
+  ldx #8
+a:asl $f4
+  rol $f5
+  asl $f2
+  bcc b
+  clc
+  lda $f4
+  adc $f1
+  sta $f4
+  bcc b
+  inc $f5
+b:dex
+  bne a
+  rts 
\ No newline at end of file
diff --git a/hacks/images/m6502/matrix.asm b/hacks/images/m6502/matrix.asm
new file mode 100644 (file)
index 0000000..0ec27a7
--- /dev/null
@@ -0,0 +1,67 @@
+;;Matrix :) 
+       
+loop:   
+       lda $fe
+       and #$1f
+       tay
+       tax
+       lda matrix,y
+       sta $1
+       tay
+       lda #0
+       jsr paint
+   inc $1
+   lda $1
+   and #$1f
+   sta matrix,y
+   tay
+   lda #5 
+   jsr paint
+       lda $fe
+       and #$1f
+       tay
+       tax
+       lda matrix,y
+       sta $1
+       tay
+       lda #$d
+       jsr paint
+       lda $fe
+       and #$1f
+       tay
+       tax
+       lda matrix,y
+       sta $1
+       tay
+       lda #$5
+       jsr paint
+   jmp loop
+       
+paint:
+   pha
+   lda yl,y
+   sta $2
+   lda yh,y
+   sta $3
+   txa
+   tay
+   pla
+   sta ($2),y
+   rts
+
+yh:
+       dcb $02, $02, $02, $02, $02, $02, $02, $02
+       dcb $03, $03, $03, $03, $03, $03, $03, $03
+       dcb $04, $04, $04, $04, $04, $04, $04, $04
+       dcb $05, $05, $05, $05, $05, $05, $05, $05
+       
+yl:
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+   
+matrix:
+       dcb 5,16,19,19,17,26,10,14,11,4,1,2,20,1,8,30
+       dcb 17,26,19,19,31,21,11,19,3,24,4,24,13,8,8,26
+
diff --git a/hacks/images/m6502/noise.asm b/hacks/images/m6502/noise.asm
new file mode 100644 (file)
index 0000000..32447d7
--- /dev/null
@@ -0,0 +1,16 @@
+; static noise
+
+start: ldy #$ff
+       ldx #$0
+loop:  lda $fe
+       sta $200,x
+       and #$7
+       sta $300,x
+       and #$3
+       sta $400,x
+       and #$1
+       sta $500,x
+       inx
+       dey
+       bne loop
+       rts
diff --git a/hacks/images/m6502/random-walk.asm b/hacks/images/m6502/random-walk.asm
new file mode 100644 (file)
index 0000000..4c3bd15
--- /dev/null
@@ -0,0 +1,82 @@
+ ;; Jeremy English Dec 11 2007
+ ;; Random walk
+   lda #16
+   sta $0         ; The current x pos
+   sta $1         ; The current y pos
+   lda $fe         ; Get random color
+   sta $5         ; Store the color
+   lda $fe         ; Amount of time to use this color
+   sta $6
+
+loop:
+   ldx $0
+   ldy $1
+   lda $5
+   jsr paint
+   jsr walk
+   dec $6
+   bne loop
+   ;; get a new color
+   lda $fe
+   sta $5
+   ;; get a new duration
+   lda $fe
+   sta $6
+   jmp loop
+
+walk:
+   lda $fe
+   and #3
+   cmp #0
+   beq right
+   cmp #1
+   beq left
+   cmp #2
+   beq up
+   jmp down
+
+right:
+   inc $0
+   jmp done
+left:
+   dec $0
+   jmp done
+up:
+   dec $1
+   jmp done
+down:
+   inc $1
+   jmp done
+done:
+   lda $0
+   and #31
+   sta $0
+   lda $1
+   and #31
+   sta $1
+   rts
+
+paint:
+   pha
+   lda yl,y
+   sta $2
+   lda yh,y
+   sta $3
+   txa
+   tay
+   pla
+   sta ($2),y
+   rts
+
+   ;; Y cord MSB
+yh:
+       dcb $02, $02, $02, $02, $02, $02, $02, $02
+       dcb $03, $03, $03, $03, $03, $03, $03, $03
+       dcb $04, $04, $04, $04, $04, $04, $04, $04
+       dcb $05, $05, $05, $05, $05, $05, $05, $05
+       ;; Y cord LSB
+yl:
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0
+       dcb $00, $20, $40, $60, $80, $a0, $c0, $e0 
diff --git a/hacks/images/m6502/random.asm b/hacks/images/m6502/random.asm
new file mode 100644 (file)
index 0000000..9ff5d2d
--- /dev/null
@@ -0,0 +1,11 @@
+loop: lda $fe       ; A=rnd\r
+      sta $00       ; ZP(0)=A\r
+      lda $fe\r
+      and #$3       ; A=A&3\r
+      clc           ; Clear carry\r
+      adc #$2       ; A+=2\r
+      sta $01       ; ZP(1)=A\r
+      lda $fe       ; A=rnd\r
+      ldy #$0       ; Y=0\r
+      sta ($00),y   ; ZP(0),ZP(1)=y\r
+      jmp loop\r
diff --git a/hacks/images/m6502/random2.asm b/hacks/images/m6502/random2.asm
new file mode 100644 (file)
index 0000000..c209f9f
--- /dev/null
@@ -0,0 +1,11 @@
+      lda $fe       ; A=rnd\r
+      sta $00       ; ZP(0)=A\r
+      lda $fe\r
+      and #$3       ; A=A&3\r
+      clc           ; Clear carry\r
+      adc #$2       ; A+=2\r
+      sta $01       ; ZP(1)=A\r
+      lda $fe       ; A=rnd\r
+      ldy #$0       ; Y=0\r
+      sta ($00),y   ; ZP(0),ZP(1)=y\r
+      jmp $600\r
diff --git a/hacks/images/m6502/rorschach.asm b/hacks/images/m6502/rorschach.asm
new file mode 100644 (file)
index 0000000..c5591f0
--- /dev/null
@@ -0,0 +1,124 @@
+; "Rorschach test"
+; Not at all what it was supposed to be,
+; but it turns out pretty cool and can
+; create some interesting patterns.
+
+  lda #8
+  tax
+dr:
+  sta $3cb,x
+  sta $40b,x
+  dex
+  bpl dr
+  sta $3f3
+  sta $3eb
+
+  lda #1
+  sta $3ec
+
+  ldx #255
+mk:
+  lda $fe
+  sta $1200,x
+  lda $fe
+  sta $1300,x
+  lda $fe
+  sta $1400,x
+  lda $fe
+  sta $1500,x
+  dex
+  cpx #$ff
+  bne mk
+
+; smooth it
+
+  ldy #0
+re:
+  lda #1
+  sta $3ec,y
+
+  ldx #255
+sm:
+  lda $1201,x
+  adc $11ff,x
+  adc $1220,x
+  adc $11e0,x
+  lsr
+  lsr
+  sta $1200,x
+
+  lda $1301,x
+  adc $12ff,x
+  adc $1320,x
+  adc $12e0,x
+  lsr
+  lsr
+  sta $1300,x
+
+  lda $1401,x
+  adc $13ff,x
+  adc $1420,x
+  adc $13e0,x
+  lsr
+  lsr
+  sta $1400,x
+
+  lda $1501,x
+  adc $14ff,x
+  adc $1520,x
+  adc $14e0,x
+  lsr
+  lsr
+  sta $1500,x
+
+  dex
+  cpx #$ff
+  bne sm
+  iny
+  cpy #7
+  bne re
+
+  lda #1
+  sta $3f0
+
+  ;copy it
+
+  clc
+  ldx #255
+cp:
+  lda $1200,x
+  lsr
+  lsr
+  tay
+  lda colors,y
+  sta $200,x
+
+  lda $1300,x
+  lsr
+  lsr
+  tay
+  lda colors,y
+  sta $300,x
+
+  lda $1400,x
+  lsr
+  lsr
+  tay
+  lda colors,y
+  sta $400,x
+
+  lda $1500,x
+  lsr
+  lsr
+  tay
+  lda colors,y
+  sta $500,x
+
+  dex
+  cpx #$ff
+  bne cp
+  rts
+
+colors:
+  dcb 0,0,0,0,0,$9,$9,1,1,0,0,0,0,0
+
diff --git a/hacks/images/m6502/santa.asm b/hacks/images/m6502/santa.asm
new file mode 100644 (file)
index 0000000..be47502
--- /dev/null
@@ -0,0 +1,142 @@
+start:
+ldx #0
+cs:
+lda $2000,x
+sta $500,x
+dex
+bne cs
+
+stx $20
+
+loop:
+
+inc $20
+lda $20
+and #$7f
+tay
+and #$1f
+tax
+lda sinus,x
+tax
+
+d:
+
+lda #0
+sta $1e0,x
+sta $2e0,x
+lda $1000,y
+sta $200,x
+lda $1080,y
+sta $220,x
+lda $1100,y
+sta $240,x
+lda $1180,y
+sta $260,x
+lda $1200,y
+sta $280,x
+lda $1280,y
+sta $2a0,x
+lda $1300,y
+sta $2c0,x
+lda $1380,y
+sta $2c0,x
+inx
+iny
+txa
+and #$1f
+bne d
+
+jmp loop
+
+; 32 ($20) long
+sinus:
+dcb 0,0,0,0,$20,$20,$20
+dcb $40,$40,$60,$80,$a0,$a0,$c0,$c0,$c0
+dcb $e0,$e0,$e0,$e0,$c0,$c0,$c0
+dcb $a0,$a0,$80,$60,$40,$40,$20,$20,$20
+
+*=$1000
+santa:
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,$a,$a,0,0,0,0,0,0
+dcb 0,0,0,0,0,$a,$a,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,2,2,2,1,0,0,0,0,$9,$9,$9,$9,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,$a,$a,$a,0,0,0,0,0
+dcb 0,0,0,0,0,$a,$a,$a,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,$9,$9,0,0,0,0,0,0,0,0
+dcb 0,1,1,2,2,0,$9,$9,$9,$9,$9,$9,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,$a,$a,$a,$a,$a,$a,0,0,0,0
+dcb 0,0,0,$a,$a,$a,$a,$a,$a,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,$9,$9,$9,0,0,0,0,0,0
+dcb 0,1,2,2,$9,$9,$9,$9,$9,$9,$9,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,$a,$a,$a,$a,$a,$a,$b
+dcb $b,$b,$b,$b,$b,$b,$a,$a,$a,$a,$a,$a,$b,$b,$b,$b
+dcb $b,$b,$b,$b,$b,$9,$9,$9,$9,$9,$9,$9,$9,$9,$9,$9
+dcb $9,2,2,$9,$9,$9,$9,$9,$9,$9,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,$a,$a,$a,$a,$a,$a,$a
+dcb $a,0,0,0,0,0,$a,$a,$a,$a,$a,$a,$a,$a,0,0
+dcb 0,0,0,0,0,0,0,$9,$9,$9,$9,$9,$9,$9,$9,$9
+dcb 2,2,$9,$9,$9,$9,$9,$9,$9,$9,$9,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,$a,$a,$a,$a,$a,$a,0
+dcb $a,$a,0,0,0,0,$a,$a,$a,$a,$a,$a,0,$a,$a,0
+dcb 0,0,0,0,0,$a,$a,0,0,$9,$a,$9,$9,$9,$9,$9
+dcb $9,$9,$a,$9,$9,$9,$9,$9,$9,$9,$9,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,$a,0,$a,0,0,$a,0
+dcb 0,$a,0,0,0,0,$a,0,$a,0,0,$a,0,0,$a,0
+dcb 0,0,0,0,0,$a,0,0,0,$a,0,0,0,0,0,0
+dcb 0,$a,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,$a,$a,0,$a,0,0,$a,$a
+dcb 0,$a,$a,0,0,$a,$a,0,$a,0,0,$a,$a,0,$a,$a
+dcb 0,0,0,0,0,0,$a,$a,$a,$a,$a,$a,$a,$a,$a,$a
+dcb $a,$a,$a,$a,$a,$a,$a,$a,$a,$a,$a,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+
+*=$2000
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,$c,1,1,1
+dcb 0,0,0,0,0,0,0,0,0,0,0,1,1,1,$a,$a
+dcb 0,0,0,0,0,0,0,0,0,0,$c,1,1,1,1,1
+dcb 1,1,$c,0,0,0,0,0,0,0,0,0,1,1,0,0
+dcb 0,0,0,0,0,0,0,0,$c,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,$c,0,0,0,0,0,1,1,1,1,0
+dcb 0,0,0,0,0,0,$c,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,1,$c,0,0,0,0,1,1,1,1,0
+dcb 0,0,0,0,0,$c,1,1,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,1,1,1,$c,0,0,1,1,0,0
+dcb 0,0,$c,1,1,1,1,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+       
\ No newline at end of file
diff --git a/hacks/images/m6502/selfmodify.asm b/hacks/images/m6502/selfmodify.asm
new file mode 100644 (file)
index 0000000..f7bb646
--- /dev/null
@@ -0,0 +1,12 @@
+; A very simple example of
+; self-modifying code
+; and code entry points
+
+  lda $fe
+  sta $1001
+  jmp $1000
+
+  *=$1000
+  lda #$00
+  sta $3ef
+  jmp $600
diff --git a/hacks/images/m6502/sierpinsky.asm b/hacks/images/m6502/sierpinsky.asm
new file mode 100644 (file)
index 0000000..6a67906
--- /dev/null
@@ -0,0 +1,131 @@
+; 6502 assembler Sierpinsky Triangle ver.2
+; by Magnus Wedmark 2007-05-02
+; This program is especially written for
+; the 6502asm.com competition and 
+; uses the 32*32 pixel display used in that
+; virtual platform. The sierpinsky 
+; fractal is one of the simplest to
+; implement. Here is a walk-through:
+; 1) Specify 3 points that form a triangle
+; 2) Choose one of them as a starting point
+; 3) Choose one of them as targetpoint randomly
+; 4) Set the new current position half-way 
+;    between the current point and the target 
+;    point.
+; 5) Goto 3
+       
+       LDX #0
+       LDY #0
+new_rnd:
+       LDA $FE       ; random 0-255
+       AND #3        ; only 0-3 left
+       CMP #3
+       BNE good_rnd
+       JMP new_rnd
+good_rnd:     
+; random = 0-2
+       PHA
+; transform X and Y values according to: 
+; X=X/2+(P*8) and Y=Y/2+(P*16)
+       ASL
+       ASL
+       ASL
+       STA $F3 ; P*8
+       PLA
+       AND #1
+       ASL
+       ASL
+       ASL
+       ASL
+       STA $F4 ; (P AND 1)*16
+       TXA
+       LSR
+       ADC $F3
+       TAX
+       TYA
+       LSR
+       ADC $F4
+       TAY
+       JSR set_point   ; use and restore regs
+       JMP new_rnd
+
+set_point: ; uses both X,Y,A and restores them
+       PHA ; backup all reg-value (X,Y,A)
+       TXA
+       PHA
+       TYA
+       PHA 
+       PHA 
+       PHA ; triple Y push, two for int. use
+       STX $F2  ; transfer X to Y using $F2
+       LDY $F2
+       LDA #0
+       STA $F0
+       LDA #$2
+       STA $F1 ; set base vector to $200
+       LDA #0
+       PLA  ; transfer the pushed Y-coord to A
+       AND #$07 ; the value %0000'0111
+       ASL
+       ASL
+       ASL
+       ASL
+       ASL
+       CLC
+       ADC $F0
+       STA $F0
+       BCC no_carry
+       INC $F1
+no_carry:
+       CLC
+       PLA ; transfer the pushed Y-coord to A
+       AND #$18
+       LSR
+       LSR
+       LSR
+       ADC $F1
+       STA $F1         
+
+       CLC
+       TYA
+       ADC $F0
+       ADC $F1
+
+       LDA #1 ;1 = white for trouble-shooting
+       JSR set_toning_point ; use for shading
+       STA ($F0),Y  ; set pixel
+       PLA  ; restore all reg-value (X,Y,A)
+       TAY
+       PLA
+       TAX
+       PLA
+       RTS
+
+; sub routine to shade the current pixel ($F0),Y
+; lighter on a scale: $0, $B, $C, $F, $1 
+; Black, DarkGrey, Grey, LightGrey, White
+set_toning_point:
+        LDA ($F0),Y
+        CMP #$00
+        BNE not_black
+        LDA #$0B
+        RTS
+not_black:
+        CMP #$0B
+        BNE not_dgrey
+        LDA #$0C
+        RTS
+not_dgrey:
+        CMP #$0C
+        BNE not_grey
+        LDA #$0F
+        RTS
+not_grey:
+        CMP #$0F
+        BNE not_lgrey
+        LDA #$01
+        RTS
+not_lgrey:
+; white stays white
+        RTS
+
diff --git a/hacks/images/m6502/spacer.asm b/hacks/images/m6502/spacer.asm
new file mode 100644 (file)
index 0000000..bdecbb5
--- /dev/null
@@ -0,0 +1,235 @@
+; "spacer", move a space ship through an\r
+; endless tunnel.  You die once you hit\r
+; the walls.\r
+;\r
+; Controls:\r
+;\r
+;   W - move up\r
+;   X - move down\r
+;   Any other key will stop the ship\r
+;\r
+; Ps: this game runs awfully slow =)\r
+;\r
+\r
+start:\r
+  jsr init\r
+\r
+loop:\r
+       ;;   jsr drawShip                       \r
+  jsr drawMap\r
+  jsr genMap\r
+  jsr readKeys\r
+  jmp loop\r
+\r
+;--\r
+\r
+drawShip:\r
+  lda $82                      ; mychange\r
+;  asl                         \r
+  tay\r
+\r
+  lda ypos,y\r
+  sta $00\r
+  iny\r
+  lda ypos,y\r
+  sta $01\r
+\r
+  ldx #42\r
+  lda ($00,x)\r
+  cmp #0\r
+  beq noCrash\r
+  cmp #5\r
+;  bne crashed \r
+;my changes\r
+noCrash:\r
+  lda #5\r
+  sta ($00,x)\r
+\r
+  lda $60\r
+  cmp $61\r
+  beq ret\r
+\r
+  lda $61\r
+  asl\r
+  tay\r
+  lda ypos,y\r
+  sta $00\r
+  iny\r
+  lda ypos,y\r
+  sta $01\r
+  lda #0\r
+  ldx #42\r
+  sta ($00,x)\r
+\r
+  lda $60\r
+  sta $61\r
+ret:\r
+  rts\r
+\r
+;--\r
+\r
+crashed:\r
+  lda $fe\r
+  sta ($00,x)\r
+  jmp crashed\r
+\r
+;--\r
+\r
+readKeys:\r
+  lda $ff\r
+  cmp #119\r
+  bne notUp\r
+  dec $60\r
+  rts\r
+notUp:\r
+  cmp #120\r
+  bne noMove\r
+  inc $60\r
+noMove:\r
+  rts\r
+\r
+;--\r
+\r
+init:\r
+  ldx #0\r
+drawLogo:\r
+  lda bottomLogo,x\r
+  sta $500,x\r
+  inx\r
+  cpx #0\r
+  bne drawLogo\r
+\r
+  lda #10\r
+  sta $60\r
+  sta $61\r
+\r
+  ldx #0\r
+  lda #$c\r
+c:sta $200,x\r
+  sta $400,x\r
+  dex\r
+  cpx #0\r
+  bne c\r
+\r
+  lda #16\r
+  sta $80  ; origin\r
+  ldx #15\r
+set:\r
+  sta $81,x  ; target\r
+  dex\r
+  bpl set\r
+  rts\r
+\r
+;--\r
+\r
+drawMap:\r
+  lda #0\r
+  sta $78\r
+  lda #32\r
+  sta $79\r
+  lda #192\r
+  sta $7a\r
+  lda #224\r
+  sta $7b\r
+\r
+  ldx #15\r
+drawLoop:\r
+  lda $81,x\r
+  sta $82,x\r
+  tay\r
+  lda ypos,y\r
+  sta $00\r
+  iny\r
+  lda ypos,y\r
+  sta $01\r
+\r
+  lda #$c\r
+  ldy $78\r
+  sta ($00),y\r
+  iny\r
+  sta ($00),y\r
+\r
+  ldy $7b\r
+  sta ($00),y\r
+  iny\r
+  sta ($00),y\r
+\r
+  ldy $79\r
+  lda #0\r
+  sta ($00),y\r
+  iny\r
+  sta ($00),y\r
+\r
+  ldy $7a\r
+  sta ($00),y\r
+  iny\r
+  sta ($00),y\r
+\r
+  inc $78\r
+  inc $79\r
+  inc $7a\r
+  inc $7b\r
+  inc $78\r
+  inc $79\r
+  inc $7a\r
+  inc $7b\r
+  dex\r
+  bpl drawLoop\r
+  rts\r
+\r
+;---\r
+\r
+genMap:\r
+  lda $80\r
+  cmp $81\r
+  beq done\r
+  lda $80\r
+  clc\r
+  sbc $81\r
+  bpl plus\r
+  bmi minus\r
+done:\r
+  lda $fe\r
+  and #$f\r
+  asl\r
+  sta $80\r
+  rts\r
+minus:\r
+  dec $81\r
+  dec $81\r
+  rts\r
+plus:\r
+  inc $81\r
+  inc $81\r
+  rts\r
+\r
+ypos:\r
+  dcb $00,$02,$20,$02,$40,$02,$60,$02\r
+  dcb $80,$02,$a0,$02,$c0,$02,$e0,$02\r
+  dcb $00,$03,$20,$03,$40,$03,$60,$03\r
+  dcb $80,$03,$a0,$03,$c0,$03,$e0,$03\r
+  dcb $00,$04,$20,$04,$40,$04,$60,$04\r
+  dcb $80,$04,$a0,$04,$c0,$04,$e0,$04\r
+  dcb $00,$05,$20,$05,$40,$05,$60,$05\r
+  dcb $80,$05,$a0,$05,$c0,$05,$e0,$05\r
+\r
+bottomLogo:\r
+  dcb $0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0\r
+  dcb $0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0\r
+  dcb $0,$0,$0,$0,$0,$0,$1,$1,$1,$6,$1,$1,$1,$0\r
+  dcb $0,$6,$1,$1,$6,$0,$0,$1,$1,$1,$6,$0,$1,$1\r
+  dcb $1,$0,$1,$1,$1,$6,$0,$0,$6,$1,$6,$0,$6,$0\r
+  dcb $1,$0,$6,$1,$6,$1,$6,$0,$1,$0,$1,$0,$6,$0\r
+  dcb $6,$1,$6,$0,$6,$0,$1,$0,$6,$1,$6,$0,$0,$6\r
+  dcb $1,$1,$6,$6,$1,$1,$1,$0,$6,$1,$0,$0,$1,$0\r
+  dcb $1,$6,$0,$6,$6,$1,$1,$1,$0,$6,$1,$0,$6,$1\r
+  dcb $0,$6,$6,$6,$6,$6,$1,$6,$1,$1,$6,$6,$6,$1\r
+  dcb $1,$1,$1,$6,$1,$6,$6,$6,$6,$1,$6,$6,$6,$6\r
+  dcb $1,$1,$1,$6,$6,$6,$6,$1,$1,$1,$1,$e,$1,$1\r
+  dcb $e,$6,$6,$1,$1,$6,$1,$6,$1,$1,$1,$1,$e,$1\r
+  dcb $1,$1,$1,$6,$1,$1,$6,$1,$6,$6,$6,$1,$1,$1\r
+  dcb $6,$e,$1,$1,$6,$e,$6,$1,$1,$e,$1,$e,$6,$1\r
+  dcb $1,$1,$6,$e,$1,$1,$1,$e,$1,$1,$6,$1,$6,$e\r
+  dcb $e,$e,$6,$e,$e,$6,$e,$e,$6,$e,$e,$6,$e,$e\r
+  dcb $6,$e,$e,$6,$e,$e,$6,$e,$e,$6,$e,$e,$6,$e\r
+  dcb $e,$6,$e,$e\r
diff --git a/hacks/images/m6502/wave6502.asm b/hacks/images/m6502/wave6502.asm
new file mode 100644 (file)
index 0000000..b40ea66
--- /dev/null
@@ -0,0 +1,164 @@
+;;; 6502 logo Jeremy English 12-January-2008
+
+start:
+ldx #0
+stx $20
+lda #5
+sta $21
+lda $fe
+sta $22
+
+loop:
+dec $21
+lda $21
+beq randcolor
+jmp pastrandcolor
+
+randcolor:
+lda #5
+sta $21
+ldx #33
+inc $22
+lda $22
+and #7
+tay
+rl:
+lda $1000,x
+beq pastcolor1
+lda color_row,y
+sta $1000,x
+
+pastcolor1:
+lda $1040,x
+beq pastcolor2
+lda color_row,y
+sta $1040,x
+
+pastcolor2:
+lda $1080,x
+beq pastcolor3
+lda color_row,y
+sta $1080,x
+
+pastcolor3:
+lda $10c0,x
+beq pastcolor4
+lda color_row,y
+sta $10c0,x
+
+pastcolor4:
+lda $1100,x
+beq pastcolor5
+lda color_row,y
+sta $1100,x
+
+pastcolor5:
+lda $1140,x
+beq pastcolor6
+lda color_row,y
+sta $1140,x
+
+pastcolor6:
+lda $1180,x
+beq pastcolor7
+lda color_row,y
+sta $1180,x
+
+pastcolor7:
+lda $11C0,x
+beq pastcolor8
+lda color_row,y
+sta $11C0,x
+
+pastcolor8:
+lda $1200,x
+beq pastcolor9
+lda color_row,y
+sta $1200,x
+
+pastcolor9:
+inx
+txa
+and #$3f
+bne rl
+
+pastrandcolor:
+
+inc $20
+lda $20
+and #$3f
+tay
+and #$1f
+tax
+lda sinus,x
+tax
+
+d:
+
+lda #0
+sta $2e0,x
+sta $3e0,x
+lda $1000,y
+sta $300,x
+lda $1080,y
+sta $320,x
+lda $1100,y
+sta $340,x
+lda $1180,y
+sta $360,x
+lda $1200,y
+sta $380,x
+lda $1280,y
+sta $3a0,x
+lda $1300,y
+sta $3c0,x
+lda $1380,y
+sta $3c0,x
+inx
+iny
+txa
+and #$1f
+bne d
+
+jmp loop
+
+; 32 ($20) long
+sinus:
+dcb 0,0,0,0,$20,$20,$20
+dcb $40,$40,$60,$80,$a0,$a0,$c0,$c0,$c0
+dcb $e0,$e0,$e0,$e0,$c0,$c0,$c0
+dcb $a0,$a0,$80,$60,$40,$40,$20,$20,$20
+
+color_row:
+dcb $7,$8,$9,$2,$4,$6,$e,$3
+
+
+*=$1000
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1
+dcb 0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1
+dcb 0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0
+dcb 0,0,1,1,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,1
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0
+dcb 0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,0,0,1,1
+dcb 0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1
+dcb 0,0,1,1,1,1,1,1,0,0,1,1,0,0,1,1,0,0,1,1,1,1,1,1
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,1
+dcb 0,0,1,1,0,0,1,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,1,1,0,0,1,1,0,0,0,0,0,0,1,1,0,0,1,1,0,0,1,1
+dcb 0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1
+dcb 0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1
+dcb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1
+dcb 0,0,1,1,1,1,1,1,0,0,1,1,1,1,1,1
+
diff --git a/hacks/images/m6502/zookeeper.asm b/hacks/images/m6502/zookeeper.asm
new file mode 100644 (file)
index 0000000..b3e3bd2
--- /dev/null
@@ -0,0 +1,109 @@
+; We all love zookeeper !!!!
+; muhmi Nov 13, 2007 9:45 am 
+
+ldx #0
+lda #0
+hupsu:
+sta $200,x
+sta $300,x
+sta $400,x
+sta $500,x
+bne hupsu
+
+
+lda #1
+ldx #0
+fill:
+txa
+tay
+lda seko,x
+tax
+lda kuva,x
+sta $200,x
+lda kuva_0,x
+sta $300,x
+lda kuva_1,x
+sta $400,x
+lda kuva_2,x
+sta $500,x
+tya
+tax
+inx
+bne fill
+
+rts
+
+seko:
+dcb 46,93,219,97,168,170,196,63,204,201,206
+dcb 56,238,25,2,186,209,191,138,226,80,128
+dcb 58,171,81,115,42,44,102,193,69,231,107
+dcb 78,5,218,103,11,13,221,130,149,16,227
+dcb 105,213,232,182,17,255,27,190,205,137,192
+dcb 222,233,94,52,229,96,18,220,202,122,166
+dcb 43,153,131,246,177,4,70,22,7,86,173
+dcb 141,151,164,32,143,40,156,185,121,132,165
+dcb 62,249,252,139,154,251,85,236,12,134,245
+dcb 184,39,195,119,242,244,162,74,1,77,51
+dcb 33,75,35,76,34,10,89,47,189,237,71
+dcb 159,9,38,101,180,116,147,140,183,157,123
+dcb 14,19,126,199,100,45,241,28,125,210,155
+dcb 41,254,31,144,55,247,111,95,57,53,223
+dcb 152,108,203,36,214,37,113,200,66,67,197
+dcb 29,250,20,212,68,87,207,163,145,211,48
+dcb 136,24,98,215,169,83,124,224,181,187,142
+dcb 84,240,54,110,234,59,243,79,50,30,114
+dcb 6,178,0,172,148,146,179,120,60,225,65
+dcb 230,208,15,72,117,248,198,106,129,92,127
+dcb 175,160,49,216,176,133,64,109,112,82,90
+dcb 235,104,158,194,8,161,167,88,91,174,23
+dcb 73,118,150,3,99,61,217,26,239,21,253
+dcb 135,188,228
+
+kuva:
+dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0
+dcb 0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1
+dcb 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
+dcb 0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1
+dcb 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,11,11
+dcb 11,0,0,0,0,0,0,1,0,0,0,11,11,11,0,0,0,0,0,1,1,1,1,1
+dcb 1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
+kuva_0:
+dcb 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1
+dcb 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1
+dcb 1,0,0,0,1,1,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0
+dcb 0,1,15,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1
+dcb 0,0,0,0,0,0,0,0,0,0,15,0,0,0,1,1,1,0,0,0,1,0,0,0
+dcb 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,15,0,0,0,1,1
+dcb 1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,1,0,0,0,1,1,1,0,0
+dcb 0,0,15,0,0,0,1,1,1,0,0,0,1,0,0,0,0,1,1,1,0,0,0,1
+dcb 0,0,0,1,1,1,0,0,0,0,1,0,0,0,1,1
+kuva_1:
+dcb 1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0
+dcb 0,0,15,0,0,0,1,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1
+dcb 0,0,0,0,0,0,0,0,0,0,15,0,0,0,1,1,1,0,0,0,1,1,0,0
+dcb 0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,1,1
+dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1
+dcb 1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0
+dcb 1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1
+dcb 1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,1
+dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,15,15,15,1,1,1,1,1,1,1,1
+dcb 1,1,15,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,15,15,15
+dcb 1,1,1,1,1,1,1,1,1,1,15,0,0,0,1,1
+kuva_2:
+dcb 1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
+dcb 1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,15,15,0
+dcb 15,15,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1
+dcb 1,1,1,1,1,15,15,0,15,15,1,1,1,1,1,1,1,1,1,0,0,0,1,1
+dcb 1,0,0,0,15,1,1,1,1,1,1,1,1,15,15,0,1,1,1,1,1,1,1,1
+dcb 1,1,1,0,0,0,1,1,1,0,0,0,0,15,15,15,15,15,15,1,15,1,1,1
+dcb 1,1,15,1,15,15,15,1,1,15,0,0,0,0,1,1,1,0,0,0,0,15,15,15
+dcb 15,15,15,1,15,1,1,1,1,1,15,1,15,15,15,1,1,15,0,0,0,0,1,1
+dcb 1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0
+dcb 0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1
index e0449f9b3c66ae735b678ce98a97b5b9b9233bd2..6e1f31dded435a8f7bbc437cc2dead2c62546155 100644 (file)
@@ -1,4 +1,4 @@
-/* imsmap, Copyright (c) 1992 Juergen Nickelsen <nickel@cs.tu-berlin.de>
+/* imsmap, Copyright (c) 1992-2008 Juergen Nickelsen and Jamie Zawinski.
  * Derived from code by Markus Schirmer, TU Berlin.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -162,22 +162,19 @@ init_map (struct state *st)
   if (mono_p)
     st->flip_xy = 0;
 
-  if (!st->ncolors)
-    {
-      st->ncolors = get_integer_resource (st->dpy, "ncolors", "Integer");
-      st->delay = get_integer_resource (st->dpy, "delay", "Integer");
-      st->delay2 = get_integer_resource (st->dpy, "delay2", "Integer");
-      st->iterations = get_integer_resource (st->dpy, "iterations", "Integer");
-      if (st->iterations < 0) st->iterations = 0;
-      else if (st->iterations > 7) st->iterations = 7;
-
-      if (st->ncolors <= 2) st->ncolors = 0;
-      if (st->ncolors == 0) mono_p = True;
-      if (st->ncolors > 255) st->ncolors = 255;  /* too many look bad */
-
-      st->gc  = XCreateGC (st->dpy, st->window, 0, &gcv);
-      st->gc2 = XCreateGC (st->dpy, st->window, 0, &gcv);
-    }
+  st->ncolors = get_integer_resource (st->dpy, "ncolors", "Integer");
+  st->delay = get_integer_resource (st->dpy, "delay", "Integer");
+  st->delay2 = get_integer_resource (st->dpy, "delay2", "Integer");
+  st->iterations = get_integer_resource (st->dpy, "iterations", "Integer");
+  if (st->iterations < 0) st->iterations = 0;
+  else if (st->iterations > 7) st->iterations = 7;
+
+  if (st->ncolors <= 2) st->ncolors = 0;
+  if (st->ncolors == 0) mono_p = True;
+  if (st->ncolors > 255) st->ncolors = 255;  /* too many look bad */
+
+  if (!st->gc)  st->gc  = XCreateGC (st->dpy, st->window, 0, &gcv);
+  if (!st->gc2) st->gc2 = XCreateGC (st->dpy, st->window, 0, &gcv);
 
   if (mono_p)
     st->extra_krinkly_p = !(random() % 15);
@@ -218,7 +215,8 @@ init_map (struct state *st)
     }
 
   XSetForeground (st->dpy, st->gc, st->colors[1].pixel);
-  XFillRectangle (st->dpy, st->window, st->gc, 0, 0, st->xgwa.width, st->xgwa.height);
+  XFillRectangle (st->dpy, st->window, st->gc, 0, 0, 
+                  st->xgwa.width, st->xgwa.height);
 
   if (st->flip_xy)
     {
index 7634d3e5f11720a62c15e29ee7c5f3969d17ba67..8a26ec9a5091ffc5a63282c0af8e78dbf45d39f4 100644 (file)
@@ -2614,7 +2614,8 @@ init_juggle (ModeInfo * mi)
   sp->scale = MIN(MI_HEIGHT(mi)/480.0, MI_WIDTH(mi)/160.0);
 
   if(describe && !sp->mode_font) { /* Check to see if there's room to describe patterns. */
-       sp->mode_font = XQueryFont(MI_DISPLAY(mi), XGContextFromGC(MI_GC(mi)));
+    char *font = get_string_resource (MI_DISPLAY(mi), "font", "Font");
+       sp->mode_font = XLoadQueryFont(MI_DISPLAY(mi), font);
   }
 }
 
diff --git a/hacks/lcdscrub b/hacks/lcdscrub
new file mode 100755 (executable)
index 0000000..889a37f
Binary files /dev/null and b/hacks/lcdscrub differ
diff --git a/hacks/lcdscrub.c b/hacks/lcdscrub.c
new file mode 100644 (file)
index 0000000..700de61
--- /dev/null
@@ -0,0 +1,158 @@
+/* xscreensaver, Copyright (c) 2008 Jamie Zawinski <jwz@jwz.org>
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and its
+ * documentation for any purpose is hereby granted without fee, provided that
+ * the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation.  No representations are made about the suitability of this
+ * software for any purpose.  It is provided "as is" without express or 
+ * implied warranty.
+ *
+ * Draws repetitive patterns that should undo burned in LCD screens.
+ * Concept shamelessly cloned from
+ * http://toastycode.com/blog/2008/02/05/lcd-scrub/
+ */
+
+#include "screenhack.h"
+
+struct state {
+  Display *dpy;
+  Window window;
+  XWindowAttributes xgwa;
+  enum { HORIZ_W, HORIZ_B, 
+         VERT_W, VERT_B, 
+         DIAG_W, DIAG_B, 
+         WHITE, BLACK,
+         END } mode;
+  int count;
+  GC fg, bg;
+  int delay;
+  int spread;
+  int cycles;
+};
+
+
+static void *
+lcdscrub_init (Display *dpy, Window window)
+{
+  struct state *st = (struct state *) calloc (1, sizeof(*st));
+  XGCValues gcv;
+  st->dpy = dpy;
+  st->window = window;
+  st->delay  = get_integer_resource (st->dpy, "delay",  "Integer");
+  st->spread = get_integer_resource (st->dpy, "spread", "Integer");
+  st->cycles = get_integer_resource (st->dpy, "cycles", "Integer");
+
+  XGetWindowAttributes (st->dpy, st->window, &st->xgwa);
+  gcv.foreground = BlackPixelOfScreen (st->xgwa.screen);
+  gcv.background = WhitePixelOfScreen (st->xgwa.screen);
+  st->bg = XCreateGC (st->dpy, st->window, GCForeground, &gcv);
+  gcv.foreground = WhitePixelOfScreen (st->xgwa.screen);
+  gcv.background = BlackPixelOfScreen (st->xgwa.screen);
+  st->fg = XCreateGC (st->dpy, st->window, GCForeground, &gcv);
+
+#ifdef HAVE_COCOA
+  jwxyz_XSetAntiAliasing (st->dpy, st->fg, False);
+  jwxyz_XSetAntiAliasing (st->dpy, st->bg, False);
+#endif
+
+  return st;
+}
+
+static unsigned long
+lcdscrub_draw (Display *dpy, Window window, void *closure)
+{
+  struct state *st = (struct state *) closure;
+  int count = st->count % st->spread;
+  int i;
+  GC fg = (st->mode & 1 ? st->fg : st->bg);
+  GC bg = (st->mode & 1 ? st->bg : st->fg);
+
+  switch (st->mode) {
+  case HORIZ_W:
+  case HORIZ_B:
+    XFillRectangle (st->dpy, st->window, bg, 0, 0,
+                    st->xgwa.width, st->xgwa.height);
+    for (i = count; i < st->xgwa.height; i += st->spread)
+      XDrawLine (st->dpy, st->window, fg, 0, i, st->xgwa.width, i);
+    break;
+  case VERT_W:
+  case VERT_B:
+    XFillRectangle (st->dpy, st->window, bg, 0, 0,
+                    st->xgwa.width, st->xgwa.height);
+    for (i = count; i < st->xgwa.width; i += st->spread)
+      XDrawLine (st->dpy, st->window, fg, i, 0, i, st->xgwa.height);
+    break;
+  case DIAG_W:
+  case DIAG_B:
+    XFillRectangle (st->dpy, st->window, bg, 0, 0,
+                    st->xgwa.width, st->xgwa.height);
+    for (i = count; i < st->xgwa.width; i += st->spread)
+      XDrawLine (st->dpy, st->window, fg, i, 0, 
+                 i + st->xgwa.width, st->xgwa.width);
+    for (i = -count; i < st->xgwa.height; i += st->spread)
+      XDrawLine (st->dpy, st->window, fg, 0, i,
+                 st->xgwa.height, i + st->xgwa.height);
+    break;
+  case WHITE:
+  case BLACK:
+    XFillRectangle (st->dpy, st->window, fg, 0, 0,
+                    st->xgwa.width, st->xgwa.height);
+    break;
+  default: 
+    abort(); 
+    break;
+  }
+
+  st->count++;
+
+  if (st->count > st->spread * st->cycles)
+    {
+      st->count = 0;
+      if (++st->mode == END)
+        st->mode = 0;
+    }
+
+  return st->delay;
+}
+
+static void
+lcdscrub_reshape (Display *dpy, Window window, void *closure, 
+                 unsigned int w, unsigned int h)
+{
+}
+
+static Bool
+lcdscrub_event (Display *dpy, Window window, void *closure, XEvent *event)
+{
+  return False;
+}
+
+static void
+lcdscrub_free (Display *dpy, Window window, void *closure)
+{
+  struct state *st = (struct state *) closure;
+  XFreeGC (dpy, st->fg);
+  XFreeGC (dpy, st->bg);
+  free (st);
+}
+
+
+static const char *lcdscrub_defaults [] = {
+  ".background:                black",
+  ".foreground:                white",
+  "*delay:             100000",
+  "*spread:            8",
+  "*cycles:            60",
+  0
+};
+
+static XrmOptionDescRec lcdscrub_options [] = {
+  { "-delay",          ".delay",       XrmoptionSepArg, 0 },
+  { "-spread",         ".spread",      XrmoptionSepArg, 0 },
+  { "-cycles",         ".cycles",      XrmoptionSepArg, 0 },
+  { 0, 0, 0, 0 }
+};
+
+
+XSCREENSAVER_MODULE ("LCDscrub", lcdscrub)
index 059d76299f496f8b84d6f8bb6029544a7e594b52..705af37c2304b9ec9815ded71bec6d0f1e6f2c62 100644 (file)
@@ -1,4 +1,4 @@
-/*
+/* -*- indent-tabs-mode:nil -*-
  * Copyright (c) 2007 Jeremy English <jhe@jeremyenglish.org>
  * 
  * Permission to use, copy, modify, distribute, and sell this software and its
 #include "analogtv.h"
 #include "asm6502.h"
 
+# ifdef __GNUC__
+  __extension__  /* don't warn about "string length is greater than the length
+                    ISO C89 compilers are required to support" when includng
+                    the following data file... */
+# endif
+const char * const demo_files[] = {
+# include "m6502.h"
+};
+
+
 /* We want to paint on a 32 by 32 grid of pixels. We will needed to
    divided the screen up into chuncks */
 enum {
@@ -42,7 +52,8 @@ struct state {
   int topb;/* top boarder */
   int field_ntsc[4];/* used for clearing the screen*/ 
   int dt;/* how long to wait before changing the demo*/
-  unsigned int pc;/* program counter */
+  int which;/* the program to run*/
+  int demos;/* number of demos included */
   struct timeval start_time; 
 };
 
@@ -53,582 +64,19 @@ plot6502(Bit8 x, Bit8 y, Bit8 color, void *closure)
   st->pixels[x][y] = color;
 }
 
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+
 static void 
 start_rand_bin_prog(machine_6502 *machine, struct state *st){
-  int r = random() % NUM_PROGS;
-
-  Bit8 noise[] =
-    {0xa0, 0xff, 0xa2, 0x00, 0xa5, 0xfe, 0x9d, 0x00, 0x02, 0x29, 
-     0x07, 0x9d, 0x00, 0x03, 0x29, 0x03, 0x9d, 0x00, 0x04, 0x29, 
-     0x01, 0x9d, 0x00, 0x05, 0xe8, 0x88, 0xd0, 0xe8, 0x60, 0x00};
-
-  Bit8 random[22] =
-    {0xa5, 0xfe, 0x85, 0x00, 0xa5, 0xfe, 0x29, 0x03, 0x18, 0x69,
-     0x02, 0x85, 0x01, 0xa5, 0xfe, 0xa0, 0x00, 0x91, 0x00, 0x4c,
-     0x00, 0x06};
-
-  Bit8 atari[629] =
-    {0xa9, 0x5c, 0x85, 0x00, 0xa9, 0x06, 0x85, 0x01, 0xa9, 0x00,
-     0x85, 0x02, 0xa9, 0x02, 0x85, 0x03, 0xa5, 0x03, 0xc9, 0x06,
-     0xd0, 0x01, 0x60, 0xa2, 0x00, 0xa1, 0x00, 0xc9, 0xff, 0xd0,
-     0x1a, 0xe8, 0xa1, 0x00, 0xa8, 0xe8, 0xa1, 0x00, 0xa2, 0x00,
-     0x81, 0x02, 0x20, 0x51, 0x06, 0x88, 0xd0, 0xf6, 0x20, 0x46,
-     0x06, 0x20, 0x46, 0x06, 0x4c, 0x10, 0x06, 0xa2, 0x00, 0x81,
-     0x02, 0x20, 0x51, 0x06, 0x20, 0x46, 0x06, 0x4c, 0x10, 0x06,
-     0xe6, 0x00, 0xa5, 0x00, 0xc9, 0x00, 0xd0, 0x02, 0xe6, 0x01,
-     0x60, 0xe6, 0x02, 0xa6, 0x02, 0xe0, 0x00, 0xd0, 0x02, 0xe6,
-     0x03, 0x60, 0xff, 0x2b, 0x01, 0x0f, 0x0f, 0x0f, 0x0c, 0x0f,
-     0x0f, 0x0f, 0xff, 0x18, 0x01, 0x0c, 0x0f, 0x0c, 0x00, 0x0c,
-     0x0f, 0x0c, 0xff, 0x18, 0x01, 0x00, 0x0f, 0x0c, 0x00, 0x0c,
-     0x0f, 0x0c, 0xff, 0x18, 0x01, 0x0c, 0x0f, 0x0c, 0x00, 0x0c,
-     0x0f, 0x0c, 0xff, 0x18, 0x01, 0x00, 0x0f, 0x0c, 0x00, 0x0c,
-     0x0f, 0x0c, 0xff, 0x18, 0x01, 0x0c, 0x0f, 0x00, 0x00, 0x0c,
-     0x0f, 0x0c, 0xff, 0x18, 0x01, 0x00, 0x0f, 0x0c, 0x00, 0x0c,
-     0x0f, 0x0c, 0xff, 0x18, 0x01, 0x00, 0x0f, 0x0c, 0x00, 0x0c,
-     0x0f, 0x00, 0xff, 0x18, 0x01, 0x00, 0x0f, 0x0c, 0x00, 0x0c,
-     0x0f, 0x00, 0xff, 0x17, 0x01, 0x0f, 0x00, 0x0f, 0x0c, 0x00,
-     0x0c, 0x0f, 0x00, 0x0f, 0xff, 0x16, 0x01, 0x0c, 0x00, 0x01,
-     0x0c, 0x00, 0x0c, 0x0f, 0x00, 0x0c, 0xff, 0x15, 0x01, 0x0f,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0xff,
-     0x15, 0x01, 0x0c, 0x00, 0x0c, 0x01, 0x0c, 0x00, 0x0c, 0x01,
-     0x0c, 0x00, 0x0c, 0xff, 0x13, 0x01, 0x0f, 0x00, 0x00, 0x0f,
-     0x01, 0x0c, 0x00, 0x0c, 0x01, 0x0f, 0x00, 0x00, 0x0f, 0xff,
-     0x11, 0x01, 0x0f, 0x00, 0x00, 0x00, 0x01, 0x01, 0x0c, 0x00,
-     0x0c, 0x01, 0x01, 0x00, 0x00, 0x00, 0xff, 0x10, 0x01, 0x0f,
-     0x00, 0x00, 0x00, 0x0f, 0x01, 0x01, 0x00, 0x00, 0x0c, 0x01,
-     0x01, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x0d, 0x01, 0x0c,
-     0x00, 0x00, 0x00, 0x0c, 0x01, 0x01, 0x01, 0x0c, 0x00, 0x0c,
-     0x01, 0x01, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0xff, 0x0a,
-     0x01, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x01, 0x01,
-     0x01, 0x00, 0x00, 0x0c, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x0c, 0xff, 0x08, 0x01, 0x00, 0x00, 0x00,
-     0x00, 0x0c, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x0c,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x00,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
-     0x00, 0x0c, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0c,
-     0x00, 0x0c, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0f, 0x0c,
-     0x00, 0x00, 0xff, 0x12, 0x01, 0x0f, 0xff, 0x35, 0x01, 0x00,
-     0x0f, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x0c,
-     0x0c, 0x01, 0x01, 0x01, 0x0c, 0x00, 0x00, 0x00, 0x01, 0x01,
-     0x00, 0x0f, 0x0f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x0c, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x0f, 0x01, 0x01,
-     0x0f, 0x00, 0x00, 0x0f, 0x01, 0x01, 0x00, 0x0f, 0x01, 0x0c,
-     0x0c, 0x01, 0x00, 0x0f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x00, 0x0f, 0x00, 0x0f, 0x01, 0x01, 0x00, 0x0f,
-     0x01, 0x01, 0x0f, 0x0c, 0x0c, 0x0c, 0x01, 0x01, 0x00, 0x01,
-     0x01, 0x0f, 0x00, 0x01, 0x00, 0x0f, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x0c, 0x0f, 0x01, 0x01,
-     0x0c, 0x0f, 0x01, 0x01, 0x00, 0x0f, 0x0f, 0x00, 0x01, 0x01,
-     0x00, 0x0f, 0x0f, 0x00, 0x0f, 0x01, 0x00, 0x0f, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x0c, 0x00, 0x0c, 0x00, 0x00,
-     0x01, 0x01, 0x00, 0x0f, 0x01, 0x01, 0x00, 0x0c, 0x0c, 0x00,
-     0x0f, 0x01, 0x00, 0x0f, 0x00, 0x0f, 0x01, 0x01, 0x00, 0x0f,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x0c, 0x0f,
-     0x0f, 0x00, 0x0f, 0x01, 0x0c, 0x0f, 0x01, 0x0c, 0x0c, 0x0f,
-     0x0f, 0x0c, 0x0c, 0x01, 0x00, 0x01, 0x0f, 0x0c, 0x01, 0x01,
-     0x00, 0x0f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0f, 0x00,
-     0x01, 0x01, 0x01, 0x0c, 0x0c, 0x01, 0x00, 0x0f, 0x01, 0x00,
-     0x0f, 0x01, 0x01, 0x0f, 0x00, 0x01, 0x00, 0x0f, 0x01, 0x00,
-     0x0f, 0x01, 0x00, 0x0f, 0xff, 0x10, 0x01, 0x0f, 0xff, 0x05,
-     0x01, 0x0f, 0x01, 0x01, 0x01, 0x0f, 0xff, 0x26, 0x01};
-  
-  Bit8 c64[1076] =
-    {0xa9, 0x34, 0x85, 0x00, 0xa9, 0x06, 0x85, 0x01, 0xa9, 0x00,
-     0x85, 0x02, 0xa9, 0x02, 0x85, 0x03, 0xa2, 0x00, 0xa1, 0x00,
-     0x81, 0x02, 0xe6, 0x00, 0xa5, 0x00, 0xc9, 0x00, 0xd0, 0x02,
-     0xe6, 0x01, 0xe6, 0x02, 0xa5, 0x02, 0xc9, 0x00, 0xd0, 0x08,
-     0xa5, 0x03, 0xc9, 0x05, 0xf0, 0x05, 0xe6, 0x03, 0x4c, 0x12,
-     0x06, 0x60, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02,
-     0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02,
-     0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
-     0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, 0x02,
-     0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01, 0x01, 0x01, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02,
-     0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, 0x01,
-     0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x06,
-     0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-     0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x01, 0x01, 0x01, 0x01, 0x01, 0x01};
-  
-  Bit8 demoscene[2109] =
-    {0xa2, 0x00, 0xbd, 0x1c, 0x0e, 0xc9, 0xff, 0xf0, 0x0a, 0x9d,
-     0xe0, 0x04, 0x9d, 0xe0, 0x05, 0xe8, 0x4c, 0x02, 0x06, 0x20,
-     0xbd, 0x06, 0xa9, 0x00, 0x85, 0x10, 0x85, 0x11, 0x20, 0xd0,
-     0x06, 0x20, 0x4e, 0x06, 0x20, 0x28, 0x06, 0x4c, 0x1c, 0x06,
-     0xa2, 0x00, 0xbd, 0x21, 0x05, 0x9d, 0x20, 0x05, 0xbd, 0x41,
-     0x05, 0x9d, 0x40, 0x05, 0xbd, 0x61, 0x05, 0x9d, 0x60, 0x05,
-     0xbd, 0x81, 0x05, 0x9d, 0x80, 0x05, 0xbd, 0xa1, 0x05, 0x9d,
-     0xa0, 0x05, 0xe8, 0xe0, 0x1f, 0xd0, 0xdd, 0x60, 0xa5, 0x10,
-     0xc9, 0x00, 0xd0, 0x0d, 0xe6, 0x11, 0xa6, 0x11, 0xbd, 0xf0,
-     0x09, 0xaa, 0xbd, 0xd4, 0x09, 0x85, 0x10, 0xc6, 0x10, 0xa6,
-     0x11, 0xbd, 0xf0, 0x09, 0xc9, 0xff, 0xd0, 0x07, 0xa9, 0x00,
-     0x85, 0x10, 0x85, 0x11, 0x60, 0x0a, 0xaa, 0xbd, 0x64, 0x0a,
-     0x85, 0x02, 0xe8, 0xbd, 0x64, 0x0a, 0x85, 0x03, 0xa9, 0x9c,
-     0x18, 0x65, 0x02, 0x85, 0x00, 0xa9, 0x0a, 0x65, 0x03, 0x85,
-     0x01, 0xa6, 0x10, 0xa1, 0x00, 0x8d, 0x3f, 0x05, 0x8a, 0x18,
-     0x69, 0x06, 0xaa, 0xa1, 0x00, 0x8d, 0x5f, 0x05, 0x8a, 0x18,
-     0x69, 0x06, 0xaa, 0xa1, 0x00, 0x8d, 0x7f, 0x05, 0x8a, 0x18,
-     0x69, 0x06, 0xaa, 0xa1, 0x00, 0x8d, 0x9f, 0x05, 0x8a, 0x18,
-     0x69, 0x06, 0xaa, 0xa1, 0x00, 0x8d, 0xbf, 0x05, 0x60, 0xa9,
-     0xf3, 0x85, 0x20, 0xa9, 0x06, 0x85, 0x21, 0xa9, 0x00, 0x85,
-     0x22, 0xa9, 0x02, 0x85, 0x23, 0xa2, 0x00, 0x60, 0xa1, 0x20,
-     0xc9, 0xff, 0xf0, 0x1c, 0x81, 0x22, 0xe6, 0x20, 0xa5, 0x20,
-     0xc9, 0x00, 0xd0, 0x02, 0xe6, 0x21, 0xe6, 0x22, 0xa5, 0x22,
-     0xc9, 0x00, 0xd0, 0x08, 0xa5, 0x23, 0xc9, 0x05, 0xf0, 0x02,
-     0xe6, 0x23, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x0b, 0x0b, 0x0c, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
-     0x0b, 0x00, 0x00, 0x00, 0x0b, 0x0b, 0x0c, 0x0c, 0x0f, 0x0f,
-     0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x0b, 0x0c, 0x0c, 0x0f, 0x0c, 0x0f,
-     0x0f, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x00, 0x0b, 0x0b, 0x0c,
-     0x0f, 0x0f, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x0c, 0x0b, 0x0f, 0x0c,
-     0x0f, 0x0f, 0x0c, 0x0c, 0x0b, 0x00, 0x0b, 0x0c, 0x0c, 0x0c,
-     0x0f, 0x0f, 0x01, 0x0f, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0b, 0x0c,
-     0x0c, 0x0c, 0x0f, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
-     0x0c, 0x0f, 0x0c, 0x0f, 0x0f, 0x0f, 0x0f, 0x0b, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00,
-     0x00, 0x0b, 0x0c, 0x0c, 0x0f, 0x0f, 0x0f, 0x0f, 0x0c, 0x0f,
-     0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x01, 0x0f, 0x0f, 0x0c,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x0b, 0x0b, 0x0b, 0x0c, 0x0f, 0x0f, 0x01, 0x0f,
-     0x0f, 0x0c, 0x0f, 0x0f, 0x0f, 0x01, 0x0f, 0x0f, 0x0f, 0x0f,
-     0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0f,
-     0x01, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x01,
-     0x0f, 0x0f, 0x0f, 0x0f, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x00, 0x0b, 0x0c, 0x0b,
-     0x0c, 0x0c, 0x01, 0x01, 0x0f, 0x01, 0x0f, 0x01, 0x0f, 0x01,
-     0x0f, 0x0f, 0x01, 0x0f, 0x0f, 0x01, 0x0b, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0b, 0x0b, 0x0c,
-     0x0c, 0x0b, 0x0c, 0x0f, 0x01, 0x01, 0x01, 0x0f, 0x0f, 0x01,
-     0x0f, 0x0f, 0x01, 0x0f, 0x0f, 0x0f, 0x0f, 0x01, 0x0c, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0b,
-     0x0c, 0x0c, 0x0c, 0x0b, 0x0c, 0x0c, 0x0f, 0x01, 0x01, 0x01,
-     0x0f, 0x0f, 0x01, 0x0f, 0x01, 0x0f, 0x01, 0x0f, 0x0f, 0x01,
-     0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0b,
-     0x0b, 0x0c, 0x0c, 0x0c, 0x0f, 0x0c, 0x0c, 0x0f, 0x0f, 0x01,
-     0x01, 0x01, 0x01, 0x0f, 0x0f, 0x0f, 0x01, 0x0f, 0x01, 0x0f,
-     0x0f, 0x0f, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x0b, 0x0c, 0x0c, 0x0c, 0x0f, 0x0c, 0x0f, 0x0c, 0x0f,
-     0x0f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0f, 0x0f, 0x01, 0x0f,
-     0x0f, 0x0f, 0x0f, 0x01, 0x0f, 0x0b, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c, 0x0f, 0x0c, 0x0f, 0x0f,
-     0x0c, 0x0f, 0x0f, 0x01, 0x01, 0x01, 0x01, 0x01, 0x0f, 0x0f,
-     0x0f, 0x01, 0x0f, 0x0f, 0x0f, 0x01, 0x0c, 0x0b, 0x0b, 0x00,
-     0x00, 0x00, 0x00, 0x0b, 0x0b, 0x0c, 0x0f, 0x0c, 0x0f, 0x0f,
-     0x0f, 0x0f, 0x0f, 0x0c, 0x0f, 0x01, 0x01, 0x01, 0x01, 0x01,
-     0x0f, 0x0f, 0x0f, 0x01, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0b,
-     0x0b, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0c, 0x0c, 0x0c, 0x0f,
-     0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x01, 0x01,
-     0x01, 0x0f, 0x0b, 0x0f, 0x0f, 0x0f, 0x01, 0x0f, 0x0f, 0x0f,
-     0x0f, 0x0b, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0c, 0x0c,
-     0x0f, 0x0c, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
-     0x0f, 0x0f, 0x0c, 0x0b, 0x0f, 0x0f, 0x01, 0x0f, 0x0f, 0x0f,
-     0x0f, 0x0f, 0x0f, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x0b,
-     0x0b, 0x0c, 0x0c, 0x0f, 0x0c, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
-     0x0f, 0x0c, 0x0c, 0x0b, 0x0c, 0x0c, 0x0f, 0x0f, 0x01, 0x0c,
-     0x0c, 0x0f, 0x0f, 0x0f, 0x0f, 0x0c, 0x0b, 0x00, 0x00, 0x00,
-     0x00, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x0f, 0x0f,
-     0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x01, 0x0f,
-     0x0c, 0x0b, 0x0f, 0x0c, 0x0f, 0x0c, 0x0f, 0x0c, 0x0b, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0f,
-     0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
-     0x0c, 0x0b, 0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x0c, 0x0f, 0x0c,
-     0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0b, 0x0c, 0x0c,
-     0x0c, 0x0c, 0x0c, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f,
-     0x0c, 0x0b, 0x0b, 0x0c, 0x0c, 0x0c, 0x0f, 0x0c, 0x0f, 0x0f,
-     0x0f, 0x0c, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0b,
-     0x0b, 0x0b, 0x0c, 0x0c, 0x0f, 0x0c, 0x0f, 0x0f, 0x0f, 0x0c,
-     0x0c, 0x0b, 0x0b, 0x0b, 0x0c, 0x0b, 0x0b, 0x0c, 0x0c, 0x0f,
-     0x0c, 0x0c, 0x0f, 0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x0b, 0x0b, 0x0c, 0x0b, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
-     0x0c, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c, 0x0b, 0x0b, 0x0c, 0x0c,
-     0x0f, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0b, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x0b, 0x0b, 0x0c, 0x0c,
-     0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0b, 0x0b, 0x0b, 0x0b, 0x0c,
-     0x0c, 0x0f, 0x0f, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xff,
-     0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x02, 0x05,
-     0x05, 0x05, 0x06, 0x06, 0x05, 0x05, 0x06, 0x05, 0x05, 0x04,
-     0x05, 0x06, 0x06, 0x06, 0x06, 0x05, 0x02, 0x03, 0x00, 0x0e,
-     0x0d, 0x0b, 0x18, 0x1b, 0x03, 0x04, 0x0f, 0x13, 0x07, 0x1b,
-     0x0c, 0x00, 0x0a, 0x04, 0x12, 0x1b, 0x08, 0x13, 0x1b, 0x0f,
-     0x0e, 0x12, 0x12, 0x08, 0x01, 0x0b, 0x04, 0x1a, 0x1a, 0x1a,
-     0x13, 0x07, 0x08, 0x12, 0x1b, 0x08, 0x12, 0x1b, 0x13, 0x07,
-     0x04, 0x1b, 0x05, 0x08, 0x11, 0x12, 0x13, 0x1b, 0x03, 0x04,
-     0x0c, 0x0e, 0x1b, 0x0c, 0x00, 0x03, 0x04, 0x1b, 0x08, 0x0d,
-     0x1b, 0x13, 0x07, 0x08, 0x12, 0x1b, 0x04, 0x0d, 0x15, 0x1a,
-     0x1a, 0x1a, 0x1a, 0x1b, 0x07, 0x0e, 0x0f, 0x04, 0x1b, 0x18,
-     0x0e, 0x14, 0x1b, 0x0b, 0x08, 0x0a, 0x04, 0x1b, 0x08, 0x13,
-     0x1a, 0x1a, 0x1a, 0x1b, 0x1b, 0x16, 0x16, 0x16, 0x1a, 0x03,
-     0x04, 0x0f, 0x13, 0x07, 0x1a, 0x0e, 0x11, 0x06, 0x1b, 0x1b,
-     0x1b, 0x1b, 0x1b, 0xff, 0x00, 0x00, 0x20, 0x00, 0x40, 0x00,
-     0x60, 0x00, 0x80, 0x00, 0xa0, 0x00, 0xc0, 0x00, 0xe0, 0x00,
-     0x00, 0x01, 0x20, 0x01, 0x40, 0x01, 0x60, 0x01, 0x80, 0x01,
-     0xa0, 0x01, 0xc0, 0x01, 0xe0, 0x01, 0x00, 0x02, 0x20, 0x02,
-     0x40, 0x02, 0x60, 0x02, 0x80, 0x02, 0xa0, 0x02, 0xc0, 0x02,
-     0xe0, 0x02, 0x00, 0x03, 0x20, 0x03, 0x40, 0x03, 0x60, 0x03,
-     0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
-     0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-     0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-     0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-     0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-     0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
-     0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
-     0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01,
-     0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01,
-     0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01,
-     0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
-     0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-     0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-     0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00,
-     0x01, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00,
-     0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01,
-     0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
-     0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
-     0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
-     0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
-     0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
-     0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
-     0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
-     0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-     0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x01, 0x00,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00,
-     0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00,
-     0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x01, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0b, 0x09, 0x0b, 0x09,
-     0x08, 0x09, 0x08, 0x0a, 0x08, 0x0a, 0x07, 0x0a, 0x07, 0x01,
-     0x07, 0x01, 0x01, 0x07, 0x01, 0x07, 0x0a, 0x07, 0x0a, 0x08,
-     0x0a, 0x08, 0x09, 0x08, 0x09, 0x0b, 0x09, 0x0b, 0xff};
-
-  Bit8 breakout[219] =
-    {0xa9, 0xfe, 0x85, 0x02, 0xa9, 0xee, 0x85, 0x03, 0xa9, 0x00,
-     0x85, 0x00, 0xa9, 0x02, 0x85, 0x01, 0xa2, 0x20, 0xa9, 0x02,
-     0x9d, 0xff, 0x01, 0x9d, 0xdf, 0x05, 0xa0, 0x00, 0x91, 0x00,
-     0xa0, 0x1f, 0x91, 0x00, 0xe0, 0x01, 0xf0, 0x15, 0xa9, 0x03,
-     0xa0, 0x17, 0x91, 0x00, 0xa9, 0x04, 0xc8, 0x91, 0x00, 0xa9,
-     0x05, 0xc8, 0x91, 0x00, 0xa9, 0x06, 0xc8, 0x91, 0x00, 0x18,
-     0xa5, 0x00, 0x69, 0x20, 0x85, 0x00, 0xa5, 0x01, 0x69, 0x00,
-     0x85, 0x01, 0xca, 0xd0, 0xc7, 0xa6, 0x02, 0xa4, 0x03, 0xa9,
-     0x44, 0x85, 0x00, 0xa9, 0x02, 0x85, 0x01, 0x8a, 0x48, 0xa9,
-     0x01, 0xa2, 0x00, 0x81, 0x00, 0x68, 0xaa, 0xca, 0xf0, 0x46,
-     0x88, 0xd0, 0xfa, 0x8a, 0x48, 0x20, 0xd5, 0x06, 0xa5, 0x03,
-     0x29, 0x01, 0xd0, 0x0d, 0x18, 0xa5, 0x00, 0x69, 0x20, 0x85,
-     0x00, 0x90, 0x11, 0xe6, 0x01, 0xd0, 0x0d, 0x38, 0xa5, 0x00,
-     0xe9, 0x20, 0x85, 0x00, 0xa5, 0x01, 0xe9, 0x00, 0x85, 0x01,
-     0xa2, 0x00, 0xa1, 0x00, 0xd0, 0x07, 0xa4, 0x03, 0x68, 0xaa,
-     0x4c, 0x57, 0x06, 0xc9, 0x02, 0xf0, 0x04, 0xa9, 0x00, 0x81,
-     0x00, 0xa9, 0x01, 0x45, 0x03, 0x85, 0x03, 0x4c, 0x6c, 0x06,
-     0x20, 0xd5, 0x06, 0xa5, 0x02, 0x29, 0x01, 0xd0, 0x04, 0xe6,
-     0x00, 0xd0, 0x02, 0xc6, 0x00, 0xa2, 0x00, 0xa1, 0x00, 0xd0,
-     0x05, 0xa6, 0x02, 0x4c, 0x57, 0x06, 0xc9, 0x02, 0xf0, 0x04,
-     0xa9, 0x00, 0x81, 0x00, 0xa9, 0x01, 0x45, 0x02, 0x85, 0x02,
-     0x4c, 0xad, 0x06, 0xa9, 0x00, 0xaa, 0x81, 0x00, 0x60};
-
-  Bit8 sierpinsky[145] =
-    {0xa2, 0x00, 0xa0, 0x00, 0xa5, 0xfe, 0x29, 0x03, 0xc9, 0x03,
-     0xd0, 0x03, 0x4c, 0x04, 0x06, 0x48, 0x0a, 0x0a, 0x0a, 0x85,
-     0xf3, 0x68, 0x29, 0x01, 0x0a, 0x0a, 0x0a, 0x0a, 0x85, 0xf4,
-     0x8a, 0x4a, 0x65, 0xf3, 0xaa, 0x98, 0x4a, 0x65, 0xf4, 0xa8,
-     0x20, 0x2e, 0x06, 0x4c, 0x04, 0x06, 0x48, 0x8a, 0x48, 0x98,
-     0x48, 0x48, 0x48, 0x86, 0xf2, 0xa4, 0xf2, 0xa9, 0x00, 0x85,
-     0xf0, 0xa9, 0x02, 0x85, 0xf1, 0xa9, 0x00, 0x68, 0x29, 0x07,
-     0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x18, 0x65, 0xf0, 0x85, 0xf0,
-     0x90, 0x02, 0xe6, 0xf1, 0x18, 0x68, 0x29, 0x18, 0x4a, 0x4a,
-     0x4a, 0x65, 0xf1, 0x85, 0xf1, 0x18, 0x98, 0x65, 0xf0, 0x65,
-     0xf1, 0xa9, 0x01, 0x20, 0x72, 0x06, 0x91, 0xf0, 0x68, 0xa8,
-     0x68, 0xaa, 0x68, 0x60, 0xb1, 0xf0, 0xc9, 0x00, 0xd0, 0x03,
-     0xa9, 0x0b, 0x60, 0xc9, 0x0b, 0xd0, 0x03, 0xa9, 0x0c, 0x60,
-     0xc9, 0x0c, 0xd0, 0x03, 0xa9, 0x0f, 0x60, 0xc9, 0x0f, 0xd0,
-     0x03, 0xa9, 0x01, 0x60, 0x60};
-
-Bit8 spacer[583] =
-  {0x20, 0x62, 0x06, 0x20, 0x90, 0x06, 0x20, 0xe6, 0x06, 0x20,
-   0x52, 0x06, 0x4c, 0x03, 0x06, 0xa5, 0x82, 0xa8, 0xb9, 0x07,
-   0x07, 0x85, 0x00, 0xc8, 0xb9, 0x07, 0x07, 0x85, 0x01, 0xa2,
-   0x2a, 0xa1, 0x00, 0xc9, 0x00, 0xf0, 0x02, 0xc9, 0x05, 0xa9,
-   0x05, 0x81, 0x00, 0xa5, 0x60, 0xc5, 0x61, 0xf0, 0x19, 0xa5,
-   0x61, 0x0a, 0xa8, 0xb9, 0x07, 0x07, 0x85, 0x00, 0xc8, 0xb9,
-   0x07, 0x07, 0x85, 0x01, 0xa9, 0x00, 0xa2, 0x2a, 0x81, 0x00,
-   0xa5, 0x60, 0x85, 0x61, 0x60, 0xa5, 0xfe, 0x81, 0x00, 0x4c,
-   0x4b, 0x06, 0xa5, 0xff, 0xc9, 0x77, 0xd0, 0x03, 0xc6, 0x60,
-   0x60, 0xc9, 0x78, 0xd0, 0x02, 0xe6, 0x60, 0x60, 0xa2, 0x00,
-   0xbd, 0x47, 0x07, 0x9d, 0x00, 0x05, 0xe8, 0xe0, 0x00, 0xd0,
-   0xf5, 0xa9, 0x0a, 0x85, 0x60, 0x85, 0x61, 0xa2, 0x00, 0xa9,
-   0x0c, 0x9d, 0x00, 0x02, 0x9d, 0x00, 0x04, 0xca, 0xe0, 0x00,
-   0xd0, 0xf5, 0xa9, 0x10, 0x85, 0x80, 0xa2, 0x0f, 0x95, 0x81,
-   0xca, 0x10, 0xfb, 0x60, 0xa9, 0x00, 0x85, 0x78, 0xa9, 0x20,
-   0x85, 0x79, 0xa9, 0xc0, 0x85, 0x7a, 0xa9, 0xe0, 0x85, 0x7b,
-   0xa2, 0x0f, 0xb5, 0x81, 0x95, 0x82, 0xa8, 0xb9, 0x07, 0x07,
-   0x85, 0x00, 0xc8, 0xb9, 0x07, 0x07, 0x85, 0x01, 0xa9, 0x0c,
-   0xa4, 0x78, 0x91, 0x00, 0xc8, 0x91, 0x00, 0xa4, 0x7b, 0x91,
-   0x00, 0xc8, 0x91, 0x00, 0xa4, 0x79, 0xa9, 0x00, 0x91, 0x00,
-   0xc8, 0x91, 0x00, 0xa4, 0x7a, 0x91, 0x00, 0xc8, 0x91, 0x00,
-   0xe6, 0x78, 0xe6, 0x79, 0xe6, 0x7a, 0xe6, 0x7b, 0xe6, 0x78,
-   0xe6, 0x79, 0xe6, 0x7a, 0xe6, 0x7b, 0xca, 0x10, 0xbd, 0x60,
-   0xa5, 0x80, 0xc5, 0x81, 0xf0, 0x09, 0xa5, 0x80, 0x18, 0xe5,
-   0x81, 0x10, 0x0f, 0x30, 0x08, 0xa5, 0xfe, 0x29, 0x0f, 0x0a,
-   0x85, 0x80, 0x60, 0xc6, 0x81, 0xc6, 0x81, 0x60, 0xe6, 0x81,
-   0xe6, 0x81, 0x60, 0x00, 0x02, 0x20, 0x02, 0x40, 0x02, 0x60,
-   0x02, 0x80, 0x02, 0xa0, 0x02, 0xc0, 0x02, 0xe0, 0x02, 0x00,
-   0x03, 0x20, 0x03, 0x40, 0x03, 0x60, 0x03, 0x80, 0x03, 0xa0,
-   0x03, 0xc0, 0x03, 0xe0, 0x03, 0x00, 0x04, 0x20, 0x04, 0x40,
-   0x04, 0x60, 0x04, 0x80, 0x04, 0xa0, 0x04, 0xc0, 0x04, 0xe0,
-   0x04, 0x00, 0x05, 0x20, 0x05, 0x40, 0x05, 0x60, 0x05, 0x80,
-   0x05, 0xa0, 0x05, 0xc0, 0x05, 0xe0, 0x05, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-   0x00, 0x01, 0x01, 0x01, 0x06, 0x01, 0x01, 0x01, 0x00, 0x00,
-   0x06, 0x01, 0x01, 0x06, 0x00, 0x00, 0x01, 0x01, 0x01, 0x06,
-   0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x06, 0x00,
-   0x00, 0x06, 0x01, 0x06, 0x00, 0x06, 0x00, 0x01, 0x00, 0x06,
-   0x01, 0x06, 0x01, 0x06, 0x00, 0x01, 0x00, 0x01, 0x00, 0x06,
-   0x00, 0x06, 0x01, 0x06, 0x00, 0x06, 0x00, 0x01, 0x00, 0x06,
-   0x01, 0x06, 0x00, 0x00, 0x06, 0x01, 0x01, 0x06, 0x06, 0x01,
-   0x01, 0x01, 0x00, 0x06, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01,
-   0x06, 0x00, 0x06, 0x06, 0x01, 0x01, 0x01, 0x00, 0x06, 0x01,
-   0x00, 0x06, 0x01, 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x01,
-   0x06, 0x01, 0x01, 0x06, 0x06, 0x06, 0x01, 0x01, 0x01, 0x01,
-   0x06, 0x01, 0x06, 0x06, 0x06, 0x06, 0x01, 0x06, 0x06, 0x06,
-   0x06, 0x01, 0x01, 0x01, 0x06, 0x06, 0x06, 0x06, 0x01, 0x01,
-   0x01, 0x01, 0x0e, 0x01, 0x01, 0x0e, 0x06, 0x06, 0x01, 0x01,
-   0x06, 0x01, 0x06, 0x01, 0x01, 0x01, 0x01, 0x0e, 0x01, 0x01,
-   0x01, 0x01, 0x06, 0x01, 0x01, 0x06, 0x01, 0x06, 0x06, 0x06,
-   0x01, 0x01, 0x01, 0x06, 0x0e, 0x01, 0x01, 0x06, 0x0e, 0x06,
-   0x01, 0x01, 0x0e, 0x01, 0x0e, 0x06, 0x01, 0x01, 0x01, 0x06,
-   0x0e, 0x01, 0x01, 0x01, 0x0e, 0x01, 0x01, 0x06, 0x01, 0x06,
-   0x0e, 0x0e, 0x0e, 0x06, 0x0e, 0x0e, 0x06, 0x0e, 0x0e, 0x06,
-   0x0e, 0x0e, 0x06, 0x0e, 0x0e, 0x06, 0x0e, 0x0e, 0x06, 0x0e,
-   0x0e, 0x06, 0x0e, 0x0e, 0x06, 0x0e, 0x0e, 0x06, 0x0e, 0x0e,
-   0x06, 0x0e, 0x0e};
-
- Bit8 pong[398] =
-  {0x20, 0x27, 0x06, 0x20, 0x18, 0x06, 0x20, 0x29, 0x07, 0x20,
-   0x5c, 0x06, 0x20, 0xf6, 0x06, 0xa5, 0x10, 0xc9, 0x1f, 0xd0,
-   0xf4, 0x4c, 0x15, 0x06, 0xa9, 0x0b, 0x85, 0x10, 0xa9, 0x05,
-   0x85, 0x11, 0xa9, 0xff, 0x85, 0x12, 0x85, 0x13, 0x60, 0xa9,
-   0x00, 0x85, 0x00, 0xa9, 0x02, 0x85, 0x01, 0xa2, 0x00, 0xa0,
-   0x1f, 0x98, 0xaa, 0xa9, 0x0e, 0x9d, 0x00, 0x02, 0x9d, 0x20,
-   0x02, 0xa2, 0x00, 0x81, 0x00, 0xe8, 0x81, 0x00, 0xa2, 0x1e,
-   0x81, 0x00, 0xe8, 0x81, 0x00, 0xa5, 0x00, 0xc9, 0xe0, 0xd0,
-   0x02, 0xe6, 0x01, 0x18, 0x69, 0x20, 0x85, 0x00, 0x88, 0xd0,
-   0xd8, 0x60, 0xa5, 0x10, 0x85, 0x15, 0xa5, 0x11, 0x85, 0x16,
-   0xa5, 0x10, 0x18, 0x65, 0x12, 0x85, 0x10, 0x20, 0xdf, 0x06,
-   0xc9, 0x00, 0xf0, 0x15, 0xa5, 0x12, 0xc9, 0x01, 0xd0, 0x09,
-   0xa9, 0xff, 0x85, 0x12, 0xc6, 0x10, 0x4c, 0x87, 0x06, 0xa9,
-   0x01, 0x85, 0x12, 0xe6, 0x10, 0xa5, 0x11, 0x18, 0x65, 0x13,
-   0x85, 0x11, 0x20, 0xdf, 0x06, 0xc9, 0x00, 0xf0, 0x15, 0xa5,
-   0x13, 0xc9, 0x01, 0xd0, 0x09, 0xa9, 0xff, 0x85, 0x13, 0xc6,
-   0x11, 0x4c, 0xaa, 0x06, 0xa9, 0x01, 0x85, 0x13, 0xe6, 0x11,
-   0xa5, 0x10, 0x29, 0x1f, 0x0a, 0xaa, 0xbd, 0x4e, 0x07, 0x85,
-   0x00, 0xe8, 0xbd, 0x4e, 0x07, 0x85, 0x01, 0xa5, 0x11, 0x29,
-   0x1f, 0xaa, 0xa9, 0x0d, 0x81, 0x00, 0xa5, 0x15, 0x29, 0x1f,
-   0x0a, 0xaa, 0xbd, 0x4e, 0x07, 0x85, 0x00, 0xe8, 0xbd, 0x4e,
-   0x07, 0x85, 0x01, 0xa5, 0x16, 0x29, 0x1f, 0xaa, 0xa9, 0x00,
-   0x81, 0x00, 0x60, 0xa5, 0x10, 0x0a, 0xaa, 0xbd, 0x4e, 0x07,
-   0x85, 0x00, 0xe8, 0xbd, 0x4e, 0x07, 0x85, 0x01, 0xa5, 0x11,
-   0x29, 0x1f, 0xaa, 0xa1, 0x00, 0x60, 0xa5, 0xff, 0xc9, 0x61,
-   0xd0, 0x08, 0xa5, 0x20, 0xc9, 0x00, 0xf0, 0x0e, 0xc6, 0x20,
-   0xc9, 0x64, 0xd0, 0x08, 0xa5, 0x20, 0xc9, 0x19, 0xf0, 0x02,
-   0xe6, 0x20, 0xa6, 0x20, 0xa9, 0x00, 0x9d, 0xe0, 0x05, 0xe8,
-   0xa0, 0x1e, 0xa9, 0x0f, 0x9d, 0xe0, 0x05, 0xe8, 0x88, 0xd0,
-   0xf7, 0xa9, 0x00, 0x9d, 0xe0, 0x05, 0x60, 0xa9, 0x00, 0x85,
-   0x05, 0xa9, 0x02, 0x85, 0x06, 0xe6, 0x06, 0xa5, 0xfe, 0x29,
-   0x0f, 0x18, 0x69, 0x05, 0xaa, 0xa5, 0x06, 0x0a, 0xa8, 0xa9,
-   0x0c, 0x81, 0x05, 0xe8, 0x88, 0xd0, 0xfa, 0xa5, 0x06, 0xc9,
-   0x05, 0xd0, 0xe4, 0x60, 0x00, 0x02, 0x20, 0x02, 0x40, 0x02,
-   0x60, 0x02, 0x80, 0x02, 0xa0, 0x02, 0xc0, 0x02, 0xe0, 0x02,
-   0x00, 0x03, 0x20, 0x03, 0x40, 0x03, 0x60, 0x03, 0x80, 0x03,
-   0xa0, 0x03, 0xc0, 0x03, 0xe0, 0x03, 0x00, 0x04, 0x20, 0x04,
-   0x40, 0x04, 0x60, 0x04, 0x80, 0x04, 0xa0, 0x04, 0xc0, 0x04,
-   0xe0, 0x04, 0x00, 0x05, 0x20, 0x05, 0x40, 0x05, 0x60, 0x05,
-   0x80, 0x05, 0xa0, 0x05, 0xc0, 0x05, 0xe0, 0x05};
-
-  switch(r){
-  case 0: 
-    start_eval_binary(machine,noise,30,plot6502,st);
-    break;
-  case 1:
-    start_eval_binary(machine,atari,629,plot6502,st);
-    break;
-  case 2:
-    start_eval_binary(machine,c64,1076,plot6502,st);
-    break;
-  case 3:
-    start_eval_binary(machine,random,22,plot6502,st);
-    break;
-  case 4:
-    start_eval_binary(machine,demoscene,2109,plot6502,st);
-    break;
-  case 5:
-    start_eval_binary(machine,breakout,219,plot6502,st);
-    break;
-  case 6:
-    start_eval_binary(machine,sierpinsky,145,plot6502,st);
-    break;
-  case 7:
-    start_eval_binary(machine,spacer,583,plot6502,st);
-    break;
-  case 8:
-   start_eval_binary(machine,pong,398,plot6502,st);
-   break;
-  } 
+  int n = st->which;
+  while(n == st->which)
+    n = random() % st->demos;
+  st->which = n;
+  start_eval_string(machine, demo_files[st->which], plot6502, st);
 }
+
 \f
 /*
  * get_time ()
@@ -669,7 +117,8 @@ m6502_init (Display *dpy, Window window)
   char *s = get_string_resource (dpy, "file", "File");
   int n = get_integer_resource(dpy, "displaytime", "Displaytime");
   int dh;
-  st->pc = 0;
+  st->demos = countof(demo_files);
+  st->which = random() % st->demos;
   st->dt = n;
   st->dpy = dpy;
   st->window = window;
diff --git a/hacks/m6502.sh b/hacks/m6502.sh
new file mode 100755 (executable)
index 0000000..ee7f8e2
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+TARGET=$1
+shift
+SRCS=$*
+
+TMP1=m6502.h.1.$$
+TMP2=m6502.h.2.$$
+rm -f $TMP1 $TMP2
+
+if [ -z "$UTILS_SRC" ]; then UTILS_SRC="../utils"; fi
+
+for f in $SRCS ; do
+  sed 's/[     ]*;.*$//' < "$f" > $TMP1  # lose comments
+  sh "$UTILS_SRC/ad2c" $TMP1 |
+    sed 's/",$/\\n"/' >> $TMP2
+  echo ',' >> $TMP2
+done
+rm $TMP1
+mv $TMP2 $TARGET
index fca2459e8a0de7d4ff3f8ffa5a8a159f45ae718d..2435c2f5b94e58a15267908dab7898034d151498 100644 (file)
@@ -336,8 +336,8 @@ more_bits (state *st, scroller *sc)
       if ((unsigned long) himem - (unsigned long) lomem > 0x0FFFFFFF) {
 # if 0
         fprintf (stderr, "%s: wonky: 0x%08x - 0x%08x = 0x%08x\n", progname,
-                 (unsigned long) himem,  (unsigned long) lomem,
-                 (unsigned long) himem - (unsigned long) lomem);
+                 (unsigned int) himem,  (unsigned int) lomem,
+                 (unsigned int) himem - (unsigned int) lomem);
 # endif
         himem = lomem + 0xFFFF;
       }
@@ -584,9 +584,9 @@ static const char *memscroller_defaults [] = {
   ".textColor:            #00FF00",
   ".foreground:                   #00FF00",
   "*borderSize:                   2",
-  ".font1:                -*-courier-medium-r-*-*-*-1400-*-*-m-*-*-*",
-  ".font2:                -*-courier-medium-r-*-*-*-600-*-*-m-*-*-*",
-  ".font3:                -*-courier-medium-r-*-*-*-180-*-*-m-*-*-*",
+  ".font1:                -*-courier-bold-r-*-*-*-1400-*-*-m-*-*-*",
+  ".font2:                -*-courier-bold-r-*-*-*-600-*-*-m-*-*-*",
+  ".font3:                -*-courier-bold-r-*-*-*-180-*-*-m-*-*-*",
   ".font4:                fixed",
   "*delay:                10000",
   "*offset:               0",
index 6f9fe9170a261d88bf174ce61a31bed7e897ee8e..724bbb5312807fa3c04e196fc367394a95969380 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1999-2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1999-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -1338,7 +1338,7 @@ static void
 drain_input (p_state *state)
 {
   XtAppContext app = XtDisplayToApplicationContext (state->dpy);
-  if (state->input_available_p)
+  if (state->input_available_p && state->pipe)
     {
       unsigned char s[2];
       int n = read (fileno (state->pipe), (void *) s, 1);
index baa9178d90120625a11234da6c7cc6b1b139eddb..5a377233fc586dea7585232c266de7868c9c31d1 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992-2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -581,7 +581,7 @@ run_screenhack_table (Display *dpy,
     {
       unsigned long delay = ft->draw_cb (dpy, window, closure);
 #ifdef DEBUG_PAIR
-      unsigned long delay2;
+      unsigned long delay2 = 0;
       if (window2) delay2 = ft->draw_cb (dpy, window2, closure2);
 #endif
 
index 5cb59c0ae66b86fe78b87ed8d8948aa0e71fd868..540f83c2dc863e90be97a4de6255d62a24ad45da 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992-2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
 # define M_PI_2 1.5707963267
 #endif
 
+#ifndef Button6
+# define Button6 6
+# define Button7 7
+#endif
+
 #include "yarandom.h"
 #include "usleep.h"
 #include "resources.h"
index 05f95c4e2002f66b7253019e64cb1123d680e724..11e3dcf474fe994a56228716c579482301c006d1 100644 (file)
@@ -1,5 +1,5 @@
 /* webcollage-helper-cocoa --- scales and pastes one image into another
- * xscreensaver, Copyright (c) 2002-2006 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 2002-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -240,7 +240,7 @@ paste (const char *paste_file,
                progname, paste_file, paste_w, paste_h);
     }
 
-  if (bevel_pct > 0)
+  if (bevel_pct > 0 && paste_w > 5 && paste_h > 5)
     bevel_image (paste_img, bevel_pct,
                  from_x, from_y, w, h, 
                  from_scale);
index ddaac1daf9a5464165b5371a4b68edc88da6dc8e..48bdb83612bbe17fa4c2b41d8aef1043fe3f84bc 100644 (file)
@@ -1284,14 +1284,14 @@ hack_text (m_state *state)
 # endif
               ("# "
                "\010\010\010\010"
-               "\001nmap 10.2.2.2\n"
+               "\001nmap -v -sS -O 10.2.2.2\n"
                "Starting nmap V. 2.54BETA25\n"
                "\010\010\010\010\010\010\010\010\010\010"
                "Insufficient responses for TCP sequencing (3), OS detection"
                " may be less accurate\n"
                "Interesting ports on 10.2.2.2:\n"
-               "(The 1538 ports scanned but not shown below are in state:"
-               " filtered)\n"
+               "(The 1539 ports scanned but not shown below are in state:"
+               " closed)\n"
                "Port       state       service\n"
                "22/tcp     open        ssh\n"
                "\n"
index 81ef6d7fc45cc79535fbff25a922a22de75aed61..a46d390024b0de22de32b31a2b8304a785c15993 100644 (file)
@@ -1,4 +1,4 @@
-# Auto-generated: Tue Nov 13 00:39:40 PST 2007
+# Auto-generated: Sat Mar  1 21:34:50 PST 2008
 driver/demo-Gtk-conf.c
 driver/demo-Gtk-support.c
 driver/demo-Gtk-widgets.c
@@ -47,6 +47,7 @@ hacks/config/crystal.xml
 hacks/config/cube21.xml
 hacks/config/cubenetic.xml
 hacks/config/cubestorm.xml
+hacks/config/cubicgrid.xml
 hacks/config/cwaves.xml
 hacks/config/cynosure.xml
 hacks/config/dangerball.xml
@@ -107,6 +108,7 @@ hacks/config/hopalong.xml
 hacks/config/hyperball.xml
 hacks/config/hypercube.xml
 hacks/config/hypertorus.xml
+hacks/config/hypnowheel.xml
 hacks/config/ifs.xml
 hacks/config/imsmap.xml
 hacks/config/interaggregate.xml
@@ -123,6 +125,7 @@ hacks/config/kumppa.xml
 hacks/config/lament.xml
 hacks/config/laser.xml
 hacks/config/lavalite.xml
+hacks/config/lcdscrub.xml
 hacks/config/lightning.xml
 hacks/config/lisa.xml
 hacks/config/lissie.xml
index a63dd2fade8cf3fc24e0ec1f402d52b99e2cc37e..e8ebdf591cbfd405b33610e05fef71f2c598f371 100644 (file)
--- a/setup.com
+++ b/setup.com
@@ -68,6 +68,7 @@ $ julia               :== $'mydir'julia
 $ kaleidescope :== $'mydir'kaleidescope
 $ kumppa       :== $'mydir'kumppa
 $ laser                :== $'mydir'laser
+$ lcdscrub     :== $'mydir'lcdscrub
 $ lightning    :== $'mydir'lightning
 $ lisa         :== $'mydir'lisa
 $ lissie       :== $'mydir'lissie
index a45ae4807daa6ab02c9e075366ea2ffff60931e9..d3f7ca3aa051ff1e808f7768b27957cfc66ab5df 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992-2003 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -157,6 +157,28 @@ fade_screens (Display *dpy, Colormap *cmaps,
 }
 
 
+static void
+sleep_from (struct timeval *now, struct timeval *then, long usecs_per_step)
+{
+  /* If several seconds have passed, the machine must have been asleep
+     or thrashing or something.  Don't sleep in that case, to avoid
+     overflowing and sleeping for an unconscionably long time.  This
+     function should only be sleeping for very short periods.
+   */
+  if (now->tv_sec - then->tv_sec < 5)
+    {
+      long diff = (((now->tv_sec - then->tv_sec) * 1000000) +
+                   now->tv_usec - then->tv_usec);
+      if (usecs_per_step > diff)
+        usleep (usecs_per_step - diff);
+    }
+
+  then->tv_sec  = now->tv_sec;
+  then->tv_usec = now->tv_usec;
+}
+
+
+
 /* The business with `cmaps_per_screen' is to fake out the SGI 8-bit video
    hardware, which is capable of installing multiple (4) colormaps
    simultaneously.  We have to install multiple copies of the same set of
@@ -329,14 +351,7 @@ fade_screens_1 (Display *dpy, Colormap *cmaps,
 
       /* If we haven't already used up our alotted time, sleep to avoid
         changing the colormap too fast. */
-      {
-       long diff = (((now.tv_sec - then.tv_sec) * 1000000) +
-                    now.tv_usec - then.tv_usec);
-       then.tv_sec = now.tv_sec;
-       then.tv_usec = now.tv_usec;
-       if (usecs_per_step > diff)
-         usleep (usecs_per_step - diff);
-      }
+      sleep_from (&now, &then, usecs_per_step);
     }
 
  DONE:
@@ -530,14 +545,7 @@ sgi_gamma_fade (Display *dpy,
 
          /* If we haven't already used up our alotted time, sleep to avoid
             changing the colormap too fast. */
-         {
-           long diff = (((now.tv_sec - then.tv_sec) * 1000000) +
-                        now.tv_usec - then.tv_usec);
-           then.tv_sec = now.tv_sec;
-           then.tv_usec = now.tv_usec;
-           if (usecs_per_step > diff)
-             usleep (usecs_per_step - diff);
-         }
+          sleep_from (&now, &then, usecs_per_step);
        }
     }
   
@@ -757,14 +765,7 @@ xf86_gamma_fade (Display *dpy,
 
          /* If we haven't already used up our alotted time, sleep to avoid
             changing the colormap too fast. */
-         {
-           long diff = (((now.tv_sec - then.tv_sec) * 1000000) +
-                        now.tv_usec - then.tv_usec);
-           then.tv_sec = now.tv_sec;
-           then.tv_usec = now.tv_usec;
-           if (usecs_per_step > diff)
-             usleep (usecs_per_step - diff);
-         }
+          sleep_from (&now, &then, usecs_per_step);
        }
     }
   
index 8f6778bc0d3b0ff66cf7cb33c12730eb4d972c8c..3589ad9821d6af4d6f983faf4e99799646861f79 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992-2006 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2008 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -657,6 +657,8 @@ load_random_image_1 (Screen *screen, Window window, Drawable drawable,
   XRectangle geom_ret_2;
   char *name_ret_2 = 0;
 
+  if (!drawable) abort();
+
   if (callback) {
     geom_ret = &geom_ret_2;
     name_ret = &name_ret_2;
index 166d60817183111b7dcc26dbab1dd97f0d8c84c0..41918cbea398dc8e4ebeb346419eeaf068ecef16 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
-       "@(#)xscreensaver 5.04 (13-Nov-2007), by Jamie Zawinski (jwz@jwz.org)";
+       "@(#)xscreensaver 5.05 (01-Mar-2008), by Jamie Zawinski (jwz@jwz.org)";
index efba606bf38f845e8c0a0d88a8f1d80880fbad75..58b1588b6c05432c706878e3e612d53b0c1d2b7c 100644 (file)
@@ -1,5 +1,5 @@
 %define        name xscreensaver
-%define        version 5.04
+%define        version 5.05
 
 Summary:       X screen saver and locker
 Name:          %{name}
index 1c596a430ddab9c95807a9572b801b8573b1c08d..cfa10319c7230202b17438786c27760cd789cca8 100644 (file)
@@ -59,6 +59,7 @@
                                AF77793D09B6604900EA3033 /* PBXTargetDependency */,
                                AF77793B09B6604900EA3033 /* PBXTargetDependency */,
                                AF77793909B6604800EA3033 /* PBXTargetDependency */,
+                               AF1A17840D6D6FA7008AF328 /* PBXTargetDependency */,
                                AF77793709B6604800EA3033 /* PBXTargetDependency */,
                                AF0DCA310C4C744D00D76972 /* PBXTargetDependency */,
                                AF77793509B6604800EA3033 /* PBXTargetDependency */,
                                AF777A4709B660B500EA3033 /* PBXTargetDependency */,
                                AF777A4509B660B500EA3033 /* PBXTargetDependency */,
                                AF777A4309B660B500EA3033 /* PBXTargetDependency */,
+                               AF4FF4D70D52CD0D00666F98 /* PBXTargetDependency */,
                                AF777A4109B660B500EA3033 /* PBXTargetDependency */,
                                AF777A3F09B660B500EA3033 /* PBXTargetDependency */,
                                AF777A3D09B660B500EA3033 /* PBXTargetDependency */,
                                AF777A1B09B660B300EA3033 /* PBXTargetDependency */,
                                AF777A1909B660B300EA3033 /* PBXTargetDependency */,
                                AF777A1709B660B300EA3033 /* PBXTargetDependency */,
+                               AF42C5160D624E9200B27FF6 /* PBXTargetDependency */,
                                AF777A1509B660B300EA3033 /* PBXTargetDependency */,
                                AF777A1309B660B300EA3033 /* PBXTargetDependency */,
                                AF777A1109B660B300EA3033 /* PBXTargetDependency */,
                AF0FAF2709CA712600EE1051 /* xscreensaver-getimage-file in Resources */ = {isa = PBXBuildFile; fileRef = AF0FAF1209CA712600EE1051 /* xscreensaver-getimage-file */; };
                AF0FAF2809CA712600EE1051 /* xscreensaver-getimage-file in Resources */ = {isa = PBXBuildFile; fileRef = AF0FAF1209CA712600EE1051 /* xscreensaver-getimage-file */; };
                AF0FAF2909CA712600EE1051 /* xscreensaver-getimage-file in Resources */ = {isa = PBXBuildFile; fileRef = AF0FAF1209CA712600EE1051 /* xscreensaver-getimage-file */; };
+               AF1A17660D6D6EE3008AF328 /* xscreensaver-getimage-file in Resources */ = {isa = PBXBuildFile; fileRef = AF0FAF1209CA712600EE1051 /* xscreensaver-getimage-file */; };
+               AF1A17680D6D6EE3008AF328 /* XScreenSaverSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = AF9CC7A0099580E70075E99B /* XScreenSaverSubclass.m */; };
+               AF1A176B0D6D6EE3008AF328 /* libjwxyz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AF4808C1098C3B6C00FB32B8 /* libjwxyz.a */; };
+               AF1A176C0D6D6EE3008AF328 /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF976ED30989BF59001F8B92 /* ScreenSaver.framework */; };
+               AF1A176D0D6D6EE3008AF328 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+               AF1A177F0D6D6F3E008AF328 /* lcdscrub.c in Sources */ = {isa = PBXBuildFile; fileRef = AF1A177E0D6D6F3E008AF328 /* lcdscrub.c */; };
+               AF1A17810D6D6F62008AF328 /* lcdscrub.xml in Resources */ = {isa = PBXBuildFile; fileRef = AF1A17800D6D6F62008AF328 /* lcdscrub.xml */; };
                AF1A26760990E77C00147B80 /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF976ED30989BF59001F8B92 /* ScreenSaver.framework */; };
+               AF3C714B0D624BF50030CC0D /* XScreenSaverSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = AF9CC7A0099580E70075E99B /* XScreenSaverSubclass.m */; };
+               AF3C714E0D624BF50030CC0D /* libjwxyz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AF4808C1098C3B6C00FB32B8 /* libjwxyz.a */; };
+               AF3C714F0D624BF50030CC0D /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF976ED30989BF59001F8B92 /* ScreenSaver.framework */; };
+               AF3C71500D624BF50030CC0D /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+               AF3C71510D624BF50030CC0D /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF480FE70990375900FB32B8 /* AGL.framework */; };
+               AF3C71520D624BF50030CC0D /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF480DF1098F528500FB32B8 /* OpenGL.framework */; };
+               AF3C71530D624BF50030CC0D /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF48112B0990A2C700FB32B8 /* Carbon.framework */; };
+               AF3C715E0D624C600030CC0D /* hypnowheel.c in Sources */ = {isa = PBXBuildFile; fileRef = AF3C715D0D624C600030CC0D /* hypnowheel.c */; };
+               AF3C71600D624C7C0030CC0D /* hypnowheel.xml in Resources */ = {isa = PBXBuildFile; fileRef = AF3C715F0D624C7C0030CC0D /* hypnowheel.xml */; };
                AF476FBC099D154F001F091E /* XScreenSaverSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = AF9CC7A0099580E70075E99B /* XScreenSaverSubclass.m */; };
                AF476FBF099D154F001F091E /* libjwxyz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AF4808C1098C3B6C00FB32B8 /* libjwxyz.a */; };
                AF476FC0099D154F001F091E /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF976ED30989BF59001F8B92 /* ScreenSaver.framework */; };
                AF4FD6F40CE7A486005EE58E /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF48112B0990A2C700FB32B8 /* Carbon.framework */; };
                AF4FD7010CE7A577005EE58E /* lockward.c in Sources */ = {isa = PBXBuildFile; fileRef = AF4FD7000CE7A577005EE58E /* lockward.c */; };
                AF4FD7030CE7A5BC005EE58E /* lockward.xml in Resources */ = {isa = PBXBuildFile; fileRef = AF4FD7020CE7A5BC005EE58E /* lockward.xml */; };
+               AF4FF4C10D52CBDE00666F98 /* XScreenSaverSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = AF9CC7A0099580E70075E99B /* XScreenSaverSubclass.m */; };
+               AF4FF4C30D52CBDE00666F98 /* libjwxyz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AF4808C1098C3B6C00FB32B8 /* libjwxyz.a */; };
+               AF4FF4C40D52CBDE00666F98 /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF976ED30989BF59001F8B92 /* ScreenSaver.framework */; };
+               AF4FF4C50D52CBDE00666F98 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+               AF4FF4C60D52CBDE00666F98 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF480FE70990375900FB32B8 /* AGL.framework */; };
+               AF4FF4C70D52CBDE00666F98 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF480DF1098F528500FB32B8 /* OpenGL.framework */; };
+               AF4FF4C80D52CBDE00666F98 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF48112B0990A2C700FB32B8 /* Carbon.framework */; };
+               AF4FF4D10D52CC8400666F98 /* cubicgrid.c in Sources */ = {isa = PBXBuildFile; fileRef = AF4FF4D00D52CC8400666F98 /* cubicgrid.c */; };
+               AF4FF4D40D52CCAA00666F98 /* cubicgrid.xml in Resources */ = {isa = PBXBuildFile; fileRef = AF4FF4D30D52CCAA00666F98 /* cubicgrid.xml */; };
                AF64232F099F45C3000F4CD4 /* braid.c in Sources */ = {isa = PBXBuildFile; fileRef = AFD56EC10996A76F00BA26F7 /* braid.c */; };
                AF642330099F45CA000F4CD4 /* braid.xml in Resources */ = {isa = PBXBuildFile; fileRef = AFC2587D0988A468000655EE /* braid.xml */; };
                AF6423F9099FF9C2000F4CD4 /* XScreenSaverSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = AF9CC7A0099580E70075E99B /* XScreenSaverSubclass.m */; };
                        remoteGlobalIDString = AF0DCA420C4CBB0D00D76972;
                        remoteInfo = Voronoi;
                };
+               AF1A17630D6D6EE3008AF328 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = AF4808C0098C3B6C00FB32B8;
+                       remoteInfo = jwxyz;
+               };
+               AF1A17830D6D6FA7008AF328 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = AF1A17610D6D6EE3008AF328;
+                       remoteInfo = LCDscrub;
+               };
+               AF3C71470D624BF50030CC0D /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = AF4808C0098C3B6C00FB32B8;
+                       remoteInfo = jwxyz;
+               };
+               AF42C5150D624E9200B27FF6 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = AF3C71450D624BF50030CC0D;
+                       remoteInfo = Hypnowheel;
+               };
                AF476FB7099D154F001F091E /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
                        remoteGlobalIDString = AF4FD6E60CE7A486005EE58E;
                        remoteInfo = Lockward;
                };
+               AF4FF4970D52CA5000666F98 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = AF4FF4930D52CA0800666F98;
+                       remoteInfo = m6502.h;
+               };
+               AF4FF4BC0D52CBDE00666F98 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = AF4808C0098C3B6C00FB32B8;
+                       remoteInfo = jwxyz;
+               };
+               AF4FF4D60D52CD0D00666F98 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = AF4FF4BA0D52CBDE00666F98;
+                       remoteInfo = CubicGrid;
+               };
                AF6423F4099FF9C2000F4CD4 /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
                AF0DCA340C4C74A200D76972 /* m6502.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = m6502.c; path = hacks/m6502.c; sourceTree = "<group>"; };
                AF0DCA370C4C74B700D76972 /* m6502.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = m6502.xml; sourceTree = "<group>"; };
                AF0DCA560C4CBB0D00D76972 /* Voronoi.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Voronoi.saver; sourceTree = BUILT_PRODUCTS_DIR; };
-               AF0DCA570C4CBB0E00D76972 /* XScreenSaver copy.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = "XScreenSaver copy.plist"; path = "OSX/XScreenSaver copy.plist"; sourceTree = "<group>"; };
                AF0DCA5F0C4CBB7300D76972 /* voronoi.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = voronoi.c; path = hacks/glx/voronoi.c; sourceTree = "<group>"; };
                AF0DCA610C4CBB8E00D76972 /* voronoi.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = voronoi.xml; sourceTree = "<group>"; };
                AF0FAF0B09CA6FF900EE1051 /* xscreensaver-text */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.perl; name = "xscreensaver-text"; path = "driver/xscreensaver-text"; sourceTree = "<group>"; };
                AF0FAF1209CA712600EE1051 /* xscreensaver-getimage-file */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.script.perl; name = "xscreensaver-getimage-file"; path = "driver/xscreensaver-getimage-file"; sourceTree = "<group>"; };
+               AF1A17730D6D6EE3008AF328 /* LCDscrub.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LCDscrub.saver; sourceTree = BUILT_PRODUCTS_DIR; };
+               AF1A177E0D6D6F3E008AF328 /* lcdscrub.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = lcdscrub.c; path = hacks/lcdscrub.c; sourceTree = "<group>"; };
+               AF1A17800D6D6F62008AF328 /* lcdscrub.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = lcdscrub.xml; sourceTree = "<group>"; };
                AF34085409B80AAF00F2CEC1 /* StarWars.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StarWars.saver; sourceTree = BUILT_PRODUCTS_DIR; };
                AF34085509B80AB000F2CEC1 /* StonerView.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StonerView.saver; sourceTree = BUILT_PRODUCTS_DIR; };
                AF34085609B80AB000F2CEC1 /* Gleidescope.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Gleidescope.saver; sourceTree = BUILT_PRODUCTS_DIR; };
                AF34085709B80AB000F2CEC1 /* FontGlide.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FontGlide.saver; sourceTree = BUILT_PRODUCTS_DIR; };
+               AF3C71590D624BF50030CC0D /* Hypnowheel.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Hypnowheel.saver; sourceTree = BUILT_PRODUCTS_DIR; };
+               AF3C715D0D624C600030CC0D /* hypnowheel.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = hypnowheel.c; path = hacks/glx/hypnowheel.c; sourceTree = "<group>"; };
+               AF3C715F0D624C7C0030CC0D /* hypnowheel.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = hypnowheel.xml; sourceTree = "<group>"; };
                AF476FC6099D154F001F091E /* Interference.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Interference.saver; sourceTree = BUILT_PRODUCTS_DIR; };
                AF476FD0099D15AA001F091E /* interference.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = interference.c; path = hacks/interference.c; sourceTree = "<group>"; };
                AF476FEB099D1686001F091E /* Truchet.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Truchet.saver; sourceTree = BUILT_PRODUCTS_DIR; };
                AF48E1670A0C268500F94CF9 /* glschool.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = glschool.h; path = hacks/glx/glschool.h; sourceTree = "<group>"; };
                AF48E16B0A0C26A400F94CF9 /* glschool.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = glschool.xml; sourceTree = "<group>"; };
                AF4FD6FA0CE7A486005EE58E /* Lockward.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Lockward.saver; sourceTree = BUILT_PRODUCTS_DIR; };
-               AF4FD6FD0CE7A486005EE58E /* XScreenSaver copy.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "XScreenSaver copy.plist"; path = "OSX/XScreenSaver copy.plist"; sourceTree = "<group>"; };
                AF4FD7000CE7A577005EE58E /* lockward.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = lockward.c; path = hacks/glx/lockward.c; sourceTree = "<group>"; };
                AF4FD7020CE7A5BC005EE58E /* lockward.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = lockward.xml; sourceTree = "<group>"; };
+               AF4FF4CE0D52CBDE00666F98 /* CubicGrid.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CubicGrid.saver; sourceTree = BUILT_PRODUCTS_DIR; };
+               AF4FF4D00D52CC8400666F98 /* cubicgrid.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = cubicgrid.c; path = hacks/glx/cubicgrid.c; sourceTree = "<group>"; };
+               AF4FF4D30D52CCAA00666F98 /* cubicgrid.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = cubicgrid.xml; sourceTree = "<group>"; };
                AF642405099FF9C2000F4CD4 /* Extrusion.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Extrusion.saver; sourceTree = BUILT_PRODUCTS_DIR; };
                AF642409099FFAF0000F4CD4 /* extrusion-helix2.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = "extrusion-helix2.c"; path = "hacks/glx/extrusion-helix2.c"; sourceTree = "<group>"; };
                AF64240A099FFAF0000F4CD4 /* extrusion-helix3.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = "extrusion-helix3.c"; path = "hacks/glx/extrusion-helix3.c"; sourceTree = "<group>"; };
                AFE6A16A0CDD78EA002805BF /* involute.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = involute.c; path = hacks/glx/involute.c; sourceTree = "<group>"; };
                AFE6A16B0CDD78EA002805BF /* involute.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = involute.h; path = hacks/glx/involute.h; sourceTree = "<group>"; };
                AFE6A1970CDD7B2E002805BF /* MoebiusGears.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MoebiusGears.saver; sourceTree = BUILT_PRODUCTS_DIR; };
-               AFE6A19A0CDD7B2F002805BF /* XScreenSaver copy.plist */ = {isa = PBXFileReference; lastKnownFileType = text.xml; name = "XScreenSaver copy.plist"; path = "OSX/XScreenSaver copy.plist"; sourceTree = "<group>"; };
                AFE6A40B0CDD7BC3002805BF /* moebiusgears.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = moebiusgears.c; path = hacks/glx/moebiusgears.c; sourceTree = "<group>"; };
                AFE6A40D0CDD7BDC002805BF /* moebiusgears.xml */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; path = moebiusgears.xml; sourceTree = "<group>"; };
                AFE6A42D0CDD7FAA002805BF /* Abstractile.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Abstractile.saver; sourceTree = BUILT_PRODUCTS_DIR; };
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF1A176A0D6D6EE3008AF328 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF1A176B0D6D6EE3008AF328 /* libjwxyz.a in Frameworks */,
+                               AF1A176C0D6D6EE3008AF328 /* ScreenSaver.framework in Frameworks */,
+                               AF1A176D0D6D6EE3008AF328 /* Cocoa.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               AF3C714D0D624BF50030CC0D /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF3C714E0D624BF50030CC0D /* libjwxyz.a in Frameworks */,
+                               AF3C714F0D624BF50030CC0D /* ScreenSaver.framework in Frameworks */,
+                               AF3C71500D624BF50030CC0D /* Cocoa.framework in Frameworks */,
+                               AF3C71510D624BF50030CC0D /* AGL.framework in Frameworks */,
+                               AF3C71520D624BF50030CC0D /* OpenGL.framework in Frameworks */,
+                               AF3C71530D624BF50030CC0D /* Carbon.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF476FBE099D154F001F091E /* Frameworks */ = {
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF4FF4C20D52CBDE00666F98 /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF4FF4C30D52CBDE00666F98 /* libjwxyz.a in Frameworks */,
+                               AF4FF4C40D52CBDE00666F98 /* ScreenSaver.framework in Frameworks */,
+                               AF4FF4C50D52CBDE00666F98 /* Cocoa.framework in Frameworks */,
+                               AF4FF4C60D52CBDE00666F98 /* AGL.framework in Frameworks */,
+                               AF4FF4C70D52CBDE00666F98 /* OpenGL.framework in Frameworks */,
+                               AF4FF4C80D52CBDE00666F98 /* Carbon.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF6423FA099FF9C2000F4CD4 /* Frameworks */ = {
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                                AFE6A1970CDD7B2E002805BF /* MoebiusGears.saver */,
                                AFE6A42D0CDD7FAA002805BF /* Abstractile.saver */,
                                AF4FD6FA0CE7A486005EE58E /* Lockward.saver */,
+                               AF4FF4CE0D52CBDE00666F98 /* CubicGrid.saver */,
+                               AF3C71590D624BF50030CC0D /* Hypnowheel.saver */,
+                               AF1A17730D6D6EE3008AF328 /* LCDscrub.saver */,
                        );
                        name = Products;
                        sourceTree = "<group>";
                                8D1107310486CEB800E47090 /* XScreenSaver.plist */,
                                AF0FAF1209CA712600EE1051 /* xscreensaver-getimage-file */,
                                AF0FAF0B09CA6FF900EE1051 /* xscreensaver-text */,
-                               AF0DCA570C4CBB0E00D76972 /* XScreenSaver copy.plist */,
-                               AFE6A19A0CDD7B2F002805BF /* XScreenSaver copy.plist */,
-                               AF4FD6FD0CE7A486005EE58E /* XScreenSaver copy.plist */,
                        );
                        name = Resources;
                        sourceTree = "<group>";
                                AF64270709A1C9EF000F4CD4 /* sonar.c */,
                                AF4771BA099D4997001F091E /* t3d.c */,
                                AF477192099D4864001F091E /* wander.c */,
+                               AF1A177E0D6D6F3E008AF328 /* lcdscrub.c */,
                                AF47717C099D47D3001F091E /* compass.c */,
                                AF477145099D43E2001F091E /* deluxe.c */,
                                AF476FF0099D1713001F091E /* truchet.c */,
                                AFE6A16B0CDD78EA002805BF /* involute.h */,
                                AF0DCA5F0C4CBB7300D76972 /* voronoi.c */,
                                AFA563660993970F00F3E977 /* cube21.c */,
+                               AF4FF4D00D52CC8400666F98 /* cubicgrid.c */,
                                AFA563460993963400F3E977 /* glhanoi.c */,
                                AF77778B09B64A2A00EA3033 /* gleidescope.c */,
                                AF7777A509B64AFC00EA3033 /* mirrorblob.c */,
                                AFA55E9F0993608800F3E977 /* toaster_handle.c */,
                                AFA55EA00993608800F3E977 /* toaster_handle.dxf */,
                                AFA55EA10993608800F3E977 /* toaster_handle2.c */,
+                               AF3C715D0D624C600030CC0D /* hypnowheel.c */,
                                AFA55EA20993608800F3E977 /* toaster_handle2.dxf */,
                                AFA55EA30993608800F3E977 /* toaster_jet.c */,
                                AFA55EA40993608800F3E977 /* toaster_jet.dxf */,
                                AFC2588C0988A468000655EE /* critical.xml */,
                                AFC2588D0988A468000655EE /* crystal.xml */,
                                AFC2588E0988A468000655EE /* cube21.xml */,
+                               AF4FF4D30D52CCAA00666F98 /* cubicgrid.xml */,
                                AFC2588F0988A468000655EE /* cubenetic.xml */,
                                AFC258900988A468000655EE /* cubestorm.xml */,
                                AFC258910988A468000655EE /* cynosure.xml */,
                                AFC259240988A469000655EE /* timetunnel.xml */,
                                AF0DCA610C4CBB8E00D76972 /* voronoi.xml */,
                                AFC259250988A469000655EE /* triangle.xml */,
+                               AF1A17800D6D6F62008AF328 /* lcdscrub.xml */,
                                AFC259260988A469000655EE /* truchet.xml */,
                                AFC259270988A469000655EE /* twang.xml */,
                                AFC259280988A469000655EE /* vermiculate.xml */,
                                AFC259290988A469000655EE /* vidwhacker.xml */,
+                               AF3C715F0D624C7C0030CC0D /* hypnowheel.xml */,
                                AFC2592A0988A469000655EE /* vines.xml */,
                                AF4FD7020CE7A5BC005EE58E /* lockward.xml */,
                                AFC2592B0988A469000655EE /* wander.xml */,
 /* End PBXHeadersBuildPhase section */
 
 /* Begin PBXLegacyTarget section */
+               AF4FF4930D52CA0800666F98 /* m6502.h */ = {
+                       isa = PBXLegacyTarget;
+                       buildArgumentsString = "m6502.sh $(PRODUCT_NAME) images/m6502/*.asm";
+                       buildConfigurationList = AF4FF4940D52CA0800666F98 /* Build configuration list for PBXLegacyTarget "m6502.h" */;
+                       buildPhases = (
+                       );
+                       buildToolPath = /bin/sh;
+                       buildWorkingDirectory = hacks/;
+                       dependencies = (
+                       );
+                       name = m6502.h;
+                       passBuildSettingsInEnvironment = 1;
+                       productName = molecules.h;
+               };
                AFA56119099378CB00F3E977 /* molecules.h */ = {
                        isa = PBXLegacyTarget;
                        buildArgumentsString = "molecules.sh $(PRODUCT_NAME) ../images/molecules/*.pdb";
                        buildRules = (
                        );
                        dependencies = (
+                               AF4FF4980D52CA5000666F98 /* PBXTargetDependency */,
                                AF0DC7AC0C4C73F600D76972 /* PBXTargetDependency */,
                        );
                        name = m6502;
                        productReference = AF0DCA560C4CBB0D00D76972 /* Voronoi.saver */;
                        productType = "com.apple.product-type.bundle";
                };
+               AF1A17610D6D6EE3008AF328 /* LCDscrub */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = AF1A17700D6D6EE3008AF328 /* Build configuration list for PBXNativeTarget "LCDscrub" */;
+                       buildPhases = (
+                               AF1A17640D6D6EE3008AF328 /* Resources */,
+                               AF1A17670D6D6EE3008AF328 /* Sources */,
+                               AF1A176A0D6D6EE3008AF328 /* Frameworks */,
+                               AF1A176E0D6D6EE3008AF328 /* Rez */,
+                               AF1A176F0D6D6EE3008AF328 /* ShellScript */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               AF1A17620D6D6EE3008AF328 /* PBXTargetDependency */,
+                       );
+                       name = LCDscrub;
+                       productName = Zoom;
+                       productReference = AF1A17730D6D6EE3008AF328 /* LCDscrub.saver */;
+                       productType = "com.apple.product-type.bundle";
+               };
+               AF3C71450D624BF50030CC0D /* Hypnowheel */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = AF3C71560D624BF50030CC0D /* Build configuration list for PBXNativeTarget "Hypnowheel" */;
+                       buildPhases = (
+                               AF3C71480D624BF50030CC0D /* Resources */,
+                               AF3C714A0D624BF50030CC0D /* Sources */,
+                               AF3C714D0D624BF50030CC0D /* Frameworks */,
+                               AF3C71540D624BF50030CC0D /* Rez */,
+                               AF3C71550D624BF50030CC0D /* ShellScript */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               AF3C71460D624BF50030CC0D /* PBXTargetDependency */,
+                       );
+                       name = Hypnowheel;
+                       productName = TopBlock;
+                       productReference = AF3C71590D624BF50030CC0D /* Hypnowheel.saver */;
+                       productType = "com.apple.product-type.bundle";
+               };
                AF476FB5099D154F001F091E /* Interference */ = {
                        isa = PBXNativeTarget;
                        buildConfigurationList = AF476FC3099D154F001F091E /* Build configuration list for PBXNativeTarget "Interference" */;
                        productReference = AF4FD6FA0CE7A486005EE58E /* Lockward.saver */;
                        productType = "com.apple.product-type.bundle";
                };
+               AF4FF4BA0D52CBDE00666F98 /* CubicGrid */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = AF4FF4CB0D52CBDE00666F98 /* Build configuration list for PBXNativeTarget "CubicGrid" */;
+                       buildPhases = (
+                               AF4FF4BD0D52CBDE00666F98 /* Resources */,
+                               AF4FF4BF0D52CBDE00666F98 /* Sources */,
+                               AF4FF4C20D52CBDE00666F98 /* Frameworks */,
+                               AF4FF4C90D52CBDE00666F98 /* Rez */,
+                               AF4FF4CA0D52CBDE00666F98 /* ShellScript */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               AF4FF4BB0D52CBDE00666F98 /* PBXTargetDependency */,
+                       );
+                       name = CubicGrid;
+                       productName = Cubenetic;
+                       productReference = AF4FF4CE0D52CBDE00666F98 /* CubicGrid.saver */;
+                       productType = "com.apple.product-type.bundle";
+               };
                AF6423F2099FF9C2000F4CD4 /* Extrusion */ = {
                        isa = PBXNativeTarget;
                        buildConfigurationList = AF642402099FF9C2000F4CD4 /* Build configuration list for PBXNativeTarget "Extrusion" */;
                                AF9D4C2B09B59A49006E59CF /* Jigsaw */,
                                AF477499099D8A74001F091E /* Kaleidescope */,
                                AF477613099DA26C001F091E /* Kumppa */,
+                               AF1A17610D6D6EE3008AF328 /* LCDscrub */,
                                AF4774B4099D8B5F001F091E /* LMorph */,
+                               AF4FF4930D52CA0800666F98 /* m6502.h */,
                                AF0DC7AB0C4C73F600D76972 /* m6502 */,
                                AF4774CE099D8BFF001F091E /* Maze */,
                                AF975AFC099C6FE400B05160 /* MemScroller */,
                                AFD56F0B0996AAFA00BA26F7 /* Vines */,
                                AFD5709B0996B88E00BA26F7 /* Worm */,
                                AF480D59098EED5100FB32B8 /* All Savers (OpenGL) */,
-                               AFA56119099378CB00F3E977 /* molecules.h */,
                                AFA5604A09936E2100F3E977 /* AntInspect */,
                                AFA562DA099393C900F3E977 /* AntMaze */,
                                AFA5606209936F3800F3E977 /* AntSpotlight */,
                                AFA56351099396C000F3E977 /* Cube21 */,
                                AFA55D620993584B00F3E977 /* Cubenetic */,
                                AFA55FD309936BFA00F3E977 /* CubeStorm */,
+                               AF4FF4BA0D52CBDE00666F98 /* CubicGrid */,
                                AF4810EB09909FBA00FB32B8 /* DangerBall */,
                                AF77786109B6536000EA3033 /* DNAlogo */,
                                AFA55E0D09935EDC00F3E977 /* Endgame */,
                                AFA55C77099349A600F3E977 /* GLSnake */,
                                AFD56DF10996A03800BA26F7 /* GLText */,
                                AFA55F420993629000F3E977 /* HyperTorus */,
+                               AF3C71450D624BF50030CC0D /* Hypnowheel */,
                                AFA55F06099361B700F3E977 /* JigglyPuff */,
                                AFA563A4099398BB00F3E977 /* Juggler3D */,
                                AFA55F2A0993622F00F3E977 /* Klein */,
                                AF77778E09B64A5200EA3033 /* MirrorBlob */,
                                AFA5596D0993317900F3E977 /* Moebius */,
                                AFE6A1820CDD7B2E002805BF /* MoebiusGears */,
+                               AFA56119099378CB00F3E977 /* molecules.h */,
                                AFA560FD0993781600F3E977 /* Molecule */,
                                AFA559B50993328000F3E977 /* Morph3D */,
                                AFA5617B09937CF100F3E977 /* Noof */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF1A17640D6D6EE3008AF328 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF1A17660D6D6EE3008AF328 /* xscreensaver-getimage-file in Resources */,
+                               AF1A17810D6D6F62008AF328 /* lcdscrub.xml in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               AF3C71480D624BF50030CC0D /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF3C71600D624C7C0030CC0D /* hypnowheel.xml in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF476FB8099D154F001F091E /* Resources */ = {
                        isa = PBXResourcesBuildPhase;
                        buildActionMask = 2147483647;
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF4FF4BD0D52CBDE00666F98 /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF4FF4D40D52CCAA00666F98 /* cubicgrid.xml in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF6423F5099FF9C2000F4CD4 /* Resources */ = {
                        isa = PBXResourcesBuildPhase;
                        buildActionMask = 2147483647;
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF1A176E0D6D6EE3008AF328 /* Rez */ = {
+                       isa = PBXRezBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               AF3C71540D624BF50030CC0D /* Rez */ = {
+                       isa = PBXRezBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF476FC2099D154F001F091E /* Rez */ = {
                        isa = PBXRezBuildPhase;
                        buildActionMask = 2147483647;
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF4FF4C90D52CBDE00666F98 /* Rez */ = {
+                       isa = PBXRezBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF642401099FF9C2000F4CD4 /* Rez */ = {
                        isa = PBXRezBuildPhase;
                        buildActionMask = 2147483647;
                        shellScript = "$SOURCE_ROOT/OSX/update-info-plist.pl $BUILT_PRODUCTS_DIR/$PRODUCT_NAME$WRAPPER_SUFFIX";
                        showEnvVarsInLog = 0;
                };
+               AF1A176F0D6D6EE3008AF328 /* ShellScript */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "$SOURCE_ROOT/OSX/update-info-plist.pl $BUILT_PRODUCTS_DIR/$PRODUCT_NAME$WRAPPER_SUFFIX";
+                       showEnvVarsInLog = 0;
+               };
+               AF3C71550D624BF50030CC0D /* ShellScript */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "$SOURCE_ROOT/OSX/update-info-plist.pl $BUILT_PRODUCTS_DIR/$PRODUCT_NAME$WRAPPER_SUFFIX";
+                       showEnvVarsInLog = 0;
+               };
                AF48DEFF0A0C25E000F94CF9 /* ShellScript */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
                        shellScript = "$SOURCE_ROOT/OSX/update-info-plist.pl $BUILT_PRODUCTS_DIR/$PRODUCT_NAME$WRAPPER_SUFFIX";
                        showEnvVarsInLog = 0;
                };
+               AF4FF4CA0D52CBDE00666F98 /* ShellScript */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "$SOURCE_ROOT/OSX/update-info-plist.pl $BUILT_PRODUCTS_DIR/$PRODUCT_NAME$WRAPPER_SUFFIX";
+                       showEnvVarsInLog = 0;
+               };
                AF998EEA0A083DB30051049D /* ShellScript */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF1A17670D6D6EE3008AF328 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF1A17680D6D6EE3008AF328 /* XScreenSaverSubclass.m in Sources */,
+                               AF1A177F0D6D6F3E008AF328 /* lcdscrub.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
+               AF3C714A0D624BF50030CC0D /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF3C714B0D624BF50030CC0D /* XScreenSaverSubclass.m in Sources */,
+                               AF3C715E0D624C600030CC0D /* hypnowheel.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF476FBB099D154F001F091E /* Sources */ = {
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF4FF4BF0D52CBDE00666F98 /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF4FF4C10D52CBDE00666F98 /* XScreenSaverSubclass.m in Sources */,
+                               AF4FF4D10D52CC8400666F98 /* cubicgrid.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF6423F7099FF9C2000F4CD4 /* Sources */ = {
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        target = AF0DCA420C4CBB0D00D76972 /* Voronoi */;
                        targetProxy = AF0DCA5B0C4CBB4300D76972 /* PBXContainerItemProxy */;
                };
+               AF1A17620D6D6EE3008AF328 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = AF4808C0098C3B6C00FB32B8 /* jwxyz */;
+                       targetProxy = AF1A17630D6D6EE3008AF328 /* PBXContainerItemProxy */;
+               };
+               AF1A17840D6D6FA7008AF328 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = AF1A17610D6D6EE3008AF328 /* LCDscrub */;
+                       targetProxy = AF1A17830D6D6FA7008AF328 /* PBXContainerItemProxy */;
+               };
+               AF3C71460D624BF50030CC0D /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = AF4808C0098C3B6C00FB32B8 /* jwxyz */;
+                       targetProxy = AF3C71470D624BF50030CC0D /* PBXContainerItemProxy */;
+               };
+               AF42C5160D624E9200B27FF6 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = AF3C71450D624BF50030CC0D /* Hypnowheel */;
+                       targetProxy = AF42C5150D624E9200B27FF6 /* PBXContainerItemProxy */;
+               };
                AF476FB6099D154F001F091E /* PBXTargetDependency */ = {
                        isa = PBXTargetDependency;
                        target = AF4808C0098C3B6C00FB32B8 /* jwxyz */;
                        target = AF4FD6E60CE7A486005EE58E /* Lockward */;
                        targetProxy = AF4FD6FE0CE7A4F9005EE58E /* PBXContainerItemProxy */;
                };
+               AF4FF4980D52CA5000666F98 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = AF4FF4930D52CA0800666F98 /* m6502.h */;
+                       targetProxy = AF4FF4970D52CA5000666F98 /* PBXContainerItemProxy */;
+               };
+               AF4FF4BB0D52CBDE00666F98 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = AF4808C0098C3B6C00FB32B8 /* jwxyz */;
+                       targetProxy = AF4FF4BC0D52CBDE00666F98 /* PBXContainerItemProxy */;
+               };
+               AF4FF4D70D52CD0D00666F98 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = AF4FF4BA0D52CBDE00666F98 /* CubicGrid */;
+                       targetProxy = AF4FF4D60D52CD0D00666F98 /* PBXContainerItemProxy */;
+               };
                AF6423F3099FF9C2000F4CD4 /* PBXTargetDependency */ = {
                        isa = PBXTargetDependency;
                        target = AF4808C0098C3B6C00FB32B8 /* jwxyz */;
                        };
                        name = Release;
                };
+               AF1A17710D6D6EE3008AF328 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                       };
+                       name = Debug;
+               };
+               AF1A17720D6D6EE3008AF328 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                       };
+                       name = Release;
+               };
+               AF3C71570D624BF50030CC0D /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
+                                       "USE_GL=1",
+                                       "$(GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS)",
+                               );
+                       };
+                       name = Debug;
+               };
+               AF3C71580D624BF50030CC0D /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
+                                       "USE_GL=1",
+                                       "$(GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS)",
+                               );
+                       };
+                       name = Release;
+               };
                AF476FC4099D154F001F091E /* Debug */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
                        };
                        name = Release;
                };
+               AF4FF4950D52CA0800666F98 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = NO;
+                               GCC_DYNAMIC_NO_PIC = NO;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
+                               GCC_OPTIMIZATION_LEVEL = 0;
+                               PRODUCT_NAME = m6502.h;
+                       };
+                       name = Debug;
+               };
+               AF4FF4960D52CA0800666F98 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               COPY_PHASE_STRIP = YES;
+                               GCC_ENABLE_FIX_AND_CONTINUE = NO;
+                               GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+                               PRODUCT_NAME = m6502.h;
+                               ZERO_LINK = NO;
+                       };
+                       name = Release;
+               };
+               AF4FF4CC0D52CBDE00666F98 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
+                                       "USE_GL=1",
+                                       "$(GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS)",
+                               );
+                       };
+                       name = Debug;
+               };
+               AF4FF4CD0D52CBDE00666F98 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
+                                       "USE_GL=1",
+                                       "$(GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS)",
+                               );
+                       };
+                       name = Release;
+               };
                AF642403099FF9C2000F4CD4 /* Debug */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Release;
                };
+               AF1A17700D6D6EE3008AF328 /* Build configuration list for PBXNativeTarget "LCDscrub" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               AF1A17710D6D6EE3008AF328 /* Debug */,
+                               AF1A17720D6D6EE3008AF328 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               AF3C71560D624BF50030CC0D /* Build configuration list for PBXNativeTarget "Hypnowheel" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               AF3C71570D624BF50030CC0D /* Debug */,
+                               AF3C71580D624BF50030CC0D /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
                AF476FC3099D154F001F091E /* Build configuration list for PBXNativeTarget "Interference" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Release;
                };
+               AF4FF4940D52CA0800666F98 /* Build configuration list for PBXLegacyTarget "m6502.h" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               AF4FF4950D52CA0800666F98 /* Debug */,
+                               AF4FF4960D52CA0800666F98 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
+               AF4FF4CB0D52CBDE00666F98 /* Build configuration list for PBXNativeTarget "CubicGrid" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               AF4FF4CC0D52CBDE00666F98 /* Debug */,
+                               AF4FF4CD0D52CBDE00666F98 /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
                AF642402099FF9C2000F4CD4 /* Build configuration list for PBXNativeTarget "Extrusion" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (