From http://www.jwz.org/xscreensaver/xscreensaver-5.37.tar.gz
authorZygo Blaxell <zblaxell@waya.furryterror.org>
Wed, 5 Jul 2017 21:32:57 +0000 (17:32 -0400)
committerZygo Blaxell <zblaxell@waya.furryterror.org>
Wed, 5 Jul 2017 21:36:06 +0000 (17:36 -0400)
-rw-rw-r-- 1 zblaxell zblaxell 10598833 Jul  5 15:38 xscreensaver-5.37.tar.gz
22e438589c25a485a12ba5ae8462e38c5f5f0e07  xscreensaver-5.37.tar.gz

292 files changed:
Makefile.in
OSX/Makefile
OSX/SaverRunner.h
OSX/SaverRunner.m
OSX/SaverRunner.plist
OSX/Updater.plist
OSX/XScreenSaver.plist
OSX/XScreenSaverConfigSheet.m
OSX/XScreenSaverGLView.h
OSX/XScreenSaverGLView.m
OSX/XScreenSaverView.h
OSX/XScreenSaverView.m
OSX/bindist.rtf
OSX/grabclient-ios.m
OSX/grabclient-osx.m
OSX/iSaverRunner.plist
OSX/iSaverRunner.xib
OSX/ios-function-table.m
OSX/seticon.pl
OSX/settings.png [new file with mode: 0644]
OSX/settings@2x.png [new file with mode: 0644]
OSX/settings@3x.png [new file with mode: 0644]
OSX/stop.png [new file with mode: 0644]
OSX/stop@2x.png [new file with mode: 0644]
OSX/stop@3x.png [new file with mode: 0644]
OSX/update-info-plist.pl
OSX/updates.xml
OSX/xscreensaver.xcodeproj/project.pbxproj
README
android/Makefile
android/README
android/project/xscreensaver/jni/Android.mk
android/project/xscreensaver/res/layout-land/activity_xscreensaver.xml [new file with mode: 0644]
android/project/xscreensaver/res/layout/activity_xscreensaver.xml
android/project/xscreensaver/src/org/jwz/xscreensaver/XScreenSaverActivity.java
android/project/xscreensaver/src/org/jwz/xscreensaver/XScreenSaverDaydream.java
android/project/xscreensaver/src/org/jwz/xscreensaver/XScreenSaverRenderer.java
android/project/xscreensaver/src/org/jwz/xscreensaver/XScreenSaverWallpaper.java [new file with mode: 0644]
android/project/xscreensaver/src/org/jwz/xscreensaver/jwxyz.java
config.h.in
configure
configure.in
driver/Makefile.in
driver/XScreenSaver.ad.in
driver/XScreenSaver_ad.h
driver/dpms.c
driver/passwd-pam.c
driver/splash.c
driver/subprocs.c
driver/timers.c
driver/xscreensaver-getimage-file
driver/xscreensaver-text
driver/xscreensaver.c
driver/xscreensaver.man
hacks/Makefile.in
hacks/analogtv.c
hacks/analogtv.h
hacks/ant.c
hacks/apollonian.c
hacks/apple2-main.c
hacks/asm6502.c
hacks/blitspin.c
hacks/bouboule.c
hacks/braid.c
hacks/bsod.c
hacks/bsod.man
hacks/bumps.c
hacks/check-configs.pl
hacks/config/README
hacks/config/bsod.xml
hacks/config/flurry.xml
hacks/config/mirrorblob.xml
hacks/config/splodesic.xml
hacks/config/strange.xml
hacks/config/timetunnel.xml
hacks/config/unicrud.xml
hacks/config/vigilance.xml [new file with mode: 0644]
hacks/crystal.c
hacks/demon.c
hacks/discrete.c
hacks/distort.c
hacks/drift.c
hacks/euler2d.c
hacks/fadeplot.c
hacks/fiberlamp.c
hacks/fireworkx.c
hacks/flag.c
hacks/flow.c
hacks/fontglide.c
hacks/forest.c
hacks/galaxy.c
hacks/glx/Makefile.in
hacks/glx/antinspect.c
hacks/glx/antmaze.c
hacks/glx/antspotlight.c
hacks/glx/atlantis.c
hacks/glx/atunnel.c
hacks/glx/b_lockglue.c
hacks/glx/blinkbox.c
hacks/glx/blocktube.c
hacks/glx/boing.c
hacks/glx/bouncingcow.c
hacks/glx/boxed.c
hacks/glx/cage.c
hacks/glx/carousel.c
hacks/glx/circuit.c
hacks/glx/cityflow.c
hacks/glx/companion.c
hacks/glx/crackberg.c
hacks/glx/cube21.c
hacks/glx/cubenetic.c
hacks/glx/cubestack.c
hacks/glx/cubestorm.c
hacks/glx/cubetwist.c
hacks/glx/cubicgrid.c
hacks/glx/dangerball.c
hacks/glx/discoball.c
hacks/glx/dnalogo.c
hacks/glx/dymaxionmap.c
hacks/glx/endgame.c
hacks/glx/energystream.c
hacks/glx/engine.c
hacks/glx/extrusion.c
hacks/glx/flipflop.c
hacks/glx/flipscreen3d.c
hacks/glx/fliptext.c
hacks/glx/flurry-smoke.c
hacks/glx/flurry.c
hacks/glx/flurry.h
hacks/glx/flyingtoasters.c
hacks/glx/gears.c
hacks/glx/geodesic.c
hacks/glx/geodesicgears.c
hacks/glx/gflux.c
hacks/glx/glblur.c
hacks/glx/glcells.c
hacks/glx/gleidescope.c
hacks/glx/glforestfire.c
hacks/glx/glhanoi.c
hacks/glx/glknots.c
hacks/glx/glmatrix.c
hacks/glx/glplanet.c
hacks/glx/glschool.c
hacks/glx/glslideshow.c
hacks/glx/glsnake.c
hacks/glx/gltext.c
hacks/glx/gltrackball.c
hacks/glx/gltrackball.h
hacks/glx/grab-ximage.c
hacks/glx/hexstrut.c
hacks/glx/hilbert.c
hacks/glx/hydrostat.c
hacks/glx/hypertorus.c
hacks/glx/hypnowheel.c
hacks/glx/jigglypuff.c
hacks/glx/jigsaw.c
hacks/glx/juggler3d.c
hacks/glx/kaleidocycle.c
hacks/glx/klein.c
hacks/glx/lament.c
hacks/glx/lavalite.c
hacks/glx/lockward.c
hacks/glx/menger.c
hacks/glx/mirrorblob.c
hacks/glx/moebius.c
hacks/glx/moebiusgears.c
hacks/glx/molecule.c
hacks/glx/morph3d.c
hacks/glx/noof.c
hacks/glx/photopile.c
hacks/glx/photopile.man
hacks/glx/pinion.c
hacks/glx/pipes.c
hacks/glx/polyhedra-gl.c
hacks/glx/polytopes.c
hacks/glx/projectiveplane.c
hacks/glx/providence.c
hacks/glx/pulsar.c
hacks/glx/quasicrystal.c
hacks/glx/queens.c
hacks/glx/raverhoop.c
hacks/glx/romanboy.c
hacks/glx/rubik.c
hacks/glx/rubikblocks.c
hacks/glx/sballs.c
hacks/glx/seccam.c [new file with mode: 0644]
hacks/glx/seccam.dxf [new file with mode: 0644]
hacks/glx/sierpinski3d.c
hacks/glx/skytentacles.c
hacks/glx/sonar-icmp.c
hacks/glx/sonar.c
hacks/glx/spheremonics.c
hacks/glx/splitflap.c
hacks/glx/splodesic.c
hacks/glx/sproingies.c
hacks/glx/sproingies.h
hacks/glx/sproingiewrap.c
hacks/glx/stairs.c
hacks/glx/starwars.c
hacks/glx/stonerview.c
hacks/glx/superquadrics.c
hacks/glx/surfaces.c
hacks/glx/tangram.c
hacks/glx/texfont.c
hacks/glx/timetunnel.c
hacks/glx/topblock.c
hacks/glx/tronbit.c
hacks/glx/unicrud.c
hacks/glx/unicrud.man
hacks/glx/unknownpleasures.c
hacks/glx/vigilance.c [new file with mode: 0644]
hacks/glx/vigilance.man [new file with mode: 0644]
hacks/glx/voronoi.c
hacks/glx/winduprobot.c
hacks/glx/xpm-ximage.c
hacks/grav.c
hacks/hopalong.c
hacks/hyperball.c
hacks/hypercube.c
hacks/images/apple.xbm [new file with mode: 0644]
hacks/interaggregate.c
hacks/interference.c
hacks/juggle.c
hacks/julia.c
hacks/laser.c
hacks/lightning.c
hacks/lisa.c
hacks/lissie.c
hacks/loop.c
hacks/m6502.c
hacks/memscroller.c
hacks/moire.c
hacks/mountain.c
hacks/pacman.c
hacks/penrose.c
hacks/polyominoes.c
hacks/rd-bomb.c
hacks/ripples.c
hacks/rotor.c
hacks/rotzoomer.c
hacks/screenhack.c
hacks/sierpinski.c
hacks/slip.c
hacks/sphere.c
hacks/spiral.c
hacks/strange.c
hacks/strange.man
hacks/swirl.c
hacks/t3d.c
hacks/tessellimage.c
hacks/testx11.c
hacks/thornbird.c
hacks/triangle.c
hacks/twang.c
hacks/vines.c
hacks/webcollage
hacks/worm.c
hacks/xanalogtv.c
hacks/xflame.c
hacks/xlockmore.c
hacks/xlockmore.h
hacks/xlockmoreI.h
jwxyz/Makefile.in
jwxyz/jwxyz-android.c
jwxyz/jwxyz-android.h
jwxyz/jwxyz-cocoa.h
jwxyz/jwxyz-cocoa.m
jwxyz/jwxyz-common.c
jwxyz/jwxyz-gl.c
jwxyz/jwxyz-timers.c
jwxyz/jwxyz.h
jwxyz/jwxyz.m
jwxyz/jwxyzI.h
jwxyz/jwzgles.c
jwxyz/jwzglesI.h
po/POTFILES.in
po/ca.po [deleted file]
utils/Makefile.in
utils/aligned_malloc.c
utils/aligned_malloc.h
utils/compile_axp.com
utils/compile_decc.com
utils/grabclient.c
utils/grabscreen.h
utils/pow2.c [new file with mode: 0644]
utils/pow2.h [new file with mode: 0644]
utils/version.h
utils/visual.c
utils/visual.h
utils/xshm.c
utils/xshm.h
xscreensaver.spec

index c919051831d5c5f738a4134fd808958100539261..cf80264b42dd5b8491fc43b8450caa4e842eb85f 100644 (file)
@@ -18,21 +18,21 @@ TARFILES    = README README.hacking README.VMS INSTALL \
 
 TAR            = tar
 
-MAKE_SUBDIR  = for dir in $(SUBDIRS); do $(MAKE) -C $$dir $@ || exit 5; done
-MAKE_SUBDIR2 = for dir in $(SUBDIRS2); do $(MAKE) -C $$dir $@ || exit 5; done
+MAKE_SUBDIR  = for dir in $(SUBDIRS); do (cd $$dir; $(MAKE) $@) || exit 5; done
+MAKE_SUBDIR2 = for dir in $(SUBDIRS2); do (cd $$dir; $(MAKE) $@) || exit 5; done
 
 default::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 all::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 install::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 install-program::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 install-man::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 install-strip::
-       @$(MAKE_SUBDIR)
+       @+$(MAKE_SUBDIR)
 uninstall::
        @$(MAKE_SUBDIR)
 uninstall-program::
@@ -44,7 +44,7 @@ depend::
 distdepend::
        @$(MAKE) update_spec_version
        @$(MAKE_SUBDIR2)
-       @$(MAKE) -C po update-po
+       @cd po ; $(MAKE) update-po
 
 TAGS:: tags
 tags::
index 4fd574ca19282a9f7378e31c9fc104d951872116..492bc69ced2dcaeba56fef2f885f18ce8bd6a773 100644 (file)
@@ -52,7 +52,8 @@ Sparkle.framework:
 # update-info-plist.pl runs this as needed.
 # Might be better to do this with curl, since that is installed by default.
 
-URL = https://www.jwz.org/xscreensaver/screenshots/
+BASE = xscreensaver/screenshots/
+URL = https://www.jwz.org/$(BASE)
 WGET = wget -q -U xscreensaver-build-osx
 CVT  = -thumbnail '200x150^' -gravity center -extent 200x150 \
      \( +clone  -alpha extract \
@@ -75,16 +76,20 @@ $(THUMBDIR)/%.png:
        if [ ! -d $(THUMBDIR) ]; then mkdir -p $(THUMBDIR) ; fi ;       \
        rm -f "$$FILE2" "$$TMP" ;                                       \
        set +e ;                                                        \
-       echo "downloading $$URL..." ;                                   \
-       $(WGET) -O"$$TMP" "$$URL" ;                                     \
-       if [ ! -s "$$TMP" ]; then                                       \
-         echo "downloading $$URL2..." ;                                \
-         $(WGET) -O"$$TMP" "$$URL2" ;                                  \
-       fi ;                                                            \
-       if [ ! -s "$$TMP" ]; then                                       \
-         rm -f "$$TMP" ;                                               \
-         echo "failed: $$URL" ;                                        \
-         exit 1 ;                                                      \
+       if [ -f "$$HOME/www/$(BASE)/$$FILE1" ]; then                    \
+         cp -p "$$HOME/www/$(BASE)/$$FILE1" "$$TMP" ;                  \
+       else                                                            \
+         echo "downloading $$URL..." ;                                 \
+         $(WGET) -O"$$TMP" "$$URL" ;                                   \
+         if [ ! -s "$$TMP" ]; then                                     \
+           echo "downloading $$URL2..." ;                              \
+           $(WGET) -O"$$TMP" "$$URL2" ;                                \
+         fi ;                                                          \
+         if [ ! -s "$$TMP" ]; then                                     \
+           rm -f "$$TMP" ;                                             \
+           echo "failed: $$URL" ;                                      \
+           exit 1 ;                                                    \
+         fi ;                                                          \
        fi ;                                                            \
        rm -f "$$FILE2" ;                                               \
        convert jpg:- $(CVT) "$$FILE2" < "$$TMP" ;                      \
index 73b83e9d88a6a6495f6e2d33fec1205c34f8afff..073a87ed68d828a25d7c1074f34835c6a054cfea 100644 (file)
 #ifndef USE_IPHONE
 - (void) openPreferences: (id)sender;
 #else  // USE_IPHONE
-- (void) openPreferences: (NSString *)which;
 - (UIImage *) screenshot;
 - (NSString *) makeDesc:(NSString *)saver
                yearOnly:(BOOL) yearp;
index 20ddd650fb25ab44473dfd79d0b76e74cb26f8cd..5d0259b8ab5deef272d7fc75aa079916797528d5 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2006-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2017 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
     _showAboutBox = showAboutBox;
 
     self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
-    self.wantsFullScreenLayout = YES;
+
+# ifndef __IPHONE_7_0
+    self.wantsFullScreenLayout = YES;    // Deprecated as of iOS 7
+# endif
   }
   return self;
 }
 
+- (BOOL) prefersStatusBarHidden
+{
+  // Requires UIViewControllerBasedStatusBarAppearance = true in plist
+  return YES;
+}
 
 - (void)dealloc
 {
                             withSize:parentView.bounds.size];
 
   if (! _saverView) {
-    [[[UIAlertView alloc] initWithTitle: _saverName
-                          message: @"Unable to load!"
-                          delegate: nil
-                          cancelButtonTitle: @"Bummer"
-                          otherButtonTitles: nil]
-     show];
+    UIAlertController *c = [UIAlertController
+                             alertControllerWithTitle:@"Unable to load!"
+                             message:@""
+                             preferredStyle:UIAlertControllerStyleAlert];
+    [c addAction: [UIAlertAction actionWithTitle: @"Bummer"
+                                 style: UIAlertActionStyleDefault
+                                 handler: ^(UIAlertAction *a) {
+      // #### Should expose the SaverListController...
+    }]];
+    [self presentViewController:c animated:YES completion:nil];
+
     return;
   }
 
@@ -551,8 +564,8 @@ static ScreenSaverView *
 find_saverView_child (NSView *v)
 {
   NSArray *kids = [v subviews];
-  int nkids = [kids count];
-  int i;
+  NSUInteger nkids = [kids count];
+  NSUInteger i;
   for (i = 0; i < nkids; i++) {
     NSObject *kid = [kids objectAtIndex:i];
     if ([kid isKindOfClass:[ScreenSaverView class]]) {
@@ -589,8 +602,8 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str)
     [m setTitle: [[m title] stringByReplacingOccurrencesOfString:old_str
                             withString:new_str]];
     NSArray *kids = [m itemArray];
-    int nkids = [kids count];
-    int i;
+    NSUInteger nkids = [kids count];
+    NSUInteger i;
     for (i = 0; i < nkids; i++) {
       relabel_menus ([kids objectAtIndex:i], old_str, new_str);
     }
@@ -610,7 +623,7 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str)
   if ([sender isKindOfClass:[NSView class]]) { // Sent from button
     sv = find_saverView ((NSView *) sender);
   } else {
-    int i;
+    long i;
     NSWindow *w = 0;
     for (i = [windows count]-1; i >= 0; i--) { // Sent from menubar
       w = [windows objectAtIndex:i];
@@ -628,7 +641,7 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str)
       modalDelegate:self
      didEndSelector:@selector(preferencesClosed:returnCode:contextInfo:)
         contextInfo:nil];
-  int code = [NSApp runModalForWindow:prefs];
+  NSUInteger code = [NSApp runModalForWindow:prefs];
   
   /* Restart the animation if the "OK" button was hit, but not if "Cancel".
      We have to restart *both* animations, because the xlockmore-style
@@ -665,13 +678,12 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str)
 
   CGSize size = [[UIScreen mainScreen] bounds].size;
 
-  // iOS 7: Needs to be the actual device orientation.
+  // iOS 7: Needs to be [[window rootViewController] interfaceOrientation].
   // iOS 8: Needs to be UIInterfaceOrientationPortrait.
+  // (interfaceOrientation deprecated in iOS 8)
 
-  UIInterfaceOrientation orient =
-    NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_7_1 ?
-    UIInterfaceOrientationPortrait /* iOS 8 broke -[UIScreen bounds]. */ :
-    [[window rootViewController] interfaceOrientation];
+  UIInterfaceOrientation orient = UIInterfaceOrientationPortrait;
+  /* iOS 8 broke -[UIScreen bounds]. */
 
   if (orient == UIInterfaceOrientationLandscapeLeft ||
       orient == UIInterfaceOrientationLandscapeRight) {
@@ -687,10 +699,7 @@ relabel_menus (NSObject *v, NSString *old_str, NSString *new_str)
   // take the scale into consideration
   // On iOS prior to 4, fall back to use UIGraphicsBeginImageContext
 
-  if (UIGraphicsBeginImageContextWithOptions)
-    UIGraphicsBeginImageContextWithOptions (size, NO, 0);
-  else
-    UIGraphicsBeginImageContext (size);
+  UIGraphicsBeginImageContextWithOptions (size, NO, 0);
 
   CGContextRef ctx = UIGraphicsGetCurrentContext();
 
@@ -1577,7 +1586,7 @@ FAIL:
   if (!anim_timer) {
     Class ssm = NSClassFromString (@"ScreenSaverModule");
     if (ssm && [ssm instancesRespondToSelector:
-                      @selector(needsAnimationTimer)]) {
+                      NSSelectorFromString(@"needsAnimationTimer")]) {
       NSWindow *win = [windows objectAtIndex:0];
       ScreenSaverView *sv = find_saverView ([win contentView]);
       anim_timer = [NSTimer scheduledTimerWithTimeInterval:
index 2384a81d88676b5109a80c8bf1534f8df4a8e2d8..457c5f451f5437c5e13f0112ad906de6620e91ae 100644 (file)
@@ -7,7 +7,7 @@
        <key>CFBundleExecutable</key>
        <string>${EXECUTABLE_NAME}</string>
        <key>CFBundleGetInfoString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleIconFile</key>
        <string>SaverRunner</string>
        <key>CFBundleIdentifier</key>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleLongVersionString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleName</key>
        <string>${PRODUCT_NAME}</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>LSMinimumSystemVersion</key>
        <string>${MACOSX_DEPLOYMENT_TARGET}</string>
        <key>NSHumanReadableCopyright</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>NSMainNibFile</key>
        <string>SaverRunner</string>
        <key>NSPrincipalClass</key>
index 29f7f8d547d87a558c6545c501afd041bd1451da..515452ad7f1150ae8f65dd4d9d30f480fbafb495 100644 (file)
@@ -9,7 +9,7 @@
        <key>CFBundleExecutable</key>
        <string>${EXECUTABLE_NAME}</string>
        <key>CFBundleGetInfoString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleIconFile</key>
        <string>SaverRunner</string>
        <key>CFBundleIdentifier</key>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleLongVersionString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleName</key>
        <string>${PRODUCT_NAME}</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>LSMinimumSystemVersion</key>
        <string>${MACOSX_DEPLOYMENT_TARGET}</string>
        <key>LSUIElement</key>
        <true/>
        <key>NSHumanReadableCopyright</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>NSMainNibFile</key>
        <string>Updater</string>
        <key>NSPrincipalClass</key>
index fc21ef718d74005693d8ebb1b557e44b353cd8e4..04a25c58a68b86925def81a670ca7140794c3f50 100644 (file)
        <key>CFBundlePackageType</key>
        <string>BNDL</string>
        <key>CFBundleShortVersionString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>LSMinimumSystemVersion</key>
        <string>10.8</string>
        <key>NSMainNibFile</key>
index 51c13af4c6ca1fd7842e13469bc63635cef2dff9..eaa5add13cb4da1e07cf56c3f84c5763a4b5379b 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2006-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2017 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
@@ -457,9 +457,10 @@ static char *anchorize (const char *url);
   NSString *text = [self stripTags: html];
   CGSize s = r.size;
   s.height = 999999;
-  s = [text sizeWithFont: font
-            constrainedToSize: s
-            lineBreakMode:NSLineBreakByWordWrapping];
+  s = [text boundingRectWithSize:s
+                         options:NSStringDrawingUsesLineFragmentOrigin
+                      attributes:@{NSFontAttributeName: font}
+                         context:nil].size;
   r.size.height = s.height;
 # endif
 
@@ -921,6 +922,7 @@ unwrap (NSString *text)
       eolp = YES;
     } else if ([s characterAtIndex:0] == ' ' ||
                [s hasPrefix:@"Copyright "] ||
+               [s hasPrefix:@"https://"] ||
                [s hasPrefix:@"http://"]) {
       // don't unwrap if the following line begins with whitespace,
       // or with the word "Copyright", or if it begins with a URL.
@@ -966,12 +968,16 @@ boldify (NSText *nstext)
 static char *
 anchorize (const char *url)
 {
-  const char *wiki = "http://en.wikipedia.org/wiki/";
-  const char *math = "http://mathworld.wolfram.com/";
-  if (!strncmp (wiki, url, strlen(wiki))) {
+  const char *wiki1 =  "http://en.wikipedia.org/wiki/";
+  const char *wiki2 = "https://en.wikipedia.org/wiki/";
+  const char *math1 =  "http://mathworld.wolfram.com/";
+  const char *math2 = "https://mathworld.wolfram.com/";
+  if (!strncmp (wiki1, url, strlen(wiki1)) ||
+      !strncmp (wiki2, url, strlen(wiki2))) {
     char *anchor = (char *) malloc (strlen(url) * 3 + 10);
     strcpy (anchor, "Wikipedia: \"");
-    const char *in = url + strlen(wiki);
+    const char *in = url + strlen(!strncmp (wiki1, url, strlen(wiki1))
+                                  ? wiki1 : wiki2);
     char *out = anchor + strlen(anchor);
     while (*in) {
       if (*in == '_') {
@@ -997,10 +1003,12 @@ anchorize (const char *url)
     *out = 0;
     return anchor;
 
-  } else if (!strncmp (math, url, strlen(math))) {
+  } else if (!strncmp (math1, url, strlen(math1)) ||
+             !strncmp (math2, url, strlen(math2))) {
     char *anchor = (char *) malloc (strlen(url) * 3 + 10);
     strcpy (anchor, "MathWorld: \"");
-    const char *start = url + strlen(wiki);
+    const char *start = url + strlen(!strncmp (math1, url, strlen(math1))
+                                     ? math1 : math2);
     const char *in = start;
     char *out = anchor + strlen(anchor);
     while (*in) {
@@ -1040,7 +1048,7 @@ hreffify (NSText *nstext)
   NSString *text = [nstext text];
 # endif
 
-  int L = [text length];
+  NSUInteger L = [text length];
   NSRange start;               // range is start-of-search to end-of-string
   start.location = 0;
   start.length = L;
@@ -1048,7 +1056,14 @@ hreffify (NSText *nstext)
 
     // Find the beginning of a URL...
     //
-    NSRange r2 = [text rangeOfString:@"http://" options:0 range:start];
+    NSRange r2 = [text rangeOfString: @"http://" options:0 range:start];
+    NSRange r3 = [text rangeOfString:@"https://" options:0 range:start];
+    if ((r2.location == NSNotFound &&
+         r3.location != NSNotFound) ||
+        (r2.location != NSNotFound &&
+         r3.location != NSNotFound &&
+         r3.location < r2.location))
+      r2 = r3;
     if (r2.location == NSNotFound)
       break;
 
@@ -1058,9 +1073,9 @@ hreffify (NSText *nstext)
 
     // Find the end of a URL (whitespace or EOF)...
     //
-    NSRange r3 = [text rangeOfCharacterFromSet:
-                         [NSCharacterSet whitespaceAndNewlineCharacterSet]
-                       options:0 range:start];
+    r3 = [text rangeOfCharacterFromSet:
+                 [NSCharacterSet whitespaceAndNewlineCharacterSet]
+               options:0 range:start];
     if (r3.location == NSNotFound)    // EOF
       r3.location = L, r3.length = 0;
 
@@ -1101,7 +1116,7 @@ hreffify (NSText *nstext)
 
     free (anchor);
 
-    int L2 = [text length];  // might have changed
+    NSUInteger L2 = [text length];  // might have changed
     start.location -= (L - L2);
     L = L2;
   }
@@ -2058,7 +2073,7 @@ do_file_selector (NSTextField *txt, BOOL dirs_p)
   [panel setCanChooseFiles:!dirs_p];
   [panel setCanChooseDirectories:dirs_p];
 
-  int result = [panel runModal];
+  NSInteger result = [panel runModal];
   if (result == NSOKButton) {
     NSArray *files = [panel URLs];
     NSString *file = ([files count] > 0 ? [[files objectAtIndex:0] path] : @"");
@@ -2085,7 +2100,7 @@ find_text_field_of_button (NSButton *button)
 {
   NSView *parent = [button superview];
   NSArray *kids = [parent subviews];
-  int nkids = [kids count];
+  NSUInteger nkids = [kids count];
   int i;
   NSTextField *f = 0;
   for (i = 0; i < nkids; i++) {
@@ -2544,7 +2559,7 @@ static NSView *
 last_child (NSView *parent)
 {
   NSArray *kids = [parent subviews];
-  int nkids = [kids count];
+  NSUInteger nkids = [kids count];
   if (nkids == 0)
     return 0;
   else
@@ -2694,8 +2709,8 @@ static void
 layout_group (NSView *group, BOOL horiz_p)
 {
   NSArray *kids = [group subviews];
-  int nkids = [kids count];
-  int i;
+  NSUInteger nkids = [kids count];
+  NSUInteger i;
   double maxx = 0, miny = 0;
   for (i = 0; i < nkids; i++) {
     NSView *kid = [kids objectAtIndex:i];
@@ -2826,10 +2841,10 @@ fix_contentview_size (NSView *parent)
 {
   NSRect f;
   NSArray *kids = [parent subviews];
-  int nkids = [kids count];
+  NSUInteger nkids = [kids count];
   NSView *text = 0;  // the NSText at the bottom of the window
   double maxx = 0, miny = 0;
-  int i;
+  NSUInteger i;
 
   /* Find the size of the rectangle taken up by each of the children
      except the final "NSText" child.
@@ -3214,6 +3229,7 @@ wrap_with_buttons (NSWindow *window, NSView *panel)
   CGFloat max = 0;
   for (NSArray *a2 in a) {
     NSString *s = [a2 objectAtIndex:0];
+    // #### sizeWithFont deprecated as of iOS 7; use boundingRectWithSize.
     CGSize r = [s sizeWithFont:f];
     if (r.width > max) max = r.width;
   }
@@ -3252,7 +3268,7 @@ wrap_with_buttons (NSWindow *window, NSView *panel)
   [[self navigationItem] 
     setRightBarButtonItem: [[UIBarButtonItem alloc]
                              initWithTitle: @"Reset to Defaults"
-                             style: UIBarButtonItemStyleBordered
+                             style: UIBarButtonItemStylePlain
                              target:self
                              action:@selector(resetAction:)]];
   NSString *s = saver_name;
@@ -3524,14 +3540,15 @@ wrap_with_buttons (NSWindow *window, NSView *panel)
         [mid setFrame:r];
 
         if (top) {
-          r.size = [[top text] sizeWithFont:[top font]
-                               constrainedToSize:
-                                 CGSizeMake (ww - LEFT_MARGIN*2, 100000)
-                               lineBreakMode:[top lineBreakMode]];
 # ifdef LABEL_ABOVE_SLIDER
           // Top label goes above, flush center/top.
           r.origin.x = (ww - r.size.width) / 2;
           r.origin.y = 4;
+          // #### sizeWithFont deprecated as of iOS 7; use boundingRectWithSize.
+          r.size = [[top text] sizeWithFont:[top font]
+                               constrainedToSize:
+                                 CGSizeMake (ww - LEFT_MARGIN*2, 100000)
+                               lineBreakMode:[top lineBreakMode]];
 # else  // !LABEL_ABOVE_SLIDER
           // Label goes on the left.
           r.origin.x = LEFT_MARGIN;
@@ -3543,24 +3560,21 @@ wrap_with_buttons (NSWindow *window, NSView *panel)
         }
 
         // Left label goes under control, flush left/bottom.
-        r.size = [[left text] sizeWithFont:[left font]
-                              constrainedToSize:
-                                CGSizeMake(ww - LEFT_MARGIN*2, 100000)
-                              lineBreakMode:[left lineBreakMode]];
-        r.origin.x = [mid frame].origin.x;
-        r.origin.y = hh - r.size.height - 4;
-        [left setFrame:r];
+        left.frame = CGRectMake([mid frame].origin.x, hh - 4,
+                                ww - LEFT_MARGIN*2, 100000);
+        [left sizeToFit];
+        r = left.frame;
+        r.origin.y -= r.size.height;
+        left.frame = r;
 
         // Right label goes under control, flush right/bottom.
-        r = [right frame];
-        r.size = [[right text] sizeWithFont:[right font]
-                               constrainedToSize:
-                                 CGSizeMake(ww - LEFT_MARGIN*2, 1000000)
-                               lineBreakMode:[right lineBreakMode]];
-        r.origin.x = ([mid frame].origin.x + [mid frame].size.width -
-                      r.size.width);
-        r.origin.y = [left frame].origin.y;
-        [right setFrame:r];
+        right.frame =
+          CGRectMake([mid frame].origin.x + [mid frame].size.width,
+                     [left frame].origin.y, ww - LEFT_MARGIN*2, 1000000);
+        [right sizeToFit];
+        r = right.frame;
+        r.origin.x -= r.size.width;
+        right.frame = r;
 
         // Make a box and put the labels and slider into it.
         r.origin.x = 0;
index 6e05986f149b41b0c467f043792e364ff0c2dd28..a4d1ebfd60c1daeca980816499c0516b661abb66 100644 (file)
@@ -22,6 +22,7 @@
 # import <OpenGLES/ES1/gl.h>
 # import <OpenGLES/ES1/glext.h>
 # import <QuartzCore/QuartzCore.h>
+# import "jwzglesI.h"
 #else
 # import <AppKit/NSOpenGL.h>
 #endif
@@ -31,6 +32,7 @@
 # ifdef USE_IPHONE
   GLuint gl_depthbuffer;
   BOOL _suppressRotationAnimation;
+  jwzgles_state *_glesState;
 # endif /* USE_IPHONE */
 }
 
index 989f8eb9258f36a3a7193bc902f629b4b25e93b2..d61964f8d3b3fd0dad5fd909ecc3938c5b6be79b 100644 (file)
@@ -121,7 +121,7 @@ extern void check_gl_error (const char *type);
   BOOL was_initted_p = initted_p;
   [super render_x11];
 
-  if (! was_initted_p)
+  if (! was_initted_p && xdpy)
     _suppressRotationAnimation =
       get_boolean_resource (xdpy,
                             "suppressRotationAnimation",
@@ -262,6 +262,31 @@ extern void check_gl_error (const char *type);
   return kCAGravityCenter;
 }
 
+- (void) startAnimation
+{
+  [super startAnimation];
+  if (ogl_ctx) /* Almost always true. */
+    _glesState = jwzgles_make_state ();
+}
+
+- (void) stopAnimation
+{
+  [super stopAnimation];
+#ifdef USE_IPHONE
+  if (_glesState) {
+    [EAGLContext setCurrentContext:ogl_ctx];
+    jwzgles_make_current (_glesState);
+    jwzgles_free_state ();
+  }
+#endif
+}
+
+- (void) prepareContext
+{
+  [super prepareContext];
+  jwzgles_make_current (_glesState);
+}
+
 #endif // !USE_IPHONE
 
 
@@ -307,10 +332,6 @@ init_GL (ModeInfo *mi)
 
   // OpenGL initialization is in [XScreenSaverView startAnimation].
 
-# ifdef USE_IPHONE
-  jwzgles_reset ();
-# endif // USE_IPHONE
-
   // I don't know why this is necessary, but it beats randomly having some
   // textures be upside down.
   //
index 06f0ebe29a4ffd812b542d2830e4d2cd96e929f8..dffa58e97081deb37ad6cadf471e75146a34afb7 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2006-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2017 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
@@ -42,6 +42,7 @@
 @protocol XScreenSaverViewDelegate
 - (void) wantsFadeOut:(XScreenSaverView *)saverView;
 - (void) didShake:(XScreenSaverView *)saverView;
+- (void) openPreferences: (NSString *)which;
 @end
 
 @interface ScreenSaverView : NSView
@@ -82,6 +83,7 @@
   Window xwindow;
   void *xdata;
   fps_state *fpst;
+  void (*fps_cb) (Display *, Window, fps_state *, void *);
 
 # ifdef USE_IPHONE
   BOOL screenLocked;
 
   id<XScreenSaverViewDelegate> _delegate;
 
+  UIView *closeBox;
+  NSTimer *closeBoxTimer;
+
+  CGAffineTransform pinch_transform;
+
 # else // !USE_PHONE
 
   NSOpenGLPixelFormat *pixfmt;
 
 #  ifdef BACKBUFFER_OPENGL
   void *backbuffer_data;
-  size_t backbuffer_len;
+  GLsizei backbuffer_len;
 
   GLsizei gl_texture_w, gl_texture_h;
 
index 18f4a1aa1270591b72210a9d1bce3ab1d23e06fa..947525dde25b52bfcc64ea4c2600663367c6d174 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2006-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2017 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
@@ -23,6 +23,7 @@
 #import "Updater.h"
 #import "screenhackI.h"
 #import "xlockmoreI.h"
+#import "pow2.h"
 #import "jwxyzI.h"
 #import "jwxyz-cocoa.h"
 #import "jwxyz-timers.h"
@@ -118,6 +119,7 @@ extern NSDictionary *make_function_table_dict(void);  // ios-function-table.m
 
 
 @interface XScreenSaverView (Private)
+- (void) stopAndClose;
 - (void) stopAndClose:(Bool)relaunch;
 @end
 
@@ -603,8 +605,6 @@ add_default_options (const XrmOptionDescRec *opts,
 # ifdef USE_IPHONE
   [UIApplication sharedApplication].idleTimerDisabled =
     ([UIDevice currentDevice].batteryState != UIDeviceBatteryStateUnplugged);
-  [[UIApplication sharedApplication]
-    setStatusBarHidden:YES withAnimation:UIStatusBarAnimationNone];
 # endif
 
   xwindow = (Window) calloc (1, sizeof(*xwindow));
@@ -739,13 +739,14 @@ add_default_options (const XrmOptionDescRec *opts,
     [self lockFocus];       // in case something tries to draw from here
     [self prepareContext];
 
-    /* I considered just not even calling the free callback at all...
-       But webcollage-cocoa needs it, to kill the inferior webcollage
+    /* All of the xlockmore hacks need to have their release functions
+       called, or launching the same saver twice does not work.  Also
+       webcollage-cocoa needs it in order to kill the inferior webcollage
        processes (since the screen saver framework never generates a
-       SIGPIPE for them...)  Instead, I turned off the free call in
-       xlockmore.c, which is where all of the bogus calls are anyway.
+       SIGPIPE for them).
      */
-    xsft->free_cb (xdpy, xwindow, xdata);
+     if (xdata)
+       xsft->free_cb (xdpy, xwindow, xdata);
     [self unlockFocus];
 
     jwxyz_free_display (xdpy);
@@ -778,8 +779,6 @@ add_default_options (const XrmOptionDescRec *opts,
   //
 # ifdef USE_IPHONE
   [UIApplication sharedApplication].idleTimerDisabled = NO;
-  [[UIApplication sharedApplication]
-    setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
 # endif
 
   // Without this, the GL frame stays on screen when switching tabs
@@ -905,7 +904,8 @@ current_device_rotation (void)
           the opposite direction."
         */
     /* statusBarOrientation deprecated in iOS 9 */
-    o = [UIApplication sharedApplication].statusBarOrientation;
+    o = (UIDeviceOrientation)  // from UIInterfaceOrientation
+      [UIApplication sharedApplication].statusBarOrientation;
   }
 
   switch (o) {
@@ -917,29 +917,37 @@ current_device_rotation (void)
 }
 
 
-- (void)alertView:(UIAlertView *)av clickedButtonAtIndex:(NSInteger)i
-{
-  if (i == 0) exit (-1);       // Cancel
-  [self stopAndClose:NO];      // Keep going
-}
-
 - (void) handleException: (NSException *)e
 {
   NSLog (@"Caught exception: %@", e);
-  [[[UIAlertView alloc] initWithTitle:
-                          [NSString stringWithFormat: @"%s crashed!",
-                                    xsft->progclass]
-                        message:
-                          [NSString stringWithFormat:
-                                      @"The error message was:"
-                                    "\n\n%@\n\n"
-                                    "If it keeps crashing, try "
-                                    "resetting its options.",
-                                    e]
-                        delegate: self
-                        cancelButtonTitle: @"Exit"
-                        otherButtonTitles: @"Keep going", nil]
-    show];
+  UIAlertController *c = [UIAlertController
+                           alertControllerWithTitle:
+                             [NSString stringWithFormat: @"%s crashed!",
+                                       xsft->progclass]
+                           message: [NSString stringWithFormat:
+                                                @"The error message was:"
+                                              "\n\n%@\n\n"
+                                              "If it keeps crashing, try "
+                                              "resetting its options.",
+                                              e]
+                           preferredStyle:UIAlertControllerStyleAlert];
+
+  [c addAction: [UIAlertAction actionWithTitle: @"Exit"
+                               style: UIAlertActionStyleDefault
+                               handler: ^(UIAlertAction *a) {
+    exit (-1);
+  }]];
+  [c addAction: [UIAlertAction actionWithTitle: @"Keep going"
+                               style: UIAlertActionStyleDefault
+                               handler: ^(UIAlertAction *a) {
+    [self stopAndClose:NO];
+  }]];
+
+  UIViewController *vc =
+    [UIApplication sharedApplication].keyWindow.rootViewController;
+  while (vc.presentedViewController)
+    vc = vc.presentedViewController;
+  [vc presentViewController:c animated:YES completion:nil];
   [self stopAnimation];
 }
 
@@ -1064,31 +1072,6 @@ gl_check_ver (const struct gl_version *caps,
 }
 
 
-static GLsizei
-to_pow2 (size_t x)
-{
-  if (x <= 1)
-    return 1;
-
-  size_t mask = (size_t)-1;
-  unsigned bits = sizeof(x) * CHAR_BIT;
-  unsigned log2 = bits;
-
-  --x;
-  while (bits) {
-    if (!(x & mask)) {
-      log2 -= bits;
-      x <<= bits;
-    }
-
-    bits >>= 1;
-    mask <<= bits;
-  }
-
-  return 1 << log2;
-}
-
-
 #ifdef USE_IPHONE
 - (BOOL) suppressRotationAnimation
 {
@@ -1163,7 +1146,7 @@ to_pow2 (size_t x)
 
   CGContextRef ob = backbuffer;
   void *odata = backbuffer_data;
-  size_t olen = backbuffer_len;
+  GLsizei olen = backbuffer_len;
 
 # if !defined __OPTIMIZE__ || TARGET_IPHONE_SIMULATOR
   NSLog(@"backbuffer %.0fx%.0f",
@@ -1211,11 +1194,11 @@ to_pow2 (size_t x)
   if (!gl_limited_npot_p)
 # endif
   {
-    gl_texture_w = to_pow2 (gl_texture_w);
-    gl_texture_h = to_pow2 (gl_texture_h);
+    gl_texture_w = (GLsizei) to_pow2 (gl_texture_w);
+    gl_texture_h = (GLsizei) to_pow2 (gl_texture_h);
   }
 
-  size_t bytes_per_row = gl_texture_w * 4;
+  GLsizei bytes_per_row = gl_texture_w * 4;
 
 # if defined(BACKBUFFER_OPENGL) && !defined(USE_IPHONE)
   // APPLE_client_storage requires texture width to be aligned to 32 bytes, or
@@ -1623,10 +1606,11 @@ to_pow2 (size_t x)
 
     if (get_boolean_resource (xdpy, "doFPS", "DoFPS")) {
       fpst = fps_init (xdpy, xwindow);
-      if (! xsft->fps_cb) xsft->fps_cb = screenhack_do_fps;
+      fps_cb = xsft->fps_cb;
+      if (! fps_cb) fps_cb = screenhack_do_fps;
     } else {
       fpst = NULL;
-      xsft->fps_cb = 0;
+      fps_cb = 0;
     }
 
 # ifdef USE_IPHONE
@@ -1727,8 +1711,8 @@ to_pow2 (size_t x)
   // NSAssert(xdata, @"no xdata when drawing");
   if (! xdata) abort();
   unsigned long delay = xsft->draw_cb (xdpy, xwindow, xdata);
-  if (fpst && xsft->fps_cb)
-    xsft->fps_cb (xdpy, xwindow, fpst, xdata);
+  if (fpst && fps_cb)
+    fps_cb (xdpy, xwindow, fpst, xdata);
 
   gettimeofday (&tv, 0);
   now = tv.tv_sec + (tv.tv_usec / 1000000.0);
@@ -2021,7 +2005,7 @@ to_pow2 (size_t x)
                              [e deltaX] < 0 ? Button7 :
                              0);
       else
-        xe.xbutton.button = [e buttonNumber] + 1;
+        xe.xbutton.button = (unsigned int) [e buttonNumber] + 1;
       break;
     case MotionNotify:
       xe.xmotion.x = x;
@@ -2075,9 +2059,9 @@ to_pow2 (size_t x)
             case NSF12FunctionKey:       k = XK_F12;       break;
             default:
               {
-                const char *s =
+                const char *ss =
                   [ns cStringUsingEncoding:NSISOLatin1StringEncoding];
-                k = (s && *s ? *s : 0);
+                k = (ss && *ss ? *ss : 0);
               }
               break;
             }
@@ -2229,6 +2213,12 @@ to_pow2 (size_t x)
 #else  // USE_IPHONE
 
 
+- (void) stopAndClose
+{
+  [self stopAndClose:NO];
+}
+
+
 - (void) stopAndClose:(Bool)relaunch_p
 {
   if ([self isAnimating])
@@ -2260,11 +2250,10 @@ to_pow2 (size_t x)
 /* We distinguish between taps and drags.
 
    - Drags/pans (down, motion, up) are sent to the saver to handle.
-   - Single-taps exit the saver.
+   - Single-taps are sent to the saver to handle.
    - Double-taps are sent to the saver as a "Space" keypress.
    - Swipes (really, two-finger drags/pans) send Up/Down/Left/RightArrow keys.
-
-   This means a saver cannot respond to a single-tap.  Only a few try to.
+   - All taps expose the momentary "Close" button.
  */
 
 - (void)initGestures
@@ -2277,7 +2266,7 @@ to_pow2 (size_t x)
 
   UITapGestureRecognizer *stap = [[UITapGestureRecognizer alloc]
                                    initWithTarget:self
-                                   action:@selector(handleTap)];
+                                   action:@selector(handleTap:)];
   stap.numberOfTapsRequired = 1;
   stap.numberOfTouchesRequired = 1;
  
@@ -2305,10 +2294,16 @@ to_pow2 (size_t x)
   hold.numberOfTouchesRequired = 1;
   hold.minimumPressDuration = 0.25;   /* 1/4th second */
 
+  // Two finger pinch to zoom in on the view.
+  UIPinchGestureRecognizer *pinch = [[UIPinchGestureRecognizer alloc] 
+                                      initWithTarget:self 
+                                      action:@selector(handlePinch:)];
+
   [stap requireGestureRecognizerToFail: dtap];
   [stap requireGestureRecognizerToFail: hold];
   [dtap requireGestureRecognizerToFail: hold];
   [pan  requireGestureRecognizerToFail: hold];
+  [pan2 requireGestureRecognizerToFail: pinch];
 
   [self setMultipleTouchEnabled:YES];
 
@@ -2317,12 +2312,14 @@ to_pow2 (size_t x)
   [self addGestureRecognizer: pan];
   [self addGestureRecognizer: pan2];
   [self addGestureRecognizer: hold];
+  [self addGestureRecognizer: pinch];
 
   [dtap release];
   [stap release];
   [pan  release];
   [pan2 release];
   [hold release];
+  [pinch release];
 }
 
 
@@ -2363,7 +2360,7 @@ to_pow2 (size_t x)
 {
   CGFloat xx = p->x, yy = p->y;
 
-# if TARGET_IPHONE_SIMULATOR
+# if 0 // TARGET_IPHONE_SIMULATOR
   {
     XWindowAttributes xgwa;
     XGetWindowAttributes (xdpy, xwindow, &xgwa);
@@ -2422,7 +2419,7 @@ to_pow2 (size_t x)
   p->x = xx * s;
   p->y = yy * s;
 
-# if TARGET_IPHONE_SIMULATOR || !defined __OPTIMIZE__
+# if 0 // TARGET_IPHONE_SIMULATOR || !defined __OPTIMIZE__
   {
     XWindowAttributes xgwa;
     XGetWindowAttributes (xdpy, xwindow, &xgwa);
@@ -2441,9 +2438,36 @@ to_pow2 (size_t x)
 
 /* Single click exits saver.
  */
-- (void) handleTap
+- (void) handleTap:(UIGestureRecognizer *)sender
 {
-  [self stopAndClose:NO];
+  if (!xwindow)
+    return;
+
+  XEvent xe;
+  memset (&xe, 0, sizeof(xe));
+
+  [self showCloseButton];
+
+  CGPoint p = [sender locationInView:self];  // this is in points, not pixels
+  [self convertMouse:&p];
+  NSAssert (xwindow->type == WINDOW, @"not a window");
+  xwindow->window.last_mouse_x = p.x;
+  xwindow->window.last_mouse_y = p.y;
+
+  xe.xany.type = ButtonPress;
+  xe.xbutton.button = 1;
+  xe.xbutton.x = p.x;
+  xe.xbutton.y = p.y;
+
+  if (! [self sendEvent: &xe])
+    ; //[self beep];
+
+  xe.xany.type = ButtonRelease;
+  xe.xbutton.button = 1;
+  xe.xbutton.x = p.x;
+  xe.xbutton.y = p.y;
+
+  [self sendEvent: &xe];
 }
 
 
@@ -2453,6 +2477,8 @@ to_pow2 (size_t x)
 {
   if (!xsft->event_cb || !xwindow) return;
 
+  [self showCloseButton];
+
   XEvent xe;
   memset (&xe, 0, sizeof(xe));
   xe.xkey.keycode = ' ';
@@ -2471,6 +2497,8 @@ to_pow2 (size_t x)
 {
   if (!xsft->event_cb || !xwindow) return;
 
+  [self showCloseButton];
+
   XEvent xe;
   memset (&xe, 0, sizeof(xe));
 
@@ -2527,6 +2555,8 @@ to_pow2 (size_t x)
 {
   if (!xsft->event_cb || !xwindow) return;
 
+  [self showCloseButton];
+
   if (sender.state != UIGestureRecognizerStateEnded)
     return;
 
@@ -2549,6 +2579,102 @@ to_pow2 (size_t x)
 }
 
 
+/* Pinch with 2 fingers: zoom in around the center of the fingers.
+ */
+- (void) handlePinch:(UIPinchGestureRecognizer *)sender
+{
+  if (!xsft->event_cb || !xwindow) return;
+
+  [self showCloseButton];
+
+  if (sender.state == UIGestureRecognizerStateBegan)
+    pinch_transform = self.transform;  // Save the base transform
+
+  switch (sender.state) {
+  case UIGestureRecognizerStateBegan:
+  case UIGestureRecognizerStateChanged:
+    {
+      double scale = sender.scale;
+
+      if (scale < 1)
+        return;
+
+      self.transform = CGAffineTransformScale (pinch_transform, scale, scale);
+
+      CGPoint p = [sender locationInView: self];
+      p.x /= self.layer.bounds.size.width;
+      p.y /= self.layer.bounds.size.height;
+
+      CGPoint np = CGPointMake (self.bounds.size.width * p.x,
+                                self.bounds.size.height * p.y);
+      CGPoint op = CGPointMake (self.bounds.size.width *
+                                self.layer.anchorPoint.x, 
+                                self.bounds.size.height *
+                                self.layer.anchorPoint.y);
+      np = CGPointApplyAffineTransform (np, self.transform);
+      op = CGPointApplyAffineTransform (op, self.transform);
+
+      CGPoint pos = self.layer.position;
+      pos.x -= op.x;
+      pos.x += np.x;
+      pos.y -= op.y;
+      pos.y += np.y;
+      self.layer.position = pos;
+      self.layer.anchorPoint = p;
+    }
+    break;
+
+  case UIGestureRecognizerStateEnded:
+    {
+      // When released, snap back to the default zoom (but animate it).
+
+      CABasicAnimation *a1 = [CABasicAnimation
+                               animationWithKeyPath:@"position.x"];
+      a1.fromValue = [NSNumber numberWithFloat: self.layer.position.x];
+      a1.toValue   = [NSNumber numberWithFloat: self.bounds.size.width / 2];
+
+      CABasicAnimation *a2 = [CABasicAnimation
+                               animationWithKeyPath:@"position.y"];
+      a2.fromValue = [NSNumber numberWithFloat: self.layer.position.y];
+      a2.toValue   = [NSNumber numberWithFloat: self.bounds.size.height / 2];
+
+      CABasicAnimation *a3 = [CABasicAnimation
+                               animationWithKeyPath:@"anchorPoint.x"];
+      a3.fromValue = [NSNumber numberWithFloat: self.layer.anchorPoint.x];
+      a3.toValue   = [NSNumber numberWithFloat: 0.5];
+
+      CABasicAnimation *a4 = [CABasicAnimation
+                               animationWithKeyPath:@"anchorPoint.y"];
+      a4.fromValue = [NSNumber numberWithFloat: self.layer.anchorPoint.y];
+      a4.toValue   = [NSNumber numberWithFloat: 0.5];
+
+      CABasicAnimation *a5 = [CABasicAnimation
+                               animationWithKeyPath:@"transform.scale"];
+      a5.fromValue = [NSNumber numberWithFloat: sender.scale];
+      a5.toValue   = [NSNumber numberWithFloat: 1.0];
+
+      CAAnimationGroup *group = [CAAnimationGroup animation];
+      group.duration     = 0.3;
+      group.repeatCount  = 1;
+      group.autoreverses = NO;
+      group.animations = @[ a1, a2, a3, a4, a5 ];
+      group.timingFunction = [CAMediaTimingFunction
+                               functionWithName:
+                                 kCAMediaTimingFunctionEaseIn];
+      [self.layer addAnimation:group forKey:@"unpinch"];
+
+      self.transform = pinch_transform;
+      self.layer.anchorPoint = CGPointMake (0.5, 0.5);
+      self.layer.position = CGPointMake (self.bounds.size.width / 2,
+                                         self.bounds.size.height / 2);
+    }
+    break;
+  default:
+    abort();
+  }
+}
+
+
 /* We need this to respond to "shake" gestures
  */
 - (BOOL)canBecomeFirstResponder
@@ -2573,6 +2699,105 @@ to_pow2 (size_t x)
 }
 
 
+- (void) showCloseButton
+{
+  double iw = 24;
+  double ih = iw;
+  double off = 4;
+
+  if (!closeBox) {
+    int width = self.bounds.size.width;
+    closeBox = [[UIView alloc]
+                initWithFrame:CGRectMake(0, 0, width, ih + off)];
+    closeBox.backgroundColor = [UIColor clearColor];
+    closeBox.autoresizingMask =
+      UIViewAutoresizingFlexibleBottomMargin |
+      UIViewAutoresizingFlexibleWidth;
+
+    // Add the buttons to the bar
+    UIImage *img1 = [UIImage imageNamed:@"stop"];
+    UIImage *img2 = [UIImage imageNamed:@"settings"];
+
+    UIButton *button = [[UIButton alloc] init];
+    [button setFrame: CGRectMake(off, off, iw, ih)];
+    [button setBackgroundImage:img1 forState:UIControlStateNormal];
+    [button addTarget:self
+            action:@selector(stopAndClose)
+            forControlEvents:UIControlEventTouchUpInside];
+    [closeBox addSubview:button];
+    [button release];
+
+    button = [[UIButton alloc] init];
+    [button setFrame: CGRectMake(width - iw - off, off, iw, ih)];
+    [button setBackgroundImage:img2 forState:UIControlStateNormal];
+    [button addTarget:self
+            action:@selector(stopAndOpenSettings)
+            forControlEvents:UIControlEventTouchUpInside];
+    button.autoresizingMask =
+      UIViewAutoresizingFlexibleBottomMargin |
+      UIViewAutoresizingFlexibleLeftMargin;
+    [closeBox addSubview:button];
+    [button release];
+
+    [self addSubview:closeBox];
+  }
+
+  if (closeBox.layer.opacity <= 0) {  // Fade in
+
+    CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"opacity"];
+    anim.duration     = 0.2;
+    anim.repeatCount  = 1;
+    anim.autoreverses = NO;
+    anim.fromValue    = [NSNumber numberWithFloat:0.0];
+    anim.toValue      = [NSNumber numberWithFloat:1.0];
+    [closeBox.layer addAnimation:anim forKey:@"animateOpacity"];
+    closeBox.layer.opacity = 1;
+  }
+
+  // Fade out N seconds from now.
+  if (closeBoxTimer)
+    [closeBoxTimer invalidate];
+  closeBoxTimer = [NSTimer scheduledTimerWithTimeInterval: 3
+                           target:self
+                           selector:@selector(closeBoxOff)
+                           userInfo:nil
+                           repeats:NO];
+}
+
+
+- (void)closeBoxOff
+{
+  if (closeBoxTimer) {
+    [closeBoxTimer invalidate];
+    closeBoxTimer = 0;
+  }
+  if (!closeBox)
+    return;
+
+  CABasicAnimation *anim = [CABasicAnimation animationWithKeyPath:@"opacity"];
+  anim.duration     = 0.2;
+  anim.repeatCount  = 1;
+  anim.autoreverses = NO;
+  anim.fromValue    = [NSNumber numberWithFloat: 1];
+  anim.toValue      = [NSNumber numberWithFloat: 0];
+  [closeBox.layer addAnimation:anim forKey:@"animateOpacity"];
+  closeBox.layer.opacity = 0;
+}
+
+
+- (void) stopAndOpenSettings
+{
+  NSString *s = [NSString stringWithCString:xsft->progclass
+                          encoding:NSISOLatin1StringEncoding];
+  if ([self isAnimating])
+    [self stopAnimation];
+  [self resignFirstResponder];
+  [_delegate wantsFadeOut:self];
+  [_delegate openPreferences: s];
+
+}
+
+
 - (void)setScreenLocked:(BOOL)locked
 {
   if (screenLocked == locked) return;
index f9cb355bc3c4f71a40a196ec8e15889638b8fdd5..74e15780416f6a7f90e3fe24db559462f37ab1be 100644 (file)
@@ -16,8 +16,8 @@
 \b0 by Jamie Zawinski\
 and many others\
 \
-version 5.36\
-10-Oct-2016\
+version 5.37\
+05-Jul-2017\
 \
 {\field{\*\fldinst{HYPERLINK "https://www.jwz.org/xscreensaver/"}}{\fldrslt \cf2 \ul \ulc2 https://www.jwz.org/xscreensaver/}}\
 \pard\pardeftab720
@@ -39,7 +39,9 @@ select \i Open \i0 from the context menu.\
 
 \b0 \cf0 \
 Open the \i "Screen Savers" \i0 folder in this disk image and double-click 
-each saver that you want to install.\
+each saver that you want to install. (But that might not work unless you 
+tweak \i"System Preferences / Security & Privacy"\i0  first.  Just 
+do \i"Install Everything"\i0, that's easier.)\
 \
 \pard\pardeftab720
 
@@ -64,11 +66,13 @@ available there.\
 \
 \pard\pardeftab720
 
-\b \cf0 iPhone and iPad:\
+\b \cf0 iPhone, iPad & Android:\
 \pard\pardeftab720\li360
 
 \b0 \cf0 \
-XScreenSaver also runs on iOS.  It is available in the 
+XScreenSaver also runs on iOS and Android.  It is available in the 
 {\field{\*\fldinst{HYPERLINK "https://itunes.apple.com/app/xscreensaver/id539014593?mt=8"}}
-{\fldrslt \cf2 \ul \ulc2 iTunes App Store}}, and it's free!
+{\fldrslt \cf2 \ul \ulc2 iTunes App Store}} and in the 
+{\field{\*\fldinst{HYPERLINK "https://play.google.com/store/apps/details?id=org.jwz.xscreensaver"}}
+{\fldrslt \cf2 \ul \ulc2 Google Play Store}}, and it's free!
 }
index e3e4a8e7e1fbd761d8f61c8d6d69b5e1b2189d63..b016eb1b29dd92e873a80f57a3ef696b84267139 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2017 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
  * implied warranty.
  */
 
-/* This iOS code to choose and return a random image from the user's
- * photo gallery.
- *
- * Much of the following written by:
- *
- *  Created by David Oster on 6/23/12.
- *  Copyright (c) 2012 Google. All rights reserved.
- *  Licensed under the Apache License, Version 2.0 (the "License");
- *  you may not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *       http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS,
- *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+/* iOS 8+ code to choose and return a random image from the photo library.
  */
 
 #ifdef USE_IPHONE  // whole file
 
-#import <AssetsLibrary/AssetsLibrary.h>
+#import <Photos/Photos.h>
 #import "grabscreen.h"
 #import "yarandom.h"
 
-/* ALAssetsLibrary is an async API, so we need to fire it off and then
-   call a callback when it's done.  Fortunately, this fits the same
-   interaction model already used in xscreensaver by load_image_async(),
-   so it works out nicely.
- */
-
-typedef struct {
-  void (*callback) (void *uiimage, const char *fn, int width, int height,
-                    void *closure);
-  void *closure;
-
-  ALAssetsLibrary *library;
-  NSMutableArray *assets;
-
-} ios_loader_data;
-
-
-static void
-ios_random_image_done (ios_loader_data *d, BOOL ok)
-{
-  UIImage *img = 0;
-  const char *fn = 0;
-  NSUInteger n = ok ? [d->assets count] : 0;
-  if (n > 0) {
-    ALAsset *asset = [d->assets objectAtIndex: random() % n];
-    ALAssetRepresentation *rep = [asset defaultRepresentation];
-
-    // "fullScreenImage" returns a smaller image than "fullResolutionImage",
-    // but this function still takes a significant fraction of a second,
-    // causing a visible glitch in e.g. "glslideshow".
-    CGImageRef cgi = [rep fullScreenImage];
-    if (cgi) {
-      UIImageOrientation orient = (UIImageOrientation) 
-        [[asset valueForProperty:ALAssetPropertyOrientation] intValue];
-      img = [UIImage imageWithCGImage: cgi
-                     scale: 1
-                     orientation: orient];
-      if (img)
-        fn = [[[rep filename] stringByDeletingPathExtension]
-               cStringUsingEncoding:NSUTF8StringEncoding];
-    }
-  }
-
-  [d->assets release];
-  [d->library release];
-
-  d->callback (img, fn, [img size].width, [img size].height, d->closure);
-  free (d);
-}
-
-
 void
 ios_load_random_image (void (*callback) (void *uiimage, const char *fn,
                                          int width, int height,
                                          void *closure),
-                       void *closure)
+                       void *closure,
+                       int width, int height)
 {
-  ios_loader_data *d = (ios_loader_data *) calloc (1, sizeof(*d));
-  d->callback = callback;
-  d->closure = closure;
-
-  d->library = [[[ALAssetsLibrary alloc] init] retain];
-  d->assets = [[NSMutableArray array] retain];
-
-  // The closures passed in here are called later, after we have returned.
+  // If the user has not yet been asked for authoriziation, pop up the
+  // auth dialog now and re-invoke this function once it has been
+  // answered.  The callback will run once there has been a Yes or No.
+  // Otherwise, we'd return right away with colorbars even if the user
+  // then went on to answer Yes.
   //
-  [d->library enumerateGroupsWithTypes: ALAssetsGroupAll
-              usingBlock: ^(ALAssetsGroup *group, BOOL *stop) {
-    NSString *name = [group valueForProperty:ALAssetsGroupPropertyName];
-    if ([name length]) {
-      [group enumerateAssetsUsingBlock: ^(ALAsset *asset, NSUInteger index,
-                                          BOOL *stop) {
-        if ([[asset valueForProperty: ALAssetPropertyType]
-              isEqual: ALAssetTypePhoto]) {
-          [d->assets addObject:asset];
-        }
-      }];
-    }
+  PHAuthorizationStatus status = [PHPhotoLibrary authorizationStatus];
+  if (status == PHAuthorizationStatusNotDetermined) {
+    [PHPhotoLibrary requestAuthorization:^(PHAuthorizationStatus status) {
+      ios_load_random_image (callback, closure, width, height);
+    }];
+    return;
+  }
+
+  // The rest of this is synchronous.
+
+  PHFetchOptions *opt = [PHFetchOptions new];
+  opt.includeAssetSourceTypes = (PHAssetSourceTypeUserLibrary |
+                                 PHAssetSourceTypeCloudShared |
+                                 PHAssetSourceTypeiTunesSynced);
+  PHFetchResult *r = [PHAsset
+                       fetchAssetsWithMediaType: PHAssetMediaTypeImage
+                       options: opt];
+  NSUInteger n = [r count];
+  PHAsset *asset = n ? [r objectAtIndex: random() % n] : NULL;
+
+  __block UIImage *img = 0;
+  __block const char *fn = 0;
+
+  if (asset) {
+    PHImageRequestOptions *opt = [[PHImageRequestOptions alloc] init];
+    opt.synchronous = YES;
+
+    // Get the image bits.
+    //
+    int size = width > height ? width : height;
+    [[PHImageManager defaultManager]
+      requestImageForAsset: asset
+      targetSize: CGSizeMake (size, size)
+      contentMode: PHImageContentModeDefault
+      options: opt
+      resultHandler:^void (UIImage *image, NSDictionary *info) {
+        img = image;
+    }];
+
+    // Get the image name.
+    //
+    [[PHImageManager defaultManager]
+      requestImageDataForAsset: asset
+      options: opt
+      resultHandler:^(NSData *imageData, NSString *dataUTI,
+                      UIImageOrientation orientation, 
+                      NSDictionary *info) {
+        // Looks like UIImage is pre-rotated to compensate for 'orientation'.
+        NSString *path = [info objectForKey:@"PHImageFileURLKey"];
+        if (path)
+          fn = [[[path lastPathComponent] stringByDeletingPathExtension]
+                 cStringUsingEncoding:NSUTF8StringEncoding];
+    }];
+  }
 
-    if (! group) {   // done
-      ios_random_image_done (d, YES);
-    }
-  } failureBlock:^(NSError *error) {
-    // E.g., ALAssetsLibraryErrorDomain: "The user has denied the
-    // application access to their media."
-    NSLog(@"reading Photo Library: %@", error);
-    ios_random_image_done (d, NO);
-  }];
+  if (img)
+    callback (img, fn, [img size].width, [img size].height, closure);
+  else
+    callback (0, 0, 0, 0, closure);
 }
 
 #endif  // USE_IPHONE - whole file
index a0a949d7f14b9053cd2ac1b0271ece4c2d9bf902..8542d12786111d6ad1d7006a729129a227369acf 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2017 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
@@ -322,31 +322,24 @@ osx_grab_desktop_image (Screen *screen, Window xwindow, Drawable drawable,
      Oct 2016: Surprise, this trick no longer works on MacOS 10.12.  Sigh.
    */
 
-  // save our current level so we can restore it later
-  int oldLevel = [[nsview window] level]; 
+  CGWindowID windowNumber = (CGWindowID) nsview.window.windowNumber;
 
-# if 0
   {
-    FILE *f = fopen("/tmp/log.txt", "w");
     CFArrayRef L = CGWindowListCopyWindowInfo (kCGWindowListOptionOnScreenOnly,
                                                kCGNullWindowID);
 
-    fprintf(f, "# %d\n", [[nsview window] windowNumber]);
-
-    int n = CFArrayGetCount(L);
+    CFIndex n = CFArrayGetCount(L);
     for (int i = 0; i < n; i++) {
       NSDictionary *dict = (NSDictionary *) CFArrayGetValueAtIndex(L, i);
-      fprintf(f,
-              "%d \"%s\"\n",
-              (int) [dict objectForKey:kCGWindowNumber],
-              [(NSString *) [dict objectForKey:kCGWindowOwnerName]
-                cStringUsingEncoding:[NSString defaultCStringEncoding]]);
+
+      // loginwindow creates multiple toplevel windows. Grab the lowest one.
+      if(![([dict objectForKey:(NSString *)kCGWindowOwnerName])
+           compare:@"loginwindow"]) {
+        windowNumber = ((NSNumber *)[dict objectForKey:
+                                     (NSString *)kCGWindowNumber]).intValue;
+      }
     }
-    fclose(f);
   }
-#endif
-
-  [[nsview window] setLevel:CGWindowLevelForKey(kCGPopUpMenuWindowLevelKey)];
 
   // Grab a screen shot of those windows below this one
   // (hey, X11 can't do that!)
@@ -354,12 +347,9 @@ osx_grab_desktop_image (Screen *screen, Window xwindow, Drawable drawable,
   CGImageRef img = 
     CGWindowListCreateImage (cgrect,
                              kCGWindowListOptionOnScreenBelowWindow,
-                             [[nsview window] windowNumber],
+                             windowNumber,
                              kCGWindowImageDefault);
 
-  // put us back above the login windows so the screensaver is visible.
-  [[nsview window] setLevel:oldLevel];
-
   if (! img) return False;
 
   // Render the grabbed CGImage into the Drawable.
index 2f7a19a5216266d27b9fbb1c4844ba11dcdff8fc..fef1480dba947c8af7fd654c7493133d6856f8a0 100644 (file)
@@ -9,7 +9,7 @@
        <key>CFBundleExecutable</key>
        <string>${EXECUTABLE_NAME}</string>
        <key>CFBundleGetInfoString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleIcons</key>
        <dict/>
        <key>CFBundleIcons~ipad</key>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
        <key>CFBundleLongVersionString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleName</key>
        <string>${PRODUCT_NAME}</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleShortVersionString</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundleVersion</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>LSRequiresIPhoneOS</key>
        <true/>
        <key>NSHumanReadableCopyright</key>
-       <string>5.36</string>
+       <string>5.37</string>
        <key>NSMainNibFile</key>
        <string>iSaverRunner</string>
        <key>UIAppFonts</key>
@@ -64,7 +64,7 @@
                <string>UIInterfaceOrientationLandscapeRight</string>
        </array>
        <key>UIViewControllerBasedStatusBarAppearance</key>
-       <false/>
+       <true/>
        <key>NSPhotoLibraryUsageDescription</key>
        <string>XScreenSaver displays manipulated versions of your photos.</string></dict>
 </plist>
index ac70579e35345591162a12aabfcb7db181c2da37..99bce15df0f11466b7b5480881027e2b7412071e 100644 (file)
@@ -1,8 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none">
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11762" systemVersion="16E195" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" colorMatched="YES">
+    <device id="retina4_7" orientation="portrait">
+        <adaptation id="fullscreen"/>
+    </device>
     <dependencies>
-        <deployment version="1536" identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="UIApplication">
         <window opaque="NO" clearsContextBeforeDrawing="NO" multipleTouchEnabled="YES" contentMode="scaleToFill" visibleAtLaunch="YES" id="2">
             <rect key="frame" x="0.0" y="0.0" width="320" height="480"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+            <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
             <nil key="simulatedStatusBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
         </window>
     </objects>
+    <simulatedMetricsContainer key="defaultSimulatedMetrics">
+        <simulatedStatusBarMetrics key="statusBar"/>
+        <simulatedOrientationMetrics key="orientation"/>
+        <simulatedScreenMetrics key="destination" type="retina4_7.fullscreen"/>
+    </simulatedMetricsContainer>
 </document>
index 52b8340d7ef788af03a06ae8cd241f255df7a1dd..e1a05a43fe1d94610e8c3cd58d34b01e78304c85 100644 (file)
@@ -1,5 +1,5 @@
 /* Generated file, do not edit.
-   Created: Sat Sep  3 00:49:37 2016 by build-fntable.pl 1.5.
+   Created: Thu Jun  1 17:53:59 2017 by build-fntable.pl 1.5.
  */
 
 #import <Foundation/Foundation.h>
@@ -212,6 +212,7 @@ extern struct xscreensaver_function_table
  unicrud_xscreensaver_function_table,
  unknownpleasures_xscreensaver_function_table,
  vermiculate_xscreensaver_function_table,
+ vigilance_xscreensaver_function_table,
  voronoi_xscreensaver_function_table,
  wander_xscreensaver_function_table,
  whirlwindwarp_xscreensaver_function_table,
@@ -443,6 +444,7 @@ NSDictionary *make_function_table_dict(void)
        [NSValue valueWithPointer:&unicrud_xscreensaver_function_table], @"unicrud",
        [NSValue valueWithPointer:&unknownpleasures_xscreensaver_function_table], @"unknownpleasures",
        [NSValue valueWithPointer:&vermiculate_xscreensaver_function_table], @"vermiculate",
+       [NSValue valueWithPointer:&vigilance_xscreensaver_function_table], @"vigilance",
        [NSValue valueWithPointer:&voronoi_xscreensaver_function_table], @"voronoi",
        [NSValue valueWithPointer:&wander_xscreensaver_function_table], @"wander",
        [NSValue valueWithPointer:&whirlwindwarp_xscreensaver_function_table], @"whirlwindwarp",
index e62bb29145c9c6a0ce3c084eade9f78b6635ff89..fb5dc71fe777db8e13496b130a1f7bd1d089cd68 100755 (executable)
@@ -18,7 +18,7 @@ use strict;
 use File::Temp;
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my ($version) = ('$Revision: 1.5 $' =~ m/\s(\d[.\d]+)\s/s);
+my ($version) = ('$Revision: 1.6 $' =~ m/\s(\d[.\d]+)\s/s);
 
 my $verbose = 0;
 
@@ -78,6 +78,12 @@ sub set_icon ($$) {
   exit ($exit) if $exit;
 }
 
+sub error($) {
+  my ($err) = @_;
+  print STDERR "$progname: $err\n";
+  exit 1;
+}
+
 sub usage() {
   print "Usage: $progname -d source [file...]\n";
   exit 1;
diff --git a/OSX/settings.png b/OSX/settings.png
new file mode 100644 (file)
index 0000000..66066ef
Binary files /dev/null and b/OSX/settings.png differ
diff --git a/OSX/settings@2x.png b/OSX/settings@2x.png
new file mode 100644 (file)
index 0000000..edce371
Binary files /dev/null and b/OSX/settings@2x.png differ
diff --git a/OSX/settings@3x.png b/OSX/settings@3x.png
new file mode 100644 (file)
index 0000000..cdbc568
Binary files /dev/null and b/OSX/settings@3x.png differ
diff --git a/OSX/stop.png b/OSX/stop.png
new file mode 100644 (file)
index 0000000..e22c5f0
Binary files /dev/null and b/OSX/stop.png differ
diff --git a/OSX/stop@2x.png b/OSX/stop@2x.png
new file mode 100644 (file)
index 0000000..6896164
Binary files /dev/null and b/OSX/stop@2x.png differ
diff --git a/OSX/stop@3x.png b/OSX/stop@3x.png
new file mode 100644 (file)
index 0000000..b2ca2aa
Binary files /dev/null and b/OSX/stop@3x.png differ
index 72040c56924efd9bb9fc1ebfde413b0b5c8d9d6f..3e0fb8f5ee703f905c1e371d82e4e563b4eb3951 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright Â© 2006-2016 Jamie Zawinski <jwz@jwz.org>
+# Copyright Â© 2006-2017 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
@@ -27,7 +27,7 @@ use IO::Compress::Gzip qw(gzip $GzipError);
 
 my ($exec_dir, $progname) = ($0 =~ m@^(.*?)/([^/]+)$@);
 
-my ($version) = ('$Revision: 1.46 $' =~ m/\s(\d[.\d]+)\s/s);
+my ($version) = ('$Revision: 1.47 $' =~ m/\s(\d[.\d]+)\s/s);
 
 $ENV{PATH} = "/usr/local/bin:$ENV{PATH}";   # for seticon
 $ENV{PATH} = "/opt/local/bin:$ENV{PATH}";   # for macports wget
@@ -445,6 +445,9 @@ sub update($) {
                             "CFBundleLongVersionString",$copyright);
     $plist = set_plist_key ($filename, $plist,
                             "CFBundleGetInfoString",    $info_str);
+    $plist = set_plist_key ($filename, $plist,
+                            "CFBundleIdentifier",
+                            "org.jwz.xscreensaver." . $app_name);
 
     if ($oplist eq $plist) {
       print STDERR "$progname: $filename: unchanged\n" if ($verbose > 1);
index 1ad71d50178fed5e7717e9f093ef74125571c927..9c8f7cfb418afb959247a9460727c27b2657bc38 100644 (file)
@@ -7,15 +7,26 @@
   <link>https://www.jwz.org/xscreensaver/updates.xml</link>
   <description>Updates to xscreensaver.</description>
   <language>en</language>
+  <item>
+   <title>Version 5.36</title>
+   <link>https://www.jwz.org/xscreensaver/xscreensaver-5.36.dmg</link>
+   <description><![CDATA[&bull; New hacks, `discoball', `cubetwist', `cubestack', `splodesic' and `hexstrut'. <BR>&bull; OSX: loading image files works in `dymaxionmap', `glplanet', `lavalite', `pulsar', `gleidescope' and `extrusion'. <BR>&bull; Several new programs in `m6502'. <BR>&bull; `rotzoomer -mode circle'. <BR>&bull; Better titles in `photopile'.]]></description>
+   <pubDate>Mon, 10 Oct 2016 19:59:35 -0700</pubDate>
+   <enclosure url="https://www.jwz.org/xscreensaver/xscreensaver-5.36.dmg"
+    sparkle:version="5.36"
+    sparkle:dsaSignature="MC0CFE0PgizuGmjl0jbR0M5eu1KLU/XhAhUAj/D/h9i70tfjBehPoCxMoBakBSA="
+    length="52105511"
+    type="application/octet-stream" />
+  </item>
   <item>
    <title>Version 5.35</title>
    <link>https://www.jwz.org/xscreensaver/xscreensaver-5.35.dmg</link>
-   <description><![CDATA[&bull; New hacks, `dymaxionmap', `unicrud', `energystream', `raverhoop' and `hydrostat'. <BR>&bull; Added Windows 10 to `bsod'. <BR>&bull; X11: ignore WM_USER_TIME property changes with days-old timestamps. Thanks, KDE. <BR>&bull; MacOS, iOS: Better fonts in 'BSOD' and 'memscroller'. <BR>&bull; MacOS 10.7 or later and iOS 6.0 or later are now required, since Xcode 6 can no longer build executables that work on older OSes. <BR>&bull; Many, many Android improvements. <BR>&bull; iOS: Fixed rotation to work with the new iOS 8+ API. <BR>&bull; X11: `pong' is now playable.]]></description>
-   <pubDate>Mon, 23 May 2016 21:08:11 -0700</pubDate>
+   <description><![CDATA[&bull; New hacks, `dymaxionmap', `unicrud', `energystream', `raverhoop' and `hydrostat'. <BR>&bull; Added Windows 10 to `bsod'. <BR>&bull; X11: ignore WM_USER_TIME property changes with days-old timestamps. Thanks, KDE. <BR>&bull; MacOS, iOS: Better fonts in `BSOD' and `memscroller'. <BR>&bull; MacOS 10.8 or later and iOS 6.0 or later are now required, since Xcode 6 can no longer build executables that work on older OSes. <BR>&bull; Many, many Android improvements. <BR>&bull; iOS: Fixed rotation to work with the new iOS 8+ API. <BR>&bull; X11: `pong' is now playable.]]></description>
+   <pubDate>Wed, 01 Jun 2016 09:50:57 -0700</pubDate>
    <enclosure url="https://www.jwz.org/xscreensaver/xscreensaver-5.35.dmg"
     sparkle:version="5.35"
-    sparkle:dsaSignature="MC4CFQC4E0tIMWvdSbiycSktRBSLdA18aQIVAJknRfXSqcFu6Dd5Lem7+fnsevDi"
-    length="50566210"
+    sparkle:dsaSignature="MCwCFHtw9iKA+rimsGIK4PiRj3fc42yxAhRKZHNuDAJ/uREQ2d0yjeyZeTLL+A=="
+    length="50552771"
     type="application/octet-stream" />
   </item>
   <item>
     length="58850776"
     type="application/octet-stream" />
   </item>
-  <item>
-   <title>Version 5.33</title>
-   <link>https://www.jwz.org/xscreensaver/xscreensaver-5.33.dmg</link>
-   <description><![CDATA[&bull; New hacks, `splitflap' and `romanboy'. <BR>&bull; Better detection of user activity on modern GNOME systems. <BR>&bull; Sonar now does asynchronous host name resolution. <BR>&bull; Improved Unicode support. <BR>&bull; Updated `webcollage' for recent changes. <BR>&bull; Various minor fixes.]]></description>
-   <pubDate>Thu, 25 Jun 2015 12:45:10 -0700</pubDate>
-   <enclosure url="https://www.jwz.org/xscreensaver/xscreensaver-5.33.dmg"
-    sparkle:version="5.33"
-    sparkle:dsaSignature="MCwCFEd0Zr8mliQgeG30xb2yfmitxc3yAhQs6xnD7v8ho9wmyCv1yJFjexcfgA=="
-    length="58437761"
-    type="application/octet-stream" />
-  </item>
   <item>
    <title>Version 5.14</title>
    <link>https://www.jwz.org/xscreensaver/xscreensaver-5.14.dmg</link>
index 9e35b4f5578d33efecb3cd8dbe83a4e62b48aed8..479545fd0edb512278e59897ef620204bb7ede81 100644 (file)
                                AF4F10F2143450C300E34F3F /* PBXTargetDependency */,
                                AF46E9ED1CBBA49A00240FBC /* PBXTargetDependency */,
                                AFDA65AA178A54690070D24B /* PBXTargetDependency */,
+                               AF633C1F1EE0BCD300AB33BD /* PBXTargetDependency */,
                                AF0DCA5C0C4CBB4300D76972 /* PBXTargetDependency */,
                                AF39E2BA198A16920064A58D /* PBXTargetDependency */,
                        );
 /* End PBXAggregateTarget section */
 
 /* Begin PBXBuildFile section */
+               5501D1961DBDCC3D00624BE9 /* xshm.c in Sources */ = {isa = PBXBuildFile; fileRef = 5501D1941DBDCC0200624BE9 /* xshm.c */; };
                550FB6001AD64424001A4FA5 /* Media-iOS.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 550FB5FD1AD64424001A4FA5 /* Media-iOS.xcassets */; };
+               55374E321E1582C6005E2362 /* pow2.c in Sources */ = {isa = PBXBuildFile; fileRef = 55374E301E1582AA005E2362 /* pow2.c */; };
+               55374E331E1582D2005E2362 /* pow2.h in Headers */ = {isa = PBXBuildFile; fileRef = 55374E311E1582AA005E2362 /* pow2.h */; };
+               557BF07E1EE90D3B00846DCE /* settings@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 557BF07A1EE90C8B00846DCE /* settings@2x.png */; };
+               557BF07F1EE90D3B00846DCE /* settings@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 557BF07B1EE90C8B00846DCE /* settings@3x.png */; };
+               557BF0801EE90D3B00846DCE /* stop@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 557BF07C1EE90C8B00846DCE /* stop@2x.png */; };
+               557BF0811EE90D3B00846DCE /* stop@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = 557BF07D1EE90C8B00846DCE /* stop@3x.png */; };
                55EDCB3D1AD498A800251909 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 55EDCB3C1AD498A800251909 /* LaunchScreen.xib */; };
                AF012918157C1E4C00C396E1 /* chessmodels.c in Sources */ = {isa = PBXBuildFile; fileRef = AFA55E2309935F2B00F3E977 /* chessmodels.c */; };
                AF0839A609930BAC00277BE9 /* atlantis.xml in Resources */ = {isa = PBXBuildFile; fileRef = AFC258700988A468000655EE /* atlantis.xml */; };
                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 */; };
                AF0FAF3C159BAC7C00BCE2F7 /* CoreText.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF0FAF3B159BAC7B00BCE2F7 /* CoreText.framework */; };
+               AF142BAE1EE75DBF0005C0A8 /* settings.png in Resources */ = {isa = PBXBuildFile; fileRef = AF142BAC1EE75DBF0005C0A8 /* settings.png */; };
+               AF142BAF1EE75DBF0005C0A8 /* stop.png in Resources */ = {isa = PBXBuildFile; fileRef = AF142BAD1EE75DBF0005C0A8 /* stop.png */; };
+               AF142BB11EFEFBA20005C0A8 /* Photos.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF142BB01EFEFBA20005C0A8 /* Photos.framework */; };
                AF1A17680D6D6EE3008AF328 /* XScreenSaverSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = AF9CC7A0099580E70075E99B /* XScreenSaverSubclass.m */; };
                AF1A177F0D6D6F3E008AF328 /* lcdscrub.c in Sources */ = {isa = PBXBuildFile; fileRef = AF1A177E0D6D6F3E008AF328 /* lcdscrub.c */; };
                AF1A17810D6D6F62008AF328 /* lcdscrub.xml in Resources */ = {isa = PBXBuildFile; fileRef = AF1A17800D6D6F62008AF328 /* lcdscrub.xml */; };
                AF6048FB157C07C600CA21E4 /* jwzgles.c in Sources */ = {isa = PBXBuildFile; fileRef = AF6048F8157C07C600CA21E4 /* jwzgles.c */; };
                AF6048FC157C07C600CA21E4 /* jwzgles.h in Headers */ = {isa = PBXBuildFile; fileRef = AF6048F9157C07C600CA21E4 /* jwzgles.h */; };
                AF6048FD157C07C600CA21E4 /* jwzglesI.h in Headers */ = {isa = PBXBuildFile; fileRef = AF6048FA157C07C600CA21E4 /* jwzglesI.h */; };
+               AF633C081EE0BA6F00AB33BD /* XScreenSaverSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = AF9CC7A0099580E70075E99B /* XScreenSaverSubclass.m */; };
+               AF633C0A1EE0BA6F00AB33BD /* libjwxyz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AF4808C1098C3B6C00FB32B8 /* libjwxyz.a */; };
+               AF633C0B1EE0BA6F00AB33BD /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF976ED30989BF59001F8B92 /* ScreenSaver.framework */; };
+               AF633C0C1EE0BA6F00AB33BD /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF2C31E515C0F7FE007A6896 /* QuartzCore.framework */; };
+               AF633C0D1EE0BA6F00AB33BD /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+               AF633C0E1EE0BA6F00AB33BD /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF48112B0990A2C700FB32B8 /* Carbon.framework */; };
+               AF633C0F1EE0BA6F00AB33BD /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CEE0BC611A6B0D6200C098BF /* OpenGL.framework */; };
+               AF633C101EE0BA6F00AB33BD /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = AF78369617DB9F25003B9FC0 /* libz.dylib */; };
+               AF633C1A1EE0BC5500AB33BD /* vigilance.xml in Resources */ = {isa = PBXBuildFile; fileRef = AF633C181EE0BC4900AB33BD /* vigilance.xml */; };
+               AF633C1B1EE0BC5A00AB33BD /* vigilance.xml in Resources */ = {isa = PBXBuildFile; fileRef = AF633C181EE0BC4900AB33BD /* vigilance.xml */; };
+               AF633C1C1EE0BCA100AB33BD /* vigilance.c in Sources */ = {isa = PBXBuildFile; fileRef = AF633C191EE0BC4A00AB33BD /* vigilance.c */; settings = {COMPILER_FLAGS = "-DUSE_GL"; }; };
+               AF633C1D1EE0BCA700AB33BD /* vigilance.c in Sources */ = {isa = PBXBuildFile; fileRef = AF633C191EE0BC4A00AB33BD /* vigilance.c */; };
+               AF633C211EE0BDCD00AB33BD /* seccam.c in Sources */ = {isa = PBXBuildFile; fileRef = AF633C201EE0BDCD00AB33BD /* seccam.c */; };
+               AF633C221EE0BDCD00AB33BD /* seccam.c in Sources */ = {isa = PBXBuildFile; fileRef = AF633C201EE0BDCD00AB33BD /* seccam.c */; };
+               AF633C231EE0BDCD00AB33BD /* seccam.c in Sources */ = {isa = PBXBuildFile; fileRef = AF633C201EE0BDCD00AB33BD /* seccam.c */; };
                AF63A7F81AB4EDDB00593C75 /* XScreenSaverSubclass.m in Sources */ = {isa = PBXBuildFile; fileRef = AF9CC7A0099580E70075E99B /* XScreenSaverSubclass.m */; };
                AF63A7FA1AB4EDDB00593C75 /* libjwxyz.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AF4808C1098C3B6C00FB32B8 /* libjwxyz.a */; };
                AF63A7FB1AB4EDDB00593C75 /* ScreenSaver.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AF976ED30989BF59001F8B92 /* ScreenSaver.framework */; };
                        remoteGlobalIDString = AF5C9AF91A0CCE6E00B0147A;
                        remoteInfo = Cityflow;
                };
+               AF633C031EE0BA6F00AB33BD /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = AF4808C0098C3B6C00FB32B8;
+                       remoteInfo = jwxyz;
+               };
+               AF633C1E1EE0BCD300AB33BD /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = AF633C011EE0BA6F00AB33BD;
+                       remoteInfo = Vigilance;
+               };
                AF63A7F31AB4EDDB00593C75 /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */;
                1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
                29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
                32CA4F630368D1EE00C91783 /* xscreensaver_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xscreensaver_Prefix.pch; sourceTree = "<group>"; };
+               5501D1941DBDCC0200624BE9 /* xshm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xshm.c; path = utils/xshm.c; sourceTree = "<group>"; };
+               5501D1951DBDCC0200624BE9 /* xshm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = xshm.h; path = utils/xshm.h; sourceTree = "<group>"; };
                550FB5FD1AD64424001A4FA5 /* Media-iOS.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Media-iOS.xcassets"; sourceTree = "<group>"; };
+               55374E301E1582AA005E2362 /* pow2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pow2.c; path = utils/pow2.c; sourceTree = "<group>"; };
+               55374E311E1582AA005E2362 /* pow2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pow2.h; path = utils/pow2.h; sourceTree = "<group>"; };
+               557BF07A1EE90C8B00846DCE /* settings@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "settings@2x.png"; sourceTree = "<group>"; };
+               557BF07B1EE90C8B00846DCE /* settings@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "settings@3x.png"; sourceTree = "<group>"; };
+               557BF07C1EE90C8B00846DCE /* stop@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stop@2x.png"; sourceTree = "<group>"; };
+               557BF07D1EE90C8B00846DCE /* stop@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "stop@3x.png"; sourceTree = "<group>"; };
                55EDCB3C1AD498A800251909 /* LaunchScreen.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchScreen.xib; sourceTree = "<group>"; };
                8D1107310486CEB800E47090 /* XScreenSaver.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = XScreenSaver.plist; sourceTree = "<group>"; };
                AF01294C157D31DD00C396E1 /* iSaverRunner.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = iSaverRunner.plist; sourceTree = SOURCE_ROOT; };
                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>"; };
                AF0FAF3B159BAC7B00BCE2F7 /* CoreText.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreText.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/System/Library/Frameworks/CoreText.framework; sourceTree = DEVELOPER_DIR; };
+               AF142BAC1EE75DBF0005C0A8 /* settings.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = settings.png; sourceTree = "<group>"; };
+               AF142BAD1EE75DBF0005C0A8 /* stop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = stop.png; sourceTree = "<group>"; };
+               AF142BB01EFEFBA20005C0A8 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Photos.framework; sourceTree = DEVELOPER_DIR; };
                AF14EE300E3CEF1A004CBBD2 /* XScreenSaver.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = XScreenSaver.icns; 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>"; };
                AF6048F8157C07C600CA21E4 /* jwzgles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = jwzgles.c; path = ../jwxyz/jwzgles.c; sourceTree = "<group>"; };
                AF6048F9157C07C600CA21E4 /* jwzgles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jwzgles.h; path = ../jwxyz/jwzgles.h; sourceTree = "<group>"; };
                AF6048FA157C07C600CA21E4 /* jwzglesI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = jwzglesI.h; path = ../jwxyz/jwzglesI.h; sourceTree = "<group>"; };
+               AF633C161EE0BA6F00AB33BD /* Vigilance.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Vigilance.saver; sourceTree = BUILT_PRODUCTS_DIR; };
+               AF633C181EE0BC4900AB33BD /* vigilance.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = vigilance.xml; sourceTree = "<group>"; };
+               AF633C191EE0BC4A00AB33BD /* vigilance.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = vigilance.c; path = hacks/glx/vigilance.c; sourceTree = "<group>"; };
+               AF633C201EE0BDCD00AB33BD /* seccam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = seccam.c; path = hacks/glx/seccam.c; sourceTree = "<group>"; };
                AF63A8061AB4EDDB00593C75 /* RomanBoy.saver */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RomanBoy.saver; sourceTree = BUILT_PRODUCTS_DIR; };
                AF63A8081AB4EF5D00593C75 /* romanboy.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = romanboy.xml; sourceTree = "<group>"; };
                AF63A8091AB4EF5D00593C75 /* romanboy.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = romanboy.c; path = hacks/glx/romanboy.c; sourceTree = "<group>"; };
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF633C091EE0BA6F00AB33BD /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF633C0A1EE0BA6F00AB33BD /* libjwxyz.a in Frameworks */,
+                               AF633C0B1EE0BA6F00AB33BD /* ScreenSaver.framework in Frameworks */,
+                               AF633C0C1EE0BA6F00AB33BD /* QuartzCore.framework in Frameworks */,
+                               AF633C0D1EE0BA6F00AB33BD /* Cocoa.framework in Frameworks */,
+                               AF633C0E1EE0BA6F00AB33BD /* Carbon.framework in Frameworks */,
+                               AF633C0F1EE0BA6F00AB33BD /* OpenGL.framework in Frameworks */,
+                               AF633C101EE0BA6F00AB33BD /* libz.dylib in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF63A7F91AB4EDDB00593C75 /* Frameworks */ = {
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                                AFEB9C3B1590054B003974F3 /* OpenGLES.framework in Frameworks */,
                                AFEB9C3915900514003974F3 /* UIKit.framework in Frameworks */,
                                AF561DF815969C5B007CA5ED /* AssetsLibrary.framework in Frameworks */,
+                               AF142BB11EFEFBA20005C0A8 /* Photos.framework in Frameworks */,
                                AFEB9C3D15900558003974F3 /* Foundation.framework in Frameworks */,
                                AFEB9C401590056A003974F3 /* CoreGraphics.framework in Frameworks */,
                                AF0FAF3C159BAC7C00BCE2F7 /* CoreText.framework in Frameworks */,
                080E96DDFE201D6D7F000001 /* libjwxyz */ = {
                        isa = PBXGroup;
                        children = (
-                               AF561DF515969BC3007CA5ED /* grabclient-ios.m */,
                                AFE1FD410981E32E00F7970E /* InvertedSlider.h */,
                                AFE1FD420981E32E00F7970E /* InvertedSlider.m */,
                                AF2D8F301CEBA10300198014 /* jwxyz-timers.c */,
                                AF6048F8157C07C600CA21E4 /* jwzgles.c */,
                                AF6048F9157C07C600CA21E4 /* jwzgles.h */,
                                AF6048FA157C07C600CA21E4 /* jwzglesI.h */,
+                               AF561DF515969BC3007CA5ED /* grabclient-ios.m */,
                                AF9D468E09B51567006E59CF /* grabclient-osx.m */,
                                AFE1FD470981E32E00F7970E /* PrefsReader.h */,
                                AFE1FD480981E32E00F7970E /* PrefsReader.m */,
                                AFEE10811D15EB0800AAC8F7 /* CubeStack.saver */,
                                AFEE10A01D17E20B00AAC8F7 /* Splodesic.saver */,
                                AF1B0FBC1D7AB4740011DBE4 /* Hexstrut.saver */,
+                               AF633C161EE0BA6F00AB33BD /* Vigilance.saver */,
                        );
                        name = Products;
                        path = ..;
                                AFEC68361BD6CA85004C1B64 /* OCRAStd.otf */,
                                AFEC68381BD6CDF9004C1B64 /* YearlReg.ttf */,
                                AFC43E731C68364B00C89999 /* PxPlus_IBM_VGA8.ttf */,
+                               AF142BAC1EE75DBF0005C0A8 /* settings.png */,
+                               557BF07A1EE90C8B00846DCE /* settings@2x.png */,
+                               557BF07B1EE90C8B00846DCE /* settings@3x.png */,
+                               AF142BAD1EE75DBF0005C0A8 /* stop.png */,
+                               557BF07C1EE90C8B00846DCE /* stop@2x.png */,
+                               557BF07D1EE90C8B00846DCE /* stop@3x.png */,
                        );
                        name = Resources;
                        sourceTree = "<group>";
                29B97323FDCFA39411CA2CEA /* Frameworks */ = {
                        isa = PBXGroup;
                        children = (
+                               AF142BB01EFEFBA20005C0A8 /* Photos.framework */,
                                AF1ADA171850180E00932759 /* Sparkle.framework */,
                                AF78377C17DBA85D003B9FC0 /* libz.dylib */,
                                AF78369617DB9F25003B9FC0 /* libz.dylib */,
                                AF083A5D099312DB00277BE9 /* tunnel_draw.h */,
                                AF46E9E71CBBA3F900240FBC /* unicrud.c */,
                                AFDA65A4178A541A0070D24B /* unknownpleasures.c */,
+                               AF633C191EE0BC4A00AB33BD /* vigilance.c */,
+                               AF633C201EE0BDCD00AB33BD /* seccam.c */,
                                AF0DCA5F0C4CBB7300D76972 /* voronoi.c */,
                                AF0839AD09930C4900277BE9 /* whale.c */,
                                AF39E2A1198A13F50064A58D /* winduprobot.c */,
                                AFC2592A0988A469000655EE /* vines.xml */,
                                AF46E9E61CBBA3F900240FBC /* unicrud.xml */,
                                AFDA65A3178A541A0070D24B /* unknownpleasures.xml */,
+                               AF633C181EE0BC4900AB33BD /* vigilance.xml */,
                                AF0DCA610C4CBB8E00D76972 /* voronoi.xml */,
                                AFC2592B0988A469000655EE /* wander.xml */,
                                AFC2592C0988A469000655EE /* webcollage.xml */,
                                AFA55865099324D800F3E977 /* minixpm.h */,
                                AFA55A93099336D800F3E977 /* normals.c */,
                                AFA55A94099336D800F3E977 /* normals.h */,
+                               55374E301E1582AA005E2362 /* pow2.c */,
+                               55374E311E1582AA005E2362 /* pow2.h */,
                                AF4775BE099D9E79001F091E /* resources.c */,
                                AF4775BF099D9E79001F091E /* resources.h */,
                                AF480EB7098F646400FB32B8 /* rotator.c */,
                                AF975C92099C929800B05160 /* xpm-pixmap.h */,
                                AF0839AE09930C4900277BE9 /* xpm-ximage.c */,
                                AF0839AF09930C4900277BE9 /* xpm-ximage.h */,
+                               5501D1941DBDCC0200624BE9 /* xshm.c */,
+                               5501D1951DBDCC0200624BE9 /* xshm.h */,
                                AFE1FD5B0981E3CB00F7970E /* yarandom.c */,
                                AFE1FD5C0981E3CB00F7970E /* yarandom.h */,
                        );
                        isa = PBXHeadersBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
+                               55374E331E1582D2005E2362 /* pow2.h in Headers */,
                                AFA55867099324D800F3E977 /* minixpm.h in Headers */,
                                AFA55A540993353500F3E977 /* gllist.h in Headers */,
                                AFA55A96099336D800F3E977 /* normals.h in Headers */,
                        productReference = AF5C9B0D1A0CCE6E00B0147A /* Cityflow.saver */;
                        productType = "com.apple.product-type.bundle";
                };
+               AF633C011EE0BA6F00AB33BD /* Vigilance */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = AF633C131EE0BA6F00AB33BD /* Build configuration list for PBXNativeTarget "Vigilance" */;
+                       buildPhases = (
+                               AF633C041EE0BA6F00AB33BD /* Resources */,
+                               AF633C061EE0BA6F00AB33BD /* Sources */,
+                               AF633C091EE0BA6F00AB33BD /* Frameworks */,
+                               AF633C111EE0BA6F00AB33BD /* Rez */,
+                               AF633C121EE0BA6F00AB33BD /* Run Update Info Plist */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               AF633C021EE0BA6F00AB33BD /* PBXTargetDependency */,
+                       );
+                       name = Vigilance;
+                       productName = DangerBall;
+                       productReference = AF633C161EE0BA6F00AB33BD /* Vigilance.saver */;
+                       productType = "com.apple.product-type.bundle";
+               };
                AF63A7F11AB4EDDB00593C75 /* RomanBoy */ = {
                        isa = PBXNativeTarget;
                        buildConfigurationList = AF63A8031AB4EDDB00593C75 /* Build configuration list for PBXNativeTarget "RomanBoy" */;
                29B97313FDCFA39411CA2CEA /* Project object */ = {
                        isa = PBXProject;
                        attributes = {
-                               LastUpgradeCheck = 0800;
+                               LastUpgradeCheck = 0830;
                                TargetAttributes = {
                                        AF08398F09930B6B00277BE9 = {
                                                DevelopmentTeam = 4627ATJELP;
                                        AF5C9AF91A0CCE6E00B0147A = {
                                                DevelopmentTeam = 4627ATJELP;
                                        };
+                                       AF633C011EE0BA6F00AB33BD = {
+                                               DevelopmentTeam = 4627ATJELP;
+                                       };
                                        AF63A7F11AB4EDDB00593C75 = {
                                                DevelopmentTeam = 4627ATJELP;
                                        };
                                AF3581FB143330F900E09C51 /* TronBit */,
                                AF46E9CF1CBBA2B300240FBC /* Unicrud */,
                                AFDA658E178A52B70070D24B /* Unknown Pleasures */,
+                               AF633C011EE0BA6F00AB33BD /* Vigilance */,
                                AF0DCA420C4CBB0D00D76972 /* Voronoi */,
                                AF39E282198A11F60064A58D /* WindupRobot */,
                                AF137D410F075C9B004DE3B2 /* Obsolete */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF633C041EE0BA6F00AB33BD /* Resources */ = {
+                       isa = PBXResourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF633C1B1EE0BC5A00AB33BD /* vigilance.xml in Resources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF63A7F41AB4EDDB00593C75 /* Resources */ = {
                        isa = PBXResourcesBuildPhase;
                        buildActionMask = 2147483647;
                                AFEC68371BD6CA85004C1B64 /* OCRAStd.otf in Resources */,
                                AFC43E741C68364B00C89999 /* PxPlus_IBM_VGA8.ttf in Resources */,
                                AFEC68391BD6CDF9004C1B64 /* YearlReg.ttf in Resources */,
+                               AF142BAE1EE75DBF0005C0A8 /* settings.png in Resources */,
+                               557BF07E1EE90D3B00846DCE /* settings@2x.png in Resources */,
+                               557BF07F1EE90D3B00846DCE /* settings@3x.png in Resources */,
+                               AF142BAF1EE75DBF0005C0A8 /* stop.png in Resources */,
+                               557BF0801EE90D3B00846DCE /* stop@2x.png in Resources */,
+                               557BF0811EE90D3B00846DCE /* stop@3x.png in Resources */,
                                AF918AB4158FC53D002B5D1E /* abstractile.xml in Resources */,
                                AF918AB5158FC53D002B5D1E /* anemone.xml in Resources */,
                                AF918AB6158FC53D002B5D1E /* anemotaxis.xml in Resources */,
                                AF918B7D158FC53E002B5D1E /* tronbit.xml in Resources */,
                                AF918B7E158FC53E002B5D1E /* truchet.xml in Resources */,
                                AF918B7F158FC53E002B5D1E /* twang.xml in Resources */,
-                               AF918B80158FC53E002B5D1E /* vermiculate.xml in Resources */,
                                AF46E9EA1CBBA42F00240FBC /* unicrud.xml in Resources */,
                                AFDA65A6178A541A0070D24B /* unknownpleasures.xml in Resources */,
+                               AF918B80158FC53E002B5D1E /* vermiculate.xml in Resources */,
+                               AF633C1A1EE0BC5500AB33BD /* vigilance.xml in Resources */,
                                AF918B83158FC53E002B5D1E /* voronoi.xml in Resources */,
                                AF918B84158FC53E002B5D1E /* wander.xml in Resources */,
                                AF918B86158FC53E002B5D1E /* whirlwindwarp.xml in Resources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF633C111EE0BA6F00AB33BD /* Rez */ = {
+                       isa = PBXRezBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF63A8011AB4EDDB00593C75 /* Rez */ = {
                        isa = PBXRezBuildPhase;
                        buildActionMask = 2147483647;
                        shellScript = "$SOURCE_ROOT/update-info-plist.pl -q $BUILT_PRODUCTS_DIR/$PRODUCT_NAME$WRAPPER_SUFFIX";
                        showEnvVarsInLog = 0;
                };
+               AF633C121EE0BA6F00AB33BD /* Run Update Info Plist */ = {
+                       isa = PBXShellScriptBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                       );
+                       inputPaths = (
+                       );
+                       name = "Run Update Info Plist";
+                       outputPaths = (
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+                       shellPath = /bin/sh;
+                       shellScript = "$SOURCE_ROOT/update-info-plist.pl -q $BUILT_PRODUCTS_DIR/$PRODUCT_NAME$WRAPPER_SUFFIX";
+                       showEnvVarsInLog = 0;
+               };
                AF63A8021AB4EDDB00593C75 /* Run Update Info Plist */ = {
                        isa = PBXShellScriptBuildPhase;
                        buildActionMask = 2147483647;
                                AF4808C7098C3BE600FB32B8 /* hsv.c in Sources */,
                                AFBF893E0E41D930006A2D66 /* fps.c in Sources */,
                                AFBF89AF0E423FC3006A2D66 /* fps-gl.c in Sources */,
+                               5501D1961DBDCC3D00624BE9 /* xshm.c in Sources */,
                                AF4808C8098C3BE800FB32B8 /* InvertedSlider.m in Sources */,
+                               AF633C211EE0BDCD00AB33BD /* seccam.c in Sources */,
                                AF4808C9098C3BEC00FB32B8 /* jwxyz.m in Sources */,
                                AF4808CA098C3BEE00FB32B8 /* PrefsReader.m in Sources */,
                                AFDA11251934424D003D397F /* aligned_malloc.c in Sources */,
                                AFC75930158D9A7A00C5458E /* textclient-ios.m in Sources */,
                                AF561DF615969BC3007CA5ED /* grabclient-ios.m in Sources */,
                                CE9289D319BD00E300961F22 /* async_netdb.c in Sources */,
+                               55374E321E1582C6005E2362 /* pow2.c in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
+               AF633C061EE0BA6F00AB33BD /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               AF633C1D1EE0BCA700AB33BD /* vigilance.c in Sources */,
+                               AF633C081EE0BA6F00AB33BD /* XScreenSaverSubclass.m in Sources */,
+                               AF633C221EE0BDCD00AB33BD /* seccam.c in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                AF63A7F61AB4EDDB00593C75 /* Sources */ = {
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                                AF918A8D158FC417002B5D1E /* s1_6.c in Sources */,
                                AF918A8E158FC417002B5D1E /* s1_b.c in Sources */,
                                AF918A8F158FC417002B5D1E /* sballs.c in Sources */,
+                               AF633C231EE0BDCD00AB33BD /* seccam.c in Sources */,
                                AF918A90158FC417002B5D1E /* shark.c in Sources */,
                                AF918A91158FC417002B5D1E /* sierpinski3d.c in Sources */,
                                AF918A92158FC417002B5D1E /* skytentacles.c in Sources */,
                                AF918AB1158FC47B002B5D1E /* tunnel_draw.c in Sources */,
                                AF46E9EB1CBBA43B00240FBC /* unicrud.c in Sources */,
                                AFDA65A8178A541A0070D24B /* unknownpleasures.c in Sources */,
+                               AF633C1C1EE0BCA100AB33BD /* vigilance.c in Sources */,
                                AF918AB2158FC47B002B5D1E /* voronoi.c in Sources */,
                                AF918AB3158FC47B002B5D1E /* whale.c in Sources */,
                                AF39E2B8198A15EE0064A58D /* winduprobot.c in Sources */,
                        target = AF5C9AF91A0CCE6E00B0147A /* Cityflow */;
                        targetProxy = AF5C9B151A0CCF8000B0147A /* PBXContainerItemProxy */;
                };
+               AF633C021EE0BA6F00AB33BD /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = AF4808C0098C3B6C00FB32B8 /* jwxyz */;
+                       targetProxy = AF633C031EE0BA6F00AB33BD /* PBXContainerItemProxy */;
+               };
+               AF633C1F1EE0BCD300AB33BD /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = AF633C011EE0BA6F00AB33BD /* Vigilance */;
+                       targetProxy = AF633C1E1EE0BCD300AB33BD /* PBXContainerItemProxy */;
+               };
                AF63A7F21AB4EDDB00593C75 /* PBXTargetDependency */ = {
                        isa = PBXTargetDependency;
                        target = AF4808C0098C3B6C00FB32B8 /* jwxyz */;
                        };
                        name = Release;
                };
+               AF633C141EE0BA6F00AB33BD /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
+                                       "USE_GL=1",
+                                       "$(GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS)",
+                               );
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                       };
+                       name = Debug;
+               };
+               AF633C151EE0BA6F00AB33BD /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS = (
+                                       "USE_GL=1",
+                                       "$(GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS)",
+                               );
+                               PRODUCT_NAME = "$(TARGET_NAME)";
+                       };
+                       name = Release;
+               };
                AF63A8041AB4EDDB00593C75 /* Debug */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}.apple2";
                                CODE_SIGN_IDENTITY = "iPhone Developer";
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               COMBINE_HIDPI_IMAGES = NO;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "USE_IPHONE=1",
                                        "APPLE2_ONLY=1",
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}.apple2";
                                CODE_SIGN_IDENTITY = "iPhone Developer";
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               COMBINE_HIDPI_IMAGES = NO;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "USE_IPHONE=1",
                                        "APPLE2_ONLY=1",
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}.phosphor";
                                CODE_SIGN_IDENTITY = "iPhone Developer";
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               COMBINE_HIDPI_IMAGES = NO;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "USE_IPHONE=1",
                                        "PHOSPHOR_ONLY=1",
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}.phosphor";
                                CODE_SIGN_IDENTITY = "iPhone Developer";
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               COMBINE_HIDPI_IMAGES = NO;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "USE_IPHONE=1",
                                        "PHOSPHOR_ONLY=1",
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}.testX11";
                                CODE_SIGN_IDENTITY = "iPhone Developer";
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               COMBINE_HIDPI_IMAGES = NO;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "USE_IPHONE=1",
                                        "TESTX11_ONLY=1",
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}.testX11";
                                CODE_SIGN_IDENTITY = "iPhone Developer";
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               COMBINE_HIDPI_IMAGES = NO;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "USE_IPHONE=1",
                                        "TESTX11_ONLY=1",
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}";
                                CODE_SIGN_IDENTITY = "iPhone Developer";
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               COMBINE_HIDPI_IMAGES = NO;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "USE_IPHONE=1",
                                        "$(inherited)",
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}";
                                CODE_SIGN_IDENTITY = "iPhone Developer";
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+                               COMBINE_HIDPI_IMAGES = NO;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                        "USE_IPHONE=1",
                                        "$(inherited)",
                AFA3393E0B058505002B0E7D /* Debug */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
+                               COPY_PHASE_STRIP = NO;
                        };
                        name = Debug;
                };
                AFA3393F0B058505002B0E7D /* Release */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
+                               COPY_PHASE_STRIP = NO;
                        };
                        name = Release;
                };
                AFBFE75C178642DC00432B21 /* Debug */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
+                               COPY_PHASE_STRIP = NO;
                                INFOPLIST_FILE = SaverRunner.plist;
                                INSTALL_PATH = "$(HOME)/Applications";
                                "OTHER_CFLAGS[sdk=macosx*]" = "";
                AFBFE75D178642DC00432B21 /* Release */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
+                               COPY_PHASE_STRIP = NO;
                                INFOPLIST_FILE = SaverRunner.plist;
                                INSTALL_PATH = "$(HOME)/Applications";
                                "OTHER_CFLAGS[sdk=macosx*]" = "";
                AFBFE77C178647FE00432B21 /* Debug */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
+                               COPY_PHASE_STRIP = NO;
                                INFOPLIST_FILE = SaverRunner.plist;
                                INSTALL_PATH = "$(HOME)/Applications";
                                "OTHER_CFLAGS[sdk=macosx*]" = "";
                AFBFE77D178647FE00432B21 /* Release */ = {
                        isa = XCBuildConfiguration;
                        buildSettings = {
+                               COPY_PHASE_STRIP = NO;
                                INFOPLIST_FILE = SaverRunner.plist;
                                INSTALL_PATH = "$(HOME)/Applications";
                                "OTHER_CFLAGS[sdk=macosx*]" = "";
                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}.${PRODUCT_NAME:rfc1034identifier}";
                                CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
+                               CLANG_WARN_BOOL_CONVERSION = YES;
+                               CLANG_WARN_CONSTANT_CONVERSION = YES;
+                               CLANG_WARN_EMPTY_BODY = YES;
+                               CLANG_WARN_ENUM_CONVERSION = YES;
+                               CLANG_WARN_INFINITE_RECURSION = YES;
                                CLANG_WARN_INT_CONVERSION = YES;
+                               CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+                               CLANG_WARN_SUSPICIOUS_MOVE = YES;
+                               CLANG_WARN_UNREACHABLE_CODE = NO;
+                               CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
                                "CODE_SIGN_IDENTITY[sdk=iphonesimulator*]" = "iPhone Developer";
-                               "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Mac Developer";
+                               "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
                                COMBINE_HIDPI_IMAGES = YES;
                                DEVELOPMENT_TEAM = 4627ATJELP;
+                               ENABLE_STRICT_OBJC_MSGSEND = YES;
                                ENABLE_TESTABILITY = YES;
+                               GCC_NO_COMMON_BLOCKS = YES;
                                GCC_OPTIMIZATION_LEVEL = 0;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = xscreensaver_Prefix.pch;
                                GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
                                GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
                                GCC_WARN_MISSING_PARENTHESES = YES;
-                               GCC_WARN_SHADOW = NO;
                                GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
+                               GCC_WARN_UNDECLARED_SELECTOR = YES;
                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
                                GCC_WARN_UNUSED_FUNCTION = YES;
                                GCC_WARN_UNUSED_LABEL = YES;
                                );
                                INFOPLIST_FILE = XScreenSaver.plist;
                                INSTALL_PATH = "$(HOME)/Library/Screen Savers";
-                               IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+                               IPHONEOS_DEPLOYMENT_TARGET = 9.3;
                                LIBRARY_SEARCH_PATHS = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
                                ONLY_ACTIVE_ARCH = YES;
                                OTHER_CFLAGS = "";
                                ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
                                BUNDLE_IDENTIFIER = "org.jwz.${PROJECT_NAME:rfc1034identifier}.${PRODUCT_NAME:rfc1034identifier}";
                                CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
+                               CLANG_WARN_BOOL_CONVERSION = YES;
+                               CLANG_WARN_CONSTANT_CONVERSION = YES;
+                               CLANG_WARN_EMPTY_BODY = YES;
+                               CLANG_WARN_ENUM_CONVERSION = YES;
+                               CLANG_WARN_INFINITE_RECURSION = YES;
                                CLANG_WARN_INT_CONVERSION = YES;
+                               CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+                               CLANG_WARN_SUSPICIOUS_MOVE = YES;
+                               CLANG_WARN_UNREACHABLE_CODE = NO;
+                               CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                                "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Jamie Zawinski (4627ATJELP)";
                                "CODE_SIGN_IDENTITY[sdk=iphonesimulator*]" = "iPhone Distribution: Jamie Zawinski (4627ATJELP)";
                                "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application: Jamie Zawinski (4627ATJELP)";
                                COMBINE_HIDPI_IMAGES = YES;
                                DEVELOPMENT_TEAM = 4627ATJELP;
+                               ENABLE_STRICT_OBJC_MSGSEND = YES;
                                GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
+                               GCC_NO_COMMON_BLOCKS = YES;
                                GCC_PRECOMPILE_PREFIX_HEADER = YES;
                                GCC_PREFIX_HEADER = xscreensaver_Prefix.pch;
                                GCC_PREPROCESSOR_DEFINITIONS = (
                                GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES;
                                GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
                                GCC_WARN_MISSING_PARENTHESES = YES;
-                               GCC_WARN_SHADOW = NO;
                                GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
+                               GCC_WARN_UNDECLARED_SELECTOR = YES;
                                GCC_WARN_UNINITIALIZED_AUTOS = YES;
                                GCC_WARN_UNUSED_FUNCTION = YES;
                                GCC_WARN_UNUSED_LABEL = YES;
                                );
                                INFOPLIST_FILE = XScreenSaver.plist;
                                INSTALL_PATH = "$(HOME)/Library/Screen Savers";
-                               IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+                               IPHONEOS_DEPLOYMENT_TARGET = 9.3;
                                LIBRARY_SEARCH_PATHS = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
                                LLVM_LTO = NO;
                                "LLVM_LTO[sdk=macosx*]" = NO;
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Release;
                };
+               AF633C131EE0BA6F00AB33BD /* Build configuration list for PBXNativeTarget "Vigilance" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               AF633C141EE0BA6F00AB33BD /* Debug */,
+                               AF633C151EE0BA6F00AB33BD /* Release */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Release;
+               };
                AF63A8031AB4EDDB00593C75 /* Build configuration list for PBXNativeTarget "RomanBoy" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
diff --git a/README b/README
index 8f80f71d78f6bfbfe645b5ebf4b5d994be60e6c1..333b464f2d9439f760745be1b8b2e34cec7fe0f3 100644 (file)
--- a/README
+++ b/README
@@ -45,6 +45,13 @@ XScreenSaver has an extensive manual -- please read it!
 
 ===============================================================================
 
+5.37   * New hack, `vigilance'.
+       * Added Mac Software Update and VMware to `bsod'.
+       * OSX: Grabbing the desktop works again.
+       * OSX: Pinch to zoom.
+       * Android: Both Daydreams and Live Wallpapers are implemented.
+       * Updated `webcollage' for recent changes.
+       * Various bug fixes.
 5.36   * New hacks, `discoball', `cubetwist', `cubestack', `splodesic'
           and `hexstrut'.
        * OSX: loading image files works in `dymaxionmap', `glplanet',
index 35c24ec2050cdc060dd553f01a7a4ecf0c4e1b86..7549411bcb96ac8a9c0ea709e1ef5cd430ccfeba 100644 (file)
@@ -97,6 +97,7 @@ export ANDROID_HACKS=         \
        glschool                \
        glsnake                 \
        gltext                  \
+       goop                    \
        grav                    \
        greynetic               \
        helix                   \
@@ -141,6 +142,7 @@ export ANDROID_HACKS=               \
        raverhoop               \
        rd-bomb                 \
        ripples                 \
+       rocks                   \
        romanboy                \
        rorschach               \
        rotzoomer               \
@@ -169,6 +171,7 @@ export ANDROID_HACKS=               \
        twang                   \
        unknownpleasures        \
        vermiculate             \
+       vigilance               \
        voronoi                 \
        wander                  \
        whirlwindwarp           \
@@ -211,7 +214,6 @@ ANDROID_TODO=                       \
        glhanoi                 \
        glplanet                \
        glslideshow             \
-       goop                    \
        halftone                \
        halo                    \
        hypertorus              \
@@ -235,7 +237,6 @@ ANDROID_TODO=                       \
        pulsar                  \
        qix                     \
        queens                  \
-       rocks                   \
        skytentacles            \
        slip                    \
        speedmine               \
@@ -323,6 +324,7 @@ echo_tarfiles:
                -o -name '*.keystore'           \
                -o -name '*_dream.xml'          \
                -o -name '*_settings.xml'       \
+               -o -name '*_wallpaper.xml'      \
                -o -name AndroidManifest.xml    \
                -o -name strings.xml            \
                -o -name settings.xml           \
index 78fda15de4391901c6719e00ef6d39bcfd90c6f1..fb7a4da9c5a24e0ea97e938e2991ca5702010bb3 100644 (file)
@@ -190,7 +190,6 @@ TODO list, and known bugs:
   glhanoi       crashes emulator, but a few seconds in
   glplanet      crashes emulator
   glslideshow   images
-  goop          polygons
   halftone      XFillArc crash
   halo          XOR
   hypertorus    crashes emulator
@@ -206,7 +205,7 @@ TODO list, and known bugs:
   mountain      polygons
   munch         XOR
   noseguy       pixmaps
-  pacman       launches really slowly; fails at loading XPMs
+  pacman       launches really slowly
   pedal         polygons
   phosphor      pixmaps
   photopile     pixmaps
@@ -217,7 +216,6 @@ TODO list, and known bugs:
   pulsar        crashes emulator
   qix           polygons
   queens       crashes emulator
-  rocks         polygons
   skytentacles  crashes emulator
   slip          pixmaps
   sonar                crashes emulator
index d1f00b74848e11e995c653186b7699071e3acd37..9f5454000c2b7a17aadfb40b817dc82968f8a28f 100644 (file)
@@ -44,6 +44,7 @@ LOCAL_SRC_FILES += \
     utils/hsv.c \
     utils/logo.c \
     utils/minixpm.c \
+    utils/pow2.c \
     utils/resources.c \
     utils/spline.c \
     utils/textclient-mobile.c \
@@ -51,6 +52,7 @@ LOCAL_SRC_FILES += \
     utils/usleep.c \
     utils/utf8wc.c \
     utils/xft.c \
+    utils/xshm.c \
     utils/yarandom.c \
 
 # The source files of all of the currently active hacks:
@@ -100,6 +102,7 @@ LOCAL_SRC_FILES += \
     hacks/glx/s1_5.c \
     hacks/glx/s1_6.c \
     hacks/glx/s1_b.c \
+    hacks/glx/seccam.c \
     hacks/glx/shark.c \
     hacks/glx/sonar-sim.c \
     hacks/glx/sonar-icmp.c \
@@ -128,7 +131,7 @@ LOCAL_SRC_FILES += \
     hacks/glx/tunnel_draw.c \
     hacks/glx/whale.c \
 
-LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog -lEGL
+LOCAL_LDLIBS := -lGLESv1_CM -ldl -llog -lEGL -latomic
 
 LOCAL_C_INCLUDES := \
        $(LOCAL_PATH) \
diff --git a/android/project/xscreensaver/res/layout-land/activity_xscreensaver.xml b/android/project/xscreensaver/res/layout-land/activity_xscreensaver.xml
new file mode 100644 (file)
index 0000000..24f33e0
--- /dev/null
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- TODO: Remove action bar; it's redundant. -->
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    android:orientation="horizontal"
+    android:gravity="center_horizontal"
+    tools:context="org.jwz.xscreensaver.XScreenSaverActivity">
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:layout_centerHorizontal="true"
+        android:layout_centerVertical="true"
+        android:gravity="center_vertical"
+        android:orientation="vertical">
+
+        <ImageView
+            android:layout_width="256sp"
+            android:layout_height="256sp"
+            android:layout_centerHorizontal="true"
+            android:src="@drawable/thumbnail" />
+        <!-- TODO: Version number! -->
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="wrap_content"
+        android:layout_height="fill_parent"
+        android:layout_centerHorizontal="true"
+        android:layout_centerVertical="true"
+        android:gravity="center_vertical"
+        android:orientation="vertical">
+
+
+        <TextView
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:text="XScreenSaver"
+            android:textSize="32sp" />
+        <Button
+            android:id="@+id/apply_wallpaper"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:text="Open live wallpaper list" />
+        <Button
+            android:id="@+id/apply_daydream"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:text="Open Daydream list" />
+        <TextView
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:autoLink="web"
+            android:gravity="center"
+            android:text="https://www.jwz.org/xscreensaver/" />
+    </LinearLayout>
+</LinearLayout>
index 824be40a5ec66fb5c63e132a4bf8d41455c4f570..8adfa0020c3088e19da89cdaf3f47005dfa817e6 100644 (file)
@@ -1,16 +1,44 @@
 <?xml version="1.0" encoding="utf-8"?>
+<!-- TODO: Flip layout orientation on rotation. And maybe make scrollable? -->
+<!-- TODO: Remove action bar; it's redundant. -->
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:padding="15dp"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
     tools:context="org.jwz.xscreensaver.XScreenSaverActivity">
-    <Button
-        android:id="@+id/apply_wallpaper"
+    <LinearLayout
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:padding="15dp"
-        android:text="Open Daydream list"
+        android:layout_centerHorizontal="true"
         android:layout_centerVertical="true"
-        android:layout_centerHorizontal="true" />
+        android:orientation="vertical">
+        <ImageView
+            android:layout_width="256sp"
+            android:layout_height="256sp"
+            android:layout_centerHorizontal="true"
+            android:src="@drawable/thumbnail" />
+        <!-- TODO: Version number! -->
+        <TextView
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:gravity="center"
+            android:text="XScreenSaver"
+            android:textSize="32sp" />
+        <Button
+            android:id="@+id/apply_wallpaper"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:text="Open live wallpaper list" />
+        <Button
+            android:id="@+id/apply_daydream"
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:text="Open Daydream list" />
+        <TextView
+            android:layout_width="fill_parent"
+            android:layout_height="wrap_content"
+            android:autoLink="web"
+            android:gravity="center"
+            android:text="https://www.jwz.org/xscreensaver/" />
+    </LinearLayout>
 </RelativeLayout>
index a82727c8aff8aaef009480be0773bde23b36e872..dea2fad6f54d1381ab8363bb58d878a47d1cccce 100644 (file)
@@ -26,32 +26,35 @@ import android.os.Bundle;
 import android.view.View;
 import android.provider.Settings;
 
-public class XScreenSaverActivity extends Activity {
+public class XScreenSaverActivity extends Activity
+  implements View.OnClickListener {
 
   @Override
   protected void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
-    openList();
+    // openList();
     setContentView(R.layout.activity_xscreensaver);
 
-    findViewById(R.id.apply_wallpaper)
-      .setOnClickListener(new View.OnClickListener() {
-          @Override
-          public void onClick(View v) {
-              openList();
-          }
-      });
-
+    findViewById(R.id.apply_wallpaper).setOnClickListener(this);
+    findViewById(R.id.apply_daydream).setOnClickListener(this);
   }
 
-  private void openList() {
-    Intent intent;
-    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
-        intent = new Intent(Settings.ACTION_DREAM_SETTINGS);
-    } else {
-        intent = new Intent(Settings.ACTION_DISPLAY_SETTINGS);
+  @Override
+  public void onClick(View v) {
+    switch (v.getId()) {
+    case R.id.apply_wallpaper:
+      startActivity(new Intent(WallpaperManager.ACTION_LIVE_WALLPAPER_CHOOSER));
+      break;
+
+    case R.id.apply_daydream:
+      String action;
+      if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
+        action = Settings.ACTION_DREAM_SETTINGS;
+      } else {
+        action = Settings.ACTION_DISPLAY_SETTINGS;
+      }
+      startActivity(new Intent(action));
+      break;
     }
-    startActivity(intent);
   }
-
 }
index 8824dbe1d3f6071a49a39a871bd18020df913f15..e32172142091606c32596593fe62a70f62318890 100644 (file)
@@ -43,7 +43,6 @@ public class XScreenSaverDaydream extends DreamService
              Handler.Callback {
 
   private GLSurfaceView glview;
-  private int api;
   XScreenSaverRenderer renderer;
   private GestureDetector detector;
   boolean button_down_p;
@@ -55,9 +54,8 @@ public class XScreenSaverDaydream extends DreamService
            String.format (fmt, args));
   }
 
-  protected XScreenSaverDaydream (int api) {
+  protected XScreenSaverDaydream () {
     super();
-    this.api = api;
   }
 
   // Called when jwxyz_abort() is called, or other exceptions are thrown.
@@ -104,23 +102,11 @@ public class XScreenSaverDaydream extends DreamService
     setFullscreen (true);
     saveScreenshot();
 
-    // Extract the saver name from e.g. "BouncingCowDaydream"
-    String name = this.getClass().getSimpleName();
-    int index = name.lastIndexOf('$');
-    if (index != -1) {
-      index++;
-      name = name.substring (index, name.length() - index);
-    }
-    name = name.toLowerCase();
-
-    WindowManager wm = (WindowManager) getSystemService (WINDOW_SERVICE);
     glview = new GLSurfaceView (this);
     renderer =
-      new XScreenSaverRenderer (name, api, getApplicationContext(), wm,
-                                screenshot, this, glview);
-    glview.setEGLConfigChooser (8, 8, 8, 8, 16, 0);
-    glview.setRenderer (renderer);
-    glview.setRenderMode (GLSurfaceView.RENDERMODE_WHEN_DIRTY);
+      new XScreenSaverRenderer (XScreenSaverRenderer.saverNameOf (this),
+                                getApplicationContext(), screenshot,
+                                this, glview);
     setContentView (glview);
 
     detector = new GestureDetector (this, this);
index f854636cdff40e6f397f1a4a86f5388ae96d4b92..5ae5a5a823a988d2b1440c20a0ae6be601c6c698 100644 (file)
@@ -38,12 +38,9 @@ public class XScreenSaverRenderer implements GLSurfaceView.Renderer {
   jwxyz jwxyz_obj = null;
 
   String hack;
-  int api;
   Handler.Callback abort_callback;
 
-  Iterable<Map.Entry<String, String>> prefs;
   Context app;
-  WindowManager wm;
   Bitmap screenshot;
 
   GLSurfaceView glview;
@@ -68,21 +65,33 @@ public class XScreenSaverRenderer implements GLSurfaceView.Renderer {
     abort_callback.handleMessage (m);
   }
 
-  public XScreenSaverRenderer (String hack, int api,
-                               Context app, WindowManager wm,
+  public XScreenSaverRenderer (String hack,
+                               Context app,
                                Bitmap screenshot,
                                Handler.Callback abort_callback,
                                GLSurfaceView glview) {
     super();
     this.hack   = hack;
-    this.api    = api;
     this.app    = app;
-    this.wm     = wm;
-    this.prefs  = prefs;
     this.screenshot = screenshot;
     this.abort_callback = abort_callback;
     this.glview = glview;
-    LOG ("init %s %d", hack, api);
+    LOG ("init %s", hack);
+
+    this.glview.setEGLConfigChooser (8, 8, 8, 8, 16, 0);
+    this.glview.setRenderer (this);
+    this.glview.setRenderMode (GLSurfaceView.RENDERMODE_WHEN_DIRTY);
+  }
+
+  static public String saverNameOf (Object obj) {
+    // Extract the saver name from e.g. "gen.Daydream$BouncingCow"
+    String name = obj.getClass().getSimpleName();
+    int index = name.lastIndexOf('$');
+    if (index != -1) {
+      index++;
+      name = name.substring (index, name.length() - index);
+    }
+    return name.toLowerCase();
   }
 
   public void onDrawFrame (GL10 gl) {
@@ -101,17 +110,18 @@ public class XScreenSaverRenderer implements GLSurfaceView.Renderer {
   public void onSurfaceChanged(GL10 gl, int w, int h) {
     try {
       if (jwxyz_obj == null)
-        jwxyz_obj = new jwxyz (hack, api, app, screenshot, w, h);
+        jwxyz_obj = new jwxyz (hack, app, screenshot, w, h);
 
-      double r;
+      double r = 0;
 
-      Display d = wm.getDefaultDisplay();
+      Display d = glview.getDisplay();
 
-      switch (d.getRotation()) {
-      case Surface.ROTATION_90:  r = 90;  break;
-      case Surface.ROTATION_180: r = 180; break;
-      case Surface.ROTATION_270: r = 270; break;
-      default: r = 0; break;
+      if (d != null) {
+        switch (d.getRotation()) {
+        case Surface.ROTATION_90:  r = 90;  break;
+        case Surface.ROTATION_180: r = 180; break;
+        case Surface.ROTATION_270: r = 270; break;
+        }
       }
 
       jwxyz_obj.nativeResize (w, h, r);
diff --git a/android/project/xscreensaver/src/org/jwz/xscreensaver/XScreenSaverWallpaper.java b/android/project/xscreensaver/src/org/jwz/xscreensaver/XScreenSaverWallpaper.java
new file mode 100644 (file)
index 0000000..b03c904
--- /dev/null
@@ -0,0 +1,100 @@
+/* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * xscreensaver, Copyright (c) 2016 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.
+ *
+ * The superclass of every saver's Wallpaper.
+ *
+ * Each Wallpaper needs a distinct subclass in order to show up in the list.
+ * We know which saver we are running by the subclass name; we know which
+ * API to use by how the subclass calls super().
+ */
+
+package org.jwz.xscreensaver;
+
+import android.opengl.GLSurfaceView;
+import android.os.Handler;
+import android.os.Message;
+import android.service.wallpaper.WallpaperService;
+import android.view.GestureDetector;
+import android.view.SurfaceHolder;
+import android.util.Log;
+import java.lang.RuntimeException;
+import java.lang.Thread;
+
+public class XScreenSaverWallpaper extends WallpaperService
+/*implements GestureDetector.OnGestureListener,
+             GestureDetector.OnDoubleTapListener, */ {
+
+  /* TODO: Input! */
+
+  @Override
+  public Engine onCreateEngine() {
+    return new XScreenSaverGLEngine();
+  }
+
+  class XScreenSaverGLEngine extends Engine
+  implements Handler.Callback {
+
+    GLSurfaceView glview;
+
+    @Override
+    public void onSurfaceCreated (SurfaceHolder holder) {
+      /* Old GLWallpaperService warns against working with a GLSurfaceView
+         in the Engine constructor.
+       */
+      glview = new GLSurfaceView (XScreenSaverWallpaper.this) {
+        @Override
+        public SurfaceHolder getHolder() {
+          return XScreenSaverGLEngine.this.getSurfaceHolder();
+        }
+      };
+
+      new XScreenSaverRenderer (
+        XScreenSaverRenderer.saverNameOf (XScreenSaverWallpaper.this),
+        XScreenSaverWallpaper.this, null, this, glview);
+      // super.onSurfaceCreated(holder);
+      glview.surfaceCreated(holder);
+      // glview.requestRender();
+    }
+
+    @Override
+    public void onVisibilityChanged(final boolean visible) {
+      if (glview != null) {
+        if (visible)
+          glview.onResume();
+        else
+          glview.onPause();
+      }
+    }
+
+    /* These aren't necessary...maybe? */
+/*
+    @Override
+    public void onSurfaceChanged (SurfaceHolder holder, int format,
+                                  int width, int height) {
+      if (glview)
+        glview.surfaceChanged(holder, format, width, height);
+      // super.onSurfaceChanged(holder, format, width, height);
+    }
+
+    @Override
+    public void onSurfaceDestroyed (SurfaceHolder holder) {
+      glview.surfaceDestroyed(holder);
+    }
+*/
+
+    @Override
+    public boolean handleMessage (Message msg) {
+      Log.d ("xscreensaver", msg.obj.toString());
+      throw (RuntimeException)msg.obj;
+      // return false;
+    }
+  }
+}
index 1982ca49f044b16f497a3c8733b96661545dc2b0..95952e0b9bbeca372b1c52259b412a1d908fe256 100644 (file)
@@ -61,10 +61,16 @@ public class jwxyz {
 
   String hack;
   Context app;
-  public final static int API_XLIB = 0;
-  public final static int API_GL   = 1;
   Bitmap screenshot;
 
+  public final static int STYLE_BOLD      = 1;
+  public final static int STYLE_ITALIC    = 2;
+  public final static int STYLE_MONOSPACE = 4;
+
+  public final static int FONT_FAMILY = 0;
+  public final static int FONT_FACE   = 1;
+  public final static int FONT_RANDOM = 2;
+
   SharedPreferences prefs;
   Hashtable<String, String> defaults = new Hashtable<String, String>();
 
@@ -76,7 +82,7 @@ public class jwxyz {
 
   // These are defined in jwxyz-android.c:
   //
-  private native void nativeInit (String hack, int api,
+  private native void nativeInit (String hack,
                                   Hashtable<String,String> defaults,
                                   int w, int h);
   public native void nativeResize (int w, int h, double rot);
@@ -87,8 +93,7 @@ public class jwxyz {
   public native void sendKeyEvent (boolean down_p, int code, int mods);
 
   // Constructor
-  public jwxyz (String hack, int api, Context app, Bitmap screenshot,
-                int w, int h) {
+  public jwxyz (String hack, Context app, Bitmap screenshot, int w, int h) {
 
     this.hack = hack;
     this.app  = app;
@@ -99,7 +104,7 @@ public class jwxyz {
 
     prefs = app.getSharedPreferences (hack, 0);
     scanSystemFonts();
-    nativeInit (hack, api, defaults, w, h);
+    nativeInit (hack, defaults, w, h);
   }
 
 /*  TODO: Can't do this yet; nativeDone requires the OpenGL context to be set.
@@ -228,80 +233,33 @@ public class jwxyz {
   }
 
 
-  // Parses X Logical Font Descriptions, and a few standard X font names.
-  // Returns [ String name, Float size, Typeface ]
-  private Object[] parseXLFD (String name) {
-    float   size   = 12;
-    boolean bold   = false;
-    boolean italic = false;
+  // Parses family names from X Logical Font Descriptions, including a few
+  // standard X font names that aren't handled by try_xlfd_font().
+  // Returns [ String name, Typeface ]
+  private Object[] parseXLFD (int mask, int traits,
+                              String name, int name_type) {
     boolean fixed  = false;
     boolean serif  = false;
 
-    if      (name.equals("6x10"))     { size = 8;  fixed = true; }
-    else if (name.equals("6x10bold")) { size = 8;  fixed = true; bold = true; }
-    else if (name.equals("fixed"))    { size = 12; fixed = true; }
-    else if (name.equals("9x15"))     { size = 12; fixed = true; }
-    else if (name.equals("9x15bold")) { size = 12; fixed = true; bold = true; }
-    else if (name.equals("vga"))      { size = 12; fixed = true; }
-    else if (name.equals("console"))  { size = 12; fixed = true; }
-    else if (name.equals("gallant"))  { size = 12; fixed = true; }
-    else {
-      String[] tokens = name.split("-");       // XLFD
-      int L = tokens.length;
-      int i = 1;
-      String foundry  = (i < L ? tokens[i++] : "");
-      String family   = (i < L ? tokens[i++] : "");
-      String weight   = (i < L ? tokens[i++] : "");
-      String slant    = (i < L ? tokens[i++] : "");
-      String setwidth = (i < L ? tokens[i++] : "");
-      String adstyle  = (i < L ? tokens[i++] : "");
-      String pxsize   = (i < L ? tokens[i++] : "");
-      String ptsize   = (i < L ? tokens[i++] : "");
-      String resx     = (i < L ? tokens[i++] : "");
-      String resy     = (i < L ? tokens[i++] : "");
-      String spacing  = (i < L ? tokens[i++] : "");
-      String avgw     = (i < L ? tokens[i++] : "");
-      String charset  = (i < L ? tokens[i++] : "");
-      String registry = (i < L ? tokens[i++] : "");
-
-      if (spacing.equals("m") ||
-          family.equals("fixed") ||
-          family.equals("courier") ||
-          family.equals("console") ||
-          family.equals("lucidatypewriter")) {
+    int style_jwxyz = mask & traits;
+
+    if (name_type != FONT_RANDOM) {
+      if ((style_jwxyz & STYLE_BOLD) != 0 ||
+          name.equals("fixed") ||
+          name.equals("courier") ||
+          name.equals("console") ||
+          name.equals("lucidatypewriter") ||
+          name.equals("monospace")) {
+        fixed = true;
+      } else if (name.equals("times") ||
+                 name.equals("georgia") ||
+                 name.equals("serif")) {
+        serif = true;
+      } else if (name.equals("serif-monospace")) {
         fixed = true;
-      } else if (family.equals("times") ||
-                 family.equals("georgia")) {
         serif = true;
       }
-
-      if (weight.equals("bold") || weight.equals("demibold")) {
-        bold = true; 
-      }
-
-      if (slant.equals("i") || slant.equals("o")) {
-        italic = true;
-      }
-
-      // -*-courier-bold-r-*-*-14-*-*-*-*-*-*-*                14 px
-      // -*-courier-bold-r-*-*-*-140-*-*-m-*-*-*       14 pt
-      // -*-courier-bold-r-*-*-140-*                   14 pt, via wildcard
-      // -*-courier-bold-r-*-140-*                     14 pt, not handled
-      // -*-courier-bold-r-*-*-14-180-*-*-*-*-*-*      error
-
-      if (!ptsize.equals("") && !ptsize.equals("*")) {
-        // It was in the ptsize field, so that's definitely what it is.
-        size = Float.valueOf(ptsize) / 10.0f;
-      } else if (!pxsize.equals("") && !pxsize.equals("*")) {
-        size = Float.valueOf(pxsize);
-        // If it's a fully qualified XLFD, then this really is the pxsize.
-        // Otherwise, this is probably point size with a multi-field wildcard.
-        if (registry.equals(""))   // not a fully qualified XLFD
-          size /= 10.0f;
-      }
-    }
-
-    if (name.equals("random")) {
+    } else {
       Random r = new Random();
       serif = r.nextBoolean();      // Not much to randomize here...
       fixed = (r.nextInt(8) == 0);
@@ -311,81 +269,57 @@ public class jwxyz {
             ? (serif ? "serif-monospace" : "monospace")
             : (serif ? "serif" : "sans-serif"));
 
-    Typeface font = Typeface.create (name,
-                                     (bold && italic ? Typeface.BOLD_ITALIC :
-                                      bold   ? Typeface.BOLD :
-                                      italic ? Typeface.ITALIC :
-                                      Typeface.NORMAL));
+    int style_android = 0;
+    if ((style_jwxyz & STYLE_BOLD) != 0)
+      style_android |= Typeface.BOLD;
+    if ((style_jwxyz & STYLE_ITALIC) != 0)
+      style_android |= Typeface.ITALIC;
 
-    Object ret[] = { name, new Float(size), font };
-    return ret;
+    return new Object[] { name, Typeface.create(name, style_android) };
   }
 
 
   // Parses "Native Font Name One 12, Native Font Name Two 14".
-  // Returns [ String name, Float size, Typeface ]
-  private Object[] parseNativeFont (String names) {
-    for (String name : names.split(",")) {
-      float size = 0;
-      name = name.trim();
-      if (name.equals("")) continue;
-      int spc = name.lastIndexOf(" ");
-      if (spc > 0) {
-        size = Float.valueOf (name.substring (spc + 1));
-        name = name.substring (0, spc);
-      }
-      if (size <= 0)
-        size = 12;
-
-      Object font = all_fonts.get (name);
-      if (font instanceof String)
-        font = Typeface.create (name, Typeface.NORMAL);
-
-      if (font != null) {
-        Object ret[] = { name, size, (Typeface) font };
-        return ret;
-      }
-    }
-
-    return null;
+  // Returns [ String name, Typeface ]
+  private Object[] parseNativeFont (String name) {
+    Object font2 = all_fonts.get (name);
+    if (font2 instanceof String)
+      font2 = Typeface.create (name, Typeface.NORMAL);
+    return new Object[] { name, (Typeface)font2 };
   }
 
 
-  // Returns [ Paint paint, String name, Float size, ascent, descent ]
-  public Object[] loadFont(String name) {
+  // Returns [ Paint paint, String family_name, Float ascent, Float descent ]
+  public Object[] loadFont(int mask, int traits, String name, int name_type,
+                           float size) {
     Object pair[];
 
-    if (name.equals("")) return null;
+    if (name_type != FONT_RANDOM && name.equals("")) return null;
 
-    if (name.contains(" ")) {
+    if (name_type == FONT_FACE) {
       pair = parseNativeFont (name);
     } else {
-      pair = parseXLFD (name);
+      pair = parseXLFD (mask, traits, name, name_type);
     }
 
-    if (pair == null) return null;
-
     String name2  = (String)   pair[0];
-    float size    = (Float)    pair[1];
-    Typeface font = (Typeface) pair[2];
+    Typeface font = (Typeface) pair[1];
 
     size *= 2;
 
-    name2 += (font.isBold() && font.isItalic() ? " bold italic" :
-              font.isBold()   ? " bold"   :
-              font.isItalic() ? " italic" :
-              "");
+    String suffix = (font.isBold() && font.isItalic() ? " bold italic" :
+                     font.isBold()   ? " bold"   :
+                     font.isItalic() ? " italic" :
+                     "");
     Paint paint = new Paint();
     paint.setTypeface (font);
     paint.setTextSize (size);
     paint.setColor (Color.argb (0xFF, 0xFF, 0xFF, 0xFF));
 
-    LOG ("load font \"%s\" = \"%s %.1f\"", name, name2, size);
+    LOG ("load font \"%s\" = \"%s %.1f\"", name, name2 + suffix, size);
 
     FontMetrics fm = paint.getFontMetrics();
-    Object ret[] = { paint, name2, new Float(size),
-                     new Float(-fm.ascent), new Float(fm.descent) };
-    return ret;
+    return new Object[] { paint, name2, -fm.ascent, fm.descent };
   }
 
 
index c8b4fdfe9f23872b15d3bf187b10e8b1e33c890d..c3dd3756732ed419c6e848d1254e45ed4cc55bbb 100644 (file)
 /* Define to 1 if you have the `sigtimedwait' function. */
 #undef HAVE_SIGTIMEDWAIT
 
+/* Define to 1 if you have the `sqrtf' function. */
+#undef HAVE_SQRTF
+
 /* Define to 1 if you have the <stdint.h> header file. */
 #undef HAVE_STDINT_H
 
index b0a24cb0181dfd9683bb3ad1de2b246baea3bc39..5f1515b1d30a58179ce84a05ab7a9eb1b31aa8dc 100755 (executable)
--- a/configure
+++ b/configure
@@ -5864,12 +5864,13 @@ _ACEOF
 fi
 done
 
-for ac_func in setlocale
+for ac_func in setlocale sqrtf
 do :
-  ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale"
-if test "x$ac_cv_func_setlocale" = xyes; then :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
   cat >>confdefs.h <<_ACEOF
-#define HAVE_SETLOCALE 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
 _ACEOF
 
 fi
@@ -7651,7 +7652,7 @@ _ACEOF
 
 
 
-ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
+ALL_LINGUAS="da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
 
    for ac_header in locale.h
 do :
@@ -13082,6 +13083,9 @@ $as_echo "adding \"$osx_crud\" to GL_LIBS" >&6; }
 $as_echo "omitting \"$libdir\" from LDFLAGS" >&6; }
       libdir=''
 
+      # Looks like as of OSX 10.12, gcc can't do ObjC.
+      OBJCC="clang -Wall"
+
     fi
 
 
@@ -13307,7 +13311,7 @@ if ${ac_cv_mesagl_version_string+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 13314 "configure"
+#line 13318 "configure"
 #include "confdefs.h"
 #include <GL/gl.h>
 #ifndef MESA_MAJOR_VERSION
index 3c5583582f12c6efa2dd446f187edaf09d6ed5fd..74235ab5a940c4cb77d8f3a8f04ab2af7c2c5700 100644 (file)
@@ -1259,7 +1259,7 @@ AC_GETTIMEOFDAY_ARGS
 AC_SYS_LARGEFILE
 AC_CHECK_FUNCS(select fcntl uname nice setpriority getcwd getwd putenv sbrk)
 AC_CHECK_FUNCS(sigaction syslog realpath setrlimit)
-AC_CHECK_FUNCS(setlocale)
+AC_CHECK_FUNCS(setlocale sqrtf)
 AC_CHECK_FUNCS(getaddrinfo)
 AC_CHECK_MEMBERS([struct sockaddr.sa_len],,, [[#include <sys/socket.h>]])
 AC_CHECK_ICMP
@@ -1309,7 +1309,7 @@ AC_DEFINE_UNQUOTED(PACKAGE, "$GETTEXT_PACKAGE",
                   generated code.])
 AC_SUBST(GETTEXT_PACKAGE)
 
-ALL_LINGUAS="ca da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
+ALL_LINGUAS="da de es et fi fr hu it ja ko nb nl pl pt pt_BR ru sk sv vi wa zh_CN zh_TW"
 AM_GLIB_GNU_GETTEXT
 MKINSTALLDIRS="$INSTALL_DIRS"
 
@@ -2994,6 +2994,9 @@ if test "$with_gl" = yes; then
       AC_MSG_RESULT(omitting "$libdir" from LDFLAGS)
       libdir=''
 
+      # Looks like as of OSX 10.12, gcc can't do ObjC.
+      OBJCC="clang -Wall"
+
     fi
 
 
index e2a600d2d82f4ccf6626c012c6a975c54bb096f6..a570a270f5624d961b5d487388c87ebf1f48a5d1 100644 (file)
@@ -205,7 +205,7 @@ PDF2JPEG_LIBS       = -framework Cocoa
 SAVER_LIBS     = $(LIBS) $(X_LIBS) $(XMU_LIBS) @SAVER_LIBS@ \
                  $(XDPMS_LIBS) $(XINERAMA_LIBS) $(GL_LIBS) $(X_PRE_LIBS) \
                  -lXt -lX11 -lXext $(X_EXTRA_LIBS) \
-                 $(PASSWD_LIBS)
+                 $(PASSWD_LIBS) $(INTL_LIBS)
 
 CMD_LIBS       = $(LIBS) $(X_LIBS) \
                  $(X_PRE_LIBS) -lX11 -lXext $(X_EXTRA_LIBS)
@@ -726,9 +726,17 @@ $(UTILS_BIN)/logo.o:               $(UTILS_SRC)/logo.c
 $(UTILS_BIN)/minixpm.o:                $(UTILS_SRC)/minixpm.c
 $(UTILS_BIN)/yarandom.o:       $(UTILS_SRC)/yarandom.c
 $(UTILS_BIN)/colorbars.o:      $(UTILS_SRC)/colorbars.c
+$(UTILS_BIN)/hsv.o:            $(UTILS_SRC)/hsv.c
+$(UTILS_BIN)/colors.o:         $(UTILS_SRC)/colors.c
+$(UTILS_BIN)/grabscreen.o:     $(UTILS_SRC)/grabscreen.c
 
-$(SAVER_UTIL_OBJS):
-       $(MAKE) -C $(UTILS_BIN) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+UTIL_OBJS      = $(SAVER_UTIL_OBJS) $(UTILS_BIN)/colorbars.o \
+                 $(UTILS_BIN)/hsv.o $(UTILS_BIN)/colors.o \
+                 $(UTILS_BIN)/grabscreen.o
+
+$(UTIL_OBJS):
+       cd $(UTILS_BIN) ; \
+       $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
 # How we build object files in this directory.
 .c.o:
index 0e70efdc7b6c4010f2420f071f8add6b539f3b22..353bb643f9f5526288cb39603bef1cdb2fc8f5a0 100644 (file)
@@ -4,8 +4,8 @@
 !            a screen saver and locker for the X window system
 !                            by Jamie Zawinski
 !
-!                              version 5.36
-!                              10-Oct-2016
+!                              version 5.37
+!                              05-Jul-2017
 !
 ! See "man xscreensaver" for more info.  The latest version is always
 ! available at https://www.jwz.org/xscreensaver/
@@ -380,7 +380,8 @@ GetViewPortIsFullOfLies: False
 @GL_KLUDGE@ GL:                                hydrostat -root                             \n\
 @GL_KLUDGE@ GL:                                raverhoop -root                             \n\
 @GL_KLUDGE@ GL:                                splodesic -root                             \n\
-@GL_KLUDGE@ GL:                                unicrud -root                               \n
+@GL_KLUDGE@ GL:                                unicrud -root                               \n\
+@GL_KLUDGE@ GL:                                vigilance -root                             \n
 
 
 
@@ -439,7 +440,7 @@ XScreenSaver.bourneShell:           /bin/sh
 *passwd.uname:                  True
 
 *splash.heading.label:         XScreenSaver %s
-*splash.body.label:            Copyright \251 1991-2016 by
+*splash.body.label:            Copyright \251 1991-2017 by
 *splash.body2.label:           Jamie Zawinski <jwz@jwz.org>
 *splash.demo.label:            Settings
 *splash.help.label:            Help
index 7e0e279a4fb64d23ed7eb46d4baf1007402b7a4e..ded085ece7822d38536a8cb1f6de0bb9be51ae21 100644 (file)
                                compass -root                               \\n\
                                deluxe -root                                \\n\
 -                              demon -root                                 \\n\
-  GL:                          extrusion -root                             \\n\
+- GL:                          extrusion -root                             \\n\
 -                              loop -root                                  \\n\
                                penetrate -root                             \\n\
                                petri -root                                 \\n\
   GL:                          hydrostat -root                             \\n\
   GL:                          raverhoop -root                             \\n\
   GL:                          splodesic -root                             \\n\
-  GL:                          unicrud -root                               \\n",
+  GL:                          unicrud -root                               \\n\
+  GL:                          vigilance -root                             \\n",
 "XScreenSaver.pointerPollTime:         0:00:05",
 "XScreenSaver.pointerHysteresis:               10",
 "XScreenSaver.initialDelay:            0:00:00",
 "*passwd.asterisks:              True",
 "*passwd.uname:                  True",
 "*splash.heading.label:                XScreenSaver %s",
-"*splash.body.label:           Copyright \\251 1991-2016 by",
+"*splash.body.label:           Copyright \\251 1991-2017 by",
 "*splash.body2.label:          Jamie Zawinski <jwz@jwz.org>",
 "*splash.demo.label:           Settings",
 "*splash.help.label:           Help",
index 4be93319050dd48b04e2b94c17e4b8c9d0a69997..553e476ee0886597ff6bfd4453a0e6c61732d1ad 100644 (file)
@@ -1,5 +1,5 @@
 /* dpms.c --- syncing the X Display Power Management values
- * xscreensaver, Copyright (c) 2001-2011 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 2001-2017 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
@@ -266,6 +266,7 @@ monitor_power_on (saver_info *si, Bool on_p)
       XSync (si->dpy, False);
       DPMSForceLevel(si->dpy, (on_p ? DPMSModeOn : DPMSModeOff));
       XSync (si->dpy, False);
+      XSetErrorHandler (old_handler);
       /* Ignore error_handler_hit_p, just probe monitor instead */
 
       if ((!!on_p) != monitor_powered_on_p (si))  /* double-check */
index 930c6ca2801ea349ff5e67a6ee22e7b49ab7c112..d463bc2de068da1e0129e4f012ed53ce2b08ba60 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-2016 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1993-2017 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
@@ -184,8 +184,10 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
   pam_handle_t *pamh = 0;
   int status = -1;
   struct pam_conv pc;
+# ifdef HAVE_SIGTIMEDWAIT
   sigset_t set;
   struct timespec timeout;
+# endif /* HAVE_SIGTIMEDWAIT */
 
   pc.conv = &pam_conversation;
   pc.appdata_ptr = (void *) si;
@@ -243,9 +245,12 @@ pam_try_unlock(saver_info *si, Bool verbose_p,
   if (verbose_p)
     fprintf (stderr, "%s:   pam_authenticate (...) ...\n", blurb());
 
+# ifdef HAVE_SIGTIMEDWAIT
   timeout.tv_sec = 0;
   timeout.tv_nsec = 1;
-  set = block_sigchld();
+  set =
+# endif /* HAVE_SIGTIMEDWAIT */
+    block_sigchld();
   status = pam_authenticate (pamh, 0);
 # ifdef HAVE_SIGTIMEDWAIT
   sigtimedwait (&set, NULL, &timeout);
index 18c669ddd184ca6c1a9ed4de75c61aa98c353fc1..38381e06a2ac0407c57428070a55f97d2dbd33f4 100644 (file)
@@ -1,5 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2014, 2016
- * -Jamie Zawinski <jwz@netscape.com>
+/* xscreensaver, Copyright (c) 1991-2017 Jamie Zawinski <jwz@netscape.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -425,21 +424,6 @@ make_splash_dialog (saver_info *si)
 
   {
     int sx = 0, sy = 0, w, h;
-    int mouse_x = 0, mouse_y = 0;
-
-    {
-      Window pointer_root, pointer_child;
-      int root_x, root_y, win_x, win_y;
-      unsigned int mask;
-      if (XQueryPointer (si->dpy,
-                         RootWindowOfScreen (ssi->screen),
-                         &pointer_root, &pointer_child,
-                         &root_x, &root_y, &win_x, &win_y, &mask))
-        {
-          mouse_x = root_x;
-          mouse_y = root_y;
-        }
-    }
 
     x = ssi->x;
     y = ssi->y;
@@ -494,14 +478,13 @@ draw_splash_window (saver_info *si)
   splash_dialog_data *sp = si->sp_data;
   XGCValues gcv;
   GC gc1, gc2;
-  int hspacing, vspacing, height;
+  int vspacing, height;
   int x1, x2, x3, y1, y2;
   int sw;
 
 #ifdef PREFS_BUTTON
+  int hspacing;
   int nbuttons = 3;
-#else  /* !PREFS_BUTTON */
-  int nbuttons = 2;
 #endif /* !PREFS_BUTTON */
 
   height = (sp->heading_font->ascent + sp->heading_font->descent +
@@ -581,9 +564,11 @@ draw_splash_window (saver_info *si)
               (sp->button_font->ascent + sp->button_font->descent))
              / 2)
        + sp->button_font->ascent);
+#ifdef PREFS_BUTTON
   hspacing = ((sp->width - x1 - (sp->shadow_width * 2) -
               sp->internal_border - (sp->button_width * nbuttons))
              / 2);
+#endif
 
   x2 = x1 + ((sp->button_width - string_width(sp->button_font, sp->demo_label))
             / 2);
index 0ccf7d2367bdb2d680221d4e628411b9b4a83694..4f327e95851bcfa72f8989b2f055ddd32e1de0e0 100644 (file)
@@ -1,5 +1,5 @@
 /* subprocs.c --- choosing, spawning, and killing screenhacks.
- * xscreensaver, Copyright (c) 1991-2016 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1991-2017 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
@@ -260,7 +260,6 @@ make_job (pid_t pid, int screen, const char *cmd)
   const char *in = cmd;
   char *out = name;
   int got_eq = 0;
-  int first = 1;
 
   clean_job_list();
 
@@ -275,7 +274,6 @@ make_job (pid_t pid, int screen, const char *cmd)
     {                                  /* then get the next token instead. */
       got_eq = 0;
       out = name;
-      first = 0;
       goto AGAIN;
     }
 
index 318a61f47e467ee91e3d45b09177b08ff3f162a9..ea97f34629cc5b793fd689e953dcbfeac1576fbd 100644 (file)
@@ -1,5 +1,5 @@
 /* timers.c --- detecting when the user is idle, and other timer-related tasks.
- * xscreensaver, Copyright (c) 1991-2014 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1991-2017 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
@@ -562,6 +562,21 @@ check_pointer_timer (XtPointer closure, XtIntervalId *id)
    We only do this when we'd be polling the mouse position anyway.
    This amounts to an assumption that machines with APM support also
    have /proc/interrupts.
+
+   Now here's a thing that sucks about this: if the user actually changes
+   the time of the machine, it will either trigger or delay the triggering
+   of a lock.  On most systems, that requires root, but I'll bet at least
+   some GUI configs let non-root do it.  Also, NTP attacks.
+
+   On Linux 2.6.39+ systems, there exists clock_gettime(CLOCK_BOOTTIME)
+   which would allow us to detect the "laptop CPU had been halted" state
+   independently of changes in wall-clock time.  But of course that's not
+   portable.
+
+   When the wall clock changes, what do Xt timers do, anyway?  If I have
+   a timer set for 30 seconds from now, and adjust the wall clock +15 seconds,
+   does the timer fire 30 seconds from now or 15?  I actually have no idea.
+   It does not appear to be specified.
  */
 static void
 check_for_clock_skew (saver_info *si)
index 981ddb753d6510edce449841f2db11eb8185b5bb..f5b7c10748044fae26de2f3e6ecff4ee7fda93d5 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright Â© 2001-2016 Jamie Zawinski <jwz@jwz.org>.
+# Copyright Â© 2001-2017 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
@@ -45,10 +45,6 @@ import Fcntl ':mode' unless defined &S_ISUID;        # but it is here in Perl 5.8
        # but in Perl 5.10, both of these load, and cause errors!
        # So we have to check for S_ISUID instead of S_ISDIR?  WTF?
 
-use bytes;  # Larry can take Unicode and shove it up his ass sideways.
-            # Perl 5.8.0 causes us to start getting incomprehensible
-            # errors about UTF-8 all over the place without this.
-
 use Digest::MD5 qw(md5_base64);
 
 # Some Linux systems don't install LWP by default!
@@ -57,7 +53,7 @@ BEGIN { eval 'use LWP::Simple;' }
 
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my ($version) = ('$Revision: 1.40 $' =~ m/\s(\d[.\d]+)\s/s);
+my ($version) = ('$Revision: 1.43 $' =~ m/\s(\d[.\d]+)\s/s);
 
 my $verbose = 0;
 
@@ -254,7 +250,7 @@ sub read_cache($) {
     $dd = "$ENV{HOME}/.cache/xscreensaver";
     if (! -d $dd) { mkdir ($dd) || error ("mkdir $dd: $!"); }
     $cache_file_name = "$dd/xscreensaver-getimage.cache"
-  } elsif (-d "$ENV{HOME}/tmp") {         # If ~/.tmp/ exists, use it.
+  } elsif (-d "$ENV{HOME}/tmp") {         # If ~/tmp/ exists, use it.
     $cache_file_name = "$ENV{HOME}/tmp/.xscreensaver-getimage.cache";
   } else {
     $cache_file_name = "$ENV{HOME}/.xscreensaver-getimage.cache";
@@ -391,7 +387,7 @@ sub set_proxy($) {
 sub init_lwp() {
   if (! defined ($LWP::Simple::ua)) {
     error ("\n\n\tPerl is broken. Do this to repair it:\n" .
-           "\n\tsudo cpan LWP::Simple\n");
+           "\n\tsudo cpan LWP::Simple LWP::Protocol::https Mozilla::CA\n");
   }
   set_proxy ($LWP::Simple::ua);
 }
@@ -408,9 +404,19 @@ sub parse_feed($) {
   $LWP::Simple::ua->agent ("$progname/$version");
   $LWP::Simple::ua->timeout (10);  # bail sooner than the default of 3 minutes
 
+
+  # Half the time, random Linux systems don't have Mozilla::CA installed,
+  # which results in "Can't verify SSL peers without knowning which
+  # Certificate Authorities to trust".
+  #
+  # In xscreensaver-text we just disabled certificate checks. However,
+  # malicious images really do exist, so for xscreensaver-getimage-file,
+  # let's actually require that SSL be installed properly.
+
+
   my $body = (LWP::Simple::get($url) || '');
 
-  if ($body !~ m@^<\?xml\s@si) {
+  if ($body !~ m@^\s*<(\?xml|rss)\b@si) {
     # Not an RSS/Atom feed.  Try RSS autodiscovery.
 
     # (Great news, everybody: Flickr no longer provides RSS for "Sets",
@@ -624,6 +630,10 @@ sub download_image($$$) {
   #     _q  square, 150x150
   #     _s  square,  75x75
   #
+  # Note: if we wanted to get the _k or _o version instead of the _b or _h
+  # version, we'd need to crack the DRM -- which is easy: see crack_secret
+  # in "https://www.jwz.org/hacks/galdown".
+  #
   $url =~ s@_[sqtmnzc](\.[a-z]+)$@_b$1@si
     if ($url =~ m@^https?://[^/?#&]*?flickr\.com/@si);
 
@@ -655,7 +665,7 @@ sub mirror_feed($) {
     if (! -d $dir) { mkdir ($dir) || error ("mkdir $dir: $!"); }
     $dir .= "/feeds";
     if (! -d $dir) { mkdir ($dir) || error ("mkdir $dir: $!"); }
-  } elsif (-d "$ENV{HOME}/tmp") {         # If ~/.tmp/ exists, use it.
+  } elsif (-d "$ENV{HOME}/tmp") {         # If ~/tmp/ exists, use it.
     $dir = "$ENV{HOME}/tmp/.xscreensaver-feeds";
   } else {
     $dir = "$ENV{HOME}/.xscreensaver-feeds";
index 1d0170d9fbfaea30c2099a07807eace017082cc2..e965bedef3a4b5ea04bb95069d3ee1924a09438c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright Â© 2005-2016 Jamie Zawinski <jwz@jwz.org>
+# Copyright Â© 2005-2017 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,10 +34,10 @@ BEGIN { eval 'use HTML::Entities;' }
 use Socket;
 use POSIX qw(strftime);
 use Text::Wrap qw(wrap);
-use bytes;
+#use bytes;  # This breaks shit.
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my ($version) = ('$Revision: 1.44 $' =~ m/\s(\d[.\d]+)\s/s);
+my ($version) = ('$Revision: 1.46 $' =~ m/\s(\d[.\d]+)\s/s);
 
 my $verbose = 0;
 my $http_proxy = undef;
@@ -279,6 +279,7 @@ sub which($) {
 sub output() {
 
   binmode (STDOUT, ($latin1_p ? ':raw' : ':utf8'));
+  binmode (STDERR, ':utf8');
 
   # Do some basic sanity checking (null text, null file names, etc.)
   #
@@ -691,10 +692,28 @@ sub get_url_text($) {
 
   if (! $ua) {
     print STDOUT ("\n\tPerl is broken. Do this to repair it:\n" .
-                  "\n\tsudo cpan LWP::UserAgent\n\n");
+                  "\n\tsudo cpan LWP::UserAgent" .
+                  " LWP::Protocol::https Mozilla::CA\n\n");
     return;
   }
 
+  # Half the time, random Linux systems don't have Mozilla::CA installed,
+  # which results in "Can't verify SSL peers without knowning which
+  # Certificate Authorities to trust".
+  #
+  # I'm going to take a controversial stand here and say that, for the
+  # purposes of plain-text being displayed in a screen saver via RSS,
+  # the chances of a certificate-based man-in-the-middle attack having
+  # a malicious effect on anyone anywhere at any time is so close to
+  # zero that it can be discounted.  So, just don't bother validating
+  # SSL connections.
+  #
+  $ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;
+  eval {
+    $ua->ssl_opts (verify_hostname => 0, SSL_verify_mode => 0);
+  };
+
+
   set_proxy ($ua);
   $ua->agent ("$progname/$version");
   my $res = $ua->get ($url);
@@ -714,7 +733,9 @@ sub get_url_text($) {
     $ct = 'text/plain';
   }
 
-  utf8::decode ($body);  # Pack multi-byte UTF-8 back into wide chars.
+  # This is not necessary, since HTTP::Message::decoded_content() has
+  # already done 'decode (<charset-header>, $body)'.
+  # utf8::decode ($body);  # Pack multi-byte UTF-8 back into wide chars.
 
   $ct = guess_content_type ($ct, $body);
   if ($ct eq 'html') {
index 76969f23d2454bc0e01628af46abbb8e5018ff67..dd27cae56f679727d5b42ab9679266c120692942 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2017 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
@@ -530,7 +530,7 @@ set_version_string (saver_info *si, int *argc, char **argv)
       *s = '_';
   }
 
-  si->version = (char *) malloc (5);
+  si->version = (char *) malloc (32);
   memcpy (si->version, screensaver_id + 17, 4);
   si->version [4] = 0;
 }
@@ -2324,7 +2324,6 @@ analyze_display (saver_info *si)
       char buf [255];
       int maj = 0, min = 0;
       int dummy1, dummy2, dummy3;
-      int j;
 
       /* Most of the extension version functions take 3 args,
          writing results into args 2 and 3, but some take more.
@@ -2337,7 +2336,6 @@ analyze_display (saver_info *si)
       if (!XQueryExtension (si->dpy, exts[i].name, &op, &event, &error))
         continue;
       sprintf (buf, "%s:   ", blurb());
-      j = strlen (buf);
       strcat (buf, exts[i].desc);
 
       if (!version_fn_2)
index 42f0c3d9c89f8e642dfe738500afc451ec952c08..1928429aa58655336f1c4f513b02501733b1b153 100644 (file)
@@ -197,10 +197,18 @@ To replace gnome-screensaver with xscreensaver:
 .EX
 sudo apt-get remove gnome-screensaver
 .EE
+or possibly
+.EX
+sudo dpkg -P gnome-screensaver
+.EE
 .TP 3
 \fB2: Launch xscreensaver at login.\fP
 Select "\fIStartup Applications\fP" from the menu (or manually
 launch "\fIgnome-session-properties\fP") and add "\fIxscreensaver\fP".
+
+Do this as your normal user account, not as root.
+(This should go without saying, because you should never, ever, ever
+be logged in to the graphical desktop as user "root".)
 .TP 3
 \fB3: Make GNOME's "Lock Screen" use xscreensaver.\fP
 .EX
@@ -942,7 +950,7 @@ and a FAQ can always be found at https://www.jwz.org/xscreensaver/
 .BR xscreensaver\-getimage (1),
 .BR xscreensaver\-text (1).
 .SH COPYRIGHT
-Copyright \(co 1991-2015 by Jamie Zawinski.
+Copyright \(co 1991-2017 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
index c1e25eba470a3ff8f6458cabf05fd6bdbcae99e1..2a090f6d92ebaed8217f7c6d0f9205e5b66ba946 100644 (file)
@@ -78,7 +78,7 @@ UTIL_SRCS     = $(UTILS_SRC)/alpha.c $(UTILS_SRC)/colors.c \
                  $(UTILS_SRC)/yarandom.c $(UTILS_SRC)/erase.c \
                  $(UTILS_SRC)/xshm.c $(UTILS_SRC)/xdbe.c \
                  $(UTILS_SRC)/textclient.c $(UTILS_SRC)/aligned_malloc.c \
-                 $(UTILS_SRC)/thread_util.c
+                 $(UTILS_SRC)/thread_util.c $(UTILS_SRC)/pow2.c
 UTIL_OBJS      = $(UTILS_BIN)/alpha.o $(UTILS_BIN)/colors.o \
                  $(UTILS_BIN)/grabclient.o \
                  $(UTILS_BIN)/hsv.o $(UTILS_BIN)/resources.o \
@@ -89,7 +89,7 @@ UTIL_OBJS     = $(UTILS_BIN)/alpha.o $(UTILS_BIN)/colors.o \
                  $(UTILS_BIN)/xshm.o $(UTILS_BIN)/xdbe.o \
                  $(UTILS_BIN)/colorbars.o \
                  $(UTILS_BIN)/textclient.o $(UTILS_BIN)/aligned_malloc.o \
-                 $(UTILS_BIN)/thread_util.o \
+                 $(UTILS_BIN)/thread_util.o $(UTILS_BIN)/pow2.o \
                  $(UTILS_BIN)/xft.o $(UTILS_BIN)/utf8wc.o
 
 SRCS           = attraction.c blitspin.c bouboule.c braid.c bubbles.c \
@@ -532,9 +532,11 @@ $(UTILS_BIN)/xdbe.o:               $(UTILS_SRC)/xdbe.c
 $(UTILS_BIN)/textclient.o:     $(UTILS_SRC)/textclient.c
 $(UTILS_BIN)/aligned_malloc.o: $(UTILS_SRC)/aligned_malloc.c
 $(UTILS_BIN)/thread_util.o:    $(UTILS_SRC)/thread_util.c
+$(UTILS_BIN)/pow2.o:           $(UTILS_SRC)/pow2.c
 
 $(UTIL_OBJS):
-       $(MAKE) -C $(UTILS_BIN) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+       cd $(UTILS_BIN) ; \
+       $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
 # How we build object files in this directory.
 .c.o:
@@ -553,12 +555,12 @@ LOGO              = $(UTILS_BIN)/logo.o $(UTILS_BIN)/minixpm.o
 GRAB           = $(GRAB_OBJS)
 ERASE          = $(UTILS_BIN)/erase.o
 COL            = $(COLOR_OBJS)
-SHM            = $(XSHM_OBJS)
+SHM             = $(XSHM_OBJS) $(THREAD_OBJS)
 DBE            = $(XDBE_OBJS)
 BARS           = $(UTILS_BIN)/colorbars.o $(LOGO)
 THRO           = $(THREAD_OBJS)
 THRL           = $(THREAD_CFLAGS) $(THREAD_LIBS)
-ATV            = analogtv.o $(SHM) $(THRO)
+ATV             = analogtv.o $(SHM)
 APPLE2          = apple2.o $(ATV)
 TEXT            = $(UTILS_BIN)/textclient.o
 
@@ -584,8 +586,8 @@ attraction: attraction.o    $(HACK_OBJS) $(COL) $(SPL)
 binaryring:  binaryring.o $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
-blitspin:      blitspin.o      $(HACK_OBJS) $(GRAB) $(XPM)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(XPM) $(XPM_LIBS)
+blitspin:      blitspin.o      $(HACK_OBJS) $(GRAB) $(XPM) $(UTILS_BIN)/pow2.o
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(XPM) $(UTILS_BIN)/pow2.o $(XPM_LIBS)
 
 bubbles:       bubbles.o       $(HACK_OBJS) bubbles-default.o $(XPM)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) bubbles-default.o $(XPM) $(XPM_LIBS)
@@ -624,7 +626,7 @@ maze:               maze.o          $(HACK_OBJS) $(ERASE) $(LOGO)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(ERASE) $(LOGO) $(HACK_LIBS)
 
 moire:         moire.o         $(HACK_OBJS) $(COL) $(SHM)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SHM) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SHM) $(HACK_LIBS) $(THRL)
 
 moire2:                moire2.o        $(HACK_OBJS) $(COL) $(DBE)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(DBE) $(HACK_LIBS)
@@ -660,7 +662,7 @@ munch:              munch.o         $(HACK_OBJS) $(COL) $(SPL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SPL) $(HACK_LIBS)
 
 rd-bomb:       rd-bomb.o       $(HACK_OBJS) $(COL) $(SHM)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SHM) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SHM) $(HACK_LIBS) $(THRL)
 
 coral:         coral.o         $(HACK_OBJS) $(COL) $(ERASE)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(ERASE) $(HACK_LIBS)
@@ -677,8 +679,8 @@ cynosure:   cynosure.o      $(HACK_OBJS) $(COL)
 epicycle:      epicycle.o      $(HACK_OBJS) $(COL) $(ERASE)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(ERASE) $(HACK_LIBS)
 
-interference:  interference.o  $(HACK_OBJS) $(COL) $(SHM) $(DBE) $(THRO)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SHM) $(DBE) $(THRO) $(HACK_LIBS) $(THRL)
+interference:  interference.o  $(HACK_OBJS) $(COL) $(SHM) $(DBE)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(SHM) $(DBE) $(HACK_LIBS) $(THRL)
 
 truchet:        truchet.o      $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
@@ -693,7 +695,7 @@ xanalogtv:  xanalogtv.o     $(HACK_OBJS) $(ATV) $(GRAB) $(XPM)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(ATV) $(GRAB) $(XPM) $(XPM_LIBS) $(HACK_LIBS) $(THRL)
 
 distort:       distort.o       $(HACK_OBJS) $(GRAB) $(SHM)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS) $(THRL)
 
 kumppa:                kumppa.o        $(HACK_OBJS) $(DBE)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(DBE) $(HACK_LIBS)
@@ -714,7 +716,7 @@ squiral:    squiral.o       $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
 xflame:                xflame.o        $(HACK_OBJS) $(SHM) $(XPM)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(SHM) $(XPM) $(XPM_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(SHM) $(XPM) $(XPM_LIBS) $(THRL)
 
 wander:                wander.o        $(HACK_OBJS) $(COL) $(ERASE)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(ERASE) $(HACK_LIBS)
@@ -744,10 +746,10 @@ blaster:  blaster.o       $(HACK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(HACK_LIBS)
 
 bumps:         bumps.o         $(HACK_OBJS) $(GRAB) $(SHM)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS) $(THRL)
 
 ripples:       ripples.o       $(HACK_OBJS) $(SHM) $(COL) $(GRAB)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(SHM) $(COL) $(GRAB) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(SHM) $(COL) $(GRAB) $(HACK_LIBS) $(THRL)
 
 xspirograph:   xspirograph.o   $(HACK_OBJS) $(COL) $(ERASE)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(ERASE) $(HACK_LIBS)
@@ -768,7 +770,7 @@ whirlwindwarp:      whirlwindwarp.o $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
 rotzoomer:     rotzoomer.o     $(HACK_OBJS) $(GRAB) $(SHM)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS) $(THRL)
 
 whirlygig:     whirlygig.o     $(HACK_OBJS) $(DBE) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(DBE) $(COL) $(HACK_LIBS)
@@ -780,7 +782,7 @@ vermiculate:        vermiculate.o   $(HACK_OBJS) $(COL)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(HACK_LIBS)
 
 twang:         twang.o         $(HACK_OBJS) $(GRAB) $(SHM)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(GRAB) $(SHM) $(HACK_LIBS) $(THRL)
 
 fluidballs:    fluidballs.o    $(HACK_OBJS) $(DBE)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(DBE) $(HACK_LIBS)
@@ -825,7 +827,7 @@ anemotaxis: anemotaxis.o    $(HACK_OBJS) $(COL) $(DBE)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(COL) $(DBE) $(HACK_LIBS)
 
 memscroller:   memscroller.o   $(HACK_OBJS) $(SHM) $(COL)
-       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(SHM) $(COL) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(SHM) $(COL) $(HACK_LIBS) $(THRL)
 
 substrate:     substrate.o     $(HACK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(HACK_OBJS) $(HACK_LIBS)
@@ -875,7 +877,8 @@ tessellimage:       tessellimage.o  delaunay.o $(HACK_OBJS) $(GRAB)
 testx11:       testx11.o       glx/rotator.o $(HACK_OBJS)
        $(CC_HACK) -o $@ $@.o   glx/rotator.o $(HACK_OBJS) $(COL) $(HACK_LIBS)
 glx/rotator.o: glx/rotator.c
-       $(MAKE) -C glx $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
+       cd glx ; \
+       $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
 
 # The rules for those hacks which follow the `xlockmore' API.
 #
@@ -937,11 +940,11 @@ sphere:           sphere.o        $(XLOCK_OBJS)
 spiral:                spiral.o        $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
 
-strange:       strange.o       $(XLOCK_OBJS)
-       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
+strange:       strange.o       $(XLOCK_OBJS) $(SHM) $(UTILS_BIN)/pow2.o
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(SHM) $(UTILS_BIN)/pow2.o $(HACK_LIBS) $(THRL)
 
 swirl:         swirl.o         $(XLOCK_OBJS) $(SHM)
-       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(SHM) $(HACK_LIBS)
+       $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(SHM) $(HACK_LIBS) $(THRL)
 
 fadeplot:      fadeplot.o      $(XLOCK_OBJS)
        $(CC_HACK) -o $@ $@.o   $(XLOCK_OBJS) $(HACK_LIBS)
@@ -1176,6 +1179,7 @@ blitspin.o: $(srcdir)/screenhack.h
 blitspin.o: $(UTILS_SRC)/colors.h
 blitspin.o: $(UTILS_SRC)/grabscreen.h
 blitspin.o: $(UTILS_SRC)/hsv.h
+blitspin.o: $(UTILS_SRC)/pow2.h
 blitspin.o: $(UTILS_SRC)/resources.h
 blitspin.o: $(UTILS_SRC)/usleep.h
 blitspin.o: $(UTILS_SRC)/visual.h
@@ -1226,6 +1230,7 @@ bsod.o: ../config.h
 bsod.o: $(srcdir)/fps.h
 bsod.o: $(srcdir)/images/amiga.xpm
 bsod.o: $(srcdir)/images/android.xpm
+bsod.o: $(srcdir)/images/apple.xbm
 bsod.o: $(srcdir)/images/atari.xbm
 bsod.o: $(srcdir)/images/atm.xbm
 bsod.o: $(srcdir)/images/hmac.xpm
@@ -1316,6 +1321,7 @@ bumps.o: $(UTILS_SRC)/hsv.h
 bumps.o: $(UTILS_SRC)/resources.h
 bumps.o: $(UTILS_SRC)/usleep.h
 bumps.o: $(UTILS_SRC)/visual.h
+bumps.o: $(UTILS_SRC)/xshm.h
 bumps.o: $(UTILS_SRC)/yarandom.h
 ccurve.o: ../config.h
 ccurve.o: $(srcdir)/fps.h
@@ -1499,6 +1505,7 @@ distort.o: $(UTILS_SRC)/hsv.h
 distort.o: $(UTILS_SRC)/resources.h
 distort.o: $(UTILS_SRC)/usleep.h
 distort.o: $(UTILS_SRC)/visual.h
+distort.o: $(UTILS_SRC)/xshm.h
 distort.o: $(UTILS_SRC)/yarandom.h
 drift.o: ../config.h
 drift.o: $(srcdir)/fps.h
@@ -2055,6 +2062,7 @@ memscroller.o: $(UTILS_SRC)/hsv.h
 memscroller.o: $(UTILS_SRC)/resources.h
 memscroller.o: $(UTILS_SRC)/usleep.h
 memscroller.o: $(UTILS_SRC)/visual.h
+memscroller.o: $(UTILS_SRC)/xshm.h
 memscroller.o: $(UTILS_SRC)/yarandom.h
 metaballs.o: ../config.h
 metaballs.o: $(srcdir)/fps.h
@@ -2089,6 +2097,7 @@ moire.o: $(UTILS_SRC)/hsv.h
 moire.o: $(UTILS_SRC)/resources.h
 moire.o: $(UTILS_SRC)/usleep.h
 moire.o: $(UTILS_SRC)/visual.h
+moire.o: $(UTILS_SRC)/xshm.h
 moire.o: $(UTILS_SRC)/yarandom.h
 mountain.o: ../config.h
 mountain.o: $(srcdir)/fps.h
@@ -2377,6 +2386,7 @@ rd-bomb.o: $(UTILS_SRC)/hsv.h
 rd-bomb.o: $(UTILS_SRC)/resources.h
 rd-bomb.o: $(UTILS_SRC)/usleep.h
 rd-bomb.o: $(UTILS_SRC)/visual.h
+rd-bomb.o: $(UTILS_SRC)/xshm.h
 rd-bomb.o: $(UTILS_SRC)/yarandom.h
 recanim.o: ../config.h
 recanim.o: $(srcdir)/fps.h
@@ -2399,6 +2409,7 @@ ripples.o: $(UTILS_SRC)/hsv.h
 ripples.o: $(UTILS_SRC)/resources.h
 ripples.o: $(UTILS_SRC)/usleep.h
 ripples.o: $(UTILS_SRC)/visual.h
+ripples.o: $(UTILS_SRC)/xshm.h
 ripples.o: $(UTILS_SRC)/yarandom.h
 rocks.o: ../config.h
 rocks.o: $(srcdir)/fps.h
@@ -2446,6 +2457,7 @@ rotzoomer.o: $(UTILS_SRC)/hsv.h
 rotzoomer.o: $(UTILS_SRC)/resources.h
 rotzoomer.o: $(UTILS_SRC)/usleep.h
 rotzoomer.o: $(UTILS_SRC)/visual.h
+rotzoomer.o: $(UTILS_SRC)/xshm.h
 rotzoomer.o: $(UTILS_SRC)/yarandom.h
 screenhack.o: ../config.h
 screenhack.o: $(srcdir)/fps.h
@@ -2585,10 +2597,13 @@ starfish.o: $(UTILS_SRC)/yarandom.h
 strange.o: ../config.h
 strange.o: $(srcdir)/fps.h
 strange.o: $(srcdir)/screenhackI.h
+strange.o: $(UTILS_SRC)/aligned_malloc.h
 strange.o: $(UTILS_SRC)/colors.h
 strange.o: $(UTILS_SRC)/grabscreen.h
 strange.o: $(UTILS_SRC)/hsv.h
+strange.o: $(UTILS_SRC)/pow2.h
 strange.o: $(UTILS_SRC)/resources.h
+strange.o: $(UTILS_SRC)/thread_util.h
 strange.o: $(UTILS_SRC)/usleep.h
 strange.o: $(UTILS_SRC)/visual.h
 strange.o: $(UTILS_SRC)/xshm.h
@@ -2701,6 +2716,7 @@ twang.o: $(UTILS_SRC)/hsv.h
 twang.o: $(UTILS_SRC)/resources.h
 twang.o: $(UTILS_SRC)/usleep.h
 twang.o: $(UTILS_SRC)/visual.h
+twang.o: $(UTILS_SRC)/xshm.h
 twang.o: $(UTILS_SRC)/yarandom.h
 vermiculate.o: ../config.h
 vermiculate.o: $(srcdir)/fps.h
@@ -2827,6 +2843,7 @@ xflame.o: $(UTILS_SRC)/hsv.h
 xflame.o: $(UTILS_SRC)/resources.h
 xflame.o: $(UTILS_SRC)/usleep.h
 xflame.o: $(UTILS_SRC)/visual.h
+xflame.o: $(UTILS_SRC)/xshm.h
 xflame.o: $(UTILS_SRC)/yarandom.h
 xflame.o: $(srcdir)/xpm-pixmap.h
 xjack.o: ../config.h
index 28930c5ef91c791359b8c993662c61bc00bc8b2e..642037de54d6365f05055089efb0f9c26f694b8f 100644 (file)
    - removed unusable hashnoise code
  */
 
+/*
+  2016-10-09, Dave Odell <dmo2118@gmail.com>:
+  Updated for new xshm.c.
+*/
+
 #ifdef HAVE_JWXYZ
 # include "jwxyz.h"
 #else /* !HAVE_JWXYZ */
@@ -217,8 +222,8 @@ analogtv_set_defaults(analogtv *it, char *prefix)
 
 #ifdef DEBUG
   printf("analogtv: prefix=%s\n",prefix);
-  printf("  use: shm=%d cmap=%d color=%d\n",
-         it->use_shm,it->use_cmap,it->use_color);
+  printf("  use: cmap=%d color=%d\n",
+         it->use_cmap,it->use_color);
   printf("  controls: tint=%g color=%g brightness=%g contrast=%g\n",
          it->tint_control, it->color_control, it->brightness_control,
          it->contrast_control);
@@ -228,8 +233,8 @@ analogtv_set_defaults(analogtv *it, char *prefix)
          it->horiz_desync, it->flutter_horiz_desync);
   printf("  hashnoise rpm: %g\n",
          it->hashnoise_rpm);
-  printf("  vis: %d %d %d\n",
-         it->visclass, it->visbits, it->visdepth);
+  printf("  vis: %d %d\n",
+         it->visclass, it->visdepth);
   printf("  shift: %d-%d %d-%d %d-%d\n",
          it->red_invprec,it->red_shift,
          it->green_invprec,it->green_shift,
@@ -262,15 +267,7 @@ static void
 analogtv_free_image(analogtv *it)
 {
   if (it->image) {
-    if (it->use_shm) {
-#ifdef HAVE_XSHM_EXTENSION
-      destroy_xshm_image(it->dpy, it->image, &it->shm_info);
-#endif
-    } else {
-      thread_free(it->image->data);
-      it->image->data = NULL;
-      XDestroyImage(it->image);
-    }
+    destroy_xshm_image(it->dpy, it->image, &it->shm_info);
     it->image=NULL;
   }
 }
@@ -280,31 +277,14 @@ analogtv_alloc_image(analogtv *it)
 {
   /* On failure, it->image is NULL. */
 
-  unsigned bits_per_pixel = get_bits_per_pixel(it->dpy, it->xgwa.depth);
+  unsigned bits_per_pixel = visual_pixmap_depth(it->screen, it->xgwa.visual);
   unsigned align = thread_memory_alignment(it->dpy) * 8 - 1;
   /* Width is in bits. */
   unsigned width = (it->usewidth * bits_per_pixel + align) & ~align;
 
-  if (it->use_shm) {
-#ifdef HAVE_XSHM_EXTENSION
-    it->image=create_xshm_image(it->dpy, it->xgwa.visual, it->xgwa.depth, ZPixmap, 0,
-                                &it->shm_info,
-                                width / bits_per_pixel, it->useheight);
-#endif
-    if (!it->image) it->use_shm=0;
-  }
-  if (!it->image) {
-    it->image = XCreateImage(it->dpy, it->xgwa.visual, it->xgwa.depth, ZPixmap, 0, 0,
-                             it->usewidth, it->useheight, 8, width / 8);
-    if (it->image) {
-      if(thread_malloc((void **)&it->image->data, it->dpy,
-                       it->image->height * it->image->bytes_per_line)) {
-        it->image->data = NULL;
-        XDestroyImage(it->image);
-        it->image = NULL;
-      }
-    }
-  }
+  it->image=create_xshm_image(it->dpy, it->xgwa.visual, it->xgwa.depth,
+                              ZPixmap, &it->shm_info,
+                              width / bits_per_pixel, it->useheight);
 
   if (it->image) {
     memset (it->image->data, 0, it->image->height * it->image->bytes_per_line);
@@ -508,18 +488,11 @@ analogtv_allocate(Display *dpy, Window window)
 
   it->n_colors=0;
 
-#ifdef HAVE_XSHM_EXTENSION
-  it->use_shm=1;
-#else
-  it->use_shm=0;
-#endif
-
   XGetWindowAttributes (it->dpy, it->window, &it->xgwa);
 
   it->screen=it->xgwa.screen;
   it->colormap=it->xgwa.colormap;
-  it->visclass=it->xgwa.visual->class;
-  it->visbits=it->xgwa.visual->bits_per_rgb;
+  it->visclass=visual_class(it->xgwa.screen, it->xgwa.visual);
   it->visdepth=it->xgwa.depth;
   if (it->visclass == TrueColor || it->visclass == DirectColor) {
     if (get_integer_resource (it->dpy, "use_cmap", "Integer")) {
@@ -538,9 +511,8 @@ analogtv_allocate(Display *dpy, Window window)
     it->use_color=0;
   }
 
-  it->red_mask=it->xgwa.visual->red_mask;
-  it->green_mask=it->xgwa.visual->green_mask;
-  it->blue_mask=it->xgwa.visual->blue_mask;
+  visual_rgb_masks (it->xgwa.screen, it->xgwa.visual,
+                    &it->red_mask, &it->green_mask, &it->blue_mask);
   it->red_shift=it->red_invprec=-1;
   it->green_shift=it->green_invprec=-1;
   it->blue_shift=it->blue_invprec=-1;
@@ -599,15 +571,7 @@ void
 analogtv_release(analogtv *it)
 {
   if (it->image) {
-    if (it->use_shm) {
-#ifdef HAVE_XSHM_EXTENSION
-      destroy_xshm_image(it->dpy, it->image, &it->shm_info);
-#endif
-    } else {
-      thread_free(it->image->data);
-      it->image->data = NULL;
-      XDestroyImage(it->image);
-    }
+    destroy_xshm_image(it->dpy, it->image, &it->shm_info);
     it->image=NULL;
   }
   if (it->gc) XFreeGC(it->dpy, it->gc);
@@ -1963,20 +1927,11 @@ analogtv_draw(analogtv *it, double noiselevel,
   }
 
   if (overall_bot > overall_top) {
-    if (it->use_shm) {
-#ifdef HAVE_XSHM_EXTENSION
-      XShmPutImage(it->dpy, it->window, it->gc, it->image,
+    put_xshm_image(it->dpy, it->window, it->gc, it->image,
                    0, overall_top,
                    it->screen_xo, it->screen_yo+overall_top,
                    it->usewidth, overall_bot - overall_top,
-                   False);
-#endif
-    } else {
-      XPutImage(it->dpy, it->window, it->gc, it->image,
-                0, overall_top,
-                it->screen_xo, it->screen_yo+overall_top,
-                it->usewidth, overall_bot - overall_top);
-    }
+                   &it->shm_info);
   }
 
 #ifdef DEBUG
index 0bc8b2603f548ea915eb3d726ef922d6b72e201a..ed3ce340bb184362b3da02f433fef405daa227f4 100644 (file)
@@ -161,17 +161,15 @@ typedef struct analogtv_s {
   int fakeit_scroll;
   int redraw_all;
 
-  int use_shm,use_cmap,use_color;
+  int use_cmap,use_color;
   int bilevel_signal;
 
-#ifdef HAVE_XSHM_EXTENSION
   XShmSegmentInfo shm_info;
-#endif
   int visdepth,visclass,visbits;
   int red_invprec, red_shift;
   int green_invprec, green_shift;
   int blue_invprec, blue_shift;
-  unsigned int red_mask, green_mask, blue_mask;
+  unsigned long red_mask, green_mask, blue_mask;
 
   Colormap colormap;
   int usewidth,useheight,xrepl,subwidth;
index ac7555a66d0049bd7dd5831e4f416ad9ff42b31a..bc697ca989313c40cfc81c55cdf426554d7147ed 100644 (file)
@@ -1013,11 +1013,7 @@ init_ant(ModeInfo * mi)
        int         col, row, dir;
        int         i;
 
-       if (antfarms == NULL) {
-               if ((antfarms = (antfarmstruct *) calloc(MI_NUM_SCREENS(mi),
-                                           sizeof (antfarmstruct))) == NULL)
-                       return;
-       }
+    MI_INIT (mi, antfarms, 0);
        ap = &antfarms[MI_SCREEN(mi)];
 
        ap->redrawing = 0;
index 72c0d002e55fe94d38092add108c93ad5afa664e..6986e73eb3a14ad272032223dc9f1f26dbcf4ba8 100644 (file)
@@ -76,6 +76,7 @@ static const char sccsid[] = "@(#)apollonian.c        5.02 2001/07/01 xlockmore";
                                        "*ignoreRotation: True" \
 
 # define refresh_apollonian 0
+# define release_apollonian 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 # include "erase.h"
 #else /* STANDALONE */
@@ -117,7 +118,7 @@ extern XFontStruct *getFont(Display * display);
 
 #ifdef USE_MODULES
 ModStruct   apollonian_description =
-{"apollonian", "init_apollonian", "draw_apollonian", "release_apollonian",
+{"apollonian", "init_apollonian", "draw_apollonian", (char *) NULL,
  "init_apollonian", "init_apollonian", (char *) NULL, &apollonian_opts,
  1000000, 64, 20, 1, 64, 1.0, "",
  "Shows Apollonian Circles", 0, NULL};
@@ -506,7 +507,7 @@ static void
 p(ModeInfo *mi, circle c)
 {
        apollonianstruct *cp = &apollonians[MI_SCREEN(mi)];
-       char string[10];
+       char string[15];
        double g, e;
        int g_width;
 
@@ -637,8 +638,10 @@ f(ModeInfo *mi, circle c1, circle c2, circle c3, circle c4, int depth)
 }
 
 ENTRYPOINT void
-free_apollonian (Display *display, apollonianstruct *cp)
+free_apollonian (ModeInfo * mi)
 {
+       apollonianstruct *cp = &apollonians[MI_SCREEN(mi)];
+
        if (cp->quad != NULL) {
                (void) free((void *) cp->quad);
                cp->quad = (apollonian_quadruple *) NULL;
@@ -679,11 +682,7 @@ init_apollonian (ModeInfo * mi)
        apollonianstruct *cp;
        int i;
 
-       if (apollonians == NULL) {
-               if ((apollonians = (apollonianstruct *) calloc(MI_NUM_SCREENS(mi),
-                                            sizeof (apollonianstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, apollonians, free_apollonian);
        cp = &apollonians[MI_SCREEN(mi)];
 
        cp->size = MAX(MIN(MI_WIDTH(mi), MI_HEIGHT(mi)) - 1, 1);
@@ -786,6 +785,8 @@ draw_apollonian (ModeInfo * mi)
 #ifdef STANDALONE
     if (cp->eraser) {
       cp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), cp->eraser);
+      if (!cp->eraser)
+        init_apollonian(mi);
       return;
     }
 #endif
@@ -817,8 +818,9 @@ draw_apollonian (ModeInfo * mi)
       {
 #ifdef STANDALONE
         cp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), cp->eraser);
-#endif /* STANDALONE */
+#else /* !STANDALONE */
                init_apollonian(mi);
+#endif /* !STANDALONE */
       }
 }
 
@@ -840,19 +842,6 @@ apollonian_handle_event (ModeInfo *mi, XEvent *event)
   return False;
 }
 
-ENTRYPOINT void
-release_apollonian (ModeInfo * mi)
-{
-       if (apollonians != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_apollonian(MI_DISPLAY(mi), &apollonians[screen]);
-               (void) free((void *) apollonians);
-               apollonians = (apollonianstruct *) NULL;
-       }
-}
-
 XSCREENSAVER_MODULE ("Apollonian", apollonian)
 
 #endif /* MODE_apollonian */
index 642efe0b9d3931d368ab2f5b85b462e096656aea..3063b58d787f720324f9d700d7948586d0f420b0 100644 (file)
@@ -87,7 +87,7 @@ scale_image (Display *dpy, Window window, XImage *in,
   int x, y, i;
   unsigned int rpos=0, gpos=0, bpos=0; /* bitfield positions */
   unsigned int rsiz=0, gsiz=0, bsiz=0;
-  unsigned int rmsk=0, gmsk=0, bmsk=0;
+  unsigned long rmsk=0, gmsk=0, bmsk=0;
   unsigned char spread_map[3][256];
   XWindowAttributes xgwa;
   XColor *colors = 0;
@@ -112,9 +112,7 @@ scale_image (Display *dpy, Window window, XImage *in,
     }
   else
     {
-      rmsk = xgwa.visual->red_mask;
-      gmsk = xgwa.visual->green_mask;
-      bmsk = xgwa.visual->blue_mask;
+      visual_rgb_masks (xgwa.screen, xgwa.visual, &rmsk, &gmsk, &bmsk);
       decode_mask (rmsk, &rpos, &rsiz);
       decode_mask (gmsk, &gpos, &gsiz);
       decode_mask (bmsk, &bpos, &bsiz);
index b9b7e1e47930c88dc2e2dccea076e74f5150d2c1..c95e5babd9e8e50cbb9fd0cf3017e173edfbeb18 100644 (file)
 #include <assert.h>
 #include <ctype.h>
 #include <math.h>
-#include <inttypes.h>
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#if defined(HAVE_STDINT_H)
+# include <stdint.h>
+#elif defined(HAVE_INTTYPES_H)
+# include <inttypes.h>
+#endif
 #include <unistd.h>
 
 #include "yarandom.h"
index 2be03cd1fb6076d7b4512728fdd39c08cc1e36a6..af3ea752e76a51ab35cb9863b6f04d673b1d8582 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "screenhack.h"
+#include "pow2.h"
 #include "xpm-pixmap.h"
 #include <stdio.h>
 #include <time.h>
@@ -220,17 +221,13 @@ blitspin_draw (Display *dpy, Window window, void *closure)
 
 
 static int 
-to_pow2(struct state *st, int n, Bool up)
+blitspin_to_pow2(int n, Bool up)
 {
-  int powers_of_2[] = { 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024,
-                       2048, 4096, 8192, 16384, 32768, 65536 };
-  int i = 0;
-  if (n > 65536) st->size = 65536;
-  while (n >= powers_of_2[i]) i++;
-  if (n == powers_of_2[i-1])
+  int pow2 = to_pow2 (n);
+  if (n == pow2)
     return n;
   else
-    return powers_of_2[up ? i : i-1];
+    return up ? pow2 : pow2 >> 1;
 }
 
 static void *
@@ -311,11 +308,12 @@ blitspin_init_2 (struct state *st)
 
   /* make it square */
   st->size = (st->width < st->height) ? st->height : st->width;
-  st->size = to_pow2(st, st->size, st->scale_up); /* round up to power of 2 */
+  /* round up to power of 2 */
+  st->size = blitspin_to_pow2(st->size, st->scale_up);
   {                                            /* don't exceed screen size */
     int s = XScreenNumberOfScreen(st->xgwa.screen);
-    int w = to_pow2(st, XDisplayWidth(st->dpy, s), False);
-    int h = to_pow2(st, XDisplayHeight(st->dpy, s), False);
+    int w = blitspin_to_pow2(XDisplayWidth(st->dpy, s), False);
+    int h = blitspin_to_pow2(XDisplayHeight(st->dpy, s), False);
     if (st->size > w) st->size = w;
     if (st->size > h) st->size = h;
   }
index 82218fb45c61903c90e7c8ae255ff92c6efa4e85..e3379aa3c6e6c0d555a63cf3defb80973d7cbff6 100644 (file)
@@ -88,6 +88,7 @@ static const char sccsid[] = "@(#)bouboule.c  4.00 97/01/01 xlockmore";
                                        "*ignoreRotation: True  \n"
 
 # define SMOOTH_COLORS
+# define release_bouboule 0
 # define bouboule_handle_event 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -297,6 +298,8 @@ sinfree(SinVariable * point)
        }
 }
 
+static void free_bouboule(ModeInfo * mi);
+
 
 /***************/
 ENTRYPOINT void
@@ -315,11 +318,7 @@ init_bouboule(ModeInfo * mi)
        int         i;
        double      theta, omega;
 
-       if (starfield == NULL) {
-               if ((starfield = (StarField *) calloc(MI_NUM_SCREENS(mi),
-                                               sizeof (StarField))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, starfield, free_bouboule);
        sp = &starfield[MI_SCREEN(mi)];
 
        sp->width = MI_WIN_WIDTH(mi);
@@ -803,39 +802,31 @@ draw_bouboule(ModeInfo * mi)
        }
 }
 
-ENTRYPOINT void
-release_bouboule(ModeInfo * mi)
+static void
+free_bouboule(ModeInfo * mi)
 {
-       if (starfield != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       StarField  *sp = &starfield[screen];
-
-                       if (sp->star)
-                               (void) free((void *) sp->star);
-                       if (sp->xarc)
-                               (void) free((void *) sp->xarc);
-                       if (sp->xarcleft)
-                               (void) free((void *) sp->xarcleft);
+       StarField  *sp = &starfield[MI_SCREEN(mi)];
+
+       if (sp->star)
+               (void) free((void *) sp->star);
+       if (sp->xarc)
+               (void) free((void *) sp->xarc);
+       if (sp->xarcleft)
+               (void) free((void *) sp->xarcleft);
 #if ((USEOLDXARCS == 1) || (ADAPT_ERASE == 1))
-                       if (sp->oldxarc)
-                               (void) free((void *) sp->oldxarc);
-                       if (sp->oldxarcleft)
-                               (void) free((void *) sp->oldxarcleft);
+       if (sp->oldxarc)
+               (void) free((void *) sp->oldxarc);
+       if (sp->oldxarcleft)
+               (void) free((void *) sp->oldxarcleft);
 #endif
-                       sinfree(&(sp->x));
-                       sinfree(&(sp->y));
-                       sinfree(&(sp->z));
-                       sinfree(&(sp->sizex));
-                       sinfree(&(sp->sizey));
-                       sinfree(&(sp->thetax));
-                       sinfree(&(sp->thetay));
-                       sinfree(&(sp->thetaz));
-               }
-               (void) free((void *) starfield);
-               starfield = NULL;
-       }
+       sinfree(&(sp->x));
+       sinfree(&(sp->y));
+       sinfree(&(sp->z));
+       sinfree(&(sp->sizex));
+       sinfree(&(sp->sizey));
+       sinfree(&(sp->thetax));
+       sinfree(&(sp->thetay));
+       sinfree(&(sp->thetaz));
 }
 
 ENTRYPOINT void
index a1bb6a47403e4369ce3b61c7290dfc813de183df..1f82334cbda963575339ee04974fdad51c452ade 100644 (file)
@@ -41,6 +41,7 @@ static const char sccsid[] = "@(#)braid.c     5.00 2000/11/01 xlockmore";
                                   "*ignoreRotation: True" \
 
 # define UNIFORM_COLORS
+# define release_braid 0
 # include "xlockmore.h"
 # include "erase.h"
 #else /* STANDALONE */
@@ -54,7 +55,7 @@ ENTRYPOINT ModeSpecOpt braid_opts = {0, NULL, 0, NULL, NULL};
 
 #ifdef USE_MODULES
 ModStruct   braid_description =
-{"braid", "init_braid", "draw_braid", "release_braid",
+{"braid", "init_braid", "draw_braid", (char *) NULL,
  "refresh_braid", "init_braid", (char *) NULL, &braid_opts,
  1000, 15, 100, 1, 64, 1.0, "",
  "Shows random braids and knots", 0, NULL};
@@ -170,11 +171,7 @@ init_braid(ModeInfo * mi)
        int         i, count, comp, c;
        float       min_length;
 
-       if (braids == NULL) {
-               if ((braids = (braidtype *) calloc(MI_NUM_SCREENS(mi),
-                                               sizeof (braidtype))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, braids, 0);
        braid = &braids[MI_SCREEN(mi)];
 
        braid->center_x = MI_WIDTH(mi) / 2;
@@ -289,6 +286,8 @@ draw_braid(ModeInfo * mi)
 #ifdef STANDALONE
     if (braid->eraser) {
       braid->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), braid->eraser);
+      if (!braid->eraser)
+        init_braid(mi);
       return;
     }
 #endif
@@ -441,8 +440,9 @@ draw_braid(ModeInfo * mi)
        if (++braid->age > MI_CYCLES(mi)) {
 #ifdef STANDALONE
       braid->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), braid->eraser);
-#endif
+#else
                init_braid(mi);
+#endif
        }
 }
 
@@ -465,15 +465,6 @@ braid_handle_event (ModeInfo *mi, XEvent *event)
   return False;
 }
 
-ENTRYPOINT void
-release_braid(ModeInfo * mi)
-{
-       if (braids != NULL) {
-               (void) free((void *) braids);
-               braids = (braidtype *) NULL;
-       }
-}
-
 ENTRYPOINT void
 refresh_braid(ModeInfo * mi)
 {
index 3926f64d1da362865739ddda3aa2982162c49798..534f30e13a23f54574ec761faf5d435d1dc852ef 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1998-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1998-2017 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
@@ -64,6 +64,7 @@
 #include "images/atari.xbm"
 #include "images/mac.xbm"
 #include "images/macbomb.xbm"
+#include "images/apple.xbm"
 #include "images/atm.xbm"
 
 #undef countof
@@ -79,7 +80,7 @@ typedef enum { EOF=0,
                LEFT, CENTER, RIGHT, 
                LEFT_FULL, CENTER_FULL, RIGHT_FULL, 
                COLOR, INVERT, MOVETO, MARGINS,
-               CURSOR_BLOCK, CURSOR_LINE, RECT, COPY, PIXMAP, IMG, FONT,
+               CURSOR_BLOCK, CURSOR_LINE, RECT, LINE, COPY, PIXMAP, IMG, FONT,
                PAUSE, CHAR_DELAY, LINE_DELAY,
                LOOP, RESET
 } bsod_event_type;
@@ -234,6 +235,19 @@ struct bsod_state {
   (bst)->pos++; \
   } while (0)
 
+/* Draw a line.
+ */
+#define BSOD_LINE(bst,x,y,x2,y2,thick) do { \
+  ensure_queue (bst); \
+  (bst)->queue[(bst)->pos].type = LINE; \
+  (bst)->queue[(bst)->pos].arg1 = (void *) ((long) (x)); \
+  (bst)->queue[(bst)->pos].arg2 = (void *) ((long) (y)); \
+  (bst)->queue[(bst)->pos].arg3 = (void *) ((long) (x2)); \
+  (bst)->queue[(bst)->pos].arg4 = (void *) ((long) (y2)); \
+  (bst)->queue[(bst)->pos].arg5 = (void *) ((long) (thick)); \
+  (bst)->pos++; \
+  } while (0)
+
 /* Copy a rect from the window, to the window.
  */
 #define BSOD_COPY(bst,srcx,srcy,w,h,tox,toy) do { \
@@ -532,6 +546,20 @@ bsod_pop (struct bsod_state *bst)
       bst->pos++;
       return 0;
     }
+  case LINE:
+    {
+      int x1 = (long) bst->queue[bst->pos].arg1;
+      int y1 = (long) bst->queue[bst->pos].arg2;
+      int x2 = (long) bst->queue[bst->pos].arg3;
+      int y2 = (long) bst->queue[bst->pos].arg4;
+      int t  = (long) bst->queue[bst->pos].arg5;
+      XGCValues gcv;
+      gcv.line_width = t;
+      XChangeGC (bst->dpy, bst->gc, GCLineWidth, &gcv);
+      XDrawLine (bst->dpy, bst->window, bst->gc, x1, y1, x2, y2);
+      bst->pos++;
+      return 0;
+    }
   case COPY:
   case PIXMAP:
     {
@@ -871,6 +899,64 @@ windows_31 (Display *dpy, Window window)
   return bst;
 }
 
+static struct bsod_state *
+vmware (Display *dpy, Window window)
+{
+  struct bsod_state *bst = make_bsod_state (dpy, window, "vmware", "VMware");
+
+  unsigned long fg = bst->fg;
+  unsigned long bg = bst->bg;
+  unsigned long fg2 = get_pixel_resource (dpy, bst->xgwa.colormap,
+                                          "vmware.foreground2",
+                                          "vmware.foreground");
+  BSOD_COLOR (bst, fg2, bg);
+  BSOD_TEXT   (bst, LEFT,
+               "VMware ESX Server [Releasebuild-98103]\n");
+  BSOD_COLOR (bst, fg, bg);
+  BSOD_TEXT   (bst, LEFT,
+               "PCPU 1 locked up. Failed to ack TLB invalidate.\n"
+               "frame=0x3a37d98 ip=0x625e94 cr2=0x0 cr3=0x40c66000 cr4=0x16c\n"
+               "es=0xffffffff ds=0xffffffff fs=0xffffffff gs=0xffffffff\n"
+               "eax=0xffffffff ebx=0xffffffff ecx=0xffffffff edx=0xffffffff\n"
+               "ebp=0x3a37ef4 esi=0xffffffff edi=0xffffffff err=-1 eflags=0xffffffff\n"
+               "*0:1037/helper1-4 1:1107/vmm0:Fagi 2:1121/vmware-vm 3:1122/mks:Franc\n"
+               "0x3a37ef4:[0x625e94]Panic+0x17 stack: 0x833ab4, 0x3a37f10, 0x3a37f48\n"
+               "0x3a37f04:[0x625e94]Panic+0x17 stack: 0x833ab4, 0x1, 0x14a03a0\n"
+               "0x3a37f48:[0x64bfa4]TLBDoInvalidate+0x38f stack: 0x3a37f54, 0x40, 0x2\n"
+               "0x3a37f70:[0x66da4d]XMapForceFlush+0x64 stack: 0x0, 0x4d3a, 0x0\n"
+               "0x3a37fac:[0x652b8b]helpFunc+0x2d2 stack: 0x1, 0x14a4580, 0x0\n"
+               "0x3a37ffc:[0x750902]CpuSched_StartWorld+0x109 stack: 0x0, 0x0, 0x0\n"
+               "0x3a38000:[0x0]blk_dev+0xfd76461f stack: 0x0, 0x0, 0x0\n"
+               "VMK uptime: 7:05:43:45.014 TSC: 1751259712918392\n"
+               "Starting coredump to disk\n"); 
+  BSOD_CHAR_DELAY (bst, 10000);                
+  BSOD_TEXT (bst, LEFT,        "using slot 1 of 1... ");
+  BSOD_CHAR_DELAY (bst, 300000);
+  BSOD_TEXT (bst, LEFT, "9876");
+  BSOD_CHAR_DELAY (bst, 3000000);
+  BSOD_TEXT (bst, LEFT, "66665");
+  BSOD_CHAR_DELAY (bst, 100000);
+  BSOD_TEXT (bst, LEFT, "4321");
+  BSOD_CHAR_DELAY (bst, 0);
+  BSOD_TEXT (bst, LEFT, "Disk dump successfull.\n"
+               "Waiting for Debugger (world 1037)\n"
+               "Debugger is listening on serial port ...\n");
+  BSOD_CHAR_DELAY (bst, 10000);
+  BSOD_TEXT (bst, LEFT, "Press Escape to enter local debugger\n");
+  BSOD_CHAR_DELAY (bst, 10000);
+  BSOD_TEXT (bst, LEFT, "Remote debugger activated. Local debugger no longer available.\n");
+
+/*  BSOD_CURSOR (bst, CURSOR_LINE, 240000, 999999);*/
+               
+/*  bst->y = ((bst->xgwa.height -
+             ((bst->font->ascent + bst->font->descent) * 9))
+            / 2);*/
+
+  XClearWindow (dpy, window);
+  return bst;
+}
+
+
 
 static struct bsod_state *
 windows_nt (Display *dpy, Window window)
@@ -2069,21 +2155,107 @@ mac_diskfail (Display *dpy, Window window)
 }
 
 
+/* 2017 MacOS 10.12 interminable software update, by jwz.
+ */
+static struct bsod_state *
+macx_install (Display *dpy, Window window)
+{
+  struct bsod_state *bst = make_bsod_state (dpy, window, "macinstall", "MacX");
+
+  Pixmap pixmap = 0;
+  int pix_w = apple_width;
+  int pix_h = apple_height;
+  int x, y;
+  int bw1, bh1;
+  int bw2, bh2;
+
+  unsigned long fg = get_pixel_resource (dpy, bst->xgwa.colormap,
+                                         "macinstall.foreground",
+                                         "Mac.Foreground");
+  unsigned long bg = get_pixel_resource (dpy, bst->xgwa.colormap,
+                                         "macinstall.background",
+                                         "Mac.Background");
+  unsigned long fg2 = get_pixel_resource (dpy, bst->xgwa.colormap,
+                                         "macinstall.barForeground",
+                                         "Mac.Foreground");
+  unsigned long bg2 = get_pixel_resource (dpy, bst->xgwa.colormap,
+                                         "macinstall.barBackground",
+                                         "Mac.Background");
+  char buf[1024];
+  int lh = bst->font->ascent + bst->font->descent;
+  int i, min;
+  double pct;
+
+  pixmap = XCreatePixmapFromBitmapData (dpy, window, (char *) apple_bits,
+                                        apple_width, apple_height,
+                                        fg, bg, bst->xgwa.depth);
+  bst->pixmap = pixmap;
+
+  x = (bst->xgwa.width - pix_w) / 2;
+  y = (bst->xgwa.height) / 2  - pix_h;
+  if (y < 0) y = 0;
+
+  XSetLineAttributes (dpy, bst->gc, 1, LineSolid, CapRound, JoinMiter);
+
+  BSOD_COLOR(bst, bg, bg);
+  BSOD_RECT (bst, True, 0, 0, bst->xgwa.width, bst->xgwa.height);
+  BSOD_COLOR(bst, fg, bg);
+  BSOD_PIXMAP (bst, 0, 0, pix_w, pix_h, x, y);
+  y += pix_h * 2 - lh;
+
+  /* progress bar */
+  bw1 = pix_w * 2.5;
+  bh1 = lh * 0.66;
+  if (bh1 < 8) bh1 = 8;
+
+  x = (bst->xgwa.width - bw1) / 2;
+  BSOD_COLOR(bst, fg2, bg);
+  BSOD_LINE (bst, x,   y, x + bw1, y, bh1);
+
+  bw2 = bw1 - 1;
+  bh2 = bh1 - 4;
+  BSOD_COLOR(bst, bg2, bg);
+  BSOD_LINE (bst, x+1, y, x + bw2, y, bh2);
+
+  BSOD_COLOR(bst, fg, bg);
+  BSOD_LINE (bst, x,   y, x + 1, y, bh1);
+
+  pct = 5 + (random() % 40);
+  min = 5 + (random() % 40);
+
+  for (i = 0; i < 100; i++) {
+    pct += frand(0.3);
+    min += (random() % 3) - 1;  /* sometimes down, mostly up */
+
+    if (pct > 90) pct = 90;
+    BSOD_RECT (bst, True, x, y - bh1/2, bw1 * pct / 100, bh1);
+
+    sprintf (buf, "  Installing Software Update: about %d minutes.  ", min);
+    bst->y = y + lh * 3;
+    BSOD_TEXT (bst, CENTER, buf);
+    BSOD_PAUSE (bst, 1000000);
+  }
+
+  return bst;
+}
+
 
 static struct bsod_state *
 macx (Display *dpy, Window window)
 {
 # ifdef DO_XPM
-  switch (random() % 4) {
+  switch (1?4:random() % 5) {
   case 0: return macx_10_0 (dpy, window);        break;
   case 1: return macx_10_2 (dpy, window, False); break;
   case 2: return macx_10_2 (dpy, window, True);  break;
-  case 3: return mac_diskfail (dpy, window); break;
+  case 3: return mac_diskfail (dpy, window);     break;
+  case 4: return macx_install (dpy, window);     break;
   default: abort();
   }
 # else  /* !DO_XPM */
-  switch (random() % 2) {
+  switch (random() % 3) {
   case 0:  return macx_10_0 (dpy, window);    break;
+  case 1:  return macx_install (dpy, window); break;
   default: return mac_diskfail (dpy, window); break;
   }
 # endif /* !DO_XPM */
@@ -4289,6 +4461,7 @@ static const struct {
   { "ATM",             atm },
   { "GLaDOS",          glados },
   { "Android",         android },
+  { "VMware",          vmware },
 };
 
 
@@ -4599,6 +4772,7 @@ static const char *bsod_defaults [] = {
   "*doATM:                True",
   "*doGLaDOS:             True",
   "*doAndroid:            True",
+  "*doVMware:             True",
 
   ".foreground:                   White",
   ".background:                   Black",
@@ -4641,6 +4815,9 @@ static const char *bsod_defaults [] = {
   ".macx.textBackground:   Black",
   ".macx.background:      #888888",
 
+  ".macinstall.barForeground: #C0C0C0",
+  ".macinstall.barBackground: #888888",
+
   ".sco.foreground:       White",
   ".sco.background:       Black",
 
@@ -4693,6 +4870,10 @@ static const char *bsod_defaults [] = {
   ".android.color6:       #66AA33", /* green3 */
   ".android.color7:       #FF0000", /* red */
 
+  ".vmware.foreground:    White",
+  ".vmware.foreground2:           Yellow",
+  ".vmware.background:    #a700a8",    /* purple */
+
   "*dontClearRoot:         True",
 
   ANALOGTV_DEFAULTS
@@ -4715,6 +4896,8 @@ static const char *bsod_defaults [] = {
   ".macsbug.font:         Courier-Bold 8",
   ".macx.font:            Courier-Bold 14",
   ".macdisk.font:         Courier-Bold 14",
+  ".macinstall.font:      Helvetica 12, Arial 12",
+  ".macinstall.bigFont:           Helvetica 12, Arial 12",
   ".msdos.font:                   PxPlus IBM VGA8 32, Courier-Bold 28",
   ".nt.font:              PxPlus IBM VGA8 12, Courier-Bold 10",
   ".win10.font:                   Arial 12, Helvetica 12",
@@ -4734,6 +4917,8 @@ static const char *bsod_defaults [] = {
   ".macsbug.font:         -*-courier-bold-r-*-*-*-80-*-*-m-*-*-*",
   ".macx.font:            -*-courier-bold-r-*-*-*-140-*-*-m-*-*-*",
   ".macdisk.font:         -*-courier-bold-r-*-*-*-140-*-*-m-*-*-*",
+  ".macinstall.font:      -*-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*",
+  ".macinstall.bigFont:           -*-helvetica-medium-r-*-*-*-120-*-*-*-*-*-*",
   ".msdos.font:                   PxPlus IBM VGA8 32",
   ".nt.font:              PxPlus IBM VGA8 12",
 
@@ -4760,6 +4945,8 @@ static const char *bsod_defaults [] = {
   ".macx.bigFont:         Courier-Bold 14",
   ".macdisk.font:         Courier-Bold 9",
   ".macdisk.bigFont:      Courier-Bold 18",
+  ".macinstall.font:      Helvetica 24, Arial 24",
+  ".macinstall.bigFont:           Helvetica 24, Arial 24",
 
   ".hvx.bigFont:          PxPlus IBM VGA8 16, Courier-Bold 14",
   ".hppalinux.bigFont:    PxPlus IBM VGA8 16, Courier-Bold 14",
@@ -4786,6 +4973,8 @@ static const char *bsod_defaults [] = {
 
   ".macdisk.font:         -*-courier-bold-r-*-*-*-80-*-*-m-*-*-*",
   ".macdisk.bigFont:      -*-courier-bold-r-*-*-*-100-*-*-m-*-*-*",
+  ".macinstall.font:      -*-helvetica-medium-r-*-*-*-180-*-*-*-*-*-*",
+  ".macinstall.bigFont:           -*-helvetica-medium-r-*-*-*-180-*-*-*-*-*-*",
 
   ".sco.font:             -*-courier-bold-r-*-*-*-140-*-*-m-*-*-*",
   ".hvx.font:             -*-courier-bold-r-*-*-*-140-*-*-m-*-*-*",
@@ -4877,6 +5066,8 @@ static const XrmOptionDescRec bsod_options [] = {
   { "-no-glados",      ".doGLaDOS",            XrmoptionNoArg,  "False" },
   { "-android",                ".doAndroid",           XrmoptionNoArg,  "True"  },
   { "-no-android",     ".doAndroid",           XrmoptionNoArg,  "False" },
+  { "-vmware",         ".doVMware",            XrmoptionNoArg,  "True"  },
+  { "-no-vmware",      ".doVMware",            XrmoptionNoArg,  "False" },
   ANALOGTV_OPTIONS
   { 0, 0, 0, 0 }
 };
index 874e25d4e89b84873b0aaa169900523cca1f5523..a82eb81dbe11edc1f4ae29463b7ee625bd244ac6 100644 (file)
@@ -30,7 +30,7 @@ steps through a set of screens, each one a recreation of a different failure
 mode of an operating system.  Systems depicted include
 Windows 3.1, Windows 95, Windows NT, MS-DOS, AmigaDOS 1.3, Linux,
 SCO UNIX, BSD UNIX, HPUX, Solaris, Tru64, VMS, HVX/GCOS6, IBM OS/390, OS/2,
-MacOS (MacsBug, Bomb, Sad Mac, and OSX), Atari ST, Apple ][+, and
+MacOS (MacsBug, Bomb, Sad Mac, and OSX), Atari ST, Apple ][+, VMware and
 NCD X Terminals.
 .PP
 .SH OPTIONS
@@ -98,6 +98,7 @@ hacks are displayed and which aren't.
 .BR doMSDOS ,
 .BR doOS2 ,
 .BR doHVX ,
+.BR doVMware ,
 and
 .BR doATM .
 Each of these is a Boolean resource, they all default to true, except
@@ -126,7 +127,7 @@ registered trademark of Apple Computer.  Amiga is a registered trademark of
 Amiga International, Inc.  Atari ST is probably a trademark, too, but it's
 hard to tell who owns it.  Linux is a registered trademark of Linus Torvalds,
 but it isn't his fault. OS/2 is a registered trademark of International 
-Business Machines Corporation.
+Business Machines Corporation. VMware is a registered trademark of VMware, Inc.
 .SH COPYRIGHT
 Copyright \(co 1998-2003 by Jamie Zawinski.  Permission to use, copy, modify, 
 distribute, and sell this software and its documentation for any purpose is 
index 60de04a3c9ebb87957e3b782a4f1ed942cf2a284..fa728e6c0a247a6ae846f272fe06176d410ead58 100644 (file)
  *  Essentially, it 3D-izes your desktop, based on color intensity.
  *
  * Modification History:
- *  [10/01/99] - Shane Smit: Creation
- *  [10/08/99] - Shane Smit: Port to C. (Ick)
- *  [03/08/02] - Shane Smit: New movement code.
- *  [09/12/02] - Shane Smit: MIT-SHM XImages.
- *                                                      Thanks to Kennett Galbraith <http://www.Alpha-II.com/>
- *                                                      for code optimization.
+ *  [10/01/1999] - Shane Smit: Creation
+ *  [10/08/1999] - Shane Smit: Port to C. (Ick)
+ *  [03/08/2002] - Shane Smit: New movement code.
+ *  [09/12/2002] - Shane Smit: MIT-SHM XImages.
+ *                             Thanks to Kennett Galbraith <http://www.Alpha-II.com/>
+ *                             for code optimization.
+ *  [10/09/2016] - Dave Odell: Updated for new xshm.c.
+ *                             Y2K compliance.
  */
 
 
 #include <time.h>
 #include <inttypes.h>
 #include "screenhack.h"
-
-#ifdef HAVE_XSHM_EXTENSION
 #include "xshm.h"
-#endif /* HAVE_XSHM_EXTENSION */
 
 
 /* Defines: */
@@ -114,10 +113,7 @@ typedef struct
        XColor *xColors;
        unsigned long *aColors;
        XImage *pXImage;
-#ifdef HAVE_XSHM_EXTENSION
        XShmSegmentInfo XShmInfo;
-       Bool    bUseShm;
-#endif /* HAVE_XSHM_EXTENSION */
 
        uint8_t nColorCount;                            /* Number of colors used. */
        uint8_t bytesPerPixel;
@@ -265,7 +261,6 @@ static void CreateBumps( SBumps *pBumps, Display *dpy, Window NewWin )
        pBumps->dpy = dpy;
        pBumps->Win = NewWin;
     pBumps->screen = XWinAttribs.screen;
-       pBumps->pXImage = NULL;
        
        iDiameter = ( ( pBumps->iWinWidth < pBumps->iWinHeight ) ? pBumps->iWinWidth : pBumps->iWinHeight ) / 2;
 
@@ -273,26 +268,8 @@ static void CreateBumps( SBumps *pBumps, Display *dpy, Window NewWin )
        constraining it to be a multiple of 8 seems to fix it. */
     iDiameter = ((iDiameter+7)/8)*8;
 
-#ifdef HAVE_XSHM_EXTENSION
-       pBumps->bUseShm = get_boolean_resource(dpy,  "useSHM", "Boolean" );
-
-       if( pBumps->bUseShm )
-       {
-               pBumps->pXImage = create_xshm_image( pBumps->dpy, XWinAttribs.visual, XWinAttribs.depth,
-                                                                                        ZPixmap, NULL, &pBumps->XShmInfo, iDiameter, iDiameter );
-               if( !pBumps->pXImage )
-               {
-                       fprintf( stderr, "%s: Unable to create XShmImage.\n", progname );
-                       pBumps->bUseShm = False;
-               }
-       }
-#endif /* HAVE_XSHM_EXTENSION */
-       if( !pBumps->pXImage )
-       {
-               pBumps->pXImage = XCreateImage( pBumps->dpy, XWinAttribs.visual, XWinAttribs.depth, 
-                                                                       ZPixmap, 0, NULL, iDiameter, iDiameter, BitmapPad( pBumps->dpy ), 0 );
-               pBumps->pXImage->data = malloc( pBumps->pXImage->bytes_per_line * pBumps->pXImage->height * sizeof(int8_t) );
-       }
+       pBumps->pXImage = create_xshm_image( pBumps->dpy, XWinAttribs.visual, XWinAttribs.depth,
+                                            ZPixmap, &pBumps->XShmInfo, iDiameter, iDiameter );
 
        /* For speed, access the XImage data directly using my own PutPixel routine. */
        switch( pBumps->pXImage->bits_per_pixel )
@@ -319,12 +296,7 @@ static void CreateBumps( SBumps *pBumps, Display *dpy, Window NewWin )
 
                default:
                        fprintf( stderr, "%s: Unknown XImage depth.", progname );
-#ifdef HAVE_XSHM_EXTENSION
-                       if( pBumps->bUseShm )
-                               destroy_xshm_image( pBumps->dpy, pBumps->pXImage, &pBumps->XShmInfo );
-                       else
-#endif /* HAVE_XSHM_EXTENSION */
-                               XDestroyImage( pBumps->pXImage );
+                       destroy_xshm_image( pBumps->dpy, pBumps->pXImage, &pBumps->XShmInfo );
                        exit( 1 );
        }
        
@@ -623,14 +595,8 @@ static void Execute( SBumps *pBumps )
                nY -= ( nLightYPos + nY ) - pBumps->iWinHeight;
        }
        
-#ifdef HAVE_XSHM_EXTENSION
-       if( pBumps->bUseShm )
-               XShmPutImage( pBumps->dpy, pBumps->Win, pBumps->GraphicsContext, pBumps->pXImage, iLightX, iLightY, nLightXPos, nLightYPos,
-                                         nX, nY, False);
-       else
-#endif /* HAVE_XSHM_EXTENSION */
-               XPutImage( pBumps->dpy, pBumps->Win, pBumps->GraphicsContext, pBumps->pXImage, iLightX, iLightY, nLightXPos, nLightYPos,
-                                  nX, nY );
+       put_xshm_image( pBumps->dpy, pBumps->Win, pBumps->GraphicsContext, pBumps->pXImage, iLightX, iLightY, nLightXPos, nLightYPos,
+                       nX, nY, &pBumps->XShmInfo);
 }
 
 
@@ -642,12 +608,7 @@ static void DestroyBumps( SBumps *pBumps )
        DestroySpotLight( &pBumps->SpotLight );
        free( pBumps->aColors );
        free( pBumps->aBumpMap );
-#ifdef HAVE_XSHM_EXTENSION
-       if( pBumps->bUseShm )
-               destroy_xshm_image( pBumps->dpy, pBumps->pXImage, &pBumps->XShmInfo );
-       else
-#endif /* HAVE_XSHM_EXTENSION */
-               XDestroyImage( pBumps->pXImage );
+       destroy_xshm_image( pBumps->dpy, pBumps->pXImage, &pBumps->XShmInfo );
 }
 
 
index f8bba1decee5947a48ee4e9e0c61b7937443ee19..a65979d988efc7a332100ee3084b6a8dc56ee43a 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# Copyright Â© 2008-2016 Jamie Zawinski <jwz@jwz.org>
+# Copyright Â© 2008-2017 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
@@ -21,7 +21,7 @@ use diagnostics;
 use strict;
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my ($version) = ('$Revision: 1.22 $' =~ m/\s(\d[.\d]+)\s/s);
+my ($version) = ('$Revision: 1.24 $' =~ m/\s(\d[.\d]+)\s/s);
 
 my $verbose = 0;
 my $debug_p = 0;
@@ -394,7 +394,7 @@ sub parse_xml($$$) {
         $res = $res2;
 
         $ctrl->{resource} = $res;
-        $ctrl->{convert} = 'invert' if ($val =~ m/false/i);
+        $ctrl->{convert} = 'invert' if ($val =~ m/off|false|no/i);
         $ctrl->{default} = ($ctrl->{convert} ? 'true' : 'false');
 
 #       $val = ($set ? "$res != $val" : "$res = $val");
@@ -707,6 +707,9 @@ sub build_android(@) {
   my $manifest = '';
   my $daydream_java = '';
   my $settings_java = '';
+  my $wallpaper_java = '';
+  my $fntable_h2 = '';
+  my $fntable_h3 = '';
   my $arrays   = '';
   my $strings  = '';
   my %write_files;
@@ -954,8 +957,30 @@ sub build_android(@) {
                   "  <meta-data android:name=\"android.service.dream\"\n" .
                   "    android:resource=\"\@xml/${saver}_dream\" />\n" .
                   "</service>\n" .
-                  "<activity android:name=\"" .
-                    "$package.gen.Settings\$$saver_class\" />\n"
+                  "<service android:label=\"" .
+                     $localize0->("${saver_underscore}_saver_title",
+                                  $saver_title) .
+                     "\"\n" .
+                  "  android:summary=\"" .
+                       $localize0->("${saver_underscore}_saver_desc",
+                                    $daydream_desc) . "\"\n" .
+                  "  android:name=\".gen.Wallpaper\$$saver_class\"\n" .
+                  "  android:permission=\"android.permission" .
+                       ".BIND_WALLPAPER\">\n" .
+                  "  <intent-filter>\n" .
+                  "    <action android:name=\"android.service.wallpaper" .
+                        ".WallpaperService\" />\n" .
+                  "    <category android:name=\"android.intent.category" .
+                        ".DEFAULT\" />\n" . # TODO: Is the DEFAULT category needed?
+                  "  </intent-filter>\n" .
+                  "  <meta-data android:name=\"android.service.wallpaper\"\n" .
+                  "    android:resource=\"\@xml/${saver}_wallpaper\" />\n" .
+                  "</service>\n" .
+                  "<activity android:label=\"" .
+                   $localize0->("${saver}_settings_title", $heading) . "\"\n" .
+                  "  android:name=\"$package.gen.Settings\$$saver_class\"\n" .
+                  "  android:exported=\"true\">\n" .
+                  "</activity>\n"
                  );
 
     my $dream = ("<dream xmlns:android=\"" .
@@ -964,11 +989,20 @@ sub build_android(@) {
                      "$package.gen.Settings\$$saver_class\" />\n");
     $write_files{"$xml_dir/${saver_underscore}_dream.xml"} = $dream;
 
+    my $wallpaper = ("<wallpaper xmlns:android=\"" .
+                       "http://schemas.android.com/apk/res/android\"\n" .
+                     "  android:settingsActivity=\"" .
+                     "$package.gen.Settings\$$saver_class\"\n" .
+                     "  android:thumbnail=\"\@drawable/${saver_underscore}\" />\n");
+    $write_files{"$xml_dir/${saver_underscore}_wallpaper.xml"} = $wallpaper;
+
     $daydream_java .=
       ("  public static class $saver_class extends XScreenSaverDaydream {\n" .
-       "    public $saver_class() {\n" .
-       "      super(jwxyz.API_" . ($gl_p ? 'GL' : 'XLIB') . ");\n" .
-       "    }\n" .
+       "  }\n" .
+       "\n");
+
+    $wallpaper_java .=
+      ("  public static class $saver_class extends XScreenSaverWallpaper {\n" .
        "  }\n" .
        "\n");
 
@@ -977,6 +1011,13 @@ sub build_android(@) {
        "    implements SharedPreferences.OnSharedPreferenceChangeListener {\n" .
        "  }\n" .
        "\n");
+
+    $fntable_h2 .= ",\n  " if $fntable_h2 ne '';
+    $fntable_h3 .= ",\n  " if $fntable_h3 ne '';
+
+    $fntable_h2 .= "${saver}_xscreensaver_function_table";
+    $fntable_h3 .= "{\"${saver}\", &${saver}_xscreensaver_function_table, " .
+                     'API_' . ($gl_p ? 'GL' : 'XLIB') . '}';
   }
 
   $arrays =~ s/^/  /gm;
@@ -1054,6 +1095,15 @@ sub build_android(@) {
                     $daydream_java .
                     "}\n");
 
+  $wallpaper_java = ("package org.jwz.xscreensaver.gen;\n" .
+                     "\n" .
+                     "import org.jwz.xscreensaver.XScreenSaverWallpaper;\n" .
+                     "import org.jwz.xscreensaver.jwxyz;\n" .
+                     "\n" .
+                     "public class Wallpaper {\n" .
+                     $wallpaper_java .
+                     "}\n");
+
   $settings_java = ("package org.jwz.xscreensaver.gen;\n" .
                     "\n" .
                     "import android.content.SharedPreferences;\n" .
@@ -1067,23 +1117,15 @@ sub build_android(@) {
   $write_files{"$values_dir/settings.xml"} = $arrays;
   $write_files{"$values_dir/strings.xml"}  = $strings;
   $write_files{"$java_dir/Daydream.java"}  = $daydream_java;
+  $write_files{"$java_dir/Wallpaper.java"} = $wallpaper_java;
   $write_files{"$java_dir/Settings.java"}  = $settings_java;
 
-  my @s2 = ();
-  foreach my $saver (sort @savers) {
-    push @s2, $saver unless ($saver =~ m/(-helper)$/);
-  }
-  my @s3 = @s2;
-
-  foreach (@s2) { s/^(.*)$/${1}_xscreensaver_function_table/s; }
-  foreach (@s3) { s/^(.*)$/{"$1", &${1}_xscreensaver_function_table}/s; }
-
   my $fntable_h = ("extern struct xscreensaver_function_table\n" .
-                   "  " . join(",\n  ", @s2) . ";\n" .
+                   "  " . $fntable_h2 . ";\n" .
                    "\n" .
                    "static const struct function_table_entry" .
                    " function_table[] = {\n" .
-                   "  " . join(",\n  ", @s3) . "\n" .
+                   "  " . $fntable_h3 . "\n" .
                    "};\n");
   $write_files{"$gen_dir/function-table.h"} = $fntable_h;
 
@@ -1121,7 +1163,7 @@ sub build_android(@) {
       next if ($f eq '.' || $f eq '..');
       $f = "$dd/$f";
       next if (defined ($write_files{$f}));
-      if ($f =~ m/_(settings|dream)\.xml$/s ||
+      if ($f =~ m/_(settings|wallpaper|dream)\.xml$/s ||
           $f =~ m/(Settings|Daydream)\.java$/s) {
         print STDERR "$progname: rm $f\n";
         unlink ($f) unless ($debug_p);
index c141b17d535f7946da970ea6f61a95a190d6623a..a9dd1a14cc596cc8dbd812680441b8d946db2799 100644 (file)
@@ -4,8 +4,8 @@
             a screen saver and locker for the X window system
                             by Jamie Zawinski
 
-                              version 5.36
-                               10-Oct-2016
+                              version 5.37
+                               05-Jul-2017
 
                      https://www.jwz.org/xscreensaver/
 
index 8162f7f7369e87bc5df926344cf54017a54eb12c..16c52d8639edec001cc5c1a5c720615d846aa5e5 100644 (file)
@@ -26,6 +26,7 @@
    <boolean id="glados"     _label="GLaDOS"         arg-unset="-no-glados"/>
    <boolean id="android"    _label="Android"        arg-unset="-no-android"/>
    <boolean id="apple2"     _label="Apple ]["       arg-unset="-no-apple2"/>
+   <boolean id="vmware"     _label="VMware"         arg-unset="-no-vmware"/>
   </vgroup>
   <vgroup>
    <boolean id="nvidia"     _label="NVidia"         arg-unset="-no-nvidia"/>
index 93bd7535e1ecfdd326c9e601967f982269587856..5917e324f6dd428bf5c30e0b169fefdd3bcadde6 100644 (file)
@@ -24,8 +24,6 @@
   <_description>
 A colourful star(fish)like flurry of particles.
 
-Original Mac version: http://homepage.mac.com/calumr
-
 Written by Calum Robinson and Tobias Sargeant; 2002.
   </_description>
 </screensaver>
index 657ca102e4e7927d197e180cb06db18017056756..74b1015c239faaad82fa42a664a244f2aa965917 100644 (file)
@@ -64,6 +64,7 @@
 
   </hgroup>
 
+  <xscreensaver-image />
   <xscreensaver-updater />
 
   <_description>
index 08b3bfbbf5f383b78b4f5871ce1e88d311fa2622..0970fd378b6d1e1f7c96b26683147b203ad54ebd 100644 (file)
@@ -15,7 +15,7 @@
           low="0.01" high="5.0" default="1.0"/>
 
   <hgroup>
-   <number id="depth" type="spinbutton" arg="-depth %"
+   <number id="freq" type="spinbutton" arg="-depth %"
            _label="Depth" low="0" high="5" default="4"/>
    <boolean id="wander" _label="Wander"    arg-unset="-no-wander"/>
    <boolean id="spin"   _label="Spin"      arg-unset="-no-spin"/>
index e4d530545a74e70c1d7239ee6997c90dd8e00d15..fcaeb637d9786b438402431cc350ba4c1e9dc527 100644 (file)
@@ -6,20 +6,45 @@
 
   <video href="https://www.youtube.com/watch?v=F1qna7UAxC0"/>
 
-  <number id="delay" type="slider" arg="-delay %"
-          _label="Frame rate" _low-label="Low" _high-label="High"
-          low="0" high="100000" default="10000"
-          convert="invert"/>
-
-  <number id="points" type="slider" arg="-points %"
-            _label="Number of points" _low-label="1k" _high-label="100k"
-            low="1000" high="100000" default="5500"/>
-
-  <number id="ncolors" type="slider" arg="-ncolors %"
-            _label="Number of colors" _low-label="Two" _high-label="Many"
-            low="1" high="255" default="100"/>
-
-  <boolean id="showfps" _label="Show frame rate" arg-set="-fps"/>
+  <hgroup>
+    <vgroup>
+      <number id="delay" type="slider" arg="-delay %"
+              _label="Frame rate" _low-label="Low" _high-label="High"
+              low="0" high="100000" default="10000"
+              convert="invert"/>
+
+      <number id="curve" type="slider" arg="-curve %"
+                _label="Curviness" _low-label="Low" _high-label="High"
+                low="1" high="50" default="10"/>
+
+      <number id="points" type="slider" arg="-points %"
+                _label="Number of points" _low-label="1k" _high-label="500k"
+                low="1000" high="500000" default="5500"/>
+
+      <number id="pointSize" type="slider" arg="-point-size %"
+                _label="Point size" _low-label="1" _high-label="8"
+                low="1" high="8" default="1"/>
+    </vgroup>
+    <vgroup>
+      <number id="zoom" type="slider" arg="-zoom %"
+                _label="Zoom" _low-label="10%" _high-label="400%"
+                low="0.1" high="4.0" default="0.9"/>
+
+      <number id="brightness" type="slider" arg="-brightness %"
+                _label="Brightness" _low-label="10%" _high-label="400%"
+                low="0.1" high="4.0" default="1.0"/>
+
+      <number id="motionBlur" type="slider" arg="-motion-blur %"
+                _label="Motion blur" _low-label="1" _high-label="10"
+                low="1.0" high="10.0" default="3.0"/>
+
+      <number id="ncolors" type="slider" arg="-ncolors %"
+                _label="Number of colors" _low-label="Two" _high-label="Many"
+                low="1" high="255" default="100"/>
+
+      <boolean id="showfps" _label="Show frame rate" arg-set="-fps"/>
+    </vgroup>
+  </hgroup>
 
   <xscreensaver-updater />
 
index 3f14c03e9cad75702169a72ad7460b6d17edc0de..caab9fce3128422994cc98d35e47a34d442fef04 100644 (file)
@@ -35,8 +35,7 @@
   <xscreensaver-updater />
 
   <_description>
-An animation similar to the opening and closing effects on the
-Dr. Who TV show.
+An animation similar to the title sequence of Dr. Who in the 70s.
 
 Written by Sean P. Brennan; 2005.
   </_description>
index bf56fb1ecbe8eeb9792b811e45793c243b2ec364..327e0335a04e9432803fe2ea5a678477f5f1b37c 100644 (file)
@@ -19,6 +19,7 @@
    <boolean id="wander" _label="Wander"    arg-unset="-no-wander"/>
    <boolean id="spin"   _label="Spin"      arg-unset="-no-spin"/>
    <boolean id="showfps" _label="Show frame rate" arg-set="-fps"/>
+   <boolean id="titles"  _label="Show titles" arg-unset="-no-titles"/>
   </hgroup>
 
   <select id="block">
diff --git a/hacks/config/vigilance.xml b/hacks/config/vigilance.xml
new file mode 100644 (file)
index 0000000..ea9962e
--- /dev/null
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<screensaver name="vigilance" _label="Vigilance" gl="yes">
+
+  <command arg="-root"/>
+
+  <video href="https://www.youtube.com/watch?v=b7y35gr3WZ0"/>
+
+  <number id="delay" type="slider" arg="-delay %"
+          _label="Frame rate" _low-label="Low" _high-label="High"
+          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.01" high="8.0" default="1.0"/>
+
+  <number id="count" type="slider" arg="-count %"
+          _label="Number of cameras" _low-label="One" _high-label="Lots"
+          low="1" high="30" default="5"/>
+
+  <xscreensaver-updater />
+
+  <_description>
+Security cameras keep careful track of their surroundings.
+You can trust them. Everything is completely under control.
+
+Written by Jamie Zawinski; 2017.
+  </_description>
+</screensaver>
index 9dfa5ea266873d9e953c57d41732aeaf993d6724..2a12a7e2cd84421d0f8f1e7669bf9620464004f1 100644 (file)
@@ -77,6 +77,7 @@ static const char sccsid[] = "@(#)crystal.c   4.12 98/09/10 xlockmore";
                                                 "*fpsSolid:       True \n" \
                                                 "*ignoreRotation: True \n" \
 
+# define release_crystal 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
 # include "xlock.h"                    /* in xlockmore distribution */
@@ -144,7 +145,7 @@ ENTRYPOINT ModeSpecOpt crystal_opts =
 
 #ifdef USE_MODULES
 ModStruct   crystal_description =
-{"crystal", "init_crystal", "draw_crystal", "release_crystal",
+{"crystal", "init_crystal", "draw_crystal", NULL,
  "refresh_crystal", "init_crystal", NULL, &crystal_opts,
  60000, -40, 200, -15, 64, 1.0, "",
  "Shows polygons in 2D plane groups", 0, NULL};
@@ -557,7 +558,6 @@ crystal_drawatom(ModeInfo * mi, crystalatom * atom0)
 }
 
 ENTRYPOINT void init_crystal(ModeInfo * mi);
-ENTRYPOINT void release_crystal(ModeInfo * mi);
 
 
 ENTRYPOINT void
@@ -572,7 +572,6 @@ draw_crystal(ModeInfo * mi)
 #endif
 
        if (cryst->no_colors) {
-               release_crystal(mi);
                init_crystal(mi);
                return;
        }
@@ -790,41 +789,32 @@ refresh_crystal(ModeInfo * mi)
        XSetFunction(display, cryst->gc, GXcopy);
 }
 
-ENTRYPOINT void
-release_crystal(ModeInfo * mi)
+static void
+free_crystal(ModeInfo * mi)
 {
        Display    *display = MI_DISPLAY(mi);
+       crystalstruct *cryst = &crystals[MI_SCREEN(mi)];
 
-       if (crystals != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       crystalstruct *cryst = &crystals[screen];
-
-                       if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) {
-                               MI_WHITE_PIXEL(mi) = cryst->whitepixel;
-                               MI_BLACK_PIXEL(mi) = cryst->blackpixel;
+       if (MI_IS_INSTALL(mi) && MI_NPIXELS(mi) > 2) {
+               MI_WHITE_PIXEL(mi) = cryst->whitepixel;
+               MI_BLACK_PIXEL(mi) = cryst->blackpixel;
 #ifndef STANDALONE
-                               MI_FG_PIXEL(mi) = cryst->fg;
-                               MI_BG_PIXEL(mi) = cryst->bg;
+               MI_FG_PIXEL(mi) = cryst->fg;
+               MI_BG_PIXEL(mi) = cryst->bg;
 #endif
-                               if (cryst->colors && cryst->ncolors && !cryst->no_colors)
-                                       free_colors(mi->xgwa.screen, cryst->cmap, cryst->colors,
-                                cryst->ncolors);
-                               if (cryst->colors)
-                                       (void) free((void *) cryst->colors);
+               if (cryst->colors && cryst->ncolors && !cryst->no_colors)
+                       free_colors(mi->xgwa.screen, cryst->cmap, cryst->colors,
+                        cryst->ncolors);
+               if (cryst->colors)
+                       (void) free((void *) cryst->colors);
 #if 0 /* #### wrong! -jwz */
-                               XFreeColormap(display, cryst->cmap);
+               XFreeColormap(display, cryst->cmap);
 #endif
-                       }
-                       if (cryst->gc != NULL)
-                               XFreeGC(display, cryst->gc);
-                       if (cryst->atom != NULL)
-                               (void) free((void *) cryst->atom);
-               }
-               (void) free((void *) crystals);
-               crystals = NULL;
        }
+       if (cryst->gc != NULL)
+               XFreeGC(display, cryst->gc);
+       if (cryst->atom != NULL)
+               (void) free((void *) cryst->atom);
 }
 
 ENTRYPOINT void
@@ -839,11 +829,7 @@ init_crystal(ModeInfo * mi)
 #define MIN_CELL 200
 
 /* initialize */
-       if (crystals == NULL) {
-               if ((crystals = (crystalstruct *) calloc(MI_NUM_SCREENS(mi),
-                                           sizeof (crystalstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, crystals, free_crystal);
        cryst = &crystals[MI_SCREEN(mi)];
 
        if (!cryst->gc) {
@@ -1281,7 +1267,6 @@ init_crystal(ModeInfo * mi)
 ENTRYPOINT void
 reshape_crystal(ModeInfo * mi, int width, int height)
 {
-  release_crystal(mi);
   init_crystal(mi);
 }
 
index 03ddf1f76087341b741709816c59a8c595442d0c..eb926ca6b150c7403dca4d30932e367ea28a01aa 100644 (file)
@@ -61,6 +61,7 @@ static const char sccsid[] = "@(#)demon.c     5.00 2000/11/01 xlockmore";
                                    "*ignoreRotation: True  \n" \
 
 # define UNIFORM_COLORS
+# define release_demon 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
 # include "xlock.h"            /* in xlockmore distribution */
@@ -95,7 +96,7 @@ ENTRYPOINT ModeSpecOpt demon_opts =
 
 #ifdef USE_MODULES
 ModStruct   demon_description =
-{"demon", "init_demon", "draw_demon", "release_demon",
+{"demon", "init_demon", "draw_demon", (char *) NULL,
  "refresh_demon", "init_demon", (char *) NULL, &demon_opts,
  50000, 0, 1000, -7, 64, 1.0, "",
  "Shows Griffeath's cellular automata", 0, NULL};
@@ -104,8 +105,8 @@ ModStruct   demon_description =
 
 #define DEMONBITS(n,w,h)\
   if ((dp->pixmaps[dp->init_bits]=\
-  XCreatePixmapFromBitmapData(display,window,(char *)n,w,h,1,0,1))==None){\
-  free_demon(display,dp); return;} else {dp->init_bits++;}
+  XCreatePixmapFromBitmapData(MI_DISPLAY(mi),window,(char *)n,w,h,1,0,1))==None){\
+  free_demon(mi); return;} else {dp->init_bits++;}
 
 #define REDRAWSTEP 2000                /* How many cells to draw per cycle */
 #define MINSTATES 2
@@ -277,8 +278,10 @@ free_struct(demonstruct * dp)
 }
 
 static void
-free_demon(Display *display, demonstruct *dp)
+free_demon(ModeInfo * mi)
 {
+       Display    *display = MI_DISPLAY(mi);
+       demonstruct *dp = &demons[MI_SCREEN(mi)];
        int         shade;
 
        if (dp->stippledGC != None) {
@@ -409,15 +412,10 @@ RandomSoup(ModeInfo * mi)
 ENTRYPOINT void
 init_demon (ModeInfo * mi)
 {
-       Display    *display = MI_DISPLAY(mi);
        int         size = MI_SIZE(mi), nk;
        demonstruct *dp;
 
-       if (demons == NULL) {
-               if ((demons = (demonstruct *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (demonstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, demons, free_demon);
        dp = &demons[MI_SCREEN(mi)];
 
        dp->generation = 0;
@@ -429,9 +427,9 @@ init_demon (ModeInfo * mi)
                        XGCValues   gcv;
 
                        gcv.fill_style = FillOpaqueStippled;
-                       if ((dp->stippledGC = XCreateGC(display, window,
+                       if ((dp->stippledGC = XCreateGC(MI_DISPLAY(mi), window,
                                 GCFillStyle, &gcv)) == None) {
-                               free_demon(display, dp);
+                               free_demon(mi);
                                return;
                        }
                }
@@ -469,11 +467,11 @@ init_demon (ModeInfo * mi)
                dp->states = plots[1][nk];
        if ((dp->cellList = (CellList **) calloc(dp->states,
                sizeof (CellList *))) == NULL) {
-               free_demon(display, dp);
+               free_demon(mi);
                return;
        }
        if ((dp->ncells = (int *) calloc(dp->states, sizeof (int))) == NULL) {
-               free_demon(display, dp);
+               free_demon(mi);
                return;
        }
 
@@ -565,13 +563,13 @@ init_demon (ModeInfo * mi)
 
        if ((dp->oldcell = (unsigned char *)
                malloc(dp->ncols * dp->nrows * sizeof (unsigned char))) == NULL) {
-               free_demon(display, dp);
+               free_demon(mi);
                return;
        }
 
        if ((dp->newcell = (unsigned char *)
                malloc(dp->ncols * dp->nrows * sizeof (unsigned char))) == NULL) {
-               free_demon(display, dp);
+               free_demon(mi);
                return;
        }
 
@@ -898,7 +896,7 @@ draw_demon (ModeInfo * mi)
                                if (dp->oldcell[i + mj] != dp->newcell[i + mj]) {
                                        dp->oldcell[i + mj] = dp->newcell[i + mj];
                                        if (!addtolist(mi, i, j, dp->oldcell[i + mj])) {
-                                               free_demon(MI_DISPLAY(mi), dp);
+                                               free_demon(mi);
                                                return;
                                        }
                                }
@@ -910,7 +908,7 @@ draw_demon (ModeInfo * mi)
        } else {
                if (dp->ncells[dp->state])
                        if (!draw_state(mi, dp->state)) {
-                               free_demon(MI_DISPLAY(mi), dp);
+                               free_demon(mi);
                                return;
                        }
                dp->state++;
@@ -938,19 +936,6 @@ reshape_demon(ModeInfo * mi, int width, int height)
 }
 
 
-ENTRYPOINT void
-release_demon (ModeInfo * mi)
-{
-       if (demons != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_demon(MI_DISPLAY(mi), &demons[screen]);
-               (void) free((void *) demons);
-               demons = (demonstruct *) NULL;
-       }
-}
-
 ENTRYPOINT void
 refresh_demon (ModeInfo * mi)
 {
index 9b0cf597f52912bbc19a570706beafa54bbb8f0e..ecf4ce5c959f5a8816141410d7d6e3f3f52ac78c 100644 (file)
@@ -41,6 +41,7 @@ static const char sccsid[] = "@(#)discrete.c  5.00 2000/11/01 xlockmore";
                                    "*ignoreRotation: True \n" \
 
 # define SMOOTH_COLORS
+# define release_discrete 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 # include "erase.h"
 #else /* STANDALONE */
@@ -54,7 +55,7 @@ ENTRYPOINT ModeSpecOpt discrete_opts =
 
 #ifdef USE_MODULES
 ModStruct   discrete_description =
-{"discrete", "init_discrete", "draw_discrete", "release_discrete",
+{"discrete", "init_discrete", "draw_discrete", (char *) NULL,
  "refresh_discrete", "init_discrete", (char *) NULL, &discrete_opts,
  1000, 4096, 2500, 1, 64, 1.0, "",
  "Shows various discrete maps", 0, NULL};
@@ -109,18 +110,15 @@ typedef struct {
 
 static discretestruct *discretes = (discretestruct *) NULL;
 
+static void free_discrete(ModeInfo * mi);
+
 ENTRYPOINT void
 init_discrete (ModeInfo * mi)
 {
        double      range;
        discretestruct *hp;
 
-       if (discretes == NULL) {
-               if ((discretes =
-                    (discretestruct *) calloc(MI_NUM_SCREENS(mi),
-                                          sizeof (discretestruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, discretes, free_discrete);
        hp = &discretes[MI_SCREEN(mi)];
 
        hp->maxx = MI_WIDTH(mi);
@@ -407,6 +405,8 @@ draw_discrete (ModeInfo * mi)
 
   if (hp->eraser) {
     hp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), hp->eraser);
+    if (!hp->eraser)
+      init_discrete(mi);
     return;
   }
 
@@ -417,7 +417,6 @@ draw_discrete (ModeInfo * mi)
 
   if (hp->count > cycles) {
     hp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), hp->eraser);
-    init_discrete(mi);
   }
 }
 
@@ -431,22 +430,14 @@ reshape_discrete(ModeInfo * mi, int width, int height)
   XClearWindow (MI_DISPLAY (mi), MI_WINDOW(mi));
 }
 
-ENTRYPOINT void
-release_discrete(ModeInfo * mi)
+static void
+free_discrete(ModeInfo * mi)
 {
-       if (discretes != NULL) {
-               int         screen;
+       discretestruct *hp = &discretes[MI_SCREEN(mi)];
 
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       discretestruct *hp = &discretes[screen];
-
-                       if (hp->pointBuffer != NULL) {
-                               (void) free((void *) hp->pointBuffer);
-                               /* hp->pointBuffer = NULL; */
-                       }
-               }
-               (void) free((void *) discretes);
-               discretes = (discretestruct *) NULL;
+       if (hp->pointBuffer != NULL) {
+               (void) free((void *) hp->pointBuffer);
+               /* hp->pointBuffer = NULL; */
        }
 }
 
index d7faf900e4975110c560ef1f62b1d53d83be74cc..54439d44733f03b3aa29843cf493845df34ff0cf 100644 (file)
  *    on wood).
  * 08 Oct 1999 Jonas Munsin (jmunsin@iki.fi)
  *     Corrected several bugs causing references beyond allocated memory.
+ * 09 Oct 2016 Dave Odell (dmo2118@gmail.com)
+ *  Updated for new xshm.c.
  */
 
 #include <math.h>
 #include <time.h>
 #include "screenhack.h"
 /*#include <X11/Xmd.h>*/
-
-#ifdef HAVE_XSHM_EXTENSION
 # include "xshm.h"
-#endif /* HAVE_XSHM_EXTENSION */
 
 #define CARD32 unsigned int
 #define CARD16 unsigned short
@@ -78,10 +77,7 @@ struct state {
 
   int bpp_size;
 
-#ifdef HAVE_XSHM_EXTENSION
-  Bool use_shm;
   XShmSegmentInfo shm_info;
-#endif /* HAVE_XSHM_EXTENSION */
 
   void (*effect) (struct state *, int);
   void (*draw) (struct state *, int);
@@ -274,10 +270,6 @@ distort_init (Display *dpy, Window window)
     st->dpy = dpy;
     st->window = window;
 
-#ifdef HAVE_XSHM_EXTENSION
-       st->use_shm = get_boolean_resource(st->dpy, "useSHM", "Boolean");
-#endif /* HAVE_XSHM_EXTENSION */
-       
     distort_reset (st);
 
        st->black_pixel = BlackPixelOfScreen( st->xgwa.screen );
@@ -309,7 +301,6 @@ distort_finish_loading (struct state *st)
 
     st->start_time = time ((time_t *) 0);
 
-       st->buffer_map = 0;
     if (! st->pm) abort();
     XClearWindow (st->dpy, st->window);
     XCopyArea (st->dpy, st->pm, st->window, st->gc, 
@@ -324,28 +315,10 @@ distort_finish_loading (struct state *st)
                exit(EXIT_FAILURE);
        }
 
-# ifdef HAVE_XSHM_EXTENSION
-
-       if (st->use_shm)
-         {
-               st->buffer_map = create_xshm_image(st->dpy, st->xgwa.visual, st->orig_map->depth,
-                                                                          ZPixmap, 0, &st->shm_info,
-                                                                          2*st->radius + st->speed + 2,
-                                                                          2*st->radius + st->speed + 2);
-               if (!st->buffer_map)
-                 st->use_shm = False;
-         }
-# endif /* HAVE_XSHM_EXTENSION */
-
-       if (!st->buffer_map)
-         {
-               st->buffer_map = XCreateImage(st->dpy, st->xgwa.visual,
-                                                                 st->orig_map->depth, ZPixmap, 0, 0,
-                                                                 2*st->radius + st->speed + 2, 2*st->radius + st->speed + 2,
-                                                                 8, 0);
-               st->buffer_map->data = (char *)
-                 calloc(st->buffer_map->height, st->buffer_map->bytes_per_line);
-       }
+       st->buffer_map = create_xshm_image(st->dpy, st->xgwa.visual, st->orig_map->depth,
+                                          ZPixmap, &st->shm_info,
+                                          2*st->radius + st->speed + 2,
+                                          2*st->radius + st->speed + 2);
 
        if ((st->buffer_map->byte_order == st->orig_map->byte_order)
                        && (st->buffer_map->depth == st->orig_map->depth)
@@ -612,17 +585,8 @@ static void plain_draw(struct state *st, int k)
 
        st->draw_routine(st, st->orig_map, st->buffer_map, st->xy_coo[k].x, st->xy_coo[k].y, st->fast_from);
 
-# ifdef HAVE_XSHM_EXTENSION
-       if (st->use_shm)
-               XShmPutImage(st->dpy, st->window, st->gc, st->buffer_map, 0, 0, st->xy_coo[k].x, st->xy_coo[k].y,
-                               2*st->radius+st->speed+2, 2*st->radius+st->speed+2, False);
-       else
-
-       if (!st->use_shm)
-# endif
-               XPutImage(st->dpy, st->window, st->gc, st->buffer_map, 0, 0, st->xy_coo[k].x, st->xy_coo[k].y,
-                               2*st->radius+st->speed+2, 2*st->radius+st->speed+2);
-
+       put_xshm_image(st->dpy, st->window, st->gc, st->buffer_map, 0, 0, st->xy_coo[k].x, st->xy_coo[k].y,
+                      2*st->radius+st->speed+2, 2*st->radius+st->speed+2, &st->shm_info);
 }
 
 
@@ -833,7 +797,7 @@ distort_free (Display *dpy, Window window, void *closure)
   XFreeGC (st->dpy, st->gc);
   if (st->pm) XFreePixmap (dpy, st->pm);
   if (st->orig_map) XDestroyImage (st->orig_map);
-  if (st->buffer_map) XDestroyImage (st->buffer_map);
+  if (st->buffer_map) destroy_xshm_image (st->dpy, st->buffer_map, &st->shm_info);
   if (st->from) free (st->from);
   if (st->fast_from) free (st->fast_from);
   if (st->from_array) free (st->from_array);
index 2fab3cc80f1f1878679c96e7a65d0cf5bd39f815..e24a40ee04e8a69e859491c52664b9aadce96adb 100644 (file)
@@ -39,6 +39,7 @@ static const char sccsid[] = "@(#)drift.c     5.00 2000/11/01 xlockmore";
                                  "*ignoreRotation: True \n" \
 
 # define SMOOTH_COLORS
+# define release_drift 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 # include "erase.h"
 #else /* STANDALONE */
@@ -81,7 +82,7 @@ ENTRYPOINT ModeSpecOpt drift_opts =
 
 #ifdef USE_MODULES
 ModStruct   drift_description =
-{"drift", "init_drift", "draw_drift", "release_drift",
+{"drift", "init_drift", "draw_drift", (char *) NULL,
  "refresh_drift", "init_drift", (char *) NULL, &drift_opts,
  10000, 30, 1, 1, 64, 1.0, "",
  "Shows cosmic drifting flame fractals", 0, NULL};
@@ -269,8 +270,9 @@ pick_df_coefs(ModeInfo * mi)
 }
 
 static void
-free_drift(driftstruct *dp)
+free_drift(ModeInfo * mi)
 {
+       driftstruct *dp = &drifts[MI_SCREEN(mi)];
        if (dp->ncpoints != NULL) {
                (void) free((void *) dp->ncpoints);
                dp->ncpoints = (int *) NULL;
@@ -295,14 +297,14 @@ initfractal(ModeInfo * mi)
        if (!dp->ncpoints) {
                if ((dp->ncpoints = (int *) malloc(sizeof (int) * MI_NCOLORS(mi))) ==
                        NULL) {
-                       free_drift(dp);
+                       free_drift(mi);
                        return;
                }
        }
        if (!dp->cpts) {
                if ((dp->cpts = (XPoint *) malloc(MAXBATCH2 * sizeof (XPoint) *
                         MI_NCOLORS(mi))) == NULL) {
-                       free_drift(dp);
+                       free_drift(mi);
                        return;
                }
        }
@@ -348,11 +350,7 @@ init_drift(ModeInfo * mi)
 {
        driftstruct *dp;
 
-       if (drifts == NULL) {
-               if ((drifts = (driftstruct *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (driftstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, drifts, free_drift);
        dp = &drifts[MI_SCREEN(mi)];
 
        dp->width = MI_WIDTH(mi);
@@ -670,19 +668,6 @@ draw_drift(ModeInfo * mi)
        }
 }
 
-ENTRYPOINT void
-release_drift(ModeInfo * mi)
-{
-       if (drifts != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_drift(&drifts[screen]);
-               (void) free((void *) drifts);
-               drifts = (driftstruct *) NULL;
-       }
-}
-
 ENTRYPOINT void
 reshape_drift(ModeInfo * mi, int width, int height)
 {
index e50d8194b2c6ef3d00df79676f8d16a6a305c18c..f804e427834a19b48499a00cfb1f6b66de8863b4 100644 (file)
@@ -50,6 +50,7 @@ static const char sccsid[] = "@(#)euler2d.c   5.00 2000/11/01 xlockmore";
                                        "*ignoreRotation: True \n" \
 
 # define SMOOTH_COLORS
+# define release_euler2d 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
 # include "xlock.h"            /* in xlockmore distribution */
@@ -89,7 +90,7 @@ ENTRYPOINT ModeSpecOpt euler2d_opts =
 
 #ifdef USE_MODULES
 ModStruct   euler2d_description = {
-       "euler2d", "init_euler2d", "draw_euler2d", "release_euler2d",
+       "euler2d", "init_euler2d", "draw_euler2d", (char *) NULL,
        "refresh_euler2d", "init_euler2d", (char *) NULL, &euler2d_opts,
        1000, 1024, 3000, 1, 64, 1.0, "",
        "Simulates 2D incompressible invisid fluid.", 0, NULL
@@ -480,11 +481,12 @@ ode_solve(euler2dstruct *sp)
 
 #define deallocate(p,t) if (p!=NULL) {(void) free((void *) p); p=(t*)NULL; }
 #define allocate(p,t,s) if ((p=(t*)malloc(sizeof(t)*s))==NULL)\
-{free_euler2d(sp);return;}
+{free_euler2d(mi);return;}
 
 static void
-free_euler2d(euler2dstruct *sp)
+free_euler2d(ModeInfo * mi)
 {
+       euler2dstruct *sp = &euler2ds[MI_SCREEN(mi)];
        deallocate(sp->csegs, XSegment);
        deallocate(sp->old_segs, XSegment);
        deallocate(sp->nold_segs, int);
@@ -520,11 +522,7 @@ init_euler2d (ModeInfo * mi)
        delta_t = 0.001;
         if (power>1.0) delta_t *= pow(0.1,power-1);
 
-       if (euler2ds == NULL) {
-               if ((euler2ds = (euler2dstruct *) calloc(MI_NUM_SCREENS(mi),
-                                              sizeof (euler2dstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, euler2ds, free_euler2d);
        sp = &euler2ds[MI_SCREEN(mi)];
 
 #ifdef HAVE_JWXYZ
@@ -552,8 +550,6 @@ init_euler2d (ModeInfo * mi)
        /* Clear the background. */
        MI_CLEARWINDOW(mi);
         
-       free_euler2d(sp);
-
        /* Allocate memory. */
 
        if (sp->csegs == NULL) {
@@ -863,19 +859,6 @@ reshape_euler2d(ModeInfo * mi, int width, int height)
   init_euler2d (mi);
 }
 
-ENTRYPOINT void
-release_euler2d (ModeInfo * mi)
-{
-       if (euler2ds != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_euler2d(&euler2ds[screen]);
-               (void) free((void *) euler2ds);
-               euler2ds = (euler2dstruct *) NULL;
-       }
-}
-
 ENTRYPOINT void
 refresh_euler2d (ModeInfo * mi)
 {
index 25fe734325770a3d29709aab4e14b48fd35dacb1..093941efd55faf61b10309eb0254757ddbae1287 100644 (file)
@@ -39,6 +39,7 @@ static const char sccsid[] = "@(#)fadeplot.c  5.00 2000/11/01 xlockmore";
 
 # define BRIGHT_COLORS
 # define UNIFORM_COLORS
+# define release_fadeplot 0
 # define fadeplot_handle_event 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
@@ -52,7 +53,7 @@ ENTRYPOINT ModeSpecOpt fadeplot_opts =
 
 #ifdef USE_MODULES
 ModStruct   fadeplot_description =
-{"fadeplot", "init_fadeplot", "draw_fadeplot", "release_fadeplot",
+{"fadeplot", "init_fadeplot", "draw_fadeplot", (char *) NULL,
  "refresh_fadeplot", "init_fadeplot", (char *) NULL, &fadeplot_opts,
  30000, 10, 1500, 1, 64, 0.6, "",
  "Shows a fading plot of sine squared", 0, NULL};
@@ -75,8 +76,9 @@ typedef struct {
 static fadeplotstruct *fadeplots = (fadeplotstruct *) NULL;
 
 static void
-free_fadeplot(fadeplotstruct *fp)
+free_fadeplot(ModeInfo * mi)
 {
+       fadeplotstruct *fp = &fadeplots[MI_SCREEN(mi)];
        if (fp->pts != NULL) {
                (void) free((void *) fp->pts);
                fp->pts = (XPoint *) NULL;
@@ -96,7 +98,7 @@ initSintab(ModeInfo * mi)
 
        fp->angles = NRAND(950) + 250;
        if ((fp->stab = (int *) malloc(fp->angles * sizeof (int))) == NULL) {
-               free_fadeplot(fp);
+               free_fadeplot(mi);
                return False;
        }
        for (i = 0; i < fp->angles; i++) {
@@ -111,11 +113,7 @@ init_fadeplot (ModeInfo * mi)
 {
        fadeplotstruct *fp;
 
-       if (fadeplots == NULL) {
-               if ((fadeplots = (fadeplotstruct *) calloc(MI_NUM_SCREENS(mi),
-                                          sizeof (fadeplotstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, fadeplots, free_fadeplot);
        fp = &fadeplots[MI_SCREEN(mi)];
 
        fp->width = MI_WIDTH(mi);
@@ -143,7 +141,7 @@ init_fadeplot (ModeInfo * mi)
        if (fp->pts == NULL) {
                if ((fp->pts = (XPoint *) calloc(fp->maxpts, sizeof (XPoint))) ==
                                 NULL) {
-                       free_fadeplot(fp);
+                       free_fadeplot(mi);
                        return;
                }
        }
@@ -228,19 +226,6 @@ refresh_fadeplot (ModeInfo * mi)
 {
 }
 
-ENTRYPOINT void
-release_fadeplot (ModeInfo * mi)
-{
-       if (fadeplots != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_fadeplot(&fadeplots[screen]);
-               (void) free((void *) fadeplots);
-               fadeplots = (fadeplotstruct *) NULL;
-       }
-}
-
 XSCREENSAVER_MODULE ("FadePlot", fadeplot)
 
 #endif /* MODE_fadeplot */
index 43157751415f3b7c128f88b4bec3ff9b2c793d8f..e6cd3d8f2c97764be6e171e5948b18e4394508d0 100644 (file)
@@ -38,6 +38,7 @@ static const char sccsid[] = "@(#)fiberlamp.c 5.00 2000/11/01 xlockmore";
                                        "*fpsTop: true  \n" \
 
 # define UNIFORM_COLORS
+# define release_fiberlamp 0
 # define fiberlamp_handle_event 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
@@ -51,7 +52,7 @@ ENTRYPOINT ModeSpecOpt fiberlamp_opts =
 
 #ifdef USE_MODULES
 ModStruct   fiberlamp_description =
-{"fiberlamp", "init_fiberlamp", "draw_fiberlamp", "release_fiberlamp",
+{"fiberlamp", "init_fiberlamp", "draw_fiberlamp", (char *) NULL,
  "draw_fiberlamp", "change_fiberlamp", (char *) NULL, &fiberlamp_opts,
  1000, 500, 10000, 0, 64, 1.0, "", "Shows a Fiber Optic Lamp", 0, NULL};
 
@@ -142,8 +143,9 @@ free_fiber(fiberlampstruct *fl)
 }
 
 static void
-free_fiberlamp(ModeInfo *mi, fiberlampstruct *fl)
+free_fiberlamp(ModeInfo *mi)
 {
+    fiberlampstruct *fl = &fiberlamps[MI_SCREEN(mi)];
        if (fl->buffer != None && fl->dbufp) {
                 XFreePixmap(MI_DISPLAY(mi), fl->buffer);
                 fl->buffer = None;
@@ -156,12 +158,7 @@ init_fiberlamp(ModeInfo * mi)
 {
   fiberlampstruct *fl;
 
-  if (fiberlamps == NULL) {
-       if ((fiberlamps =
-                (fiberlampstruct *) calloc(MI_NUM_SCREENS(mi),
-                       sizeof (fiberlampstruct))) == NULL)
-         return;
-  }
+  MI_INIT (mi, fiberlamps, free_fiberlamp);
   fl = &fiberlamps[MI_SCREEN(mi)];
 
   /* Create or Resize double buffer */
@@ -178,7 +175,7 @@ init_fiberlamp(ModeInfo * mi)
     fl->buffer = XCreatePixmap(MI_DISPLAY(mi), MI_WINDOW(mi),
                                MI_WIDTH(mi), MI_HEIGHT(mi), MI_DEPTH(mi));
     if (fl->buffer == None) {
-      free_fiberlamp(mi, fl);
+      free_fiberlamp(mi);
       return;
     }
   } else {
@@ -197,7 +194,7 @@ init_fiberlamp(ModeInfo * mi)
   /* Allocate fibers */
   if((fl->fiber =
          (fiberstruct*) calloc(fl->nfibers, sizeof (fiberstruct))) == NULL) {
-       free_fiberlamp(mi, fl);
+       free_fiberlamp(mi);
        return;
   } else {
        int f;
@@ -207,7 +204,7 @@ init_fiberlamp(ModeInfo * mi)
                  (nodestruct*) calloc(NODES, sizeof (nodestruct))) == NULL
                 ||(fs->draw =
                        (XPoint*) calloc(NODES, sizeof (XPoint))) == NULL) {
-               free_fiberlamp(mi, fl);
+               free_fiberlamp(mi);
                return;
          }
        }
@@ -449,19 +446,6 @@ draw_fiberlamp (ModeInfo * mi)
   }
 }
 
-ENTRYPOINT void
-release_fiberlamp(ModeInfo * mi)
-{
-       if (fiberlamps != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_fiberlamp(mi, &fiberlamps[screen]);
-               free(fiberlamps);
-               fiberlamps = (fiberlampstruct *) NULL;
-       }
-}
-
 ENTRYPOINT void
 refresh_fiberlamp(ModeInfo * mi)
 {
index db1c8d8168a658096cea796f3b7b18603f59de57..faf3745e23a160240ba3f391e85c20861ee86efe 100644 (file)
@@ -143,8 +143,8 @@ static void render_light_map(struct state *st, fireshell *fs)
        {
                for (x = 0; x < st->width; x += 2, v += SHELLCOUNT)
                {
-                       float f;
-                       f = sqrtf((fs->cx - x) * (fs->cx - x) + (fs->cy - y) * (fs->cy - y)) + 4.0;
+                       double f;
+                       f = sqrt((fs->cx - x) * (fs->cx - x) + (fs->cy - y) * (fs->cy - y)) + 4.0;
                        f = FLASH_ZOOM / f;
                        f += pow(f,0.1) * frand(0.0001); /* dither */
                        st->light_map[v] = f;
index 92e6f1765c7bb6d57ee49f9eac99c33157c38392..72c1bbb99312a767ca458e06dd232dda8592564b 100644 (file)
@@ -432,11 +432,7 @@ init_flag(ModeInfo * mi)
        int         size = MI_SIZE(mi);
        flagstruct *fp;
 
-       if (flags == NULL) {
-               if ((flags = (flagstruct *) calloc(MI_NUM_SCREENS(mi),
-                                              sizeof (flagstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, flags, 0);
        fp = &flags[MI_SCREEN(mi)];
 
        make_flag_bits(mi);
index cfbc2b1e501d6d371332e57bc18887bfa216be9f..df9aadc366efc82d5866e3e75c18a3d0b2e849fc 100644 (file)
@@ -102,6 +102,7 @@ static const char sccsid[] = "@(#)flow.c    5.00 2000/11/01 xlockmore";
                                        "*cycles:      10000 \n" \
                                        "*ncolors:     200   \n"
 
+# define release_flow 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
 # include "xlock.h"            /* in xlockmore distribution */
@@ -385,11 +386,12 @@ Iterate(dvector *p, dvector(*ODE)(Par par, double x, double y, double z),
 
 #define deallocate(p,t) if (p!=NULL) {free(p); p=(t*)NULL; }
 #define allocate(p,t,s) if ((p=(t*)malloc(sizeof(t)*s))==NULL)\
-{free_flow(sp);return;}
+{free_flow(mi);return;}
 
 static void
-free_flow(flowstruct *sp)
+free_flow(ModeInfo * mi)
 {
+       flowstruct *sp = &flows[MI_SCREEN(mi)];
        deallocate(sp->csegs, XSegment);
        deallocate(sp->cnsegs, int);
        deallocate(sp->old_segs, XSegment);
@@ -624,11 +626,7 @@ init_flow (ModeInfo * mi)
        flowstruct *sp;
        char       *name;
        
-       if (flows == NULL) {
-               if ((flows = (flowstruct *) calloc(MI_NUM_SCREENS(mi),
-                                                                                  sizeof (flowstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, flows, free_flow);
        sp = &flows[MI_SCREEN(mi)];
 
        sp->count2 = 0;
@@ -770,7 +768,6 @@ init_flow (ModeInfo * mi)
 
        sp->count2 = 0; /* Reset search */
 
-       free_flow(sp);
        sp->beecount = MI_COUNT(mi);
        if (!sp->beecount) {
                sp->beecount = 1; /* The camera requires 1 or more */
@@ -1206,19 +1203,6 @@ reshape_flow(ModeInfo * mi, int width, int height)
 }
 
 
-ENTRYPOINT void
-release_flow (ModeInfo * mi)
-{
-       if (flows != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_flow(&flows[screen]);
-               free(flows);
-               flows = (flowstruct *) NULL;
-       }
-}
-
 ENTRYPOINT void
 refresh_flow (ModeInfo * mi)
 {
index 89305f5cbc518335f58c4d177165bda72dec692a..263393a282ea0fd6ab1c6ba681172a0e6d943808 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2003-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2003-2017 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
@@ -164,6 +164,34 @@ pick_font_size (state *s)
 }
 
 
+#ifdef HAVE_JWXYZ
+
+static char *
+append_font_name(Display *dpy, char *dest, const XFontStruct *font)
+{
+  int i;
+  for (i = 0; i != font->n_properties; ++i) {
+    if (font->properties[i].name == XA_FONT) {
+      const char *suffix = XGetAtomName (dpy, font->properties[i].card32);
+      strcpy(dest, suffix);
+      return dest + strlen(suffix);
+    }
+  }
+
+  dest[0] = '?';
+  dest[1] = 0;
+  return dest + 1;
+
+/*
+  float s;
+  const char *n = jwxyz_nativeFontName (font->fid, &s);
+  return dest + sprintf (dest, "%s %.1f", n, s);
+ */
+}
+
+#endif
+
+
 /* Finds the set of scalable fonts on the system; picks one;
    and loads that font in a random pixel size.
    Returns False if something went wrong.
@@ -367,9 +395,12 @@ pick_font_1 (state *s, sentence *se)
   strcpy (pattern2, pattern);
 # ifdef HAVE_JWXYZ
   {
-    float s;
-    const char *n = jwxyz_nativeFontName (se->xftfont->xfont->fid, &s);
-    sprintf (pattern2 + strlen(pattern2), " (%s %.1f)", n, s);
+    char *out = pattern2 + strlen(pattern2);
+    out[0] = ' ';
+    out[1] = '(';
+    out = append_font_name (s->dpy, out + 2, se->xftfont->xfont);
+    out[0] = ')';
+    out[1] = 0;
   }
 # endif
 
@@ -1622,11 +1653,7 @@ fontglide_draw_metrics (state *s)
 
   strcpy (fn2, fn);
 # ifdef HAVE_JWXYZ
-  {
-    float ss;
-    const char *n = jwxyz_nativeFontName (s->metrics_xftfont->xfont->fid, &ss);
-    sprintf (fn2, "%s %.1f", n, ss);
-  }
+  append_font_name (s->dpy, fn2, s->metrics_xftfont->xfont);
 # endif
 
   xftdraw = XftDrawCreate (s->dpy, dest, s->xgwa.visual,
index 23392c741da996ef2fc06d8d7f10baf0f6832b3e..bd1e0cea694d389bfa4be2f4ac38d2a79f458124 100644 (file)
@@ -33,6 +33,7 @@
 
 # include "xlockmore.h"     /* from the xscreensaver distribution */
 # define refresh_trees 0
+# define release_trees 0
 # define reshape_trees 0
 # define trees_handle_event 0
 #else  /* !STANDALONE */
@@ -68,17 +69,12 @@ static long colorV[12] = {0x0a0000, 0x0a0500, 0x0a0a00, 0x050a00,
 ENTRYPOINT void
 init_trees(ModeInfo * mi)
 {
-       unsigned long                   pixels[20];
   treestruct       *tree;
   Display          *display = MI_DISPLAY(mi);
   GC                gc = MI_GC(mi);
   int               i;
 
   if (trees == NULL) {
-    trees = (treestruct *) calloc(MI_NUM_SCREENS(mi), sizeof (treestruct));
-    if (trees == NULL) {
-      return;
-    }
                
     if (mi->npixels > 20) {
                        printf("%d colors selected. Setting limit to 20...\n", mi->npixels);
@@ -117,6 +113,8 @@ init_trees(ModeInfo * mi)
     XSetForeground(display, gc, colors[1].pixel);
   }
 
+  MI_INIT (mi, trees, 0);
+
   XClearWindow(display, MI_WINDOW(mi));
   XSetLineAttributes(display, gc, 2, LineSolid, CapButt, JoinMiter);
   tree = &trees[MI_SCREEN(mi)];
@@ -132,12 +130,7 @@ init_trees(ModeInfo * mi)
     colors[i].flags = DoRed | DoGreen | DoBlue;
   }
 
-       for (i = 0; i < color; i++)
-               pixels[i] = colors[i].pixel;
-                       
-  XFreeColors(display, mi->xgwa.colormap, pixels, mi->npixels, 0L);
-
-       for (i = 0; i < mi->npixels; i++)
+  for (i = 0; i < mi->npixels; i++)
     if (!XAllocColor(display, mi->xgwa.colormap, &colors[i])) break;
 
   color = i;
@@ -248,13 +241,4 @@ draw_trees(ModeInfo * mi)
 }
 
 
-ENTRYPOINT void
-release_trees(ModeInfo * mi)
-{
-  if (trees != NULL) {
-    (void) free((void *) trees);
-    trees = NULL;
-  }
-}
-
 XSCREENSAVER_MODULE_2 ("Forest", forest, trees)
index b8fbd0c4ce8db57ba5a251fa46b4b8be2ee40706..7f72af5b2ccb22b0aee64cb6c13af4805341d13f 100644 (file)
@@ -48,6 +48,7 @@ static const char sccsid[] = "@(#)galaxy.c 4.04 97/07/28 xlockmore";
                                        "*ignoreRotation: True \n" \
 
 # define UNIFORM_COLORS
+# define release_galaxy 0
 # include "xlockmore.h"    /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"     /* from the xlockmore distribution */
@@ -158,8 +159,9 @@ x-axis */
 static unistruct *universes = NULL;
 
 static void
-free_galaxies(unistruct * gp)
+free_galaxies(ModeInfo * mi)
 {
+ unistruct  *gp = &universes[MI_SCREEN(mi)];
  if (gp->galaxies != NULL) {
   int         i;
 
@@ -191,7 +193,7 @@ startover(ModeInfo * mi)
  gp->rot_x = 0;
 
  if (MI_BATCHCOUNT(mi) < -MINGALAXIES)
-  free_galaxies(gp);
+  free_galaxies(mi);
  gp->ngalaxies = MI_BATCHCOUNT(mi);
  if (gp->ngalaxies < -MINGALAXIES)
   gp->ngalaxies = NRAND(-gp->ngalaxies - MINGALAXIES + 1) + MINGALAXIES;
@@ -306,11 +308,7 @@ init_galaxy(ModeInfo * mi)
 {
  unistruct  *gp;
 
- if (universes == NULL) {
-  if ((universes = (unistruct *) calloc(MI_NUM_SCREENS(mi),
-      sizeof (unistruct))) == NULL)
-   return;
- }
+ MI_INIT (mi, universes, free_galaxies);
  gp = &universes[MI_SCREEN(mi)];
 
 # ifdef HAVE_JWXYZ     /* Don't second-guess Quartz's double-buffering */
@@ -446,19 +444,6 @@ reshape_galaxy(ModeInfo * mi, int width, int height)
   init_galaxy (mi);
 }
 
-ENTRYPOINT void
-release_galaxy(ModeInfo * mi)
-{
- if (universes != NULL) {
-  int         screen;
-
-  for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-   free_galaxies(&universes[screen]);
-  (void) free((void *) universes);
-  universes = NULL;
- }
-}
-
 ENTRYPOINT void
 refresh_galaxy(ModeInfo * mi)
 {
index f788728c212fbfd3e0d06065a962f1d7aa83e099..50ad7225e7a6132b0d4eaea065b04118277cc387 100644 (file)
@@ -80,7 +80,7 @@ UTILDIR_OBJS  = $(UTILS_BIN)/colors.o $(UTILS_BIN)/grabclient.o \
                  $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/xshm.o \
                  $(UTILS_BIN)/textclient.o $(UTILS_BIN)/async_netdb.o \
                  $(UTILS_BIN)/aligned_malloc.o $(UTILS_BIN)/thread_util.o \
-                 $(UTILS_BIN)/spline.o
+                 $(UTILS_BIN)/spline.o $(UTILS_BIN)/pow2.o
 JWXYZ_OBJS     = $(JWXYZ_BIN)/jwzgles.o
 HACKDIR_OBJS   = $(HACK_SRC)/screenhack.o $(UTILS_SRC)/xlockmore.o \
                  $(HACK_SRC)/fps.o
@@ -128,7 +128,7 @@ SRCS                = xscreensaver-gl-helper.c normals.c fps-gl.c \
                  cityflow.c romanboy.c splitflap.c splitflap_obj.c \
                  dymaxionmap.c unicrud.c energystream.c raverhoop.c \
                  hydrostat.c discoball.c cubetwist.c cubestack.c splodesic.c \
-                 hexstrut.c
+                 hexstrut.c vigilance.c seccam.c
 
 OBJS           = xscreensaver-gl-helper.o normals.o fps-gl.o \
                  atlantis.o b_draw.o b_lockglue.o b_sphere.o bubble3d.o \
@@ -173,7 +173,7 @@ OBJS                = xscreensaver-gl-helper.o normals.o fps-gl.o \
                  cityflow.o romanboy.o splitflap.o splitflap_obj.o \
                  dymaxionmap.o unicrud.o energystream.o raverhoop.o \
                  hydrostat.o discoball.o cubetwist.o cubestack.o splodesic.o \
-                 hexstrut.o
+                 hexstrut.o vigilance.o seccam.o
 
 GL_EXES                = cage gears moebius pipes sproingies stairs superquadrics \
                  morph3d rubik atlantis lament bubble3d glplanet pulsar \
@@ -193,7 +193,7 @@ GL_EXES             = cage gears moebius pipes sproingies stairs superquadrics \
                  geodesicgears projectiveplane winduprobot cityflow romanboy \
                  splitflap dymaxionmap unicrud energystream raverhoop \
                  hydrostat discoball cubetwist cubestack splodesic \
-                 hexstrut
+                 hexstrut vigilance
 GLE_EXES       = extrusion
 SUID_EXES      = sonar
 GL_UTIL_EXES   = xscreensaver-gl-helper
@@ -217,7 +217,7 @@ HACK_OBJS   = $(JWZGLES_OBJS) $(HACK_BIN)/screenhack.o @ANIM_OBJS@ \
                  $(UTILS_BIN)/yarandom.o $(UTILS_BIN)/hsv.o \
                  $(UTILS_BIN)/colors.o $(UTILS_BIN)/async_netdb.o \
                  $(UTILS_BIN)/aligned_malloc.o $(UTILS_BIN)/thread_util.o \
-                 $(UTILS_BIN)/utf8wc.o
+                 $(UTILS_BIN)/utf8wc.o $(UTILS_BIN)/pow2.o
 
 HDRS           = atlantis.h bubble3d.h buildlwo.h e_textures.h xpm-ximage.h \
                  grab-ximage.h tube.h sphere.h boxed.h \
@@ -256,7 +256,7 @@ GL_MEN              = atlantis.man boxed.man bubble3d.man cage.man circuit.man \
                  cityflow.man romanboy.man splitflap.man dymaxionmap.man \
                  unicrud.man energystream.man raverhoop.man hydrostat.man \
                  discoball.man cubetwist.man cubestack.man splodesic.man \
-                 hexstrut.man
+                 hexstrut.man vigilance.man
 MEN            = @GL_MEN@
 RETIRED_MEN    = glforestfire.man
 EXTRAS         = README Makefile.in dxf2gl.pl vrml2gl.pl wfront2gl.pl \
@@ -502,16 +502,17 @@ $(UTILS_BIN)/async_netdb.o:       $(UTILS_SRC)/async_netdb.c
 $(UTILS_BIN)/aligned_malloc.o: $(UTILS_SRC)/aligned_malloc.c
 $(UTILS_BIN)/thread_util.o:    $(UTILS_SRC)/thread_util.c
 $(UTILS_BIN)/spline.o:         $(UTILS_SRC)/spline.c
+$(UTILS_BIN)/pow2.o:           $(UTILS_SRC)/pow2.c
 $(HACK_BIN)/screenhack.o:      $(HACK_SRC)/screenhack.c
 $(HACK_BIN)/xlockmore.o:       $(HACK_SRC)/xlockmore.c
 $(HACK_BIN)/fps.o:             $(HACK_SRC)/fps.c
 
 $(UTILDIR_OBJS):
-       $(MAKE) -C $(UTILS_BIN) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)"
+       cd $(UTILS_BIN) ; $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)"
 $(JWXYZ_OBJS):
-       $(MAKE) -C $(JWXYZ_BIN) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)"
+       cd $(JWXYZ_BIN) ; $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)"
 $(HACKDIR_OBJS):
-       $(MAKE) -C $(HACK_BIN) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)"
+       cd $(HACK_BIN)  ; $(MAKE) $(@F) CC="$(CC)" CFLAGS="$(CFLAGS)"
 
 
 # How we build object files in this directory.
@@ -726,6 +727,13 @@ winduprobot_dxf::
        ./dxf2gl.pl --smooth --layers robot.dxf robot.c
        ./dxf2gl.pl --wireframe robot-wireframe.dxf robot-wireframe.c
 
+CAM_OBJS=seccam.o gllist.o vigilance.o $(HACK_TRACK_OBJS)
+vigilance:                     $(CAM_OBJS)
+       $(CC_HACK) -o $@        $(CAM_OBJS) $(HACK_LIBS)
+
+seccam_dxf::
+       ./dxf2gl.pl --smooth --layers seccam.dxf seccam.c
+
 glslideshow:   glslideshow.o   $(HACK_GRAB_OBJS)
        $(CC_HACK) -o $@ $@.o   $(HACK_GRAB_OBJS) $(HACK_LIBS)
 
@@ -1947,7 +1955,7 @@ glut_swidth.o: $(srcdir)/glutstroke.h
 grab-ximage.o: ../../config.h
 grab-ximage.o: $(srcdir)/grab-ximage.h
 grab-ximage.o: $(UTILS_SRC)/grabscreen.h
-grab-ximage.o: $(UTILS_SRC)/resources.h
+grab-ximage.o: $(UTILS_SRC)/pow2.h
 grab-ximage.o: $(UTILS_SRC)/visual.h
 grab-ximage.o: $(UTILS_SRC)/xshm.h
 hexstrut.o: ../../config.h
@@ -2544,6 +2552,8 @@ sballs.o: $(UTILS_SRC)/yarandom.h
 sballs.o: $(HACK_SRC)/xlockmoreI.h
 sballs.o: $(HACK_SRC)/xlockmore.h
 sballs.o: $(srcdir)/xpm-ximage.h
+seccam.o: ../../config.h
+seccam.o: $(srcdir)/gllist.h
 shark.o: $(srcdir)/atlantis.h
 shark.o: ../../config.h
 shark.o: $(HACK_SRC)/fps.h
@@ -2848,6 +2858,7 @@ teapot.o: $(srcdir)/teapot.h
 texfont.o: ../../config.h
 texfont.o: $(HACK_SRC)/fps.h
 texfont.o: $(srcdir)/texfont.h
+texfont.o: $(UTILS_SRC)/pow2.h
 texfont.o: $(UTILS_SRC)/resources.h
 texfont.o: $(UTILS_SRC)/xft.h
 texfont.o: $(UTILS_SRC)/xshm.h
@@ -2982,6 +2993,23 @@ unknownpleasures.o: $(UTILS_SRC)/xshm.h
 unknownpleasures.o: $(UTILS_SRC)/yarandom.h
 unknownpleasures.o: $(HACK_SRC)/xlockmoreI.h
 unknownpleasures.o: $(HACK_SRC)/xlockmore.h
+vigilance.o: ../../config.h
+vigilance.o: $(HACK_SRC)/fps.h
+vigilance.o: $(srcdir)/gllist.h
+vigilance.o: $(srcdir)/gltrackball.h
+vigilance.o: $(srcdir)/normals.h
+vigilance.o: $(HACK_SRC)/screenhackI.h
+vigilance.o: $(UTILS_SRC)/colors.h
+vigilance.o: $(UTILS_SRC)/grabscreen.h
+vigilance.o: $(UTILS_SRC)/hsv.h
+vigilance.o: $(UTILS_SRC)/resources.h
+vigilance.o: $(UTILS_SRC)/usleep.h
+vigilance.o: $(UTILS_SRC)/visual.h
+vigilance.o: $(UTILS_SRC)/xshm.h
+vigilance.o: $(UTILS_SRC)/yarandom.h
+vigilance.o: $(HACK_SRC)/xlockmoreI.h
+vigilance.o: $(HACK_SRC)/xlockmore.h
+vigilance.o: $(srcdir)/xpm-ximage.h
 voronoi.o: ../../config.h
 voronoi.o: $(HACK_SRC)/fps.h
 voronoi.o: $(HACK_SRC)/screenhackI.h
index a1ffadd569e3ec760deb17f0b855af657039b65b..bb6927d1902cd1b0433ba2cd512c0044d0019178 100644 (file)
@@ -20,6 +20,7 @@
                            "*showFPS: False   \n"
 
 # define refresh_antinspect 0
+# define release_antinspect 0
 #include "xlockmore.h"
 #else
 #include "xlock.h"
@@ -65,7 +66,7 @@ ENTRYPOINT ModeSpecOpt antinspect_opts = {sizeof opts / sizeof opts[0],
 
 #ifdef USE_MODULES
 ModStruct   antinspect_description =
-  {"antinspect", "init_antinspect", "draw_antinspect", "release_antinspect",
+  {"antinspect", "init_antinspect", "draw_antinspect", (char *) NULL,
    "draw_antinspect", "change_antinspect", (char *) NULL, &antinspect_opts,
    1000, 1, 1, 1, 4, 1.0, "",
    "draws some ants", 0, NULL};
@@ -588,15 +589,6 @@ static void pinit(void)
   glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular);
 }
 
-ENTRYPOINT void release_antinspect(ModeInfo * mi) 
-{
-  if(antinspect) {
-       free((void *) antinspect);
-       antinspect = (antinspectstruct *) NULL;
-  }
-  FreeAllGL(mi);
-}
-
 ENTRYPOINT Bool antinspect_handle_event (ModeInfo *mi, XEvent *event) 
 {
   antinspectstruct *mp = &antinspect[MI_SCREEN(mi)];
@@ -613,11 +605,7 @@ ENTRYPOINT void init_antinspect(ModeInfo * mi)
 {
   antinspectstruct *mp;
   
-  if(antinspect == NULL) {
-    if((antinspect = (antinspectstruct *) calloc(MI_NUM_SCREENS(mi),
-                                                sizeof (antinspectstruct))) == NULL)
-      return;
-  }
+  MI_INIT(mi, antinspect, NULL);
   mp = &antinspect[MI_SCREEN(mi)];
   mp->step = NRAND(90);
   mp->ant_position = NRAND(90);
@@ -678,7 +666,7 @@ ENTRYPOINT void draw_antinspect(ModeInfo * mi)
   glRotatef(180.0, 0.0, 1.0, 0.0);
   
   if (!draw_antinspect_strip(mi)) {
-       release_antinspect(mi);
+       MI_ABORT(mi);
        return;
   }
   
index a66c4b5c0b6b3a1741a606beabc5d1d42394566a..229257b9576fc7680ab606e862ce8eabf6d8fa01 100644 (file)
@@ -26,6 +26,7 @@ static const char sccsid[] = "@(#)antmaze.c   5.01 2001/03/01 xlockmore";
                        "*fpsSolid:     True    \n"
 
 # define refresh_antmaze 0
+# define release_antmaze 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
 # include "xlock.h"            /* from the xlockmore distribution */
@@ -81,7 +82,7 @@ ENTRYPOINT ModeSpecOpt antmaze_opts =
 
 #ifdef USE_MODULES
 ModStruct   antmaze_description =
-{"antmaze", "init_antmaze", "draw_antmaze", "release_antmaze",
+{"antmaze", "init_antmaze", "draw_antmaze", NULL,
  "draw_antmaze", "change_antmaze", NULL, &antmaze_opts,
  1000, 1, 1, 1, 4, 1.0, "",
  "draws some ants", 0, NULL};
@@ -1287,15 +1288,6 @@ static void pinit(antmazestruct *mp)
 /*   glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular); */
 }
 
-ENTRYPOINT void release_antmaze(ModeInfo * mi) 
-{
-  if(antmaze) {
-       free((void *) antmaze);
-       antmaze = (antmazestruct *) NULL;
-  }
-  FreeAllGL(mi);
-}
-
 #define MAX_MAGNIFICATION 10
 #define max(a, b) a < b ? b : a
 #define min(a, b) a < b ? a : b
@@ -1337,11 +1329,7 @@ ENTRYPOINT void init_antmaze(ModeInfo * mi)
 
   antmazestruct *mp;
   
-  if (antmaze == NULL) {
-       if ((antmaze = (antmazestruct *) calloc(MI_NUM_SCREENS(mi),
-                                               sizeof (antmazestruct))) == NULL)
-         return;
-  }
+  MI_INIT(mi, antmaze, NULL);
   mp = &antmaze[MI_SCREEN(mi)];
   mp->step = NRAND(90);
   mp->ant_position = NRAND(90);
@@ -1492,7 +1480,7 @@ ENTRYPOINT void draw_antmaze(ModeInfo * mi)
 
   /* sync */
   if(!draw_antmaze_strip(mi)) {
-    release_antmaze(mi);
+    MI_ABORT(mi);
     return;
   }
 
@@ -1518,7 +1506,7 @@ ENTRYPOINT void draw_antmaze(ModeInfo * mi)
 
   /* sync */
   if(!draw_antmaze_strip(mi)) {
-    release_antmaze(mi);
+    MI_ABORT(mi);
     return;
   }
 
index a049976de0d4683cd1798fac13aa14d338570395..6b3897a360a4717ad374f0b17882f4b170e6dd92 100644 (file)
@@ -20,6 +20,7 @@
                             "*useSHM:  True    \n"
 
 # define refresh_antspotlight 0
+# define release_antspotlight 0
 #include "xlockmore.h"
 #else
 #include "xlock.h"
@@ -49,7 +50,7 @@ ENTRYPOINT ModeSpecOpt antspotlight_opts = {
 #ifdef USE_MODULES
 ModStruct   antspotlight_description = {
   "antspotlight", "init_antspotlight", "draw_antspotlight", 
-  "release_antspotlight", "draw_antspotlight", "change_antspotlight", 
+  (char *) NULL, "draw_antspotlight", "change_antspotlight",
   (char *) NULL, &antspotlight_opts, 1000, 1, 1, 1, 4, 1.0, "",
   "draws an ant scoping the screen", 0, NULL
 };
@@ -617,18 +618,6 @@ static void pinit(void)
   glEnable(GL_DEPTH_TEST);
 }
 
-/* cleanup routine */
-ENTRYPOINT void release_antspotlight(ModeInfo * mi)
-{
-
-  if(antspotlight) {
-    free((void *) antspotlight);
-    antspotlight = (antspotlightstruct *) NULL;
-  }
-
-  FreeAllGL(mi);
-}
-
 #define MAX_MAGNIFICATION 10
 #define max(a, b) a < b ? b : a
 #define min(a, b) a < b ? a : b
@@ -708,11 +697,7 @@ ENTRYPOINT void init_antspotlight(ModeInfo *mi)
 
   antspotlightstruct *mp;
   
-  if(!antspotlight) {
-    if((antspotlight = (antspotlightstruct *) 
-       calloc(MI_NUM_SCREENS(mi), sizeof (antspotlightstruct))) == NULL)
-      return;
-  }
+  MI_INIT(mi, antspotlight, NULL);
   mp = &antspotlight[MI_SCREEN(mi)];
   mp->rot = make_rotator (rot_speed, rot_speed, rot_speed, 1, 0, True);
   mp->trackball = gltrackball_init (False);
index 1d9deab8e92a28253df122c8eeb5f4496d49ddf4..c310a69a770a803be4660df2e9ce0062e9131251 100644 (file)
@@ -112,6 +112,7 @@ static const char sccsid[] = "@(#)atlantis.c        5.08 2003/04/09 xlockmore";
                         "*cycles:       100 \n" \
                         "*size:        6000 \n" \
                         "*wireframe:  False \n"
+# define release_atlantis 0
 # define atlantis_handle_event 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -155,7 +156,7 @@ ENTRYPOINT ModeSpecOpt atlantis_opts =
 
 #ifdef USE_MODULES
 ModStruct   atlantis_description =
-{"atlantis", "init_atlantis", "draw_atlantis", "release_atlantis",
+{"atlantis", "init_atlantis", "draw_atlantis", NULL,
  "refresh_atlantis", "change_atlantis", NULL, &atlantis_opts,
  1000, NUM_SHARKS, SHARKSPEED, SHARKSIZE, 64, 1.0, "",
  "Shows moving sharks/whales/dolphin", 0, NULL};
@@ -434,6 +435,8 @@ AllDisplay(atlantisstruct * ap)
  *-----------------------------------------------------------------------------
  */
 
+static void free_atlantis(ModeInfo * mi);
+
 /*
  *-----------------------------------------------------------------------------
  *    Initialize atlantis.  Called each time the window changes.
@@ -448,11 +451,7 @@ init_atlantis(ModeInfo * mi)
        Display    *display = MI_DISPLAY(mi);
        Window      window = MI_WINDOW(mi);
 
-       if (atlantis == NULL) {
-               if ((atlantis = (atlantisstruct *) calloc(MI_NUM_SCREENS(mi),
-                                          sizeof (atlantisstruct))) == NULL)
-                       return;
-       }
+       MI_INIT(mi, atlantis, free_atlantis);
        ap = &atlantis[screen];
        ap->num_sharks = MI_COUNT(mi);
        if (ap->sharks == NULL) {
@@ -531,28 +530,18 @@ draw_atlantis(ModeInfo * mi)
 /*
  *-----------------------------------------------------------------------------
  *    The display is being taken away from us.  Free up malloc'ed 
- *      memory and X resources that we've alloc'ed.  Only called
- *      once, we must zap everything for every screen.
+ *      memory and X resources that we've alloc'ed.
  *-----------------------------------------------------------------------------
  */
 
-ENTRYPOINT void
-release_atlantis(ModeInfo * mi)
+static void
+free_atlantis(ModeInfo * mi)
 {
 #if 0
-       int         screen;
-
-       if (atlantis != NULL) {
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       atlantisstruct *ap = &atlantis[screen];
+       atlantisstruct *ap = &atlantis[screen];
 
-                       if (ap->sharks)
-                               (void) free((void *) ap->sharks);
-               }
-               (void) free((void *) atlantis);
-               atlantis = NULL;
-       }
-       FreeAllGL(mi);
+       if (ap->sharks)
+               (void) free((void *) ap->sharks);
 #endif
 }
 
index ea43b9bf87151ded310f282935d40bcb96fe0149..8ee10aeb0b78549db06c8ca45c0f04b5927e3fb0 100644 (file)
@@ -44,6 +44,7 @@ static const char sccsid[] = "@(#)atunnel.c   5.13 2004/05/25 xlockmore";
                                                                "*suppressRotationAnimation: True\n" \
 
 # define refresh_atunnel 0
+# define release_atunnel 0
 # define atunnel_handle_event 0
 #define MODE_atunnel
 # include "xlockmore.h"                /* from the xscreensaver distribution */
@@ -118,7 +119,7 @@ ENTRYPOINT ModeSpecOpt atunnel_opts = {countof(opts), opts, countof(vars), vars,
 
 #ifdef USE_MODULES
 ModStruct   atunnel_description =
-{"atunnel", "init_atunnel", "draw_atunnel", "release_atunnel",
+{"atunnel", "init_atunnel", "draw_atunnel", NULL,
  "draw_atunnel", "init_atunnel", NULL, &atunnel_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "OpenGL advanced tunnel screensaver", 0, NULL};
@@ -287,16 +288,15 @@ ENTRYPOINT void draw_atunnel(ModeInfo * mi)
 }
 
 
+static void free_atunnel(ModeInfo * mi);
+
 /* xscreensaver initialization routine */
 ENTRYPOINT void init_atunnel(ModeInfo * mi)
 {
   int screen = MI_SCREEN(mi);
   atunnelstruct *sa;
 
-  if (Atunnel == NULL) {
-       if ((Atunnel = (atunnelstruct *) calloc(MI_NUM_SCREENS(mi), sizeof (atunnelstruct))) == NULL)
-         return;
-  }
+  MI_INIT(mi, Atunnel, free_atunnel);
   sa = &Atunnel[screen];
 
   sa->window = MI_WINDOW(mi);
@@ -310,19 +310,11 @@ ENTRYPOINT void init_atunnel(ModeInfo * mi)
 }
 
 /* all sorts of nice cleanup code should go here! */
-ENTRYPOINT void release_atunnel(ModeInfo * mi)
+static void free_atunnel(ModeInfo * mi)
 {
 #if 0
-  int screen;
-  if (Atunnel != NULL) {
-       for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-      atunnelstruct *sa = &Atunnel[screen];
-      FreeTunnel(sa->ts);
-       }
-       (void) free((void *) Atunnel);
-       Atunnel = NULL;
-  }
-  FreeAllGL(mi);
+  atunnelstruct *sa = &Atunnel[MI_SCREEN(mi)];
+  FreeTunnel(sa->ts);
 #endif
 }
 
index 90880d17fa9fe06ae52b5489342989c5df848fda..a6236c64a9320cf4ec4a664323b8bf1984d8e22d 100644 (file)
@@ -42,6 +42,7 @@ struct glb_config glb_config =
                        "*showFPS:      False   \n"
 
 # define refresh_bubble3d 0
+# define release_bubble3d 0
 # define bubble3d_handle_event 0
 #include "xlockmore.h"
 #else
@@ -79,7 +80,7 @@ ModStruct   bubbles3d_description =
 {"bubbles3d",
  "init_bubble3d",
  "draw_bubble3d",
"release_bubble3d",
NULL,
  "change_bubble3d",
  "init_bubble3d",
  NULL,
@@ -155,6 +156,8 @@ do_display(struct context *c)
        glb_draw_step(c->draw_context);
 }
 
+static void free_bubble3d(ModeInfo * mi);
+
 ENTRYPOINT void
 init_bubble3d(ModeInfo * mi)
 {
@@ -163,12 +166,7 @@ init_bubble3d(ModeInfo * mi)
        int         screen = MI_SCREEN(mi);
        struct context *c;
 
-       if (contexts == 0) {
-               contexts = (struct context *) calloc(sizeof (struct context), MI_NUM_SCREENS(mi));
-
-               if (contexts == 0)
-                       return;
-       }
+       MI_INIT (mi, contexts, free_bubble3d);
        c = &contexts[screen];
        c->glx_context = init_GL(mi);
        init_colors(mi);
@@ -226,20 +224,12 @@ change_bubble3d(ModeInfo * mi)
 }
 #endif /* !STANDALONE */
 
-ENTRYPOINT void
-release_bubble3d(ModeInfo * mi)
+static void
+free_bubble3d(ModeInfo * mi)
 {
-  if (contexts) {
-    int screen;
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-      struct context *c = &contexts[screen];
-      if (c->draw_context)
-        glb_draw_end(c->draw_context);
-    }
-    free (contexts);
-    contexts = 0;
-  }
-  FreeAllGL(mi);
+  struct context *c = &contexts[MI_SCREEN(mi)];
+  if (c->draw_context)
+    glb_draw_end(c->draw_context);
 }
 
 XSCREENSAVER_MODULE ("Bubble3D", bubble3d)
index ba4693815f6d474d64d0eb54881267fae92eb4ac..f90f7feff222822440d491d73e78644cd911eb1e 100644 (file)
@@ -296,11 +296,7 @@ init_ball (ModeInfo *mi)
   int wire = MI_IS_WIREFRAME(mi);
   blinkboxstruct *bp;
   
-  if(blinkbox == NULL) {
-    if((blinkbox = (blinkboxstruct *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (blinkboxstruct))) == NULL)
-      return;
-  }
+  MI_INIT (mi, blinkbox, NULL);
   bp = &blinkbox[MI_SCREEN(mi)];
 
   if ((bp->glx_context = init_GL(mi)) != NULL) {
index 51f2f3db758fd2fdc3472cfb5cb089eca43c76cd..682b64390e05eb8da7e3e99198e9a511b962c6af 100644 (file)
@@ -19,6 +19,7 @@
                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_blocktube 0
+# define release_blocktube 0
 # define blocktube_handle_event 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
@@ -109,7 +110,7 @@ ENTRYPOINT ModeSpecOpt blocktube_opts = {countof(opts), opts, countof(vars), var
 
 #ifdef USE_MODULES
 ModStruct blocktube_description =
-    {"blocktube", "init_blocktube", "draw_blocktube", "release_blocktube",
+    {"blocktube", "init_blocktube", "draw_blocktube", (char *)NULL,
      "draw_blocktube", "init_blocktube", (char *)NULL, &blocktube_opts,
      40000, 30, 1, 1, 64, 1.0, "",
      "A shifting tunnel of reflective blocks", 0, NULL};
@@ -204,6 +205,7 @@ static void tick(blocktube_configuration *lp)
 static int cube_vertices(float x, float y, float z, int wire);
 
 ENTRYPOINT void reshape_blocktube (ModeInfo *mi, int width, int height);
+static void free_blocktube (ModeInfo *mi);
 
 ENTRYPOINT void init_blocktube (ModeInfo *mi)
 {
@@ -212,14 +214,7 @@ ENTRYPOINT void init_blocktube (ModeInfo *mi)
     blocktube_configuration *lp;
     int wire = MI_IS_WIREFRAME(mi);
 
-    if (!lps) {
-      lps = (blocktube_configuration *)
-        calloc (MI_NUM_SCREENS(mi), sizeof (blocktube_configuration));
-      if (!lps) {
-        fprintf(stderr, "%s: out of memory\n", progname);
-        exit(1);
-      }
-    }
+    MI_INIT(mi, lps, free_blocktube);
 
     lp = &lps[MI_SCREEN(mi)];
     lp->glx_context = init_GL(mi);
@@ -294,29 +289,28 @@ ENTRYPOINT void init_blocktube (ModeInfo *mi)
     glFlush();
 }
 
-ENTRYPOINT void release_blocktube (ModeInfo *mi)
+static void free_blocktube (ModeInfo *mi)
 {
-  if (lps) {
-    int screen;
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-      blocktube_configuration *lp = &lps[screen];
+  blocktube_configuration *lp = &lps[MI_SCREEN(mi)];
 # if defined ( I_HAVE_XPM )
-      if (lp->envTexture)
-        glDeleteTextures(1, &lp->envTexture);
-      if (lp->texti)
-        XDestroyImage(lp->texti);
-# endif
-    }
-    free (lps);
-    lps = 0;
+  if (lp->glx_context) {
+    glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(lp->glx_context));
+
+    if (lp->envTexture)
+      glDeleteTextures(1, &lp->envTexture);
+    if (lp->texti)
+      XDestroyImage(lp->texti);
   }
-  FreeAllGL(mi);
+# endif
 }
 
 ENTRYPOINT void reshape_blocktube (ModeInfo *mi, int width, int height)
 {
+    blocktube_configuration *lp = &lps[MI_SCREEN(mi)];
     GLfloat h = (GLfloat) height / (GLfloat) width;
 
+    glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(lp->glx_context));
+
     glViewport(0, 0, (GLint) width, (GLint) height);
     glMatrixMode(GL_PROJECTION);
     glLoadIdentity();
index 0ba3d913199c0d93a516ff940c5305ffb02c23e4..22d512bf808ae1219c323751bfe0967f0d0d3655 100644 (file)
@@ -62,6 +62,8 @@ typedef struct {
   trackball_state *trackball;
   Bool button_down_p;
 
+  GLfloat speed;
+
   GLuint ball_list;
   double ball_x,   ball_y,   ball_z,   ball_th;
   double ball_dx,  ball_dy,  ball_dz,  ball_dth;
@@ -429,10 +431,10 @@ tick_physics (ModeInfo *mi)
   bp->ball_x  += bp->ball_dx;
   if      (bp->ball_x < min) bp->ball_x = min, bp->ball_dx = -bp->ball_dx,
     bp->ball_dth = -bp->ball_dth,
-    bp->ball_dx += (frand(speed/2) - speed);
+    bp->ball_dx += (frand(bp->speed/2) - bp->speed);
   else if (bp->ball_x > max) bp->ball_x = max, bp->ball_dx = -bp->ball_dx,
     bp->ball_dth = -bp->ball_dth,
-    bp->ball_dx += (frand(speed/2) - speed);
+    bp->ball_dx += (frand(bp->speed/2) - bp->speed);
 
   bp->ball_dy += bp->ball_ddy;
   bp->ball_y  += bp->ball_dy;
@@ -500,14 +502,7 @@ init_boing (ModeInfo *mi)
   boing_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (boing_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (boing_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -568,16 +563,16 @@ init_boing (ModeInfo *mi)
 
   glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 
-  speed = speed / 800.0;
+  bp->speed = speed / 800.0;
 
-  bp->ball_dth = (spin ? -speed * 7 * 360 : 0);
+  bp->ball_dth = (spin ? -bp->speed * 7 * 360 : 0);
 
   bp->ball_x   = 0.5 - ((ball_size/2) + frand(1-ball_size));
   bp->ball_y   = 0.2;
-  bp->ball_dx  = speed * 6 + frand(speed);
-  bp->ball_ddy = -speed;
+  bp->ball_dx  = bp->speed * 6 + frand(bp->speed);
+  bp->ball_ddy = -bp->speed;
 
-  bp->ball_dz  = speed * 6 + frand(speed);
+  bp->ball_dz  = bp->speed * 6 + frand(bp->speed);
 
   bp->trackball = gltrackball_init (False);
 }
index 122befa65a41024559dd2d24a1f878c2271ca52c..0773414dd79e737734a4bf1780bb903693d72a50 100644 (file)
@@ -239,14 +239,7 @@ init_cow (ModeInfo *mi)
   int i;
   Bool tex_p = False;
 
-  if (!bps) {
-    bps = (cow_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (cow_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index a7f07d4c313473f489d7bf3cebcde02f6cf99ae1..1791052602042a21944acddc82b25f538883aaa4 100644 (file)
@@ -46,6 +46,7 @@ static const char sccsid[] = "@(#)boxed.c     0.9 01/09/26 xlockmore";
                        "*wireframe: False   \n"
 
 # define refresh_boxed 0
+# define release_boxed 0
 # define boxed_handle_event 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -97,7 +98,7 @@ ENTRYPOINT ModeSpecOpt boxed_opts = {countof(opts), opts, countof(vars), vars, N
 #ifdef USE_MODULES
 
 ModStruct   boxed_description = { 
-     "boxed", "init_boxed", "draw_boxed", "release_boxed",
+     "boxed", "init_boxed", "draw_boxed", NULL,
      "draw_boxed", "init_boxed", NULL, &boxed_opts,
      1000, 1, 2, 1, 4, 1.0, "",
      "Shows GL's boxed balls", 0, NULL};
@@ -1282,6 +1283,8 @@ pinit(ModeInfo * mi)
 
  
 
+static void free_boxed(ModeInfo * mi);
+
 ENTRYPOINT void
 init_boxed(ModeInfo * mi)
 {
@@ -1291,9 +1294,7 @@ init_boxed(ModeInfo * mi)
    /* Boolean     rgba, doublebuffer, cmap_installed; */
    boxedstruct *gp;
 
-   if (boxed == NULL) {
-      if ((boxed = (boxedstruct *) calloc(MI_NUM_SCREENS(mi),sizeof (boxedstruct))) == NULL) return;
-   }
+   MI_INIT(mi, boxed, free_boxed);
    gp = &boxed[screen];
    gp->window = MI_WINDOW(mi);
    
@@ -1334,37 +1335,27 @@ draw_boxed(ModeInfo * mi)
 }
 
 ENTRYPOINT void
-release_boxed(ModeInfo * mi)
+free_boxed(ModeInfo * mi)
 {
+   boxedstruct *gp = &boxed[MI_SCREEN(mi)];
    int i;
+
+   if (gp->glx_context) {
+      /* Display lists MUST be freed while their glXContext is current. */
+      glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context));
    
-   if (boxed != NULL) {
-      int screen;
-      
-      for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-        boxedstruct *gp = &boxed[screen];
-        
-        if (gp->glx_context) {
-           /* Display lists MUST be freed while their glXContext is current. */
-           glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context));
-           
-           if (glIsList(gp->listobjects))
-             glDeleteLists(gp->listobjects, 3);
-           
-           for (i=0;i<gp->bman.num_balls;i++) {
-              if (gp->bman.balls[i].bounced) freetris(&gp->tman[i]);
-           }
-           free (gp->bman.balls);
-           free (gp->tman);
-           free (gp->tex1);
-                
-           
-        }
+      if (glIsList(gp->listobjects))
+        glDeleteLists(gp->listobjects, 3);
+
+      for (i=0;i<gp->bman.num_balls;i++) {
+         if (gp->bman.balls[i].bounced) freetris(&gp->tman[i]);
       }
-      (void) free((void *) boxed);
-      boxed = NULL;
+      free (gp->bman.balls);
+      free (gp->tman);
+      free (gp->tex1);
+
+
    }
-   FreeAllGL(mi);
 }
 
 
index 268d0830c604255b979221fc5d699c54fb3d1ed4..3590f8600f3221b80be4b302d91135d637581fb2 100644 (file)
@@ -83,6 +83,7 @@ static const char sccsid[] = "@(#)cage.c      5.01 2001/03/01 xlockmore";
                                                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_cage 0
+# define release_cage 0
 # define cage_handle_event 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
@@ -103,7 +104,7 @@ ENTRYPOINT ModeSpecOpt cage_opts =
 
 #ifdef USE_MODULES
 ModStruct   cage_description =
-{"cage", "init_cage", "draw_cage", "release_cage",
+{"cage", "init_cage", "draw_cage", NULL,
  "draw_cage", "change_cage", (char *) NULL, &cage_opts,
  25000, 1, 1, 1, 1.0, 4, "",
  "Shows the Impossible Cage, an Escher-like GL scene", 0, NULL};
@@ -381,35 +382,12 @@ pinit(ModeInfo *mi)
        glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular);
 }
 
-ENTRYPOINT void
-release_cage (ModeInfo * mi)
-{
-       if (cage != NULL) {
-               int screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       cagestruct *cp = &cage[screen];
-
-                       if (cp->glx_context) {
-                               cp->glx_context = (GLXContext *) NULL;
-                       }
-               }
-               (void) free((void *) cage);
-               cage = (cagestruct *) NULL;
-       }
-       FreeAllGL(mi);
-}
-
 ENTRYPOINT void
 init_cage (ModeInfo * mi)
 {
        cagestruct *cp;
 
-       if (cage == NULL) {
-               if ((cage = (cagestruct *) calloc(MI_NUM_SCREENS(mi),
-                                              sizeof (cagestruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, cage, NULL);
        cp = &cage[MI_SCREEN(mi)];
 
        cp->step = NRAND(90);
@@ -469,7 +447,7 @@ draw_cage (ModeInfo * mi)
        glRotatef(25 + cos(cp->step * 5) * 6, 1, 0, 0);
        glRotatef(204.5 - sin(cp->step * 5) * 8, 0, 1, 0);
        if (!draw_impossiblecage(mi, cp, MI_IS_WIREFRAME(mi))) {
-               release_cage(mi);
+               MI_ABORT(mi);
                return;
        }
 
index f81bcf540bb7ca56aaefa0381f38091a418910b8..7f7a8da628a267761048e3f9aaecf21a2ea4c06e 100644 (file)
@@ -563,11 +563,7 @@ init_carousel (ModeInfo *mi)
   carousel_state *ss;
   int wire = MI_IS_WIREFRAME(mi);
   
-  if (sss == NULL) {
-    if ((sss = (carousel_state *)
-         calloc (MI_NUM_SCREENS(mi), sizeof(carousel_state))) == NULL)
-      return;
-  }
+  MI_INIT (mi, sss, NULL);
   ss = &sss[screen];
 
   if ((ss->glx_context = init_GL(mi)) != NULL) {
index a0b9c161bf41746e99bd2012d9ee62e906c50967..e5723d5aec417f2c6e387d157ef6312e1fdfa93a 100644 (file)
@@ -36,6 +36,7 @@
                "*componentFont: -*-courier-bold-r-normal-*-*-140-*-*-*-*-*-*"
 
 # define refresh_circuit 0
+# define release_circuit 0
 # define circuit_handle_event 0
 # include "xlockmore.h"                         /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -92,7 +93,7 @@ ENTRYPOINT ModeSpecOpt circuit_opts = {countof(opts), opts, countof(vars), vars,
 
 #ifdef USE_MODULES
 ModStruct   circuit_description =
-{"circuit", "init_circuit", "draw_circuit", "release_circuit",
+{"circuit", "init_circuit", "draw_circuit", NULL,
  "draw_circuit", "init_circuit", NULL, &circuit_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "Flying electronic components", 0, NULL};
@@ -2011,16 +2012,14 @@ ENTRYPOINT void reshape_circuit(ModeInfo *mi, int width, int height)
 }
 
 
+static void free_circuit(ModeInfo *mi);
+
 ENTRYPOINT void init_circuit(ModeInfo *mi)
 {
 int screen = MI_SCREEN(mi);
 Circuit *ci;
 
- if (circuit == NULL) {
-   if ((circuit = (Circuit *) calloc(MI_NUM_SCREENS(mi),
-                                        sizeof(Circuit))) == NULL)
-          return;
- }
+ MI_INIT(mi, circuit, free_circuit);
  ci = &circuit[screen];
  ci->window = MI_WINDOW(mi);
 
@@ -2077,7 +2076,7 @@ ENTRYPOINT void draw_circuit(ModeInfo *mi)
   glXSwapBuffers(disp, w);
 }
 
-ENTRYPOINT void release_circuit(ModeInfo *mi)
+static void free_circuit(ModeInfo *mi)
 {
   Circuit *ci = &circuit[MI_SCREEN(mi)];
   if (ci->font)
index 0199fc338775b5e2d570aa9a6d59a76648c19f27..ae1397d6dad951d91359a9bb9a1495dce04f2698 100644 (file)
@@ -1,4 +1,4 @@
-/* cityflow, Copyright (c) 2014 Jamie Zawinski <jwz@jwz.org>
+/* cityflow, Copyright (c) 2014-2017 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
@@ -182,7 +182,7 @@ cube_handle_event (ModeInfo *mi, XEvent *event)
     {
       reset_colors (mi);
       tweak_cubes (mi);
-      gltrackball_reset (cc->trackball);
+      gltrackball_reset (cc->trackball, 0, 0);
       return True;
     }
 
@@ -290,14 +290,7 @@ init_cube (ModeInfo *mi)
   int i;
   cube_configuration *cc;
 
-  if (!ccs) {
-    ccs = (cube_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (cube_configuration));
-    if (!ccs) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, ccs, NULL);
 
   cc = &ccs[MI_SCREEN(mi)];
 
@@ -305,7 +298,7 @@ init_cube (ModeInfo *mi)
     reshape_cube (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
   }
 
-  cc->trackball = gltrackball_init (True);
+  cc->trackball = gltrackball_init (False);
 
   cc->ncolors = 256;
   cc->colors = (XColor *) calloc(cc->ncolors, sizeof(XColor));
@@ -323,11 +316,12 @@ init_cube (ModeInfo *mi)
       /* Set the size to roughly cover a 2x2 square on average. */
       GLfloat scale = 1.8 / sqrt (cc->ncubes);
       cube *cube = &cc->cubes[i];
+      double th = -(skew ? frand(skew) : 0) * M_PI / 180;
+
       cube->x = (frand(1)-0.5);
       cube->y = (frand(1)-0.5);
 
       cube->z = frand(0.12);
-      double th = -(skew ? frand(skew) : 0) * M_PI / 180;
       cube->cth = cos(th);
       cube->sth = sin(th);
 
@@ -396,6 +390,7 @@ draw_cube (ModeInfo *mi)
 
   glPushMatrix ();
 
+  glRotatef(current_device_rotation(), 0, 0, 1);
   gltrackball_rotate (cc->trackball);
   glRotatef (-180, 1, 0, 0);
 
@@ -404,7 +399,6 @@ draw_cube (ModeInfo *mi)
     glScalef (s, s, s);
   }
   glRotatef (-90, 1, 0, 0);
-  glRotatef(current_device_rotation(), 0, 1, 0);
 
   glTranslatef (-0.18, 0, -0.18);
   glRotatef (37, 1, 0, 0);
index 57f5277554ae88f725e49d819335ffef8278a9b0..10dd959b0cc3fa7451548a2895be70b7196180e9 100644 (file)
@@ -394,14 +394,7 @@ init_cube (ModeInfo *mi)
   int wire = MI_IS_WIREFRAME(mi);
   int i;
 
-  if (!bps) {
-    bps = (cube_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (cube_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 30af9633440d6e6f27c2c4cfa885583a6db5ad26..dcbe481bfa9b47502d36eb2a25784e2d4711f8e6 100644 (file)
@@ -11,6 +11,7 @@
                    "*wireframe:    False       \n" \
 
 # define refresh_crackberg 0
+# define release_crackberg 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -1166,23 +1167,19 @@ static inline double drunken_rando(double cur_val, double max, double width)
  ** */
 
 ENTRYPOINT void reshape_crackberg (ModeInfo *mi, int w, int h);
+static void free_crackberg (ModeInfo *mi);
 
 ENTRYPOINT void init_crackberg (ModeInfo *mi)
 {
     cberg_state *cberg;
 
-    if (!cbergs) {
-        nsubdivs %= 16; /* just in case.. */
+    nsubdivs %= 16; /* just in case.. */
 
-        if ( !(cbergs = calloc(MI_NUM_SCREENS(mi), sizeof(cberg_state)))) {
-            perror(progname);
-            exit(1);
-        }
+    MI_INIT(mi, cbergs, free_crackberg);
 
-        if (visibility > 1.0 || visibility < 0.2) {
-            printf("visibility must be in range [0.2 .. 1.0]\n");
-            visibility = 1.0;
-        }
+    if (visibility > 1.0 || visibility < 0.2) {
+        printf("visibility must be in range [0.2 .. 1.0]\n");
+        visibility = 1.0;
     }
 
     cberg = &cbergs[MI_SCREEN(mi)];
@@ -1460,19 +1457,12 @@ ENTRYPOINT void draw_crackberg (ModeInfo *mi)
 }
 
 /* uh */
-ENTRYPOINT void release_crackberg (ModeInfo *mi)
+static void free_crackberg (ModeInfo *mi)
 {
-  if (cbergs) {
-    int screen;
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-      cberg_state *cberg = &cbergs[screen];
-      if (cberg->norms)
-        free(cberg->norms);
-      free(cberg->heights);
-    }
-    free (cbergs);
-    cbergs = 0;
-  }
+  cberg_state *cberg = &cbergs[MI_SCREEN(mi)];
+  if (cberg->norms)
+    free(cberg->norms);
+  free(cberg->heights);
 }
 
 XSCREENSAVER_MODULE ("Crackberg", crackberg)
index 31a3c6afe2d35dba4f13a26041d4a3e2169f5bfe..0cfd2123f62d80091a42030feaa9293f40b676b2 100644 (file)
@@ -46,6 +46,7 @@
                    "*wireframe:     False         \n"
 
 # define refresh_cube21 0
+# define release_cube21 0
 #include "xlockmore.h"
 
 #include "gltrackball.h"
@@ -128,7 +129,7 @@ ENTRYPOINT ModeSpecOpt cube21_opts = {countof(opts), opts, countof(vars), vars,
 
 #ifdef USE_MODULES
 ModStruct   cube21_description =
-{ "cube21", "init_cube21", "draw_cube21", "release_cube21",
+{ "cube21", "init_cube21", "draw_cube21", NULL,
   "draw_cube21", "change_cube21", NULL, &cube21_opts,
   25000, 1, 1, 1, 1.0, 4, "",
   "Shows randomly shuffling Cube 21", 0, NULL
@@ -869,29 +870,10 @@ cube21_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
-ENTRYPOINT void release_cube21(ModeInfo *mi) 
-{
-  if (cube21 != NULL) {
-    int screen;
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-      cube21_conf *cp = &cube21[screen];
-      if (cp->glx_context) {
-        cp->glx_context = NULL;
-      }
-    }
-    free((void *)cube21);
-    cube21 = NULL;
-  }
-  FreeAllGL(mi);
-}
-
 ENTRYPOINT void init_cube21(ModeInfo *mi) 
 {
   cube21_conf *cp;
-  if(!cube21) {
-    cube21 = (cube21_conf *)calloc(MI_NUM_SCREENS(mi), sizeof(cube21_conf));
-    if(!cube21) return;
-  }
+  MI_INIT(mi, cube21, NULL);
   cp = &cube21[MI_SCREEN(mi)];
 
   cp->trackball = gltrackball_init (False);
@@ -926,7 +908,7 @@ ENTRYPOINT void draw_cube21(ModeInfo * mi)
   mi->polygon_count = 0;
   glXMakeCurrent(display, window, *(cp->glx_context));
   if (!draw_main(mi, cp)) {
-    release_cube21(mi);
+    MI_ABORT(mi);
     return;
   }
   if (MI_IS_FPS(mi)) do_fps (mi);
index d611ac391df2387f54e5cb6ec990d2379458b0f5..95d8b6518d127fe1f9cd8a2daef8784c01d1c194 100644 (file)
@@ -392,14 +392,7 @@ init_cube (ModeInfo *mi)
   cube_configuration *cc;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!ccs) {
-    ccs = (cube_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (cube_configuration));
-    if (!ccs) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, ccs, NULL);
 
   cc = &ccs[MI_SCREEN(mi)];
 
index 072bf9ca7dcee46aff016da8e226ca65fcf29516..ee630dedfc580162fc3cbf802cee53da012ad661 100644 (file)
@@ -347,14 +347,7 @@ init_cube (ModeInfo *mi)
   cube_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (cube_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (cube_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 9c278b135e38c97524cce08f645eae43bebcbf3b..3137c862dcac747a1b8d2e4462233695597d77fc 100644 (file)
@@ -226,14 +226,7 @@ init_cube (ModeInfo *mi)
   int wire = MI_IS_WIREFRAME(mi);
   int i;
 
-  if (!bps) {
-    bps = (cube_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (cube_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
 # ifdef HAVE_JWZGLES
   dbuf_p = True;
index 8205561e723587596f853ce7e7558a65a2fe6c9c..6e11f01faec68d9d3aafebab69ef87bc624873d8 100644 (file)
@@ -1,4 +1,4 @@
-/* cubetwist, Copyright (c) 2016 Jamie Zawinski <jwz@jwz.org>
+/* cubetwist, Copyright (c) 2016-2017 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
@@ -15,6 +15,7 @@
                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_cube 0
+# define release_cube 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -130,7 +131,6 @@ draw_cubes (ModeInfo *mi, cube *c)
   int polys = 0;
   int i, j;
 
-  glPushMatrix();
   glColor4fv (c->color);
   glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, c->color);
 
@@ -153,6 +153,8 @@ draw_cubes (ModeInfo *mi, cube *c)
 
   if (c->next)
     {
+      /* This leaves rotations on the prevailing matrix stack, but since
+         this is a tail-call, that's fine.  Don't blow the matrix stack. */
       glRotatef (c->rot.x, 1, 0, 0);
       glRotatef (c->rot.y, 0, 1, 0);
       glRotatef (c->rot.z, 0, 0, 1);
@@ -161,8 +163,8 @@ draw_cubes (ModeInfo *mi, cube *c)
       c->next->rot = c->rot;
       polys += draw_cubes (mi, c->next);
     }
-  glPopMatrix();
 
+  check_gl_error("cubetwist");
   return polys;
 }
 
@@ -415,20 +417,15 @@ cube_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
+static void free_cube (ModeInfo *mi);
+
 ENTRYPOINT void 
 init_cube (ModeInfo *mi)
 {
   cube_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (cube_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (cube_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, free_cube);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -569,8 +566,8 @@ draw_cube (ModeInfo *mi)
   glXSwapBuffers(dpy, window);
 }
 
-ENTRYPOINT void
-release_cube (ModeInfo *mi)
+static void
+free_cube (ModeInfo *mi)
 {
   cube_configuration *bp = &bps[MI_SCREEN(mi)];
   while (bp->cubes)
index 82a1862b258db5734a445fa4c8b8f793e22a5194..262b4e41bd418bba999eb7eebcbceae5d565cbbd 100644 (file)
@@ -25,6 +25,7 @@
                   "*suppressRotationAnimation: True\n" \
 
 # define refresh_cubicgrid 0
+# define release_cubicgrid 0
 #include "xlockmore.h"
 
 #ifdef USE_GL
@@ -66,7 +67,7 @@ ENTRYPOINT ModeSpecOpt cubicgrid_opts = {countof(opts), opts, countof(vars), var
 
 #ifdef USE_MODULES
 ModStruct   cubicgrid_description =
-{ "cubicgrid", "init_cubicgrid", "draw_cubicgrid", "release_cubicgrid",
+{ "cubicgrid", "init_cubicgrid", "draw_cubicgrid", NULL,
   "draw_cubicgrid", "change_cubicgrid", NULL, &cubicgrid_opts,
   25000, 1, 1, 1, 1.0, 4, "",
   "Shows a rotating 3D lattice from inside", 0, NULL
@@ -201,29 +202,10 @@ ENTRYPOINT void reshape_cubicgrid(ModeInfo *mi, int width, int height)
   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;
-  }
+  MI_INIT(mi, cubicgrid, NULL);
   cp = &cubicgrid[MI_SCREEN(mi)];
 
   if ((cp->glx_context = init_GL(mi)) != NULL) {
@@ -254,7 +236,7 @@ ENTRYPOINT void draw_cubicgrid(ModeInfo * mi)
   if (!cp->glx_context) return;
   glXMakeCurrent(display, window, *(cp->glx_context));
   if (!draw_main(mi)) {
-    release_cubicgrid(mi);
+    MI_ABORT(mi);
     return;
   }
   mi->polygon_count = cp->npoints;
index 030546483f86e48c84f63dca26755225849732a0..ec39fbe34f0b59dfb9ea279453137c6481faae55 100644 (file)
@@ -1,4 +1,4 @@
-/* dangerball, Copyright (c) 2001-2014 Jamie Zawinski <jwz@jwz.org>
+/* dangerball, Copyright (c) 2001-2017 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
@@ -204,15 +204,7 @@ init_ball (ModeInfo *mi)
   ball_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (ball_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (ball_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
-
+  MI_INIT (mi, bps, 0);
   bp = &bps[MI_SCREEN(mi)];
 
   bp->glx_context = init_GL(mi);
index 5e8ee92593a5faeca7c9574a6a81f75846ee7047..015c59a50f5405ed46e64a2d711d98319396885e 100644 (file)
@@ -15,6 +15,7 @@
                        "*wireframe:    False       \n" \
 
 # define refresh_ball 0
+# define release_ball 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -537,20 +538,16 @@ ball_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
+static void free_ball (ModeInfo *mi);
+
+
 ENTRYPOINT void 
 init_ball (ModeInfo *mi)
 {
   ball_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (ball_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (ball_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, free_ball);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -689,8 +686,8 @@ draw_ball (ModeInfo *mi)
 }
 
 
-ENTRYPOINT void
-release_ball (ModeInfo *mi)
+static void
+free_ball (ModeInfo *mi)
 {
   ball_configuration *bp = &bps[MI_SCREEN(mi)];
   while (bp->tiles)
index 1cf6929c046f1049a33484eb6cb1201daf7c65b2..f9a55ef92110418e17858aa47eac1394f578f9cd 100644 (file)
@@ -2790,14 +2790,7 @@ init_logo (ModeInfo *mi)
       exit (1);
     }
 
-  if (!dcs) {
-    dcs = (logo_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (logo_configuration));
-    if (!dcs) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, dcs, NULL);
 
   dc = &dcs[MI_SCREEN(mi)];
 
index b4e8dba50bcb2ccbe60dfc89e8765f6b1a491c97..60fb94f60bcfef835785bf01361b54f11c09ffc5 100644 (file)
@@ -22,6 +22,7 @@
                    "*wireframe:        False   \n" \
                    "*labelFont:  " LABEL_FONT "\n"
 # define refresh_planet 0
+# define release_planet 0
 # include "xlockmore.h"                    /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"                /* from the xlockmore distribution */
@@ -88,7 +89,7 @@ ENTRYPOINT ModeSpecOpt planet_opts = {countof(opts), opts, countof(vars), vars,
 
 #ifdef USE_MODULES
 ModStruct   planet_description =
-{"planet", "init_planet", "draw_planet", "release_planet",
+{"planet", "init_planet", "draw_planet", NULL,
  "draw_planet", "init_planet", NULL, &planet_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "Buckminster Fuller's unwrapped icosahedral globe", 0, NULL};
@@ -769,6 +770,9 @@ planet_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
+static void free_planet (ModeInfo * mi);
+
+
 ENTRYPOINT void
 init_planet (ModeInfo * mi)
 {
@@ -776,11 +780,7 @@ init_planet (ModeInfo * mi)
   int screen = MI_SCREEN(mi);
   Bool wire = MI_IS_WIREFRAME(mi);
 
-  if (planets == NULL) {
-    if ((planets = (planetstruct *) calloc(MI_NUM_SCREENS(mi),
-                                         sizeof (planetstruct))) == NULL)
-      return;
-  }
+  MI_INIT (mi, planets, free_planet);
   gp = &planets[screen];
 
   if ((gp->glx_context = init_GL(mi)) != NULL) {
@@ -1005,28 +1005,17 @@ draw_planet (ModeInfo * mi)
 }
 
 
-ENTRYPOINT void
-release_planet (ModeInfo * mi)
+static void
+free_planet (ModeInfo * mi)
 {
-  if (planets != NULL) {
-    int screen;
-
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-      planetstruct *gp = &planets[screen];
+  planetstruct *gp = &planets[MI_SCREEN(mi)];
 
-      if (gp->glx_context) {
-       /* Display lists MUST be freed while their glXContext is current. */
-       /* but this gets a BadMatch error. -jwz */
-       /*glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(gp->glx_context));*/
+  if (gp->glx_context) {
+    glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(gp->glx_context));
 
-       if (glIsList(gp->starlist))
-         glDeleteLists(gp->starlist, 1);
-      }
-    }
-    (void) free((void *) planets);
-    planets = NULL;
+    if (glIsList(gp->starlist))
+      glDeleteLists(gp->starlist, 1);
   }
-  FreeAllGL(mi);
 }
 
 
index 0aecae2da402d21e5d3c37ea3fe4b0c2a9f935f7..e69a21c0ec3bbcfad70570ee2ebb1c9e55f55a0f 100644 (file)
@@ -21,6 +21,7 @@
                       "*wireframe: False \n" \
 
 # define refresh_chess 0
+# define release_chess 0
 # include "xlockmore.h"
 
 #else
@@ -73,7 +74,7 @@ ENTRYPOINT ModeSpecOpt chess_opts = {countof(opts), opts, countof(vars), vars, N
 
 #ifdef USE_MODULES
 ModStruct   chess_description =
-{"chess", "init_chess", "draw_chess", "release_chess",
+{"chess", "init_chess", "draw_chess", NULL,
  "draw_chess", "init_chess", NULL, &chess_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "Chess", 0, NULL};
@@ -799,9 +800,7 @@ ENTRYPOINT void init_chess(ModeInfo *mi)
   Chesscreen *cs;
   int screen = MI_SCREEN(mi);
 
-  if(!qs && 
-     !(qs = (Chesscreen *) calloc(MI_NUM_SCREENS(mi), sizeof(Chesscreen))))
-    return;
+  MI_INIT(mi, qs, NULL);
   
   cs = &qs[screen];
   cs->window = MI_WINDOW(mi);
@@ -959,16 +958,6 @@ ENTRYPOINT void draw_chess(ModeInfo *mi)
   glXSwapBuffers(disp, w);
 }
 
-/** bust it */
-ENTRYPOINT void release_chess(ModeInfo *mi) 
-{
-  if(qs)
-    free((void *) qs);
-  qs = 0;
-
-  FreeAllGL(mi);
-}
-
 XSCREENSAVER_MODULE_2 ("Endgame", endgame, chess)
 
 #endif
index 642a1a1f21944442276af06bfa6a2769edda7407..3136a2435d5c38dd0c9e819e46c362b5acd3aecd 100644 (file)
@@ -18,6 +18,7 @@
       "*wireframe:    False       \n" \
 
 # define refresh_stream 0
+# define release_stream 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -307,22 +308,15 @@ static void render_flare_stream (flare_stream *s, float cur_time, Vector *vx, Ve
   glEnd ();
 }
 
+static void free_stream (ModeInfo * mi);
+
 ENTRYPOINT void
 init_stream (ModeInfo *mi)
 {
   stream_configuration *es;
   streamtime current_time;
 
-  if (!ess)
-  {
-    ess = (stream_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (stream_configuration));
-    if (!ess)
-    {
-      fprintf (stderr, "%s: out of memory\n", progname);
-      exit (1);
-    }
-  }
+  MI_INIT (mi, ess, free_stream);
 
   es = &ess[MI_SCREEN(mi)];
 
@@ -370,15 +364,14 @@ init_stream (ModeInfo *mi)
   }
 }
 
-ENTRYPOINT void
-release_stream (ModeInfo * mi)
+static void
+free_stream (ModeInfo * mi)
 {
-  int screen;
+  stream_configuration *es = &ess[MI_SCREEN(mi)];
+  int i;
 
-  for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-  {
-    stream_configuration *es = &ess[screen];
-    int i;
+  if (es->glx_context) {
+    glXMakeCurrent (MI_DISPLAY(mi), MI_WINDOW(mi), *(es->glx_context));
 
     for (i = 0; i < es->num_streams; i++) {
       free (es->streams[i].flares);
@@ -387,8 +380,6 @@ release_stream (ModeInfo * mi)
 
     free (es->streams);
   }
-
-  FreeAllGL (mi);
 }
 
 
index 753eff6679dd53b196c53fd15bf31d937288ed46..f26f68d10ae86359885ff8169ed74f3850157cb5 100644 (file)
@@ -28,6 +28,7 @@
        "*titleFont:  -*-helvetica-medium-r-normal-*-*-180-*-*-*-*-*-*\n" \
 
 # define refresh_engine 0
+# define release_engine 0
 # include "xlockmore.h"              /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"                  /* from the xlockmore distribution */
@@ -78,7 +79,7 @@ ENTRYPOINT ModeSpecOpt engine_opts = {countof(opts), opts, countof(vars), vars,
 
 #ifdef USE_MODULES
 ModStruct   engine_description =
-{"engine", "init_engine", "draw_engine", "release_engine",
+{"engine", "init_engine", "draw_engine", NULL,
  "draw_engine", "init_engine", NULL, &engine_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "A four stroke engine", 0, NULL};
@@ -862,11 +863,7 @@ ENTRYPOINT void init_engine(ModeInfo *mi)
   int screen = MI_SCREEN(mi);
   Engine *e;
 
- if (engine == NULL) {
-   if ((engine = (Engine *) calloc(MI_NUM_SCREENS(mi),
-                                        sizeof(Engine))) == NULL)
-          return;
- }
+ MI_INIT(mi, engine, NULL);
  e = &engine[screen];
  e->window = MI_WINDOW(mi);
 
@@ -996,16 +993,6 @@ ENTRYPOINT void draw_engine(ModeInfo *mi)
   glXSwapBuffers(disp, w);
 }
 
-ENTRYPOINT void
-release_engine(ModeInfo *mi) 
-{
-  if (engine != NULL) {
-   (void) free((void *) engine);
-   engine = NULL;
-  }
-  FreeAllGL(mi);
-}
-
 XSCREENSAVER_MODULE ("Engine", engine)
 
 #endif
index 08786b29be7195f45c017eaa1ed7d0dbcfcf3459..c61f27a3ed9d1093ebb03fc05ed75f665bb1b532 100644 (file)
@@ -116,7 +116,7 @@ ENTRYPOINT ModeSpecOpt extrusion_opts = {countof(opts), opts, countof(vars), var
 
 #ifdef USE_MODULES
 ModStruct   extrusion_description =
-{"extrusion", "init_extrusion", "draw_extrusion", "release_extrusion",
+{"extrusion", "init_extrusion", "draw_extrusion", NULL,
  "draw_extrusion", "init_extrusion", NULL, &extrusion_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "OpenGL extrusion", 0, NULL};
@@ -530,11 +530,7 @@ init_extrusion (ModeInfo * mi)
 
   if (MI_IS_WIREFRAME(mi)) do_light = 0;
 
-  if (Extrusion == NULL) {
-       if ((Extrusion = (extrusionstruct *)
-         calloc(MI_NUM_SCREENS(mi), sizeof (extrusionstruct))) == NULL)
-         return;
-  }
+  MI_INIT(mi, Extrusion, NULL);
   gp = &Extrusion[screen];
 
   gp->window = MI_WINDOW(mi);
index 3d35c1e1c277821f26299a3ef66eed4d2bff4b57..02ec2d570266864cbf1ca9c89f732da0bf50fa29 100644 (file)
@@ -44,6 +44,7 @@
                        "*wireframe: False     \n"
 
 # define refresh_flipflop 0
+# define release_flipflop 0
 # include "xlockmore.h"
 
 #else
@@ -94,7 +95,7 @@ ENTRYPOINT ModeSpecOpt flipflop_opts = {countof(opts), opts, countof(vars), vars
 
 #ifdef USE_MODULES
 ModStruct   flipflop_description =
-    {"flipflop", "init_flipflop", "draw_flipflop", "release_flipflop",
+    {"flipflop", "init_flipflop", "draw_flipflop", NULL,
      "draw_flipflop", "init_flipflop", NULL, &flipflop_opts,
      1000, 1, 2, 1, 4, 1.0, "",
      "Flipflop", 0, NULL};
@@ -347,6 +348,8 @@ get_texture(ModeInfo *modeinfo)
                       image_loaded_cb, c);
 }
 
+static void free_flipflop(ModeInfo *mi);
+
 ENTRYPOINT void
 init_flipflop(ModeInfo *mi)
 {
@@ -392,9 +395,7 @@ init_flipflop(ModeInfo *mi)
     screen = MI_SCREEN(mi);
     wire = MI_IS_WIREFRAME(mi);
 
-    if(!qs &&
-       !(qs = (Flipflopcreen *) calloc(MI_NUM_SCREENS(mi), sizeof(Flipflopcreen))))
-        return;
+    MI_INIT(mi, qs, free_flipflop);
 
     c = &qs[screen];
     c->window = MI_WINDOW(mi);
@@ -464,28 +465,14 @@ draw_flipflop(ModeInfo *mi)
 
 }
 
-ENTRYPOINT void
-release_flipflop(ModeInfo *mi)
+static void
+free_flipflop(ModeInfo *mi)
 {
-  if(qs) {
-    int screen;
-
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-    {
-      Flipflopcreen *c = &qs[MI_SCREEN(mi)];
-      if (c->glx_context)
-        c->glx_context = 0;
-      if (c->sheet) {
-        randsheet_free(c->sheet);
-        free (c->sheet);
-        c->sheet = 0;
-      }
-    }
-    free(qs);
-    qs = 0;
+  Flipflopcreen *c = &qs[MI_SCREEN(mi)];
+  if (c->sheet) {
+    randsheet_free(c->sheet);
+    free (c->sheet);
   }
-
-  FreeAllGL(mi);
 }
 
 /*** ADDED RANDSHEET FUNCTIONS ***/
index 8ae26becc842eb7c688f646c84aa3e4bca0f7c73..9bd6995650328eeddb4049edd6812787f740d0e7 100644 (file)
@@ -22,6 +22,7 @@
                 "*suppressRotationAnimation: True\n" \
 
 # define refresh_screenflip 0
+# define release_screenflip 0
 # include "xlockmore.h"                         /* from the xscreensaver distribution */
 # include "gltrackball.h"
 #else  /* !STANDALONE */
@@ -70,7 +71,7 @@ ENTRYPOINT ModeSpecOpt screenflip_opts = {countof(opts), opts, countof(vars), va
 
 #ifdef USE_MODULES
 ModStruct   screenflip_description =
-{"screenflip", "init_screenflip", "draw_screenflip", "release_screenflip",
+{"screenflip", "init_screenflip", "draw_screenflip", NULL,
  "draw_screenflip", "init_screenflip", NULL, &screenflip_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "Screenflips", 0, NULL};
@@ -438,11 +439,7 @@ ENTRYPOINT void init_screenflip(ModeInfo *mi)
   int screen = MI_SCREEN(mi);
   Screenflip *c;
 
- if (screenflip == NULL) {
-   if ((screenflip = (Screenflip *) calloc(MI_NUM_SCREENS(mi),
-                                        sizeof(Screenflip))) == NULL)
-          return;
- }
+ MI_INIT(mi, screenflip, NULL);
  c = &screenflip[screen];
  c->window = MI_WINDOW(mi);
 
@@ -516,15 +513,6 @@ ENTRYPOINT void draw_screenflip(ModeInfo *mi)
   glXSwapBuffers(disp, w);
 }
 
-ENTRYPOINT void release_screenflip(ModeInfo *mi)
-{
-  if (screenflip != NULL) {
-   (void) free((void *) screenflip);
-   screenflip = NULL;
-  }
-  FreeAllGL(mi);
-}
-
 XSCREENSAVER_MODULE_2 ("FlipScreen3D", flipscreen3d, screenflip)
 
 #endif
index 9da9c35c8b5618e998951ceec1ab0968b0a8fd43..d35706cb2a5ad0325c22c865f9341f72f2271c43 100644 (file)
@@ -27,6 +27,7 @@
                 "*program: xscreensaver-text --cols 0"  /* don't wrap */
 
 # define refresh_fliptext 0
+# define release_fliptext 0
 # define fliptext_handle_event 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
@@ -87,6 +88,8 @@ typedef struct {
   texture_font_data *texfont;
   text_data *tc;
 
+  int alignment;
+
   char *buf;
   int buf_size;
   int buf_tail;
@@ -118,7 +121,7 @@ static int max_lines, min_lines;
 static float font_size;
 static int target_columns;
 static char *alignment_str;
-static int alignment, alignment_random_p;
+static int alignment_random_p;
 static GLfloat speed;
 
 static XrmOptionDescRec opts[] = {
@@ -291,8 +294,8 @@ get_one_line (fliptext_configuration *sc)
           {
             char *t = result;
             char *ut = untabify (t);
-            strip (ut, (alignment == 0), 1); /* if centering, strip
-                                                leading whitespace too */
+            strip (ut, (sc->alignment == 0), 1); /* if centering, strip
+                                                    leading whitespace too */
             result = ut;
             free (t);
           }
@@ -428,9 +431,9 @@ draw_line (ModeInfo *mi, line *line)
 
   glRotatef (line->cth, 0, 1, 0);
 
-  if (alignment == 1)
+  if (sc->alignment == 1)
     glTranslatef (-line->width, 0, 0);
-  else if (alignment == 0)
+  else if (sc->alignment == 0)
     glTranslatef (-line->width/2, 0, 0);
 
   glScalef (sc->font_scale, sc->font_scale, sc->font_scale);
@@ -684,11 +687,11 @@ reset_lines (ModeInfo *mi)
     maxh = maxy - miny;
       
   if (alignment_random_p)
-    alignment = (random() % 3) - 1;
+    sc->alignment = (random() % 3) - 1;
 
-  if      (alignment == -1) maxx -= maxw;
-  else if (alignment ==  1) minx += maxw;
-  else                      minx += maxw/2, maxx -= maxw/2;
+  if      (sc->alignment == -1) maxx -= maxw;
+  else if (sc->alignment ==  1) minx += maxw;
+  else                          minx += maxw/2, maxx -= maxw/2;
 
   miny += maxh/2;
   maxy -= maxh/2;
@@ -785,6 +788,9 @@ reshape_fliptext (ModeInfo *mi, int width, int height)
 }
 
 
+static void free_fliptext (ModeInfo *mi);
+
+
 ENTRYPOINT void 
 init_fliptext (ModeInfo *mi)
 {
@@ -792,19 +798,11 @@ init_fliptext (ModeInfo *mi)
 
   fliptext_configuration *sc;
 
-  if (!scs) {
-    scs = (fliptext_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (fliptext_configuration));
-    if (!scs) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-
-    sc = &scs[MI_SCREEN(mi)];
-    sc->lines = (line **) calloc (max_lines+1, sizeof(char *));
-  }
+  MI_INIT(mi, scs, free_fliptext);
 
   sc = &scs[MI_SCREEN(mi)];
+  sc->lines = (line **) calloc (max_lines+1, sizeof(char *));
+
   sc->dpy = MI_DISPLAY(mi);
 
   if ((sc->glx_context = init_GL(mi)) != NULL) {
@@ -872,14 +870,14 @@ init_fliptext (ModeInfo *mi)
   alignment_random_p = False;
   if (!alignment_str || !*alignment_str ||
       !strcasecmp(alignment_str, "left"))
-    alignment = -1;
+    sc->alignment = -1;
   else if (!strcasecmp(alignment_str, "center") ||
            !strcasecmp(alignment_str, "middle"))
-    alignment = 0;
+    sc->alignment = 0;
   else if (!strcasecmp(alignment_str, "right"))
-    alignment = 1;
+    sc->alignment = 1;
   else if (!strcasecmp(alignment_str, "random"))
-    alignment = -1, alignment_random_p = True;
+    sc->alignment = -1, alignment_random_p = True;
 
   else
     {
@@ -984,22 +982,15 @@ draw_fliptext (ModeInfo *mi)
   glXSwapBuffers(dpy, window);
 }
 
-ENTRYPOINT void
-release_fliptext (ModeInfo *mi)
+static void
+free_fliptext (ModeInfo *mi)
 {
-  if (scs) {
-    int screen;
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-      fliptext_configuration *sc = &scs[screen];
-      if (sc->tc)
-        textclient_close (sc->tc);
-
-      /* #### there's more to free here */
-    }
-    free (scs);
-    scs = 0;
-  }
-  FreeAllGL(mi);
+  fliptext_configuration *sc = &scs[MI_SCREEN(mi)];
+  if (sc->tc)
+    textclient_close (sc->tc);
+  free(sc->lines);
+
+  /* #### there's more to free here */
 }
 
 XSCREENSAVER_MODULE ("FlipText", fliptext)
index a778621547e4dd895e9c50b494b9a67362963277..245e9f1b1c1867dfa056818277963c25bc215654 100644 (file)
@@ -168,7 +168,6 @@ void UpdateSmoke_ScalarBase(global_info_t *global, flurry_info_t *flurry, SmokeV
                 if ((((i*4)+k) % flurry->numStreams) == j) {
                     f *= 1.0f + streamBias;
                 }
-                
                 mag = f / (float) sqrt(rsquared);
                 
                 deltax -= (dx * mag);
index 346c1151d0064969b827d7512ff76cd5b1d1347a..e6d1b22699b2eaf28ac3efbf18565c9fadf84007 100644 (file)
@@ -48,6 +48,7 @@ static const char sccsid[] = "@(#)flurry.c    4.07 97/11/24 xlockmore";
                                                "*showFPS:    False \n"
 
 # define refresh_flurry 0
+# define release_flurry 0
 # define flurry_handle_event 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 
@@ -72,7 +73,7 @@ ModStruct   flurry_description = {
     "flurry",
     "init_flurry",
     "draw_flurry",
-    "release_flurry",
+    NULL,
     "draw_flurry",
     "init_flurry",
     NULL,
@@ -90,8 +91,6 @@ ModStruct   flurry_description = {
 
 global_info_t *flurry_info = NULL;
 
-static double gTimeCounter = 0.0;
-
 static
 double currentTime(void) {
   struct timeval tv;
@@ -105,14 +104,8 @@ double currentTime(void) {
   return (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0;
 }
 
-void OTSetup (void) {
-    if (gTimeCounter == 0.0) {
-        gTimeCounter = currentTime();
-    }
-}
-
-double TimeInSecondsSinceStart (void) {
-    return currentTime() - gTimeCounter;
+double TimeInSecondsSinceStart (const global_info_t *global) {
+    return currentTime() - global->gTimeCounter;
 }
 
 #if 0
@@ -150,7 +143,8 @@ flurry_info_t *new_flurry_info(global_info_t *global, int streams, ColorModes co
     flurry->flurryRandomSeed = RandFlt(0.0, 300.0);
 
        flurry->fOldTime = 0;
-       flurry->fTime = TimeInSecondsSinceStart() + flurry->flurryRandomSeed;
+       flurry->dframe = 0;
+       flurry->fTime = TimeInSecondsSinceStart(global) + flurry->flurryRandomSeed;
        flurry->fDeltaTime = flurry->fTime - flurry->fOldTime;
 
     flurry->numStreams = streams;
@@ -231,7 +225,7 @@ void GLRenderScene(global_info_t *global, flurry_info_t *flurry, double b)
     flurry->dframe++;
 
     flurry->fOldTime = flurry->fTime;
-    flurry->fTime = TimeInSecondsSinceStart() + flurry->flurryRandomSeed;
+    flurry->fTime = TimeInSecondsSinceStart(global) + flurry->flurryRandomSeed;
     flurry->fDeltaTime = flurry->fTime - flurry->fOldTime;
 
     flurry->drag = (float) pow(0.9965,flurry->fDeltaTime*85.0);
@@ -332,6 +326,8 @@ ENTRYPOINT void reshape_flurry(ModeInfo *mi, int width, int height)
     GLResize(global, (float)width, (float)height);
 }
 
+static void free_flurry(ModeInfo * mi);
+
 ENTRYPOINT void
 init_flurry(ModeInfo * mi)
 {
@@ -349,15 +345,12 @@ init_flurry(ModeInfo * mi)
         PRESET_MAX
     } preset_num;
 
-    if (flurry_info == NULL) {
-       OTSetup();
-       if ((flurry_info = (global_info_t *) calloc(MI_NUM_SCREENS(mi),
-                       sizeof (global_info_t))) == NULL)
-           return;
-    }
+    MI_INIT (mi, flurry_info, free_flurry);
 
     global = &flurry_info[screen];
 
+    global->gTimeCounter = currentTime();
+
     global->window = MI_WINDOW(mi);
 
     global->flurry = NULL;
@@ -468,13 +461,14 @@ init_flurry(ModeInfo * mi)
     } else {
        MI_CLEARWINDOW(mi);
     }
+
+    global->first = 1;
+    global->oldFrameTime = -1;
 }
 
 ENTRYPOINT void
 draw_flurry(ModeInfo * mi)
 {
-    static int first = 1;
-    static double oldFrameTime = -1;
     double newFrameTime;
     double deltaFrameTime = 0;
     double brite;
@@ -486,7 +480,7 @@ draw_flurry(ModeInfo * mi)
     Window      window = MI_WINDOW(mi);
 
     newFrameTime = currentTime();
-    if (oldFrameTime == -1) {
+    if (global->oldFrameTime == -1) {
        /* special case the first frame -- clear to black */
        alpha = 1.0;
     } else {
@@ -499,24 +493,24 @@ draw_flurry(ModeInfo * mi)
         * than that and the blending causes the display to
         * saturate, which looks really ugly.
         */
-       if (newFrameTime - oldFrameTime < 1/60.0) {
-           usleep(MAX_(1,(int)(20000 * (newFrameTime - oldFrameTime))));
+       if (newFrameTime - global->oldFrameTime < 1/60.0) {
+           usleep(MAX_(1,(int)(20000 * (newFrameTime - global->oldFrameTime))));
            return;
 
        }
-       deltaFrameTime = newFrameTime - oldFrameTime;
+       deltaFrameTime = newFrameTime - global->oldFrameTime;
        alpha = 5.0 * deltaFrameTime;
     }
-    oldFrameTime = newFrameTime;
+    global->oldFrameTime = newFrameTime;
 
     if (alpha > 0.2) alpha = 0.2;
 
     if (!global->glx_context)
        return;
 
-    if (first) {
+    if (global->first) {
        MakeTexture();
-       first = 0;
+       global->first = 0;
     }
     glDrawBuffer(GL_BACK);
     glXMakeCurrent(display, window, *(global->glx_context));
@@ -538,28 +532,19 @@ draw_flurry(ModeInfo * mi)
     glXSwapBuffers(display, window);
 }
 
-ENTRYPOINT void
-release_flurry(ModeInfo * mi)
+static void
+free_flurry(ModeInfo * mi)
 {
-    if (flurry_info != NULL) {
-       int screen;
-
-       for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-           global_info_t *global = &flurry_info[screen];
-           flurry_info_t *flurry;
+    global_info_t *global = &flurry_info[MI_SCREEN(mi)];
+    flurry_info_t *flurry;
 
-           if (global->glx_context) {
-               glXMakeCurrent(MI_DISPLAY(mi), global->window, *(global->glx_context));
-           }
+    if (global->glx_context) {
+       glXMakeCurrent(MI_DISPLAY(mi), global->window, *(global->glx_context));
+    }
 
-           for (flurry = global->flurry; flurry; flurry=flurry->next) {
-               delete_flurry_info(flurry);
-           }
-       }
-       (void) free((void *) flurry_info);
-       flurry_info = NULL;
+    for (flurry = global->flurry; flurry; flurry=flurry->next) {
+       delete_flurry_info(flurry);
     }
-    FreeAllGL(mi);
 }
 
 XSCREENSAVER_MODULE ("Flurry", flurry)
index 14718b64f8265f8929f2b9018c8a6d68f746b93d..9bbe4b2580fb5cbb545d198357eaa42e84492160 100644 (file)
@@ -285,12 +285,15 @@ struct _global_info_t {
        float sys_glWidth;
        float sys_glHeight;
 
+       double gTimeCounter;
+       int first;
+       double oldFrameTime;
+
        flurry_info_t *flurry;
 };
 
 #define kNumSpectrumEntries 512
 
-void OTSetup(void);
-double TimeInSecondsSinceStart(void);
+double TimeInSecondsSinceStart(const global_info_t *global);
 
 #endif /* Include/Define */
index edf1dd64bb4285b86210d0b4a6d0449963df55f5..d53a09ec8cd0c380bf8dba697e4733de3202a8f3 100644 (file)
@@ -397,14 +397,7 @@ init_toasters (ModeInfo *mi)
   int wire = MI_IS_WIREFRAME(mi);
   int i;
 
-  if (!bps) {
-    bps = (toaster_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (toaster_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 1f26cea286f6288da0bcd6d67f1dfd3149337c4d..0c292a2eae8ef04f1d6369c88b71875cad22ec21 100644 (file)
@@ -698,14 +698,7 @@ init_gears (ModeInfo *mi)
   int wire = MI_IS_WIREFRAME(mi);
   int i;
 
-  if (!bps) {
-    bps = (gears_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (gears_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index b22b065eee8d730eb58d6acc58c977e0b12e32ae..6f4ed4bf1af9d261297ea359ea11e51257700d87 100644 (file)
@@ -488,14 +488,7 @@ init_geodesic (ModeInfo *mi)
   geodesic_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (geodesic_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (geodesic_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index dc234809fbda035ad9b5d4b657373b7dec32e844..47acee88fa4606febcabd52031f955a43dc5f989 100644 (file)
@@ -21,6 +21,7 @@
                "*font:  -*-helvetica-medium-r-normal-*-*-160-*-*-*-*-*-*\n" \
 
 # define refresh_geodesic 0
+# define release_geodesic 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -1315,8 +1316,11 @@ make_182 (ModeInfo *mi, const GLfloat *args)
 ENTRYPOINT void
 reshape_geodesic (ModeInfo *mi, int width, int height)
 {
+  geodesic_configuration *bp = &bps[MI_SCREEN(mi)];
   GLfloat h = (GLfloat) height / (GLfloat) width;
 
+  glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context));
+
   glViewport (0, 0, (GLint) width, (GLint) height);
 
   glMatrixMode(GL_PROJECTION);
@@ -1398,6 +1402,7 @@ pick_shape (ModeInfo *mi, time_t last)
 }
 
 
+static void free_geodesic (ModeInfo *mi);
 
 ENTRYPOINT void 
 init_geodesic (ModeInfo *mi)
@@ -1405,14 +1410,7 @@ init_geodesic (ModeInfo *mi)
   geodesic_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (geodesic_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (geodesic_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, free_geodesic);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -1781,10 +1779,13 @@ draw_geodesic (ModeInfo *mi)
   glXSwapBuffers(dpy, window);
 }
 
-ENTRYPOINT void
-release_geodesic (ModeInfo *mi)
+static void
+free_geodesic (ModeInfo *mi)
 {
   geodesic_configuration *bp = &bps[MI_SCREEN(mi)];
+  if (!bp->glx_context)
+    return;
+  glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(bp->glx_context));
   free_texture_font (bp->font);
   free (bp->colors);
   free_sphere_gears (mi);
index 1e6daed2578b16b090439049423b2659e0710ab3..69636f276d18f9a8f436f8b0978565addfda9426 100644 (file)
@@ -47,6 +47,7 @@
                                                                                "*suppressRotationAnimation: True\n" \
 
 # define refresh_gflux 0
+# define release_gflux 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
@@ -168,7 +169,7 @@ ENTRYPOINT ModeSpecOpt gflux_opts = {countof(opts), opts, countof(vars), vars, d
 
 #ifdef USE_MODULES
 ModStruct   gflux_description =
-{"gflux", "init_gflux", "draw_gflux", "release_gflux",
+{"gflux", "init_gflux", "draw_gflux", NULL,
  "draw_gflux", "init_gflux", NULL, &gflux_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "GFlux: an OpenGL gflux", 0, NULL};
@@ -358,11 +359,7 @@ ENTRYPOINT void init_gflux(ModeInfo * mi)
     int screen = MI_SCREEN(mi);
     gfluxstruct *gp;
 
-    if (gfluxes == NULL) {
-        if ((gfluxes = (gfluxstruct *) 
-                 calloc(MI_NUM_SCREENS(mi), sizeof (gfluxstruct))) == NULL)
-            return;
-    }
+    MI_INIT(mi, gfluxes, NULL);
     gp = &gfluxes[screen];
 
     gp->trackball = gltrackball_init (True);
@@ -397,16 +394,6 @@ ENTRYPOINT void init_gflux(ModeInfo * mi)
     }
 }
 
-/* cleanup code */
-ENTRYPOINT void release_gflux(ModeInfo * mi)
-{
-    if (gfluxes != NULL) {
-      free((void *) gfluxes);
-      gfluxes = NULL;
-    }
-    FreeAllGL(mi);
-}
-
 
 static void createTexture(gfluxstruct *gp)
 {
index ab3f6501f0b804e21473886d6c7bbee3e2a5ec6f..3b25456734eba6ae06fcf1479b772b48c92220f8 100644 (file)
@@ -367,14 +367,7 @@ init_glblur (ModeInfo *mi)
   glblur_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (glblur_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (glblur_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 4c651763321d551135236d84b590b7703e99f7f5..c0cbbbf077e983da3a2aa2baf17bb68914dab880 100644 (file)
@@ -37,6 +37,7 @@
 #define NUM_CELL_SHAPES 10
 
 #define refresh_glcells 0
+#define release_glcells 0
 #define glcells_handle_event 0
 
 #define DEF_DELAY     "20000"
@@ -1266,20 +1267,15 @@ reshape_glcells( ModeInfo *mi, int width, int height )
 # endif
 }
 
+static void free_glcells( ModeInfo *mi );
+
 ENTRYPOINT void 
 init_glcells( ModeInfo *mi )
 {
   int i, divisions;
   State *st=0;
   
-  if (!sstate) {
-    sstate = (State *)
-        calloc( MI_NUM_SCREENS(mi), sizeof(State) );
-    if (!sstate) {
-      fprintf( stderr, "%s: out of memory\n", progname );
-      exit(1);
-    }
-  }
+  MI_INIT(mi, sstate, free_glcells);
   st = &sstate[MI_SCREEN(mi)];
   
   st->glx_context = init_GL(mi);
@@ -1367,24 +1363,29 @@ draw_glcells( ModeInfo *mi )
   glXSwapBuffers( dpy, window );
 }
 
-ENTRYPOINT void 
-release_glcells( ModeInfo *mi )
+static void
+free_glcells( ModeInfo *mi )
 {
   int i;
   State *st  = &sstate[MI_SCREEN(mi)];
+
+  if (st->glx_context) {
+    glXMakeCurrent( MI_DISPLAY(mi), MI_WINDOW(mi),
+                    *(st->glx_context) );
   
-  /* nuke everything before exit */
-  if (st->sphere) free_Object( st->sphere );
-  if (st->food)   free( st->food );
-  for (i=0; i<NUM_CELL_SHAPES; ++i) {
-    if (st->cell_list[i] != -1) {
-      glDeleteLists( st->cell_list[i], 1 );
+    /* nuke everything before exit */
+    if (st->sphere) free_Object( st->sphere );
+    if (st->food)   free( st->food );
+    for (i=0; i<NUM_CELL_SHAPES; ++i) {
+      if (st->cell_list[i] != -1) {
+        glDeleteLists( st->cell_list[i], 1 );
+      }
     }
+    if (st->cell) free( st->cell );
+    free( st->disturbance );
+    glDeleteTextures( 1, &st->texture_name );
+    free( st->texture );
   }
-  if (st->cell) free( st->cell );
-  free( st->disturbance );
-  glDeleteTextures( 1, &st->texture_name );
-  free( st->texture );
 }
 
 XSCREENSAVER_MODULE( "GLCells", glcells )
index 184b4e82ae932314f3cd905ff570cd7e887a4f57..dd6533a6779d227c3d38e1e5ebbb4bb696c27e57 100644 (file)
@@ -78,6 +78,7 @@
                "*suppressRotationAnimation: True\n" \
 
 # define refresh_gleidescope 0
+# define release_gleidescope 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
@@ -105,7 +106,7 @@ static Bool         rotate;                 /* rotate in place */
 static Bool            norotate;               /* no rotate in place */
 static Bool            zoom;                   /* zooming camera */
 static Bool            nozoom;                 /* no zooming camera */
-static char            *image;                 /* name of texture to load */
+static char            *image_str;             /* name of texture to load */
 static int             duration;               /* length of time to display grabbed image */
 
 #define MAX_CAM_SPEED                  1.0
@@ -155,7 +156,7 @@ static argtype vars[] = {
        {&norotate,             "norotate",     "noRotate",     DEF_NOROTATE,   t_Bool},
        {&zoom,                 "zoom",         "Zoom",         DEF_ZOOM,       t_Bool},
        {&nozoom,               "nozoom",       "noZoom",       DEF_NOZOOM,     t_Bool},
-       {&image,                "image",        "Image",        DEF_IMAGE,      t_String},
+       {&image_str,            "image",        "Image",        DEF_IMAGE,      t_String},
        {&duration,             "duration",     "Duration",     DEF_DURATION,           t_Int},
 };
 
@@ -181,7 +182,7 @@ ENTRYPOINT ModeSpecOpt gleidescope_opts = {
 
 #ifdef USE_MODULES
 ModStruct   gleidescope_description = { 
-     "gleidescope", "init_gleidescope", "draw_gleidescope", "release_gleidescope",
+     "gleidescope", "init_gleidescope", "draw_gleidescope", NULL,
      "draw_gleidescope", "init_gleidescope", NULL, &gleidescope_opts,
      1000, 1, 2, 1, 4, 1.0, "",
      "GL Kaleidescope", 0, NULL};
@@ -925,7 +926,7 @@ setup_texture(ModeInfo * mi, texture *texture)
 {
        gleidestruct *gp = &gleidescope[MI_SCREEN(mi)];
 
-       if (!image || !*image || !strcmp(image, "DEFAULT")) {
+       if (!image_str || !*image_str || !strcmp(image_str, "DEFAULT")) {
     BUILTIN:
                /* no image specified - use system settings */
 #ifdef DEBUG
@@ -933,7 +934,7 @@ setup_texture(ModeInfo * mi, texture *texture)
 #endif
                getSnapshot(mi, texture);
        } else {
-               if (strcmp(image, "GENERATE") == 0) {
+               if (strcmp(image_str, "GENERATE") == 0) {
 #ifdef DEBUG
                        printf("SetupTexture: random_texture\n");
 #endif
@@ -943,7 +944,7 @@ setup_texture(ModeInfo * mi, texture *texture)
 #ifdef DEBUG
                        printf("SetupTexture: file_texture\n");
 #endif
-                       if (! setup_file_texture(mi, image, texture))
+                       if (! setup_file_texture(mi, image_str, texture))
               goto BUILTIN;
                }
        }
@@ -1395,8 +1396,11 @@ draw(ModeInfo * mi)
  */
 ENTRYPOINT void reshape_gleidescope(ModeInfo *mi, int width, int height)
 {
+       gleidestruct *gp = &gleidescope[MI_SCREEN(mi)];
        GLfloat         h = (GLfloat) height / (GLfloat) width;
 
+       glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(gp->glx_context));
+
        glViewport(0, 0, (GLint) width, (GLint) height);
        glMatrixMode(GL_PROJECTION);
        glLoadIdentity();
@@ -1521,18 +1525,15 @@ printf("phases [%d, %d, %d]\n", gp->cam_x_phase, gp->cam_y_phase, gp->cam_z_phas
 #endif
 }
 
+static void free_gleidescope(ModeInfo * mi);
+
 ENTRYPOINT void
 init_gleidescope(ModeInfo * mi)
 {
        gleidestruct *gp;
        int screen = MI_SCREEN(mi);
 
-       if (gleidescope == NULL) {
-               gleidescope = (gleidestruct *) calloc(MI_NUM_SCREENS(mi), sizeof (gleidestruct));
-               if (gleidescope == NULL) {
-                       return;
-               }
-       }
+       MI_INIT(mi, gleidescope, free_gleidescope);
        gp = &gleidescope[screen];
        gp->window = MI_WINDOW(mi);
     gp->size = -1;
@@ -1600,28 +1601,18 @@ draw_gleidescope(ModeInfo * mi)
        }
 }
 
-ENTRYPOINT void
-release_gleidescope(ModeInfo * mi)
+static void
+free_gleidescope(ModeInfo * mi)
 {
-       if (gleidescope != NULL) {
-               int screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       gleidestruct *gp = &gleidescope[screen];
+       gleidestruct *gp = &gleidescope[MI_SCREEN(mi)];
 
-                       /* acd -  is this needed? */
-                       if (gp->glx_context) {
-                               /* Display lists MUST be freed while their glXContext is current. */
-                               glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context));
+       /* acd -  is this needed? */
+       if (gp->glx_context) {
+               /* Display lists MUST be freed while their glXContext is current. */
+               glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context));
 
-                               /* acd - was code here for freeing things that are no longer in struct */
-                       }
-               }
-               (void) free((void *) gleidescope);
-               gleidescope = NULL;
+               /* acd - was code here for freeing things that are no longer in struct */
        }
-       
-       FreeAllGL(mi);
 }
 
 XSCREENSAVER_MODULE ("Gleidescope", gleidescope)
index e880cfa19b9cced70ae8ef939d88d2197db51250..e81d51167f497be514660ceef31cf34bc24556f5 100644 (file)
@@ -931,14 +931,7 @@ init_fire(ModeInfo * mi)
 {
     firestruct *fs;
 
-    /* allocate the main fire table if needed */
-    if (fire == NULL) {
-       if ((fire = (firestruct *) calloc(MI_NUM_SCREENS(mi),
-                                         sizeof(firestruct))) == NULL)
-           return;
-    }
-
-    /* initialise the per screen fire structure */
+    MI_INIT (mi, fire, 0);
     fs = &fire[MI_SCREEN(mi)];
     fs->np = MI_COUNT(mi);
     fs->fog = do_fog;
index 6f52b3a1014e9f768dfb3cfaed5a24c4610e0c84..e390f688c0663fa4f72a1f8281fee88b2968b687 100644 (file)
@@ -29,6 +29,7 @@
                                 "*wireframe: False\n"
                                 
 # define refresh_glhanoi 0
+# define release_glhanoi 0
 
 /* polygon resolution of poles and disks */
 #define NSLICE 32
@@ -235,7 +236,7 @@ ENTRYPOINT ModeSpecOpt glhanoi_opts = { countof(opts), opts, countof(vars), vars
 #ifdef USE_MODULES
 
 ModStruct glhanoi_description = {
-       "glhanoi", "init_glhanoi", "draw_glhanoi", "release_glhanoi",
+       "glhanoi", "init_glhanoi", "draw_glhanoi", NULL,
        "draw_glhanoi", "init_glhanoi", NULL, &glhanoi_opts,
        1000, 1, 2, 1, 4, 1.0, "",
        "Towers of Hanoi", 0, NULL
@@ -1845,6 +1846,9 @@ static int drawTrails(glhcfg *glhanoi) {
  */
 ENTRYPOINT void reshape_glhanoi(ModeInfo * mi, int width, int height)
 {
+       glhcfg *glhanoi = &glhanoi_cfg[MI_SCREEN(mi)];
+       glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(glhanoi->glx_context));
+
        glViewport(0, 0, (GLint) width, (GLint) height);
 
        glMatrixMode(GL_PROJECTION);
@@ -1858,14 +1862,12 @@ ENTRYPOINT void reshape_glhanoi(ModeInfo * mi, int width, int height)
        glClear(GL_COLOR_BUFFER_BIT);
 }
 
+static void free_glhanoi(ModeInfo * mi);
+
 ENTRYPOINT void init_glhanoi(ModeInfo * mi)
 {
        glhcfg *glhanoi;
-       if(!glhanoi_cfg) {
-               glhanoi_cfg =
-                       (glhcfg *) calloc(MI_NUM_SCREENS(mi), sizeof(glhcfg));
-               checkAllocAndExit(!!glhanoi_cfg, "configuration");
-       }
+       MI_INIT(mi, glhanoi_cfg, free_glhanoi);
 
        glhanoi = &glhanoi_cfg[MI_SCREEN(mi)];
        glhanoi->glx_context = init_GL(mi);
@@ -2050,31 +2052,27 @@ ENTRYPOINT Bool glhanoi_handle_event(ModeInfo * mi, XEvent * event)
        return False;
 }
 
-ENTRYPOINT void release_glhanoi(ModeInfo * mi)
+static void free_glhanoi(ModeInfo * mi)
 {
-       if(glhanoi_cfg != NULL) {
-               int screen;
-               for(screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       int i;
-                       int j;
-                       glhcfg *glh = &glhanoi_cfg[screen];
-                       glDeleteLists(glh->floorList, 1);
-                       glDeleteLists(glh->baseList, 1);
-                       glDeleteLists(glh->poleList, 1);
-                        glDeleteLists(glh->textureNames[0], 2);
-                       for(j = 0; j < glh->numberOfDisks; ++j) {
-                               glDeleteLists(glh->disk[j].displayList, 1);
-                       }
-                       free(glh->disk);
-                       for(i = 0; i < glh->numberOfPoles; i++) {
-                               if(glh->pole[i].data != NULL) {
-                                       free(glh->pole[i].data);
-                               }
+       int i;
+       int j;
+       glhcfg *glh = &glhanoi_cfg[MI_SCREEN(mi)];
+       if (glh->glx_context) {
+               glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(glh->glx_context));
+               glDeleteLists(glh->floorList, 1);
+               glDeleteLists(glh->baseList, 1);
+               glDeleteLists(glh->poleList, 1);
+                glDeleteLists(glh->textureNames[0], 2);
+               for(j = 0; j < glh->numberOfDisks; ++j) {
+                       glDeleteLists(glh->disk[j].displayList, 1);
+               }
+               free(glh->disk);
+               for(i = 0; i < glh->numberOfPoles; i++) {
+                       if(glh->pole[i].data != NULL) {
+                               free(glh->pole[i].data);
                        }
                }
        }
-       free(glhanoi_cfg);
-       glhanoi_cfg = NULL;
 }
 
 XSCREENSAVER_MODULE ("GLHanoi", glhanoi)
index 8dd63728e8ee8650fb568ddef501e76b4a302314..15c67dee56c5acd471eb31ef14cb0e42e78bb3ac 100644 (file)
@@ -257,14 +257,7 @@ init_knot (ModeInfo *mi)
   knot_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (knot_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (knot_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 47069eb36422918159dfff99904cd8d830731043..4782c1cc7f65ce912822f00a26e8d9caa8ae1a4f 100644 (file)
@@ -822,14 +822,7 @@ init_matrix (ModeInfo *mi)
   if (wire)
     do_texture = False;
 
-  if (!mps) {
-    mps = (matrix_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (matrix_configuration));
-    if (!mps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, mps, NULL);
 
   mp = &mps[MI_SCREEN(mi)];
   mp->glx_context = init_GL(mi);
index 20ccc5841f5a16db4e3469eff00bdd5a8e779f37..4b21dd118e591ee570706ba959ec2ec2c6a151bf 100644 (file)
@@ -39,6 +39,7 @@
                                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_planet 0
+# define release_planet 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
@@ -113,7 +114,7 @@ ENTRYPOINT ModeSpecOpt planet_opts = {countof(opts), opts, countof(vars), vars,
 
 #ifdef USE_MODULES
 ModStruct   planet_description =
-{"planet", "init_planet", "draw_planet", "release_planet",
+{"planet", "init_planet", "draw_planet", NULL,
  "draw_planet", "init_planet", NULL, &planet_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "Animates texture mapped sphere (planet)", 0, NULL};
@@ -325,8 +326,11 @@ init_stars (ModeInfo *mi)
 ENTRYPOINT void
 reshape_planet (ModeInfo *mi, int width, int height)
 {
+  planetstruct *gp = &planets[MI_SCREEN(mi)];
   GLfloat h = (GLfloat) height / (GLfloat) width;
 
+  glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context));
+
   glViewport(0, 0, (GLint) width, (GLint) height);
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
@@ -361,6 +365,9 @@ planet_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
+static void free_planet (ModeInfo * mi);
+
+
 ENTRYPOINT void
 init_planet (ModeInfo * mi)
 {
@@ -368,13 +375,11 @@ init_planet (ModeInfo * mi)
   int screen = MI_SCREEN(mi);
   Bool wire = MI_IS_WIREFRAME(mi);
 
-  if (planets == NULL) {
-       if ((planets = (planetstruct *) calloc(MI_NUM_SCREENS(mi),
-                                                                                 sizeof (planetstruct))) == NULL)
-         return;
-  }
+  MI_INIT (mi, planets, free_planet);
   gp = &planets[screen];
 
+  gp->window = MI_WINDOW(mi);
+
   if ((gp->glx_context = init_GL(mi)) != NULL) {
        reshape_planet(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
   }
@@ -633,30 +638,19 @@ draw_planet (ModeInfo * mi)
 }
 
 
-ENTRYPOINT void
-release_planet (ModeInfo * mi)
+static void
+free_planet (ModeInfo * mi)
 {
-  if (planets != NULL) {
-       int screen;
-
-       for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-         planetstruct *gp = &planets[screen];
-
-         if (gp->glx_context) {
-               /* Display lists MUST be freed while their glXContext is current. */
-        /* but this gets a BadMatch error. -jwz */
-               /*glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context));*/
-
-               if (glIsList(gp->platelist))
-                 glDeleteLists(gp->platelist, 1);
-               if (glIsList(gp->starlist))
-                 glDeleteLists(gp->starlist, 1);
-         }
-       }
-       (void) free((void *) planets);
-       planets = NULL;
+  planetstruct *gp = &planets[MI_SCREEN(mi)];
+
+  if (gp->glx_context) {
+       glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context));
+
+       if (glIsList(gp->platelist))
+         glDeleteLists(gp->platelist, 1);
+       if (glIsList(gp->starlist))
+         glDeleteLists(gp->starlist, 1);
   }
-  FreeAllGL(mi);
 }
 
 
index 158a42347674a6f1e715ffaf038d787567757ded..c8f6e2c1490ae1160bfc5cbb3c9549457f9f3d54 100644 (file)
@@ -142,13 +142,7 @@ init_glschool(ModeInfo *mi)
        Bool                                    wire = MI_IS_WIREFRAME(mi);
        glschool_configuration  *sc;
 
-       if (!scs) {
-               scs = (glschool_configuration *)calloc(MI_NUM_SCREENS(mi), sizeof(glschool_configuration));
-               if (!scs) {
-                       perror("init_glschool: ");
-                       exit(1);
-               }
-       }
+       MI_INIT (mi, scs, NULL);
        sc = &scs[MI_SCREEN(mi)];
 
        sc->drawGoal = DoDrawGoal;
index 3e3548d8e08f6df20ded6b18d5c73c3b81fd11ab..a6a56905e597d975d00eb63e43615c947d6cf912 100644 (file)
@@ -1079,11 +1079,7 @@ init_slideshow (ModeInfo *mi)
   slideshow_state *ss;
   int wire = MI_IS_WIREFRAME(mi);
   
-  if (sss == NULL) {
-    if ((sss = (slideshow_state *)
-         calloc (MI_NUM_SCREENS(mi), sizeof(slideshow_state))) == NULL)
-      return;
-  }
+  MI_INIT (mi, sss, NULL);
   ss = &sss[screen];
 
   if ((ss->glx_context = init_GL(mi)) != NULL) {
index 2616ad273be4ad16d73e885739f19aa33f687ea2..1d8ef965a10a73c398d5125e300d8ebd0d5cec13 100644 (file)
@@ -1461,13 +1461,7 @@ ModeInfo * mi
     struct glsnake_cfg * bp;
 
     /* set up the conf struct and glx contexts */
-    if (!glc) {
-       glc = (struct glsnake_cfg *) calloc(MI_NUM_SCREENS(mi), sizeof(struct glsnake_cfg));
-       if (!glc) {
-           fprintf(stderr, "%s: out of memory\n", progname);
-           exit(1);
-       }
-    }
+    MI_INIT(mi, glc, NULL);
     bp = &glc[MI_SCREEN(mi)];
 
     if ((bp->glx_context = init_GL(mi)) != NULL) {
index a4d80b050edc1d93c392eba38163ecf14812a12a..cc39bc928fe3e5f8bd6ea79cf4a3f9f3bb225ac5 100644 (file)
@@ -15,6 +15,7 @@
                        "*usePty:       False        \n" \
 
 # define refresh_text 0
+# define release_text 0
 #define SMOOTH_TUBE       /* whether to have smooth or faceted tubes */
 
 #ifdef SMOOTH_TUBE
@@ -316,20 +317,16 @@ text_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
+static void free_text(ModeInfo * mi);
+
+
 ENTRYPOINT void 
 init_text (ModeInfo *mi)
 {
   text_configuration *tp;
   int i;
 
-  if (!tps) {
-    tps = (text_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (text_configuration));
-    if (!tps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, tps, free_text);
 
   tp = &tps[MI_SCREEN(mi)];
 
@@ -627,21 +624,11 @@ draw_text (ModeInfo *mi)
 }
 
 ENTRYPOINT void
-release_text(ModeInfo * mi)
+free_text(ModeInfo * mi)
 {
-  if (tps)
-    {
-    int screen;
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-      {
-        text_configuration *tp = &tps[MI_SCREEN(mi)];
-        if (tp->tc)
-          textclient_close (tp->tc);
-      }
-    }
-  (void) free(tps);
-  tps = 0;
-  FreeAllGL(mi);
+  text_configuration *tp = &tps[MI_SCREEN(mi)];
+  if (tp->tc)
+    textclient_close (tp->tc);
 }
 
 
index 71775f15a3bca931e3107ed97eca8ce49585b82f..57b4b99131e2ece5b7449166642c8bf620479176 100644 (file)
@@ -1,4 +1,4 @@
-/* gltrackball, Copyright (c) 2002-2014 Jamie Zawinski <jwz@jwz.org>
+/* gltrackball, Copyright (c) 2002-2017 Jamie Zawinski <jwz@jwz.org>
  * GL-flavored wrapper for trackball.c
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
 #include "trackball.h"
 #include "gltrackball.h"
 
+#if defined(USE_IPHONE) || defined(HAVE_ANDROID)
+  /* Surely this should be defined somewhere more centrally... */
+# define HAVE_MOBILE
+#endif
+
 /* Bah, copied from ../fps.h */
 #ifdef HAVE_MOBILE
   extern double current_device_rotation (void);
@@ -71,20 +76,6 @@ gltrackball_init (int ignore_device_rotation_p)
   return ts;
 }
 
-/* Reset the trackball to the default unrotated state.
- */
-void
-gltrackball_reset (trackball_state *ts)
-{
-  int bd = ts->button_down_p;
-  int ig = ts->ignore_device_rotation_p;
-  memset (ts, 0, sizeof(*ts));
-  ts->button_down_p = bd;
-  ts->ignore_device_rotation_p = ig;
-  trackball (ts->q, 0, 0, 0, 0);
-}
-
-
 /* Device rotation interacts very strangely with mouse positions.
    I'm not entirely sure this is the right fix.
  */
@@ -145,7 +136,8 @@ gltrackball_stop (trackball_state *ts)
 static void
 gltrackball_track_1 (trackball_state *ts,
                      double x, double y,
-                     int w, int h)
+                     int w, int h,
+                     int ignore_device_rotation_p)
 {
   double X = x;
   double Y = y;
@@ -158,9 +150,11 @@ gltrackball_track_1 (trackball_state *ts,
   ts->x = x;
   ts->y = y;
 
-  adjust_for_device_rotation (ts, &ox, &oy, &W,  &H);
-  adjust_for_device_rotation (ts, &X,  &Y,  &W2, &H2);
-
+  if (! ignore_device_rotation_p)
+    {
+      adjust_for_device_rotation (ts, &ox, &oy, &W,  &H);
+      adjust_for_device_rotation (ts, &X,  &Y,  &W2, &H2);
+    }
   trackball (q2,
              (2 * ox - W) / W,
              (H - 2 * oy) / H,
@@ -185,7 +179,7 @@ gltrackball_track (trackball_state *ts, int x, int y, int w, int h)
   ts->ddy = ts->dy * dampen;
   ts->ow = w;
   ts->oh = h;
-  gltrackball_track_1 (ts, x, y, w, h);
+  gltrackball_track_1 (ts, x, y, w, h, False);
 }
 
 
@@ -199,6 +193,21 @@ gltrackball_dampen (double *n, double *dn)
 }
 
 
+/* Reset the trackball to the default unrotated state,
+   plus an optional initial rotation.
+ */
+void
+gltrackball_reset (trackball_state *ts, float x, float y)
+{
+  int bd = ts->button_down_p;
+  int ig = ts->ignore_device_rotation_p;
+  memset (ts, 0, sizeof(*ts));
+  ts->button_down_p = bd;
+  ts->ignore_device_rotation_p = ig;
+  trackball (ts->q, 0, 0, x, y);
+}
+
+
 /* Execute the rotations current encapsulated in the trackball_state:
    this does something analagous to glRotatef().
  */
@@ -214,7 +223,8 @@ gltrackball_rotate (trackball_state *ts)
       gltrackball_track_1 (ts, 
                            ts->x + ts->dx,
                            ts->y + ts->dy,
-                           ts->ow, ts->oh);
+                           ts->ow, ts->oh,
+                           False);
 
       /* Dampen inertia: gradually stop spinning. */
       gltrackball_dampen (&ts->dx, &ts->ddx);
index 72a4a62765a392d084ca78363cb2dc6c7c37f2cd..ba9e574691e76f46f1eea03d31db976e71d62d39 100644 (file)
@@ -1,4 +1,4 @@
-/* gltrackball, Copyright (c) 2002-2014 Jamie Zawinski <jwz@jwz.org>
+/* gltrackball, Copyright (c) 2002-2017 Jamie Zawinski <jwz@jwz.org>
  * GL-flavored wrapper for trackball.c
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -55,9 +55,10 @@ void gltrackball_mousewheel (trackball_state *ts,
  */
 extern void gltrackball_get_quaternion (trackball_state *ts, float q[4]);
 
-/* Reset the trackball to the default unrotated state.
+/* Reset the trackball to the default unrotated state,
+   plus an optional initial rotation.
  */
-extern void gltrackball_reset (trackball_state *ts);
+extern void gltrackball_reset (trackball_state *ts, float x, float y);
 
 /* A utility function for event-handler functions:
    Handles the various motion and click events related to trackballs.
index 49e7a8e7d0fca228119fec6fc56ea958c645b0ee..fcf079ec9a672734e3409b6915f6a3bc9126ced8 100644 (file)
@@ -41,6 +41,7 @@
 
 #include "grab-ximage.h"
 #include "grabscreen.h"
+#include "pow2.h"
 #include "visual.h"
 
 /* If REFORMAT_IMAGE_DATA is defined, then we convert Pixmaps to textures
 #define REFORMAT_IMAGE_DATA
 
 
-#ifdef HAVE_XSHM_EXTENSION
-# include "resources.h"
-# include "xshm.h"
-#endif /* HAVE_XSHM_EXTENSION */
+#include "xshm.h"
 
 extern char *progname;
 
@@ -316,12 +314,10 @@ static XImage *
 pixmap_to_gl_ximage (Screen *screen, Window window, Pixmap pixmap)
 {
   Display *dpy = DisplayOfScreen (screen);
+  Visual *visual = DefaultVisualOfScreen (screen);
   unsigned int width, height, depth;
 
-# ifdef HAVE_XSHM_EXTENSION
-  Bool use_shm = get_boolean_resource (dpy, "useSHM", "Boolean");
   XShmSegmentInfo shm_info;
-# endif /* HAVE_XSHM_EXTENSION */
 
   XImage *server_ximage = 0;
   XImage *client_ximage = 0;
@@ -338,31 +334,13 @@ pixmap_to_gl_ximage (Screen *screen, Window window, Pixmap pixmap)
 
   /* Convert the server-side Pixmap to a client-side GL-ordered XImage.
    */
-# ifdef HAVE_XSHM_EXTENSION
-  if (use_shm)
-    {
-      Visual *visual = DefaultVisualOfScreen (screen);
-      server_ximage = create_xshm_image (dpy, visual, depth,
-                                         ZPixmap, 0, &shm_info,
-                                         width, height);
-      if (server_ximage)
-        XShmGetImage (dpy, pixmap, server_ximage, 0, 0, ~0L);
-      else
-        use_shm = False;
-    }
-# endif /* HAVE_XSHM_EXTENSION */
-
-  if (!server_ximage)
-    server_ximage = XGetImage (dpy, pixmap, 0, 0, width, height, ~0L, ZPixmap);
+  server_ximage = create_xshm_image (dpy, visual, depth, ZPixmap, &shm_info,
+                                     width, height);
+  get_xshm_image (dpy, pixmap, server_ximage, 0, 0, ~0L, &shm_info);
 
   client_ximage = convert_ximage_to_rgba32 (screen, server_ximage);
 
-# ifdef HAVE_XSHM_EXTENSION
-  if (use_shm)
-    destroy_xshm_image (dpy, server_ximage, &shm_info);
-  else
-# endif /* HAVE_XSHM_EXTENSION */
-    XDestroyImage (server_ximage);
+  destroy_xshm_image (dpy, server_ximage, &shm_info);
 
   return client_ximage;
 }
@@ -532,16 +510,6 @@ double_time (void)
 }
 
 
-/* return the next larger power of 2. */
-static int
-to_pow2 (int value)
-{
-  int i = 1;
-  while (i < value) i <<= 1;
-  return i;
-}
-
-
 /* Loads the given XImage into GL's texture memory.
    The image may be of any size.
    If mipmap_p is true, then make mipmaps instead of just a single texture.
@@ -560,8 +528,8 @@ ximage_to_texture (XImage *ximage,
   GLenum err = 0;
   int orig_width = ximage->width;
   int orig_height = ximage->height;
-  int tex_width = 0;
-  int tex_height = 0;
+  GLsizei tex_width = 0;
+  GLsizei tex_height = 0;
 
  AGAIN:
 
@@ -585,8 +553,8 @@ ximage_to_texture (XImage *ximage,
          So first, create a texture of that size (but don't write any
          data into it.)
        */
-      tex_width  = to_pow2 (ximage->width);
-      tex_height = to_pow2 (ximage->height);
+      tex_width  = (GLsizei) to_pow2 (ximage->width);
+      tex_height = (GLsizei) to_pow2 (ximage->height);
 
       if (debug_p)
         fprintf (stderr, "%s: texture %d x %d (%d x %d)\n",
index f2646099cd79f8603ff761228d38e78afb670e08..fc6d30970682e554df95fa4ca624a63b09033f69 100644 (file)
@@ -1,4 +1,4 @@
-/* hexstrut, Copyright (c) 2016 Jamie Zawinski <jwz@jwz.org>
+/* hexstrut, Copyright (c) 2016-2017 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
@@ -16,6 +16,7 @@
                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_hexstrut 0
+# define release_hexstrut 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -196,7 +197,7 @@ tick_triangles (ModeInfo *mi)
           t->rot += step * (t->rot > 0 ? 1 : -1);
 
           t->ccolor++;
-          if (t->ccolor > bp->ncolors)
+          if (t->ccolor >= bp->ncolors)
             t->ccolor = 0;
 
           if (t->rot > 1 || t->rot < -1)
@@ -385,19 +386,14 @@ hexstrut_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
+static void free_hexstrut (ModeInfo *mi);
+
 ENTRYPOINT void 
 init_hexstrut (ModeInfo *mi)
 {
   hexstrut_configuration *bp;
 
-  if (!bps) {
-    bps = (hexstrut_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (hexstrut_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, free_hexstrut);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -421,12 +417,9 @@ init_hexstrut (ModeInfo *mi)
 
 
   /* Let's tilt the scene a little. */
-  gltrackball_start (bp->trackball, 500, 500, 1000, 1000);
-  gltrackball_track (bp->trackball,
-                     350 + (random() % 300),
-                     350 + (random() % 300),
-                     1000, 1000);
-
+  gltrackball_reset (bp->trackball,
+                     -0.4 + frand(0.8),
+                     -0.4 + frand(0.8));
 
   if (thickness < 0.05) thickness = 0.05;
   if (thickness < 0.05) MI_IS_WIREFRAME(mi) = True;
@@ -495,8 +488,8 @@ draw_hexstrut (ModeInfo *mi)
 }
 
 
-ENTRYPOINT void
-release_hexstrut (ModeInfo *mi)
+static void
+free_hexstrut (ModeInfo *mi)
 {
   hexstrut_configuration *bp = &bps[MI_SCREEN(mi)];
   while (bp->triangles)
index fd0a1a2805e1937b7f5b9fd2ee9fe6c24f1b2fc7..3caae97f6f8d0b89d25c7a67b85beb3a0c28e0ba 100644 (file)
@@ -838,14 +838,7 @@ init_hilbert (ModeInfo *mi)
   int wire = MI_IS_WIREFRAME(mi);
   int i;
 
-  if (!bps) {
-    bps = (hilbert_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (hilbert_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 85aea634cc5ba141682f5f048dc5293fa36b5d80..776df0a7db3229ef4a222199d6f723ccd17fc7f2 100644 (file)
@@ -34,6 +34,7 @@
                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_hydrostat 0
+# define release_hydrostat 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -640,6 +641,8 @@ hydrostat_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
+static void free_hydrostat (ModeInfo *mi);
+
 ENTRYPOINT void 
 init_hydrostat (ModeInfo *mi)
 {
@@ -647,14 +650,7 @@ init_hydrostat (ModeInfo *mi)
   hydrostat_configuration *bp;
   int i;
 
-  if (!bps) {
-    bps = (hydrostat_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (hydrostat_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, free_hydrostat);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -763,11 +759,13 @@ draw_hydrostat (ModeInfo *mi)
 }
 
 
-ENTRYPOINT void
-release_hydrostat (ModeInfo *mi)
+static void
+free_hydrostat (ModeInfo *mi)
 {
   hydrostat_configuration *bp = &bps[MI_SCREEN(mi)];
   int i;
+  if (!bp->squids)
+    return;
   for (i = 0; i < MI_COUNT(mi); i++)
     free_squid (bp->squids[i]);
   free (bp->squids);
index 4b81aef9ddb7f9e5e853c6f4be8e3730d6488bab..7e1cc3e7651839b2fbefb45f6ae3ce64ee57257d 100644 (file)
@@ -90,6 +90,7 @@ static const char sccsid[] = "@(#)hypertorus.c  1.2 05/09/28 xlockmore";
                            "*suppressRotationAnimation: True\n" \
 
 # define refresh_hypertorus 0
+# define release_hypertorus 0
 # include "xlockmore.h"         /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"             /* from the xlockmore distribution */
@@ -102,7 +103,7 @@ static const char sccsid[] = "@(#)hypertorus.c  1.2 05/09/28 xlockmore";
 
 #ifdef USE_MODULES
 ModStruct   hypertorus_description =
-{"hypertorus", "init_hypertorus", "draw_hypertorus", "release_hypertorus",
+{"hypertorus", "init_hypertorus", "draw_hypertorus", NULL,
  "draw_hypertorus", "change_hypertorus", NULL, &hypertorus_opts,
  25000, 1, 1, 1, 1.0, 4, "",
  "Shows a hypertorus rotating in 4d", 0, NULL};
@@ -829,13 +830,7 @@ ENTRYPOINT void init_hypertorus(ModeInfo *mi)
 {
   hypertorusstruct *hp;
 
-  if (hyper == NULL)
-  {
-    hyper = (hypertorusstruct *)calloc(MI_NUM_SCREENS(mi),
-                                       sizeof(hypertorusstruct));
-    if (hyper == NULL)
-      return;
-  }
+  MI_INIT(mi, hyper, NULL);
   hp = &hyper[MI_SCREEN(mi)];
 
   
@@ -995,33 +990,6 @@ ENTRYPOINT void draw_hypertorus(ModeInfo *mi)
 }
 
 
-/*
- *-----------------------------------------------------------------------------
- *    The display is being taken away from us.  Free up malloc'ed 
- *      memory and X resources that we've alloc'ed.  Only called
- *      once, we must zap everything for every screen.
- *-----------------------------------------------------------------------------
- */
-
-ENTRYPOINT void release_hypertorus(ModeInfo *mi)
-{
-  if (hyper != NULL)
-  {
-    int screen;
-
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-    {
-      hypertorusstruct *hp = &hyper[screen];
-
-      if (hp->glx_context)
-        hp->glx_context = (GLXContext *)NULL;
-    }
-    (void) free((void *)hyper);
-    hyper = (hypertorusstruct *)NULL;
-  }
-  FreeAllGL(mi);
-}
-
 #ifndef STANDALONE
 ENTRYPOINT void change_hypertorus(ModeInfo *mi)
 {
index d92e147b0baf539c09a5b6d5b6ee9345e7ccc2c9..4a8fe5e2a0c93183c923918aced8296f3569c1b5 100644 (file)
@@ -169,14 +169,7 @@ init_hypnowheel (ModeInfo *mi)
   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);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 2e94c1d498bb7ddef3b01517e4459c8133e17473..4a77c8c562687b8992f5dc816d6c02bcd0ebe9d9 100644 (file)
@@ -1010,14 +1010,7 @@ ENTRYPOINT void init_jigglypuff(ModeInfo *mi)
     jigglystruct *js;
     int subdivs;
 
-    if(!jss) {
-       jss = (jigglystruct*)
-           calloc(MI_NUM_SCREENS(mi), sizeof(jigglystruct));
-       if(!jss) {
-           fprintf(stderr, "%s: No..memory...must...abort..\n", progname);
-           exit(1);
-       }
-    }
+    MI_INIT(mi, jss, NULL);
 
     js = &jss[MI_SCREEN(mi)];
 
index 541239308576d7b1daa96e459f16c36667b2d49f..5a415b1756b32d9dff81113a363e3cb8f0ea9f38 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1997-2015 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1997-2017 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
@@ -1378,14 +1378,7 @@ init_jigsaw (ModeInfo *mi)
   jigsaw_configuration *jc;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!sps) {
-    sps = (jigsaw_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (jigsaw_configuration));
-    if (!sps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, sps, NULL);
   jc = &sps[MI_SCREEN(mi)];
   jc->glx_context = init_GL(mi);
 
index 29df0d4e6cc24c9f51d61577f118f17044ca71ff..61b68eea14a0975780d76f6e2b538dcf498276a4 100644 (file)
                        "*wireframe:    False   \n" \
 
 # define refresh_juggle 0
+# define release_juggle 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -637,7 +638,9 @@ trajectory_destroy(Trajectory *t) {
 }
 
 static void
-free_juggle(jugglestruct *sp) {
+free_juggle(ModeInfo *mi) {
+  jugglestruct *sp = &juggles[MI_SCREEN(mi)];
+
   if (sp->head != NULL) {
        while (sp->head->next != sp->head) {
          trajectory_destroy(sp->head->next);
@@ -659,13 +662,14 @@ free_juggle(jugglestruct *sp) {
 }
 
 static Bool
-add_throw(jugglestruct *sp, char type, int h, Notation n, const char* name)
+add_throw(ModeInfo *mi, char type, int h, Notation n, const char* name)
 {
+  jugglestruct *sp = &juggles[MI_SCREEN(mi)];
   Trajectory *t;
 
   ADD_ELEMENT(Trajectory, t, sp->head->prev);
   if(t == NULL){ /* Out of Memory */
-       free_juggle(sp);
+       free_juggle(mi);
        return False;
   }
   t->object = NULL;
@@ -687,7 +691,6 @@ add_throw(jugglestruct *sp, char type, int h, Notation n, const char* name)
 static Bool
 program(ModeInfo *mi, const char *patn, const char *name, int cycles)
 {
-  jugglestruct *sp = &juggles[MI_SCREEN(mi)];
   const char *p;
   int w, h, i, seen;
   Notation notation;
@@ -739,7 +742,7 @@ program(ModeInfo *mi, const char *patn, const char *name, int cycles)
                case ' ':
                  if (seen) {
                        i++;
-                       if (!add_throw(sp, type, h, notation, title))
+                       if (!add_throw(mi, type, h, notation, title))
                                return False;
                        title = NULL;
                        type=' ';
@@ -759,7 +762,7 @@ program(ModeInfo *mi, const char *patn, const char *name, int cycles)
          }
        }
        if (seen) { /* end of sequence */
-         if (!add_throw(sp, type, h, notation, title))
+         if (!add_throw(mi, type, h, notation, title))
                return False;
          title = NULL;
        }
@@ -860,8 +863,9 @@ name(jugglestruct *sp)
 /* ..nm.. -> .. LTn LC RTm RC .. */
 
 static Bool
-part(jugglestruct *sp)
+part(ModeInfo *mi)
 {
+  jugglestruct *sp = &juggles[MI_SCREEN(mi)];
   Trajectory *t, *nt, *p;
   Hand hand = (LRAND() & 1) ? RIGHT : LEFT;
 
@@ -906,7 +910,7 @@ part(jugglestruct *sp)
          t->action = CATCH;
          ADD_ELEMENT(Trajectory, nt, p);
          if(nt == NULL){
-               free_juggle(sp);
+               free_juggle(mi);
                return False;
          }
          nt->object = NULL;
@@ -2441,19 +2445,6 @@ show_bball(ModeInfo *mi, unsigned long color, Trace *s)
  **************************************************************************/
 
 
-ENTRYPOINT void
-release_juggle (ModeInfo * mi)
-{
-  if (juggles != NULL) {
-       int screen;
-
-       for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-         free_juggle(&juggles[screen]);
-       free(juggles);
-       juggles = (jugglestruct *) NULL;
-  }
-}
-
 /* FIXME: refill_juggle currently just appends new throws to the
  * programme.  This is fine if the programme is empty, but if there
  * are still some trajectories left then it really should take these
@@ -2570,7 +2561,7 @@ refill_juggle(ModeInfo * mi)
 
   name(sp);
 
-  if (!part(sp))
+  if (!part(mi))
        return;
 
   lob(mi);
@@ -2580,7 +2571,7 @@ refill_juggle(ModeInfo * mi)
   positions(sp);
 
   if (!projectile(sp)) {
-       free_juggle(sp);
+       free_juggle(mi);
        return;
   }
 
@@ -2645,14 +2636,7 @@ init_juggle (ModeInfo * mi)
   jugglestruct *sp = 0;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!juggles) {
-    juggles = (jugglestruct *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (jugglestruct));
-    if (!juggles) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, juggles, free_juggle);
 
   sp = &juggles[MI_SCREEN(mi)];
 
@@ -2746,14 +2730,14 @@ init_juggle (ModeInfo * mi)
        /* create circular trajectory list */
        ADD_ELEMENT(Trajectory, sp->head, sp->head);
        if(sp->head == NULL){
-         free_juggle(sp);
+         free_juggle(mi);
          return;
        }
 
        /* create circular object list */
        ADD_ELEMENT(Object, sp->objects, sp->objects);
        if(sp->objects == NULL){
-         free_juggle(sp);
+         free_juggle(mi);
          return;
        }
 
@@ -3023,7 +3007,6 @@ draw_juggle (ModeInfo *mi)
   if (future < sp->time + 100 * THROW_CATCH_INTERVAL) {
        refill_juggle(mi);
   } else if (sp->time > 1<<30) { /* Hard Reset before the clock wraps */
-       release_juggle(mi);
        init_juggle(mi);
   }
 
index 58bf2861be49bcd71fbfc4861c629a01f6189c83..679151ffa5957e9888aea07161ca384d7262e4c2 100644 (file)
@@ -167,14 +167,7 @@ init_kaleidocycle (ModeInfo *mi)
   int wire = MI_IS_WIREFRAME(mi);
   int i;
 
-  if (!bps) {
-    bps = (kaleidocycle_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (kaleidocycle_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 46466738b23d50f69fb5494f495bb65ca81c0c8e..8c4a467b656832012786568d0b03d69429377e28 100644 (file)
@@ -138,6 +138,7 @@ static const char sccsid[] = "@(#)klein.c  1.1 08/10/04 xlockmore";
                             "*showFPS:    False \n" \
 
 # define refresh_klein 0
+# define release_klein 0
 # include "xlockmore.h"         /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"             /* from the xlockmore distribution */
@@ -154,7 +155,7 @@ static const char sccsid[] = "@(#)klein.c  1.1 08/10/04 xlockmore";
 
 #ifdef USE_MODULES
 ModStruct   klein_description =
-{"klein", "init_klein", "draw_klein", "release_klein",
+{"klein", "init_klein", "draw_klein", NULL,
  "draw_klein", "change_klein", NULL, &klein_opts,
  25000, 1, 1, 1, 1.0, 4, "",
  "Rotate a Klein bottle in 4d or walk on it", 0, NULL};
@@ -163,20 +164,13 @@ ModStruct   klein_description =
 
 
 static char *klein_bottle;
-static int bottle_type;
 static char *mode;
-static int display_mode;
 static char *appear;
-static int appearance;
 static char *color_mode;
-static int colors;
 static char *view_mode;
-static int view;
 static Bool marks;
 static char *proj_3d;
-static int projection_3d;
 static char *proj_4d;
-static int projection_4d;
 static float speed_wx;
 static float speed_wy;
 static float speed_wz;
@@ -270,6 +264,14 @@ ENTRYPOINT ModeSpecOpt klein_opts =
 typedef struct {
   GLint      WindH, WindW;
   GLXContext *glx_context;
+  /* Options */
+  int bottle_type;
+  int display_mode;
+  int appearance;
+  int colors;
+  int view;
+  int projection_3d;
+  int projection_4d;
   /* 4D rotation angles */
   float alpha, beta, delta, zeta, eta, theta;
   /* Movement parameters */
@@ -498,12 +500,12 @@ static void quats_to_rotmat(float p[4], float q[4], float m[4][4])
 
 
 /* Compute a fully saturated and bright color based on an angle. */
-static void color(double angle, float col[4])
+static void color(kleinstruct *kb, double angle, float col[4])
 {
   int s;
   double t;
 
-  if (colors == COLORS_TWOSIDED)
+  if (kb->colors == COLORS_TWOSIDED)
     return;
 
   if (angle >= 0.0)
@@ -547,7 +549,7 @@ static void color(double angle, float col[4])
       col[2] = 1.0-t;
       break;
   }
-  if (display_mode == DISP_TRANSPARENT)
+  if (kb->display_mode == DISP_TRANSPARENT)
     col[3] = 0.7;
   else
     col[3] = 1.0;
@@ -572,10 +574,10 @@ static void setup_figure8(ModeInfo *mi, double umin, double umax, double vmin,
       k = i*(NUMV+1)+j;
       u = -ur*j/NUMU+umin;
       v = vr*i/NUMV+vmin;
-      if (colors == COLORS_DEPTH)
-        color((cos(u)+1.0)*M_PI*2.0/3.0,kb->col[k]);
+      if (kb->colors == COLORS_DEPTH)
+        color(kb,(cos(u)+1.0)*M_PI*2.0/3.0,kb->col[k]);
       else
-        color(v,kb->col[k]);
+        color(kb,v,kb->col[k]);
       kb->tex[k][0] = -32*u/(2.0*M_PI);
       kb->tex[k][1] = 32*v/(2.0*M_PI);
       cu = cos(u);
@@ -629,10 +631,10 @@ static void setup_squeezed_torus(ModeInfo *mi, double umin, double umax,
       k = i*(NUMV+1)+j;
       u = -ur*j/NUMU+umin;
       v = vr*i/NUMV+vmin;
-      if (colors == COLORS_DEPTH)
-        color((sin(u)*sin(0.5*v)+1.0)*M_PI*2.0/3.0,kb->col[k]);
+      if (kb->colors == COLORS_DEPTH)
+        color(kb,(sin(u)*sin(0.5*v)+1.0)*M_PI*2.0/3.0,kb->col[k]);
       else
-        color(v,kb->col[k]);
+        color(kb,v,kb->col[k]);
       kb->tex[k][0] = -32*u/(2.0*M_PI);
       kb->tex[k][1] = 32*v/(2.0*M_PI);
       cu = cos(u);
@@ -682,10 +684,10 @@ static void setup_lawson(ModeInfo *mi, double umin, double umax, double vmin,
       k = i*(NUMU+1)+j;
       u = -ur*j/NUMU+umin;
       v = vr*i/NUMV+vmin;
-      if (colors == COLORS_DEPTH)
-        color((sin(u)*cos(0.5*v)+1.0)*M_PI*2.0/3.0,kb->col[k]);
+      if (kb->colors == COLORS_DEPTH)
+        color(kb,(sin(u)*cos(0.5*v)+1.0)*M_PI*2.0/3.0,kb->col[k]);
       else
-        color(v,kb->col[k]);
+        color(kb,v,kb->col[k]);
       kb->tex[k][0] = -32*u/(2.0*M_PI);
       kb->tex[k][1] = 32*v/(2.0*M_PI);
       cu = cos(u);
@@ -729,7 +731,7 @@ static int figure8(ModeInfo *mi, double umin, double umax, double vmin,
   float q1[4], q2[4], r1[4][4], r2[4][4];
   kleinstruct *kb = &klein[MI_SCREEN(mi)];
 
-  if (view == VIEW_WALK || view == VIEW_WALKTURN)
+  if (kb->view == VIEW_WALK || kb->view == VIEW_WALKTURN)
   {
     /* Compute the rotation that rotates the Klein bottle in 4D without the
        trackball rotations. */
@@ -774,7 +776,7 @@ static int figure8(ModeInfo *mi, double umin, double umax, double vmin,
       yv[l] = (mat[l][0]*xxv[0]+mat[l][1]*xxv[1]+
                mat[l][2]*xxv[2]+mat[l][3]*xxv[3]);
     }
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
     {
       for (l=0; l<3; l++)
       {
@@ -853,7 +855,7 @@ static int figure8(ModeInfo *mi, double umin, double umax, double vmin,
         r += mat[l][m]*xx[m];
       y[l] = r;
     }
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
     {
       for (l=0; l<3; l++)
         p[l] = y[l]+kb->offset4d[l];
@@ -897,7 +899,7 @@ static int figure8(ModeInfo *mi, double umin, double umax, double vmin,
         yv[l] = (mat[l][0]*kb->xv[o][0]+mat[l][1]*kb->xv[o][1]+
                  mat[l][2]*kb->xv[o][2]+mat[l][3]*kb->xv[o][3]);
       }
-      if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+      if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
       {
         for (l=0; l<3; l++)
         {
@@ -930,10 +932,10 @@ static int figure8(ModeInfo *mi, double umin, double umax, double vmin,
     }
   }
 
-  if (colors == COLORS_TWOSIDED)
+  if (kb->colors == COLORS_TWOSIDED)
   {
     glColor3fv(mat_diff_red);
-    if (display_mode == DISP_TRANSPARENT)
+    if (kb->display_mode == DISP_TRANSPARENT)
     {
       glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_red);
       glMaterialfv(GL_BACK,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_green);
@@ -948,9 +950,9 @@ static int figure8(ModeInfo *mi, double umin, double umax, double vmin,
 
   for (i=0; i<NUMU; i++)
   {
-    if (appearance == APPEARANCE_BANDS && ((i & (NUMB-1)) >= NUMB/2))
+    if (kb->appearance == APPEARANCE_BANDS && ((i & (NUMB-1)) >= NUMB/2))
       continue;
-    if (display_mode == DISP_WIREFRAME)
+    if (kb->display_mode == DISP_WIREFRAME)
       glBegin(GL_QUAD_STRIP);
     else
       glBegin(GL_TRIANGLE_STRIP);
@@ -963,7 +965,7 @@ static int figure8(ModeInfo *mi, double umin, double umax, double vmin,
         o = l*(NUMV+1)+m;
         glNormal3fv(kb->pn[o]);
         glTexCoord2fv(kb->tex[o]);
-        if (colors != COLORS_TWOSIDED)
+        if (kb->colors != COLORS_TWOSIDED)
         {
           glColor3fv(kb->col[o]);
           glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE,kb->col[o]);
@@ -997,7 +999,7 @@ static int squeezed_torus(ModeInfo *mi, double umin, double umax, double vmin,
   float q1[4], q2[4], r1[4][4], r2[4][4];
   kleinstruct *kb = &klein[MI_SCREEN(mi)];
 
-  if (view == VIEW_WALK || view == VIEW_WALKTURN)
+  if (kb->view == VIEW_WALK || kb->view == VIEW_WALKTURN)
   {
     /* Compute the rotation that rotates the Klein bottle in 4D without the
        trackball rotations. */
@@ -1038,7 +1040,7 @@ static int squeezed_torus(ModeInfo *mi, double umin, double umax, double vmin,
       yv[l] = (mat[l][0]*xxv[0]+mat[l][1]*xxv[1]+
                mat[l][2]*xxv[2]+mat[l][3]*xxv[3]);
     }
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
     {
       for (l=0; l<3; l++)
       {
@@ -1115,7 +1117,7 @@ static int squeezed_torus(ModeInfo *mi, double umin, double umax, double vmin,
         r += mat[l][m]*xx[m];
       y[l] = r;
     }
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
     {
       for (l=0; l<3; l++)
         p[l] = y[l]+kb->offset4d[l];
@@ -1159,7 +1161,7 @@ static int squeezed_torus(ModeInfo *mi, double umin, double umax, double vmin,
         yv[l] = (mat[l][0]*kb->xv[o][0]+mat[l][1]*kb->xv[o][1]+
                  mat[l][2]*kb->xv[o][2]+mat[l][3]*kb->xv[o][3]);
       }
-      if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+      if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
       {
         for (l=0; l<3; l++)
         {
@@ -1192,10 +1194,10 @@ static int squeezed_torus(ModeInfo *mi, double umin, double umax, double vmin,
     }
   }
 
-  if (colors == COLORS_TWOSIDED)
+  if (kb->colors == COLORS_TWOSIDED)
   {
     glColor3fv(mat_diff_red);
-    if (display_mode == DISP_TRANSPARENT)
+    if (kb->display_mode == DISP_TRANSPARENT)
     {
       glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_red);
       glMaterialfv(GL_BACK,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_green);
@@ -1210,9 +1212,9 @@ static int squeezed_torus(ModeInfo *mi, double umin, double umax, double vmin,
 
   for (i=0; i<NUMU; i++)
   {
-    if (appearance == APPEARANCE_BANDS && ((i & (NUMB-1)) >= NUMB/2))
+    if (kb->appearance == APPEARANCE_BANDS && ((i & (NUMB-1)) >= NUMB/2))
       continue;
-    if (display_mode == DISP_WIREFRAME)
+    if (kb->display_mode == DISP_WIREFRAME)
       glBegin(GL_QUAD_STRIP);
     else
       glBegin(GL_TRIANGLE_STRIP);
@@ -1225,7 +1227,7 @@ static int squeezed_torus(ModeInfo *mi, double umin, double umax, double vmin,
         o = l*(NUMV+1)+m;
         glNormal3fv(kb->pn[o]);
         glTexCoord2fv(kb->tex[o]);
-        if (colors != COLORS_TWOSIDED)
+        if (kb->colors != COLORS_TWOSIDED)
         {
           glColor3fv(kb->col[o]);
           glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE,kb->col[o]);
@@ -1259,7 +1261,7 @@ static int lawson(ModeInfo *mi, double umin, double umax, double vmin,
   float q1[4], q2[4], r1[4][4], r2[4][4];
   kleinstruct *kb = &klein[MI_SCREEN(mi)];
 
-  if (view == VIEW_WALK || view == VIEW_WALKTURN)
+  if (kb->view == VIEW_WALK || kb->view == VIEW_WALKTURN)
   {
     /* Compute the rotation that rotates the Klein bottle in 4D without the
        trackball rotations. */
@@ -1294,7 +1296,7 @@ static int lawson(ModeInfo *mi, double umin, double umax, double vmin,
       yv[l] = (mat[l][0]*xxv[0]+mat[l][1]*xxv[1]+
                mat[l][2]*xxv[2]+mat[l][3]*xxv[3]);
     }
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
     {
       for (l=0; l<3; l++)
       {
@@ -1369,7 +1371,7 @@ static int lawson(ModeInfo *mi, double umin, double umax, double vmin,
         r += mat[l][m]*xx[m];
       y[l] = r;
     }
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
     {
       for (l=0; l<3; l++)
         p[l] = y[l]+kb->offset4d[l];
@@ -1413,7 +1415,7 @@ static int lawson(ModeInfo *mi, double umin, double umax, double vmin,
         yv[l] = (mat[l][0]*kb->xv[o][0]+mat[l][1]*kb->xv[o][1]+
                  mat[l][2]*kb->xv[o][2]+mat[l][3]*kb->xv[o][3]);
       }
-      if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+      if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
       {
         for (l=0; l<3; l++)
         {
@@ -1446,10 +1448,10 @@ static int lawson(ModeInfo *mi, double umin, double umax, double vmin,
     }
   }
 
-  if (colors == COLORS_TWOSIDED)
+  if (kb->colors == COLORS_TWOSIDED)
   {
     glColor3fv(mat_diff_red);
-    if (display_mode == DISP_TRANSPARENT)
+    if (kb->display_mode == DISP_TRANSPARENT)
     {
       glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_red);
       glMaterialfv(GL_BACK,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_green);
@@ -1464,9 +1466,9 @@ static int lawson(ModeInfo *mi, double umin, double umax, double vmin,
 
   for (i=0; i<NUMV; i++)
   {
-    if (appearance == APPEARANCE_BANDS && ((i & (NUMB-1)) >= NUMB/2))
+    if (kb->appearance == APPEARANCE_BANDS && ((i & (NUMB-1)) >= NUMB/2))
       continue;
-    if (display_mode == DISP_WIREFRAME)
+    if (kb->display_mode == DISP_WIREFRAME)
       glBegin(GL_QUAD_STRIP);
     else
       glBegin(GL_TRIANGLE_STRIP);
@@ -1479,7 +1481,7 @@ static int lawson(ModeInfo *mi, double umin, double umax, double vmin,
         o = l*(NUMU+1)+m;
         glNormal3fv(kb->pn[o]);
         glTexCoord2fv(kb->tex[o]);
-        if (colors != COLORS_TWOSIDED)
+        if (kb->colors != COLORS_TWOSIDED)
         {
           glColor3fv(kb->col[o]);
           glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE,kb->col[o]);
@@ -1525,7 +1527,7 @@ static void init(ModeInfo *mi)
   if (walk_speed == 0.0)
     walk_speed = 20.0;
 
-  if (view == VIEW_TURN)
+  if (kb->view == VIEW_TURN)
   {
     kb->alpha = frand(360.0);
     kb->beta = frand(360.0);
@@ -1538,8 +1540,8 @@ static void init(ModeInfo *mi)
     kb->delta = 0.0;
   }
   kb->zeta = 0.0;
-  if (bottle_type == KLEIN_BOTTLE_FIGURE_8 ||
-      bottle_type == KLEIN_BOTTLE_SQUEEZED_TORUS)
+  if (kb->bottle_type == KLEIN_BOTTLE_FIGURE_8 ||
+      kb->bottle_type == KLEIN_BOTTLE_SQUEEZED_TORUS)
     kb->eta = 0.0;
   else
     kb->eta = 45.0;
@@ -1550,7 +1552,7 @@ static void init(ModeInfo *mi)
   kb->dvmove = 0.0;
   kb->side = 1;
 
-  if (bottle_type == KLEIN_BOTTLE_FIGURE_8)
+  if (kb->bottle_type == KLEIN_BOTTLE_FIGURE_8)
   {
     kb->offset4d[0] = 0.0;
     kb->offset4d[1] = 0.0;
@@ -1558,13 +1560,13 @@ static void init(ModeInfo *mi)
     kb->offset4d[3] = 1.5;
     kb->offset3d[0] = 0.0;
     kb->offset3d[1] = 0.0;
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
       kb->offset3d[2] = -2.1;
     else
       kb->offset3d[2] = -1.9;
     kb->offset3d[3] = 0.0;
   }
-  else if (bottle_type == KLEIN_BOTTLE_SQUEEZED_TORUS)
+  else if (kb->bottle_type == KLEIN_BOTTLE_SQUEEZED_TORUS)
   {
     kb->offset4d[0] = 0.0;
     kb->offset4d[1] = 0.0;
@@ -1575,19 +1577,19 @@ static void init(ModeInfo *mi)
     kb->offset3d[2] = -2.0;
     kb->offset3d[3] = 0.0;
   }
-  else /* bottle_type == KLEIN_BOTTLE_LAWSON */
+  else /* kb->bottle_type == KLEIN_BOTTLE_LAWSON */
   {
     kb->offset4d[0] = 0.0;
     kb->offset4d[1] = 0.0;
     kb->offset4d[2] = 0.0;
-    if (projection_4d == DISP_4D_PERSPECTIVE &&
-        projection_3d == DISP_3D_ORTHOGRAPHIC)
+    if (kb->projection_4d == DISP_4D_PERSPECTIVE &&
+        kb->projection_3d == DISP_3D_ORTHOGRAPHIC)
       kb->offset4d[3] = 1.5;
     else
       kb->offset4d[3] = 1.1;
     kb->offset3d[0] = 0.0;
     kb->offset3d[1] = 0.0;
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (kb->projection_4d == DISP_4D_ORTHOGRAPHIC)
       kb->offset3d[2] = -2.0;
     else
       kb->offset3d[2] = -5.0;
@@ -1595,11 +1597,11 @@ static void init(ModeInfo *mi)
   }
 
   gen_texture(mi);
-  if (bottle_type == KLEIN_BOTTLE_FIGURE_8)
+  if (kb->bottle_type == KLEIN_BOTTLE_FIGURE_8)
     setup_figure8(mi,0.0,2.0*M_PI,0.0,2.0*M_PI);
-  else if (bottle_type == KLEIN_BOTTLE_SQUEEZED_TORUS)
+  else if (kb->bottle_type == KLEIN_BOTTLE_SQUEEZED_TORUS)
     setup_squeezed_torus(mi,0.0,2.0*M_PI,0.0,2.0*M_PI);
-  else /* bottle_type == KLEIN_BOTTLE_LAWSON */
+  else /* kb->bottle_type == KLEIN_BOTTLE_LAWSON */
     setup_lawson(mi,0.0,2.0*M_PI,0.0,2.0*M_PI);
 
   if (marks)
@@ -1609,10 +1611,10 @@ static void init(ModeInfo *mi)
 
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
-  if (projection_3d == DISP_3D_PERSPECTIVE ||
-      view == VIEW_WALK || view == VIEW_WALKTURN)
+  if (kb->projection_3d == DISP_3D_PERSPECTIVE ||
+      kb->view == VIEW_WALK || kb->view == VIEW_WALKTURN)
   {
-    if (view == VIEW_WALK || view == VIEW_WALKTURN)
+    if (kb->view == VIEW_WALK || kb->view == VIEW_WALKTURN)
       gluPerspective(60.0,1.0,0.01,10.0);
     else
       gluPerspective(60.0,1.0,0.1,10.0);
@@ -1625,11 +1627,11 @@ static void init(ModeInfo *mi)
   glLoadIdentity();
 
 # ifdef HAVE_JWZGLES /* #### glPolygonMode other than GL_FILL unimplemented */
-  if (display_mode == DISP_WIREFRAME)
-    display_mode = DISP_SURFACE;
+  if (kb->display_mode == DISP_WIREFRAME)
+    kb->display_mode = DISP_SURFACE;
 # endif
 
-  if (display_mode == DISP_SURFACE)
+  if (kb->display_mode == DISP_SURFACE)
   {
     glEnable(GL_DEPTH_TEST);
     glDepthFunc(GL_LESS);
@@ -1647,7 +1649,7 @@ static void init(ModeInfo *mi)
     glDepthMask(GL_TRUE);
     glDisable(GL_BLEND);
   }
-  else if (display_mode == DISP_TRANSPARENT)
+  else if (kb->display_mode == DISP_TRANSPARENT)
   {
     glDisable(GL_DEPTH_TEST);
     glShadeModel(GL_SMOOTH);
@@ -1665,7 +1667,7 @@ static void init(ModeInfo *mi)
     glEnable(GL_BLEND);
     glBlendFunc(GL_SRC_ALPHA,GL_ONE);
   }
-  else  /* display_mode == DISP_WIREFRAME */
+  else  /* kb->display_mode == DISP_WIREFRAME */
   {
     glDisable(GL_DEPTH_TEST);
     glShadeModel(GL_FLAT);
@@ -1684,7 +1686,7 @@ static void display_klein(ModeInfo *mi)
 
   if (!kb->button_pressed)
   {
-    if (view == VIEW_TURN)
+    if (kb->view == VIEW_TURN)
     {
       kb->alpha += speed_wx * kb->speed_scale;
       if (kb->alpha >= 360.0)
@@ -1705,7 +1707,7 @@ static void display_klein(ModeInfo *mi)
       if (kb->theta >= 360.0)
         kb->theta -= 360.0;
     }
-    if (view == VIEW_WALKTURN)
+    if (kb->view == VIEW_WALKTURN)
     {
       kb->zeta += speed_xy * kb->speed_scale;
       if (kb->zeta >= 360.0)
@@ -1717,7 +1719,7 @@ static void display_klein(ModeInfo *mi)
       if (kb->theta >= 360.0)
         kb->theta -= 360.0;
     }
-    if (view == VIEW_WALK || view == VIEW_WALKTURN)
+    if (kb->view == VIEW_WALK || kb->view == VIEW_WALKTURN)
     {
       kb->dvmove = cos(walk_direction*M_PI/180.0)*walk_speed*M_PI/4096.0;
       kb->vmove += kb->dvmove;
@@ -1739,10 +1741,10 @@ static void display_klein(ModeInfo *mi)
 
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
-  if (projection_3d == DISP_3D_PERSPECTIVE ||
-      view == VIEW_WALK || view == VIEW_WALKTURN)
+  if (kb->projection_3d == DISP_3D_PERSPECTIVE ||
+      kb->view == VIEW_WALK || kb->view == VIEW_WALKTURN)
   {
-    if (view == VIEW_WALK || view == VIEW_WALKTURN)
+    if (kb->view == VIEW_WALK || kb->view == VIEW_WALKTURN)
       gluPerspective(60.0,kb->aspect,0.01,10.0);
     else
       gluPerspective(60.0,kb->aspect,0.1,10.0);
@@ -1757,11 +1759,11 @@ static void display_klein(ModeInfo *mi)
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
 
-  if (bottle_type == KLEIN_BOTTLE_FIGURE_8)
+  if (kb->bottle_type == KLEIN_BOTTLE_FIGURE_8)
     mi->polygon_count = figure8(mi,0.0,2.0*M_PI,0.0,2.0*M_PI);
-  else if (bottle_type == KLEIN_BOTTLE_SQUEEZED_TORUS)
+  else if (kb->bottle_type == KLEIN_BOTTLE_SQUEEZED_TORUS)
     mi->polygon_count = squeezed_torus(mi,0.0,2.0*M_PI,0.0,2.0*M_PI);
-  else /* bottle_type == KLEIN_BOTTLE_LAWSON */
+  else /* kb->bottle_type == KLEIN_BOTTLE_LAWSON */
     mi->polygon_count = lawson(mi,0.0,2.0*M_PI,0.0,2.0*M_PI);
 }
 
@@ -1855,13 +1857,7 @@ ENTRYPOINT void init_klein(ModeInfo *mi)
 {
   kleinstruct *kb;
 
-  if (klein == NULL)
-  {
-    klein = (kleinstruct *)calloc(MI_NUM_SCREENS(mi),
-                                              sizeof(kleinstruct));
-    if (klein == NULL)
-      return;
-  }
+  MI_INIT(mi, klein, NULL);
   kb = &klein[MI_SCREEN(mi)];
 
   
@@ -1873,159 +1869,159 @@ ENTRYPOINT void init_klein(ModeInfo *mi)
   /* Set the Klein bottle. */
   if (!strcasecmp(klein_bottle,"random"))
   {
-    bottle_type = random() % NUM_KLEIN_BOTTLES;
+    kb->bottle_type = random() % NUM_KLEIN_BOTTLES;
   }
   else if (!strcasecmp(klein_bottle,"figure-8"))
   {
-    bottle_type = KLEIN_BOTTLE_FIGURE_8;
+    kb->bottle_type = KLEIN_BOTTLE_FIGURE_8;
   }
   else if (!strcasecmp(klein_bottle,"squeezed-torus"))
   {
-    bottle_type = KLEIN_BOTTLE_SQUEEZED_TORUS;
+    kb->bottle_type = KLEIN_BOTTLE_SQUEEZED_TORUS;
   }
   else if (!strcasecmp(klein_bottle,"lawson"))
   {
-    bottle_type = KLEIN_BOTTLE_LAWSON;
+    kb->bottle_type = KLEIN_BOTTLE_LAWSON;
   }
   else
   {
-    bottle_type = random() % NUM_KLEIN_BOTTLES;
+    kb->bottle_type = random() % NUM_KLEIN_BOTTLES;
   }
 
   /* Set the display mode. */
   if (!strcasecmp(mode,"random"))
   {
-    display_mode = random() % NUM_DISPLAY_MODES;
+    kb->display_mode = random() % NUM_DISPLAY_MODES;
   }
   else if (!strcasecmp(mode,"wireframe"))
   {
-    display_mode = DISP_WIREFRAME;
+    kb->display_mode = DISP_WIREFRAME;
   }
   else if (!strcasecmp(mode,"surface"))
   {
-    display_mode = DISP_SURFACE;
+    kb->display_mode = DISP_SURFACE;
   }
   else if (!strcasecmp(mode,"transparent"))
   {
-    display_mode = DISP_TRANSPARENT;
+    kb->display_mode = DISP_TRANSPARENT;
   }
   else
   {
-    display_mode = random() % NUM_DISPLAY_MODES;
+    kb->display_mode = random() % NUM_DISPLAY_MODES;
   }
 
   /* Orientation marks don't make sense in wireframe mode. */
-  if (display_mode == DISP_WIREFRAME)
+  if (kb->display_mode == DISP_WIREFRAME)
     marks = False;
 
   /* Set the appearance. */
   if (!strcasecmp(appear,"random"))
   {
-    appearance = random() % NUM_APPEARANCES;
+    kb->appearance = random() % NUM_APPEARANCES;
   }
   else if (!strcasecmp(appear,"solid"))
   {
-    appearance = APPEARANCE_SOLID;
+    kb->appearance = APPEARANCE_SOLID;
   }
   else if (!strcasecmp(appear,"bands"))
   {
-    appearance = APPEARANCE_BANDS;
+    kb->appearance = APPEARANCE_BANDS;
   }
   else
   {
-    appearance = random() % NUM_APPEARANCES;
+    kb->appearance = random() % NUM_APPEARANCES;
   }
 
   /* Set the color mode. */
   if (!strcasecmp(color_mode,"random"))
   {
-    colors = random() % NUM_COLORS;
+    kb->colors = random() % NUM_COLORS;
   }
   else if (!strcasecmp(color_mode,"two-sided"))
   {
-    colors = COLORS_TWOSIDED;
+    kb->colors = COLORS_TWOSIDED;
   }
   else if (!strcasecmp(color_mode,"rainbow"))
   {
-    colors = COLORS_RAINBOW;
+    kb->colors = COLORS_RAINBOW;
   }
   else if (!strcasecmp(color_mode,"depth"))
   {
-    colors = COLORS_DEPTH;
+    kb->colors = COLORS_DEPTH;
   }
   else
   {
-    colors = random() % NUM_COLORS;
+    kb->colors = random() % NUM_COLORS;
   }
 
   /* Set the view mode. */
   if (!strcasecmp(view_mode,"random"))
   {
-    view = random() % NUM_VIEW_MODES;
+    kb->view = random() % NUM_VIEW_MODES;
   }
   else if (!strcasecmp(view_mode,"walk"))
   {
-    view = VIEW_WALK;
+    kb->view = VIEW_WALK;
   }
   else if (!strcasecmp(view_mode,"turn"))
   {
-    view = VIEW_TURN;
+    kb->view = VIEW_TURN;
   }
   else if (!strcasecmp(view_mode,"walk-turn"))
   {
-    view = VIEW_WALKTURN;
+    kb->view = VIEW_WALKTURN;
   }
   else
   {
-    view = random() % NUM_VIEW_MODES;
+    kb->view = random() % NUM_VIEW_MODES;
   }
 
   /* Set the 3d projection mode. */
   if (!strcasecmp(proj_3d,"random"))
   {
     /* Orthographic projection only makes sense in turn mode. */
-    if (view == VIEW_TURN)
-      projection_3d = random() % NUM_DISP_3D_MODES;
+    if (kb->view == VIEW_TURN)
+      kb->projection_3d = random() % NUM_DISP_3D_MODES;
     else
-      projection_3d = DISP_3D_PERSPECTIVE;
+      kb->projection_3d = DISP_3D_PERSPECTIVE;
   }
   else if (!strcasecmp(proj_3d,"perspective"))
   {
-    projection_3d = DISP_3D_PERSPECTIVE;
+    kb->projection_3d = DISP_3D_PERSPECTIVE;
   }
   else if (!strcasecmp(proj_3d,"orthographic"))
   {
-    projection_3d = DISP_3D_ORTHOGRAPHIC;
+    kb->projection_3d = DISP_3D_ORTHOGRAPHIC;
   }
   else
   {
     /* Orthographic projection only makes sense in turn mode. */
-    if (view == VIEW_TURN)
-      projection_3d = random() % NUM_DISP_3D_MODES;
+    if (kb->view == VIEW_TURN)
+      kb->projection_3d = random() % NUM_DISP_3D_MODES;
     else
-      projection_3d = DISP_3D_PERSPECTIVE;
+      kb->projection_3d = DISP_3D_PERSPECTIVE;
   }
 
   /* Set the 4d projection mode. */
   if (!strcasecmp(proj_4d,"random"))
   {
-    projection_4d = random() % NUM_DISP_4D_MODES;
+    kb->projection_4d = random() % NUM_DISP_4D_MODES;
   }
   else if (!strcasecmp(proj_4d,"perspective"))
   {
-    projection_4d = DISP_4D_PERSPECTIVE;
+    kb->projection_4d = DISP_4D_PERSPECTIVE;
   }
   else if (!strcasecmp(proj_4d,"orthographic"))
   {
-    projection_4d = DISP_4D_ORTHOGRAPHIC;
+    kb->projection_4d = DISP_4D_ORTHOGRAPHIC;
   }
   else
   {
-    projection_4d = random() % NUM_DISP_4D_MODES;
+    kb->projection_4d = random() % NUM_DISP_4D_MODES;
   }
 
   /* Modify the speeds to a useful range in walk-and-turn mode. */
-  if (view == VIEW_WALKTURN)
+  if (kb->view == VIEW_WALKTURN)
   {
     speed_wx *= 0.2;
     speed_wy *= 0.2;
@@ -2085,33 +2081,6 @@ ENTRYPOINT void draw_klein(ModeInfo *mi)
 }
 
 
-/*
- *-----------------------------------------------------------------------------
- *    The display is being taken away from us.  Free up malloc'ed 
- *      memory and X resources that we've alloc'ed.  Only called
- *      once, we must zap everything for every screen.
- *-----------------------------------------------------------------------------
- */
-
-ENTRYPOINT void release_klein(ModeInfo *mi)
-{
-  if (klein != NULL)
-  {
-    int screen;
-
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-    {
-      kleinstruct *kb = &klein[screen];
-
-      if (kb->glx_context)
-        kb->glx_context = (GLXContext *)NULL;
-    }
-    (void) free((void *)klein);
-    klein = (kleinstruct *)NULL;
-  }
-  FreeAllGL(mi);
-}
-
 #ifndef STANDALONE
 ENTRYPOINT void change_klein(ModeInfo *mi)
 {
index 2a4b6395bb74f982c9dcfa77d01a5c17073552e9..f29b4322daa6ca85c7a58a54cd663f329cdbc21a 100644 (file)
@@ -1705,16 +1705,7 @@ init_lament (ModeInfo *mi)
 {
   lament_configuration *lc;
   int i;
-  if (!lcs)
-    {
-      lcs = (lament_configuration *)
-       calloc(MI_NUM_SCREENS(mi), sizeof (lament_configuration));
-      if (!lcs)
-       {
-         fprintf(stderr, "%s: out of memory\n", progname);
-         exit(1);
-       }
-    }
+  MI_INIT (mi, lcs, NULL);
 
   lc = &lcs[MI_SCREEN(mi)];
 
index 7e422ad6c0918d8452bfde98643cb85ffb9ca152..b1604a2212829b623850e7be27dde2a78cc2f831 100644 (file)
@@ -1,6 +1,6 @@
 /* lavalite --- 3D Simulation a Lava Lite, written by jwz.
  *
- * This software Copyright (c) 2002-2014 Jamie Zawinski <jwz@jwz.org>
+ * This software Copyright (c) 2002-2017 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
@@ -1274,14 +1274,7 @@ init_lavalite (ModeInfo *mi)
   lavalite_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (lavalite_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (lavalite_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -1375,17 +1368,13 @@ init_lavalite (ModeInfo *mi)
                              False);
     bp->trackball = gltrackball_init (False);
 
-    /* move initial camera position up by around 15 degrees:
-       in other words, tilt the scene toward the viewer. */
-    gltrackball_start (bp->trackball, 50, 50, 100, 100);
-    gltrackball_track (bp->trackball, 50,  5, 100, 100);
-
-    /* Oh, but if it's the "Giant" model, tilt the scene away: make it
-       look like we're looking up at it instead of down at it! */
-    if (bp->style == GIANT)
-      gltrackball_track (bp->trackball, 50, -12, 100, 100);
-    else if (bp->style == ROCKET)  /* same for rocket, but not as much */
-      gltrackball_track (bp->trackball, 50, -4, 100, 100);
+    /* Tilt the scene a bit: lean the normal lamps toward the viewer,
+       and the huge lamps away. */
+    gltrackball_reset (bp->trackball,
+                       -0.3 + frand(0.6),
+                       (bp->style == ROCKET || bp->style == GIANT
+                        ?  frand (0.2)
+                        : -frand (0.6)));
   }
 
   switch (bp->style)
@@ -1496,6 +1485,9 @@ draw_lavalite (ModeInfo *mi)
 
     gltrackball_rotate (bp->trackball);        /* Apply mouse-based camera position */
 
+    glRotatef (-90, 1, 0, 0);  /* Right side up */
+
+
     /* Place the lights relative to the object, before the object has
        been rotated or wandered within the scene. */
     glLightfv(GL_LIGHT0, GL_POSITION, light0_pos);
index 60d684d10878afce7602bc92774411c83e04060c..404a49fd561389842e3a1da2f132dffb1b165b34 100644 (file)
@@ -40,6 +40,7 @@
                        "*showFPS:      False   \n"
 
 #define        refresh_lockward        0
+#define        release_lockward        0
 
 
 #define        NUMOF(x)        (sizeof ((x)) / sizeof ((*x)))
@@ -136,7 +137,7 @@ typedef struct lockward_context {
 /***************************************************************************
  * Prototypes.
  */
-static void free_lockward (lockward_context *ctx);
+static void free_lockward (ModeInfo *mi);
 
 
 /***************************************************************************
@@ -203,8 +204,12 @@ ENTRYPOINT ModeSpecOpt lockward_opts = {
 ENTRYPOINT void
 reshape_lockward (ModeInfo *mi, int width, int height)
 {
+       lockward_context *ctx = &g_ctx[MI_SCREEN (mi)];
        GLfloat h = (GLfloat) height / (GLfloat) width;
 
+       glXMakeCurrent (MI_DISPLAY (mi), MI_WINDOW (mi),
+                       *(ctx->glx_context));
+
        glViewport (0, 0, (GLint) width, (GLint) height);
 
        glMatrixMode (GL_PROJECTION);
@@ -827,15 +832,7 @@ init_lockward (ModeInfo *mi)
        lockward_context        *ctx;
        int             i, n;
 
-       if (!g_ctx) {
-               g_ctx = (lockward_context *) calloc (MI_NUM_SCREENS (mi),
-                                                  sizeof (lockward_context));
-               if (!g_ctx) {
-                       fprintf (stderr, "%s: can't allocate context.\n",
-                                progname);
-                       exit (1);
-               }
-       }
+       MI_INIT (mi, g_ctx, free_lockward);
        ctx = &g_ctx[MI_SCREEN (mi)];
 
        ctx->glx_context = init_GL (mi);
@@ -928,10 +925,17 @@ init_lockward (ModeInfo *mi)
 }
 
 static void
-free_lockward (lockward_context *ctx)
+free_lockward (ModeInfo *mi)
 {
+       lockward_context        *ctx = &g_ctx[MI_SCREEN (mi)];
        int i;
 
+       if (!ctx->glx_context)
+               return;
+
+       glXMakeCurrent (MI_DISPLAY (mi), MI_WINDOW (mi),
+                       *(ctx->glx_context));
+
        if (ctx->blink.noise)
                free (ctx->blink.noise);
        if (glIsList (ctx->rings))
@@ -951,25 +955,6 @@ free_lockward (lockward_context *ctx)
        }
 }
 
-ENTRYPOINT void
-release_lockward (ModeInfo *mi)
-{
-       int i;
-
-       if (!g_ctx)
-               return;
-
-       for (i = MI_NUM_SCREENS (mi);  --i >= 0; ) {
-               if (g_ctx[i].glx_context)
-                       glXMakeCurrent (MI_DISPLAY (mi), MI_WINDOW (mi),
-                                       *(g_ctx[i].glx_context));
-               free_lockward (&g_ctx[i]);
-       }
-
-       FreeAllGL (mi);
-       free (g_ctx);  g_ctx = NULL;
-}
-
 
 XSCREENSAVER_MODULE ("Lockward", lockward)
 
index e26e2d31de4afe182d9ac34861c034a7c802f0c0..c5108a28d93c4725dc618e9127f0875d52a042fc 100644 (file)
@@ -401,14 +401,7 @@ init_sponge (ModeInfo *mi)
   sponge_configuration *sp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!sps) {
-    sps = (sponge_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (sponge_configuration));
-    if (!sps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, sps, NULL);
 
   sp = &sps[MI_SCREEN(mi)];
 
index 2fe9fc84ff15097b0f1b4156c963e13c9d583910..7595e70d243ea6170c6ac1c798e232e14f6bc748 100644 (file)
@@ -45,6 +45,7 @@
                 "*suppressRotationAnimation: True\n"                       \
 
 # define refresh_mirrorblob 0
+# define release_mirrorblob 0
 # include "xlockmore.h"
 #else /* !STANDALONE */
 # include "xlock.h"        /* from the xlockmore distribution */
@@ -177,7 +178,7 @@ ENTRYPOINT ModeSpecOpt mirrorblob_opts = {countof(opts), opts, countof(vars), va
 
 #ifdef USE_MODULES
 ModStruct   mirrorblob_description =
-{"mirrorblob", "init_mirrorblob", "draw_mirrorblob", "release_mirrorblob",
+{"mirrorblob", "init_mirrorblob", "draw_mirrorblob", NULL,
  "draw_mirrorblob", "init_mirrorblob", "handle_event", &mirrorblob_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "OpenGL mirrorblob", 0, NULL};
@@ -1785,6 +1786,8 @@ mirrorblob_handle_event (ModeInfo * mi, XEvent * event)
   return False;
 }
 
+static void free_mirrorblob(ModeInfo * mi);
+
 /******************************************************************************
  *
  * XMirrorblob initialise entry
@@ -1796,14 +1799,7 @@ init_mirrorblob(ModeInfo * mi)
 
   mirrorblobstruct *gp;
 
-  if (Mirrorblob == NULL)
-    {
-      if ((Mirrorblob = (mirrorblobstruct *)
-           calloc(MI_NUM_SCREENS(mi), sizeof (mirrorblobstruct))) == NULL)
-        {
-          return;
-        }
-    }
+  MI_INIT(mi, Mirrorblob, free_mirrorblob);
   gp = &Mirrorblob[screen];
 
   gp->window = MI_WINDOW(mi);
@@ -1829,27 +1825,18 @@ init_mirrorblob(ModeInfo * mi)
  *
  * XMirrorblob cleanup entry
  */
-ENTRYPOINT void
-release_mirrorblob(ModeInfo * mi)
+static void
+free_mirrorblob(ModeInfo * mi)
 {
-  if (Mirrorblob != NULL) {
-    int i;
-    for (i = 0; i < MI_NUM_SCREENS(mi); i++) {
-      mirrorblobstruct *gp = &Mirrorblob[i];
-      if (gp->nodes) free(gp->nodes);
-      if (gp->faces) free(gp->faces);
-      if (gp->bump_data) free(gp->bump_data);
-      if (gp->colours) free(gp->colours);
-      if (gp->tex_coords) free(gp->tex_coords);
-      if (gp->dots) free(gp->dots);
-      if (gp->wall_shape) free(gp->wall_shape);
-      if (gp->bump_shape) free(gp->bump_shape);
-    }
-
-    free(Mirrorblob);
-    Mirrorblob = NULL;
-  }
-  FreeAllGL(mi);
+  mirrorblobstruct *gp = &Mirrorblob[MI_SCREEN(mi)];
+  if (gp->nodes) free(gp->nodes);
+  if (gp->faces) free(gp->faces);
+  if (gp->bump_data) free(gp->bump_data);
+  if (gp->colours) free(gp->colours);
+  if (gp->tex_coords) free(gp->tex_coords);
+  if (gp->dots) free(gp->dots);
+  if (gp->wall_shape) free(gp->wall_shape);
+  if (gp->bump_shape) free(gp->bump_shape);
 }
 
 XSCREENSAVER_MODULE ("MirrorBlob", mirrorblob)
index 8c92ff7f073844886c58459ccb657752de1efc8c..80a8246381a171d7c2036ce94e9238187d1ae0d2 100644 (file)
@@ -80,6 +80,7 @@ static const char sccsid[] = "@(#)moebius.c   5.01 2001/03/01 xlockmore";
 #ifdef STANDALONE
 # define MODE_moebius
 # define refresh_moebius 0
+# define release_moebius 0
 # define DEFAULTS                      "*delay:                20000   \n"                     \
                                                        "*showFPS:      False   \n"                     \
                                                        "*suppressRotationAnimation: True\n" \
@@ -148,7 +149,7 @@ ENTRYPOINT ModeSpecOpt moebius_opts =
 
 #ifdef USE_MODULES
 ModStruct   moebius_description =
-{"moebius", "init_moebius", "draw_moebius", "release_moebius",
+{"moebius", "init_moebius", "draw_moebius", (char *) NULL,
  "draw_moebius", "change_moebius", (char *) NULL, &moebius_opts,
  1000, 1, 1, 1, 4, 1.0, "",
  "Shows Moebius Strip II, an Escher-like GL scene with ants", 0, NULL};
@@ -653,17 +654,6 @@ pinit(ModeInfo *mi)
 }
 
 
-
-ENTRYPOINT void
-release_moebius (ModeInfo * mi)
-{
-       if (moebius != NULL) {
-               (void) free((void *) moebius);
-               moebius = (moebiusstruct *) NULL;
-       }
-       FreeAllGL(mi);
-}
-
 ENTRYPOINT Bool
 moebius_handle_event (ModeInfo *mi, XEvent *event)
 {
@@ -683,11 +673,7 @@ init_moebius (ModeInfo * mi)
 {
        moebiusstruct *mp;
 
-       if (moebius == NULL) {
-               if ((moebius = (moebiusstruct *) calloc(MI_NUM_SCREENS(mi),
-                                           sizeof (moebiusstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, moebius, NULL);
        mp = &moebius[MI_SCREEN(mi)];
        mp->step = NRAND(90);
        mp->ant_position = NRAND(90);
@@ -764,7 +750,7 @@ draw_moebius (ModeInfo * mi)
 
        /* moebius */
        if (!draw_moebius_strip(mi)) {
-               release_moebius(mi);
+               MI_ABORT(mi);
                return;
        }
 
index a65f5fcef2984740178c30e24b3e4962669c156b..0716cdcb858dc566de96560b5272a19636adf6d0 100644 (file)
@@ -236,14 +236,7 @@ init_mgears (ModeInfo *mi)
   mgears_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (mgears_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (mgears_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 4cc3d0849463a39e5e97879e3afd0d57f8c97766..57827b2b3d2e6fdbbbf30e374454653218ed5639 100644 (file)
@@ -1288,14 +1288,7 @@ init_molecule (ModeInfo *mi)
   molecule_configuration *mc;
   int wire;
 
-  if (!mcs) {
-    mcs = (molecule_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (molecule_configuration));
-    if (!mcs) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, mcs, NULL);
 
   mc = &mcs[MI_SCREEN(mi)];
 
index e96309acc5817fd2f1f3d2571e481a9f40dc9915..4bea5766f90002f2545eb7a9dd62b7a5d1c87e07 100644 (file)
@@ -59,6 +59,7 @@ static const char sccsid[] = "@(#)morph3d.c   5.01 2001/03/01 xlockmore";
                                                "*suppressRotationAnimation: True\n" \
 
 # define refresh_morph3d 0
+# define release_morph3d 0
 # define morph3d_handle_event 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
@@ -72,7 +73,7 @@ ENTRYPOINT ModeSpecOpt morph3d_opts =
 
 #ifdef USE_MODULES
 ModStruct   morph3d_description =
-{"morph3d", "init_morph3d", "draw_morph3d", "release_morph3d",
+{"morph3d", "init_morph3d", "draw_morph3d", (char *) NULL,
  "draw_morph3d", "change_morph3d", (char *) NULL, &morph3d_opts,
  1000, 0, 1, 1, 4, 1.0, "",
  "Shows GL morphing polyhedra", 0, NULL};
@@ -718,11 +719,7 @@ init_morph3d(ModeInfo * mi)
 {
        morph3dstruct *mp;
 
-       if (morph3d == NULL) {
-               if ((morph3d = (morph3dstruct *) calloc(MI_NUM_SCREENS(mi),
-                                           sizeof (morph3dstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, morph3d, NULL);
        mp = &morph3d[MI_SCREEN(mi)];
        mp->step = NRAND(90);
        mp->VisibleSpikes = 1;
@@ -829,16 +826,6 @@ change_morph3d(ModeInfo * mi)
 }
 #endif /* !STANDALONE */
 
-ENTRYPOINT void
-release_morph3d(ModeInfo * mi)
-{
-       if (morph3d != NULL) {
-               (void) free((void *) morph3d);
-               morph3d = (morph3dstruct *) NULL;
-       }
-       FreeAllGL(mi);
-}
-
 #endif
 
 XSCREENSAVER_MODULE ("Morph3D", morph3d)
index a10d685ea5467e67f5d54db333476c29632521e8..ab483f9ab6ce2ff237d3eae5bd7331106e1612e2 100644 (file)
@@ -444,14 +444,7 @@ init_noof (ModeInfo *mi)
   int i;
   noof_configuration *bp;
 
-  if (!bps) {
-    bps = (noof_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (noof_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 847b3b2926dd149b697e23c4ec16bf35306ccbcf..0f6312febf6a96b74a288a0b39f4dd5012e9e80f 100644 (file)
@@ -480,11 +480,7 @@ init_photopile (ModeInfo *mi)
   photopile_state *ss;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (sss == NULL) {
-    if ((sss = (photopile_state *)
-         calloc (MI_NUM_SCREENS(mi), sizeof(photopile_state))) == NULL)
-      return;
-  }
+  MI_INIT (mi, sss, NULL);
   ss = &sss[screen];
   ss->mi = mi;
 
index e93930854cecef5671b4fd250b820c86b4d1a693..c3dc60136718ab355f93f86e38d158fe5b997325 100644 (file)
@@ -72,7 +72,7 @@ Whether to simulate images taken by an instant camera.  Default: yes.
 Whether to draw images with drop shadows.  Default: no.
 .TP 8
 .B \-font \fIfont-name\fP
-The font to use for the initial loading screen.
+The font to use for the initial loading screen and for image titles.
 .TP 8
 .B \-fps
 Display the current frame rate, CPU load, and polygon count.
index 389786de62f50990c2c032d4c9fd7a6a82d56797..f368da2280a97aa01da51863e92a9b3fce771d19 100644 (file)
@@ -1315,14 +1315,7 @@ init_pinion (ModeInfo *mi)
 {
   pinion_configuration *pp;
 
-  if (!pps) {
-    pps = (pinion_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (pinion_configuration));
-    if (!pps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, pps, NULL);
 
   pp = &pps[MI_SCREEN(mi)];
 
index 2b83bbfd23a11c9e3bcb1d29419b180fc42c3191..77be33e1fce2ed41c40b4ea451b4e3f0aea39df0 100644 (file)
@@ -69,6 +69,7 @@ static const char sccsid[] = "@(#)pipes.c     4.07 97/11/24 xlockmore";
                                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_pipes 0
+# define release_pipes 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
@@ -132,7 +133,7 @@ ENTRYPOINT ModeSpecOpt pipes_opts =
 
 #ifdef USE_MODULES
 ModStruct   pipes_description =
-{"pipes", "init_pipes", "draw_pipes", "release_pipes",
+{"pipes", "init_pipes", "draw_pipes", NULL,
  "draw_pipes",
  "change_pipes", NULL, &pipes_opts,
  1000, 2, 5, 500, 4, 1.0, "",
@@ -688,17 +689,15 @@ pipes_handle_event (ModeInfo *mi, XEvent *event)
 static void generate_system (ModeInfo *);
 
 
+static void free_pipes (ModeInfo *);
+
 ENTRYPOINT void
 init_pipes (ModeInfo * mi)
 {
        int         screen = MI_SCREEN(mi);
        pipesstruct *pp;
 
-       if (pipes == NULL) {
-               if ((pipes = (pipesstruct *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (pipesstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, pipes, free_pipes);
        pp = &pipes[screen];
 
        pp->window = MI_WINDOW(mi);
@@ -1168,57 +1167,47 @@ change_pipes (ModeInfo * mi)
 #endif /* !STANDALONE */
 
 
-ENTRYPOINT void
-release_pipes (ModeInfo * mi)
+static void
+free_pipes (ModeInfo * mi)
 {
-       if (pipes != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       pipesstruct *pp = &pipes[screen];
-
-                       if (pp->glx_context) {
-
-                               /* Display lists MUST be freed while their glXContext is current. */
-                               glXMakeCurrent(MI_DISPLAY(mi), pp->window, *(pp->glx_context));
-
-                               if (pp->valve)
-                                       glDeleteLists(pp->valve, 1);
-                               if (pp->bolts)
-                                       glDeleteLists(pp->bolts, 1);
-                               if (pp->betweenbolts)
-                                       glDeleteLists(pp->betweenbolts, 1);
-
-                               if (pp->elbowbolts)
-                                       glDeleteLists(pp->elbowbolts, 1);
-                               if (pp->elbowcoins)
-                                       glDeleteLists(pp->elbowcoins, 1);
-
-                               if (pp->guagehead)
-                                       glDeleteLists(pp->guagehead, 1);
-                               if (pp->guageface)
-                                       glDeleteLists(pp->guageface, 1);
-                               if (pp->guagedial)
-                                       glDeleteLists(pp->guagedial, 1);
-                               if (pp->guageconnector)
-                                       glDeleteLists(pp->guageconnector, 1);
-                               if (pp->teapot)
-                                       glDeleteLists(pp->teapot, 1);
-                if (pp->dlists)
-                  {
-                    int i;
-                    for (i = 0; i < pp->dlist_count; i++)
-                      glDeleteLists (pp->dlists[i], 1);
-                    free (pp->dlists);
-                    free (pp->poly_counts);
-                  }
-                       }
-               }
+       pipesstruct *pp = &pipes[MI_SCREEN(mi)];
 
-               (void) free((void *) pipes);
-               pipes = NULL;
+       if (pp->glx_context) {
+
+               /* Display lists MUST be freed while their glXContext is current. */
+               glXMakeCurrent(MI_DISPLAY(mi), pp->window, *(pp->glx_context));
+
+               if (pp->valve)
+                       glDeleteLists(pp->valve, 1);
+               if (pp->bolts)
+                       glDeleteLists(pp->bolts, 1);
+               if (pp->betweenbolts)
+                       glDeleteLists(pp->betweenbolts, 1);
+
+               if (pp->elbowbolts)
+                       glDeleteLists(pp->elbowbolts, 1);
+               if (pp->elbowcoins)
+                       glDeleteLists(pp->elbowcoins, 1);
+
+               if (pp->guagehead)
+                       glDeleteLists(pp->guagehead, 1);
+               if (pp->guageface)
+                       glDeleteLists(pp->guageface, 1);
+               if (pp->guagedial)
+                       glDeleteLists(pp->guagedial, 1);
+               if (pp->guageconnector)
+                       glDeleteLists(pp->guageconnector, 1);
+               if (pp->teapot)
+                       glDeleteLists(pp->teapot, 1);
+        if (pp->dlists)
+          {
+            int i;
+            for (i = 0; i < pp->dlist_count; i++)
+              glDeleteLists (pp->dlists[i], 1);
+            free (pp->dlists);
+            free (pp->poly_counts);
+          }
        }
-       FreeAllGL(mi);
 }
 
 XSCREENSAVER_MODULE ("Pipes", pipes)
index 7d8d820b448c235b953325e40b14f4d5b0387b3f..a46453348f6ba7b861ee65f26f7a4a0e1cfdb149 100644 (file)
@@ -462,14 +462,7 @@ init_polyhedra (ModeInfo *mi)
   wire = 0;
 # endif
 
-  if (!bps) {
-    bps = (polyhedra_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (polyhedra_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 4f401d50a3b9b9b14f45f3fe0976b67a00a0d343..0b4d68481d7c7718d2f496075540fa26a5cb3168 100644 (file)
@@ -94,6 +94,7 @@ static const char sccsid[] = "@(#)polytopes.c  1.2 05/09/28 xlockmore";
                            "*suppressRotationAnimation: True\n" \
 
 # define refresh_polytopes 0
+# define release_polytopes 0
 # include "xlockmore.h"         /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"             /* from the xlockmore distribution */
@@ -109,7 +110,7 @@ static const char sccsid[] = "@(#)polytopes.c  1.2 05/09/28 xlockmore";
 
 #ifdef USE_MODULES
 ModStruct   polytopes_description =
-{"polytopes", "init_polytopes", "draw_polytopes", "release_polytopes",
+{"polytopes", "init_polytopes", "draw_polytopes", NULL,
  "draw_polytopes", "change_polytopes", NULL, &polytopes_opts,
  25000, 1, 1, 1, 1.0, 4, "",
  "Shows one of the six regular 4d polytopes rotating in 4d", 0, NULL};
@@ -2948,13 +2949,7 @@ ENTRYPOINT void init_polytopes(ModeInfo *mi)
 {
   polytopesstruct *pp;
 
-  if (poly == NULL)
-  {
-    poly = (polytopesstruct *)calloc(MI_NUM_SCREENS(mi),
-                                     sizeof(polytopesstruct));
-    if (poly == NULL)
-      return;
-  }
+  MI_INIT(mi, poly, NULL);
   pp = &poly[MI_SCREEN(mi)];
 
   pp->trackballs[0] = gltrackball_init(True);
@@ -3170,33 +3165,6 @@ ENTRYPOINT void draw_polytopes(ModeInfo *mi)
 }
 
 
-/*
- *-----------------------------------------------------------------------------
- *    The display is being taken away from us.  Free up malloc'ed 
- *      memory and X resources that we've alloc'ed.  Only called
- *      once, we must zap everything for every screen.
- *-----------------------------------------------------------------------------
- */
-
-ENTRYPOINT void release_polytopes(ModeInfo *mi)
-{
-  if (poly != NULL)
-  {
-    int screen;
-
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-    {
-      polytopesstruct *hp = &poly[screen];
-
-      if (hp->glx_context)
-        hp->glx_context = (GLXContext *)NULL;
-    }
-    (void) free((void *)poly);
-    poly = (polytopesstruct *)NULL;
-  }
-  FreeAllGL(mi);
-}
-
 #ifndef STANDALONE
 ENTRYPOINT void change_polytopes(ModeInfo *mi)
 {
index ac0cd5172079229fa0c94f66db456c2716572a4b..0fe29fa32a0fb9fad17976fb55b8787d497d4681 100644 (file)
@@ -220,6 +220,7 @@ static const char sccsid[] = "@(#)projectiveplane.c  1.1 14/01/01 xlockmore";
                             "*showFPS:    False \n" \
 
 # define refresh_projectiveplane 0
+# define release_projectiveplane 0
 # include "xlockmore.h"         /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"             /* from the xlockmore distribution */
@@ -239,7 +240,7 @@ static const char sccsid[] = "@(#)projectiveplane.c  1.1 14/01/01 xlockmore";
 #ifdef USE_MODULES
 ModStruct projectiveplane_description =
 {"projectiveplane", "init_projectiveplane", "draw_projectiveplane",
"release_projectiveplane", "draw_projectiveplane", "change_projectiveplane",
NULL, "draw_projectiveplane", "change_projectiveplane",
  NULL, &projectiveplane_opts, 25000, 1, 1, 1, 1.0, 4, "",
  "Rotate a 4d embedding of the real projective plane in 4d or walk on it",
  0, NULL};
@@ -248,18 +249,12 @@ ModStruct projectiveplane_description =
 
 
 static char *mode;
-static int display_mode;
 static char *appear;
-static int appearance;
 static char *color_mode;
-static int colors;
 static char *view_mode;
-static int view;
 static Bool marks;
 static char *proj_3d;
-static int projection_3d;
 static char *proj_4d;
-static int projection_4d;
 static float speed_wx;
 static float speed_wy;
 static float speed_wz;
@@ -344,6 +339,14 @@ ENTRYPOINT ModeSpecOpt projectiveplane_opts =
 typedef struct {
   GLint      WindH, WindW;
   GLXContext *glx_context;
+  /* Options */
+  int display_mode;
+  int appearance;
+  int colors;
+  int view;
+  Bool marks;
+  int projection_3d;
+  int projection_4d;
   /* 4D rotation angles */
   float alpha, beta, delta, zeta, eta, theta;
   /* Movement parameters */
@@ -572,12 +575,12 @@ static void quats_to_rotmat(float p[4], float q[4], float m[4][4])
 
 
 /* Compute a fully saturated and bright color based on an angle. */
-static void color(double angle, float col[4])
+static void color(projectiveplanestruct *pp, double angle, float col[4])
 {
   int s;
   double t;
 
-  if (colors == COLORS_TWOSIDED)
+  if (pp->colors == COLORS_TWOSIDED)
     return;
 
   if (angle >= 0.0)
@@ -621,7 +624,7 @@ static void color(double angle, float col[4])
       col[2] = 1.0-t;
       break;
   }
-  if (display_mode == DISP_TRANSPARENT)
+  if (pp->display_mode == DISP_TRANSPARENT)
     col[3] = 0.7;
   else
     col[3] = 1.0;
@@ -644,7 +647,7 @@ static void setup_projective_plane(ModeInfo *mi, double umin, double umax,
     for (j=0; j<=NUMU; j++)
     {
       k = i*(NUMU+1)+j;
-      if (appearance != APPEARANCE_DIRECTION_BANDS)
+      if (pp->appearance != APPEARANCE_DIRECTION_BANDS)
         u = -ur*j/NUMU+umin;
       else
         u = ur*j/NUMU+umin;
@@ -656,14 +659,14 @@ static void setup_projective_plane(ModeInfo *mi, double umin, double umax,
       sv2 = sin(0.5*v);
       cv4 = cos(0.25*v);
       sv4 = sin(0.25*v);
-      if (colors == COLORS_DEPTH)
-        color(((su*su*sv4*sv4-cv4*cv4)+1.0)*M_PI*2.0/3.0,pp->col[k]);
-      else if (colors == COLORS_DIRECTION)
-        color(2.0*M_PI+fmod(2.0*u,2.0*M_PI),pp->col[k]);
-      else /* colors == COLORS_DISTANCE */
-        color(v*(5.0/6.0),pp->col[k]);
+      if (pp->colors == COLORS_DEPTH)
+        color(pp,((su*su*sv4*sv4-cv4*cv4)+1.0)*M_PI*2.0/3.0,pp->col[k]);
+      else if (pp->colors == COLORS_DIRECTION)
+        color(pp,2.0*M_PI+fmod(2.0*u,2.0*M_PI),pp->col[k]);
+      else /* pp->colors == COLORS_DISTANCE */
+        color(pp,v*(5.0/6.0),pp->col[k]);
       pp->tex[k][0] = -32*u/(2.0*M_PI);
-      if (appearance != APPEARANCE_DISTANCE_BANDS)
+      if (pp->appearance != APPEARANCE_DISTANCE_BANDS)
         pp->tex[k][1] = 32*v/(2.0*M_PI);
       else
         pp->tex[k][1] = 32*v/(2.0*M_PI)-0.5;
@@ -708,7 +711,7 @@ static int projective_plane(ModeInfo *mi, double umin, double umax,
   float q1[4], q2[4], r1[4][4], r2[4][4];
   projectiveplanestruct *pp = &projectiveplane[MI_SCREEN(mi)];
 
-  if (view == VIEW_WALK || view == VIEW_WALKTURN)
+  if (pp->view == VIEW_WALK || pp->view == VIEW_WALKTURN)
   {
     /* Compute the rotation that rotates the projective plane in 4D without
        the trackball rotations. */
@@ -750,7 +753,7 @@ static int projective_plane(ModeInfo *mi, double umin, double umax,
       yv[l] = (mat[l][0]*xxv[0]+mat[l][1]*xxv[1]+
                mat[l][2]*xxv[2]+mat[l][3]*xxv[3]);
     }
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (pp->projection_4d == DISP_4D_ORTHOGRAPHIC)
     {
       for (l=0; l<3; l++)
       {
@@ -825,7 +828,7 @@ static int projective_plane(ModeInfo *mi, double umin, double umax,
         r += mat[l][m]*xx[m];
       y[l] = r;
     }
-    if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+    if (pp->projection_4d == DISP_4D_ORTHOGRAPHIC)
     {
       for (l=0; l<3; l++)
         p[l] = y[l]+pp->offset4d[l];
@@ -869,7 +872,7 @@ static int projective_plane(ModeInfo *mi, double umin, double umax,
         yv[l] = (mat[l][0]*pp->xv[o][0]+mat[l][1]*pp->xv[o][1]+
                  mat[l][2]*pp->xv[o][2]+mat[l][3]*pp->xv[o][3]);
       }
-      if (projection_4d == DISP_4D_ORTHOGRAPHIC)
+      if (pp->projection_4d == DISP_4D_ORTHOGRAPHIC)
       {
         for (l=0; l<3; l++)
         {
@@ -902,10 +905,10 @@ static int projective_plane(ModeInfo *mi, double umin, double umax,
     }
   }
 
-  if (colors == COLORS_TWOSIDED)
+  if (pp->colors == COLORS_TWOSIDED)
   {
     glColor3fv(mat_diff_red);
-    if (display_mode == DISP_TRANSPARENT)
+    if (pp->display_mode == DISP_TRANSPARENT)
     {
       glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_red);
       glMaterialfv(GL_BACK,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_green);
@@ -918,14 +921,14 @@ static int projective_plane(ModeInfo *mi, double umin, double umax,
   }
   glBindTexture(GL_TEXTURE_2D,pp->tex_name);
 
-  if (appearance != APPEARANCE_DIRECTION_BANDS)
+  if (pp->appearance != APPEARANCE_DIRECTION_BANDS)
   {
     for (i=0; i<NUMV; i++)
     {
-      if (appearance == APPEARANCE_DISTANCE_BANDS &&
+      if (pp->appearance == APPEARANCE_DISTANCE_BANDS &&
           ((i & (NUMB-1)) >= NUMB/4) && ((i & (NUMB-1)) < 3*NUMB/4))
         continue;
-      if (display_mode == DISP_WIREFRAME)
+      if (pp->display_mode == DISP_WIREFRAME)
         glBegin(GL_QUAD_STRIP);
       else
         glBegin(GL_TRIANGLE_STRIP);
@@ -938,7 +941,7 @@ static int projective_plane(ModeInfo *mi, double umin, double umax,
           o = l*(NUMU+1)+m;
           glNormal3fv(pp->pn[o]);
           glTexCoord2fv(pp->tex[o]);
-          if (colors != COLORS_TWOSIDED)
+          if (pp->colors != COLORS_TWOSIDED)
           {
             glColor3fv(pp->col[o]);
             glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE,pp->col[o]);
@@ -950,13 +953,13 @@ static int projective_plane(ModeInfo *mi, double umin, double umax,
       glEnd();
     }
   }
-  else /* appearance == APPEARANCE_DIRECTION_BANDS */
+  else /* pp->appearance == APPEARANCE_DIRECTION_BANDS */
   {
     for (j=0; j<NUMU; j++)
     {
       if ((j & (NUMB-1)) >= NUMB/2)
         continue;
-      if (display_mode == DISP_WIREFRAME)
+      if (pp->display_mode == DISP_WIREFRAME)
         glBegin(GL_QUAD_STRIP);
       else
         glBegin(GL_TRIANGLE_STRIP);
@@ -969,7 +972,7 @@ static int projective_plane(ModeInfo *mi, double umin, double umax,
           o = l*(NUMU+1)+m;
           glNormal3fv(pp->pn[o]);
           glTexCoord2fv(pp->tex[o]);
-          if (colors != COLORS_TWOSIDED)
+          if (pp->colors != COLORS_TWOSIDED)
           {
             glColor3fv(pp->col[o]);
             glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE,pp->col[o]);
@@ -1017,7 +1020,7 @@ static void init(ModeInfo *mi)
   if (walk_speed == 0.0)
     walk_speed = 20.0;
 
-  if (view == VIEW_TURN)
+  if (pp->view == VIEW_TURN)
   {
     pp->alpha = frand(360.0);
     pp->beta = frand(360.0);
@@ -1057,17 +1060,17 @@ static void init(ModeInfo *mi)
   gen_texture(mi);
   setup_projective_plane(mi,0.0,2.0*M_PI,0.0,2.0*M_PI);
 
-  if (marks)
+  if (pp->marks)
     glEnable(GL_TEXTURE_2D);
   else
     glDisable(GL_TEXTURE_2D);
 
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
-  if (projection_3d == DISP_3D_PERSPECTIVE ||
-      view == VIEW_WALK || view == VIEW_WALKTURN)
+  if (pp->projection_3d == DISP_3D_PERSPECTIVE ||
+      pp->view == VIEW_WALK || pp->view == VIEW_WALKTURN)
   {
-    if (view == VIEW_WALK || view == VIEW_WALKTURN)
+    if (pp->view == VIEW_WALK || pp->view == VIEW_WALKTURN)
       gluPerspective(60.0,1.0,0.01,10.0);
     else
       gluPerspective(60.0,1.0,0.1,10.0);
@@ -1080,11 +1083,11 @@ static void init(ModeInfo *mi)
   glLoadIdentity();
 
 # ifdef HAVE_JWZGLES /* #### glPolygonMode other than GL_FILL unimplemented */
-  if (display_mode == DISP_WIREFRAME)
-    display_mode = DISP_SURFACE;
+  if (pp->display_mode == DISP_WIREFRAME)
+    pp->display_mode = DISP_SURFACE;
 # endif
 
-  if (display_mode == DISP_SURFACE)
+  if (pp->display_mode == DISP_SURFACE)
   {
     glEnable(GL_DEPTH_TEST);
     glDepthFunc(GL_LESS);
@@ -1102,7 +1105,7 @@ static void init(ModeInfo *mi)
     glDepthMask(GL_TRUE);
     glDisable(GL_BLEND);
   }
-  else if (display_mode == DISP_TRANSPARENT)
+  else if (pp->display_mode == DISP_TRANSPARENT)
   {
     glDisable(GL_DEPTH_TEST);
     glShadeModel(GL_SMOOTH);
@@ -1120,7 +1123,7 @@ static void init(ModeInfo *mi)
     glEnable(GL_BLEND);
     glBlendFunc(GL_SRC_ALPHA,GL_ONE);
   }
-  else  /* display_mode == DISP_WIREFRAME */
+  else  /* pp->display_mode == DISP_WIREFRAME */
   {
     glDisable(GL_DEPTH_TEST);
     glShadeModel(GL_FLAT);
@@ -1139,7 +1142,7 @@ static void display_projectiveplane(ModeInfo *mi)
 
   if (!pp->button_pressed)
   {
-    if (view == VIEW_TURN)
+    if (pp->view == VIEW_TURN)
     {
       pp->alpha += speed_wx * pp->speed_scale;
       if (pp->alpha >= 360.0)
@@ -1160,7 +1163,7 @@ static void display_projectiveplane(ModeInfo *mi)
       if (pp->theta >= 360.0)
         pp->theta -= 360.0;
     }
-    if (view == VIEW_WALKTURN)
+    if (pp->view == VIEW_WALKTURN)
     {
       pp->zeta += speed_xy * pp->speed_scale;
       if (pp->zeta >= 360.0)
@@ -1172,7 +1175,7 @@ static void display_projectiveplane(ModeInfo *mi)
       if (pp->theta >= 360.0)
         pp->theta -= 360.0;
     }
-    if (view == VIEW_WALK || view == VIEW_WALKTURN)
+    if (pp->view == VIEW_WALK || pp->view == VIEW_WALKTURN)
     {
       pp->dvmove = (pp->dir*sin(walk_direction*M_PI/180.0)*
                     walk_speed*M_PI/4096.0);
@@ -1207,10 +1210,10 @@ static void display_projectiveplane(ModeInfo *mi)
 
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
-  if (projection_3d == DISP_3D_PERSPECTIVE ||
-      view == VIEW_WALK || view == VIEW_WALKTURN)
+  if (pp->projection_3d == DISP_3D_PERSPECTIVE ||
+      pp->view == VIEW_WALK || pp->view == VIEW_WALKTURN)
   {
-    if (view == VIEW_WALK || view == VIEW_WALKTURN)
+    if (pp->view == VIEW_WALK || pp->view == VIEW_WALKTURN)
       gluPerspective(60.0,pp->aspect,0.01,10.0);
     else
       gluPerspective(60.0,pp->aspect,0.1,10.0);
@@ -1318,14 +1321,7 @@ ENTRYPOINT void init_projectiveplane(ModeInfo *mi)
 {
   projectiveplanestruct *pp;
 
-  if (projectiveplane == NULL)
-  {
-    projectiveplane =
-      (projectiveplanestruct *)calloc(MI_NUM_SCREENS(mi),
-                                      sizeof(projectiveplanestruct));
-    if (projectiveplane == NULL)
-      return;
-  }
+  MI_INIT(mi, projectiveplane, NULL);
   pp = &projectiveplane[MI_SCREEN(mi)];
 
   
@@ -1337,145 +1333,146 @@ ENTRYPOINT void init_projectiveplane(ModeInfo *mi)
   /* Set the display mode. */
   if (!strcasecmp(mode,"random"))
   {
-    display_mode = random() % NUM_DISPLAY_MODES;
+    pp->display_mode = random() % NUM_DISPLAY_MODES;
   }
   else if (!strcasecmp(mode,"wireframe"))
   {
-    display_mode = DISP_WIREFRAME;
+    pp->display_mode = DISP_WIREFRAME;
   }
   else if (!strcasecmp(mode,"surface"))
   {
-    display_mode = DISP_SURFACE;
+    pp->display_mode = DISP_SURFACE;
   }
   else if (!strcasecmp(mode,"transparent"))
   {
-    display_mode = DISP_TRANSPARENT;
+    pp->display_mode = DISP_TRANSPARENT;
   }
   else
   {
-    display_mode = random() % NUM_DISPLAY_MODES;
+    pp->display_mode = random() % NUM_DISPLAY_MODES;
   }
 
   /* Orientation marks don't make sense in wireframe mode. */
-  if (display_mode == DISP_WIREFRAME)
-    marks = False;
+  pp->marks = marks;
+  if (pp->display_mode == DISP_WIREFRAME)
+    pp->marks = False;
 
   /* Set the appearance. */
   if (!strcasecmp(appear,"random"))
   {
-    appearance = random() % NUM_APPEARANCES;
+    pp->appearance = random() % NUM_APPEARANCES;
   }
   else if (!strcasecmp(appear,"solid"))
   {
-    appearance = APPEARANCE_SOLID;
+    pp->appearance = APPEARANCE_SOLID;
   }
   else if (!strcasecmp(appear,"distance-bands"))
   {
-    appearance = APPEARANCE_DISTANCE_BANDS;
+    pp->appearance = APPEARANCE_DISTANCE_BANDS;
   }
   else if (!strcasecmp(appear,"direction-bands"))
   {
-    appearance = APPEARANCE_DIRECTION_BANDS;
+    pp->appearance = APPEARANCE_DIRECTION_BANDS;
   }
   else
   {
-    appearance = random() % NUM_APPEARANCES;
+    pp->appearance = random() % NUM_APPEARANCES;
   }
 
   /* Set the color mode. */
   if (!strcasecmp(color_mode,"random"))
   {
-    colors = random() % NUM_COLORS;
+    pp->colors = random() % NUM_COLORS;
   }
   else if (!strcasecmp(color_mode,"two-sided"))
   {
-    colors = COLORS_TWOSIDED;
+    pp->colors = COLORS_TWOSIDED;
   }
   else if (!strcasecmp(color_mode,"distance"))
   {
-    colors = COLORS_DISTANCE;
+    pp->colors = COLORS_DISTANCE;
   }
   else if (!strcasecmp(color_mode,"direction"))
   {
-    colors = COLORS_DIRECTION;
+    pp->colors = COLORS_DIRECTION;
   }
   else if (!strcasecmp(color_mode,"depth"))
   {
-    colors = COLORS_DEPTH;
+    pp->colors = COLORS_DEPTH;
   }
   else
   {
-    colors = random() % NUM_COLORS;
+    pp->colors = random() % NUM_COLORS;
   }
 
   /* Set the view mode. */
   if (!strcasecmp(view_mode,"random"))
   {
-    view = random() % NUM_VIEW_MODES;
+    pp->view = random() % NUM_VIEW_MODES;
   }
   else if (!strcasecmp(view_mode,"walk"))
   {
-    view = VIEW_WALK;
+    pp->view = VIEW_WALK;
   }
   else if (!strcasecmp(view_mode,"turn"))
   {
-    view = VIEW_TURN;
+    pp->view = VIEW_TURN;
   }
   else if (!strcasecmp(view_mode,"walk-turn"))
   {
-    view = VIEW_WALKTURN;
+    pp->view = VIEW_WALKTURN;
   }
   else
   {
-    view = random() % NUM_VIEW_MODES;
+    pp->view = random() % NUM_VIEW_MODES;
   }
 
   /* Set the 3d projection mode. */
   if (!strcasecmp(proj_3d,"random"))
   {
     /* Orthographic projection only makes sense in turn mode. */
-    if (view == VIEW_TURN)
-      projection_3d = random() % NUM_DISP_3D_MODES;
+    if (pp->view == VIEW_TURN)
+      pp->projection_3d = random() % NUM_DISP_3D_MODES;
     else
-      projection_3d = DISP_3D_PERSPECTIVE;
+      pp->projection_3d = DISP_3D_PERSPECTIVE;
   }
   else if (!strcasecmp(proj_3d,"perspective"))
   {
-    projection_3d = DISP_3D_PERSPECTIVE;
+    pp->projection_3d = DISP_3D_PERSPECTIVE;
   }
   else if (!strcasecmp(proj_3d,"orthographic"))
   {
-    projection_3d = DISP_3D_ORTHOGRAPHIC;
+    pp->projection_3d = DISP_3D_ORTHOGRAPHIC;
   }
   else
   {
     /* Orthographic projection only makes sense in turn mode. */
-    if (view == VIEW_TURN)
-      projection_3d = random() % NUM_DISP_3D_MODES;
+    if (pp->view == VIEW_TURN)
+      pp->projection_3d = random() % NUM_DISP_3D_MODES;
     else
-      projection_3d = DISP_3D_PERSPECTIVE;
+      pp->projection_3d = DISP_3D_PERSPECTIVE;
   }
 
   /* Set the 4d projection mode. */
   if (!strcasecmp(proj_4d,"random"))
   {
-    projection_4d = random() % NUM_DISP_4D_MODES;
+    pp->projection_4d = random() % NUM_DISP_4D_MODES;
   }
   else if (!strcasecmp(proj_4d,"perspective"))
   {
-    projection_4d = DISP_4D_PERSPECTIVE;
+    pp->projection_4d = DISP_4D_PERSPECTIVE;
   }
   else if (!strcasecmp(proj_4d,"orthographic"))
   {
-    projection_4d = DISP_4D_ORTHOGRAPHIC;
+    pp->projection_4d = DISP_4D_ORTHOGRAPHIC;
   }
   else
   {
-    projection_4d = random() % NUM_DISP_4D_MODES;
+    pp->projection_4d = random() % NUM_DISP_4D_MODES;
   }
 
   /* Modify the speeds to a useful range in walk-and-turn mode. */
-  if (view == VIEW_WALKTURN)
+  if (pp->view == VIEW_WALKTURN)
   {
     speed_wx *= 0.2;
     speed_wy *= 0.2;
@@ -1535,33 +1532,6 @@ ENTRYPOINT void draw_projectiveplane(ModeInfo *mi)
 }
 
 
-/*
- *-----------------------------------------------------------------------------
- *    The display is being taken away from us.  Free up malloc'ed 
- *      memory and X resources that we've alloc'ed.  Only called
- *      once, we must zap everything for every screen.
- *-----------------------------------------------------------------------------
- */
-
-ENTRYPOINT void release_projectiveplane(ModeInfo *mi)
-{
-  if (projectiveplane != NULL)
-  {
-    int screen;
-
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-    {
-      projectiveplanestruct *pp = &projectiveplane[screen];
-
-      if (pp->glx_context)
-        pp->glx_context = (GLXContext *)NULL;
-    }
-    (void) free((void *)projectiveplane);
-    projectiveplane = (projectiveplanestruct *)NULL;
-  }
-  FreeAllGL(mi);
-}
-
 #ifndef STANDALONE
 ENTRYPOINT void change_projectiveplane(ModeInfo *mi)
 {
index 695ef7571ab170c77fb0453809da78466beb62c9..2d49bb4a956b635b8fb58de7b1b3b9751a8177a2 100644 (file)
@@ -20,6 +20,7 @@
                            "*wireframe: False \n"
 
 # define refresh_providence 0
+# define release_providence 0
 #include "xlockmore.h"
 #else
 #include "xlock.h"
@@ -53,7 +54,7 @@ ENTRYPOINT ModeSpecOpt providence_opts = {
 #ifdef USE_MODULES
 ModStruct   providence_description = {
   "providence", "init_providence", "draw_providence", 
-  "release_providence", "draw_providence", "change_providence", 
+  (char *) NULL, "draw_providence", "change_providence", 
   (char *) NULL, &providence_opts, 1000, 1, 1, 1, 4, 1.0, "",
   "draws pyramid with glory", 0, NULL
 };
@@ -625,18 +626,6 @@ static void pinit(providencestruct *mp)
   glEndList();
 }
 
-/* cleanup routine */
-ENTRYPOINT void release_providence(ModeInfo * mi) 
-{
-
-  if(providence) {
-    free((void *) providence);
-    providence = (providencestruct *) NULL;
-  }
-
-  FreeAllGL(mi);
-}
-
 /* event handling */
 ENTRYPOINT Bool providence_handle_event(ModeInfo *mi, XEvent *event) 
 {
@@ -671,11 +660,7 @@ ENTRYPOINT void init_providence(ModeInfo *mi)
 {
   providencestruct *mp;
   
-  if(!providence) {
-    if((providence = (providencestruct *) 
-       calloc(MI_NUM_SCREENS(mi), sizeof (providencestruct))) == NULL)
-      return;
-  }
+  MI_INIT(mi, providence, NULL);
   mp = &providence[MI_SCREEN(mi)];
   mp->trackball = gltrackball_init (False);
 
index 06301d171cd18aef142823a527815f1b0f7d1ce2..c229090d2279ef7b5210f84521a69786d927f61e 100644 (file)
@@ -45,6 +45,7 @@
                                                                                "*showFPS:          False   \n" \
 
 # define refresh_pulsar 0
+# define release_pulsar 0
 # define pulsar_handle_event 0
 # include "xlockmore.h"                                /* from the xpulsar distribution */
 #else /* !STANDALONE */
@@ -160,7 +161,7 @@ ENTRYPOINT ModeSpecOpt pulsar_opts = {countof(opts), opts, countof(vars), vars,
 
 #ifdef USE_MODULES
 ModStruct   pulsar_description =
-{"pulsar", "init_pulsar", "draw_pulsar", "release_pulsar",
+{"pulsar", "init_pulsar", "draw_pulsar", NULL,
  "draw_pulsar", "init_pulsar", NULL, &pulsar_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "OpenGL pulsar", 0, NULL};
@@ -481,6 +482,8 @@ reshape_pulsar(ModeInfo *mi, int width, int height)
   resetProjection();
 }
 
+static void free_pulsar(ModeInfo * mi);
+
 ENTRYPOINT void
 init_pulsar(ModeInfo * mi)
 {
@@ -488,10 +491,7 @@ init_pulsar(ModeInfo * mi)
 
   pulsarstruct *gp;
 
-  if (Pulsar == NULL) {
-       if ((Pulsar = (pulsarstruct *) calloc(MI_NUM_SCREENS(mi), sizeof (pulsarstruct))) == NULL)
-         return;
-  }
+  MI_INIT (mi, Pulsar, free_pulsar);
   gp = &Pulsar[screen];
 
   gp->window = MI_WINDOW(mi);
@@ -508,18 +508,10 @@ init_pulsar(ModeInfo * mi)
 
 
 /* all sorts of nice cleanup code should go here! */
-ENTRYPOINT void release_pulsar(ModeInfo * mi)
+static void free_pulsar(ModeInfo * mi)
 {
-  int screen;
-  if (Pulsar != NULL) {
-       for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-         pulsarstruct *gp = &Pulsar[screen];
-      free(gp->quads);
-       }
-       (void) free((void *) Pulsar);
-       Pulsar = NULL;
-  }
-  FreeAllGL(mi);
+  pulsarstruct *gp = &Pulsar[MI_SCREEN(mi)];
+  free(gp->quads);
 }
 #endif
 
index 708794a6f7108be09ad54627ee85bcfc72f3fe7e..2e761e358e2cc4f4663c9fd7c5b6c0da685bbed6 100644 (file)
@@ -192,14 +192,7 @@ init_quasicrystal (ModeInfo *mi)
   int tex_width;
   int i;
 
-  if (!bps) {
-    bps = (quasicrystal_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (quasicrystal_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index ecada1d98c13513ae190d71c59fd3a3eaa1faef9..cd3867cf9af87498d8367146ff71aeb490aafef3 100644 (file)
@@ -67,7 +67,7 @@ ENTRYPOINT ModeSpecOpt queens_opts = {countof(opts), opts, countof(vars), vars,
 
 #ifdef USE_MODULES
 ModStruct   queens_description =
-{"queens", "init_queens", "draw_queens", "release_queens",
+{"queens", "init_queens", "draw_queens", NULL,
  "draw_queens", "init_queens", NULL, &queens_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "Queens", 0, NULL};
@@ -537,9 +537,7 @@ ENTRYPOINT void init_queens(ModeInfo *mi)
   wire = 0;
 # endif
 
-  if(!qss && 
-     !(qss = (Queenscreen *) calloc(MI_NUM_SCREENS(mi), sizeof(Queenscreen))))
-    return;
+  MI_INIT (mi, qss, NULL);
   
   qs = &qss[screen];
   qs->window = MI_WINDOW(mi);
index 99310676120630f47f48afe7177c083bdd22be01..71d2c8d003fa492523893e06c4bf22f1693f58e3 100644 (file)
@@ -649,14 +649,7 @@ init_hoop (ModeInfo *mi)
   hoop_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (hoop_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (hoop_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 768e52bc25795c64137ff92d92222acf825473df..c6ae79f3340ca479c48ff47127f75fae19c79afe 100644 (file)
@@ -206,6 +206,7 @@ static const char sccsid[] = "@(#)romanboy.c  1.1 14/10/03 xlockmore";
                             "*showFPS:    False \n" \
 
 # define refresh_romanboy 0
+# define release_romanboy 0
 # include "xlockmore.h"         /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"             /* from the xlockmore distribution */
@@ -225,7 +226,7 @@ static const char sccsid[] = "@(#)romanboy.c  1.1 14/10/03 xlockmore";
 #ifdef USE_MODULES
 ModStruct romanboy_description =
 {"romanboy", "init_romanboy", "draw_romanboy",
"release_romanboy", "draw_romanboy", "change_romanboy",
NULL, "draw_romanboy", "change_romanboy",
  NULL, &romanboy_opts, 25000, 1, 1, 1, 1.0, 4, "",
  "Rotate a 3d immersion of the real projective plane in 3d or walk on it",
  0, NULL};
@@ -234,17 +235,12 @@ ModStruct romanboy_description =
 
 
 static char *mode;
-static int display_mode;
 static char *appear;
-static int appearance;
 static char *color_mode;
-static int colors;
 static char *view_mode;
-static int view;
 static Bool marks;
 static Bool deform;
 static char *proj;
-static int projection;
 static float speed_x;
 static float speed_y;
 static float speed_z;
@@ -328,6 +324,13 @@ ENTRYPOINT ModeSpecOpt romanboy_opts =
 typedef struct {
   GLint WindH, WindW;
   GLXContext *glx_context;
+  /* Options */
+  int display_mode;
+  int appearance;
+  int colors;
+  int view;
+  int projection;
+  Bool marks;
   /* 3D rotation angles */
   float alpha, beta, delta;
   /* Movement parameters */
@@ -470,12 +473,12 @@ static void quat_to_rotmat(float p[4], float m[3][3])
 
 
 /* Compute a fully saturated and bright color based on an angle. */
-static void color(double angle, float col[4])
+static void color(romanboystruct *pp, double angle, float col[4])
 {
   int s;
   double t;
 
-  if (colors == COLORS_TWOSIDED)
+  if (pp->colors == COLORS_TWOSIDED)
     return;
 
   if (angle >= 0.0)
@@ -519,7 +522,7 @@ static void color(double angle, float col[4])
       col[2] = 1.0-t;
       break;
   }
-  if (display_mode == DISP_TRANSPARENT)
+  if (pp->display_mode == DISP_TRANSPARENT)
     col[3] = 0.7;
   else
     col[3] = 1.0;
@@ -543,17 +546,17 @@ static void setup_roman_boy_color_texture(ModeInfo *mi, double umin,
     for (j=0; j<=numu; j++)
     {
       k = i*(numu+1)+j;
-      if (appearance != APPEARANCE_DIRECTION_BANDS)
+      if (pp->appearance != APPEARANCE_DIRECTION_BANDS)
         u = -ur*j/numu+umin;
       else
         u = ur*j/numu+umin;
       v = vr*i/numv+vmin;
-      if (colors == COLORS_DIRECTION)
-        color(2.0*M_PI-fmod(2.0*u,2.0*M_PI),&pp->col[4*k]);
-      else /* colors == COLORS_DISTANCE */
-        color(v*(5.0/6.0),&pp->col[4*k]);
+      if (pp->colors == COLORS_DIRECTION)
+        color(pp,2.0*M_PI-fmod(2.0*u,2.0*M_PI),&pp->col[4*k]);
+      else /* pp->colors == COLORS_DISTANCE */
+        color(pp,v*(5.0/6.0),&pp->col[4*k]);
       pp->tex[2*k+0] = -16*g*u/(2.0*M_PI);
-      if (appearance == APPEARANCE_DISTANCE_BANDS)
+      if (pp->appearance == APPEARANCE_DISTANCE_BANDS)
         pp->tex[2*k+1] = 32*v/(2.0*M_PI)-0.5;
       else
         pp->tex[2*k+1] = 32*v/(2.0*M_PI);
@@ -589,7 +592,7 @@ static int roman_boy(ModeInfo *mi, double umin, double umax,
   r = 1.0+d*d*(1.0/2.0+d*d*(1.0/6.0+d*d*(1.0/3.0)));
   radius = 1.0/r;
   oz = 0.5*r;
-  if (view == VIEW_WALK)
+  if (pp->view == VIEW_WALK)
   {
     u = pp->umove;
     v = pp->vmove;
@@ -738,10 +741,10 @@ static int roman_boy(ModeInfo *mi, double umin, double umax,
     mult_rotmat(r2,r1,mat);
   }
 
-  if (colors == COLORS_TWOSIDED)
+  if (pp->colors == COLORS_TWOSIDED)
   {
     glColor3fv(mat_diff_red);
-    if (display_mode == DISP_TRANSPARENT)
+    if (pp->display_mode == DISP_TRANSPARENT)
     {
       glMaterialfv(GL_FRONT,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_red);
       glMaterialfv(GL_BACK,GL_AMBIENT_AND_DIFFUSE,mat_diff_trans_green);
@@ -758,11 +761,11 @@ static int roman_boy(ModeInfo *mi, double umin, double umax,
   vr = vmax-vmin;
 
   /* Set up the projective plane coordinates and normals. */
-  if (appearance != APPEARANCE_DIRECTION_BANDS)
+  if (pp->appearance != APPEARANCE_DIRECTION_BANDS)
   {
     for (i=0; i<=numv; i++)
     {
-      if (appearance == APPEARANCE_DISTANCE_BANDS &&
+      if (pp->appearance == APPEARANCE_DISTANCE_BANDS &&
           ((i & (NUMB-1)) >= NUMB/4+1) && ((i & (NUMB-1)) < 3*NUMB/4))
         continue;
       for (j=0; j<=numu; j++)
@@ -859,7 +862,7 @@ static int roman_boy(ModeInfo *mi, double umin, double umax,
       }
     }
   }
-  else /* appearance == APPEARANCE_DIRECTION_BANDS */
+  else /* pp->appearance == APPEARANCE_DIRECTION_BANDS */
   {
     for (j=0; j<=numu; j++)
     {
@@ -960,14 +963,14 @@ static int roman_boy(ModeInfo *mi, double umin, double umax,
     }
   }
 
-  if (appearance != APPEARANCE_DIRECTION_BANDS)
+  if (pp->appearance != APPEARANCE_DIRECTION_BANDS)
   {
     for (i=0; i<numv; i++)
     {
-      if (appearance == APPEARANCE_DISTANCE_BANDS &&
+      if (pp->appearance == APPEARANCE_DISTANCE_BANDS &&
           ((i & (NUMB-1)) >= NUMB/4) && ((i & (NUMB-1)) < 3*NUMB/4))
         continue;
-      if (display_mode == DISP_WIREFRAME)
+      if (pp->display_mode == DISP_WIREFRAME)
         glBegin(GL_QUAD_STRIP);
       else
         glBegin(GL_TRIANGLE_STRIP);
@@ -979,7 +982,7 @@ static int roman_boy(ModeInfo *mi, double umin, double umax,
           m = j;
           o = l*(numu+1)+m;
           glTexCoord2fv(&pp->tex[2*o]);
-          if (colors != COLORS_TWOSIDED)
+          if (pp->colors != COLORS_TWOSIDED)
           {
             glColor3fv(&pp->col[4*o]);
             glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE,
@@ -993,13 +996,13 @@ static int roman_boy(ModeInfo *mi, double umin, double umax,
       glEnd();
     }
   }
-  else /* appearance == APPEARANCE_DIRECTION_BANDS */
+  else /* pp->appearance == APPEARANCE_DIRECTION_BANDS */
   {
     for (j=0; j<numu; j++)
     {
       if ((j & (NUMB-1)) >= NUMB/2)
         continue;
-      if (display_mode == DISP_WIREFRAME)
+      if (pp->display_mode == DISP_WIREFRAME)
         glBegin(GL_QUAD_STRIP);
       else
         glBegin(GL_TRIANGLE_STRIP);
@@ -1011,7 +1014,7 @@ static int roman_boy(ModeInfo *mi, double umin, double umax,
           m = (j+k);
           o = l*(numu+1)+m;
           glTexCoord2fv(&pp->tex[2*o]);
-          if (colors != COLORS_TWOSIDED)
+          if (pp->colors != COLORS_TWOSIDED)
           {
             glColor3fv(&pp->col[4*o]);
             glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT_AND_DIFFUSE,
@@ -1069,7 +1072,7 @@ static void init(ModeInfo *mi)
   if (walk_speed == 0.0)
     walk_speed = 20.0;
 
-  if (view == VIEW_TURN)
+  if (pp->view == VIEW_TURN)
   {
     pp->alpha = frand(360.0);
     pp->beta = frand(360.0);
@@ -1101,16 +1104,16 @@ static void init(ModeInfo *mi)
   gen_texture(mi);
   setup_roman_boy_color_texture(mi,0.0,2.0*M_PI,0.0,2.0*M_PI,pp->g*NUMU,NUMV);
 
-  if (marks)
+  if (pp->marks)
     glEnable(GL_TEXTURE_2D);
   else
     glDisable(GL_TEXTURE_2D);
 
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
-  if (projection == DISP_PERSPECTIVE || view == VIEW_WALK)
+  if (pp->projection == DISP_PERSPECTIVE || pp->view == VIEW_WALK)
   {
-    if (view == VIEW_WALK)
+    if (pp->view == VIEW_WALK)
       gluPerspective(60.0,1.0,0.01,10.0);
     else
       gluPerspective(60.0,1.0,0.1,10.0);
@@ -1123,11 +1126,11 @@ static void init(ModeInfo *mi)
   glLoadIdentity();
 
 # ifdef HAVE_JWZGLES /* #### glPolygonMode other than GL_FILL unimplemented */
-  if (display_mode == DISP_WIREFRAME)
-    display_mode = DISP_SURFACE;
+  if (pp->display_mode == DISP_WIREFRAME)
+    pp->display_mode = DISP_SURFACE;
 # endif
 
-  if (display_mode == DISP_SURFACE)
+  if (pp->display_mode == DISP_SURFACE)
   {
     glEnable(GL_DEPTH_TEST);
     glDepthFunc(GL_LESS);
@@ -1145,7 +1148,7 @@ static void init(ModeInfo *mi)
     glDepthMask(GL_TRUE);
     glDisable(GL_BLEND);
   }
-  else if (display_mode == DISP_TRANSPARENT)
+  else if (pp->display_mode == DISP_TRANSPARENT)
   {
     glDisable(GL_DEPTH_TEST);
     glShadeModel(GL_SMOOTH);
@@ -1163,7 +1166,7 @@ static void init(ModeInfo *mi)
     glEnable(GL_BLEND);
     glBlendFunc(GL_SRC_ALPHA,GL_ONE);
   }
-  else  /* display_mode == DISP_WIREFRAME */
+  else  /* pp->display_mode == DISP_WIREFRAME */
   {
     glDisable(GL_DEPTH_TEST);
     glShadeModel(GL_FLAT);
@@ -1196,7 +1199,7 @@ static void display_romanboy(ModeInfo *mi)
         pp->defdir = -pp->defdir;
       }
     }
-    if (view == VIEW_TURN)
+    if (pp->view == VIEW_TURN)
     {
       pp->alpha += speed_x * pp->speed_scale;
       if (pp->alpha >= 360.0)
@@ -1208,7 +1211,7 @@ static void display_romanboy(ModeInfo *mi)
       if (pp->delta >= 360.0)
         pp->delta -= 360.0;
     }
-    if (view == VIEW_WALK)
+    if (pp->view == VIEW_WALK)
     {
       pp->dvmove = (pp->dir*sin(walk_direction*M_PI/180.0)*
                     walk_speed*M_PI/4096.0);
@@ -1243,9 +1246,9 @@ static void display_romanboy(ModeInfo *mi)
 
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
-  if (projection == DISP_PERSPECTIVE || view == VIEW_WALK)
+  if (pp->projection == DISP_PERSPECTIVE || pp->view == VIEW_WALK)
   {
-    if (view == VIEW_WALK)
+    if (pp->view == VIEW_WALK)
       gluPerspective(60.0,pp->aspect,0.01,10.0);
     else
       gluPerspective(60.0,pp->aspect,0.1,10.0);
@@ -1311,6 +1314,8 @@ ENTRYPOINT Bool romanboy_handle_event(ModeInfo *mi, XEvent *event)
  *-----------------------------------------------------------------------------
  */
 
+static void free_romanboy(ModeInfo *mi);
+
 /*
  *-----------------------------------------------------------------------------
  *    Initialize romanboy.  Called each time the window changes.
@@ -1321,13 +1326,7 @@ ENTRYPOINT void init_romanboy(ModeInfo *mi)
 {
   romanboystruct *pp;
 
-  if (romanboy == NULL)
-  {
-    romanboy =
-      (romanboystruct *)calloc(MI_NUM_SCREENS(mi),sizeof(romanboystruct));
-    if (romanboy == NULL)
-      return;
-  }
+  MI_INIT (mi, romanboy, free_romanboy);
   pp = &romanboy[MI_SCREEN(mi)];
 
   if (surface_order < 2)
@@ -1348,115 +1347,117 @@ ENTRYPOINT void init_romanboy(ModeInfo *mi)
   /* Set the display mode. */
   if (!strcasecmp(mode,"random"))
   {
-    display_mode = random() % NUM_DISPLAY_MODES;
+    pp->display_mode = random() % NUM_DISPLAY_MODES;
   }
   else if (!strcasecmp(mode,"wireframe"))
   {
-    display_mode = DISP_WIREFRAME;
+    pp->display_mode = DISP_WIREFRAME;
   }
   else if (!strcasecmp(mode,"surface"))
   {
-    display_mode = DISP_SURFACE;
+    pp->display_mode = DISP_SURFACE;
   }
   else if (!strcasecmp(mode,"transparent"))
   {
-    display_mode = DISP_TRANSPARENT;
+    pp->display_mode = DISP_TRANSPARENT;
   }
   else
   {
-    display_mode = random() % NUM_DISPLAY_MODES;
+    pp->display_mode = random() % NUM_DISPLAY_MODES;
   }
 
+  pp->marks = marks;
+
   /* Orientation marks don't make sense in wireframe mode. */
-  if (display_mode == DISP_WIREFRAME)
-    marks = False;
+  if (pp->display_mode == DISP_WIREFRAME)
+    pp->marks = False;
 
   /* Set the appearance. */
   if (!strcasecmp(appear,"random"))
   {
-    appearance = random() % NUM_APPEARANCES;
+    pp->appearance = random() % NUM_APPEARANCES;
   }
   else if (!strcasecmp(appear,"solid"))
   {
-    appearance = APPEARANCE_SOLID;
+    pp->appearance = APPEARANCE_SOLID;
   }
   else if (!strcasecmp(appear,"distance-bands"))
   {
-    appearance = APPEARANCE_DISTANCE_BANDS;
+    pp->appearance = APPEARANCE_DISTANCE_BANDS;
   }
   else if (!strcasecmp(appear,"direction-bands"))
   {
-    appearance = APPEARANCE_DIRECTION_BANDS;
+    pp->appearance = APPEARANCE_DIRECTION_BANDS;
   }
   else
   {
-    appearance = random() % NUM_APPEARANCES;
+    pp->appearance = random() % NUM_APPEARANCES;
   }
 
   /* Set the color mode. */
   if (!strcasecmp(color_mode,"random"))
   {
-    colors = random() % NUM_COLORS;
+    pp->colors = random() % NUM_COLORS;
   }
   else if (!strcasecmp(color_mode,"two-sided"))
   {
-    colors = COLORS_TWOSIDED;
+    pp->colors = COLORS_TWOSIDED;
   }
   else if (!strcasecmp(color_mode,"distance"))
   {
-    colors = COLORS_DISTANCE;
+    pp->colors = COLORS_DISTANCE;
   }
   else if (!strcasecmp(color_mode,"direction"))
   {
-    colors = COLORS_DIRECTION;
+    pp->colors = COLORS_DIRECTION;
   }
   else
   {
-    colors = random() % NUM_COLORS;
+    pp->colors = random() % NUM_COLORS;
   }
 
   /* Set the view mode. */
   if (!strcasecmp(view_mode,"random"))
   {
-    view = random() % NUM_VIEW_MODES;
+    pp->view = random() % NUM_VIEW_MODES;
   }
   else if (!strcasecmp(view_mode,"walk"))
   {
-    view = VIEW_WALK;
+    pp->view = VIEW_WALK;
   }
   else if (!strcasecmp(view_mode,"turn"))
   {
-    view = VIEW_TURN;
+    pp->view = VIEW_TURN;
   }
   else
   {
-    view = random() % NUM_VIEW_MODES;
+    pp->view = random() % NUM_VIEW_MODES;
   }
 
   /* Set the 3d projection mode. */
   if (!strcasecmp(proj,"random"))
   {
     /* Orthographic projection only makes sense in turn mode. */
-    if (view == VIEW_TURN)
-      projection = random() % NUM_DISP_MODES;
+    if (pp->view == VIEW_TURN)
+      pp->projection = random() % NUM_DISP_MODES;
     else
-      projection = DISP_PERSPECTIVE;
+      pp->projection = DISP_PERSPECTIVE;
   }
   else if (!strcasecmp(proj,"perspective"))
   {
-    projection = DISP_PERSPECTIVE;
+    pp->projection = DISP_PERSPECTIVE;
   }
   else if (!strcasecmp(proj,"orthographic"))
   {
-    projection = DISP_ORTHOGRAPHIC;
+    pp->projection = DISP_ORTHOGRAPHIC;
   }
   else
   {
     /* Orthographic projection only makes sense in turn mode. */
-    if (view == VIEW_TURN)
-      projection = random() % NUM_DISP_MODES;
+    if (pp->view == VIEW_TURN)
+      pp->projection = random() % NUM_DISP_MODES;
     else
-      projection = DISP_PERSPECTIVE;
+      pp->projection = DISP_PERSPECTIVE;
   }
 
   /* make multiple screens rotate at slightly different rates. */
@@ -1512,36 +1513,22 @@ ENTRYPOINT void draw_romanboy(ModeInfo *mi)
 /*
  *-----------------------------------------------------------------------------
  *    The display is being taken away from us.  Free up malloc'ed 
- *      memory and X resources that we've alloc'ed.  Only called
- *      once, we must zap everything for every screen.
+ *      memory and X resources that we've alloc'ed.
  *-----------------------------------------------------------------------------
  */
 
-ENTRYPOINT void release_romanboy(ModeInfo *mi)
+static void free_romanboy(ModeInfo *mi)
 {
-  if (romanboy != NULL)
-  {
-    int screen;
+  romanboystruct *pp = &romanboy[MI_SCREEN(mi)];
 
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-    {
-      romanboystruct *pp = &romanboy[screen];
-
-      if (pp->glx_context)
-        pp->glx_context = (GLXContext *)NULL;
-      if (pp->pp)
-        (void) free((void *)pp->pp);
-      if (pp->pn)
-        (void) free((void *)pp->pn);
-      if (pp->col)
-        (void) free((void *)pp->col);
-      if (pp->tex)
-        (void) free((void *)pp->tex);
-    }
-    (void) free((void *)romanboy);
-    romanboy = (romanboystruct *)NULL;
-  }
-  FreeAllGL(mi);
+  if (pp->pp)
+    (void) free((void *)pp->pp);
+  if (pp->pn)
+    (void) free((void *)pp->pn);
+  if (pp->col)
+    (void) free((void *)pp->col);
+  if (pp->tex)
+    (void) free((void *)pp->tex);
 }
 
 #ifndef STANDALONE
index 0cc99019ebc19ab8dc4970a6f2ee9e127117f28e..7d43bd856a1fe61d08ed1b8b097442974bc4dd58 100644 (file)
@@ -113,6 +113,7 @@ static const char sccsid[] = "@(#)rubik.c   5.01 2001/03/01 xlockmore";
                                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_rubik 0
+# define release_rubik 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
@@ -163,7 +164,7 @@ ENTRYPOINT ModeSpecOpt rubik_opts =
 
 #ifdef USE_MODULES
 ModStruct   rubik_description =
-{"rubik", "init_rubik", "draw_rubik", "release_rubik",
+{"rubik", "init_rubik", "draw_rubik", (char *) NULL,
  "draw_rubik", "change_rubik", (char *) NULL, &rubik_opts,
  10000, -30, 5, -6, 64, 1.0, "",
  "Shows an auto-solving Rubik's Cube", 0, NULL};
@@ -1869,8 +1870,9 @@ pinit(ModeInfo * mi)
 }
 
 static void
-free_rubik(rubikstruct *rp)
+free_rubik(ModeInfo *mi)
 {
+       rubikstruct *rp = &rubik[MI_SCREEN(mi)];
        int         i;
 
        for (i = 0; i < MAXFACES; i++)
@@ -1889,33 +1891,12 @@ free_rubik(rubikstruct *rp)
        }
 }
 
-ENTRYPOINT void
-release_rubik(ModeInfo * mi)
-{
-       if (rubik != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       rubikstruct *rp = &rubik[screen];
-
-                       free_rubik(rp);
-               }
-               (void) free((void *) rubik);
-               rubik = (rubikstruct *) NULL;
-       }
-       FreeAllGL(mi);
-}
-
 ENTRYPOINT void
 init_rubik(ModeInfo * mi)
 {
        rubikstruct *rp;
 
-       if (rubik == NULL) {
-               if ((rubik = (rubikstruct *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (rubikstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, rubik, free_rubik);
        rp = &rubik[MI_SCREEN(mi)];
        rp->step = NRAND(90);
        rp->PX = ((float) LRAND() / (float) MAXRAND) * 2.0 - 1.0;
@@ -1928,7 +1909,7 @@ init_rubik(ModeInfo * mi)
                reshape_rubik(mi, MI_WIDTH(mi), MI_HEIGHT(mi));
                glDrawBuffer(GL_BACK);
                if (!pinit(mi)) {
-                       free_rubik(rp);
+                       free_rubik(mi);
                        if (MI_IS_VERBOSE(mi)) {
                                (void) fprintf(stderr,
                                        "Could not allocate memory for rubik\n");
@@ -2028,7 +2009,7 @@ draw_rubik(ModeInfo * mi)
        glRotatef(rp->step * 90, 0, 0, 1);
 
        if (!draw_cube(mi)) {
-               release_rubik(mi);
+               MI_ABORT(mi);
                return;
        }
         if (MI_IS_FPS(mi)) do_fps (mi);
@@ -2061,7 +2042,7 @@ draw_rubik(ModeInfo * mi)
                                rp->rotatestep += rp->anglestep;
                                if (rp->rotatestep > rp->degreeTurn) {
                                        if (!evalmovement(mi, rp->movement)) {
-                                               free_rubik(rp);
+                                               free_rubik(mi);
                                                if (MI_IS_VERBOSE(mi)) {
                                                        (void) fprintf(stderr,
                                                                "Could not allocate memory for rubik\n");
@@ -2077,7 +2058,7 @@ draw_rubik(ModeInfo * mi)
                if (rp->done) {
                        if (++rp->rotatestep > DELAY_AFTER_SOLVING)
                                if (!shuffle(mi)) {
-                                       free_rubik(rp);
+                                       free_rubik(mi);
                                        if (MI_IS_VERBOSE(mi)) {
                                                (void) fprintf(stderr,
                                                        "Could not allocate memory for rubik\n");
@@ -2105,7 +2086,7 @@ draw_rubik(ModeInfo * mi)
                                rp->rotatestep += rp->anglestep;
                                if (rp->rotatestep > rp->degreeTurn) {
                                        if (!evalmovement(mi, rp->movement)) {
-                                               free_rubik(rp);
+                                               free_rubik(mi);
                                                if (MI_IS_VERBOSE(mi)) {
                                                        (void) fprintf(stderr,
                                                                "Could not allocate memory for rubik\n");
@@ -2139,7 +2120,7 @@ change_rubik(ModeInfo * mi)
        if (!rp->glx_context)
                return;
        if (!pinit(mi)) {
-               free_rubik(rp);
+               free_rubik(mi);
                if (MI_IS_VERBOSE(mi)) {
                        (void) fprintf(stderr,
                                "Could not allocate memory for rubik\n");
index 71682fc3f738039e7cc6cfcc495320438e828b53..9a6ecbdc06ae4794f0b4971ef326e5c09e40bebb 100644 (file)
@@ -23,6 +23,7 @@
                   "*suppressRotationAnimation: True\n" \
 
 # define refresh_rubikblocks 0
+# define release_rubikblocks 0
 #include "xlockmore.h"
 #include "rotator.h"
 #include "gltrackball.h"
@@ -88,7 +89,7 @@ ENTRYPOINT ModeSpecOpt rubikblocks_opts = {countof(opts), opts, countof(vars), v
 
 #ifdef USE_MODULES
 ModStruct   rubikblocks_description =
-{ "rubikblocks", "init_rubikblocks", "draw_rubikblocks", "release_rubikblocks",
+{ "rubikblocks", "init_rubikblocks", "draw_rubikblocks", NULL,
   "draw_rubikblocks", "change_rubikblocks", NULL, &rubikblocks_opts,
   25000, 1, 1, 1, 1.0, 4, "",
   "Shows randomly shuffling Rubik's Mirror Blocks puzzle", 0, NULL
@@ -551,34 +552,11 @@ reshape_rubikblocks(ModeInfo *mi, int width, int height)
   glClear(GL_COLOR_BUFFER_BIT);
 }
 
-ENTRYPOINT void 
-release_rubikblocks(ModeInfo *mi) 
-{
-  if (rubikblocks != NULL) 
-  {
-    int screen;
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) 
-    {
-      rubikblocks_conf *cp = &rubikblocks[screen];
-      if (cp->glx_context) {
-        cp->glx_context = NULL;
-      }
-    }
-    free((void *)rubikblocks);
-    rubikblocks = NULL;
-  }
-  FreeAllGL(mi);
-}
-
 ENTRYPOINT void 
 init_rubikblocks(ModeInfo *mi) 
 {
   rubikblocks_conf *cp;
-  if(!rubikblocks) 
-  {
-    rubikblocks = (rubikblocks_conf *)calloc(MI_NUM_SCREENS(mi), sizeof(rubikblocks_conf));
-    if(!rubikblocks) return;
-  }
+  MI_INIT(mi, rubikblocks, NULL);
   cp = &rubikblocks[MI_SCREEN(mi)];
 
   if(tex)
@@ -611,7 +589,7 @@ draw_rubikblocks(ModeInfo * mi)
   glXMakeCurrent(display, window, *(cp->glx_context));
   if (!draw_main(mi, cp)) 
   {
-    release_rubikblocks(mi);
+    MI_ABORT(mi);
     return;
   }
   if (MI_IS_FPS(mi)) do_fps (mi);
index 4e731ea2ba932568d02f244123794200e237a7e8..bae0b78902a5d7569495c7f8e2d48417971d5fc0 100644 (file)
@@ -48,6 +48,7 @@ static const char sccsid[] = "@(#)sballs.c    5.02 2001/03/10 xlockmore";
                        "*wireframe:    False \n" \
 
 # define refresh_sballs 0
+# define release_sballs 0
 #define MODE_sballs
 #include "xlockmore.h"         /* from the xscreensaver distribution */
 #include "gltrackball.h"
@@ -117,7 +118,7 @@ ENTRYPOINT ModeSpecOpt sballs_opts =
 
 #ifdef USE_MODULES
 ModStruct sballs_description =
-    { "sballs", "init_sballs", "draw_sballs", "release_sballs",
+    { "sballs", "init_sballs", "draw_sballs", NULL,
     "draw_sballs", "change_sballs", (char *) NULL, &sballs_opts,
     /*
     delay,count,cycles,size,ncolors,sat
@@ -685,6 +686,8 @@ static void Init(ModeInfo * mi)
  *-----------------------------------------------------------------------------
  */
 
+static void free_sballs(ModeInfo * mi);
+
 /*
  *-----------------------------------------------------------------------------
  *    Initialize sballs.  Called each time the window changes.
@@ -695,11 +698,7 @@ ENTRYPOINT void init_sballs(ModeInfo * mi)
 {
     sballsstruct *sb;
 
-    if (sballs == NULL) {
-       if ((sballs = (sballsstruct *) calloc(MI_NUM_SCREENS(mi),
-                                         sizeof(sballsstruct))) == NULL)
-           return;
-    }
+    MI_INIT(mi, sballs, free_sballs);
     sb = &sballs[MI_SCREEN(mi)];
 
     sb->trackball = gltrackball_init (True);
@@ -754,33 +753,27 @@ ENTRYPOINT void draw_sballs(ModeInfo * mi)
 /*
  *-----------------------------------------------------------------------------
  *    The display is being taken away from us.  Free up malloc'ed
- *      memory and X resources that we've alloc'ed.  Only called
- *      once, we must zap everything for every screen.
+ *      memory and X resources that we've alloc'ed.
  *-----------------------------------------------------------------------------
  */
 
-ENTRYPOINT void release_sballs(ModeInfo * mi)
+static void free_sballs(ModeInfo * mi)
 {
-    int screen;
-
-    if (sballs != NULL) {
-       for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-           sballsstruct *sb = &sballs[screen];
-           if (sb->btexture)
-           {
-               glDeleteTextures(1,&sb->backid);
-               XDestroyImage(sb->btexture);
-           }
-           if (sb->ftexture)
-           {
-               glDeleteTextures(1,&sb->faceid);
-               XDestroyImage(sb->ftexture);
-           }
+    sballsstruct *sb = &sballs[MI_SCREEN(mi)];
+    if (sb->glx_context)
+    {
+       glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(sb->glx_context));
+       if (sb->btexture)
+       {
+           glDeleteTextures(1,&sb->backid);
+           XDestroyImage(sb->btexture);
+       }
+       if (sb->ftexture)
+       {
+           glDeleteTextures(1,&sb->faceid);
+           XDestroyImage(sb->ftexture);
        }
-       (void) free((void *) sballs);
-       sballs = (sballsstruct *) NULL;
     }
-    FreeAllGL(mi);
 }
 
 ENTRYPOINT Bool
diff --git a/hacks/glx/seccam.c b/hacks/glx/seccam.c
new file mode 100644 (file)
index 0000000..a72dd1a
--- /dev/null
@@ -0,0 +1,1388 @@
+/* Generated from "seccam.dxf" on 31-May-2017.
+   Smoothed vertex normals.
+   Components: body, cap, hinge, lens, pipe.
+ */
+
+#include "gllist.h"
+
+static const float seccam_body_data[] = {
+       0,0.894427,0.447214,-5,2.25,5,
+       0,0.952226,0.305393,7.75,3,3.5,
+       0,0.988273,0.152697,-5,3,3.5,
+       0,0.952226,0.305393,7.75,3,3.5,
+       0,0.894427,0.447214,-5,2.25,5,
+       0,0.894427,0.447214,7.75,2.25,5,
+       0,0.172669,-0.98498,7.75,2.450912,1.010298,
+       0,0.083016,-0.996548,-5,2.36871,1,
+       0,0.22073,-0.975335,-5,2.450912,1.010298,
+       0,0.083016,-0.996548,-5,2.36871,1,
+       0,0.172669,-0.98498,7.75,2.450912,1.010298,
+       0,0.041508,-0.999138,7.75,2.36871,1,
+       0,0.996548,-0.083016,-5,3,1.63129,
+       0,0.98498,-0.172669,7.75,2.989702,1.549088,
+       0,0.975335,-0.22073,-5,2.989702,1.549088,
+       0,0.98498,-0.172669,7.75,2.989702,1.549088,
+       0,0.996548,-0.083016,-5,3,1.63129,
+       0,0.999138,-0.041508,7.75,3,1.63129,
+       0,0.041508,-0.999138,7.75,2.36871,1,
+       0,0,-1,-5,2.25,1,
+       0,0.083016,-0.996548,-5,2.36871,1,
+       0,0,-1,-5,2.25,1,
+       0,0.041508,-0.999138,7.75,2.36871,1,
+       0,0,-1,7.75,2.25,1,
+       0,0.450399,-0.892827,7.75,2.640242,1.078314,
+       0,0.361055,-0.932544,-5,2.548078,1.037344,
+       0,0.49361,-0.869683,-5,2.640242,1.078314,
+       0,0.361055,-0.932544,-5,2.548078,1.037344,
+       0,0.450399,-0.892827,7.75,2.640242,1.078314,
+       0,0.314923,-0.949117,7.75,2.548078,1.037344,
+       0,0.869683,-0.49361,-5,2.921686,1.359758,
+       0,0.817322,-0.576182,7.75,2.867672,1.274581,
+       0,0.788104,-0.615542,-5,2.867672,1.274581,
+       0,0.817322,-0.576182,7.75,2.867672,1.274581,
+       0,0.869683,-0.49361,-5,2.921686,1.359758,
+       0,0.892827,-0.450399,7.75,2.921686,1.359758,
+       0,0,-1,7.75,2.25,1,
+       0,0,-1,-5,0,1,
+       0,0,-1,-5,2.25,1,
+       0,0,-1,-5,0,1,
+       0,0,-1,7.75,2.25,1,
+       0,0,-1,7.75,0,1,
+       0,0,1,7.75,0,5,
+       0,0,1,-5,2.25,5,
+       0,0,1,-5,0,5,
+       0,0,1,-5,2.25,5,
+       0,0,1,7.75,0,5,
+       0,0,1,7.75,2.25,5,
+       0,0.576182,-0.817322,7.75,2.725419,1.132328,
+       0,0.49361,-0.869683,-5,2.640242,1.078314,
+       0,0.615542,-0.788104,-5,2.725419,1.132328,
+       0,0.49361,-0.869683,-5,2.640242,1.078314,
+       0,0.576182,-0.817322,7.75,2.725419,1.132328,
+       0,0.450399,-0.892827,7.75,2.640242,1.078314,
+       0,1,0,-5,3,1.75,
+       0,0.999138,-0.041508,7.75,3,1.63129,
+       0,0.996548,-0.083016,-5,3,1.63129,
+       0,0.999138,-0.041508,7.75,3,1.63129,
+       0,1,0,-5,3,1.75,
+       0,1,0,7.75,3,1.75,
+       0,0.932544,-0.361055,-5,2.962656,1.451922,
+       0,0.892827,-0.450399,7.75,2.921686,1.359758,
+       0,0.869683,-0.49361,-5,2.921686,1.359758,
+       0,0.892827,-0.450399,7.75,2.921686,1.359758,
+       0,0.932544,-0.361055,-5,2.962656,1.451922,
+       0,0.949117,-0.314923,7.75,2.962656,1.451922,
+       0,0.788104,-0.615542,-5,2.867672,1.274581,
+       0,0.707107,-0.707107,7.75,2.801777,1.198223,
+       0,0.707107,-0.707107,-5,2.801777,1.198223,
+       0,0.707107,-0.707107,7.75,2.801777,1.198223,
+       0,0.788104,-0.615542,-5,2.867672,1.274581,
+       0,0.817322,-0.576182,7.75,2.867672,1.274581,
+       0,0.988273,0.152697,-5,3,3.5,
+       0,1,0,7.75,3,1.75,
+       0,1,0,-5,3,1.75,
+       0,1,0,7.75,3,1.75,
+       0,0.988273,0.152697,-5,3,3.5,
+       0,0.952226,0.305393,7.75,3,3.5,
+       0,0.975335,-0.22073,-5,2.989702,1.549088,
+       0,0.949117,-0.314923,7.75,2.962656,1.451922,
+       0,0.932544,-0.361055,-5,2.962656,1.451922,
+       0,0.949117,-0.314923,7.75,2.962656,1.451922,
+       0,0.975335,-0.22073,-5,2.989702,1.549088,
+       0,0.98498,-0.172669,7.75,2.989702,1.549088,
+       0,0.707107,-0.707107,7.75,2.801777,1.198223,
+       0,0.615542,-0.788104,-5,2.725419,1.132328,
+       0,0.707107,-0.707107,-5,2.801777,1.198223,
+       0,0.615542,-0.788104,-5,2.725419,1.132328,
+       0,0.707107,-0.707107,7.75,2.801777,1.198223,
+       0,0.576182,-0.817322,7.75,2.725419,1.132328,
+       0,0.314923,-0.949117,7.75,2.548078,1.037344,
+       0,0.22073,-0.975335,-5,2.450912,1.010298,
+       0,0.361055,-0.932544,-5,2.548078,1.037344,
+       0,0.22073,-0.975335,-5,2.450912,1.010298,
+       0,0.314923,-0.949117,7.75,2.548078,1.037344,
+       0,0.172669,-0.98498,7.75,2.450912,1.010298,
+       1,0,0,7.75,3.002239,1.649165,
+       1,0,0,7.75,3,1.75,
+       1,0,0,7.75,3,1.63129,
+       1,0,0,7.75,2.36871,1,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,2.350835,0.997761,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,0,1.875,
+       1,0,0,7.75,0,1,
+       1,0,0,7.75,0,1.875,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,1.174754,1.875947,
+       1,0,0,7.75,1.174754,1.875947,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,1.245773,1.89962,
+       1,0,0,7.75,1.245773,1.89962,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,1.306225,1.943775,
+       1,0,0,7.75,1.306225,1.943775,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,1.35038,2.004227,
+       1,0,0,7.75,1.35038,2.004227,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,1.374053,2.075246,
+       1,0,0,7.75,1.374053,2.075246,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,1.374053,3.924754,
+       1,0,0,7.75,1.174754,4.124053,
+       1,0,0,7.75,0,5,
+       1,0,0,7.75,0,4.125,
+       1,0,0,7.75,0,5,
+       1,0,0,7.75,1.174754,4.124053,
+       1,0,0,7.75,2.25,5,
+       1,0,0,7.75,2.25,5,
+       1,0,0,7.75,1.174754,4.124053,
+       1,0,0,7.75,1.245773,4.10038,
+       1,0,0,7.75,2.25,5,
+       1,0,0,7.75,1.245773,4.10038,
+       1,0,0,7.75,1.306225,4.056225,
+       1,0,0,7.75,2.25,5,
+       1,0,0,7.75,1.306225,4.056225,
+       1,0,0,7.75,1.35038,3.995773,
+       1,0,0,7.75,2.25,5,
+       1,0,0,7.75,1.35038,3.995773,
+       1,0,0,7.75,1.374053,3.924754,
+       1,0,0,7.75,2.25,5,
+       1,0,0,7.75,1.374053,3.924754,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,2.25,5,
+       1,0,0,7.75,2.25,1,
+       1,0,0,7.75,2.36871,1,
+       1,0,0,7.75,2.25,5,
+       1,0,0,7.75,2.36871,1,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.36871,1,
+       1,0,0,7.75,2.450912,1.010298,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.450912,1.010298,
+       1,0,0,7.75,2.548078,1.037344,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.548078,1.037344,
+       1,0,0,7.75,2.640242,1.078314,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.640242,1.078314,
+       1,0,0,7.75,2.725419,1.132328,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.725419,1.132328,
+       1,0,0,7.75,2.801777,1.198223,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.801777,1.198223,
+       1,0,0,7.75,2.867672,1.274581,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.867672,1.274581,
+       1,0,0,7.75,2.921686,1.359758,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.921686,1.359758,
+       1,0,0,7.75,2.962656,1.451922,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.962656,1.451922,
+       1,0,0,7.75,2.989702,1.549088,
+       1,0,0,7.75,3,3.5,
+       1,0,0,7.75,2.989702,1.549088,
+       1,0,0,7.75,3,1.63129,
+       0.966335,0.244997,0.078574,7.75,3,3.5,
+       0.555363,0.830891,-0.034519,7.75,3,1.63129,
+       0.316228,0.948683,0,7.75,3,1.75,
+       0,-0.976994,0.213265,7.75,1.374053,2.075246,
+       0,-0.888698,0.458494,7.55,1.35038,2.004227,
+       0,-0.888698,0.458494,7.75,1.35038,2.004227,
+       0,-0.888698,0.458494,7.55,1.35038,2.004227,
+       0,-0.976994,0.213265,7.75,1.374053,2.075246,
+       0,-0.994299,0.106632,7.55,1.374053,2.075246,
+       0,-0.000806,1,7.75,0,1.875,
+       0,-0.10717,0.994241,7.55,1.174754,1.875947,
+       0,-0.000806,1,7.55,0,1.875,
+       0,-0.10717,0.994241,7.55,1.174754,1.875947,
+       0,-0.000806,1,7.75,0,1.875,
+       0,-0.213524,0.976938,7.75,1.174754,1.875947,
+       0,-0.10717,-0.994241,7.75,1.174754,4.124053,
+       0,-0.000806,-1,7.55,0,4.125,
+       0,-0.213524,-0.976938,7.55,1.174754,4.124053,
+       0,-0.000806,-1,7.55,0,4.125,
+       0,-0.10717,-0.994241,7.75,1.174754,4.124053,
+       0,-0.000806,-1,7.75,0,4.125,
+       0,-0.411789,-0.911279,7.75,1.245773,4.10038,
+       0,-0.213524,-0.976938,7.55,1.174754,4.124053,
+       0,-0.503965,-0.863724,7.55,1.245773,4.10038,
+       0,-0.213524,-0.976938,7.55,1.174754,4.124053,
+       0,-0.411789,-0.911279,7.75,1.245773,4.10038,
+       0,-0.10717,-0.994241,7.75,1.174754,4.124053,
+       0,-0.911279,-0.411789,7.75,1.35038,3.995773,
+       0,-0.976994,-0.213265,7.55,1.374053,3.924754,
+       0,-0.994299,-0.106632,7.75,1.374053,3.924754,
+       0,-0.976994,-0.213265,7.55,1.374053,3.924754,
+       0,-0.911279,-0.411789,7.75,1.35038,3.995773,
+       0,-0.863724,-0.503965,7.55,1.35038,3.995773,
+       0,-0.742826,0.669484,7.75,1.306225,1.943775,
+       0,-0.888698,0.458494,7.55,1.35038,2.004227,
+       0,-0.669484,0.742826,7.55,1.306225,1.943775,
+       0,-0.888698,0.458494,7.55,1.35038,2.004227,
+       0,-0.742826,0.669484,7.75,1.306225,1.943775,
+       0,-0.888698,0.458494,7.75,1.35038,2.004227,
+       0,-0.707107,-0.707107,7.75,1.306225,4.056225,
+       0,-0.503965,-0.863724,7.55,1.245773,4.10038,
+       0,-0.707107,-0.707107,7.55,1.306225,4.056225,
+       0,-0.503965,-0.863724,7.55,1.245773,4.10038,
+       0,-0.707107,-0.707107,7.75,1.306225,4.056225,
+       0,-0.411789,-0.911279,7.75,1.245773,4.10038,
+       0,-0.213524,0.976938,7.75,1.174754,1.875947,
+       0,-0.411789,0.911279,7.55,1.245773,1.89962,
+       0,-0.10717,0.994241,7.55,1.174754,1.875947,
+       0,-0.411789,0.911279,7.55,1.245773,1.89962,
+       0,-0.213524,0.976938,7.75,1.174754,1.875947,
+       0,-0.503965,0.863724,7.75,1.245773,1.89962,
+       0,-0.994299,-0.106632,7.75,1.374053,3.924754,
+       0,-0.994299,0.106632,7.55,1.374053,2.075246,
+       0,-0.976994,0.213265,7.75,1.374053,2.075246,
+       0,-0.994299,0.106632,7.55,1.374053,2.075246,
+       0,-0.994299,-0.106632,7.75,1.374053,3.924754,
+       0,-0.976994,-0.213265,7.55,1.374053,3.924754,
+       0,-0.503965,0.863724,7.75,1.245773,1.89962,
+       0,-0.669484,0.742826,7.55,1.306225,1.943775,
+       0,-0.411789,0.911279,7.55,1.245773,1.89962,
+       0,-0.669484,0.742826,7.55,1.306225,1.943775,
+       0,-0.503965,0.863724,7.75,1.245773,1.89962,
+       0,-0.742826,0.669484,7.75,1.306225,1.943775,
+       0,-0.707107,-0.707107,7.75,1.306225,4.056225,
+       0,-0.863724,-0.503965,7.55,1.35038,3.995773,
+       0,-0.911279,-0.411789,7.75,1.35038,3.995773,
+       0,-0.863724,-0.503965,7.55,1.35038,3.995773,
+       0,-0.707107,-0.707107,7.75,1.306225,4.056225,
+       0,-0.707107,-0.707107,7.55,1.306225,4.056225,
+       -1,0,0,-5,2.25,5,
+       -1,0,0,-5,0,1,
+       -1,0,0,-5,0,5,
+       -1,0,0,-5,0,1,
+       -1,0,0,-5,2.25,5,
+       -1,0,0,-5,2.25,1,
+       -1,0,0,-5,2.25,1,
+       -1,0,0,-5,2.25,5,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.25,1,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.36871,1,
+       -1,0,0,-5,2.36871,1,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.450912,1.010298,
+       -1,0,0,-5,2.450912,1.010298,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.548078,1.037344,
+       -1,0,0,-5,2.548078,1.037344,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.640242,1.078314,
+       -1,0,0,-5,2.640242,1.078314,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.725419,1.132328,
+       -1,0,0,-5,2.725419,1.132328,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.801777,1.198223,
+       -1,0,0,-5,2.801777,1.198223,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.867672,1.274581,
+       -1,0,0,-5,2.867672,1.274581,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.921686,1.359758,
+       -1,0,0,-5,2.921686,1.359758,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.962656,1.451922,
+       -1,0,0,-5,2.962656,1.451922,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,2.989702,1.549088,
+       -1,0,0,-5,2.989702,1.549088,
+       -1,0,0,-5,3,3.5,
+       -1,0,0,-5,3,1.63129,
+       -0.316719,0.945245,-0.078743,-5,3,1.63129,
+       -0.971484,0.234324,0.036205,-5,3,3.5,
+       0,1,0,-5,3,1.75
+};
+static const struct gllist seccam_body_frame = {
+ GL_N3F_V3F, GL_TRIANGLES, 294, seccam_body_data, 0
+};
+const struct gllist *seccam_body = &seccam_body_frame;
+
+static const float seccam_cap_data[] = {
+       0,-0.499258,-0.866453,9.5,2.292275,5.079185,
+       0,-0.389309,-0.921107,-5.5,2.247183,5.1016,
+       0,-0.551704,-0.83404,-5.5,2.292275,5.079185,
+       0,-0.389309,-0.921107,-5.5,2.247183,5.1016,
+       0,-0.499258,-0.866453,9.5,2.292275,5.079185,
+       0,-0.331806,-0.943348,9.5,2.247183,5.1016,
+       0,-0.672883,-0.739749,9.5,2.332489,5.048877,
+       0,-0.551704,-0.83404,-5.5,2.292275,5.079185,
+       0,-0.672883,-0.739749,-5.5,2.332489,5.048877,
+       0,-0.551704,-0.83404,-5.5,2.292275,5.079185,
+       0,-0.672883,-0.739749,9.5,2.332489,5.048877,
+       0,-0.499258,-0.866453,9.5,2.292275,5.079185,
+       0,-0.331806,-0.943348,9.5,2.247183,5.1016,
+       0,-0.213696,-0.9769,-5.5,2.198743,5.115361,
+       0,-0.389309,-0.921107,-5.5,2.247183,5.1016,
+       0,-0.213696,-0.9769,-5.5,2.198743,5.115361,
+       0,-0.331806,-0.943348,9.5,2.247183,5.1016,
+       0,-0.153089,-0.988212,9.5,2.198743,5.115361,
+       0,-0.153089,-0.988212,9.5,2.198743,5.115361,
+       0,-0.061479,-0.998108,-5.5,2.148601,5.12,
+       0,-0.213696,-0.9769,-5.5,2.198743,5.115361,
+       0,-0.061479,-0.998108,-5.5,2.148601,5.12,
+       0,-0.153089,-0.988212,9.5,2.198743,5.115361,
+       0,-0.03074,-0.999527,9.5,2.148601,5.12,
+       0,-0.815421,-0.578869,9.5,2.36646,5.011706,
+       0,-0.877321,-0.479905,-5.5,2.393034,4.968932,
+       0,-0.872852,-0.487984,9.5,2.393034,4.968932,
+       0,-0.877321,-0.479905,-5.5,2.393034,4.968932,
+       0,-0.815421,-0.578869,9.5,2.36646,5.011706,
+       0,-0.778198,-0.628018,-5.5,2.36646,5.011706,
+       0,-0.03074,-0.999527,9.5,2.148601,5.12,
+       0,0,-1,-5.5,0,5.12,
+       0,-0.061479,-0.998108,-5.5,2.148601,5.12,
+       0,0,-1,-5.5,0,5.12,
+       0,-0.03074,-0.999527,9.5,2.148601,5.12,
+       0,0,-1,9.5,0,5.12,
+       0,-0.672883,-0.739749,9.5,2.332489,5.048877,
+       0,-0.778198,-0.628018,-5.5,2.36646,5.011706,
+       0,-0.815421,-0.578869,9.5,2.36646,5.011706,
+       0,-0.778198,-0.628018,-5.5,2.36646,5.011706,
+       0,-0.672883,-0.739749,9.5,2.332489,5.048877,
+       0,-0.672883,-0.739749,-5.5,2.332489,5.048877,
+       0,0.213696,0.9769,9.5,2.242938,5.153304,
+       0,0.331806,0.943348,-5.5,2.292351,5.139267,
+       0,0.153089,0.988212,-5.5,2.242938,5.153304,
+       0,0.331806,0.943348,-5.5,2.292351,5.139267,
+       0,0.213696,0.9769,9.5,2.242938,5.153304,
+       0,0.389309,0.921107,9.5,2.292351,5.139267,
+       0,0.389309,0.921107,9.5,2.292351,5.139267,
+       0,0.499258,0.866453,-5.5,2.33835,5.116402,
+       0,0.331806,0.943348,-5.5,2.292351,5.139267,
+       0,0.499258,0.866453,-5.5,2.33835,5.116402,
+       0,0.389309,0.921107,9.5,2.292351,5.139267,
+       0,0.551704,0.83404,9.5,2.33835,5.116402,
+       0,0.672883,0.739749,-5.5,2.379372,5.085485,
+       0,0.778198,0.628018,9.5,2.414026,5.047566,
+       0,0.815421,0.578869,-5.5,2.414026,5.047566,
+       0,0.778198,0.628018,9.5,2.414026,5.047566,
+       0,0.672883,0.739749,-5.5,2.379372,5.085485,
+       0,0.672883,0.739749,9.5,2.379372,5.085485,
+       0,0.815421,0.578869,-5.5,2.414026,5.047566,
+       0,0.865241,0.501356,9.5,2.441134,5.003932,
+       0,0.883881,0.467712,-5.5,2.441134,5.003932,
+       0,0.865241,0.501356,9.5,2.441134,5.003932,
+       0,0.815421,0.578869,-5.5,2.414026,5.047566,
+       0,0.778198,0.628018,9.5,2.414026,5.047566,
+       0,0,1,9.5,0,5.158037,
+       0,0.03074,0.999527,-5.5,2.191788,5.158037,
+       0,0,1,-5.5,0,5.158037,
+       0,0.03074,0.999527,-5.5,2.191788,5.158037,
+       0,0,1,9.5,0,5.158037,
+       0,0.061479,0.998108,9.5,2.191788,5.158037,
+       0,0.061479,0.998108,9.5,2.191788,5.158037,
+       0,0.153089,0.988212,-5.5,2.242938,5.153304,
+       0,0.03074,0.999527,-5.5,2.191788,5.158037,
+       0,0.153089,0.988212,-5.5,2.242938,5.153304,
+       0,0.061479,0.998108,9.5,2.191788,5.158037,
+       0,0.213696,0.9769,9.5,2.242938,5.153304,
+       0,0.551704,0.83404,9.5,2.33835,5.116402,
+       0,0.672883,0.739749,-5.5,2.379372,5.085485,
+       0,0.499258,0.866453,-5.5,2.33835,5.116402,
+       0,0.672883,0.739749,-5.5,2.379372,5.085485,
+       0,0.551704,0.83404,9.5,2.33835,5.116402,
+       0,0.672883,0.739749,9.5,2.379372,5.085485,
+       0,0,-1,-5,3.152109,3.22762,
+       -0.004217,0,-0.999991,-5.066635,3.09,3.22762,
+       -0.008435,0,-0.999964,-5.066635,3.152109,3.22762,
+       -0.004217,0,-0.999991,-5.066635,3.09,3.22762,
+       0,0,-1,-5,3.152109,3.22762,
+       0,0,-1,-5,3.09,3.22762,
+       -1,0,0,-5.5,2.191788,5.158037,
+       -1,0,0,-5.5,0,5.12,
+       -1,0,0,-5.5,0,5.158037,
+       -1,0,0,-5.5,0,5.12,
+       -1,0,0,-5.5,2.191788,5.158037,
+       -1,0,0,-5.5,2.148601,5.12,
+       -1,0,0,-5.5,2.148601,5.12,
+       -1,0,0,-5.5,2.191788,5.158037,
+       -1,0,0,-5.5,2.198743,5.115361,
+       -1,0,0,-5.5,2.198743,5.115361,
+       -1,0,0,-5.5,2.191788,5.158037,
+       -1,0,0,-5.5,2.242938,5.153304,
+       -1,0,0,-5.5,2.198743,5.115361,
+       -1,0,0,-5.5,2.242938,5.153304,
+       -1,0,0,-5.5,2.247183,5.1016,
+       -1,0,0,-5.5,2.247183,5.1016,
+       -1,0,0,-5.5,2.242938,5.153304,
+       -1,0,0,-5.5,2.292351,5.139267,
+       -1,0,0,-5.5,2.247183,5.1016,
+       -1,0,0,-5.5,2.292351,5.139267,
+       -1,0,0,-5.5,2.292275,5.079185,
+       -1,0,0,-5.5,2.292275,5.079185,
+       -1,0,0,-5.5,2.292351,5.139267,
+       -1,0,0,-5.5,2.332489,5.048877,
+       -1,0,0,-5.5,2.332489,5.048877,
+       -1,0,0,-5.5,2.292351,5.139267,
+       -1,0,0,-5.5,2.33835,5.116402,
+       -1,0,0,-5.5,2.332489,5.048877,
+       -1,0,0,-5.5,2.33835,5.116402,
+       -1,0,0,-5.5,2.36646,5.011706,
+       -1,0,0,-5.5,2.36646,5.011706,
+       -1,0,0,-5.5,2.33835,5.116402,
+       -1,0,0,-5.5,2.379372,5.085485,
+       -1,0,0,-5.5,2.36646,5.011706,
+       -1,0,0,-5.5,2.379372,5.085485,
+       -1,0,0,-5.5,2.393034,4.968932,
+       -1,0,0,-5.5,2.393034,4.968932,
+       -1,0,0,-5.5,2.379372,5.085485,
+       -1,0,0,-5.5,2.414026,5.047566,
+       -1,0,0,-5.5,2.393034,4.968932,
+       -1,0,0,-5.5,2.414026,5.047566,
+       -1,0,0,-5.5,3.012323,3.730353,
+       -1,0,0,-5.5,3.012323,3.730353,
+       -1,0,0,-5.5,2.414026,5.047566,
+       -1,0,0,-5.5,2.441134,5.003932,
+       -1,0,0,-5.5,3.012323,3.730353,
+       -1,0,0,-5.5,2.441134,5.003932,
+       -1,0,0,-5.5,3.072871,3.740458,
+       -1,0,0,-5.5,3.012323,3.730353,
+       -1,0,0,-5.5,3.072871,3.740458,
+       -0.999991,0,-0.004217,-5.5,3.013942,3.726777,
+       -0.999991,0,-0.004217,-5.5,3.013942,3.726777,
+       -1,0,0,-5.5,3.072871,3.740458,
+       -0.999979,-0.003174,-0.005654,-5.5,3.079063,3.726777,
+       -0.008435,0,-0.999964,-5.066635,3.152109,3.22762,
+       -0.115062,0,-0.993358,-5.136049,3.09,3.228498,
+       -0.217337,0,-0.976097,-5.136049,3.152109,3.228498,
+       -0.115062,0,-0.993358,-5.136049,3.09,3.228498,
+       -0.008435,0,-0.999964,-5.066635,3.152109,3.22762,
+       -0.004217,0,-0.999991,-5.066635,3.09,3.22762,
+       -0.217337,0,-0.976097,-5.136049,3.152109,3.228498,
+       -0.411789,0,-0.911279,-5.265128,3.09,3.271524,
+       -0.503965,0,-0.863724,-5.265128,3.152109,3.271524,
+       -0.411789,0,-0.911279,-5.265128,3.09,3.271524,
+       -0.217337,0,-0.976097,-5.136049,3.152109,3.228498,
+       -0.115062,0,-0.993358,-5.136049,3.09,3.228498,
+       -0.503965,0,-0.863724,-5.265128,3.152109,3.271524,
+       -0.707107,0,-0.707107,-5.375,3.09,3.351777,
+       -0.742826,0,-0.669484,-5.375,3.152109,3.351777,
+       -0.707107,0,-0.707107,-5.375,3.09,3.351777,
+       -0.503965,0,-0.863724,-5.265128,3.152109,3.271524,
+       -0.411789,0,-0.911279,-5.265128,3.09,3.271524,
+       -0.880629,0,-0.473806,-5.455253,3.149911,3.461649,
+       -0.807527,0,-0.589831,-5.452667,3.087804,3.458109,
+       -0.911279,0,-0.411789,-5.455253,3.087392,3.461649,
+       -0.807527,0,-0.589831,-5.452667,3.087804,3.458109,
+       -0.880629,0,-0.473806,-5.455253,3.149911,3.461649,
+       -0.807527,0,-0.589831,-5.41118,3.09,3.40131,
+       -0.807527,0,-0.589831,-5.41118,3.09,3.40131,
+       -0.880629,0,-0.473806,-5.455253,3.149911,3.461649,
+       -0.707107,0,-0.707107,-5.375,3.09,3.351777,
+       -0.707107,0,-0.707107,-5.375,3.09,3.351777,
+       -0.880629,0,-0.473806,-5.455253,3.149911,3.461649,
+       -0.742826,0,-0.669484,-5.375,3.152109,3.351777,
+       -0.742826,0,-0.669484,-5.375,3.152109,3.351777,
+       -0.880629,0,-0.473806,-5.455253,3.149911,3.461649,
+       -0.807527,0,-0.589831,-5.41373,3.152109,3.404801,
+       -0.973406,0.015316,-0.228574,-5.498279,3.128292,3.590727,
+       -0.948683,0,-0.316228,-5.491487,3.070318,3.570354,
+       -0.993064,-0.002828,-0.117538,-5.498279,3.064669,3.590727,
+       -0.948683,0,-0.316228,-5.491487,3.070318,3.570354,
+       -0.973406,0.015316,-0.228574,-5.498279,3.128292,3.590727,
+       -0.948683,0,-0.316228,-5.472893,3.08123,3.514569,
+       -0.948683,0,-0.316228,-5.472893,3.08123,3.514569,
+       -0.973406,0.015316,-0.228574,-5.498279,3.128292,3.590727,
+       -0.911279,0,-0.411789,-5.455253,3.087392,3.461649,
+       -0.911279,0,-0.411789,-5.455253,3.087392,3.461649,
+       -0.973406,0.015316,-0.228574,-5.498279,3.128292,3.590727,
+       -0.880629,0,-0.473806,-5.455253,3.149911,3.461649,
+       -0.880629,0,-0.473806,-5.455253,3.149911,3.461649,
+       -0.973406,0.015316,-0.228574,-5.498279,3.128292,3.590727,
+       -0.948683,0,-0.316228,-5.493784,3.132031,3.577243,
+       -0.880629,0,-0.473806,-5.455253,3.149911,3.461649,
+       -0.948683,0,-0.316228,-5.493784,3.132031,3.577243,
+       -0.948683,0,-0.316228,-5.474815,3.143163,3.520337,
+       -0.880629,0,-0.473806,-5.455253,3.149911,3.461649,
+       -0.948683,0,-0.316228,-5.474815,3.143163,3.520337,
+       -0.948683,0,-0.316228,-5.455617,3.149869,3.462742,
+       0.002121,-0.92655,-0.376167,-5,3.035761,3.678568,
+       0.004239,-0.926812,-0.375501,-5.499357,3.034537,3.675953,
+       0.001061,-0.94351,-0.331343,-5.498714,3.055131,3.625129,
+       0.004239,-0.926812,-0.375501,-5.499357,3.034537,3.675953,
+       0.002121,-0.92655,-0.376167,-5,3.035761,3.678568,
+       0.00106,-0.915118,-0.403184,-5.5,3.013942,3.726777,
+       -0.999844,0.016157,-0.007185,-5.5,3.09678,3.687633,
+       -0.999852,-0.007895,-0.015313,-5.498714,3.055131,3.625129,
+       -0.999925,-0.005639,-0.01087,-5.499357,3.034537,3.675953,
+       -0.999852,-0.007895,-0.015313,-5.498714,3.055131,3.625129,
+       -0.999844,0.016157,-0.007185,-5.5,3.09678,3.687633,
+       -0.993064,-0.002828,-0.117538,-5.498279,3.064669,3.590727,
+       -0.993064,-0.002828,-0.117538,-5.498279,3.064669,3.590727,
+       -0.999844,0.016157,-0.007185,-5.5,3.09678,3.687633,
+       -0.973406,0.015316,-0.228574,-5.498279,3.128292,3.590727,
+       -0.973406,0.015316,-0.228574,-5.498279,3.128292,3.590727,
+       -0.999844,0.016157,-0.007185,-5.5,3.09678,3.687633,
+       -0.994223,0.106009,0.016812,-5.498815,3.116539,3.633119,
+       -0.999979,-0.003174,-0.005654,-5.5,3.079063,3.726777,
+       -0.999925,-0.005639,-0.01087,-5.499357,3.034537,3.675953,
+       -0.999991,0,-0.004217,-5.5,3.013942,3.726777,
+       -0.999925,-0.005639,-0.01087,-5.499357,3.034537,3.675953,
+       -0.999979,-0.003174,-0.005654,-5.5,3.079063,3.726777,
+       -0.999844,0.016157,-0.007185,-5.5,3.09678,3.687633,
+       0,0.963648,0.267176,-5.498279,3.128292,3.590727,
+       0,0.970208,0.242274,8.7276,3.132031,3.577243,
+       0,0.976128,0.217194,-5.493784,3.132031,3.577243,
+       0,0.970208,0.242274,8.7276,3.132031,3.577243,
+       0,0.963648,0.267176,-5.498279,3.128292,3.590727,
+       0,0.956449,0.291901,8.783476,3.116539,3.633119,
+       0,0.956449,0.291901,8.783476,3.116539,3.633119,
+       0,0.963648,0.267176,-5.498279,3.128292,3.590727,
+       0,0.94861,0.316448,-5.498815,3.116539,3.633119,
+       0,0,-1,8.377977,3.152109,3.22762,
+       0,0,-1,-5,3.09,3.22762,
+       0,0,-1,-5,3.152109,3.22762,
+       0,0,-1,-5,3.09,3.22762,
+       0,0,-1,8.377977,3.152109,3.22762,
+       0,0,-1,8.377977,3.09,3.22762,
+       0,-0.997016,-0.077198,8.608467,3.087804,3.458109,
+       0,-0.999668,-0.025756,-5.41118,3.09,3.40131,
+       0,-0.999985,-0.005519,8.551667,3.09,3.40131,
+       0,-0.999668,-0.025756,-5.41118,3.09,3.40131,
+       0,-0.997016,-0.077198,8.608467,3.087804,3.458109,
+       0,-0.997016,-0.077198,-5.452667,3.087804,3.458109,
+       0,0.883881,0.467712,-5.5,2.441134,5.003932,
+       0,0.904554,0.42636,8.890816,3.072871,3.740458,
+       0,0.902899,0.429852,-5.5,3.072871,3.740458,
+       0,0.904554,0.42636,8.890816,3.072871,3.740458,
+       0,0.883881,0.467712,-5.5,2.441134,5.003932,
+       0,0.894427,0.447214,9.5,2.768279,4.349643,
+       0,0.894427,0.447214,9.5,2.768279,4.349643,
+       0,0.883881,0.467712,-5.5,2.441134,5.003932,
+       0,0.865241,0.501356,9.5,2.441134,5.003932,
+       0,0.976128,0.217194,-5.493784,3.132031,3.577243,
+       0,0.986016,0.166653,8.670694,3.143163,3.520337,
+       0,0.989982,0.141191,-5.474815,3.143163,3.520337,
+       0,0.986016,0.166653,8.670694,3.143163,3.520337,
+       0,0.976128,0.217194,-5.493784,3.132031,3.577243,
+       0,0.970208,0.242274,8.7276,3.132031,3.577243,
+       0,-0.958309,-0.285734,8.775486,3.055131,3.625129,
+       0,-0.973249,-0.229753,-5.491487,3.070318,3.570354,
+       0,-0.973249,-0.229753,8.720711,3.070318,3.570354,
+       0,-0.973249,-0.229753,-5.491487,3.070318,3.570354,
+       0,-0.958309,-0.285734,8.775486,3.055131,3.625129,
+       0,-0.963648,-0.267176,-5.498279,3.064669,3.590727,
+       0,-0.963648,-0.267176,-5.498279,3.064669,3.590727,
+       0,-0.958309,-0.285734,8.775486,3.055131,3.625129,
+       0.001061,-0.94351,-0.331343,-5.498714,3.055131,3.625129,
+       0,-0.902899,-0.429852,8.880711,3.012323,3.730353,
+       0,-0.877321,-0.479905,-5.5,2.393034,4.968932,
+       0,-0.902899,-0.429852,-5.5,3.012323,3.730353,
+       0,-0.877321,-0.479905,-5.5,2.393034,4.968932,
+       0,-0.902899,-0.429852,8.880711,3.012323,3.730353,
+       0,-0.894427,-0.447214,9.5,2.702679,4.349643,
+       0,-0.877321,-0.479905,-5.5,2.393034,4.968932,
+       0,-0.894427,-0.447214,9.5,2.702679,4.349643,
+       0,-0.872852,-0.487984,9.5,2.393034,4.968932,
+       0,1,0,-5.136049,3.152109,3.228498,
+       0,1,0,-5,3.152109,3.22762,
+       0,1,0,-5.066635,3.152109,3.22762,
+       0,1,0,-5,3.152109,3.22762,
+       0,1,0,-5.136049,3.152109,3.228498,
+       0,1,0,8.377977,3.152109,3.22762,
+       0,1,0,8.377977,3.152109,3.22762,
+       0,1,0,-5.136049,3.152109,3.228498,
+       0,0.999917,0.012878,8.555159,3.152109,3.404801,
+       0,0.999917,0.012878,8.555159,3.152109,3.404801,
+       0,1,0,-5.136049,3.152109,3.228498,
+       0,1,0,-5.265128,3.152109,3.271524,
+       0,0.999917,0.012878,8.555159,3.152109,3.404801,
+       0,1,0,-5.265128,3.152109,3.271524,
+       0,1,0,-5.375,3.152109,3.351777,
+       0,0.999917,0.012878,8.555159,3.152109,3.404801,
+       0,1,0,-5.375,3.152109,3.351777,
+       0,0.999813,0.019317,-5.41373,3.152109,3.404801,
+       0,-0.926282,-0.376831,8.828926,3.035761,3.678568,
+       0.00106,-0.915118,-0.403184,-5.5,3.013942,3.726777,
+       0.002121,-0.92655,-0.376167,-5,3.035761,3.678568,
+       0.00106,-0.915118,-0.403184,-5.5,3.013942,3.726777,
+       0,-0.926282,-0.376831,8.828926,3.035761,3.678568,
+       0,-0.902899,-0.429852,8.880711,3.012323,3.730353,
+       0.00106,-0.915118,-0.403184,-5.5,3.013942,3.726777,
+       0,-0.902899,-0.429852,8.880711,3.012323,3.730353,
+       0,-0.902899,-0.429852,-5.5,3.012323,3.730353,
+       0,-0.988081,-0.153935,8.664927,3.08123,3.514569,
+       0,-0.973249,-0.229753,-5.491487,3.070318,3.570354,
+       0,-0.988081,-0.153935,-5.472893,3.08123,3.514569,
+       0,-0.973249,-0.229753,-5.491487,3.070318,3.570354,
+       0,-0.988081,-0.153935,8.664927,3.08123,3.514569,
+       0,-0.973249,-0.229753,8.720711,3.070318,3.570354,
+       0,0.999254,0.038628,-5.455253,3.149911,3.461649,
+       0,0.999917,0.012878,8.555159,3.152109,3.404801,
+       0,0.999813,0.019317,-5.41373,3.152109,3.404801,
+       0,0.999917,0.012878,8.555159,3.152109,3.404801,
+       0,0.999254,0.038628,-5.455253,3.149911,3.461649,
+       0,0.997016,0.077198,8.613099,3.149869,3.462742,
+       0,0.997016,0.077198,8.613099,3.149869,3.462742,
+       0,0.999254,0.038628,-5.455253,3.149911,3.461649,
+       0,0.997016,0.077198,-5.455617,3.149869,3.462742,
+       0,0.92135,0.388735,-5.5,3.09678,3.687633,
+       0,0.904554,0.42636,8.890816,3.072871,3.740458,
+       0,0.93106,0.364865,8.83799,3.09678,3.687633,
+       0,0.904554,0.42636,8.890816,3.072871,3.740458,
+       0,0.92135,0.388735,-5.5,3.09678,3.687633,
+       0,0.911034,0.41233,-5.5,3.079063,3.726777,
+       0,0.904554,0.42636,8.890816,3.072871,3.740458,
+       0,0.911034,0.41233,-5.5,3.079063,3.726777,
+       0,0.902899,0.429852,-5.5,3.072871,3.740458,
+       0,-0.997016,-0.077198,8.608467,3.087804,3.458109,
+       0,-0.99329,-0.115653,-5.455253,3.087392,3.461649,
+       0,-0.997016,-0.077198,-5.452667,3.087804,3.458109,
+       0,-0.99329,-0.115653,-5.455253,3.087392,3.461649,
+       0,-0.997016,-0.077198,8.608467,3.087804,3.458109,
+       0,-0.988081,-0.153935,8.664927,3.08123,3.514569,
+       0,-0.99329,-0.115653,-5.455253,3.087392,3.461649,
+       0,-0.988081,-0.153935,8.664927,3.08123,3.514569,
+       0,-0.988081,-0.153935,-5.472893,3.08123,3.514569,
+       0,0.94861,0.316448,-5.498815,3.116539,3.633119,
+       0,0.93106,0.364865,8.83799,3.09678,3.687633,
+       0,0.956449,0.291901,8.783476,3.116539,3.633119,
+       0,0.93106,0.364865,8.83799,3.09678,3.687633,
+       0,0.94861,0.316448,-5.498815,3.116539,3.633119,
+       0,0.92135,0.388735,-5.5,3.09678,3.687633,
+       0,-0.926282,-0.376831,8.828926,3.035761,3.678568,
+       0.001061,-0.94351,-0.331343,-5.498714,3.055131,3.625129,
+       0,-0.958309,-0.285734,8.775486,3.055131,3.625129,
+       0.001061,-0.94351,-0.331343,-5.498714,3.055131,3.625129,
+       0,-0.926282,-0.376831,8.828926,3.035761,3.678568,
+       0.002121,-0.92655,-0.376167,-5,3.035761,3.678568,
+       0,-0.999985,-0.005519,8.551667,3.09,3.40131,
+       0,-1,0,-5,3.09,3.22762,
+       0,-1,0,8.377977,3.09,3.22762,
+       0,-1,0,-5,3.09,3.22762,
+       0,-0.999985,-0.005519,8.551667,3.09,3.40131,
+       0,-1,0,-5.066635,3.09,3.22762,
+       0,-1,0,-5.066635,3.09,3.22762,
+       0,-0.999985,-0.005519,8.551667,3.09,3.40131,
+       0,-1,0,-5.136049,3.09,3.228498,
+       0,-1,0,-5.136049,3.09,3.228498,
+       0,-0.999985,-0.005519,8.551667,3.09,3.40131,
+       0,-1,0,-5.265128,3.09,3.271524,
+       0,-1,0,-5.265128,3.09,3.271524,
+       0,-0.999985,-0.005519,8.551667,3.09,3.40131,
+       0,-1,0,-5.375,3.09,3.351777,
+       0,-1,0,-5.375,3.09,3.351777,
+       0,-0.999985,-0.005519,8.551667,3.09,3.40131,
+       0,-0.999668,-0.025756,-5.41118,3.09,3.40131,
+       0,0.989982,0.141191,-5.474815,3.143163,3.520337,
+       0,0.997016,0.077198,8.613099,3.149869,3.462742,
+       0,0.997016,0.077198,-5.455617,3.149869,3.462742,
+       0,0.997016,0.077198,8.613099,3.149869,3.462742,
+       0,0.989982,0.141191,-5.474815,3.143163,3.520337,
+       0,0.986016,0.166653,8.670694,3.143163,3.520337,
+       1,0,0,9.5,2.148601,5.12,
+       1,0,0,9.5,0,5.158037,
+       1,0,0,9.5,0,5.12,
+       1,0,0,9.5,0,5.158037,
+       1,0,0,9.5,2.148601,5.12,
+       1,0,0,9.5,2.191788,5.158037,
+       1,0,0,9.5,2.191788,5.158037,
+       1,0,0,9.5,2.148601,5.12,
+       1,0,0,9.5,2.198743,5.115361,
+       1,0,0,9.5,2.191788,5.158037,
+       1,0,0,9.5,2.198743,5.115361,
+       1,0,0,9.5,2.242938,5.153304,
+       1,0,0,9.5,2.242938,5.153304,
+       1,0,0,9.5,2.198743,5.115361,
+       1,0,0,9.5,2.247183,5.1016,
+       1,0,0,9.5,2.242938,5.153304,
+       1,0,0,9.5,2.247183,5.1016,
+       1,0,0,9.5,2.292351,5.139267,
+       1,0,0,9.5,2.292351,5.139267,
+       1,0,0,9.5,2.247183,5.1016,
+       1,0,0,9.5,2.292275,5.079185,
+       1,0,0,9.5,2.292351,5.139267,
+       1,0,0,9.5,2.292275,5.079185,
+       1,0,0,9.5,2.332489,5.048877,
+       1,0,0,9.5,2.292351,5.139267,
+       1,0,0,9.5,2.332489,5.048877,
+       1,0,0,9.5,2.33835,5.116402,
+       1,0,0,9.5,2.33835,5.116402,
+       1,0,0,9.5,2.332489,5.048877,
+       1,0,0,9.5,2.36646,5.011706,
+       1,0,0,9.5,2.33835,5.116402,
+       1,0,0,9.5,2.36646,5.011706,
+       1,0,0,9.5,2.379372,5.085485,
+       1,0,0,9.5,2.379372,5.085485,
+       1,0,0,9.5,2.36646,5.011706,
+       1,0,0,9.5,2.393034,4.968932,
+       1,0,0,9.5,2.379372,5.085485,
+       1,0,0,9.5,2.393034,4.968932,
+       1,0,0,9.5,2.414026,5.047566,
+       1,0,0,9.5,2.414026,5.047566,
+       1,0,0,9.5,2.393034,4.968932,
+       1,0,0,9.5,2.702679,4.349643,
+       1,0,0,9.5,2.414026,5.047566,
+       1,0,0,9.5,2.702679,4.349643,
+       1,0,0,9.5,2.441134,5.003932,
+       1,0,0,9.5,2.441134,5.003932,
+       1,0,0,9.5,2.702679,4.349643,
+       1,0,0,9.5,2.768279,4.349643,
+       0.707107,0,-0.707107,8.377977,3.152109,3.22762,
+       0.707107,0,-0.707107,8.551667,3.09,3.40131,
+       0.707107,0,-0.707107,8.377977,3.09,3.22762,
+       0.707107,0,-0.707107,8.551667,3.09,3.40131,
+       0.707107,0,-0.707107,8.377977,3.152109,3.22762,
+       0.707107,0,-0.707107,8.555159,3.152109,3.404801,
+       0.707107,0,-0.707107,8.551667,3.09,3.40131,
+       0.707107,0,-0.707107,8.555159,3.152109,3.404801,
+       0.707107,0,-0.707107,8.608467,3.087804,3.458109,
+       0.707107,0,-0.707107,8.608467,3.087804,3.458109,
+       0.707107,0,-0.707107,8.555159,3.152109,3.404801,
+       0.707107,0,-0.707107,8.613099,3.149869,3.462742,
+       0.707107,0,-0.707107,8.608467,3.087804,3.458109,
+       0.707107,0,-0.707107,8.613099,3.149869,3.462742,
+       0.707107,0,-0.707107,8.664927,3.08123,3.514569,
+       0.707107,0,-0.707107,8.664927,3.08123,3.514569,
+       0.707107,0,-0.707107,8.613099,3.149869,3.462742,
+       0.707107,0,-0.707107,8.670694,3.143163,3.520337,
+       0.707107,0,-0.707107,8.664927,3.08123,3.514569,
+       0.707107,0,-0.707107,8.670694,3.143163,3.520337,
+       0.707107,0,-0.707107,8.720711,3.070318,3.570354,
+       0.707107,0,-0.707107,8.720711,3.070318,3.570354,
+       0.707107,0,-0.707107,8.670694,3.143163,3.520337,
+       0.707107,0,-0.707107,8.7276,3.132031,3.577243,
+       0.707107,0,-0.707107,8.720711,3.070318,3.570354,
+       0.707107,0,-0.707107,8.7276,3.132031,3.577243,
+       0.707107,0,-0.707107,8.775486,3.055131,3.625129,
+       0.707107,0,-0.707107,8.775486,3.055131,3.625129,
+       0.707107,0,-0.707107,8.7276,3.132031,3.577243,
+       0.707107,0,-0.707107,8.783476,3.116539,3.633119,
+       0.707107,0,-0.707107,8.775486,3.055131,3.625129,
+       0.707107,0,-0.707107,8.783476,3.116539,3.633119,
+       0.707107,0,-0.707107,8.828926,3.035761,3.678568,
+       0.707107,0,-0.707107,8.828926,3.035761,3.678568,
+       0.707107,0,-0.707107,8.783476,3.116539,3.633119,
+       0.707107,0,-0.707107,8.83799,3.09678,3.687633,
+       0.707107,0,-0.707107,8.828926,3.035761,3.678568,
+       0.707107,0,-0.707107,8.83799,3.09678,3.687633,
+       0.707107,0,-0.707107,8.880711,3.012323,3.730353,
+       0.707107,0,-0.707107,8.880711,3.012323,3.730353,
+       0.707107,0,-0.707107,8.83799,3.09678,3.687633,
+       0.707107,0,-0.707107,8.890816,3.072871,3.740458,
+       0.707107,0,-0.707107,8.880711,3.012323,3.730353,
+       0.707107,0,-0.707107,8.890816,3.072871,3.740458,
+       0.707107,0,-0.707107,9.5,2.702679,4.349643,
+       0.707107,0,-0.707107,9.5,2.702679,4.349643,
+       0.707107,0,-0.707107,8.890816,3.072871,3.740458,
+       0.707107,0,-0.707107,9.5,2.768279,4.349643
+};
+static const struct gllist seccam_cap_frame = {
+ GL_N3F_V3F, GL_TRIANGLES, 468, seccam_cap_data, 0
+};
+const struct gllist *seccam_cap = &seccam_cap_frame;
+
+static const float seccam_hinge_data[] = {
+       0.843272,0,-0.537487,0.649519,0.375,-0.375,
+       0.707107,0,-0.707107,0.53033,0.625,-0.53033,
+       0.887114,0,-0.461551,0.649519,0.625,-0.375,
+       0.707107,0,-0.707107,0.53033,0.625,-0.53033,
+       0.843272,0,-0.537487,0.649519,0.375,-0.375,
+       0.707107,0,-0.707107,0.53033,0.375,-0.53033,
+       0.991445,0,-0.130526,0.75,0.375,0,
+       0.976344,0,-0.216222,0.724444,0.625,-0.194114,
+       0.991445,0,-0.130526,0.75,0.625,0,
+       0.976344,0,-0.216222,0.724444,0.625,-0.194114,
+       0.991445,0,-0.130526,0.75,0.375,0,
+       0.95365,0,-0.300918,0.724444,0.375,-0.194114,
+       0.537487,0,-0.843272,0.375,0.375,-0.649519,
+       0.707107,0,-0.707107,0.53033,0.625,-0.53033,
+       0.707107,0,-0.707107,0.53033,0.375,-0.53033,
+       0.707107,0,-0.707107,0.53033,0.625,-0.53033,
+       0.537487,0,-0.843272,0.375,0.375,-0.649519,
+       0.461551,0,-0.887114,0.375,0.625,-0.649519,
+       -0.976344,0,-0.216222,-0.724444,0.375,-0.194114,
+       -0.991445,0,-0.130526,-0.75,0.625,0,
+       -0.95365,0,-0.300918,-0.724444,0.625,-0.194114,
+       -0.991445,0,-0.130526,-0.75,0.625,0,
+       -0.976344,0,-0.216222,-0.724444,0.375,-0.194114,
+       -0.991445,0,-0.130526,-0.75,0.375,0,
+       0.300918,0,-0.95365,0.194114,0.375,-0.724444,
+       0.461551,0,-0.887114,0.375,0.625,-0.649519,
+       0.537487,0,-0.843272,0.375,0.375,-0.649519,
+       0.461551,0,-0.887114,0.375,0.625,-0.649519,
+       0.300918,0,-0.95365,0.194114,0.375,-0.724444,
+       0.216222,0,-0.976344,0.194114,0.625,-0.724444,
+       0,1,0,-0.194114,0.625,-0.724444,
+       0,1,0,0.194114,0.625,-0.724444,
+       0,1,0,0,0.625,-0.75,
+       0,1,0,0.194114,0.625,-0.724444,
+       0,1,0,-0.194114,0.625,-0.724444,
+       0,1,0,-0.375,0.625,-0.649519,
+       0,1,0,0.194114,0.625,-0.724444,
+       0,1,0,-0.375,0.625,-0.649519,
+       0,1,0,0.375,0.625,-0.649519,
+       0,1,0,0.375,0.625,-0.649519,
+       0,1,0,-0.375,0.625,-0.649519,
+       0,1,0,-0.53033,0.625,-0.53033,
+       0,1,0,0.375,0.625,-0.649519,
+       0,1,0,-0.53033,0.625,-0.53033,
+       0,1,0,0.53033,0.625,-0.53033,
+       0,1,0,0.53033,0.625,-0.53033,
+       0,1,0,-0.53033,0.625,-0.53033,
+       0,1,0,-0.649519,0.625,-0.375,
+       0,1,0,0.53033,0.625,-0.53033,
+       0,1,0,-0.649519,0.625,-0.375,
+       0,1,0,0.649519,0.625,-0.375,
+       0,1,0,0.649519,0.625,-0.375,
+       0,1,0,-0.649519,0.625,-0.375,
+       0,1,0,-0.724444,0.625,-0.194114,
+       0,1,0,0.649519,0.625,-0.375,
+       0,1,0,-0.724444,0.625,-0.194114,
+       0,1,0,0.724444,0.625,-0.194114,
+       0,1,0,0.724444,0.625,-0.194114,
+       0,1,0,-0.724444,0.625,-0.194114,
+       0,1,0,0.75,0.625,0,
+       0,1,0,0.75,0.625,0,
+       0,1,0,-0.724444,0.625,-0.194114,
+       0,1,0,-0.75,0.625,0,
+       -0.707107,0,-0.707107,-0.53033,0.375,-0.53033,
+       -0.537487,0,-0.843272,-0.375,0.625,-0.649519,
+       -0.461551,0,-0.887114,-0.375,0.375,-0.649519,
+       -0.537487,0,-0.843272,-0.375,0.625,-0.649519,
+       -0.707107,0,-0.707107,-0.53033,0.375,-0.53033,
+       -0.707107,0,-0.707107,-0.53033,0.625,-0.53033,
+       -0.707107,0,-0.707107,-0.53033,0.375,-0.53033,
+       -0.843272,0,-0.537487,-0.649519,0.625,-0.375,
+       -0.707107,0,-0.707107,-0.53033,0.625,-0.53033,
+       -0.843272,0,-0.537487,-0.649519,0.625,-0.375,
+       -0.707107,0,-0.707107,-0.53033,0.375,-0.53033,
+       -0.887114,0,-0.461551,-0.649519,0.375,-0.375,
+       -0.461551,0,-0.887114,-0.375,0.375,-0.649519,
+       -0.300918,0,-0.95365,-0.194114,0.625,-0.724444,
+       -0.216222,0,-0.976344,-0.194114,0.375,-0.724444,
+       -0.300918,0,-0.95365,-0.194114,0.625,-0.724444,
+       -0.461551,0,-0.887114,-0.375,0.375,-0.649519,
+       -0.537487,0,-0.843272,-0.375,0.625,-0.649519,
+       -0.216222,0,-0.976344,-0.194114,0.375,-0.724444,
+       -0.043842,0,-0.999038,0,0.625,-0.75,
+       0.043842,0,-0.999038,0,0.375,-0.75,
+       -0.043842,0,-0.999038,0,0.625,-0.75,
+       -0.216222,0,-0.976344,-0.194114,0.375,-0.724444,
+       -0.300918,0,-0.95365,-0.194114,0.625,-0.724444,
+       0.95365,0,-0.300918,0.724444,0.375,-0.194114,
+       0.887114,0,-0.461551,0.649519,0.625,-0.375,
+       0.976344,0,-0.216222,0.724444,0.625,-0.194114,
+       0.887114,0,-0.461551,0.649519,0.625,-0.375,
+       0.95365,0,-0.300918,0.724444,0.375,-0.194114,
+       0.843272,0,-0.537487,0.649519,0.375,-0.375,
+       0.043842,0,-0.999038,0,0.375,-0.75,
+       0.216222,0,-0.976344,0.194114,0.625,-0.724444,
+       0.300918,0,-0.95365,0.194114,0.375,-0.724444,
+       0.216222,0,-0.976344,0.194114,0.625,-0.724444,
+       0.043842,0,-0.999038,0,0.375,-0.75,
+       -0.043842,0,-0.999038,0,0.625,-0.75,
+       -0.887114,0,-0.461551,-0.649519,0.375,-0.375,
+       -0.95365,0,-0.300918,-0.724444,0.625,-0.194114,
+       -0.843272,0,-0.537487,-0.649519,0.625,-0.375,
+       -0.95365,0,-0.300918,-0.724444,0.625,-0.194114,
+       -0.887114,0,-0.461551,-0.649519,0.375,-0.375,
+       -0.976344,0,-0.216222,-0.724444,0.375,-0.194114,
+       0,-1,0,0.194114,0.375,-0.724444,
+       0,-1,0,-0.194114,0.375,-0.724444,
+       0,-1,0,0,0.375,-0.75,
+       0,-1,0,-0.194114,0.375,-0.724444,
+       0,-1,0,0.194114,0.375,-0.724444,
+       0,-1,0,0.375,0.375,-0.649519,
+       0,-1,0,-0.194114,0.375,-0.724444,
+       0,-1,0,0.375,0.375,-0.649519,
+       0,-1,0,-0.375,0.375,-0.649519,
+       0,-1,0,-0.375,0.375,-0.649519,
+       0,-1,0,0.375,0.375,-0.649519,
+       0,-1,0,0.53033,0.375,-0.53033,
+       0,-1,0,-0.375,0.375,-0.649519,
+       0,-1,0,0.53033,0.375,-0.53033,
+       0,-1,0,-0.53033,0.375,-0.53033,
+       0,-1,0,-0.53033,0.375,-0.53033,
+       0,-1,0,0.53033,0.375,-0.53033,
+       0,-1,0,0.649519,0.375,-0.375,
+       0,-1,0,-0.53033,0.375,-0.53033,
+       0,-1,0,0.649519,0.375,-0.375,
+       0,-1,0,-0.649519,0.375,-0.375,
+       0,-1,0,-0.649519,0.375,-0.375,
+       0,-1,0,0.649519,0.375,-0.375,
+       0,-1,0,0.724444,0.375,-0.194114,
+       0,-1,0,-0.649519,0.375,-0.375,
+       0,-1,0,0.724444,0.375,-0.194114,
+       0,-1,0,-0.724444,0.375,-0.194114,
+       0,-1,0,-0.724444,0.375,-0.194114,
+       0,-1,0,0.724444,0.375,-0.194114,
+       0,-1,0,0.75,0.375,0,
+       0,-1,0,-0.724444,0.375,-0.194114,
+       0,-1,0,0.75,0.375,0,
+       0,-1,0,-0.75,0.375,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,0.965926,0.258819,0,
+       0,0,-1,1,0,0,
+       0,0,-1,0.965926,0.258819,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,0.866025,0.5,0,
+       0,0,-1,0.866025,0.5,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,0.707107,0.707107,0,
+       0,0,-1,0.707107,0.707107,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,0.5,0.866025,0,
+       0,0,-1,0.5,0.866025,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,0.258819,0.965926,0,
+       0,0,-1,0.258819,0.965926,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,0,1,0,
+       0,0,-1,0,1,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,-0.258819,0.965926,0,
+       0,0,-1,-0.258819,0.965926,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,-0.5,0.866025,0,
+       0,0,-1,-0.5,0.866025,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,-0.707107,0.707107,0,
+       0,0,-1,-0.707107,0.707107,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,-0.866025,0.5,0,
+       0,0,-1,-0.866025,0.5,0,
+       0,0,-1,-1,0,0,
+       0,0,-1,-0.965926,0.258819,0,
+       0.043842,0.999038,0,0,1,1,
+       0.216222,0.976344,0,0.258819,0.965926,0,
+       -0.043842,0.999038,0,0,1,0,
+       0.216222,0.976344,0,0.258819,0.965926,0,
+       0.043842,0.999038,0,0,1,1,
+       0.300918,0.95365,0,0.258819,0.965926,1,
+       -0.707107,0.707107,0,-0.707107,0.707107,1,
+       -0.537487,0.843272,0,-0.5,0.866025,0,
+       -0.707107,0.707107,0,-0.707107,0.707107,0,
+       -0.537487,0.843272,0,-0.5,0.866025,0,
+       -0.707107,0.707107,0,-0.707107,0.707107,1,
+       -0.461551,0.887114,0,-0.5,0.866025,1,
+       -0.461551,0.887114,0,-0.5,0.866025,1,
+       -0.300918,0.95365,0,-0.258819,0.965926,0,
+       -0.537487,0.843272,0,-0.5,0.866025,0,
+       -0.300918,0.95365,0,-0.258819,0.965926,0,
+       -0.461551,0.887114,0,-0.5,0.866025,1,
+       -0.216222,0.976344,0,-0.258819,0.965926,1,
+       0.300918,0.95365,0,0.258819,0.965926,1,
+       0.461551,0.887114,0,0.5,0.866025,0,
+       0.216222,0.976344,0,0.258819,0.965926,0,
+       0.461551,0.887114,0,0.5,0.866025,0,
+       0.300918,0.95365,0,0.258819,0.965926,1,
+       0.537487,0.843272,0,0.5,0.866025,1,
+       0.991445,0.130526,0,1,0,1,
+       0.976344,0.216222,0,0.965926,0.258819,0,
+       0.95365,0.300918,0,0.965926,0.258819,1,
+       0.976344,0.216222,0,0.965926,0.258819,0,
+       0.991445,0.130526,0,1,0,1,
+       0.991445,0.130526,0,1,0,0,
+       0.843272,0.537487,0,0.866025,0.5,1,
+       0.707107,0.707107,0,0.707107,0.707107,0,
+       0.707107,0.707107,0,0.707107,0.707107,1,
+       0.707107,0.707107,0,0.707107,0.707107,0,
+       0.843272,0.537487,0,0.866025,0.5,1,
+       0.887114,0.461551,0,0.866025,0.5,0,
+       -0.216222,0.976344,0,-0.258819,0.965926,1,
+       -0.043842,0.999038,0,0,1,0,
+       -0.300918,0.95365,0,-0.258819,0.965926,0,
+       -0.043842,0.999038,0,0,1,0,
+       -0.216222,0.976344,0,-0.258819,0.965926,1,
+       0.043842,0.999038,0,0,1,1,
+       -0.95365,0.300918,0,-0.965926,0.258819,0,
+       -0.887114,0.461551,0,-0.866025,0.5,1,
+       -0.843272,0.537487,0,-0.866025,0.5,0,
+       -0.887114,0.461551,0,-0.866025,0.5,1,
+       -0.95365,0.300918,0,-0.965926,0.258819,0,
+       -0.976344,0.216222,0,-0.965926,0.258819,1,
+       -0.843272,0.537487,0,-0.866025,0.5,0,
+       -0.707107,0.707107,0,-0.707107,0.707107,1,
+       -0.707107,0.707107,0,-0.707107,0.707107,0,
+       -0.707107,0.707107,0,-0.707107,0.707107,1,
+       -0.843272,0.537487,0,-0.866025,0.5,0,
+       -0.887114,0.461551,0,-0.866025,0.5,1,
+       0.537487,0.843272,0,0.5,0.866025,1,
+       0.707107,0.707107,0,0.707107,0.707107,0,
+       0.461551,0.887114,0,0.5,0.866025,0,
+       0.707107,0.707107,0,0.707107,0.707107,0,
+       0.537487,0.843272,0,0.5,0.866025,1,
+       0.707107,0.707107,0,0.707107,0.707107,1,
+       0.95365,0.300918,0,0.965926,0.258819,1,
+       0.887114,0.461551,0,0.866025,0.5,0,
+       0.843272,0.537487,0,0.866025,0.5,1,
+       0.887114,0.461551,0,0.866025,0.5,0,
+       0.95365,0.300918,0,0.965926,0.258819,1,
+       0.976344,0.216222,0,0.965926,0.258819,0,
+       -0.991445,0.130526,0,-1,0,0,
+       -0.976344,0.216222,0,-0.965926,0.258819,1,
+       -0.95365,0.300918,0,-0.965926,0.258819,0,
+       -0.976344,0.216222,0,-0.965926,0.258819,1,
+       -0.991445,0.130526,0,-1,0,0,
+       -0.991445,0.130526,0,-1,0,1
+};
+static const struct gllist seccam_hinge_frame = {
+ GL_N3F_V3F, GL_TRIANGLES, 243, seccam_hinge_data, 0
+};
+const struct gllist *seccam_hinge = &seccam_hinge_frame;
+
+static const float seccam_lens_data[] = {
+       1,0,0,7.55,-1.923472,1.31269,
+       1,0,0,7.55,2.033558,4.687325,
+       1,0,0,7.55,-1.923714,4.687325,
+       1,0,0,7.55,2.033558,4.687325,
+       1,0,0,7.55,-1.923472,1.31269,
+       1,0,0,7.55,2.0338,1.31269
+};
+static const struct gllist seccam_lens_frame = {
+ GL_N3F_V3F, GL_TRIANGLES, 6, seccam_lens_data, 0
+};
+const struct gllist *seccam_lens = &seccam_lens_frame;
+
+static const float seccam_pipe_data[] = {
+       -0.752339,0.658776,0,-0.265165,0.265165,0.4375,
+       -0.921725,0.383318,0.05908,-0.346455,0.143506,-1.759639,
+       -0.947173,0.320722,0,-0.346455,0.143506,0.4375,
+       -0.921725,0.383318,0.05908,-0.346455,0.143506,-1.759639,
+       -0.752339,0.658776,0,-0.265165,0.265165,0.4375,
+       -0.704865,0.70779,0.046895,-0.265165,0.265165,-1.76471,
+       -0.704865,0.70779,0.046895,-0.265165,0.265165,-1.76471,
+       -0.442968,0.896538,0,-0.143506,0.346455,0.4375,
+       -0.381068,0.924135,0.027592,-0.143506,0.346455,-1.772299,
+       -0.442968,0.896538,0,-0.143506,0.346455,0.4375,
+       -0.704865,0.70779,0.046895,-0.265165,0.265165,-1.76471,
+       -0.752339,0.658776,0,-0.265165,0.265165,0.4375,
+       -0.381068,0.924135,0.027592,-0.143506,0.346455,-1.772299,
+       -0.066159,0.997809,0,0,0.375,0.4375,
+       0.000257,0.999991,0.00412,0,0.375,-1.78125,
+       -0.066159,0.997809,0,0,0.375,0.4375,
+       -0.381068,0.924135,0.027592,-0.143506,0.346455,-1.772299,
+       -0.442968,0.896538,0,-0.143506,0.346455,0.4375,
+       0.000257,0.999991,0.00412,0,0.375,-1.78125,
+       0.320722,0.947173,0,0.143506,0.346455,0.4375,
+       0.381543,0.924135,-0.019977,0.143506,0.346455,-1.790201,
+       0.320722,0.947173,0,0.143506,0.346455,0.4375,
+       0.000257,0.999991,0.00412,0,0.375,-1.78125,
+       -0.066159,0.997809,0,0,0.375,0.4375,
+       0.381543,0.924135,-0.019977,0.143506,0.346455,-1.790201,
+       0.707107,0.707107,0,0.265165,0.265165,0.4375,
+       0.704059,0.707717,-0.058632,0.265165,0.265165,-1.79779,
+       0.707107,0.707107,0,0.265165,0.265165,0.4375,
+       0.381543,0.924135,-0.019977,0.143506,0.346455,-1.790201,
+       0.320722,0.947173,0,0.143506,0.346455,0.4375,
+       0.921725,0.383318,-0.05908,0.346455,0.143506,-1.802861,
+       0.707107,0.707107,0,0.265165,0.265165,0.4375,
+       0.947173,0.320722,0,0.346455,0.143506,0.4375,
+       0.707107,0.707107,0,0.265165,0.265165,0.4375,
+       0.921725,0.383318,-0.05908,0.346455,0.143506,-1.802861,
+       0.704059,0.707717,-0.058632,0.265165,0.265165,-1.79779,
+       0.979876,0.195414,-0.040695,0.375,0,-1.804641,
+       0.947173,0.320722,0,0.346455,0.143506,0.4375,
+       0.980785,0.19509,0,0.375,0,0.4375,
+       0.947173,0.320722,0,0.346455,0.143506,0.4375,
+       0.979876,0.195414,-0.040695,0.375,0,-1.804641,
+       0.921725,0.383318,-0.05908,0.346455,0.143506,-1.802861,
+       -0.947173,0.320722,0,-0.346455,0.143506,0.4375,
+       -0.979876,0.195414,0.040695,-0.375,0,-1.757859,
+       -0.980785,0.19509,0,-0.375,0,0.4375,
+       -0.979876,0.195414,0.040695,-0.375,0,-1.757859,
+       -0.947173,0.320722,0,-0.346455,0.143506,0.4375,
+       -0.921725,0.383318,0.05908,-0.346455,0.143506,-1.759639,
+       -0.704865,0.70779,0.046895,-0.265165,0.265165,-1.76471,
+       -0.882346,0.387175,0.26751,-0.423809,0.143506,-2.377279,
+       -0.921725,0.383318,0.05908,-0.346455,0.143506,-1.759639,
+       -0.882346,0.387175,0.26751,-0.423809,0.143506,-2.377279,
+       -0.704865,0.70779,0.046895,-0.265165,0.265165,-1.76471,
+       -0.670724,0.711915,0.208102,-0.344833,0.265165,-2.400829,
+       -0.670724,0.711915,0.208102,-0.344833,0.265165,-2.400829,
+       -0.381068,0.924135,0.027592,-0.143506,0.346455,-1.772299,
+       -0.35955,0.925667,0.117746,-0.226638,0.346455,-2.436073,
+       -0.381068,0.924135,0.027592,-0.143506,0.346455,-1.772299,
+       -0.670724,0.711915,0.208102,-0.344833,0.265165,-2.400829,
+       -0.704865,0.70779,0.046895,-0.265165,0.265165,-1.76471,
+       -0.35955,0.925667,0.117746,-0.226638,0.346455,-2.436073,
+       0.000257,0.999991,0.00412,0,0.375,-1.78125,
+       0.003116,0.999941,0.010449,-0.087217,0.375,-2.477647,
+       0.000257,0.999991,0.00412,0,0.375,-1.78125,
+       -0.35955,0.925667,0.117746,-0.226638,0.346455,-2.436073,
+       -0.381068,0.924135,0.027592,-0.143506,0.346455,-1.772299,
+       0.003116,0.999941,0.010449,-0.087217,0.375,-2.477647,
+       0.381543,0.924135,-0.019977,0.143506,0.346455,-1.790201,
+       0.365318,0.925667,-0.098401,0.052203,0.346455,-2.51922,
+       0.381543,0.924135,-0.019977,0.143506,0.346455,-1.790201,
+       0.003116,0.999941,0.010449,-0.087217,0.375,-2.477647,
+       0.000257,0.999991,0.00412,0,0.375,-1.78125,
+       0.365318,0.925667,-0.098401,0.052203,0.346455,-2.51922,
+       0.704059,0.707717,-0.058632,0.265165,0.265165,-1.79779,
+       0.661307,0.711395,-0.237887,0.170398,0.265165,-2.554465,
+       0.704059,0.707717,-0.058632,0.265165,0.265165,-1.79779,
+       0.365318,0.925667,-0.098401,0.052203,0.346455,-2.51922,
+       0.381543,0.924135,-0.019977,0.143506,0.346455,-1.790201,
+       0.882346,0.387175,-0.26751,0.249374,0.143506,-2.578014,
+       0.704059,0.707717,-0.058632,0.265165,0.265165,-1.79779,
+       0.921725,0.383318,-0.05908,0.346455,0.143506,-1.802861,
+       0.704059,0.707717,-0.058632,0.265165,0.265165,-1.79779,
+       0.882346,0.387175,-0.26751,0.249374,0.143506,-2.578014,
+       0.661307,0.711395,-0.237887,0.170398,0.265165,-2.554465,
+       0.953546,0.197386,-0.227573,0.277106,0,-2.586284,
+       0.921725,0.383318,-0.05908,0.346455,0.143506,-1.802861,
+       0.979876,0.195414,-0.040695,0.375,0,-1.804641,
+       0.921725,0.383318,-0.05908,0.346455,0.143506,-1.802861,
+       0.953546,0.197386,-0.227573,0.277106,0,-2.586284,
+       0.882346,0.387175,-0.26751,0.249374,0.143506,-2.578014,
+       -0.921725,0.383318,0.05908,-0.346455,0.143506,-1.759639,
+       -0.953546,0.197386,0.227573,-0.451541,0,-2.36901,
+       -0.979876,0.195414,0.040695,-0.375,0,-1.757859,
+       -0.953546,0.197386,0.227573,-0.451541,0,-2.36901,
+       -0.921725,0.383318,0.05908,-0.346455,0.143506,-1.759639,
+       -0.882346,0.387175,0.26751,-0.423809,0.143506,-2.377279,
+       -0.670724,0.711915,0.208102,-0.344833,0.265165,-2.400829,
+       -0.727589,0.447862,0.519648,-0.681469,0.143506,-2.903944,
+       -0.882346,0.387175,0.26751,-0.423809,0.143506,-2.377279,
+       -0.727589,0.447862,0.519648,-0.681469,0.143506,-2.903944,
+       -0.670724,0.711915,0.208102,-0.344833,0.265165,-2.400829,
+       -0.558784,0.739142,0.376071,-0.614405,0.265165,-2.951841,
+       -0.558784,0.739142,0.376071,-0.614405,0.265165,-2.951841,
+       -0.35955,0.925667,0.117746,-0.226638,0.346455,-2.436073,
+       -0.301902,0.925667,0.228024,-0.514037,0.346455,-3.023525,
+       -0.35955,0.925667,0.117746,-0.226638,0.346455,-2.436073,
+       -0.558784,0.739142,0.376071,-0.614405,0.265165,-2.951841,
+       -0.670724,0.711915,0.208102,-0.344833,0.265165,-2.400829,
+       -0.301902,0.925667,0.228024,-0.514037,0.346455,-3.023525,
+       0.003116,0.999941,0.010449,-0.087217,0.375,-2.477647,
+       0.006337,0.999941,0.008873,-0.395645,0.375,-3.108081,
+       0.003116,0.999941,0.010449,-0.087217,0.375,-2.477647,
+       -0.301902,0.925667,0.228024,-0.514037,0.346455,-3.023525,
+       -0.35955,0.925667,0.117746,-0.226638,0.346455,-2.436073,
+       0.006337,0.999941,0.008873,-0.395645,0.375,-3.108081,
+       0.365318,0.925667,-0.098401,0.052203,0.346455,-2.51922,
+       0.313635,0.925667,-0.211597,-0.277253,0.346455,-3.192637,
+       0.365318,0.925667,-0.098401,0.052203,0.346455,-2.51922,
+       0.006337,0.999941,0.008873,-0.395645,0.375,-3.108081,
+       0.003116,0.999941,0.010449,-0.087217,0.375,-2.477647,
+       0.313635,0.925667,-0.211597,-0.277253,0.346455,-3.192637,
+       0.661307,0.711395,-0.237887,0.170398,0.265165,-2.554465,
+       0.548361,0.711395,-0.439564,-0.176885,0.265165,-3.264321,
+       0.661307,0.711395,-0.237887,0.170398,0.265165,-2.554465,
+       0.313635,0.925667,-0.211597,-0.277253,0.346455,-3.192637,
+       0.365318,0.925667,-0.098401,0.052203,0.346455,-2.51922,
+       0.747834,0.387175,-0.539295,-0.109821,0.143506,-3.312218,
+       0.661307,0.711395,-0.237887,0.170398,0.265165,-2.554465,
+       0.882346,0.387175,-0.26751,0.249374,0.143506,-2.578014,
+       0.661307,0.711395,-0.237887,0.170398,0.265165,-2.554465,
+       0.747834,0.387175,-0.539295,-0.109821,0.143506,-3.312218,
+       0.548361,0.711395,-0.439564,-0.176885,0.265165,-3.264321,
+       0.82814,0.197386,-0.524617,-0.086272,0,-3.329037,
+       0.882346,0.387175,-0.26751,0.249374,0.143506,-2.578014,
+       0.953546,0.197386,-0.227573,0.277106,0,-2.586284,
+       0.882346,0.387175,-0.26751,0.249374,0.143506,-2.578014,
+       0.82814,0.197386,-0.524617,-0.086272,0,-3.329037,
+       0.747834,0.387175,-0.539295,-0.109821,0.143506,-3.312218,
+       -0.882346,0.387175,0.26751,-0.423809,0.143506,-2.377279,
+       -0.797706,0.197679,0.569726,-0.705019,0,-2.887125,
+       -0.953546,0.197386,0.227573,-0.451541,0,-2.36901,
+       -0.797706,0.197679,0.569726,-0.705019,0,-2.887125,
+       -0.882346,0.387175,0.26751,-0.423809,0.143506,-2.377279,
+       -0.727589,0.447862,0.519648,-0.681469,0.143506,-2.903944,
+       -0.727589,0.447862,0.519648,-0.681469,0.143506,-2.903944,
+       -0.439564,0.711395,0.548361,-1.048159,0.265165,-3.385595,
+       -0.539295,0.387175,0.747834,-1.096056,0.143506,-3.318531,
+       -0.439564,0.711395,0.548361,-1.048159,0.265165,-3.385595,
+       -0.727589,0.447862,0.519648,-0.681469,0.143506,-2.903944,
+       -0.558784,0.739142,0.376071,-0.614405,0.265165,-2.951841,
+       -0.439564,0.711395,0.548361,-1.048159,0.265165,-3.385595,
+       -0.301902,0.925667,0.228024,-0.514037,0.346455,-3.023525,
+       -0.211597,0.925667,0.313635,-0.976475,0.346455,-3.485963,
+       -0.301902,0.925667,0.228024,-0.514037,0.346455,-3.023525,
+       -0.439564,0.711395,0.548361,-1.048159,0.265165,-3.385595,
+       -0.558784,0.739142,0.376071,-0.614405,0.265165,-2.951841,
+       -0.211597,0.925667,0.313635,-0.976475,0.346455,-3.485963,
+       0.006337,0.999941,0.008873,-0.395645,0.375,-3.108081,
+       0.008873,0.999941,0.006337,-0.891919,0.375,-3.604355,
+       0.006337,0.999941,0.008873,-0.395645,0.375,-3.108081,
+       -0.211597,0.925667,0.313635,-0.976475,0.346455,-3.485963,
+       -0.301902,0.925667,0.228024,-0.514037,0.346455,-3.023525,
+       0.008873,0.999941,0.006337,-0.891919,0.375,-3.604355,
+       0.313635,0.925667,-0.211597,-0.277253,0.346455,-3.192637,
+       0.228024,0.925667,-0.301902,-0.807363,0.346455,-3.722747,
+       0.313635,0.925667,-0.211597,-0.277253,0.346455,-3.192637,
+       0.008873,0.999941,0.006337,-0.891919,0.375,-3.604355,
+       0.006337,0.999941,0.008873,-0.395645,0.375,-3.108081,
+       0.228024,0.925667,-0.301902,-0.807363,0.346455,-3.722747,
+       0.548361,0.711395,-0.439564,-0.176885,0.265165,-3.264321,
+       0.376096,0.711395,-0.593691,-0.735679,0.265165,-3.823115,
+       0.548361,0.711395,-0.439564,-0.176885,0.265165,-3.264321,
+       0.228024,0.925667,-0.301902,-0.807363,0.346455,-3.722747,
+       0.313635,0.925667,-0.211597,-0.277253,0.346455,-3.192637,
+       0.532425,0.387175,-0.752741,-0.687782,0.143506,-3.890179,
+       0.548361,0.711395,-0.439564,-0.176885,0.265165,-3.264321,
+       0.747834,0.387175,-0.539295,-0.109821,0.143506,-3.312218,
+       0.548361,0.711395,-0.439564,-0.176885,0.265165,-3.264321,
+       0.532425,0.387175,-0.752741,-0.687782,0.143506,-3.890179,
+       0.376096,0.711395,-0.593691,-0.735679,0.265165,-3.823115,
+       0.747834,0.387175,-0.539295,-0.109821,0.143506,-3.312218,
+       0.613149,0.197386,-0.76491,-0.670963,0,-3.913728,
+       0.532425,0.387175,-0.752741,-0.687782,0.143506,-3.890179,
+       0.613149,0.197386,-0.76491,-0.670963,0,-3.913728,
+       0.747834,0.387175,-0.539295,-0.109821,0.143506,-3.312218,
+       0.82814,0.197386,-0.524617,-0.086272,0,-3.329037,
+       -0.797706,0.197679,0.569726,-0.705019,0,-2.887125,
+       -0.539295,0.387175,0.747834,-1.096056,0.143506,-3.318531,
+       -0.524617,0.197386,0.82814,-1.112875,0,-3.294981,
+       -0.539295,0.387175,0.747834,-1.096056,0.143506,-3.318531,
+       -0.797706,0.197679,0.569726,-0.705019,0,-2.887125,
+       -0.727589,0.447862,0.519648,-0.681469,0.143506,-2.903944,
+       -0.539295,0.387175,0.747834,-1.096056,0.143506,-3.318531,
+       -0.237887,0.711395,0.661307,-1.599171,0.265165,-3.655167,
+       -0.26751,0.387175,0.882346,-1.622721,0.143506,-3.576191,
+       -0.237887,0.711395,0.661307,-1.599171,0.265165,-3.655167,
+       -0.539295,0.387175,0.747834,-1.096056,0.143506,-3.318531,
+       -0.439564,0.711395,0.548361,-1.048159,0.265165,-3.385595,
+       -0.237887,0.711395,0.661307,-1.599171,0.265165,-3.655167,
+       -0.211597,0.925667,0.313635,-0.976475,0.346455,-3.485963,
+       -0.098401,0.925667,0.365318,-1.563927,0.346455,-3.773362,
+       -0.211597,0.925667,0.313635,-0.976475,0.346455,-3.485963,
+       -0.237887,0.711395,0.661307,-1.599171,0.265165,-3.655167,
+       -0.439564,0.711395,0.548361,-1.048159,0.265165,-3.385595,
+       -0.098401,0.925667,0.365318,-1.563927,0.346455,-3.773362,
+       0.008873,0.999941,0.006337,-0.891919,0.375,-3.604355,
+       0.010449,0.999941,0.003116,-1.522353,0.375,-3.912783,
+       0.008873,0.999941,0.006337,-0.891919,0.375,-3.604355,
+       -0.098401,0.925667,0.365318,-1.563927,0.346455,-3.773362,
+       -0.211597,0.925667,0.313635,-0.976475,0.346455,-3.485963,
+       0.010449,0.999941,0.003116,-1.522353,0.375,-3.912783,
+       0.228024,0.925667,-0.301902,-0.807363,0.346455,-3.722747,
+       0.117746,0.925667,-0.35955,-1.48078,0.346455,-4.052203,
+       0.228024,0.925667,-0.301902,-0.807363,0.346455,-3.722747,
+       0.010449,0.999941,0.003116,-1.522353,0.375,-3.912783,
+       0.008873,0.999941,0.006337,-0.891919,0.375,-3.604355,
+       0.117746,0.925667,-0.35955,-1.48078,0.346455,-4.052203,
+       0.376096,0.711395,-0.593691,-0.735679,0.265165,-3.823115,
+       0.163146,0.711395,-0.683594,-1.445535,0.265165,-4.170398,
+       0.376096,0.711395,-0.593691,-0.735679,0.265165,-3.823115,
+       0.117746,0.925667,-0.35955,-1.48078,0.346455,-4.052203,
+       0.228024,0.925667,-0.301902,-0.807363,0.346455,-3.722747,
+       0.376096,0.711395,-0.593691,-0.735679,0.265165,-3.823115,
+       0.259419,0.387175,-0.884758,-1.421986,0.143506,-4.249374,
+       0.163146,0.711395,-0.683594,-1.445535,0.265165,-4.170398,
+       0.259419,0.387175,-0.884758,-1.421986,0.143506,-4.249374,
+       0.376096,0.711395,-0.593691,-0.735679,0.265165,-3.823115,
+       0.532425,0.387175,-0.752741,-0.687782,0.143506,-3.890179,
+       0.532425,0.387175,-0.752741,-0.687782,0.143506,-3.890179,
+       0.331829,0.197386,-0.922458,-1.413716,0,-4.277106,
+       0.259419,0.387175,-0.884758,-1.421986,0.143506,-4.249374,
+       0.331829,0.197386,-0.922458,-1.413716,0,-4.277106,
+       0.532425,0.387175,-0.752741,-0.687782,0.143506,-3.890179,
+       0.613149,0.197386,-0.76491,-0.670963,0,-3.913728,
+       -0.524617,0.197386,0.82814,-1.112875,0,-3.294981,
+       -0.26751,0.387175,0.882346,-1.622721,0.143506,-3.576191,
+       -0.227573,0.197386,0.953546,-1.63099,0,-3.548459,
+       -0.26751,0.387175,0.882346,-1.622721,0.143506,-3.576191,
+       -0.524617,0.197386,0.82814,-1.112875,0,-3.294981,
+       -0.539295,0.387175,0.747834,-1.096056,0.143506,-3.318531,
+       -0.26751,0.387175,0.882346,-1.622721,0.143506,-3.576191,
+       -0.058632,0.707717,0.704059,-2.23529,0.265165,-3.734835,
+       -0.05908,0.383318,0.921725,-2.240361,0.143506,-3.653545,
+       -0.058632,0.707717,0.704059,-2.23529,0.265165,-3.734835,
+       -0.26751,0.387175,0.882346,-1.622721,0.143506,-3.576191,
+       -0.237887,0.711395,0.661307,-1.599171,0.265165,-3.655167,
+       -0.058632,0.707717,0.704059,-2.23529,0.265165,-3.734835,
+       -0.098401,0.925667,0.365318,-1.563927,0.346455,-3.773362,
+       -0.019977,0.924135,0.381543,-2.227701,0.346455,-3.856494,
+       -0.098401,0.925667,0.365318,-1.563927,0.346455,-3.773362,
+       -0.058632,0.707717,0.704059,-2.23529,0.265165,-3.734835,
+       -0.237887,0.711395,0.661307,-1.599171,0.265165,-3.655167,
+       -0.019977,0.924135,0.381543,-2.227701,0.346455,-3.856494,
+       0.010449,0.999941,0.003116,-1.522353,0.375,-3.912783,
+       0.00412,0.999991,0.000257,-2.21875,0.375,-4,
+       0.010449,0.999941,0.003116,-1.522353,0.375,-3.912783,
+       -0.019977,0.924135,0.381543,-2.227701,0.346455,-3.856494,
+       -0.098401,0.925667,0.365318,-1.563927,0.346455,-3.773362,
+       0.00412,0.999991,0.000257,-2.21875,0.375,-4,
+       0.117746,0.925667,-0.35955,-1.48078,0.346455,-4.052203,
+       0.027592,0.924135,-0.381068,-2.209799,0.346455,-4.143506,
+       0.117746,0.925667,-0.35955,-1.48078,0.346455,-4.052203,
+       0.00412,0.999991,0.000257,-2.21875,0.375,-4,
+       0.010449,0.999941,0.003116,-1.522353,0.375,-3.912783,
+       0.027592,0.924135,-0.381068,-2.209799,0.346455,-4.143506,
+       0.163146,0.711395,-0.683594,-1.445535,0.265165,-4.170398,
+       0.029316,0.707717,-0.705888,-2.20221,0.265165,-4.265165,
+       0.163146,0.711395,-0.683594,-1.445535,0.265165,-4.170398,
+       0.027592,0.924135,-0.381068,-2.209799,0.346455,-4.143506,
+       0.117746,0.925667,-0.35955,-1.48078,0.346455,-4.052203,
+       0.163146,0.711395,-0.683594,-1.445535,0.265165,-4.170398,
+       0.055921,0.383318,-0.921922,-2.197139,0.143506,-4.346455,
+       0.029316,0.707717,-0.705888,-2.20221,0.265165,-4.265165,
+       0.055921,0.383318,-0.921922,-2.197139,0.143506,-4.346455,
+       0.163146,0.711395,-0.683594,-1.445535,0.265165,-4.170398,
+       0.259419,0.387175,-0.884758,-1.421986,0.143506,-4.249374,
+       0.259419,0.387175,-0.884758,-1.421986,0.143506,-4.249374,
+       0.08139,0.195414,-0.977338,-2.195359,0,-4.375,
+       0.055921,0.383318,-0.921922,-2.197139,0.143506,-4.346455,
+       0.08139,0.195414,-0.977338,-2.195359,0,-4.375,
+       0.259419,0.387175,-0.884758,-1.421986,0.143506,-4.249374,
+       0.331829,0.197386,-0.922458,-1.413716,0,-4.277106,
+       -0.227573,0.197386,0.953546,-1.63099,0,-3.548459,
+       -0.05908,0.383318,0.921725,-2.240361,0.143506,-3.653545,
+       -0.040695,0.195414,0.979876,-2.242141,0,-3.625,
+       -0.05908,0.383318,0.921725,-2.240361,0.143506,-3.653545,
+       -0.227573,0.197386,0.953546,-1.63099,0,-3.548459,
+       -0.26751,0.387175,0.882346,-1.622721,0.143506,-3.576191,
+       -0.05908,0.383318,0.921725,-2.240361,0.143506,-3.653545,
+       0,0.707107,0.707107,-7.983022,0.265165,-3.734835,
+       0,0.320722,0.947173,-7.983022,0.143506,-3.653545,
+       0,0.707107,0.707107,-7.983022,0.265165,-3.734835,
+       -0.05908,0.383318,0.921725,-2.240361,0.143506,-3.653545,
+       -0.058632,0.707717,0.704059,-2.23529,0.265165,-3.734835,
+       0,0.707107,0.707107,-7.983022,0.265165,-3.734835,
+       -0.019977,0.924135,0.381543,-2.227701,0.346455,-3.856494,
+       0,0.947173,0.320722,-7.983022,0.346455,-3.856494,
+       -0.019977,0.924135,0.381543,-2.227701,0.346455,-3.856494,
+       0,0.707107,0.707107,-7.983022,0.265165,-3.734835,
+       -0.058632,0.707717,0.704059,-2.23529,0.265165,-3.734835,
+       0,0.947173,0.320722,-7.983022,0.346455,-3.856494,
+       0.00412,0.999991,0.000257,-2.21875,0.375,-4,
+       0,0.997809,-0.066159,-7.983022,0.375,-4,
+       0.00412,0.999991,0.000257,-2.21875,0.375,-4,
+       0,0.947173,0.320722,-7.983022,0.346455,-3.856494,
+       -0.019977,0.924135,0.381543,-2.227701,0.346455,-3.856494,
+       0,0.997809,-0.066159,-7.983022,0.375,-4,
+       0.027592,0.924135,-0.381068,-2.209799,0.346455,-4.143506,
+       0,0.896538,-0.442968,-7.983022,0.346455,-4.143506,
+       0.027592,0.924135,-0.381068,-2.209799,0.346455,-4.143506,
+       0,0.997809,-0.066159,-7.983022,0.375,-4,
+       0.00412,0.999991,0.000257,-2.21875,0.375,-4,
+       0,0.896538,-0.442968,-7.983022,0.346455,-4.143506,
+       0.029316,0.707717,-0.705888,-2.20221,0.265165,-4.265165,
+       0,0.707107,-0.707107,-7.983022,0.265165,-4.265165,
+       0.029316,0.707717,-0.705888,-2.20221,0.265165,-4.265165,
+       0,0.896538,-0.442968,-7.983022,0.346455,-4.143506,
+       0.027592,0.924135,-0.381068,-2.209799,0.346455,-4.143506,
+       0.029316,0.707717,-0.705888,-2.20221,0.265165,-4.265165,
+       0,0.442968,-0.896538,-7.983022,0.143506,-4.346455,
+       0,0.707107,-0.707107,-7.983022,0.265165,-4.265165,
+       0,0.442968,-0.896538,-7.983022,0.143506,-4.346455,
+       0.029316,0.707717,-0.705888,-2.20221,0.265165,-4.265165,
+       0.055921,0.383318,-0.921922,-2.197139,0.143506,-4.346455,
+       0.055921,0.383318,-0.921922,-2.197139,0.143506,-4.346455,
+       0,0.19509,-0.980785,-7.983022,0,-4.375,
+       0,0.442968,-0.896538,-7.983022,0.143506,-4.346455,
+       0,0.19509,-0.980785,-7.983022,0,-4.375,
+       0.055921,0.383318,-0.921922,-2.197139,0.143506,-4.346455,
+       0.08139,0.195414,-0.977338,-2.195359,0,-4.375,
+       -0.040695,0.195414,0.979876,-2.242141,0,-3.625,
+       0,0.320722,0.947173,-7.983022,0.143506,-3.653545,
+       0,0.19509,0.980785,-7.983022,0,-3.625,
+       0,0.320722,0.947173,-7.983022,0.143506,-3.653545,
+       -0.040695,0.195414,0.979876,-2.242141,0,-3.625,
+       -0.05908,0.383318,0.921725,-2.240361,0.143506,-3.653545
+};
+static const struct gllist seccam_pipe_frame = {
+ GL_N3F_V3F, GL_TRIANGLES, 336, seccam_pipe_data, 0
+};
+const struct gllist *seccam_pipe = &seccam_pipe_frame;
diff --git a/hacks/glx/seccam.dxf b/hacks/glx/seccam.dxf
new file mode 100644 (file)
index 0000000..1afb828
--- /dev/null
@@ -0,0 +1,13606 @@
+ 0
+SECTION
+ 2
+ENTITIES
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.25
+30
+5.0
+11
+7.750000000000005
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+3.0
+32
+3.5
+13
+-4.999999999999995
+23
+3.0
+33
+3.5
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+-4.999999999999995
+21
+2.25
+31
+5.0
+12
+7.750000000000005
+22
+2.25
+32
+5.0
+13
+7.750000000000005
+23
+2.25
+33
+5.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.4509122005603654
+30
+1.0102984675382511
+11
+-4.999999999999995
+21
+2.3687095903662865
+31
+1.0
+12
+-4.999999999999995
+22
+2.4509122005603654
+32
+1.0102984675382511
+13
+-4.999999999999995
+23
+2.4509122005603654
+33
+1.0102984675382511
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.3687095903662865
+30
+1.0
+11
+7.750000000000005
+21
+2.4509122005603654
+31
+1.0102984675382511
+12
+7.750000000000005
+22
+2.3687095903662865
+32
+1.0
+13
+7.750000000000005
+23
+2.3687095903662865
+33
+1.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+3.0
+30
+1.6312904096337157
+11
+7.750000000000005
+21
+2.9897015324617477
+31
+1.5490877994396335
+12
+-4.999999999999995
+22
+2.9897015324617477
+32
+1.5490877994396335
+13
+-4.999999999999995
+23
+2.9897015324617477
+33
+1.5490877994396335
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.9897015324617477
+30
+1.5490877994396335
+11
+-4.999999999999995
+21
+3.0
+31
+1.6312904096337157
+12
+7.750000000000005
+22
+3.0
+32
+1.6312904096337157
+13
+7.750000000000005
+23
+3.0
+33
+1.6312904096337157
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.3687095903662865
+30
+1.0
+11
+-4.999999999999995
+21
+2.25
+31
+1.0
+12
+-4.999999999999995
+22
+2.3687095903662865
+32
+1.0
+13
+-4.999999999999995
+23
+2.3687095903662865
+33
+1.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.25
+30
+1.0
+11
+7.750000000000005
+21
+2.3687095903662865
+31
+1.0
+12
+7.750000000000005
+22
+2.25
+32
+1.0
+13
+7.750000000000005
+23
+2.25
+33
+1.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.6402416202020973
+30
+1.078314212963632
+11
+-4.999999999999995
+21
+2.5480782113171188
+31
+1.0373436898884558
+12
+-4.999999999999995
+22
+2.6402416202020973
+32
+1.078314212963632
+13
+-4.999999999999995
+23
+2.6402416202020973
+33
+1.078314212963632
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.5480782113171188
+30
+1.0373436898884558
+11
+7.750000000000005
+21
+2.6402416202020973
+31
+1.078314212963632
+12
+7.750000000000005
+22
+2.5480782113171188
+32
+1.0373436898884558
+13
+7.750000000000005
+23
+2.5480782113171188
+33
+1.0373436898884558
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.921685787036367
+30
+1.3597583797979014
+11
+7.750000000000005
+21
+2.867671745559793
+31
+1.2745811467968204
+12
+-4.999999999999995
+22
+2.867671745559793
+32
+1.2745811467968204
+13
+-4.999999999999995
+23
+2.867671745559793
+33
+1.2745811467968204
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.867671745559793
+30
+1.2745811467968204
+11
+-4.999999999999995
+21
+2.921685787036367
+31
+1.3597583797979014
+12
+7.750000000000005
+22
+2.921685787036367
+32
+1.3597583797979014
+13
+7.750000000000005
+23
+2.921685787036367
+33
+1.3597583797979014
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.25
+30
+1.0
+11
+-4.999999999999995
+21
+0.0
+31
+1.0
+12
+-4.999999999999995
+22
+2.25
+32
+1.0
+13
+-4.999999999999995
+23
+2.25
+33
+1.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+0.0
+30
+1.0
+11
+7.750000000000005
+21
+2.25
+31
+1.0
+12
+7.750000000000005
+22
+0.0
+32
+1.0
+13
+7.750000000000005
+23
+0.0
+33
+1.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+0.0
+30
+5.0
+11
+-4.999999999999995
+21
+2.25
+31
+5.0
+12
+-4.999999999999995
+22
+0.0
+32
+5.0
+13
+-4.999999999999995
+23
+0.0
+33
+5.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.25
+30
+5.0
+11
+7.750000000000005
+21
+0.0
+31
+5.0
+12
+7.750000000000005
+22
+2.25
+32
+5.0
+13
+7.750000000000005
+23
+2.25
+33
+5.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.7254188532031787
+30
+1.1323282544402056
+11
+-4.999999999999995
+21
+2.6402416202020973
+31
+1.078314212963632
+12
+-4.999999999999995
+22
+2.7254188532031787
+32
+1.1323282544402056
+13
+-4.999999999999995
+23
+2.7254188532031787
+33
+1.1323282544402056
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.6402416202020973
+30
+1.078314212963632
+11
+7.750000000000005
+21
+2.7254188532031787
+31
+1.1323282544402056
+12
+7.750000000000005
+22
+2.6402416202020973
+32
+1.078314212963632
+13
+7.750000000000005
+23
+2.6402416202020973
+33
+1.078314212963632
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+3.0
+30
+1.75
+11
+7.750000000000005
+21
+3.0
+31
+1.6312904096337157
+12
+-4.999999999999995
+22
+3.0
+32
+1.6312904096337157
+13
+-4.999999999999995
+23
+3.0
+33
+1.6312904096337157
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+1.6312904096337157
+11
+-4.999999999999995
+21
+3.0
+31
+1.75
+12
+7.750000000000005
+22
+3.0
+32
+1.75
+13
+7.750000000000005
+23
+3.0
+33
+1.75
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.9626563101115444
+30
+1.4519217886828808
+11
+7.750000000000005
+21
+2.921685787036367
+31
+1.3597583797979014
+12
+-4.999999999999995
+22
+2.921685787036367
+32
+1.3597583797979014
+13
+-4.999999999999995
+23
+2.921685787036367
+33
+1.3597583797979014
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.921685787036367
+30
+1.3597583797979014
+11
+-4.999999999999995
+21
+2.9626563101115444
+31
+1.4519217886828808
+12
+7.750000000000005
+22
+2.9626563101115444
+32
+1.4519217886828808
+13
+7.750000000000005
+23
+2.9626563101115444
+33
+1.4519217886828808
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.867671745559793
+30
+1.2745811467968204
+11
+7.750000000000005
+21
+2.8017766952966365
+31
+1.1982233047033635
+12
+-4.999999999999995
+22
+2.8017766952966365
+32
+1.1982233047033635
+13
+-4.999999999999995
+23
+2.8017766952966365
+33
+1.1982233047033635
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.8017766952966365
+30
+1.1982233047033635
+11
+-4.999999999999995
+21
+2.867671745559793
+31
+1.2745811467968204
+12
+7.750000000000005
+22
+2.867671745559793
+32
+1.2745811467968204
+13
+7.750000000000005
+23
+2.867671745559793
+33
+1.2745811467968204
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+3.0
+31
+1.75
+12
+-4.999999999999995
+22
+3.0
+32
+1.75
+13
+-4.999999999999995
+23
+3.0
+33
+1.75
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+1.75
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+7.750000000000005
+22
+3.0
+32
+3.5
+13
+7.750000000000005
+23
+3.0
+33
+3.5
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.9897015324617477
+30
+1.5490877994396335
+11
+7.750000000000005
+21
+2.9626563101115444
+31
+1.4519217886828808
+12
+-4.999999999999995
+22
+2.9626563101115444
+32
+1.4519217886828808
+13
+-4.999999999999995
+23
+2.9626563101115444
+33
+1.4519217886828808
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.9626563101115444
+30
+1.4519217886828808
+11
+-4.999999999999995
+21
+2.9897015324617477
+31
+1.5490877994396335
+12
+7.750000000000005
+22
+2.9897015324617477
+32
+1.5490877994396335
+13
+7.750000000000005
+23
+2.9897015324617477
+33
+1.5490877994396335
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.8017766952966365
+30
+1.1982233047033635
+11
+-4.999999999999995
+21
+2.7254188532031787
+31
+1.1323282544402056
+12
+-4.999999999999995
+22
+2.8017766952966365
+32
+1.1982233047033635
+13
+-4.999999999999995
+23
+2.8017766952966365
+33
+1.1982233047033635
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.7254188532031787
+30
+1.1323282544402056
+11
+7.750000000000005
+21
+2.8017766952966365
+31
+1.1982233047033635
+12
+7.750000000000005
+22
+2.7254188532031787
+32
+1.1323282544402056
+13
+7.750000000000005
+23
+2.7254188532031787
+33
+1.1323282544402056
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.5480782113171188
+30
+1.0373436898884558
+11
+-4.999999999999995
+21
+2.4509122005603654
+31
+1.0102984675382511
+12
+-4.999999999999995
+22
+2.5480782113171188
+32
+1.0373436898884558
+13
+-4.999999999999995
+23
+2.5480782113171188
+33
+1.0373436898884558
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.4509122005603654
+30
+1.0102984675382511
+11
+7.750000000000005
+21
+2.5480782113171188
+31
+1.0373436898884558
+12
+7.750000000000005
+22
+2.4509122005603654
+32
+1.0102984675382511
+13
+7.750000000000005
+23
+2.4509122005603654
+33
+1.0102984675382511
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0022393770907527
+30
+1.649165170260476
+11
+7.750000000000005
+21
+3.0
+31
+1.75
+12
+7.750000000000005
+22
+3.0
+32
+1.6312904096337157
+13
+7.750000000000005
+23
+3.0
+33
+1.6312904096337157
+70
+0
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.3687095903662865
+30
+1.0
+11
+7.750000000000005
+21
+2.25
+31
+1.0
+12
+7.750000000000005
+22
+2.350834829739524
+32
+0.9977606229092469
+13
+7.750000000000005
+23
+2.350834829739524
+33
+0.9977606229092469
+70
+0
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.25
+30
+1.0
+11
+7.750000000000005
+21
+0.0
+31
+1.875
+12
+7.750000000000005
+22
+0.0
+32
+1.0
+13
+7.750000000000005
+23
+0.0
+33
+1.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+0.0
+30
+1.875
+11
+7.750000000000005
+21
+2.25
+31
+1.0
+12
+7.750000000000005
+22
+1.1747544018386193
+32
+1.8759471195380106
+13
+7.750000000000005
+23
+1.1747544018386193
+33
+1.8759471195380106
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+1.1747544018386193
+30
+1.8759471195380106
+11
+7.750000000000005
+21
+2.25
+31
+1.0
+12
+7.750000000000005
+22
+1.2457732068062848
+32
+1.8996200545272304
+13
+7.750000000000005
+23
+1.2457732068062848
+33
+1.8996200545272304
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+1.2457732068062848
+30
+1.8996200545272304
+11
+7.750000000000005
+21
+2.25
+31
+1.0
+12
+7.750000000000007
+22
+1.3062249999999933
+32
+1.9437749999999956
+13
+7.750000000000007
+23
+1.3062249999999933
+33
+1.9437749999999956
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000007
+20
+1.3062249999999933
+30
+1.9437749999999956
+11
+7.750000000000005
+21
+2.25
+31
+1.0
+12
+7.750000000000007
+22
+1.350379945472767
+32
+2.0042267931937126
+13
+7.750000000000007
+23
+1.350379945472767
+33
+2.0042267931937126
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000007
+20
+1.350379945472767
+30
+2.0042267931937126
+11
+7.750000000000005
+21
+2.25
+31
+1.0
+12
+7.750000000000005
+22
+1.3740528804619876
+32
+2.075245598161383
+13
+7.750000000000005
+23
+1.3740528804619876
+33
+2.075245598161383
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+1.3740528804619876
+30
+2.075245598161383
+11
+7.750000000000005
+21
+2.25
+31
+1.0
+12
+7.7500000000000036
+22
+1.3740528804619905
+32
+3.9247544018386162
+13
+7.7500000000000036
+23
+1.3740528804619905
+33
+3.9247544018386162
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+7.7500000000000036
+20
+1.1747544018386225
+30
+4.124052880461991
+11
+7.750000000000005
+21
+0.0
+31
+5.0
+12
+7.750000000000005
+22
+0.0
+32
+4.125
+13
+7.750000000000005
+23
+0.0
+33
+4.125
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+0.0
+30
+5.0
+11
+7.7500000000000036
+21
+1.1747544018386225
+31
+4.124052880461991
+12
+7.750000000000005
+22
+2.25
+32
+5.0
+13
+7.750000000000005
+23
+2.25
+33
+5.0
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.25
+30
+5.0
+11
+7.7500000000000036
+21
+1.1747544018386225
+31
+4.124052880461991
+12
+7.7500000000000036
+22
+1.2457732068062874
+32
+4.100379945472771
+13
+7.7500000000000036
+23
+1.2457732068062874
+33
+4.100379945472771
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.25
+30
+5.0
+11
+7.7500000000000036
+21
+1.2457732068062874
+31
+4.100379945472771
+12
+7.7500000000000036
+22
+1.3062249999999964
+32
+4.056225000000004
+13
+7.7500000000000036
+23
+1.3062249999999964
+33
+4.056225000000004
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.25
+30
+5.0
+11
+7.7500000000000036
+21
+1.3062249999999964
+31
+4.056225000000004
+12
+7.7500000000000036
+22
+1.3503799454727698
+32
+3.9957732068062874
+13
+7.7500000000000036
+23
+1.3503799454727698
+33
+3.9957732068062874
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.25
+30
+5.0
+11
+7.7500000000000036
+21
+1.3503799454727698
+31
+3.9957732068062874
+12
+7.7500000000000036
+22
+1.3740528804619905
+32
+3.9247544018386162
+13
+7.7500000000000036
+23
+1.3740528804619905
+33
+3.9247544018386162
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.25
+30
+5.0
+11
+7.7500000000000036
+21
+1.3740528804619905
+31
+3.9247544018386162
+12
+7.750000000000005
+22
+2.25
+32
+1.0
+13
+7.750000000000005
+23
+2.25
+33
+1.0
+70
+15
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.25
+30
+5.0
+11
+7.750000000000005
+21
+2.25
+31
+1.0
+12
+7.750000000000005
+22
+2.3687095903662865
+32
+1.0
+13
+7.750000000000005
+23
+2.3687095903662865
+33
+1.0
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+2.25
+30
+5.0
+11
+7.750000000000005
+21
+2.3687095903662865
+31
+1.0
+12
+7.750000000000005
+22
+3.0
+32
+3.5
+13
+7.750000000000005
+23
+3.0
+33
+3.5
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.3687095903662865
+31
+1.0
+12
+7.750000000000005
+22
+2.4509122005603654
+32
+1.0102984675382511
+13
+7.750000000000005
+23
+2.4509122005603654
+33
+1.0102984675382511
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.4509122005603654
+31
+1.0102984675382511
+12
+7.750000000000005
+22
+2.5480782113171188
+32
+1.0373436898884558
+13
+7.750000000000005
+23
+2.5480782113171188
+33
+1.0373436898884558
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.5480782113171188
+31
+1.0373436898884558
+12
+7.750000000000005
+22
+2.6402416202020973
+32
+1.078314212963632
+13
+7.750000000000005
+23
+2.6402416202020973
+33
+1.078314212963632
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.6402416202020973
+31
+1.078314212963632
+12
+7.750000000000005
+22
+2.7254188532031787
+32
+1.1323282544402056
+13
+7.750000000000005
+23
+2.7254188532031787
+33
+1.1323282544402056
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.7254188532031787
+31
+1.1323282544402056
+12
+7.750000000000005
+22
+2.8017766952966365
+32
+1.1982233047033635
+13
+7.750000000000005
+23
+2.8017766952966365
+33
+1.1982233047033635
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.8017766952966365
+31
+1.1982233047033635
+12
+7.750000000000005
+22
+2.867671745559793
+32
+1.2745811467968204
+13
+7.750000000000005
+23
+2.867671745559793
+33
+1.2745811467968204
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.867671745559793
+31
+1.2745811467968204
+12
+7.750000000000005
+22
+2.921685787036367
+32
+1.3597583797979014
+13
+7.750000000000005
+23
+2.921685787036367
+33
+1.3597583797979014
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.921685787036367
+31
+1.3597583797979014
+12
+7.750000000000005
+22
+2.9626563101115444
+32
+1.4519217886828808
+13
+7.750000000000005
+23
+2.9626563101115444
+33
+1.4519217886828808
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.9626563101115444
+31
+1.4519217886828808
+12
+7.750000000000005
+22
+2.9897015324617477
+32
+1.5490877994396335
+13
+7.750000000000005
+23
+2.9897015324617477
+33
+1.5490877994396335
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+2.9897015324617477
+31
+1.5490877994396335
+12
+7.750000000000005
+22
+3.0
+32
+1.6312904096337157
+13
+7.750000000000005
+23
+3.0
+33
+1.6312904096337157
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+3.0
+30
+3.5
+11
+7.750000000000005
+21
+3.0
+31
+1.6312904096337157
+12
+7.750000000000005
+22
+3.0
+32
+1.75
+13
+7.750000000000005
+23
+3.0
+33
+1.75
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+1.3740528804619876
+30
+2.075245598161383
+11
+7.550000000000008
+21
+1.350379945472767
+31
+2.0042267931937126
+12
+7.750000000000007
+22
+1.350379945472767
+32
+2.0042267931937126
+13
+7.750000000000007
+23
+1.350379945472767
+33
+2.0042267931937126
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000008
+20
+1.350379945472767
+30
+2.0042267931937126
+11
+7.750000000000005
+21
+1.3740528804619876
+31
+2.075245598161383
+12
+7.550000000000006
+22
+1.3740528804619876
+32
+2.075245598161383
+13
+7.550000000000006
+23
+1.3740528804619876
+33
+2.075245598161383
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+0.0
+30
+1.875
+11
+7.550000000000006
+21
+1.1747544018386193
+31
+1.8759471195380104
+12
+7.550000000000006
+22
+-2.222303025906979e-17
+32
+1.8749999999999998
+13
+7.550000000000006
+23
+-2.222303025906979e-17
+33
+1.8749999999999998
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000006
+20
+1.1747544018386193
+30
+1.8759471195380104
+11
+7.750000000000005
+21
+0.0
+31
+1.875
+12
+7.750000000000005
+22
+1.1747544018386193
+32
+1.8759471195380106
+13
+7.750000000000005
+23
+1.1747544018386193
+33
+1.8759471195380106
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.7500000000000036
+20
+1.1747544018386225
+30
+4.124052880461991
+11
+7.550000000000006
+21
+-2.222303025906979e-17
+31
+4.125
+12
+7.550000000000004
+22
+1.1747544018386225
+32
+4.124052880461991
+13
+7.550000000000004
+23
+1.1747544018386225
+33
+4.124052880461991
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000006
+20
+-2.222303025906979e-17
+30
+4.125
+11
+7.7500000000000036
+21
+1.1747544018386225
+31
+4.124052880461991
+12
+7.750000000000005
+22
+0.0
+32
+4.125
+13
+7.750000000000005
+23
+0.0
+33
+4.125
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.7500000000000036
+20
+1.2457732068062874
+30
+4.100379945472771
+11
+7.550000000000004
+21
+1.1747544018386225
+31
+4.124052880461991
+12
+7.550000000000004
+22
+1.2457732068062874
+32
+4.100379945472771
+13
+7.550000000000004
+23
+1.2457732068062874
+33
+4.100379945472771
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000004
+20
+1.1747544018386225
+30
+4.124052880461991
+11
+7.7500000000000036
+21
+1.2457732068062874
+31
+4.100379945472771
+12
+7.7500000000000036
+22
+1.1747544018386225
+32
+4.124052880461991
+13
+7.7500000000000036
+23
+1.1747544018386225
+33
+4.124052880461991
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.7500000000000036
+20
+1.3503799454727698
+30
+3.9957732068062874
+11
+7.550000000000004
+21
+1.3740528804619905
+31
+3.9247544018386162
+12
+7.7500000000000036
+22
+1.3740528804619905
+32
+3.9247544018386162
+13
+7.7500000000000036
+23
+1.3740528804619905
+33
+3.9247544018386162
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000004
+20
+1.3740528804619905
+30
+3.9247544018386162
+11
+7.7500000000000036
+21
+1.3503799454727698
+31
+3.9957732068062874
+12
+7.550000000000004
+22
+1.3503799454727698
+32
+3.9957732068062874
+13
+7.550000000000004
+23
+1.3503799454727698
+33
+3.9957732068062874
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000007
+20
+1.3062249999999933
+30
+1.9437749999999956
+11
+7.550000000000008
+21
+1.350379945472767
+31
+2.0042267931937126
+12
+7.550000000000008
+22
+1.3062249999999933
+32
+1.9437749999999956
+13
+7.550000000000008
+23
+1.3062249999999933
+33
+1.9437749999999956
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000008
+20
+1.350379945472767
+30
+2.0042267931937126
+11
+7.750000000000007
+21
+1.3062249999999933
+31
+1.9437749999999956
+12
+7.750000000000007
+22
+1.350379945472767
+32
+2.0042267931937126
+13
+7.750000000000007
+23
+1.350379945472767
+33
+2.0042267931937126
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.7500000000000036
+20
+1.3062249999999964
+30
+4.056225000000004
+11
+7.550000000000004
+21
+1.2457732068062874
+31
+4.100379945472771
+12
+7.550000000000004
+22
+1.3062249999999964
+32
+4.056225000000004
+13
+7.550000000000004
+23
+1.3062249999999964
+33
+4.056225000000004
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000004
+20
+1.2457732068062874
+30
+4.100379945472771
+11
+7.7500000000000036
+21
+1.3062249999999964
+31
+4.056225000000004
+12
+7.7500000000000036
+22
+1.2457732068062874
+32
+4.100379945472771
+13
+7.7500000000000036
+23
+1.2457732068062874
+33
+4.100379945472771
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+1.1747544018386193
+30
+1.8759471195380106
+11
+7.550000000000006
+21
+1.2457732068062848
+31
+1.8996200545272304
+12
+7.550000000000006
+22
+1.1747544018386193
+32
+1.8759471195380104
+13
+7.550000000000006
+23
+1.1747544018386193
+33
+1.8759471195380104
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000006
+20
+1.2457732068062848
+30
+1.8996200545272304
+11
+7.750000000000005
+21
+1.1747544018386193
+31
+1.8759471195380106
+12
+7.750000000000005
+22
+1.2457732068062848
+32
+1.8996200545272304
+13
+7.750000000000005
+23
+1.2457732068062848
+33
+1.8996200545272304
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.7500000000000036
+20
+1.3740528804619905
+30
+3.9247544018386162
+11
+7.550000000000006
+21
+1.3740528804619876
+31
+2.075245598161383
+12
+7.750000000000005
+22
+1.3740528804619876
+32
+2.075245598161383
+13
+7.750000000000005
+23
+1.3740528804619876
+33
+2.075245598161383
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000006
+20
+1.3740528804619876
+30
+2.075245598161383
+11
+7.7500000000000036
+21
+1.3740528804619905
+31
+3.9247544018386162
+12
+7.550000000000004
+22
+1.3740528804619905
+32
+3.9247544018386162
+13
+7.550000000000004
+23
+1.3740528804619905
+33
+3.9247544018386162
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.750000000000005
+20
+1.2457732068062848
+30
+1.8996200545272304
+11
+7.550000000000008
+21
+1.3062249999999933
+31
+1.9437749999999956
+12
+7.550000000000006
+22
+1.2457732068062848
+32
+1.8996200545272304
+13
+7.550000000000006
+23
+1.2457732068062848
+33
+1.8996200545272304
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000008
+20
+1.3062249999999933
+30
+1.9437749999999956
+11
+7.750000000000005
+21
+1.2457732068062848
+31
+1.8996200545272304
+12
+7.750000000000007
+22
+1.3062249999999933
+32
+1.9437749999999956
+13
+7.750000000000007
+23
+1.3062249999999933
+33
+1.9437749999999956
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.7500000000000036
+20
+1.3062249999999964
+30
+4.056225000000004
+11
+7.550000000000004
+21
+1.3503799454727698
+31
+3.9957732068062874
+12
+7.7500000000000036
+22
+1.3503799454727698
+32
+3.9957732068062874
+13
+7.7500000000000036
+23
+1.3503799454727698
+33
+3.9957732068062874
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+7.550000000000004
+20
+1.3503799454727698
+30
+3.9957732068062874
+11
+7.7500000000000036
+21
+1.3062249999999964
+31
+4.056225000000004
+12
+7.550000000000004
+22
+1.3062249999999964
+32
+4.056225000000004
+13
+7.550000000000004
+23
+1.3062249999999964
+33
+4.056225000000004
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.25
+30
+5.0
+11
+-4.999999999999995
+21
+0.0
+31
+1.0
+12
+-4.999999999999995
+22
+0.0
+32
+5.0
+13
+-4.999999999999995
+23
+0.0
+33
+5.0
+70
+1
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+0.0
+30
+1.0
+11
+-4.999999999999995
+21
+2.25
+31
+5.0
+12
+-4.999999999999995
+22
+2.25
+32
+1.0
+13
+-4.999999999999995
+23
+2.25
+33
+1.0
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.25
+30
+1.0
+11
+-4.999999999999995
+21
+2.25
+31
+5.0
+12
+-4.999999999999995
+22
+3.0
+32
+3.5
+13
+-4.999999999999995
+23
+3.0
+33
+3.5
+70
+13
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.25
+30
+1.0
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.3687095903662865
+32
+1.0
+13
+-4.999999999999995
+23
+2.3687095903662865
+33
+1.0
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.3687095903662865
+30
+1.0
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.4509122005603654
+32
+1.0102984675382511
+13
+-4.999999999999995
+23
+2.4509122005603654
+33
+1.0102984675382511
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.4509122005603654
+30
+1.0102984675382511
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.5480782113171188
+32
+1.0373436898884558
+13
+-4.999999999999995
+23
+2.5480782113171188
+33
+1.0373436898884558
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.5480782113171188
+30
+1.0373436898884558
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.6402416202020973
+32
+1.078314212963632
+13
+-4.999999999999995
+23
+2.6402416202020973
+33
+1.078314212963632
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.6402416202020973
+30
+1.078314212963632
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.7254188532031787
+32
+1.1323282544402056
+13
+-4.999999999999995
+23
+2.7254188532031787
+33
+1.1323282544402056
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.7254188532031787
+30
+1.1323282544402056
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.8017766952966365
+32
+1.1982233047033635
+13
+-4.999999999999995
+23
+2.8017766952966365
+33
+1.1982233047033635
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.8017766952966365
+30
+1.1982233047033635
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.867671745559793
+32
+1.2745811467968204
+13
+-4.999999999999995
+23
+2.867671745559793
+33
+1.2745811467968204
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.867671745559793
+30
+1.2745811467968204
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.921685787036367
+32
+1.3597583797979014
+13
+-4.999999999999995
+23
+2.921685787036367
+33
+1.3597583797979014
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.921685787036367
+30
+1.3597583797979014
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.9626563101115444
+32
+1.4519217886828808
+13
+-4.999999999999995
+23
+2.9626563101115444
+33
+1.4519217886828808
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.9626563101115444
+30
+1.4519217886828808
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+2.9897015324617477
+32
+1.5490877994396335
+13
+-4.999999999999995
+23
+2.9897015324617477
+33
+1.5490877994396335
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+2.9897015324617477
+30
+1.5490877994396335
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+3.0
+32
+1.6312904096337157
+13
+-4.999999999999995
+23
+3.0
+33
+1.6312904096337157
+70
+3
+  0
+3DFACE
+ 8
+body
+10
+-4.999999999999995
+20
+3.0
+30
+1.6312904096337157
+11
+-4.999999999999995
+21
+3.0
+31
+3.5
+12
+-4.999999999999995
+22
+3.0
+32
+1.75
+13
+-4.999999999999995
+23
+3.0
+33
+1.75
+70
+1
+  0
+LINE
+ 8
+pipe
+10
+-0.08721736878314612
+20
+8.494352845371596e-15
+30
+-2.4776466855968224
+11
+-0.3956452587067991
+21
+1.0422940645021578e-14
+31
+-3.1080810198814763
+  0
+LINE
+ 8
+pipe
+10
+-1.5223533144031824
+20
+1.2493526601693497e-14
+30
+-3.9127826312168583
+11
+-2.2187500000000036
+21
+1.2411535748317739e-14
+31
+-4.000000000000002
+  0
+LINE
+ 8
+pipe
+10
+-2.6645352591003757e-15
+20
+6.228730001642882e-15
+30
+-1.7812500000000018
+11
+-2.6645352591003757e-15
+21
+4.592425496802568e-17
+31
+0.4374999999999982
+  0
+LINE
+ 8
+pipe
+10
+-8.000000000000002
+20
+1.2411535748317739e-14
+30
+-4.000000000000002
+11
+-2.2187500000000036
+21
+1.2411535748317739e-14
+31
+-4.000000000000002
+  0
+LINE
+ 8
+pipe
+10
+-2.6645352591003757e-15
+20
+6.228730001642882e-15
+30
+-1.7812500000000018
+11
+-0.08721736878314612
+21
+8.494352845371596e-15
+31
+-2.4776466855968224
+  0
+LINE
+ 8
+pipe
+10
+-0.8919189801185281
+20
+1.1805865272252293e-14
+30
+-3.604354741293205
+11
+-1.5223533144031824
+21
+1.2493526601693497e-14
+31
+-3.9127826312168583
+  0
+LINE
+ 8
+pipe
+10
+-0.3956452587067991
+20
+1.0422940645021578e-14
+30
+-3.1080810198814763
+11
+-0.8919189801185281
+21
+1.1805865272252293e-14
+31
+-3.604354741293205
+  0
+3DFACE
+ 8
+pipe
+10
+-0.2651650429449557
+20
+0.2651650429449638
+30
+0.4374999999999982
+11
+-0.3464548246917367
+21
+0.14350628713692343
+31
+-1.7596392507172038
+12
+-0.3464548246917367
+22
+0.1435062871369173
+32
+0.4374999999999982
+13
+-0.3464548246917367
+23
+0.1435062871369173
+33
+0.4374999999999982
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.3464548246917367
+20
+0.14350628713692343
+30
+-1.7596392507172038
+11
+-0.2651650429449557
+21
+0.2651650429449638
+31
+0.4374999999999982
+12
+-0.2651650429449557
+22
+0.26516504294496995
+32
+-1.764709848576957
+13
+-0.2651650429449557
+23
+0.26516504294496995
+33
+-1.764709848576957
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.2651650429449557
+20
+0.26516504294496995
+30
+-1.764709848576957
+11
+-0.1435062871369066
+21
+0.34645482469173966
+31
+0.4374999999999982
+12
+-0.1435062871369066
+22
+0.3464548246917458
+32
+-1.7722985345540216
+13
+-0.1435062871369066
+23
+0.3464548246917458
+33
+-1.7722985345540216
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.1435062871369066
+20
+0.34645482469173966
+30
+0.4374999999999982
+11
+-0.2651650429449557
+21
+0.26516504294496995
+31
+-1.764709848576957
+12
+-0.2651650429449557
+22
+0.2651650429449638
+32
+0.4374999999999982
+13
+-0.2651650429449557
+23
+0.2651650429449638
+33
+0.4374999999999982
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.1435062871369066
+20
+0.3464548246917458
+30
+-1.7722985345540216
+11
+5.329070518200751e-15
+21
+0.37500000000000466
+31
+0.4374999999999982
+12
+5.329070518200751e-15
+22
+0.3750000000000108
+32
+-1.7812500000000009
+13
+5.329070518200751e-15
+23
+0.3750000000000108
+33
+-1.7812500000000009
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+5.329070518200751e-15
+20
+0.37500000000000466
+30
+0.4374999999999982
+11
+-0.1435062871369066
+21
+0.3464548246917458
+31
+-1.7722985345540216
+12
+-0.1435062871369066
+22
+0.34645482469173966
+32
+0.4374999999999982
+13
+-0.1435062871369066
+23
+0.34645482469173966
+33
+0.4374999999999982
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+5.329070518200751e-15
+20
+0.3750000000000108
+30
+-1.7812500000000009
+11
+0.1435062871369155
+21
+0.34645482469173394
+31
+0.4374999999999982
+12
+0.1435062871369155
+22
+0.34645482469174016
+32
+-1.7902014654459806
+13
+0.1435062871369155
+23
+0.34645482469174016
+33
+-1.7902014654459806
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.1435062871369155
+20
+0.34645482469173394
+30
+0.4374999999999982
+11
+5.329070518200751e-15
+21
+0.3750000000000108
+31
+-1.7812500000000009
+12
+5.329070518200751e-15
+22
+0.37500000000000466
+32
+0.4374999999999982
+13
+5.329070518200751e-15
+23
+0.37500000000000466
+33
+0.4374999999999982
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.1435062871369155
+20
+0.34645482469174016
+30
+-1.7902014654459806
+11
+0.265165042944961
+21
+0.26516504294495347
+31
+0.4374999999999982
+12
+0.265165042944961
+22
+0.2651650429449597
+32
+-1.7977901514230457
+13
+0.265165042944961
+23
+0.2651650429449597
+33
+-1.7977901514230457
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.265165042944961
+20
+0.26516504294495347
+30
+0.4374999999999982
+11
+0.1435062871369155
+21
+0.34645482469174016
+31
+-1.7902014654459806
+12
+0.1435062871369155
+22
+0.34645482469173394
+32
+0.4374999999999982
+13
+0.1435062871369155
+23
+0.34645482469173394
+33
+0.4374999999999982
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.3464548246917367
+20
+0.14350628713691005
+30
+-1.8028607492827988
+11
+0.265165042944961
+21
+0.26516504294495347
+31
+0.4374999999999982
+12
+0.3464548246917367
+22
+0.1435062871369038
+32
+0.4374999999999982
+13
+0.3464548246917367
+23
+0.1435062871369038
+33
+0.4374999999999982
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.265165042944961
+20
+0.26516504294495347
+30
+0.4374999999999982
+11
+0.3464548246917367
+21
+0.14350628713691005
+31
+-1.8028607492827988
+12
+0.265165042944961
+22
+0.2651650429449597
+32
+-1.7977901514230457
+13
+0.265165042944961
+23
+0.2651650429449597
+33
+-1.7977901514230457
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.3750000000000018
+20
+-1.1024457386968605e-15
+30
+-1.8046413064661762
+11
+0.3464548246917367
+21
+0.1435062871369038
+31
+0.4374999999999982
+12
+0.3750000000000018
+22
+-7.350434090010048e-15
+32
+0.4374999999999982
+13
+0.3750000000000018
+23
+-7.350434090010048e-15
+33
+0.4374999999999982
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.3464548246917367
+20
+0.1435062871369038
+30
+0.4374999999999982
+11
+0.3750000000000018
+21
+-1.1024457386968605e-15
+31
+-1.8046413064661762
+12
+0.3464548246917367
+22
+0.14350628713691005
+32
+-1.8028607492827988
+13
+0.3464548246917367
+23
+0.14350628713691005
+33
+-1.8028607492827988
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.3464548246917367
+20
+0.1435062871369173
+30
+0.4374999999999982
+11
+-0.3750000000000071
+21
+1.3513981487014599e-14
+31
+-1.7578586935338274
+12
+-0.3750000000000071
+22
+7.396358344978072e-15
+32
+0.4374999999999982
+13
+-0.3750000000000071
+23
+7.396358344978072e-15
+33
+0.4374999999999982
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.3750000000000071
+20
+1.3513981487014599e-14
+30
+-1.7578586935338274
+11
+-0.3464548246917367
+21
+0.1435062871369173
+31
+0.4374999999999982
+12
+-0.3464548246917367
+22
+0.14350628713692343
+32
+-1.7596392507172038
+13
+-0.3464548246917367
+23
+0.14350628713692343
+33
+-1.7596392507172038
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.2651650429449557
+20
+0.26516504294496995
+30
+-1.764709848576957
+11
+-0.4238086227292559
+21
+0.14350628713692543
+31
+-2.3772791694998214
+12
+-0.3464548246917367
+22
+0.14350628713692343
+32
+-1.7596392507172038
+13
+-0.3464548246917367
+23
+0.14350628713692343
+33
+-1.7596392507172038
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.4238086227292559
+20
+0.14350628713692543
+30
+-2.3772791694998214
+11
+-0.2651650429449557
+21
+0.26516504294496995
+31
+-1.764709848576957
+12
+-0.3448331615114766
+22
+0.265165042944972
+32
+-2.4008287144809053
+13
+-0.3448331615114766
+23
+0.265165042944972
+33
+-2.4008287144809053
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.3448331615114766
+20
+0.265165042944972
+30
+-2.4008287144809053
+11
+-0.1435062871369066
+21
+0.3464548246917458
+31
+-1.7722985345540216
+12
+-0.22663803114378656
+22
+0.34645482469174793
+32
+-2.4360730992077455
+13
+-0.22663803114378656
+23
+0.34645482469174793
+33
+-2.4360730992077455
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.1435062871369066
+20
+0.3464548246917458
+30
+-1.7722985345540216
+11
+-0.3448331615114766
+21
+0.265165042944972
+31
+-2.4008287144809053
+12
+-0.2651650429449557
+22
+0.26516504294496995
+32
+-1.764709848576957
+13
+-0.2651650429449557
+23
+0.26516504294496995
+33
+-1.764709848576957
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.22663803114378656
+20
+0.34645482469174793
+30
+-2.4360730992077455
+11
+5.329070518200751e-15
+21
+0.3750000000000108
+31
+-1.7812500000000009
+12
+-0.08721736878313813
+22
+0.3750000000000131
+32
+-2.4776466855968238
+13
+-0.08721736878313813
+23
+0.3750000000000131
+33
+-2.4776466855968238
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+5.329070518200751e-15
+20
+0.3750000000000108
+30
+-1.7812500000000009
+11
+-0.22663803114378656
+21
+0.34645482469174793
+31
+-2.4360730992077455
+12
+-0.1435062871369066
+22
+0.3464548246917458
+32
+-1.7722985345540216
+13
+-0.1435062871369066
+23
+0.3464548246917458
+33
+-1.7722985345540216
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.08721736878313813
+20
+0.3750000000000131
+30
+-2.4776466855968238
+11
+0.1435062871369155
+21
+0.34645482469174016
+31
+-1.7902014654459806
+12
+0.05220329357750764
+22
+0.34645482469174255
+32
+-2.519220271985901
+13
+0.05220329357750764
+23
+0.34645482469174255
+33
+-2.519220271985901
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.1435062871369155
+20
+0.34645482469174016
+30
+-1.7902014654459806
+11
+-0.08721736878313813
+21
+0.3750000000000131
+31
+-2.4776466855968238
+12
+5.329070518200751e-15
+22
+0.3750000000000108
+32
+-1.7812500000000009
+13
+5.329070518200751e-15
+23
+0.3750000000000108
+33
+-1.7812500000000009
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.05220329357750764
+20
+0.34645482469174255
+30
+-2.519220271985901
+11
+0.265165042944961
+21
+0.2651650429449597
+31
+-1.7977901514230457
+12
+0.1703984239451941
+22
+0.2651650429449621
+32
+-2.554464656712741
+13
+0.1703984239451941
+23
+0.2651650429449621
+33
+-2.554464656712741
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.265165042944961
+20
+0.2651650429449597
+30
+-1.7977901514230457
+11
+0.05220329357750764
+21
+0.34645482469174255
+31
+-2.519220271985901
+12
+0.1435062871369155
+22
+0.34645482469174016
+32
+-1.7902014654459806
+13
+0.1435062871369155
+23
+0.34645482469174016
+33
+-1.7902014654459806
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.249373885162969
+20
+0.14350628713691257
+30
+-2.578014201693824
+11
+0.265165042944961
+21
+0.2651650429449597
+31
+-1.7977901514230457
+12
+0.3464548246917367
+22
+0.14350628713691005
+32
+-1.8028607492827988
+13
+0.3464548246917367
+23
+0.14350628713691005
+33
+-1.8028607492827988
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.265165042944961
+20
+0.2651650429449597
+30
+-1.7977901514230457
+11
+0.249373885162969
+21
+0.14350628713691257
+31
+-2.578014201693824
+12
+0.1703984239451941
+22
+0.2651650429449621
+32
+-2.554464656712741
+13
+0.1703984239451941
+23
+0.2651650429449621
+33
+-2.554464656712741
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.27710637917476255
+20
+1.4405113201022419e-15
+30
+-2.586283702182938
+11
+0.3464548246917367
+21
+0.14350628713691005
+31
+-1.8028607492827988
+12
+0.3750000000000018
+22
+-1.1024457386968605e-15
+32
+-1.8046413064661762
+13
+0.3750000000000018
+23
+-1.1024457386968605e-15
+33
+-1.8046413064661762
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.3464548246917367
+20
+0.14350628713691005
+30
+-1.8028607492827988
+11
+0.27710637917476255
+21
+1.4405113201022419e-15
+31
+-2.586283702182938
+12
+0.249373885162969
+22
+0.14350628713691257
+32
+-2.578014201693824
+13
+0.249373885162969
+23
+0.14350628713691257
+33
+-2.578014201693824
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.3464548246917367
+20
+0.14350628713692343
+30
+-1.7596392507172038
+11
+-0.4515411167410548
+21
+1.5502270115672923e-14
+31
+-2.3690096690107065
+12
+-0.3750000000000071
+22
+1.3513981487014599e-14
+32
+-1.7578586935338274
+13
+-0.3750000000000071
+23
+1.3513981487014599e-14
+33
+-1.7578586935338274
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.4515411167410548
+20
+1.5502270115672923e-14
+30
+-2.3690096690107065
+11
+-0.3464548246917367
+21
+0.14350628713692343
+31
+-1.7596392507172038
+12
+-0.4238086227292559
+22
+0.14350628713692543
+32
+-2.3772791694998214
+13
+-0.4238086227292559
+23
+0.14350628713692543
+33
+-2.3772791694998214
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.3448331615114766
+20
+0.265165042944972
+30
+-2.4008287144809053
+11
+-0.6814692043452624
+21
+0.14350628713692704
+31
+-2.9039438536912954
+12
+-0.4238086227292559
+22
+0.14350628713692543
+32
+-2.3772791694998214
+13
+-0.4238086227292559
+23
+0.14350628713692543
+33
+-2.3772791694998214
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.6814692043452624
+20
+0.14350628713692704
+30
+-2.9039438536912954
+11
+-0.3448331615114766
+21
+0.265165042944972
+31
+-2.4008287144809053
+12
+-0.6144054358449154
+22
+0.26516504294497373
+32
+-2.9518411970195952
+13
+-0.6144054358449154
+23
+0.26516504294497373
+33
+-2.9518411970195952
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.6144054358449154
+20
+0.26516504294497373
+30
+-2.9518411970195952
+11
+-0.22663803114378656
+21
+0.34645482469174793
+31
+-2.4360730992077455
+12
+-0.514037413441236
+22
+0.34645482469174976
+32
+-3.0235246370610946
+13
+-0.514037413441236
+23
+0.34645482469174976
+33
+-3.0235246370610946
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.22663803114378656
+20
+0.34645482469174793
+30
+-2.4360730992077455
+11
+-0.6144054358449154
+21
+0.26516504294497373
+31
+-2.9518411970195952
+12
+-0.3448331615114766
+22
+0.265165042944972
+32
+-2.4008287144809053
+13
+-0.3448331615114766
+23
+0.265165042944972
+33
+-2.4008287144809053
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.514037413441236
+20
+0.34645482469174976
+30
+-3.0235246370610946
+11
+-0.08721736878313813
+21
+0.3750000000000131
+31
+-2.4776466855968238
+12
+-0.395645258706792
+22
+0.37500000000001504
+32
+-3.10808101988148
+13
+-0.395645258706792
+23
+0.37500000000001504
+33
+-3.10808101988148
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.08721736878313813
+20
+0.3750000000000131
+30
+-2.4776466855968238
+11
+-0.514037413441236
+21
+0.34645482469174976
+31
+-3.0235246370610946
+12
+-0.22663803114378656
+22
+0.34645482469174793
+32
+-2.4360730992077455
+13
+-0.22663803114378656
+23
+0.34645482469174793
+33
+-2.4360730992077455
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.395645258706792
+20
+0.37500000000001504
+30
+-3.10808101988148
+11
+0.05220329357750764
+21
+0.34645482469174255
+31
+-2.519220271985901
+12
+-0.2772531039723507
+22
+0.3464548246917446
+32
+-3.1926374027018634
+13
+-0.2772531039723507
+23
+0.3464548246917446
+33
+-3.1926374027018634
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.05220329357750764
+20
+0.34645482469174255
+30
+-2.519220271985901
+11
+-0.395645258706792
+21
+0.37500000000001504
+31
+-3.10808101988148
+12
+-0.08721736878313813
+22
+0.3750000000000131
+32
+-2.4776466855968238
+13
+-0.08721736878313813
+23
+0.3750000000000131
+33
+-2.4776466855968238
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.2772531039723507
+20
+0.3464548246917446
+30
+-3.1926374027018634
+11
+0.1703984239451941
+21
+0.2651650429449621
+31
+-2.554464656712741
+12
+-0.1768850815686731
+22
+0.2651650429449643
+32
+-3.264320842743362
+13
+-0.1768850815686731
+23
+0.2651650429449643
+33
+-3.264320842743362
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.1703984239451941
+20
+0.2651650429449621
+30
+-2.554464656712741
+11
+-0.2772531039723507
+21
+0.3464548246917446
+31
+-3.1926374027018634
+12
+0.05220329357750764
+22
+0.34645482469174255
+32
+-2.519220271985901
+13
+0.05220329357750764
+23
+0.34645482469174255
+33
+-2.519220271985901
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.10982131306833232
+20
+0.14350628713691482
+30
+-3.3122181860716595
+11
+0.1703984239451941
+21
+0.2651650429449621
+31
+-2.554464656712741
+12
+0.249373885162969
+22
+0.14350628713691257
+32
+-2.578014201693824
+13
+0.249373885162969
+23
+0.14350628713691257
+33
+-2.578014201693824
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.1703984239451941
+20
+0.2651650429449621
+30
+-2.554464656712741
+11
+-0.10982131306833232
+21
+0.14350628713691482
+31
+-3.3122181860716595
+12
+-0.1768850815686731
+22
+0.2651650429449643
+32
+-3.264320842743362
+13
+-0.1768850815686731
+23
+0.2651650429449643
+33
+-3.264320842743362
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.08627164929092768
+20
+3.712700234448697e-15
+30
+-3.329037496355521
+11
+0.249373885162969
+21
+0.14350628713691257
+31
+-2.578014201693824
+12
+0.27710637917476255
+22
+1.4405113201022419e-15
+32
+-2.586283702182938
+13
+0.27710637917476255
+23
+1.4405113201022419e-15
+33
+-2.586283702182938
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+0.249373885162969
+20
+0.14350628713691257
+30
+-2.578014201693824
+11
+-0.08627164929092768
+21
+3.712700234448697e-15
+31
+-3.329037496355521
+12
+-0.10982131306833232
+22
+0.14350628713691482
+32
+-3.3122181860716595
+13
+-0.10982131306833232
+23
+0.14350628713691482
+33
+-3.3122181860716595
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.4238086227292559
+20
+0.14350628713692543
+30
+-2.3772791694998214
+11
+-0.7050188681226714
+21
+1.7087256800626433e-14
+31
+-2.887124543407431
+12
+-0.4515411167410548
+22
+1.5502270115672923e-14
+32
+-2.3690096690107065
+13
+-0.4515411167410548
+23
+1.5502270115672923e-14
+33
+-2.3690096690107065
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.7050188681226714
+20
+1.7087256800626433e-14
+30
+-2.887124543407431
+11
+-0.4238086227292559
+21
+0.14350628713692543
+31
+-2.3772791694998214
+12
+-0.6814692043452624
+22
+0.14350628713692704
+32
+-2.9039438536912954
+13
+-0.6814692043452624
+23
+0.14350628713692704
+33
+-2.9039438536912954
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.6814692043452624
+20
+0.14350628713692704
+30
+-2.9039438536912954
+11
+-1.0481588029804083
+21
+0.2651650429449749
+31
+-3.3855945641550873
+12
+-1.0960561463087082
+22
+0.1435062871369282
+32
+-3.318530795654741
+13
+-1.0960561463087082
+23
+0.1435062871369282
+33
+-3.318530795654741
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.0481588029804083
+20
+0.2651650429449749
+30
+-3.3855945641550873
+11
+-0.6814692043452624
+21
+0.14350628713692704
+31
+-2.9039438536912954
+12
+-0.6144054358449154
+22
+0.26516504294497373
+32
+-2.9518411970195952
+13
+-0.6144054358449154
+23
+0.26516504294497373
+33
+-2.9518411970195952
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.0481588029804083
+20
+0.2651650429449749
+30
+-3.3855945641550873
+11
+-0.514037413441236
+21
+0.34645482469174976
+31
+-3.0235246370610946
+12
+-0.976475362938908
+22
+0.34645482469175104
+32
+-3.4859625865587667
+13
+-0.976475362938908
+23
+0.34645482469175104
+33
+-3.4859625865587667
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.514037413441236
+20
+0.34645482469174976
+30
+-3.0235246370610946
+11
+-1.0481588029804083
+21
+0.2651650429449749
+31
+-3.3855945641550873
+12
+-0.6144054358449154
+22
+0.26516504294497373
+32
+-2.9518411970195952
+13
+-0.6144054358449154
+23
+0.26516504294497373
+33
+-2.9518411970195952
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.976475362938908
+20
+0.34645482469175104
+30
+-3.4859625865587667
+11
+-0.395645258706792
+21
+0.37500000000001504
+31
+-3.10808101988148
+12
+-0.8919189801185237
+22
+0.37500000000001643
+32
+-3.60435474129321
+13
+-0.8919189801185237
+23
+0.37500000000001643
+33
+-3.60435474129321
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.395645258706792
+20
+0.37500000000001504
+30
+-3.10808101988148
+11
+-0.976475362938908
+21
+0.34645482469175104
+31
+-3.4859625865587667
+12
+-0.514037413441236
+22
+0.34645482469174976
+32
+-3.0235246370610946
+13
+-0.514037413441236
+23
+0.34645482469174976
+33
+-3.0235246370610946
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.8919189801185237
+20
+0.37500000000001643
+30
+-3.60435474129321
+11
+-0.2772531039723507
+21
+0.3464548246917446
+31
+-3.1926374027018634
+12
+-0.8073625972981393
+22
+0.3464548246917461
+32
+-3.7227468960276524
+13
+-0.8073625972981393
+23
+0.3464548246917461
+33
+-3.7227468960276524
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.2772531039723507
+20
+0.3464548246917446
+30
+-3.1926374027018634
+11
+-0.8919189801185237
+21
+0.37500000000001643
+31
+-3.60435474129321
+12
+-0.395645258706792
+22
+0.37500000000001504
+32
+-3.10808101988148
+13
+-0.395645258706792
+23
+0.37500000000001504
+33
+-3.10808101988148
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.8073625972981393
+20
+0.3464548246917461
+30
+-3.7227468960276524
+11
+-0.1768850815686731
+21
+0.2651650429449643
+31
+-3.264320842743362
+12
+-0.7356791572566417
+22
+0.26516504294496585
+32
+-3.8231149184313296
+13
+-0.7356791572566417
+23
+0.26516504294496585
+33
+-3.8231149184313296
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.1768850815686731
+20
+0.2651650429449643
+30
+-3.264320842743362
+11
+-0.8073625972981393
+21
+0.3464548246917461
+31
+-3.7227468960276524
+12
+-0.2772531039723507
+22
+0.3464548246917446
+32
+-3.1926374027018634
+13
+-0.2772531039723507
+23
+0.3464548246917446
+33
+-3.1926374027018634
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.6877818139283445
+20
+0.14350628713691643
+30
+-3.8901786869316712
+11
+-0.1768850815686731
+21
+0.2651650429449643
+31
+-3.264320842743362
+12
+-0.10982131306833232
+22
+0.14350628713691482
+32
+-3.3122181860716595
+13
+-0.10982131306833232
+23
+0.14350628713691482
+33
+-3.3122181860716595
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.1768850815686731
+20
+0.2651650429449643
+30
+-3.264320842743362
+11
+-0.6877818139283445
+21
+0.14350628713691643
+31
+-3.8901786869316712
+12
+-0.7356791572566417
+22
+0.26516504294496585
+32
+-3.8231149184313296
+13
+-0.7356791572566417
+23
+0.26516504294496585
+33
+-3.8231149184313296
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.10982131306833232
+20
+0.14350628713691482
+30
+-3.3122181860716595
+11
+-0.6709625036444828
+21
+5.342009518651689e-15
+31
+-3.9137283507090763
+12
+-0.6877818139283445
+22
+0.14350628713691643
+32
+-3.8901786869316712
+13
+-0.6877818139283445
+23
+0.14350628713691643
+33
+-3.8901786869316712
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.6709625036444828
+20
+5.342009518651689e-15
+30
+-3.9137283507090763
+11
+-0.10982131306833232
+21
+0.14350628713691482
+31
+-3.3122181860716595
+12
+-0.08627164929092768
+22
+3.712700234448697e-15
+32
+-3.329037496355521
+13
+-0.08627164929092768
+23
+3.712700234448697e-15
+33
+-3.329037496355521
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.7050188681226714
+20
+1.7087256800626433e-14
+30
+-2.887124543407431
+11
+-1.0960561463087082
+21
+0.1435062871369282
+31
+-3.318530795654741
+12
+-1.1128754565925734
+22
+1.822379677088487e-14
+32
+-3.294981131877333
+13
+-1.1128754565925734
+23
+1.822379677088487e-14
+33
+-3.294981131877333
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.0960561463087082
+20
+0.1435062871369282
+30
+-3.318530795654741
+11
+-0.7050188681226714
+21
+1.7087256800626433e-14
+31
+-2.887124543407431
+12
+-0.6814692043452624
+22
+0.14350628713692704
+32
+-2.9039438536912954
+13
+-0.6814692043452624
+23
+0.14350628713692704
+33
+-2.9039438536912954
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.0960561463087082
+20
+0.1435062871369282
+30
+-3.318530795654741
+11
+-1.5991712855190992
+21
+0.2651650429449755
+31
+-3.655166838488527
+12
+-1.6227208305001835
+22
+0.14350628713692878
+32
+-3.5761913772707477
+13
+-1.6227208305001835
+23
+0.14350628713692878
+33
+-3.5761913772707477
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.5991712855190992
+20
+0.2651650429449755
+30
+-3.655166838488527
+11
+-1.0960561463087082
+21
+0.1435062871369282
+31
+-3.318530795654741
+12
+-1.0481588029804083
+22
+0.2651650429449749
+32
+-3.3855945641550873
+13
+-1.0481588029804083
+23
+0.2651650429449749
+33
+-3.3855945641550873
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.5991712855190992
+20
+0.2651650429449755
+30
+-3.655166838488527
+11
+-0.976475362938908
+21
+0.34645482469175104
+31
+-3.4859625865587667
+12
+-1.563926900792259
+22
+0.3464548246917517
+32
+-3.773361968856217
+13
+-1.563926900792259
+23
+0.3464548246917517
+33
+-3.773361968856217
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.976475362938908
+20
+0.34645482469175104
+30
+-3.4859625865587667
+11
+-1.5991712855190992
+21
+0.2651650429449755
+31
+-3.655166838488527
+12
+-1.0481588029804083
+22
+0.2651650429449749
+32
+-3.3855945641550873
+13
+-1.0481588029804083
+23
+0.2651650429449749
+33
+-3.3855945641550873
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.563926900792259
+20
+0.3464548246917517
+30
+-3.773361968856217
+11
+-0.8919189801185237
+21
+0.37500000000001643
+31
+-3.60435474129321
+12
+-1.5223533144031798
+22
+0.3750000000000171
+32
+-3.9127826312168645
+13
+-1.5223533144031798
+23
+0.3750000000000171
+33
+-3.9127826312168645
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.8919189801185237
+20
+0.37500000000001643
+30
+-3.60435474129321
+11
+-1.563926900792259
+21
+0.3464548246917517
+31
+-3.773361968856217
+12
+-0.976475362938908
+22
+0.34645482469175104
+32
+-3.4859625865587667
+13
+-0.976475362938908
+23
+0.34645482469175104
+33
+-3.4859625865587667
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.5223533144031798
+20
+0.3750000000000171
+30
+-3.9127826312168645
+11
+-0.8073625972981393
+21
+0.3464548246917461
+31
+-3.7227468960276524
+12
+-1.4807797280141024
+22
+0.3464548246917468
+32
+-4.052203293577511
+13
+-1.4807797280141024
+23
+0.3464548246917468
+33
+-4.052203293577511
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.8073625972981393
+20
+0.3464548246917461
+30
+-3.7227468960276524
+11
+-1.5223533144031798
+21
+0.3750000000000171
+31
+-3.9127826312168645
+12
+-0.8919189801185237
+22
+0.37500000000001643
+32
+-3.60435474129321
+13
+-0.8919189801185237
+23
+0.37500000000001643
+33
+-3.60435474129321
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.4807797280141024
+20
+0.3464548246917468
+30
+-4.052203293577511
+11
+-0.7356791572566417
+21
+0.26516504294496585
+31
+-3.8231149184313296
+12
+-1.445535343287263
+22
+0.2651650429449666
+32
+-4.1703984239451986
+13
+-1.445535343287263
+23
+0.2651650429449666
+33
+-4.1703984239451986
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.7356791572566417
+20
+0.26516504294496585
+30
+-3.8231149184313296
+11
+-1.4807797280141024
+21
+0.3464548246917468
+31
+-4.052203293577511
+12
+-0.8073625972981393
+22
+0.3464548246917461
+32
+-3.7227468960276524
+13
+-0.8073625972981393
+23
+0.3464548246917461
+33
+-3.7227468960276524
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.7356791572566417
+20
+0.26516504294496585
+30
+-3.8231149184313296
+11
+-1.4219857983061805
+21
+0.14350628713691724
+31
+-4.2493738851629725
+12
+-1.445535343287263
+22
+0.2651650429449666
+32
+-4.1703984239451986
+13
+-1.445535343287263
+23
+0.2651650429449666
+33
+-4.1703984239451986
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.4219857983061805
+20
+0.14350628713691724
+30
+-4.2493738851629725
+11
+-0.7356791572566417
+21
+0.26516504294496585
+31
+-3.8231149184313296
+12
+-0.6877818139283445
+22
+0.14350628713691643
+32
+-3.8901786869316712
+13
+-0.6877818139283445
+23
+0.14350628713691643
+33
+-3.8901786869316712
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-0.6877818139283445
+20
+0.14350628713691643
+30
+-3.8901786869316712
+11
+-1.413716297817066
+21
+6.15218598552793e-15
+31
+-4.277106379174766
+12
+-1.4219857983061805
+22
+0.14350628713691724
+32
+-4.2493738851629725
+13
+-1.4219857983061805
+23
+0.14350628713691724
+33
+-4.2493738851629725
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.413716297817066
+20
+6.15218598552793e-15
+30
+-4.277106379174766
+11
+-0.6877818139283445
+21
+0.14350628713691643
+31
+-3.8901786869316712
+12
+-0.6709625036444828
+22
+5.342009518651689e-15
+32
+-3.9137283507090763
+13
+-0.6709625036444828
+23
+5.342009518651689e-15
+33
+-3.9137283507090763
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.1128754565925734
+20
+1.822379677088487e-14
+30
+-3.294981131877333
+11
+-1.6227208305001835
+21
+0.14350628713692878
+31
+-3.5761913772707477
+12
+-1.6309903309892988
+22
+1.878894296289104e-14
+32
+-3.5484588832589496
+13
+-1.6309903309892988
+23
+1.878894296289104e-14
+33
+-3.5484588832589496
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.6227208305001835
+20
+0.14350628713692878
+30
+-3.5761913772707477
+11
+-1.1128754565925734
+21
+1.822379677088487e-14
+31
+-3.294981131877333
+12
+-1.0960561463087082
+22
+0.1435062871369282
+32
+-3.318530795654741
+13
+-1.0960561463087082
+23
+0.1435062871369282
+33
+-3.318530795654741
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.6227208305001835
+20
+0.14350628713692878
+30
+-3.5761913772707477
+11
+-2.2352901514230483
+21
+0.26516504294497545
+31
+-3.734834957055048
+12
+-2.240360749282801
+22
+0.1435062871369287
+32
+-3.653545175308267
+13
+-2.240360749282801
+23
+0.1435062871369287
+33
+-3.653545175308267
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.2352901514230483
+20
+0.26516504294497545
+30
+-3.734834957055048
+11
+-1.6227208305001835
+21
+0.14350628713692878
+31
+-3.5761913772707477
+12
+-1.5991712855190992
+22
+0.2651650429449755
+32
+-3.655166838488527
+13
+-1.5991712855190992
+23
+0.2651650429449755
+33
+-3.655166838488527
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.2352901514230483
+20
+0.26516504294497545
+30
+-3.734834957055048
+11
+-1.563926900792259
+21
+0.3464548246917517
+31
+-3.773361968856217
+12
+-2.227701465445983
+22
+0.34645482469175165
+32
+-3.8564937128630965
+13
+-2.227701465445983
+23
+0.34645482469175165
+33
+-3.8564937128630965
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.563926900792259
+20
+0.3464548246917517
+30
+-3.773361968856217
+11
+-2.2352901514230483
+21
+0.26516504294497545
+31
+-3.734834957055048
+12
+-1.5991712855190992
+22
+0.2651650429449755
+32
+-3.655166838488527
+13
+-1.5991712855190992
+23
+0.2651650429449755
+33
+-3.655166838488527
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.227701465445983
+20
+0.34645482469175165
+30
+-3.8564937128630965
+11
+-1.5223533144031798
+21
+0.3750000000000171
+31
+-3.9127826312168645
+12
+-2.2187500000000036
+22
+0.37500000000001704
+32
+-4.000000000000008
+13
+-2.2187500000000036
+23
+0.37500000000001704
+33
+-4.000000000000008
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.5223533144031798
+20
+0.3750000000000171
+30
+-3.9127826312168645
+11
+-2.227701465445983
+21
+0.34645482469175165
+31
+-3.8564937128630965
+12
+-1.563926900792259
+22
+0.3464548246917517
+32
+-3.773361968856217
+13
+-1.563926900792259
+23
+0.3464548246917517
+33
+-3.773361968856217
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.2187500000000036
+20
+0.37500000000001704
+30
+-4.000000000000008
+11
+-1.4807797280141024
+21
+0.3464548246917468
+31
+-4.052203293577511
+12
+-2.2097985345540234
+22
+0.34645482469174677
+32
+-4.143506287136919
+13
+-2.2097985345540234
+23
+0.34645482469174677
+33
+-4.143506287136919
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.4807797280141024
+20
+0.3464548246917468
+30
+-4.052203293577511
+11
+-2.2187500000000036
+21
+0.37500000000001704
+31
+-4.000000000000008
+12
+-1.5223533144031798
+22
+0.3750000000000171
+32
+-3.9127826312168645
+13
+-1.5223533144031798
+23
+0.3750000000000171
+33
+-3.9127826312168645
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.2097985345540234
+20
+0.34645482469174677
+30
+-4.143506287136919
+11
+-1.445535343287263
+21
+0.2651650429449666
+31
+-4.1703984239451986
+12
+-2.202209848576959
+22
+0.2651650429449665
+32
+-4.265165042944965
+13
+-2.202209848576959
+23
+0.2651650429449665
+33
+-4.265165042944965
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.445535343287263
+20
+0.2651650429449666
+30
+-4.1703984239451986
+11
+-2.2097985345540234
+21
+0.34645482469174677
+31
+-4.143506287136919
+12
+-1.4807797280141024
+22
+0.3464548246917468
+32
+-4.052203293577511
+13
+-1.4807797280141024
+23
+0.3464548246917468
+33
+-4.052203293577511
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.445535343287263
+20
+0.2651650429449666
+30
+-4.1703984239451986
+11
+-2.197139250717206
+21
+0.14350628713691715
+31
+-4.34645482469174
+12
+-2.202209848576959
+22
+0.2651650429449665
+32
+-4.265165042944965
+13
+-2.202209848576959
+23
+0.2651650429449665
+33
+-4.265165042944965
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.197139250717206
+20
+0.14350628713691715
+30
+-4.34645482469174
+11
+-1.445535343287263
+21
+0.2651650429449666
+31
+-4.1703984239451986
+12
+-1.4219857983061805
+22
+0.14350628713691724
+32
+-4.2493738851629725
+13
+-1.4219857983061805
+23
+0.14350628713691724
+33
+-4.2493738851629725
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.4219857983061805
+20
+0.14350628713691724
+30
+-4.2493738851629725
+11
+-2.195358693533829
+21
+6.060158656298807e-15
+31
+-4.375000000000006
+12
+-2.197139250717206
+22
+0.14350628713691715
+32
+-4.34645482469174
+13
+-2.197139250717206
+23
+0.14350628713691715
+33
+-4.34645482469174
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.195358693533829
+20
+6.060158656298807e-15
+30
+-4.375000000000006
+11
+-1.4219857983061805
+21
+0.14350628713691724
+31
+-4.2493738851629725
+12
+-1.413716297817066
+22
+6.15218598552793e-15
+32
+-4.277106379174766
+13
+-1.413716297817066
+23
+6.15218598552793e-15
+33
+-4.277106379174766
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-1.6309903309892988
+20
+1.878894296289104e-14
+30
+-3.5484588832589496
+11
+-2.240360749282801
+21
+0.1435062871369287
+31
+-3.653545175308267
+12
+-2.242141306466179
+22
+1.8716988585368647e-14
+32
+-3.6249999999999973
+13
+-2.242141306466179
+23
+1.8716988585368647e-14
+33
+-3.6249999999999973
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.240360749282801
+20
+0.1435062871369287
+30
+-3.653545175308267
+11
+-1.6309903309892988
+21
+1.878894296289104e-14
+31
+-3.5484588832589496
+12
+-1.6227208305001835
+22
+0.14350628713692878
+32
+-3.5761913772707477
+13
+-1.6227208305001835
+23
+0.14350628713692878
+33
+-3.5761913772707477
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.240360749282801
+20
+0.1435062871369287
+30
+-3.653545175308267
+11
+-7.983021822074795
+21
+0.26516504294497545
+31
+-3.734834957055048
+12
+-7.983021822074795
+22
+0.1435062871369287
+32
+-3.653545175308267
+13
+-7.983021822074795
+23
+0.1435062871369287
+33
+-3.653545175308267
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-7.983021822074795
+20
+0.26516504294497545
+30
+-3.734834957055048
+11
+-2.240360749282801
+21
+0.1435062871369287
+31
+-3.653545175308267
+12
+-2.2352901514230483
+22
+0.26516504294497545
+32
+-3.734834957055048
+13
+-2.2352901514230483
+23
+0.26516504294497545
+33
+-3.734834957055048
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-7.983021822074795
+20
+0.26516504294497545
+30
+-3.734834957055048
+11
+-2.227701465445983
+21
+0.34645482469175165
+31
+-3.8564937128630965
+12
+-7.983021822074795
+22
+0.34645482469175165
+32
+-3.8564937128630965
+13
+-7.983021822074795
+23
+0.34645482469175165
+33
+-3.8564937128630965
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.227701465445983
+20
+0.34645482469175165
+30
+-3.8564937128630965
+11
+-7.983021822074795
+21
+0.26516504294497545
+31
+-3.734834957055048
+12
+-2.2352901514230483
+22
+0.26516504294497545
+32
+-3.734834957055048
+13
+-2.2352901514230483
+23
+0.26516504294497545
+33
+-3.734834957055048
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-7.983021822074795
+20
+0.34645482469175165
+30
+-3.8564937128630965
+11
+-2.2187500000000036
+21
+0.37500000000001704
+31
+-4.000000000000008
+12
+-7.983021822074795
+22
+0.37500000000001704
+32
+-4.000000000000008
+13
+-7.983021822074795
+23
+0.37500000000001704
+33
+-4.000000000000008
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.2187500000000036
+20
+0.37500000000001704
+30
+-4.000000000000008
+11
+-7.983021822074795
+21
+0.34645482469175165
+31
+-3.8564937128630965
+12
+-2.227701465445983
+22
+0.34645482469175165
+32
+-3.8564937128630965
+13
+-2.227701465445983
+23
+0.34645482469175165
+33
+-3.8564937128630965
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-7.983021822074795
+20
+0.37500000000001704
+30
+-4.000000000000008
+11
+-2.2097985345540234
+21
+0.34645482469174677
+31
+-4.143506287136919
+12
+-7.983021822074795
+22
+0.34645482469174677
+32
+-4.143506287136919
+13
+-7.983021822074795
+23
+0.34645482469174677
+33
+-4.143506287136919
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.2097985345540234
+20
+0.34645482469174677
+30
+-4.143506287136919
+11
+-7.983021822074795
+21
+0.37500000000001704
+31
+-4.000000000000008
+12
+-2.2187500000000036
+22
+0.37500000000001704
+32
+-4.000000000000008
+13
+-2.2187500000000036
+23
+0.37500000000001704
+33
+-4.000000000000008
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-7.983021822074795
+20
+0.34645482469174677
+30
+-4.143506287136919
+11
+-2.202209848576959
+21
+0.2651650429449665
+31
+-4.265165042944965
+12
+-7.983021822074795
+22
+0.2651650429449665
+32
+-4.265165042944965
+13
+-7.983021822074795
+23
+0.2651650429449665
+33
+-4.265165042944965
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.202209848576959
+20
+0.2651650429449665
+30
+-4.265165042944965
+11
+-7.983021822074795
+21
+0.34645482469174677
+31
+-4.143506287136919
+12
+-2.2097985345540234
+22
+0.34645482469174677
+32
+-4.143506287136919
+13
+-2.2097985345540234
+23
+0.34645482469174677
+33
+-4.143506287136919
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.202209848576959
+20
+0.2651650429449665
+30
+-4.265165042944965
+11
+-7.983021822074795
+21
+0.14350628713691715
+31
+-4.34645482469174
+12
+-7.983021822074795
+22
+0.2651650429449665
+32
+-4.265165042944965
+13
+-7.983021822074795
+23
+0.2651650429449665
+33
+-4.265165042944965
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-7.983021822074795
+20
+0.14350628713691715
+30
+-4.34645482469174
+11
+-2.202209848576959
+21
+0.2651650429449665
+31
+-4.265165042944965
+12
+-2.197139250717206
+22
+0.14350628713691715
+32
+-4.34645482469174
+13
+-2.197139250717206
+23
+0.14350628713691715
+33
+-4.34645482469174
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.197139250717206
+20
+0.14350628713691715
+30
+-4.34645482469174
+11
+-7.983021822074795
+21
+6.060158656298807e-15
+31
+-4.375000000000006
+12
+-7.983021822074795
+22
+0.14350628713691715
+32
+-4.34645482469174
+13
+-7.983021822074795
+23
+0.14350628713691715
+33
+-4.34645482469174
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-7.983021822074795
+20
+6.060158656298807e-15
+30
+-4.375000000000006
+11
+-2.197139250717206
+21
+0.14350628713691715
+31
+-4.34645482469174
+12
+-2.195358693533829
+22
+6.060158656298807e-15
+32
+-4.375000000000006
+13
+-2.195358693533829
+23
+6.060158656298807e-15
+33
+-4.375000000000006
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-2.242141306466179
+20
+1.8716988585368647e-14
+30
+-3.6249999999999973
+11
+-7.983021822074795
+21
+0.1435062871369287
+31
+-3.653545175308267
+12
+-7.983021822074795
+22
+1.8716988585368647e-14
+32
+-3.6249999999999973
+13
+-7.983021822074795
+23
+1.8716988585368647e-14
+33
+-3.6249999999999973
+70
+1
+  0
+3DFACE
+ 8
+pipe
+10
+-7.983021822074795
+20
+0.1435062871369287
+30
+-3.653545175308267
+11
+-2.242141306466179
+21
+1.8716988585368647e-14
+31
+-3.6249999999999973
+12
+-2.240360749282801
+22
+0.1435062871369287
+32
+-3.653545175308267
+13
+-2.240360749282801
+23
+0.1435062871369287
+33
+-3.653545175308267
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.2922750396074334
+30
+5.079185156719955
+11
+-5.499999999999995
+21
+2.2471825367939746
+31
+5.101599911452267
+12
+-5.499999999999995
+22
+2.2922750396074334
+32
+5.079185156719955
+13
+-5.499999999999995
+23
+2.2922750396074334
+33
+5.079185156719955
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.2471825367939746
+30
+5.101599911452267
+11
+9.500000000000005
+21
+2.2922750396074334
+31
+5.079185156719955
+12
+9.500000000000005
+22
+2.2471825367939746
+32
+5.101599911452267
+13
+9.500000000000005
+23
+2.2471825367939746
+33
+5.101599911452267
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.3324893860329072
+30
+5.0488773791494435
+11
+-5.499999999999995
+21
+2.2922750396074334
+31
+5.079185156719955
+12
+-5.499999999999995
+22
+2.3324893860329072
+32
+5.0488773791494435
+13
+-5.499999999999995
+23
+2.3324893860329072
+33
+5.0488773791494435
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.2922750396074334
+30
+5.079185156719955
+11
+9.500000000000005
+21
+2.3324893860329072
+31
+5.0488773791494435
+12
+9.500000000000005
+22
+2.2922750396074334
+32
+5.079185156719955
+13
+9.500000000000005
+23
+2.2922750396074334
+33
+5.079185156719955
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.2471825367939746
+30
+5.101599911452267
+11
+-5.499999999999995
+21
+2.198742898510912
+31
+5.115360597579695
+12
+-5.499999999999995
+22
+2.2471825367939746
+32
+5.101599911452267
+13
+-5.499999999999995
+23
+2.2471825367939746
+33
+5.101599911452267
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.198742898510912
+30
+5.115360597579695
+11
+9.500000000000005
+21
+2.2471825367939746
+31
+5.101599911452267
+12
+9.500000000000005
+22
+2.198742898510912
+32
+5.115360597579695
+13
+9.500000000000005
+23
+2.198742898510912
+33
+5.115360597579695
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.198742898510912
+30
+5.115360597579695
+11
+-5.499999999999995
+21
+2.14860079060873
+31
+5.119999999999996
+12
+-5.499999999999995
+22
+2.198742898510912
+32
+5.115360597579695
+13
+-5.499999999999995
+23
+2.198742898510912
+33
+5.115360597579695
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.14860079060873
+30
+5.119999999999996
+11
+9.500000000000005
+21
+2.198742898510912
+31
+5.115360597579695
+12
+9.500000000000005
+22
+2.14860079060873
+32
+5.119999999999996
+13
+9.500000000000005
+23
+2.14860079060873
+33
+5.119999999999996
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.36646018267338
+30
+5.011705615466466
+11
+-5.499999999999995
+21
+2.3930340227089686
+31
+4.968931954582056
+12
+9.500000000000005
+22
+2.3930340227089686
+32
+4.968931954582056
+13
+9.500000000000005
+23
+2.3930340227089686
+33
+4.968931954582056
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3930340227089686
+30
+4.968931954582056
+11
+9.500000000000005
+21
+2.36646018267338
+31
+5.011705615466466
+12
+-5.499999999999995
+22
+2.36646018267338
+32
+5.011705615466466
+13
+-5.499999999999995
+23
+2.36646018267338
+33
+5.011705615466466
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.14860079060873
+30
+5.119999999999996
+11
+-5.499999999999995
+21
+0.0
+31
+5.119999999999996
+12
+-5.499999999999995
+22
+2.14860079060873
+32
+5.119999999999996
+13
+-5.499999999999995
+23
+2.14860079060873
+33
+5.119999999999996
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+0.0
+30
+5.119999999999996
+11
+9.500000000000005
+21
+2.14860079060873
+31
+5.119999999999996
+12
+9.500000000000005
+22
+0.0
+32
+5.119999999999996
+13
+9.500000000000005
+23
+0.0
+33
+5.119999999999996
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.3324893860329072
+30
+5.0488773791494435
+11
+-5.499999999999995
+21
+2.36646018267338
+31
+5.011705615466466
+12
+9.500000000000005
+22
+2.36646018267338
+32
+5.011705615466466
+13
+9.500000000000005
+23
+2.36646018267338
+33
+5.011705615466466
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.36646018267338
+30
+5.011705615466466
+11
+9.500000000000005
+21
+2.3324893860329072
+31
+5.0488773791494435
+12
+-5.499999999999995
+22
+2.3324893860329072
+32
+5.0488773791494435
+13
+-5.499999999999995
+23
+2.3324893860329072
+33
+5.0488773791494435
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.2429376307709816
+30
+5.153304187744393
+11
+-5.499999999999995
+21
+2.2923509057835325
+31
+5.139266911825803
+12
+-5.499999999999995
+22
+2.2429376307709816
+32
+5.153304187744393
+13
+-5.499999999999995
+23
+2.2429376307709816
+33
+5.153304187744393
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.2923509057835325
+30
+5.139266911825803
+11
+9.500000000000005
+21
+2.2429376307709816
+31
+5.153304187744393
+12
+9.500000000000005
+22
+2.2923509057835325
+32
+5.139266911825803
+13
+9.500000000000005
+23
+2.2923509057835325
+33
+5.139266911825803
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.2923509057835325
+30
+5.139266911825803
+11
+-5.499999999999995
+21
+2.3383497679035443
+31
+5.116401620523369
+12
+-5.499999999999995
+22
+2.2923509057835325
+32
+5.139266911825803
+13
+-5.499999999999995
+23
+2.2923509057835325
+33
+5.139266911825803
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3383497679035443
+30
+5.116401620523369
+11
+9.500000000000005
+21
+2.2923509057835325
+31
+5.139266911825803
+12
+9.500000000000005
+22
+2.3383497679035443
+32
+5.116401620523369
+13
+9.500000000000005
+23
+2.3383497679035443
+33
+5.116401620523369
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3793724226921675
+30
+5.085484656623693
+11
+9.500000000000005
+21
+2.4140260323451184
+31
+5.047565740490686
+12
+-5.499999999999995
+22
+2.4140260323451184
+32
+5.047565740490686
+13
+-5.499999999999995
+23
+2.4140260323451184
+33
+5.047565740490686
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.4140260323451184
+30
+5.047565740490686
+11
+-5.499999999999995
+21
+2.3793724226921675
+31
+5.085484656623693
+12
+9.500000000000005
+22
+2.3793724226921675
+32
+5.085484656623693
+13
+9.500000000000005
+23
+2.3793724226921675
+33
+5.085484656623693
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.4140260323451184
+30
+5.047565740490686
+11
+9.500000000000005
+21
+2.4411340065654183
+31
+5.003932329022501
+12
+-5.499999999999995
+22
+2.4411340065654183
+32
+5.003932329022501
+13
+-5.499999999999995
+23
+2.4411340065654183
+33
+5.003932329022501
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.4411340065654183
+30
+5.003932329022501
+11
+-5.499999999999995
+21
+2.4140260323451184
+31
+5.047565740490686
+12
+9.500000000000005
+22
+2.4140260323451184
+32
+5.047565740490686
+13
+9.500000000000005
+23
+2.4140260323451184
+33
+5.047565740490686
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+0.0
+30
+5.15803684215334
+11
+-5.499999999999995
+21
+2.1917876664999696
+31
+5.15803684215334
+12
+-5.499999999999995
+22
+0.0
+32
+5.15803684215334
+13
+-5.499999999999995
+23
+0.0
+33
+5.15803684215334
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.1917876664999696
+30
+5.15803684215334
+11
+9.500000000000005
+21
+0.0
+31
+5.15803684215334
+12
+9.500000000000005
+22
+2.1917876664999696
+32
+5.15803684215334
+13
+9.500000000000005
+23
+2.1917876664999696
+33
+5.15803684215334
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.1917876664999696
+30
+5.15803684215334
+11
+-5.499999999999995
+21
+2.2429376307709816
+31
+5.153304187744393
+12
+-5.499999999999995
+22
+2.1917876664999696
+32
+5.15803684215334
+13
+-5.499999999999995
+23
+2.1917876664999696
+33
+5.15803684215334
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.2429376307709816
+30
+5.153304187744393
+11
+9.500000000000005
+21
+2.1917876664999696
+31
+5.15803684215334
+12
+9.500000000000005
+22
+2.2429376307709816
+32
+5.153304187744393
+13
+9.500000000000005
+23
+2.2429376307709816
+33
+5.153304187744393
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.3383497679035443
+30
+5.116401620523369
+11
+-5.499999999999995
+21
+2.3793724226921675
+31
+5.085484656623693
+12
+-5.499999999999995
+22
+2.3383497679035443
+32
+5.116401620523369
+13
+-5.499999999999995
+23
+2.3383497679035443
+33
+5.116401620523369
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3793724226921675
+30
+5.085484656623693
+11
+9.500000000000005
+21
+2.3383497679035443
+31
+5.116401620523369
+12
+9.500000000000005
+22
+2.3793724226921675
+32
+5.085484656623693
+13
+9.500000000000005
+23
+2.3793724226921675
+33
+5.085484656623693
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-4.999999999999995
+20
+3.152109
+30
+3.227619793365834
+11
+-5.06663474057502
+21
+3.089999999999999
+31
+3.227619793365834
+12
+-5.06663474057502
+22
+3.1521089999999985
+32
+3.227619793365834
+13
+-5.06663474057502
+23
+3.1521089999999985
+33
+3.227619793365834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.06663474057502
+20
+3.089999999999999
+30
+3.227619793365834
+11
+-4.999999999999995
+21
+3.152109
+31
+3.227619793365834
+12
+-4.999999999999995
+22
+3.09
+32
+3.227619793365834
+13
+-4.999999999999995
+23
+3.09
+33
+3.227619793365834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.1917876664999696
+30
+5.15803684215334
+11
+-5.499999999999995
+21
+0.0
+31
+5.119999999999996
+12
+-5.499999999999995
+22
+0.0
+32
+5.15803684215334
+13
+-5.499999999999995
+23
+0.0
+33
+5.15803684215334
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+0.0
+30
+5.119999999999996
+11
+-5.499999999999995
+21
+2.1917876664999696
+31
+5.15803684215334
+12
+-5.499999999999995
+22
+2.14860079060873
+32
+5.119999999999996
+13
+-5.499999999999995
+23
+2.14860079060873
+33
+5.119999999999996
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.14860079060873
+30
+5.119999999999996
+11
+-5.499999999999995
+21
+2.1917876664999696
+31
+5.15803684215334
+12
+-5.499999999999995
+22
+2.198742898510912
+32
+5.115360597579695
+13
+-5.499999999999995
+23
+2.198742898510912
+33
+5.115360597579695
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.198742898510912
+30
+5.115360597579695
+11
+-5.499999999999995
+21
+2.1917876664999696
+31
+5.15803684215334
+12
+-5.499999999999995
+22
+2.2429376307709816
+32
+5.153304187744393
+13
+-5.499999999999995
+23
+2.2429376307709816
+33
+5.153304187744393
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.198742898510912
+30
+5.115360597579695
+11
+-5.499999999999995
+21
+2.2429376307709816
+31
+5.153304187744393
+12
+-5.499999999999995
+22
+2.2471825367939746
+32
+5.101599911452267
+13
+-5.499999999999995
+23
+2.2471825367939746
+33
+5.101599911452267
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.2471825367939746
+30
+5.101599911452267
+11
+-5.499999999999995
+21
+2.2429376307709816
+31
+5.153304187744393
+12
+-5.499999999999995
+22
+2.2923509057835325
+32
+5.139266911825803
+13
+-5.499999999999995
+23
+2.2923509057835325
+33
+5.139266911825803
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.2471825367939746
+30
+5.101599911452267
+11
+-5.499999999999995
+21
+2.2923509057835325
+31
+5.139266911825803
+12
+-5.499999999999995
+22
+2.2922750396074334
+32
+5.079185156719955
+13
+-5.499999999999995
+23
+2.2922750396074334
+33
+5.079185156719955
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.2922750396074334
+30
+5.079185156719955
+11
+-5.499999999999995
+21
+2.2923509057835325
+31
+5.139266911825803
+12
+-5.499999999999995
+22
+2.3324893860329072
+32
+5.0488773791494435
+13
+-5.499999999999995
+23
+2.3324893860329072
+33
+5.0488773791494435
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3324893860329072
+30
+5.0488773791494435
+11
+-5.499999999999995
+21
+2.2923509057835325
+31
+5.139266911825803
+12
+-5.499999999999995
+22
+2.3383497679035443
+32
+5.116401620523369
+13
+-5.499999999999995
+23
+2.3383497679035443
+33
+5.116401620523369
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3324893860329072
+30
+5.0488773791494435
+11
+-5.499999999999995
+21
+2.3383497679035443
+31
+5.116401620523369
+12
+-5.499999999999995
+22
+2.36646018267338
+32
+5.011705615466466
+13
+-5.499999999999995
+23
+2.36646018267338
+33
+5.011705615466466
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.36646018267338
+30
+5.011705615466466
+11
+-5.499999999999995
+21
+2.3383497679035443
+31
+5.116401620523369
+12
+-5.499999999999995
+22
+2.3793724226921675
+32
+5.085484656623693
+13
+-5.499999999999995
+23
+2.3793724226921675
+33
+5.085484656623693
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.36646018267338
+30
+5.011705615466466
+11
+-5.499999999999995
+21
+2.3793724226921675
+31
+5.085484656623693
+12
+-5.499999999999995
+22
+2.3930340227089686
+32
+4.968931954582056
+13
+-5.499999999999995
+23
+2.3930340227089686
+33
+4.968931954582056
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3930340227089686
+30
+4.968931954582056
+11
+-5.499999999999995
+21
+2.3793724226921675
+31
+5.085484656623693
+12
+-5.499999999999995
+22
+2.4140260323451184
+32
+5.047565740490686
+13
+-5.499999999999995
+23
+2.4140260323451184
+33
+5.047565740490686
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3930340227089686
+30
+4.968931954582056
+11
+-5.499999999999995
+21
+2.4140260323451184
+31
+5.047565740490686
+12
+-5.499999999999995
+22
+3.0123234243928083
+32
+3.7303531512143784
+13
+-5.499999999999995
+23
+3.0123234243928083
+33
+3.7303531512143784
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+3.0123234243928083
+30
+3.7303531512143784
+11
+-5.499999999999995
+21
+2.4140260323451184
+31
+5.047565740490686
+12
+-5.499999999999995
+22
+2.4411340065654183
+32
+5.003932329022501
+13
+-5.499999999999995
+23
+2.4411340065654183
+33
+5.003932329022501
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+3.0123234243928083
+30
+3.7303531512143784
+11
+-5.499999999999995
+21
+2.4411340065654183
+31
+5.003932329022501
+12
+-5.499999999999995
+22
+3.072871125223104
+32
+3.7404580917071333
+13
+-5.499999999999995
+23
+3.072871125223104
+33
+3.7404580917071333
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+3.0123234243928083
+30
+3.7303531512143784
+11
+-5.499999999999995
+21
+3.072871125223104
+31
+3.7404580917071333
+12
+-5.499999999999995
+22
+3.0139421213514037
+32
+3.7267766757513905
+13
+-5.499999999999995
+23
+3.0139421213514037
+33
+3.7267766757513905
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+3.0139421213514037
+30
+3.7267766757513905
+11
+-5.499999999999995
+21
+3.072871125223104
+31
+3.7404580917071333
+12
+-5.499999999999995
+22
+3.0790632735059664
+32
+3.72677667575139
+13
+-5.499999999999995
+23
+3.0790632735059664
+33
+3.72677667575139
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.06663474057502
+20
+3.1521089999999985
+30
+3.227619793365834
+11
+-5.136049439910264
+21
+3.09
+31
+3.2284980853079333
+12
+-5.136049439910264
+22
+3.152109
+32
+3.2284980853079333
+13
+-5.136049439910264
+23
+3.152109
+33
+3.2284980853079333
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.136049439910264
+20
+3.09
+30
+3.2284980853079333
+11
+-5.06663474057502
+21
+3.1521089999999985
+31
+3.227619793365834
+12
+-5.06663474057502
+22
+3.089999999999999
+32
+3.227619793365834
+13
+-5.06663474057502
+23
+3.089999999999999
+33
+3.227619793365834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.136049439910264
+20
+3.152109
+30
+3.2284980853079333
+11
+-5.265127602337854
+21
+3.0900000000000003
+31
+3.2715241394504626
+12
+-5.265127602337854
+22
+3.152109
+32
+3.2715241394504626
+13
+-5.265127602337854
+23
+3.152109
+33
+3.2715241394504626
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.265127602337854
+20
+3.0900000000000003
+30
+3.2715241394504626
+11
+-5.136049439910264
+21
+3.152109
+31
+3.2284980853079333
+12
+-5.136049439910264
+22
+3.09
+32
+3.2284980853079333
+13
+-5.136049439910264
+23
+3.09
+33
+3.2284980853079333
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.265127602337854
+20
+3.152109
+30
+3.2715241394504626
+11
+-5.374999999999995
+21
+3.0900000000000003
+31
+3.3517766757513896
+12
+-5.374999999999995
+22
+3.152109
+32
+3.3517766757513896
+13
+-5.374999999999995
+23
+3.152109
+33
+3.3517766757513896
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.374999999999995
+20
+3.0900000000000003
+30
+3.3517766757513896
+11
+-5.265127602337854
+21
+3.152109
+31
+3.2715241394504626
+12
+-5.265127602337854
+22
+3.0900000000000003
+32
+3.2715241394504626
+13
+-5.265127602337854
+23
+3.0900000000000003
+33
+3.2715241394504626
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.455252536300922
+20
+3.1499114528701706
+30
+3.4616490734135317
+11
+-5.452666904421266
+21
+3.0878043383057854
+31
+3.4581091282954834
+12
+-5.455252536300922
+22
+3.087392168967912
+32
+3.461649073413532
+13
+-5.455252536300922
+23
+3.087392168967912
+33
+3.461649073413532
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.452666904421266
+20
+3.0878043383057854
+30
+3.4581091282954834
+11
+-5.455252536300922
+21
+3.1499114528701706
+31
+3.4616490734135317
+12
+-5.4111798476732265
+22
+3.089999999999999
+32
+3.401309896682915
+13
+-5.4111798476732265
+23
+3.089999999999999
+33
+3.401309896682915
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.4111798476732265
+20
+3.089999999999999
+30
+3.401309896682915
+11
+-5.455252536300922
+21
+3.1499114528701706
+31
+3.4616490734135317
+12
+-5.374999999999995
+22
+3.0900000000000003
+32
+3.3517766757513896
+13
+-5.374999999999995
+23
+3.0900000000000003
+33
+3.3517766757513896
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.374999999999995
+20
+3.0900000000000003
+30
+3.3517766757513896
+11
+-5.455252536300922
+21
+3.1499114528701706
+31
+3.4616490734135317
+12
+-5.374999999999995
+22
+3.152109
+32
+3.3517766757513896
+13
+-5.374999999999995
+23
+3.152109
+33
+3.3517766757513896
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.374999999999995
+20
+3.152109
+30
+3.3517766757513896
+11
+-5.455252536300922
+21
+3.1499114528701706
+31
+3.4616490734135317
+12
+-5.41372985422196
+22
+3.152109
+32
+3.4048010677595886
+13
+-5.41372985422196
+23
+3.152109
+33
+3.4048010677595886
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.4982785904434515
+20
+3.128292290009669
+30
+3.590727235841121
+11
+-5.491487383235348
+21
+3.0703175939727343
+31
+3.5703536142168106
+12
+-5.4982785904434515
+22
+3.0646689131920426
+32
+3.590727235841121
+13
+-5.4982785904434515
+23
+3.0646689131920426
+33
+3.590727235841121
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.491487383235348
+20
+3.0703175939727343
+30
+3.5703536142168106
+11
+-5.4982785904434515
+21
+3.128292290009669
+31
+3.590727235841121
+12
+-5.47289263174993
+22
+3.081230457795461
+32
+3.5145693597605545
+13
+-5.47289263174993
+23
+3.081230457795461
+33
+3.5145693597605545
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.47289263174993
+20
+3.081230457795461
+30
+3.5145693597605545
+11
+-5.4982785904434515
+21
+3.128292290009669
+31
+3.590727235841121
+12
+-5.455252536300922
+22
+3.087392168967912
+32
+3.461649073413532
+13
+-5.455252536300922
+23
+3.087392168967912
+33
+3.461649073413532
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.455252536300922
+20
+3.087392168967912
+30
+3.461649073413532
+11
+-5.4982785904434515
+21
+3.128292290009669
+31
+3.590727235841121
+12
+-5.455252536300922
+22
+3.1499114528701706
+32
+3.4616490734135317
+13
+-5.455252536300922
+23
+3.1499114528701706
+33
+3.4616490734135317
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.455252536300922
+20
+3.1499114528701706
+30
+3.4616490734135317
+11
+-5.4982785904434515
+21
+3.128292290009669
+31
+3.590727235841121
+12
+-5.493783699835049
+22
+3.132030977611587
+32
+3.5772425640159144
+13
+-5.493783699835049
+23
+3.132030977611587
+33
+3.5772425640159144
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.455252536300922
+20
+3.1499114528701706
+30
+3.4616490734135317
+11
+-5.493783699835049
+21
+3.132030977611587
+31
+3.5772425640159144
+12
+-5.4748151938447736
+22
+3.143163189997152
+32
+3.5203370460450882
+13
+-5.4748151938447736
+23
+3.143163189997152
+33
+3.5203370460450882
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.455252536300922
+20
+3.1499114528701706
+30
+3.4616490734135317
+11
+-5.4748151938447736
+21
+3.143163189997152
+31
+3.5203370460450882
+12
+-5.455616833138935
+22
+3.149869205505734
+32
+3.4627419639275696
+13
+-5.455616833138935
+23
+3.149869205505734
+33
+3.4627419639275696
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-4.999999999999995
+20
+3.0357609534623577
+30
+3.6785684442714244
+11
+-5.499356934626736
+21
+3.034536500225599
+31
+3.675952812525448
+12
+-5.498713869253477
+22
+3.055130879099794
+32
+3.6251289492995054
+13
+-5.498713869253477
+23
+3.055130879099794
+33
+3.6251289492995054
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499356934626736
+20
+3.034536500225599
+30
+3.675952812525448
+11
+-4.999999999999995
+21
+3.0357609534623577
+31
+3.6785684442714244
+12
+-5.499999999999995
+22
+3.0139421213514037
+32
+3.7267766757513905
+13
+-5.499999999999995
+23
+3.0139421213514037
+33
+3.7267766757513905
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+3.096779748626952
+30
+3.6876325121546265
+11
+-5.498713869253477
+21
+3.055130879099794
+31
+3.6251289492995054
+12
+-5.499356934626736
+22
+3.034536500225599
+32
+3.675952812525448
+13
+-5.499356934626736
+23
+3.034536500225599
+33
+3.675952812525448
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.498713869253477
+20
+3.055130879099794
+30
+3.6251289492995054
+11
+-5.499999999999995
+21
+3.096779748626952
+31
+3.6876325121546265
+12
+-5.4982785904434515
+22
+3.0646689131920426
+32
+3.590727235841121
+13
+-5.4982785904434515
+23
+3.0646689131920426
+33
+3.590727235841121
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.4982785904434515
+20
+3.0646689131920426
+30
+3.590727235841121
+11
+-5.499999999999995
+21
+3.096779748626952
+31
+3.6876325121546265
+12
+-5.4982785904434515
+22
+3.128292290009669
+32
+3.590727235841121
+13
+-5.4982785904434515
+23
+3.128292290009669
+33
+3.590727235841121
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.4982785904434515
+20
+3.128292290009669
+30
+3.590727235841121
+11
+-5.499999999999995
+21
+3.096779748626952
+31
+3.6876325121546265
+12
+-5.498814964478946
+22
+3.116539009769701
+32
+3.6331188833337724
+13
+-5.498814964478946
+23
+3.116539009769701
+33
+3.6331188833337724
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+3.0790632735059664
+30
+3.72677667575139
+11
+-5.499356934626736
+21
+3.034536500225599
+31
+3.675952812525448
+12
+-5.499999999999995
+22
+3.0139421213514037
+32
+3.7267766757513905
+13
+-5.499999999999995
+23
+3.0139421213514037
+33
+3.7267766757513905
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499356934626736
+20
+3.034536500225599
+30
+3.675952812525448
+11
+-5.499999999999995
+21
+3.0790632735059664
+31
+3.72677667575139
+12
+-5.499999999999995
+22
+3.096779748626952
+32
+3.6876325121546265
+13
+-5.499999999999995
+23
+3.096779748626952
+33
+3.6876325121546265
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.4982785904434515
+20
+3.128292290009669
+30
+3.590727235841121
+11
+8.7276000111177
+21
+3.132030977611586
+31
+3.577242564015919
+12
+-5.493783699835049
+22
+3.132030977611587
+32
+3.5772425640159144
+13
+-5.493783699835049
+23
+3.132030977611587
+33
+3.5772425640159144
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.7276000111177
+20
+3.132030977611586
+30
+3.577242564015919
+11
+-5.4982785904434515
+21
+3.128292290009669
+31
+3.590727235841121
+12
+8.783476330435551
+22
+3.1165390097697028
+32
+3.6331188833337706
+13
+8.783476330435551
+23
+3.1165390097697028
+33
+3.6331188833337706
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.783476330435551
+20
+3.1165390097697028
+30
+3.6331188833337706
+11
+-5.4982785904434515
+21
+3.128292290009669
+31
+3.590727235841121
+12
+-5.498814964478946
+22
+3.116539009769701
+32
+3.6331188833337724
+13
+-5.498814964478946
+23
+3.116539009769701
+33
+3.6331188833337724
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.377977240467615
+20
+3.1521089999999994
+30
+3.227619793365838
+11
+-4.999999999999995
+21
+3.09
+31
+3.227619793365834
+12
+-4.999999999999995
+22
+3.152109
+32
+3.227619793365834
+13
+-4.999999999999995
+23
+3.152109
+33
+3.227619793365834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-4.999999999999995
+20
+3.09
+30
+3.227619793365834
+11
+8.377977240467615
+21
+3.1521089999999994
+31
+3.227619793365838
+12
+8.377977240467612
+22
+3.09
+32
+3.227619793365834
+13
+8.377977240467612
+23
+3.09
+33
+3.227619793365834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.608466575397262
+20
+3.087804338305786
+30
+3.4581091282954852
+11
+-5.4111798476732265
+21
+3.089999999999999
+31
+3.401309896682915
+12
+8.55166734378469
+22
+3.09
+32
+3.401309896682911
+13
+8.55166734378469
+23
+3.09
+33
+3.401309896682911
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.4111798476732265
+20
+3.089999999999999
+30
+3.401309896682915
+11
+8.608466575397262
+21
+3.087804338305786
+31
+3.4581091282954852
+12
+-5.452666904421266
+22
+3.0878043383057854
+32
+3.4581091282954834
+13
+-5.452666904421266
+23
+3.0878043383057854
+33
+3.4581091282954834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.4411340065654183
+30
+5.003932329022501
+11
+8.890815538808916
+21
+3.072871125223103
+31
+3.740458091707135
+12
+-5.499999999999995
+22
+3.072871125223104
+32
+3.7404580917071333
+13
+-5.499999999999995
+23
+3.072871125223104
+33
+3.7404580917071333
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.890815538808916
+20
+3.072871125223103
+30
+3.740458091707135
+11
+-5.499999999999995
+21
+2.4411340065654183
+31
+5.003932329022501
+12
+9.500000000000005
+22
+2.768278894627561
+32
+4.349642552898219
+13
+9.500000000000005
+23
+2.768278894627561
+33
+4.349642552898219
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.768278894627561
+30
+4.349642552898219
+11
+-5.499999999999995
+21
+2.4411340065654183
+31
+5.003932329022501
+12
+9.500000000000005
+22
+2.4411340065654183
+32
+5.003932329022501
+13
+9.500000000000005
+23
+2.4411340065654183
+33
+5.003932329022501
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.493783699835049
+20
+3.132030977611587
+30
+3.5772425640159144
+11
+8.670694493146872
+21
+3.1431631899971517
+31
+3.5203370460450913
+12
+-5.4748151938447736
+22
+3.143163189997152
+32
+3.5203370460450882
+13
+-5.4748151938447736
+23
+3.143163189997152
+33
+3.5203370460450882
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.670694493146872
+20
+3.1431631899971517
+30
+3.5203370460450913
+11
+-5.493783699835049
+21
+3.132030977611587
+31
+3.5772425640159144
+12
+8.7276000111177
+22
+3.132030977611586
+32
+3.577242564015919
+13
+8.7276000111177
+23
+3.132030977611586
+33
+3.577242564015919
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.775486396401288
+20
+3.055130879099793
+30
+3.6251289492995054
+11
+-5.491487383235348
+21
+3.0703175939727343
+31
+3.5703536142168106
+12
+8.720711061318589
+22
+3.070317593972734
+32
+3.57035361421681
+13
+8.720711061318589
+23
+3.070317593972734
+33
+3.57035361421681
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.491487383235348
+20
+3.0703175939727343
+30
+3.5703536142168106
+11
+8.775486396401288
+21
+3.055130879099793
+31
+3.6251289492995054
+12
+-5.4982785904434515
+22
+3.0646689131920426
+32
+3.590727235841121
+13
+-5.4982785904434515
+23
+3.0646689131920426
+33
+3.590727235841121
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.4982785904434515
+20
+3.0646689131920426
+30
+3.590727235841121
+11
+8.775486396401288
+21
+3.055130879099793
+31
+3.6251289492995054
+12
+-5.498713869253477
+22
+3.055130879099794
+32
+3.6251289492995054
+13
+-5.498713869253477
+23
+3.055130879099794
+33
+3.6251289492995054
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.880710598316162
+20
+3.0123234243928074
+30
+3.7303531512143793
+11
+-5.499999999999995
+21
+2.3930340227089686
+31
+4.968931954582056
+12
+-5.499999999999995
+22
+3.0123234243928083
+32
+3.7303531512143784
+13
+-5.499999999999995
+23
+3.0123234243928083
+33
+3.7303531512143784
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3930340227089686
+30
+4.968931954582056
+11
+8.880710598316162
+21
+3.0123234243928074
+31
+3.7303531512143793
+12
+9.500000000000002
+22
+2.70267872355089
+32
+4.349642552898214
+13
+9.500000000000002
+23
+2.70267872355089
+33
+4.349642552898214
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+2.3930340227089686
+30
+4.968931954582056
+11
+9.500000000000002
+21
+2.70267872355089
+31
+4.349642552898214
+12
+9.500000000000005
+22
+2.3930340227089686
+32
+4.968931954582056
+13
+9.500000000000005
+23
+2.3930340227089686
+33
+4.968931954582056
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.136049439910264
+20
+3.152109
+30
+3.2284980853079333
+11
+-4.999999999999995
+21
+3.152109
+31
+3.227619793365834
+12
+-5.06663474057502
+22
+3.1521089999999985
+32
+3.227619793365834
+13
+-5.06663474057502
+23
+3.1521089999999985
+33
+3.227619793365834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-4.999999999999995
+20
+3.152109
+30
+3.227619793365834
+11
+-5.136049439910264
+21
+3.152109
+31
+3.2284980853079333
+12
+8.377977240467615
+22
+3.1521089999999994
+32
+3.227619793365838
+13
+8.377977240467615
+23
+3.1521089999999994
+33
+3.227619793365838
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.377977240467615
+20
+3.1521089999999994
+30
+3.227619793365838
+11
+-5.136049439910264
+21
+3.152109
+31
+3.2284980853079333
+12
+8.55515851486137
+22
+3.152109
+32
+3.4048010677595912
+13
+8.55515851486137
+23
+3.152109
+33
+3.4048010677595912
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.55515851486137
+20
+3.152109
+30
+3.4048010677595912
+11
+-5.136049439910264
+21
+3.152109
+31
+3.2284980853079333
+12
+-5.265127602337854
+22
+3.152109
+32
+3.2715241394504626
+13
+-5.265127602337854
+23
+3.152109
+33
+3.2715241394504626
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.55515851486137
+20
+3.152109
+30
+3.4048010677595912
+11
+-5.265127602337854
+21
+3.152109
+31
+3.2715241394504626
+12
+-5.374999999999995
+22
+3.152109
+32
+3.3517766757513896
+13
+-5.374999999999995
+23
+3.152109
+33
+3.3517766757513896
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.55515851486137
+20
+3.152109
+30
+3.4048010677595912
+11
+-5.374999999999995
+21
+3.152109
+31
+3.3517766757513896
+12
+-5.41372985422196
+22
+3.152109
+32
+3.4048010677595886
+13
+-5.41372985422196
+23
+3.152109
+33
+3.4048010677595886
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.828925891373206
+20
+3.035760953462357
+30
+3.6785684442714257
+11
+-5.499999999999995
+21
+3.0139421213514037
+31
+3.7267766757513905
+12
+-4.999999999999995
+22
+3.0357609534623577
+32
+3.6785684442714244
+13
+-4.999999999999995
+23
+3.0357609534623577
+33
+3.6785684442714244
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+3.0139421213514037
+30
+3.7267766757513905
+11
+8.828925891373206
+21
+3.035760953462357
+31
+3.6785684442714257
+12
+8.880710598316162
+22
+3.0123234243928074
+32
+3.7303531512143793
+13
+8.880710598316162
+23
+3.0123234243928074
+33
+3.7303531512143793
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+3.0139421213514037
+30
+3.7267766757513905
+11
+8.880710598316162
+21
+3.0123234243928074
+31
+3.7303531512143793
+12
+-5.499999999999995
+22
+3.0123234243928083
+32
+3.7303531512143784
+13
+-5.499999999999995
+23
+3.0123234243928083
+33
+3.7303531512143784
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.664926806862336
+20
+3.081230457795461
+30
+3.5145693597605576
+11
+-5.491487383235348
+21
+3.0703175939727343
+31
+3.5703536142168106
+12
+-5.47289263174993
+22
+3.081230457795461
+32
+3.5145693597605545
+13
+-5.47289263174993
+23
+3.081230457795461
+33
+3.5145693597605545
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.491487383235348
+20
+3.0703175939727343
+30
+3.5703536142168106
+11
+8.664926806862336
+21
+3.081230457795461
+31
+3.5145693597605576
+12
+8.720711061318589
+22
+3.070317593972734
+32
+3.57035361421681
+13
+8.720711061318589
+23
+3.070317593972734
+33
+3.57035361421681
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.455252536300922
+20
+3.1499114528701706
+30
+3.4616490734135317
+11
+8.55515851486137
+21
+3.152109
+31
+3.4048010677595912
+12
+-5.41372985422196
+22
+3.152109
+32
+3.4048010677595886
+13
+-5.41372985422196
+23
+3.152109
+33
+3.4048010677595886
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.55515851486137
+20
+3.152109
+30
+3.4048010677595912
+11
+-5.455252536300922
+21
+3.1499114528701706
+31
+3.4616490734135317
+12
+8.613099411029346
+22
+3.149869205505735
+32
+3.4627419639275705
+13
+8.613099411029346
+23
+3.149869205505735
+33
+3.4627419639275705
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.613099411029346
+20
+3.149869205505735
+30
+3.4627419639275705
+11
+-5.455252536300922
+21
+3.1499114528701706
+31
+3.4616490734135317
+12
+-5.455616833138935
+22
+3.149869205505734
+32
+3.4627419639275696
+13
+-5.455616833138935
+23
+3.149869205505734
+33
+3.4627419639275696
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.499999999999995
+20
+3.096779748626952
+30
+3.6876325121546265
+11
+8.890815538808916
+21
+3.072871125223103
+31
+3.740458091707135
+12
+8.837989959256406
+22
+3.096779748626954
+32
+3.687632512154624
+13
+8.837989959256406
+23
+3.096779748626954
+33
+3.687632512154624
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.890815538808916
+20
+3.072871125223103
+30
+3.740458091707135
+11
+-5.499999999999995
+21
+3.096779748626952
+31
+3.6876325121546265
+12
+-5.499999999999995
+22
+3.0790632735059664
+32
+3.72677667575139
+13
+-5.499999999999995
+23
+3.0790632735059664
+33
+3.72677667575139
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.890815538808916
+20
+3.072871125223103
+30
+3.740458091707135
+11
+-5.499999999999995
+21
+3.0790632735059664
+31
+3.72677667575139
+12
+-5.499999999999995
+22
+3.072871125223104
+32
+3.7404580917071333
+13
+-5.499999999999995
+23
+3.072871125223104
+33
+3.7404580917071333
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.608466575397262
+20
+3.087804338305786
+30
+3.4581091282954852
+11
+-5.455252536300922
+21
+3.087392168967912
+31
+3.461649073413532
+12
+-5.452666904421266
+22
+3.0878043383057854
+32
+3.4581091282954834
+13
+-5.452666904421266
+23
+3.0878043383057854
+33
+3.4581091282954834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.455252536300922
+20
+3.087392168967912
+30
+3.461649073413532
+11
+8.608466575397262
+21
+3.087804338305786
+31
+3.4581091282954852
+12
+8.664926806862336
+22
+3.081230457795461
+32
+3.5145693597605576
+13
+8.664926806862336
+23
+3.081230457795461
+33
+3.5145693597605576
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+-5.455252536300922
+20
+3.087392168967912
+30
+3.461649073413532
+11
+8.664926806862336
+21
+3.081230457795461
+31
+3.5145693597605576
+12
+-5.47289263174993
+22
+3.081230457795461
+32
+3.5145693597605545
+13
+-5.47289263174993
+23
+3.081230457795461
+33
+3.5145693597605545
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.498814964478946
+20
+3.116539009769701
+30
+3.6331188833337724
+11
+8.837989959256406
+21
+3.096779748626954
+31
+3.687632512154624
+12
+8.783476330435551
+22
+3.1165390097697028
+32
+3.6331188833337706
+13
+8.783476330435551
+23
+3.1165390097697028
+33
+3.6331188833337706
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.837989959256406
+20
+3.096779748626954
+30
+3.687632512154624
+11
+-5.498814964478946
+21
+3.116539009769701
+31
+3.6331188833337724
+12
+-5.499999999999995
+22
+3.096779748626952
+32
+3.6876325121546265
+13
+-5.499999999999995
+23
+3.096779748626952
+33
+3.6876325121546265
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.828925891373206
+20
+3.035760953462357
+30
+3.6785684442714257
+11
+-5.498713869253477
+21
+3.055130879099794
+31
+3.6251289492995054
+12
+8.775486396401288
+22
+3.055130879099793
+32
+3.6251289492995054
+13
+8.775486396401288
+23
+3.055130879099793
+33
+3.6251289492995054
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.498713869253477
+20
+3.055130879099794
+30
+3.6251289492995054
+11
+8.828925891373206
+21
+3.035760953462357
+31
+3.6785684442714257
+12
+-4.999999999999995
+22
+3.0357609534623577
+32
+3.6785684442714244
+13
+-4.999999999999995
+23
+3.0357609534623577
+33
+3.6785684442714244
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.55166734378469
+20
+3.09
+30
+3.401309896682911
+11
+-4.999999999999995
+21
+3.09
+31
+3.227619793365834
+12
+8.377977240467612
+22
+3.09
+32
+3.227619793365834
+13
+8.377977240467612
+23
+3.09
+33
+3.227619793365834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-4.999999999999995
+20
+3.09
+30
+3.227619793365834
+11
+8.55166734378469
+21
+3.09
+31
+3.401309896682911
+12
+-5.06663474057502
+22
+3.089999999999999
+32
+3.227619793365834
+13
+-5.06663474057502
+23
+3.089999999999999
+33
+3.227619793365834
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.06663474057502
+20
+3.089999999999999
+30
+3.227619793365834
+11
+8.55166734378469
+21
+3.09
+31
+3.401309896682911
+12
+-5.136049439910264
+22
+3.09
+32
+3.2284980853079333
+13
+-5.136049439910264
+23
+3.09
+33
+3.2284980853079333
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.136049439910264
+20
+3.09
+30
+3.2284980853079333
+11
+8.55166734378469
+21
+3.09
+31
+3.401309896682911
+12
+-5.265127602337854
+22
+3.0900000000000003
+32
+3.2715241394504626
+13
+-5.265127602337854
+23
+3.0900000000000003
+33
+3.2715241394504626
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.265127602337854
+20
+3.0900000000000003
+30
+3.2715241394504626
+11
+8.55166734378469
+21
+3.09
+31
+3.401309896682911
+12
+-5.374999999999995
+22
+3.0900000000000003
+32
+3.3517766757513896
+13
+-5.374999999999995
+23
+3.0900000000000003
+33
+3.3517766757513896
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+-5.374999999999995
+20
+3.0900000000000003
+30
+3.3517766757513896
+11
+8.55166734378469
+21
+3.09
+31
+3.401309896682911
+12
+-5.4111798476732265
+22
+3.089999999999999
+32
+3.401309896682915
+13
+-5.4111798476732265
+23
+3.089999999999999
+33
+3.401309896682915
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+-5.4748151938447736
+20
+3.143163189997152
+30
+3.5203370460450882
+11
+8.613099411029346
+21
+3.149869205505735
+31
+3.4627419639275705
+12
+-5.455616833138935
+22
+3.149869205505734
+32
+3.4627419639275696
+13
+-5.455616833138935
+23
+3.149869205505734
+33
+3.4627419639275696
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.613099411029346
+20
+3.149869205505735
+30
+3.4627419639275705
+11
+-5.4748151938447736
+21
+3.143163189997152
+31
+3.5203370460450882
+12
+8.670694493146872
+22
+3.1431631899971517
+32
+3.5203370460450913
+13
+8.670694493146872
+23
+3.1431631899971517
+33
+3.5203370460450913
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.14860079060873
+30
+5.119999999999996
+11
+9.500000000000005
+21
+0.0
+31
+5.15803684215334
+12
+9.500000000000005
+22
+0.0
+32
+5.119999999999996
+13
+9.500000000000005
+23
+0.0
+33
+5.119999999999996
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+0.0
+30
+5.15803684215334
+11
+9.500000000000005
+21
+2.14860079060873
+31
+5.119999999999996
+12
+9.500000000000005
+22
+2.1917876664999696
+32
+5.15803684215334
+13
+9.500000000000005
+23
+2.1917876664999696
+33
+5.15803684215334
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.1917876664999696
+30
+5.15803684215334
+11
+9.500000000000005
+21
+2.14860079060873
+31
+5.119999999999996
+12
+9.500000000000005
+22
+2.198742898510912
+32
+5.115360597579695
+13
+9.500000000000005
+23
+2.198742898510912
+33
+5.115360597579695
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.1917876664999696
+30
+5.15803684215334
+11
+9.500000000000005
+21
+2.198742898510912
+31
+5.115360597579695
+12
+9.500000000000005
+22
+2.2429376307709816
+32
+5.153304187744393
+13
+9.500000000000005
+23
+2.2429376307709816
+33
+5.153304187744393
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.2429376307709816
+30
+5.153304187744393
+11
+9.500000000000005
+21
+2.198742898510912
+31
+5.115360597579695
+12
+9.500000000000005
+22
+2.2471825367939746
+32
+5.101599911452267
+13
+9.500000000000005
+23
+2.2471825367939746
+33
+5.101599911452267
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.2429376307709816
+30
+5.153304187744393
+11
+9.500000000000005
+21
+2.2471825367939746
+31
+5.101599911452267
+12
+9.500000000000005
+22
+2.2923509057835325
+32
+5.139266911825803
+13
+9.500000000000005
+23
+2.2923509057835325
+33
+5.139266911825803
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.2923509057835325
+30
+5.139266911825803
+11
+9.500000000000005
+21
+2.2471825367939746
+31
+5.101599911452267
+12
+9.500000000000005
+22
+2.2922750396074334
+32
+5.079185156719955
+13
+9.500000000000005
+23
+2.2922750396074334
+33
+5.079185156719955
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.2923509057835325
+30
+5.139266911825803
+11
+9.500000000000005
+21
+2.2922750396074334
+31
+5.079185156719955
+12
+9.500000000000005
+22
+2.3324893860329072
+32
+5.0488773791494435
+13
+9.500000000000005
+23
+2.3324893860329072
+33
+5.0488773791494435
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.2923509057835325
+30
+5.139266911825803
+11
+9.500000000000005
+21
+2.3324893860329072
+31
+5.0488773791494435
+12
+9.500000000000005
+22
+2.3383497679035443
+32
+5.116401620523369
+13
+9.500000000000005
+23
+2.3383497679035443
+33
+5.116401620523369
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.3383497679035443
+30
+5.116401620523369
+11
+9.500000000000005
+21
+2.3324893860329072
+31
+5.0488773791494435
+12
+9.500000000000005
+22
+2.36646018267338
+32
+5.011705615466466
+13
+9.500000000000005
+23
+2.36646018267338
+33
+5.011705615466466
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.3383497679035443
+30
+5.116401620523369
+11
+9.500000000000005
+21
+2.36646018267338
+31
+5.011705615466466
+12
+9.500000000000005
+22
+2.3793724226921675
+32
+5.085484656623693
+13
+9.500000000000005
+23
+2.3793724226921675
+33
+5.085484656623693
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.3793724226921675
+30
+5.085484656623693
+11
+9.500000000000005
+21
+2.36646018267338
+31
+5.011705615466466
+12
+9.500000000000005
+22
+2.3930340227089686
+32
+4.968931954582056
+13
+9.500000000000005
+23
+2.3930340227089686
+33
+4.968931954582056
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.3793724226921675
+30
+5.085484656623693
+11
+9.500000000000005
+21
+2.3930340227089686
+31
+4.968931954582056
+12
+9.500000000000005
+22
+2.4140260323451184
+32
+5.047565740490686
+13
+9.500000000000005
+23
+2.4140260323451184
+33
+5.047565740490686
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.4140260323451184
+30
+5.047565740490686
+11
+9.500000000000005
+21
+2.3930340227089686
+31
+4.968931954582056
+12
+9.500000000000002
+22
+2.70267872355089
+32
+4.349642552898214
+13
+9.500000000000002
+23
+2.70267872355089
+33
+4.349642552898214
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.4140260323451184
+30
+5.047565740490686
+11
+9.500000000000002
+21
+2.70267872355089
+31
+4.349642552898214
+12
+9.500000000000005
+22
+2.4411340065654183
+32
+5.003932329022501
+13
+9.500000000000005
+23
+2.4411340065654183
+33
+5.003932329022501
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000005
+20
+2.4411340065654183
+30
+5.003932329022501
+11
+9.500000000000002
+21
+2.70267872355089
+31
+4.349642552898214
+12
+9.500000000000005
+22
+2.768278894627561
+32
+4.349642552898219
+13
+9.500000000000005
+23
+2.768278894627561
+33
+4.349642552898219
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.377977240467615
+20
+3.1521089999999994
+30
+3.227619793365838
+11
+8.55166734378469
+21
+3.09
+31
+3.401309896682911
+12
+8.377977240467612
+22
+3.09
+32
+3.227619793365834
+13
+8.377977240467612
+23
+3.09
+33
+3.227619793365834
+70
+1
+  0
+3DFACE
+ 8
+cap
+10
+8.55166734378469
+20
+3.09
+30
+3.401309896682911
+11
+8.377977240467615
+21
+3.1521089999999994
+31
+3.227619793365838
+12
+8.55515851486137
+22
+3.152109
+32
+3.4048010677595912
+13
+8.55515851486137
+23
+3.152109
+33
+3.4048010677595912
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.55166734378469
+20
+3.09
+30
+3.401309896682911
+11
+8.55515851486137
+21
+3.152109
+31
+3.4048010677595912
+12
+8.608466575397262
+22
+3.087804338305786
+32
+3.4581091282954852
+13
+8.608466575397262
+23
+3.087804338305786
+33
+3.4581091282954852
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.608466575397262
+20
+3.087804338305786
+30
+3.4581091282954852
+11
+8.55515851486137
+21
+3.152109
+31
+3.4048010677595912
+12
+8.613099411029346
+22
+3.149869205505735
+32
+3.4627419639275705
+13
+8.613099411029346
+23
+3.149869205505735
+33
+3.4627419639275705
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.608466575397262
+20
+3.087804338305786
+30
+3.4581091282954852
+11
+8.613099411029346
+21
+3.149869205505735
+31
+3.4627419639275705
+12
+8.664926806862336
+22
+3.081230457795461
+32
+3.5145693597605576
+13
+8.664926806862336
+23
+3.081230457795461
+33
+3.5145693597605576
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.664926806862336
+20
+3.081230457795461
+30
+3.5145693597605576
+11
+8.613099411029346
+21
+3.149869205505735
+31
+3.4627419639275705
+12
+8.670694493146872
+22
+3.1431631899971517
+32
+3.5203370460450913
+13
+8.670694493146872
+23
+3.1431631899971517
+33
+3.5203370460450913
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.664926806862336
+20
+3.081230457795461
+30
+3.5145693597605576
+11
+8.670694493146872
+21
+3.1431631899971517
+31
+3.5203370460450913
+12
+8.720711061318589
+22
+3.070317593972734
+32
+3.57035361421681
+13
+8.720711061318589
+23
+3.070317593972734
+33
+3.57035361421681
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.720711061318589
+20
+3.070317593972734
+30
+3.57035361421681
+11
+8.670694493146872
+21
+3.1431631899971517
+31
+3.5203370460450913
+12
+8.7276000111177
+22
+3.132030977611586
+32
+3.577242564015919
+13
+8.7276000111177
+23
+3.132030977611586
+33
+3.577242564015919
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.720711061318589
+20
+3.070317593972734
+30
+3.57035361421681
+11
+8.7276000111177
+21
+3.132030977611586
+31
+3.577242564015919
+12
+8.775486396401288
+22
+3.055130879099793
+32
+3.6251289492995054
+13
+8.775486396401288
+23
+3.055130879099793
+33
+3.6251289492995054
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.775486396401288
+20
+3.055130879099793
+30
+3.6251289492995054
+11
+8.7276000111177
+21
+3.132030977611586
+31
+3.577242564015919
+12
+8.783476330435551
+22
+3.1165390097697028
+32
+3.6331188833337706
+13
+8.783476330435551
+23
+3.1165390097697028
+33
+3.6331188833337706
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.775486396401288
+20
+3.055130879099793
+30
+3.6251289492995054
+11
+8.783476330435551
+21
+3.1165390097697028
+31
+3.6331188833337706
+12
+8.828925891373206
+22
+3.035760953462357
+32
+3.6785684442714257
+13
+8.828925891373206
+23
+3.035760953462357
+33
+3.6785684442714257
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.828925891373206
+20
+3.035760953462357
+30
+3.6785684442714257
+11
+8.783476330435551
+21
+3.1165390097697028
+31
+3.6331188833337706
+12
+8.837989959256406
+22
+3.096779748626954
+32
+3.687632512154624
+13
+8.837989959256406
+23
+3.096779748626954
+33
+3.687632512154624
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.828925891373206
+20
+3.035760953462357
+30
+3.6785684442714257
+11
+8.837989959256406
+21
+3.096779748626954
+31
+3.687632512154624
+12
+8.880710598316162
+22
+3.0123234243928074
+32
+3.7303531512143793
+13
+8.880710598316162
+23
+3.0123234243928074
+33
+3.7303531512143793
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+8.880710598316162
+20
+3.0123234243928074
+30
+3.7303531512143793
+11
+8.837989959256406
+21
+3.096779748626954
+31
+3.687632512154624
+12
+8.890815538808916
+22
+3.072871125223103
+32
+3.740458091707135
+13
+8.890815538808916
+23
+3.072871125223103
+33
+3.740458091707135
+70
+13
+  0
+3DFACE
+ 8
+cap
+10
+8.880710598316162
+20
+3.0123234243928074
+30
+3.7303531512143793
+11
+8.890815538808916
+21
+3.072871125223103
+31
+3.740458091707135
+12
+9.500000000000002
+22
+2.70267872355089
+32
+4.349642552898214
+13
+9.500000000000002
+23
+2.70267872355089
+33
+4.349642552898214
+70
+3
+  0
+3DFACE
+ 8
+cap
+10
+9.500000000000002
+20
+2.70267872355089
+30
+4.349642552898214
+11
+8.890815538808916
+21
+3.072871125223103
+31
+3.740458091707135
+12
+9.500000000000005
+22
+2.768278894627561
+32
+4.349642552898219
+13
+9.500000000000005
+23
+2.768278894627561
+33
+4.349642552898219
+70
+1
+  0
+3DFACE
+ 8
+lens
+10
+7.549999999999994
+20
+-1.9234723584537645
+30
+1.312690181611032
+11
+7.549999999999996
+21
+2.033557928245138
+31
+4.6873245059755515
+12
+7.549999999999996
+22
+-1.9237143674853878
+32
+4.6873245059755515
+13
+7.549999999999996
+23
+-1.9237143674853878
+33
+4.6873245059755515
+70
+1
+  0
+3DFACE
+ 8
+lens
+10
+7.549999999999996
+20
+2.033557928245138
+30
+4.6873245059755515
+11
+7.549999999999994
+21
+-1.9234723584537645
+31
+1.312690181611032
+12
+7.549999999999995
+22
+2.033799937276761
+32
+1.312690181611032
+13
+7.549999999999995
+23
+2.033799937276761
+33
+1.312690181611032
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.6495190528383337
+20
+0.374999999999997
+30
+-0.37499999999999933
+11
+0.5303300858899189
+21
+0.625000000000002
+31
+-0.5303300858899107
+12
+0.6495190528383366
+22
+0.6250000000000006
+32
+-0.37499999999999933
+13
+0.6495190528383366
+23
+0.6250000000000006
+33
+-0.37499999999999933
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.5303300858899189
+20
+0.625000000000002
+30
+-0.5303300858899107
+11
+0.6495190528383337
+21
+0.374999999999997
+31
+-0.37499999999999933
+12
+0.530330085889916
+22
+0.37499999999999845
+32
+-0.5303300858899107
+13
+0.530330085889916
+23
+0.37499999999999845
+33
+-0.5303300858899107
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.7500000000000047
+20
+0.3749999999999958
+30
+-2.220446049250313e-16
+11
+0.7244443697168106
+21
+0.6249999999999997
+31
+-0.19411428382689278
+12
+0.7500000000000075
+22
+0.6249999999999993
+32
+-2.220446049250313e-16
+13
+0.7500000000000075
+23
+0.6249999999999993
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.7244443697168106
+20
+0.6249999999999997
+30
+-0.19411428382689278
+11
+0.7500000000000047
+21
+0.3749999999999958
+31
+-2.220446049250313e-16
+12
+0.7244443697168077
+22
+0.3749999999999961
+32
+-0.19411428382689278
+13
+0.7244443697168077
+23
+0.3749999999999961
+33
+-0.19411428382689278
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.37500000000000466
+20
+0.3750000000000002
+30
+-0.6495190528383283
+11
+0.5303300858899189
+21
+0.625000000000002
+31
+-0.5303300858899107
+12
+0.530330085889916
+22
+0.37499999999999845
+32
+-0.5303300858899107
+13
+0.530330085889916
+23
+0.37499999999999845
+33
+-0.5303300858899107
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.5303300858899189
+20
+0.625000000000002
+30
+-0.5303300858899107
+11
+0.37500000000000466
+21
+0.3750000000000002
+31
+-0.6495190528383283
+12
+0.37500000000000755
+22
+0.6250000000000038
+32
+-0.6495190528383283
+13
+0.37500000000000755
+23
+0.6250000000000038
+33
+-0.6495190528383283
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.7244443697167984
+20
+0.3750000000000132
+30
+-0.194114283826891
+11
+-0.7499999999999925
+21
+0.6250000000000171
+31
+-2.220446049250313e-16
+12
+-0.7244443697167955
+22
+0.6250000000000168
+32
+-0.194114283826891
+13
+-0.7244443697167955
+23
+0.6250000000000168
+33
+-0.194114283826891
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.7499999999999925
+20
+0.6250000000000171
+30
+-2.220446049250313e-16
+11
+-0.7244443697167984
+21
+0.3750000000000132
+31
+-0.194114283826891
+12
+-0.7499999999999953
+22
+0.37500000000001354
+32
+-2.220446049250313e-16
+13
+-0.7499999999999953
+23
+0.37500000000001354
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.19411428382689633
+20
+0.37500000000000233
+30
+-0.7244443697168006
+11
+0.37500000000000755
+21
+0.6250000000000038
+31
+-0.6495190528383283
+12
+0.37500000000000466
+22
+0.3750000000000002
+32
+-0.6495190528383283
+13
+0.37500000000000466
+23
+0.3750000000000002
+33
+-0.6495190528383283
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.37500000000000755
+20
+0.6250000000000038
+30
+-0.6495190528383283
+11
+0.19411428382689633
+21
+0.37500000000000233
+31
+-0.7244443697168006
+12
+0.19411428382689921
+22
+0.625000000000006
+32
+-0.7244443697168006
+13
+0.19411428382689921
+23
+0.625000000000006
+33
+-0.7244443697168006
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.19411428382688056
+20
+0.6250000000000104
+30
+-0.7244443697168006
+11
+0.19411428382689921
+21
+0.625000000000006
+31
+-0.7244443697168006
+12
+7.549516567451064e-15
+22
+0.6250000000000082
+32
+-0.7499999999999993
+13
+7.549516567451064e-15
+23
+0.6250000000000082
+33
+-0.7499999999999993
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.19411428382689921
+20
+0.625000000000006
+30
+-0.7244443697168006
+11
+-0.19411428382688056
+21
+0.6250000000000104
+31
+-0.7244443697168006
+12
+-0.37499999999999245
+22
+0.6250000000000127
+32
+-0.6495190528383283
+13
+-0.37499999999999245
+23
+0.6250000000000127
+33
+-0.6495190528383283
+70
+13
+  0
+3DFACE
+ 8
+hinge
+10
+0.19411428382689921
+20
+0.625000000000006
+30
+-0.7244443697168006
+11
+-0.37499999999999245
+21
+0.6250000000000127
+31
+-0.6495190528383283
+12
+0.37500000000000755
+22
+0.6250000000000038
+32
+-0.6495190528383283
+13
+0.37500000000000755
+23
+0.6250000000000038
+33
+-0.6495190528383283
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+0.37500000000000755
+20
+0.6250000000000038
+30
+-0.6495190528383283
+11
+-0.37499999999999245
+21
+0.6250000000000127
+31
+-0.6495190528383283
+12
+-0.5303300858899038
+22
+0.6250000000000144
+32
+-0.5303300858899107
+13
+-0.5303300858899038
+23
+0.6250000000000144
+33
+-0.5303300858899107
+70
+13
+  0
+3DFACE
+ 8
+hinge
+10
+0.37500000000000755
+20
+0.6250000000000038
+30
+-0.6495190528383283
+11
+-0.5303300858899038
+21
+0.6250000000000144
+31
+-0.5303300858899107
+12
+0.5303300858899189
+22
+0.625000000000002
+32
+-0.5303300858899107
+13
+0.5303300858899189
+23
+0.625000000000002
+33
+-0.5303300858899107
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+0.5303300858899189
+20
+0.625000000000002
+30
+-0.5303300858899107
+11
+-0.5303300858899038
+21
+0.6250000000000144
+31
+-0.5303300858899107
+12
+-0.6495190528383215
+22
+0.6250000000000159
+32
+-0.37499999999999933
+13
+-0.6495190528383215
+23
+0.6250000000000159
+33
+-0.37499999999999933
+70
+13
+  0
+3DFACE
+ 8
+hinge
+10
+0.5303300858899189
+20
+0.625000000000002
+30
+-0.5303300858899107
+11
+-0.6495190528383215
+21
+0.6250000000000159
+31
+-0.37499999999999933
+12
+0.6495190528383366
+22
+0.6250000000000006
+32
+-0.37499999999999933
+13
+0.6495190528383366
+23
+0.6250000000000006
+33
+-0.37499999999999933
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+0.6495190528383366
+20
+0.6250000000000006
+30
+-0.37499999999999933
+11
+-0.6495190528383215
+21
+0.6250000000000159
+31
+-0.37499999999999933
+12
+-0.7244443697167955
+22
+0.6250000000000168
+32
+-0.194114283826891
+13
+-0.7244443697167955
+23
+0.6250000000000168
+33
+-0.194114283826891
+70
+13
+  0
+3DFACE
+ 8
+hinge
+10
+0.6495190528383366
+20
+0.6250000000000006
+30
+-0.37499999999999933
+11
+-0.7244443697167955
+21
+0.6250000000000168
+31
+-0.194114283826891
+12
+0.7244443697168106
+22
+0.6249999999999997
+32
+-0.19411428382689278
+13
+0.7244443697168106
+23
+0.6249999999999997
+33
+-0.19411428382689278
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+0.7244443697168106
+20
+0.6249999999999997
+30
+-0.19411428382689278
+11
+-0.7244443697167955
+21
+0.6250000000000168
+31
+-0.194114283826891
+12
+0.7500000000000075
+22
+0.6249999999999993
+32
+-2.220446049250313e-16
+13
+0.7500000000000075
+23
+0.6249999999999993
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+0.7500000000000075
+20
+0.6249999999999993
+30
+-2.220446049250313e-16
+11
+-0.7244443697167955
+21
+0.6250000000000168
+31
+-0.194114283826891
+12
+-0.7499999999999925
+22
+0.6250000000000171
+32
+-2.220446049250313e-16
+13
+-0.7499999999999925
+23
+0.6250000000000171
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.5303300858899067
+20
+0.3750000000000109
+30
+-0.5303300858899107
+11
+-0.37499999999999245
+21
+0.6250000000000127
+31
+-0.6495190528383283
+12
+-0.37499999999999534
+22
+0.3750000000000091
+32
+-0.6495190528383283
+13
+-0.37499999999999534
+23
+0.3750000000000091
+33
+-0.6495190528383283
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.37499999999999245
+20
+0.6250000000000127
+30
+-0.6495190528383283
+11
+-0.5303300858899067
+21
+0.3750000000000109
+31
+-0.5303300858899107
+12
+-0.5303300858899038
+22
+0.6250000000000144
+32
+-0.5303300858899107
+13
+-0.5303300858899038
+23
+0.6250000000000144
+33
+-0.5303300858899107
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.5303300858899067
+20
+0.3750000000000109
+30
+-0.5303300858899107
+11
+-0.6495190528383215
+21
+0.6250000000000159
+31
+-0.37499999999999933
+12
+-0.5303300858899038
+22
+0.6250000000000144
+32
+-0.5303300858899107
+13
+-0.5303300858899038
+23
+0.6250000000000144
+33
+-0.5303300858899107
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.6495190528383215
+20
+0.6250000000000159
+30
+-0.37499999999999933
+11
+-0.5303300858899067
+21
+0.3750000000000109
+31
+-0.5303300858899107
+12
+-0.6495190528383243
+22
+0.3750000000000123
+32
+-0.37499999999999933
+13
+-0.6495190528383243
+23
+0.3750000000000123
+33
+-0.37499999999999933
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.37499999999999534
+20
+0.3750000000000091
+30
+-0.6495190528383283
+11
+-0.19411428382688056
+21
+0.6250000000000104
+31
+-0.7244443697168006
+12
+-0.19411428382688345
+22
+0.375000000000007
+32
+-0.7244443697168006
+13
+-0.19411428382688345
+23
+0.375000000000007
+33
+-0.7244443697168006
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.19411428382688056
+20
+0.6250000000000104
+30
+-0.7244443697168006
+11
+-0.37499999999999534
+21
+0.3750000000000091
+31
+-0.6495190528383283
+12
+-0.37499999999999245
+22
+0.6250000000000127
+32
+-0.6495190528383283
+13
+-0.37499999999999245
+23
+0.6250000000000127
+33
+-0.6495190528383283
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.19411428382688345
+20
+0.375000000000007
+30
+-0.7244443697168006
+11
+7.549516567451064e-15
+21
+0.6250000000000082
+31
+-0.7499999999999993
+12
+4.6629367034256575e-15
+22
+0.37500000000000466
+32
+-0.7499999999999993
+13
+4.6629367034256575e-15
+23
+0.37500000000000466
+33
+-0.7499999999999993
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+7.549516567451064e-15
+20
+0.6250000000000082
+30
+-0.7499999999999993
+11
+-0.19411428382688345
+21
+0.375000000000007
+31
+-0.7244443697168006
+12
+-0.19411428382688056
+22
+0.6250000000000104
+32
+-0.7244443697168006
+13
+-0.19411428382688056
+23
+0.6250000000000104
+33
+-0.7244443697168006
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.7244443697168077
+20
+0.3749999999999961
+30
+-0.19411428382689278
+11
+0.6495190528383366
+21
+0.6250000000000006
+31
+-0.37499999999999933
+12
+0.7244443697168106
+22
+0.6249999999999997
+32
+-0.19411428382689278
+13
+0.7244443697168106
+23
+0.6249999999999997
+33
+-0.19411428382689278
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.6495190528383366
+20
+0.6250000000000006
+30
+-0.37499999999999933
+11
+0.7244443697168077
+21
+0.3749999999999961
+31
+-0.19411428382689278
+12
+0.6495190528383337
+22
+0.374999999999997
+32
+-0.37499999999999933
+13
+0.6495190528383337
+23
+0.374999999999997
+33
+-0.37499999999999933
+70
+1
+  0
+LINE
+ 8
+hinge
+10
+-0.9999999999999996
+20
+1.6431300764452317e-14
+30
+0.9999999999999996
+11
+1.0000000000000002
+21
+-7.105427357601002e-15
+31
+0.9999999999999996
+  0
+3DFACE
+ 8
+hinge
+10
+4.6629367034256575e-15
+20
+0.37500000000000466
+30
+-0.7499999999999993
+11
+0.19411428382689921
+21
+0.625000000000006
+31
+-0.7244443697168006
+12
+0.19411428382689633
+22
+0.37500000000000233
+32
+-0.7244443697168006
+13
+0.19411428382689633
+23
+0.37500000000000233
+33
+-0.7244443697168006
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.19411428382689921
+20
+0.625000000000006
+30
+-0.7244443697168006
+11
+4.6629367034256575e-15
+21
+0.37500000000000466
+31
+-0.7499999999999993
+12
+7.549516567451064e-15
+22
+0.6250000000000082
+32
+-0.7499999999999993
+13
+7.549516567451064e-15
+23
+0.6250000000000082
+33
+-0.7499999999999993
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.6495190528383243
+20
+0.3750000000000123
+30
+-0.37499999999999933
+11
+-0.7244443697167955
+21
+0.6250000000000168
+31
+-0.194114283826891
+12
+-0.6495190528383215
+22
+0.6250000000000159
+32
+-0.37499999999999933
+13
+-0.6495190528383215
+23
+0.6250000000000159
+33
+-0.37499999999999933
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.7244443697167955
+20
+0.6250000000000168
+30
+-0.194114283826891
+11
+-0.6495190528383243
+21
+0.3750000000000123
+31
+-0.37499999999999933
+12
+-0.7244443697167984
+22
+0.3750000000000132
+32
+-0.194114283826891
+13
+-0.7244443697167984
+23
+0.3750000000000132
+33
+-0.194114283826891
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.19411428382689633
+20
+0.37500000000000233
+30
+-0.7244443697168006
+11
+-0.19411428382688345
+21
+0.375000000000007
+31
+-0.7244443697168006
+12
+4.6629367034256575e-15
+22
+0.37500000000000466
+32
+-0.7499999999999993
+13
+4.6629367034256575e-15
+23
+0.37500000000000466
+33
+-0.7499999999999993
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.19411428382688345
+20
+0.375000000000007
+30
+-0.7244443697168006
+11
+0.19411428382689633
+21
+0.37500000000000233
+31
+-0.7244443697168006
+12
+0.37500000000000466
+22
+0.3750000000000002
+32
+-0.6495190528383283
+13
+0.37500000000000466
+23
+0.3750000000000002
+33
+-0.6495190528383283
+70
+13
+  0
+3DFACE
+ 8
+hinge
+10
+-0.19411428382688345
+20
+0.375000000000007
+30
+-0.7244443697168006
+11
+0.37500000000000466
+21
+0.3750000000000002
+31
+-0.6495190528383283
+12
+-0.37499999999999534
+22
+0.3750000000000091
+32
+-0.6495190528383283
+13
+-0.37499999999999534
+23
+0.3750000000000091
+33
+-0.6495190528383283
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+-0.37499999999999534
+20
+0.3750000000000091
+30
+-0.6495190528383283
+11
+0.37500000000000466
+21
+0.3750000000000002
+31
+-0.6495190528383283
+12
+0.530330085889916
+22
+0.37499999999999845
+32
+-0.5303300858899107
+13
+0.530330085889916
+23
+0.37499999999999845
+33
+-0.5303300858899107
+70
+13
+  0
+3DFACE
+ 8
+hinge
+10
+-0.37499999999999534
+20
+0.3750000000000091
+30
+-0.6495190528383283
+11
+0.530330085889916
+21
+0.37499999999999845
+31
+-0.5303300858899107
+12
+-0.5303300858899067
+22
+0.3750000000000109
+32
+-0.5303300858899107
+13
+-0.5303300858899067
+23
+0.3750000000000109
+33
+-0.5303300858899107
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+-0.5303300858899067
+20
+0.3750000000000109
+30
+-0.5303300858899107
+11
+0.530330085889916
+21
+0.37499999999999845
+31
+-0.5303300858899107
+12
+0.6495190528383337
+22
+0.374999999999997
+32
+-0.37499999999999933
+13
+0.6495190528383337
+23
+0.374999999999997
+33
+-0.37499999999999933
+70
+13
+  0
+3DFACE
+ 8
+hinge
+10
+-0.5303300858899067
+20
+0.3750000000000109
+30
+-0.5303300858899107
+11
+0.6495190528383337
+21
+0.374999999999997
+31
+-0.37499999999999933
+12
+-0.6495190528383243
+22
+0.3750000000000123
+32
+-0.37499999999999933
+13
+-0.6495190528383243
+23
+0.3750000000000123
+33
+-0.37499999999999933
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+-0.6495190528383243
+20
+0.3750000000000123
+30
+-0.37499999999999933
+11
+0.6495190528383337
+21
+0.374999999999997
+31
+-0.37499999999999933
+12
+0.7244443697168077
+22
+0.3749999999999961
+32
+-0.19411428382689278
+13
+0.7244443697168077
+23
+0.3749999999999961
+33
+-0.19411428382689278
+70
+13
+  0
+3DFACE
+ 8
+hinge
+10
+-0.6495190528383243
+20
+0.3750000000000123
+30
+-0.37499999999999933
+11
+0.7244443697168077
+21
+0.3749999999999961
+31
+-0.19411428382689278
+12
+-0.7244443697167984
+22
+0.3750000000000132
+32
+-0.194114283826891
+13
+-0.7244443697167984
+23
+0.3750000000000132
+33
+-0.194114283826891
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+-0.7244443697167984
+20
+0.3750000000000132
+30
+-0.194114283826891
+11
+0.7244443697168077
+21
+0.3749999999999961
+31
+-0.19411428382689278
+12
+0.7500000000000047
+22
+0.3749999999999958
+32
+-2.220446049250313e-16
+13
+0.7500000000000047
+23
+0.3749999999999958
+33
+-2.220446049250313e-16
+70
+13
+  0
+3DFACE
+ 8
+hinge
+10
+-0.7244443697167984
+20
+0.3750000000000132
+30
+-0.194114283826891
+11
+0.7500000000000047
+21
+0.3749999999999958
+31
+-2.220446049250313e-16
+12
+-0.7499999999999953
+22
+0.37500000000001354
+32
+-2.220446049250313e-16
+13
+-0.7499999999999953
+23
+0.37500000000001354
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.9999999999999996
+20
+1.6431300764452317e-14
+30
+-2.220446049250313e-16
+11
+0.9659258262890719
+21
+0.2588190451025134
+31
+-2.220446049250313e-16
+12
+1.0000000000000002
+22
+-7.105427357601002e-15
+32
+-2.220446049250313e-16
+13
+1.0000000000000002
+23
+-7.105427357601002e-15
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.9659258262890719
+20
+0.2588190451025134
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+0.8660254037844454
+22
+0.4999999999999938
+32
+-2.220446049250313e-16
+13
+0.8660254037844454
+23
+0.4999999999999938
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+0.8660254037844454
+20
+0.4999999999999938
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+0.7071067811865565
+22
+0.7071067811865436
+32
+-2.220446049250313e-16
+13
+0.7071067811865565
+23
+0.7071067811865436
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+0.7071067811865565
+20
+0.7071067811865436
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+0.5000000000000104
+22
+0.8660254037844374
+32
+-2.220446049250313e-16
+13
+0.5000000000000104
+23
+0.8660254037844374
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+0.5000000000000104
+20
+0.8660254037844374
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+0.2588190451025332
+22
+0.9659258262890692
+32
+-2.220446049250313e-16
+13
+0.2588190451025332
+23
+0.9659258262890692
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+0.2588190451025332
+20
+0.9659258262890692
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+1.199040866595169e-14
+22
+1.0000000000000047
+32
+-2.220446049250313e-16
+13
+1.199040866595169e-14
+23
+1.0000000000000047
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+1.199040866595169e-14
+20
+1.0000000000000047
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+-0.2588190451025092
+22
+0.965925826289077
+32
+-2.220446049250313e-16
+13
+-0.2588190451025092
+23
+0.965925826289077
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+-0.2588190451025092
+20
+0.965925826289077
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+-0.49999999999998956
+22
+0.8660254037844491
+32
+-2.220446049250313e-16
+13
+-0.49999999999998956
+23
+0.8660254037844491
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+-0.49999999999998956
+20
+0.8660254037844491
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+-0.7071067811865395
+22
+0.7071067811865602
+32
+-2.220446049250313e-16
+13
+-0.7071067811865395
+23
+0.7071067811865602
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+-0.7071067811865395
+20
+0.7071067811865602
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+-0.8660254037844322
+22
+0.5000000000000151
+32
+-2.220446049250313e-16
+13
+-0.8660254037844322
+23
+0.5000000000000151
+33
+-2.220446049250313e-16
+70
+3
+  0
+3DFACE
+ 8
+hinge
+10
+-0.8660254037844322
+20
+0.5000000000000151
+30
+-2.220446049250313e-16
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+-0.9659258262890644
+22
+0.25881904510253695
+32
+-2.220446049250313e-16
+13
+-0.9659258262890644
+23
+0.25881904510253695
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+1.199040866595169e-14
+20
+1.0000000000000047
+30
+0.9999999999999996
+11
+0.2588190451025332
+21
+0.9659258262890692
+31
+-2.220446049250313e-16
+12
+1.199040866595169e-14
+22
+1.0000000000000047
+32
+-2.220446049250313e-16
+13
+1.199040866595169e-14
+23
+1.0000000000000047
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.2588190451025332
+20
+0.9659258262890692
+30
+-2.220446049250313e-16
+11
+1.199040866595169e-14
+21
+1.0000000000000047
+31
+0.9999999999999996
+12
+0.2588190451025332
+22
+0.9659258262890692
+32
+0.9999999999999996
+13
+0.2588190451025332
+23
+0.9659258262890692
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.7071067811865395
+20
+0.7071067811865602
+30
+0.9999999999999996
+11
+-0.49999999999998956
+21
+0.8660254037844491
+31
+-2.220446049250313e-16
+12
+-0.7071067811865395
+22
+0.7071067811865602
+32
+-2.220446049250313e-16
+13
+-0.7071067811865395
+23
+0.7071067811865602
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.49999999999998956
+20
+0.8660254037844491
+30
+-2.220446049250313e-16
+11
+-0.7071067811865395
+21
+0.7071067811865602
+31
+0.9999999999999996
+12
+-0.49999999999998956
+22
+0.8660254037844491
+32
+0.9999999999999996
+13
+-0.49999999999998956
+23
+0.8660254037844491
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.49999999999998956
+20
+0.8660254037844491
+30
+0.9999999999999996
+11
+-0.2588190451025092
+21
+0.965925826289077
+31
+-2.220446049250313e-16
+12
+-0.49999999999998956
+22
+0.8660254037844491
+32
+-2.220446049250313e-16
+13
+-0.49999999999998956
+23
+0.8660254037844491
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.2588190451025092
+20
+0.965925826289077
+30
+-2.220446049250313e-16
+11
+-0.49999999999998956
+21
+0.8660254037844491
+31
+0.9999999999999996
+12
+-0.2588190451025092
+22
+0.965925826289077
+32
+0.9999999999999996
+13
+-0.2588190451025092
+23
+0.965925826289077
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.2588190451025332
+20
+0.9659258262890692
+30
+0.9999999999999996
+11
+0.5000000000000104
+21
+0.8660254037844374
+31
+-2.220446049250313e-16
+12
+0.2588190451025332
+22
+0.9659258262890692
+32
+-2.220446049250313e-16
+13
+0.2588190451025332
+23
+0.9659258262890692
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.5000000000000104
+20
+0.8660254037844374
+30
+-2.220446049250313e-16
+11
+0.2588190451025332
+21
+0.9659258262890692
+31
+0.9999999999999996
+12
+0.5000000000000104
+22
+0.8660254037844374
+32
+0.9999999999999996
+13
+0.5000000000000104
+23
+0.8660254037844374
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+1.0000000000000002
+20
+-7.105427357601002e-15
+30
+0.9999999999999996
+11
+0.9659258262890719
+21
+0.2588190451025134
+31
+-2.220446049250313e-16
+12
+0.9659258262890719
+22
+0.2588190451025134
+32
+0.9999999999999996
+13
+0.9659258262890719
+23
+0.2588190451025134
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.9659258262890719
+20
+0.2588190451025134
+30
+-2.220446049250313e-16
+11
+1.0000000000000002
+21
+-7.105427357601002e-15
+31
+0.9999999999999996
+12
+1.0000000000000002
+22
+-7.105427357601002e-15
+32
+-2.220446049250313e-16
+13
+1.0000000000000002
+23
+-7.105427357601002e-15
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.8660254037844454
+20
+0.4999999999999938
+30
+0.9999999999999996
+11
+0.7071067811865565
+21
+0.7071067811865436
+31
+-2.220446049250313e-16
+12
+0.7071067811865565
+22
+0.7071067811865436
+32
+0.9999999999999996
+13
+0.7071067811865565
+23
+0.7071067811865436
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.7071067811865565
+20
+0.7071067811865436
+30
+-2.220446049250313e-16
+11
+0.8660254037844454
+21
+0.4999999999999938
+31
+0.9999999999999996
+12
+0.8660254037844454
+22
+0.4999999999999938
+32
+-2.220446049250313e-16
+13
+0.8660254037844454
+23
+0.4999999999999938
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.2588190451025092
+20
+0.965925826289077
+30
+0.9999999999999996
+11
+1.199040866595169e-14
+21
+1.0000000000000047
+31
+-2.220446049250313e-16
+12
+-0.2588190451025092
+22
+0.965925826289077
+32
+-2.220446049250313e-16
+13
+-0.2588190451025092
+23
+0.965925826289077
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+1.199040866595169e-14
+20
+1.0000000000000047
+30
+-2.220446049250313e-16
+11
+-0.2588190451025092
+21
+0.965925826289077
+31
+0.9999999999999996
+12
+1.199040866595169e-14
+22
+1.0000000000000047
+32
+0.9999999999999996
+13
+1.199040866595169e-14
+23
+1.0000000000000047
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.9659258262890644
+20
+0.25881904510253695
+30
+-2.220446049250313e-16
+11
+-0.8660254037844322
+21
+0.5000000000000151
+31
+0.9999999999999996
+12
+-0.8660254037844322
+22
+0.5000000000000151
+32
+-2.220446049250313e-16
+13
+-0.8660254037844322
+23
+0.5000000000000151
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.8660254037844322
+20
+0.5000000000000151
+30
+0.9999999999999996
+11
+-0.9659258262890644
+21
+0.25881904510253695
+31
+-2.220446049250313e-16
+12
+-0.9659258262890644
+22
+0.25881904510253695
+32
+0.9999999999999996
+13
+-0.9659258262890644
+23
+0.25881904510253695
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.8660254037844322
+20
+0.5000000000000151
+30
+-2.220446049250313e-16
+11
+-0.7071067811865395
+21
+0.7071067811865602
+31
+0.9999999999999996
+12
+-0.7071067811865395
+22
+0.7071067811865602
+32
+-2.220446049250313e-16
+13
+-0.7071067811865395
+23
+0.7071067811865602
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.7071067811865395
+20
+0.7071067811865602
+30
+0.9999999999999996
+11
+-0.8660254037844322
+21
+0.5000000000000151
+31
+-2.220446049250313e-16
+12
+-0.8660254037844322
+22
+0.5000000000000151
+32
+0.9999999999999996
+13
+-0.8660254037844322
+23
+0.5000000000000151
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.5000000000000104
+20
+0.8660254037844374
+30
+0.9999999999999996
+11
+0.7071067811865565
+21
+0.7071067811865436
+31
+-2.220446049250313e-16
+12
+0.5000000000000104
+22
+0.8660254037844374
+32
+-2.220446049250313e-16
+13
+0.5000000000000104
+23
+0.8660254037844374
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.7071067811865565
+20
+0.7071067811865436
+30
+-2.220446049250313e-16
+11
+0.5000000000000104
+21
+0.8660254037844374
+31
+0.9999999999999996
+12
+0.7071067811865565
+22
+0.7071067811865436
+32
+0.9999999999999996
+13
+0.7071067811865565
+23
+0.7071067811865436
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.9659258262890719
+20
+0.2588190451025134
+30
+0.9999999999999996
+11
+0.8660254037844454
+21
+0.4999999999999938
+31
+-2.220446049250313e-16
+12
+0.8660254037844454
+22
+0.4999999999999938
+32
+0.9999999999999996
+13
+0.8660254037844454
+23
+0.4999999999999938
+33
+0.9999999999999996
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+0.8660254037844454
+20
+0.4999999999999938
+30
+-2.220446049250313e-16
+11
+0.9659258262890719
+21
+0.2588190451025134
+31
+0.9999999999999996
+12
+0.9659258262890719
+22
+0.2588190451025134
+32
+-2.220446049250313e-16
+13
+0.9659258262890719
+23
+0.2588190451025134
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.9999999999999996
+20
+1.6431300764452317e-14
+30
+-2.220446049250313e-16
+11
+-0.9659258262890644
+21
+0.25881904510253695
+31
+0.9999999999999996
+12
+-0.9659258262890644
+22
+0.25881904510253695
+32
+-2.220446049250313e-16
+13
+-0.9659258262890644
+23
+0.25881904510253695
+33
+-2.220446049250313e-16
+70
+1
+  0
+3DFACE
+ 8
+hinge
+10
+-0.9659258262890644
+20
+0.25881904510253695
+30
+0.9999999999999996
+11
+-0.9999999999999996
+21
+1.6431300764452317e-14
+31
+-2.220446049250313e-16
+12
+-0.9999999999999996
+22
+1.6431300764452317e-14
+32
+0.9999999999999996
+13
+-0.9999999999999996
+23
+1.6431300764452317e-14
+33
+0.9999999999999996
+70
+1
+ 0
+ENDSEC
+ 0
+EOF
index 5be6862cd7c5e2dc50b9de3d20c83cd1cd4f783f..3b80fc2b498d499a453498d55928832d19933584 100644 (file)
@@ -33,6 +33,7 @@ static const char sccsid[] = "@(#)sierpinski3D.c      00.01 99/11/04 xlockmore";
                                                                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_gasket 0
+# define release_gasket 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"                    /* from the xlockmore distribution */
@@ -77,7 +78,7 @@ ENTRYPOINT ModeSpecOpt gasket_opts = {countof(opts), opts, countof(vars), vars,
 
 #ifdef USE_MODULES
 ModStruct   gasket_description =
-{"gasket", "init_gasket", "draw_gasket", "release_gasket",
+{"gasket", "init_gasket", "draw_gasket", NULL,
  "draw_gasket", "init_gasket", NULL, &gasket_opts,
  1000, 1, 2, 1, 4, 1.0, "",
  "Shows GL's Sierpinski gasket", 0, NULL};
@@ -466,18 +467,16 @@ gasket_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
+static void free_gasket(ModeInfo * mi);
+
+
 ENTRYPOINT void
 init_gasket(ModeInfo *mi)
 {
   int           screen = MI_SCREEN(mi);
   gasketstruct *gp;
 
-  if (gasket == NULL)
-  {
-    if ((gasket = (gasketstruct *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (gasketstruct))) == NULL)
-       return;
-  }
+  MI_INIT (mi, gasket, free_gasket);
   gp = &gasket[screen];
 
   gp->window = MI_WINDOW(mi);
@@ -556,31 +555,20 @@ draw_gasket(ModeInfo * mi)
 }
 
 ENTRYPOINT void
-release_gasket(ModeInfo * mi)
+free_gasket(ModeInfo * mi)
 {
-  if (gasket != NULL)
-  {
-    int         screen;
-
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-    {
-      gasketstruct *gp = &gasket[screen];
+  gasketstruct *gp = &gasket[MI_SCREEN(mi)];
 
-      if (gp->glx_context)
-      {
+  if (gp->glx_context)
+  {
        /* Display lists MUST be freed while their glXContext is current. */
-        glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context));
+    glXMakeCurrent(MI_DISPLAY(mi), gp->window, *(gp->glx_context));
 
-        if (glIsList(gp->gasket0)) glDeleteLists(gp->gasket0, 1);
-        if (glIsList(gp->gasket1)) glDeleteLists(gp->gasket1, 1);
-        if (glIsList(gp->gasket2)) glDeleteLists(gp->gasket2, 1);
-        if (glIsList(gp->gasket3)) glDeleteLists(gp->gasket3, 1);
-      }
-    }
-    (void) free((void *) gasket);
-    gasket = NULL;
+    if (glIsList(gp->gasket0)) glDeleteLists(gp->gasket0, 1);
+    if (glIsList(gp->gasket1)) glDeleteLists(gp->gasket1, 1);
+    if (glIsList(gp->gasket2)) glDeleteLists(gp->gasket2, 1);
+    if (glIsList(gp->gasket3)) glDeleteLists(gp->gasket3, 1);
   }
-  FreeAllGL(mi);
 }
 
 XSCREENSAVER_MODULE_2 ("Sierpinski3D", sierpinski3d, gasket)
index 3e0cfcf025687ef11aef6d16e00da41ffddfdb06..ce61cf0160b82d988178a4550314112a29ad956b 100644 (file)
@@ -818,7 +818,7 @@ tentacles_handle_event (ModeInfo *mi, XEvent *event)
       XLookupString (&event->xkey, &c, 1, &keysym, 0);
       if (c == ' ')
         {
-          gltrackball_reset (tc->trackball);
+          gltrackball_reset (tc->trackball, 0, 0);
           return True;
         }
     }
@@ -851,14 +851,7 @@ init_tentacles (ModeInfo *mi)
   int wire = MI_IS_WIREFRAME(mi);
   int i;
 
-  if (!tcs) {
-    tcs = (tentacles_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (tentacles_configuration));
-    if (!tcs) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, tcs, NULL);
 
   tc = &tcs[MI_SCREEN(mi)];
 
index 8256270b36a4af185c31c55b8b183c21cbefee38..e482ab6a580617061a58ca731922c86c4d5a60a6 100644 (file)
@@ -1,4 +1,4 @@
-/* sonar, Copyright (c) 1998-2016 Jamie Zawinski and Stephen Martin
+/* sonar, Copyright (c) 1998-2017 Jamie Zawinski and Stephen Martin
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -165,7 +165,7 @@ typedef struct {
 
 
 /* Packs an IP address quad into bigendian network order. */
-static unsigned long
+static in_addr_t
 pack_addr (unsigned int a, unsigned int b, unsigned int c, unsigned int d)
 {
   unsigned long i = (((a & 255) << 24) |
@@ -243,6 +243,7 @@ resolve_bogie_hostname (ping_data *pd, sonar_bogie *sb, Bool resolve_p)
       if (!strcmp (sb->name, "ssh-rsa") ||
           !strcmp (sb->name, "ssh-dsa") ||
           !strcmp (sb->name, "ssh-dss") ||
+          !strncmp (sb->name, "ecdsa-", 6) ||
           strlen (sb->name) >= 80)
         return 0;
 
@@ -448,12 +449,12 @@ read_hosts_file (sonar_sensor_data *ssd, const char *filename)
   fp = fopen(filename, "r");
   if (!fp)
     {
-      char buf[1024];
-      sprintf(buf, "%s:  %s", progname, filename);
+      char buf2[1024];
+      sprintf(buf2, "%s:  %s", progname, filename);
 #ifdef HAVE_JWXYZ
       if (pd->debug_p)  /* on OSX don't syslog this */
 #endif
-        perror (buf);
+        perror (buf2);
       return 0;
     }
 
@@ -640,10 +641,10 @@ delete_duplicate_hosts (sonar_sensor_data *ssd, sonar_bogie *list)
 }
 
 
-static unsigned int
-width_mask (int width)
+static unsigned long
+width_mask (unsigned long width)
 {
-  unsigned int m = 0;
+  unsigned long m = 0;
   int i;
   for (i = 0; i < width; i++)
     m |= (1L << (31-i));
@@ -652,8 +653,8 @@ width_mask (int width)
 
 
 #ifdef HAVE_GETIFADDRS
-static int
-mask_width (unsigned int mask)
+static unsigned int
+mask_width (unsigned long mask)
 {
   int i;
   for (i = 0; i < 32; i++)
@@ -861,15 +862,15 @@ subnet_hosts (sonar_sensor_data *ssd, char **error_ret, char **desc_ret,
   h_base = ntohl (n_base);
 
   if (desc_ret && !*desc_ret) {
-    char buf[255];
+    char buf2[255];
     unsigned int a, b, c, d;
     unsigned long bb = n_base & htonl(h_mask);
     unpack_addr (bb, &a, &b, &c, &d);
     if (subnet_width > 24)
-      sprintf (buf, "%u.%u.%u.%u/%d", a, b, c, d, subnet_width);
+      sprintf (buf2, "%u.%u.%u.%u/%d", a, b, c, d, subnet_width);
     else
-      sprintf (buf, "%u.%u.%u/%d", a, b, c, subnet_width);
-    *desc_ret = strdup (buf);
+      sprintf (buf2, "%u.%u.%u/%d", a, b, c, subnet_width);
+    *desc_ret = strdup (buf2);
   }
 
   for (i = 255; i >= 0; i--) {
@@ -928,9 +929,9 @@ send_ping (ping_data *pd, const sonar_bogie *b)
   const char *token = "org.jwz.xscreensaver.sonar";
   char *host_id;
 
-  int pcktsiz = (sizeof(struct ICMP) + sizeof(struct timeval) + 
+  unsigned long pcktsiz = (sizeof(struct ICMP) + sizeof(struct timeval) +
                  sizeof(socklen_t) + pb->addrlen +
-                 strlen(token) + 1 + 
+                 strlen(token) + 1 +
                  strlen(pd->version) + 1);
 
   /* Create the ICMP packet */
@@ -1105,7 +1106,7 @@ get_ping (sonar_sensor_data *ssd)
          From Valentijn Sessink <valentyn@openoffice.nl> */
       if (select(pd->icmpsock + 1, &rfds, 0, 0, &tv) >0)
         {
-          result = recvfrom (pd->icmpsock, packet, sizeof(packet),
+          result = (int)recvfrom (pd->icmpsock, packet, sizeof(packet),
                              0, &from, &fromlen);
 
           /* Check the packet */
@@ -1373,13 +1374,15 @@ ping_scan (sonar_sensor_data *ssd)
                     {
                       sonar_bogie *new_bogie = bogie_for_host (ssd, fallback,
                                                                NULL);
-                      new_bogie->next = *sbp;
-
-                      if (! ((ping_bogie *)new_bogie->closure)->lookup_addr &&
-                        ! find_duplicate_host(pd, &pd->targets, new_bogie))
-                        *sbp = new_bogie;
-                      else
-                        sonar_free_bogie (ssd, new_bogie);
+                      if (new_bogie) {
+                        new_bogie->next = *sbp;
+
+                        if (! ((ping_bogie *)new_bogie->closure)->lookup_addr &&
+                            ! find_duplicate_host(pd, &pd->targets, new_bogie))
+                          *sbp = new_bogie;
+                        else
+                          sonar_free_bogie (ssd, new_bogie);
+                      }
 
                       free (fallback);
                     }
index f3a4d9d518b73f66ce2576bc6a2995456b498db0..42bcdc8e7d6cc4ddb3d8afff039dff1535c00f2a 100644 (file)
@@ -77,6 +77,7 @@
 
 
 # define refresh_sonar 0
+# define release_sonar 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -816,20 +817,14 @@ sonar_handle_event (ModeInfo *mi, XEvent *event)
   return False;
 }
 
+static void free_sonar (ModeInfo *mi);
 
 ENTRYPOINT void 
 init_sonar (ModeInfo *mi)
 {
   sonar_configuration *sp;
 
-  if (!sps) {
-    sps = (sonar_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (sonar_configuration));
-    if (!sps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, sps, free_sonar);
   sp = &sps[MI_SCREEN(mi)];
   sp->glx_context = init_GL(mi);
 
@@ -1223,8 +1218,8 @@ draw_sonar (ModeInfo *mi)
 # endif /* TEST_ASYNC_NETDB */
 }
 
-ENTRYPOINT void
-release_sonar (ModeInfo *mi)
+static void
+free_sonar (ModeInfo *mi)
 {
 #if 0
   sonar_configuration *sp = &sps[MI_SCREEN(mi)];
index 70b7ff6eb19486861c214e72f6057bb83facbd28..658b6e456022f12b38d8c6c3eefc6f0ff05b9537 100644 (file)
@@ -695,14 +695,7 @@ init_spheremonics (ModeInfo *mi)
 {
   spheremonics_configuration *cc;
 
-  if (!ccs) {
-    ccs = (spheremonics_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (spheremonics_configuration));
-    if (!ccs) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, ccs, NULL);
 
   cc = &ccs[MI_SCREEN(mi)];
 
index 922417545697afe9ac44d11c485523f20aa8fde3..35a05f929a0da9fdec6ffd6018ecbc6d931b7efa 100644 (file)
@@ -27,6 +27,7 @@
                        "*usePty:       False\n"
 
 # define refresh_splitflap 0
+# define release_splitflap 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -292,6 +293,7 @@ parse_color (ModeInfo *mi, char *key, GLfloat color[4])
 
 
 static int draw_outer_frame (ModeInfo *mi);
+static void free_splitflap (ModeInfo *mi);
 
 ENTRYPOINT void 
 init_splitflap (ModeInfo *mi)
@@ -299,14 +301,7 @@ init_splitflap (ModeInfo *mi)
   splitflap_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
   int i;
-  if (!bps) {
-    bps = (splitflap_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (splitflap_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, free_splitflap);
 
   bp = &bps[MI_SCREEN(mi)];
   bp->glx_context = init_GL(mi);
@@ -1400,8 +1395,8 @@ draw_splitflap (ModeInfo *mi)
   glXSwapBuffers(dpy, window);
 }
 
-ENTRYPOINT void
-release_splitflap (ModeInfo *mi)
+static void
+free_splitflap (ModeInfo *mi)
 {
   splitflap_configuration *bp = &bps[MI_SCREEN(mi)];
   if (bp->tc)
index 8bf2fc90e74662bf10bf802771346b7d62bdd072..1d8f95c43154e6c98b26f21ffc375be4fc0852d9 100644 (file)
@@ -15,6 +15,7 @@
                        "*suppressRotationAnimation: True\n" \
 
 # define refresh_splodesic 0
+# define release_splodesic 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -75,7 +76,7 @@ static XrmOptionDescRec opts[] = {
   { "-spin",   ".spin",   XrmoptionNoArg, "True" },
   { "+spin",   ".spin",   XrmoptionNoArg, "False" },
   { "-speed",  ".speed",  XrmoptionSepArg, 0 },
-  { "-depth",  ".depth",  XrmoptionSepArg, 0 },
+  { "-depth",  ".freq",   XrmoptionSepArg, 0 },
   { "-wander", ".wander", XrmoptionNoArg, "True" },
   { "+wander", ".wander", XrmoptionNoArg, "False" }
 };
@@ -84,7 +85,7 @@ static argtype vars[] = {
   {&do_spin,   "spin",   "Spin",   DEF_SPIN,   t_Bool},
   {&do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
   {&speed,     "speed",  "Speed",  DEF_SPEED,  t_Float},
-  {&depth_arg, "depth",  "Depth",  DEF_DEPTH,  t_Int},
+  {&depth_arg, "freq",   "Depth",  DEF_DEPTH,  t_Int},
 };
 
 ENTRYPOINT ModeSpecOpt splodesic_opts = {countof(opts), opts, countof(vars), vars, NULL};
@@ -488,20 +489,15 @@ splodesic_handle_event (ModeInfo *mi, XEvent *event)
 }
 
 
+static void free_splodesic (ModeInfo *mi);
+
 ENTRYPOINT void 
 init_splodesic (ModeInfo *mi)
 {
   splodesic_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!bps) {
-    bps = (splodesic_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (splodesic_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, free_splodesic);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -623,8 +619,8 @@ draw_splodesic (ModeInfo *mi)
 }
 
 
-ENTRYPOINT void
-release_splodesic (ModeInfo *mi)
+static void
+free_splodesic (ModeInfo *mi)
 {
   splodesic_configuration *bp = &bps[MI_SCREEN(mi)];
   while (bp->triangles)
index 4752d41d79a59a0c00ff58636d7d062e85169be5..41a31a1590ff070af9f4b1af3b31705fa994d25f 100644 (file)
@@ -61,26 +61,6 @@ static const char sccsid[] = "@(#)sproingies.c       4.04 97/07/28 xlockmore";
  * 
  * There are other frame numbers for special cases (e.g. BOOM_FRAME).
  */
-struct sPosColor {   /* Position and color of the sproingie     */
-       int x, y, z;     /*   Position                              */
-       int frame;       /*   Current frame (0-5)                   */
-       int life;        /*   Life points                           */
-       GLfloat r, g, b; /*   Color RGB                             */
-       int direction;   /*   Direction of next hop (left or right) */
-};
-
-typedef struct {
-       int         rotx, roty, dist, wireframe, flatshade, groundlevel,
-                   maxsproingies, mono;
-       int         sframe, target_rx, target_ry, target_dist, target_count;
-       const struct gllist *sproingies[6];
-       const struct gllist *SproingieBoom;
-       GLuint TopsSides;
-       struct sPosColor *positions;
-} sp_instance;
-
-static sp_instance *si_list = NULL;
-static int  active_screens = 0;
 
 extern const struct gllist *s1_1;
 extern const struct gllist *s1_2;
@@ -352,9 +332,8 @@ AdvanceSproingie(int t, sp_instance * si)
 }
 
 static void
-NextSproingie(int screen)
+NextSproingie(sp_instance *si)
 {
-       sp_instance *si = &si_list[screen];
        int         ddx, t;
        struct sPosColor *thisSproingie = &(si->positions[0]);
 
@@ -689,9 +668,8 @@ ComputeGround(sp_instance * si)
 }
 
 void
-DisplaySproingies(int screen,int pause)
+DisplaySproingies(sp_instance *si)
 {
-       sp_instance *si = &si_list[screen];
        int         t;
        GLfloat     position[] =
        {8.0, 5.0, -2.0, 0.1};
@@ -742,11 +720,11 @@ DisplaySproingies(int screen,int pause)
 }
 
 void
-NextSproingieDisplay(int screen,int pause)
+NextSproingieDisplay(sp_instance *si)
 {
-       NextSproingie(screen);
+       NextSproingie(si);
 /*        if (pause) usleep(pause);  don't do this! -jwz */
-       DisplaySproingies(screen,pause);
+       DisplaySproingies(si);
 }
 
 void
@@ -761,10 +739,8 @@ ReshapeSproingies(int w, int h)
 }
 
 void
-CleanupSproingies(int screen)
+CleanupSproingies(sp_instance *si)
 {
-       sp_instance *si = &si_list[screen];
-
     if (! si) return;
 
 /*
@@ -776,7 +752,6 @@ CleanupSproingies(int screen)
                glDeleteLists(si->TopsSides, 2);
                glDeleteLists(si->SproingieBoom, 1);
 
-               --active_screens;
                si->SproingieBoom = 0;
        }
 */
@@ -787,15 +762,11 @@ CleanupSproingies(int screen)
                (void) free((void *) (si->positions));
                si->positions = NULL;
        }
-       if ((active_screens == 0) && si_list) {
-               (void) free((void *) (si_list));
-               si_list = NULL;
-       }
 }
 
 void
-InitSproingies(int wfmode, int grnd, int mspr, int smrtspr, 
-                          int screen, int numscreens, int mono)
+InitSproingies(sp_instance *si, int wfmode, int grnd, int mspr, int smrtspr,
+                          int mono)
 {
        GLfloat     ambient[] =
        {0.2, 0.2, 0.2, 1.0};
@@ -808,18 +779,9 @@ InitSproingies(int wfmode, int grnd, int mspr, int smrtspr,
        GLfloat     mat_shininess[] =
        {50.0};
 
-       sp_instance *si;
        int         t;
 
-       active_screens++;
-       CleanupSproingies(screen);
-
-       if (si_list == NULL) {
-               if ((si_list = (sp_instance *) calloc(numscreens,
-                                             sizeof (sp_instance))) == NULL)
-                       return;
-       }
-       si = &si_list[screen];
+       memset (si, 0, sizeof(*si));
 
        if (mspr < 0)
                mspr = 0;
index 81c6cb7e35d15334816e4c9a7bb2525353d18d98..29a79baf9b888db5b87acdf9ffce4f23c0324e30 100644 (file)
  * See sproingiewrap.c
  */
 
-extern void DisplaySproingies(int screen,int pause);
-extern void NextSproingieDisplay(int screen,int pause);
+struct sPosColor {   /* Position and color of the sproingie     */
+       int x, y, z;     /*   Position                              */
+       int frame;       /*   Current frame (0-5)                   */
+       int life;        /*   Life points                           */
+       GLfloat r, g, b; /*   Color RGB                             */
+       int direction;   /*   Direction of next hop (left or right) */
+};
+
+typedef struct {
+       int         rotx, roty, dist, wireframe, flatshade, groundlevel,
+                   maxsproingies, mono;
+       int         sframe, target_rx, target_ry, target_dist, target_count;
+       const struct gllist *sproingies[6];
+       const struct gllist *SproingieBoom;
+       GLuint TopsSides;
+       struct sPosColor *positions;
+} sp_instance;
+
+extern void DisplaySproingies(sp_instance *si);
+extern void NextSproingieDisplay(sp_instance *si);
 extern void ReshapeSproingies(int w, int h);
-extern void CleanupSproingies(int screen);
-extern void InitSproingies(int wfmode, int grnd, int mspr, int smrtspr,
-                           int screen, int numscreens, int mono);
+extern void CleanupSproingies(sp_instance *si);
+extern void InitSproingies(sp_instance *, int wfmode, int grnd, int mspr,
+                           int smrtspr, int mono);
index 402b910370c014699e61a472b3fb0a720756861c..722b725b90995232ad3b5aeb26ec37cf90a6f016 100644 (file)
@@ -54,6 +54,7 @@ static const char sccsid[] = "@(#)sproingiewrap.c     4.07 97/11/24 xlockmore";
                                        "*wireframe:    False   \n"
 
 # define refresh_sproingies 0
+# define release_sproingies 0
 # define sproingies_handle_event 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -85,7 +86,7 @@ ENTRYPOINT ModeSpecOpt sproingies_opts =
 
 #ifdef USE_MODULES
 ModStruct   sproingies_description =
-{"sproingies", "init_sproingies", "draw_sproingies", "release_sproingies",
+{"sproingies", "init_sproingies", "draw_sproingies", NULL,
  "refresh_sproingies", "init_sproingies", NULL, &sproingies_opts,
  1000, 5, 0, 400, 4, 1.0, "",
  "Shows Sproingies!  Nontoxic.  Safe for pets and small children", 0, NULL};
@@ -96,14 +97,6 @@ ModStruct   sproingies_description =
 
 #include <time.h>
 
-void        NextSproingie(int screen);
-void        NextSproingieDisplay(int screen,int pause);
-void        DisplaySproingies(int screen,int pause);
-void        ReshapeSproingies(int w, int h);
-void        CleanupSproingies(int screen);
-void        InitSproingies(int wfmode, int grnd, int mspr, int smrtspr,
-                                                  int screen, int numscreens, int mono);
-
 typedef struct {
        GLfloat     view_rotx, view_roty, view_rotz;
        GLint       gear1, gear2, gear3;
@@ -113,11 +106,15 @@ typedef struct {
        GLXContext *glx_context;
        int         mono;
        Window      window;
+       sp_instance si;
 } sproingiesstruct;
 
 static sproingiesstruct *sproingies = NULL;
 
 
+static void free_sproingies (ModeInfo * mi);
+
+
 ENTRYPOINT void
 init_sproingies (ModeInfo * mi)
 {
@@ -130,11 +127,7 @@ init_sproingies (ModeInfo * mi)
        sproingiesstruct *sp;
        int         wfmode = 0, grnd = 0, mspr, w, h;
 
-       if (sproingies == NULL) {
-               if ((sproingies = (sproingiesstruct *) calloc(MI_NUM_SCREENS(mi),
-                                        sizeof (sproingiesstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, sproingies, free_sproingies);
        sp = &sproingies[screen];
 
        sp->mono = (MI_IS_MONO(mi) ? 1 : 0);
@@ -152,7 +145,7 @@ init_sproingies (ModeInfo * mi)
                        mspr = 100;
 
                /* wireframe, ground, maxsproingies */
-               InitSproingies(wfmode, grnd, mspr, smrt_spr, MI_SCREEN(mi), MI_NUM_SCREENS(mi), sp->mono);
+               InitSproingies(&sp->si, wfmode, grnd, mspr, smrt_spr, sp->mono);
 
                /* Viewport is specified size if size >= MINSIZE && size < screensize */
                if (size == 0) {
@@ -173,7 +166,7 @@ init_sproingies (ModeInfo * mi)
                glMatrixMode(GL_MODELVIEW);
                glLoadIdentity();
 
-               DisplaySproingies(MI_SCREEN(mi),mi->pause);
+               DisplaySproingies(&sp->si);
 
        } else {
                MI_CLEARWINDOW(mi);
@@ -196,7 +189,7 @@ draw_sproingies (ModeInfo * mi)
 
     glPushMatrix();
     glRotatef(current_device_rotation(), 0, 0, 1);
-       NextSproingieDisplay(MI_SCREEN(mi),mi->pause);  /* It will swap. */
+       NextSproingieDisplay(&sp->si);  /* It will swap. */
     glPopMatrix();
 
     if (mi->fps_p) do_fps (mi);
@@ -223,26 +216,16 @@ reshape_sproingies (ModeInfo *mi, int w, int h)
 }
 
 
-ENTRYPOINT void
-release_sproingies (ModeInfo * mi)
+static void
+free_sproingies (ModeInfo * mi)
 {
-       if (sproingies != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       sproingiesstruct *sp = &sproingies[screen];
-
-                       if (sp->glx_context) {
+       sproingiesstruct *sp = &sproingies[MI_SCREEN(mi)];
 
-                               glXMakeCurrent(MI_DISPLAY(mi), sp->window, *(sp->glx_context));
-                               CleanupSproingies(MI_SCREEN(mi));
-                       }
-               }
+       if (sp->glx_context) {
 
-               (void) free((void *) sproingies);
-               sproingies = NULL;
+               glXMakeCurrent(MI_DISPLAY(mi), sp->window, *(sp->glx_context));
+               CleanupSproingies(&sp->si);
        }
-       FreeAllGL(mi);
 }
 
 XSCREENSAVER_MODULE ("Sproingies", sproingies)
index 91f40ac46a919853c077b3b7b11a33d8ab398dce..2dd78b873d40f28096c46803896756e347051bca 100644 (file)
@@ -60,6 +60,7 @@ static const char sccsid[] = "@(#)stairs.c    4.07 97/11/24 xlockmore";
                                                        "*showFPS:      False   \n"
 
 # define refresh_stairs 0
+# define release_stairs 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
 # include "xlock.h"                    /* from the xlockmore distribution */
@@ -83,7 +84,7 @@ ENTRYPOINT ModeSpecOpt stairs_opts =
 
 #ifdef USE_MODULES
 ModStruct   stairs_description =
-{"stairs", "init_stairs", "draw_stairs", "release_stairs",
+{"stairs", "init_stairs", "draw_stairs", NULL,
  "draw_stairs", "change_stairs", NULL, &stairs_opts,
  1000, 1, 1, 1, 4, 1.0, "",
  "Shows Infinite Stairs, an Escher-like scene", 0, NULL};
@@ -354,7 +355,7 @@ stairs_handle_event (ModeInfo *mi, XEvent *event)
       XLookupString (&event->xkey, &c, 1, &keysym, 0);
       if (c == ' ' || c == '\t')
         {
-          gltrackball_reset (sp->trackball);
+          gltrackball_reset (sp->trackball, 0, 0);
           return True;
         }
     }
@@ -431,17 +432,15 @@ pinit(ModeInfo *mi)
        glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, front_specular);
 }
 
+static void free_stairs (ModeInfo * mi);
+
 ENTRYPOINT void
 init_stairs (ModeInfo * mi)
 {
        int         screen = MI_SCREEN(mi);
        stairsstruct *sp;
 
-       if (stairs == NULL) {
-               if ((stairs = (stairsstruct *) calloc(MI_NUM_SCREENS(mi),
-                                            sizeof (stairsstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, stairs, free_stairs);
        sp = &stairs[screen];
 
        sp->step = 0.0;
@@ -578,21 +577,13 @@ change_stairs (ModeInfo * mi)
 }
 #endif /* !STANDALONE */
 
-ENTRYPOINT void
-release_stairs (ModeInfo * mi)
+static void
+free_stairs (ModeInfo * mi)
 {
-       if (stairs != NULL) {
-      int i;
-      for (i = 0; i < MI_NUM_SCREENS(mi); i++) {
-        stairsstruct *sp = &stairs[i];
-        if (glIsList(sp->objects)) {
-          glDeleteLists(sp->objects, 1);
-        }
-      }
-      free(stairs);
-      stairs = NULL;
+       stairsstruct *sp = &stairs[MI_SCREEN(mi)];
+       if (glIsList(sp->objects)) {
+               glDeleteLists(sp->objects, 1);
        }
-       FreeAllGL(mi);
 }
 
 XSCREENSAVER_MODULE ("Stairs", stairs)
index a726bb300a006840e5aaaed5db4b88575d70b9a1..9ee8cc3f05ed11e00cdb993ae1beeac83c0842d7 100644 (file)
@@ -47,6 +47,7 @@
                 "*program: xscreensaver-text --cols 0"  /* don't wrap */
 
 # define refresh_sws 0
+# define release_sws 0
 # define sws_handle_event 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
@@ -716,6 +717,9 @@ gl_init (ModeInfo *mi)
 }
 
 
+static void free_sws (ModeInfo *mi);
+
+
 ENTRYPOINT void 
 init_sws (ModeInfo *mi)
 {
@@ -723,14 +727,7 @@ init_sws (ModeInfo *mi)
 
   sws_configuration *sc = 0;
 
-  if (!scs) {
-    scs = (sws_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (sws_configuration));
-    if (!scs) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, scs, free_sws);
 
   sc = &scs[MI_SCREEN(mi)];
 
@@ -1054,22 +1051,14 @@ draw_sws (ModeInfo *mi)
   sc->star_theta += star_spin;
 }
 
-ENTRYPOINT void
-release_sws (ModeInfo *mi)
+static void
+free_sws (ModeInfo *mi)
 {
-  if (scs) {
-    int screen;
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-      sws_configuration *sc = &scs[screen];
-      if (sc->tc)
-        textclient_close (sc->tc);
-
-      /* #### there's more to free here */
-    }
-    free (scs);
-    scs = 0;
-  }
-  FreeAllGL(mi);
+  sws_configuration *sc = &scs[MI_SCREEN(mi)];
+  if (sc->tc)
+    textclient_close (sc->tc);
+
+  /* #### there's more to free here */
 }
 
 
index 7e150b3963bf84a15f53b9611b7a79c933d4517b..6ce58bb05595c1044967fe5fcef7eb275ccc1966 100644 (file)
@@ -25,6 +25,7 @@
                        "*wireframe:    False       \n"
 
 # define refresh_stonerview 0
+# define release_stonerview 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -76,19 +77,16 @@ reshape_stonerview (ModeInfo *mi, int width, int height)
 }
 
 
+static void
+free_stonerview (ModeInfo *mi);
+
+
 ENTRYPOINT void 
 init_stonerview (ModeInfo *mi)
 {
   stonerview_configuration *bp;
 
-  if (!bps) {
-    bps = (stonerview_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (stonerview_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, free_stonerview);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -135,20 +133,12 @@ draw_stonerview (ModeInfo *mi)
   glXSwapBuffers(MI_DISPLAY (mi), MI_WINDOW(mi));
 }
 
-ENTRYPOINT void
-release_stonerview (ModeInfo *mi)
+static void
+free_stonerview (ModeInfo *mi)
 {
-  if (bps) {
-    int screen;
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-      stonerview_configuration *bp = &bps[screen];
-      if (bp->st)
-        stonerview_win_release (bp->st);
-    }
-    free (bps);
-    bps = 0;
-  }
-  FreeAllGL(mi);
+  stonerview_configuration *bp = &bps[MI_SCREEN(mi)];
+  if (bp->st)
+    stonerview_win_release (bp->st);
 }
 
 ENTRYPOINT Bool
index 9293218f2f56c5ba11da0802896707fcf019dbc6..5ab7ef5109353ba4ac6eab5b389e18079b8f60c2 100644 (file)
@@ -78,6 +78,7 @@ static const char sccsid[] = "@(#)superquadrics.c     4.07 97/11/24 xlockmore";
                                        "*wireframe:    False   \n"                     \
                                        "*suppressRotationAnimation: True\n" \
 
+# define release_superquadrics 0
 # define superquadrics_handle_event 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
@@ -115,7 +116,7 @@ ENTRYPOINT ModeSpecOpt superquadrics_opts =
 
 #ifdef USE_MODULES
 ModStruct   superquadrics_description =
-{"superquadrics", "init_superquadrics", "draw_superquadrics", "release_superquadrics",
+{"superquadrics", "init_superquadrics", "draw_superquadrics", NULL,
  "refresh_superquadrics", "init_superquadrics", NULL, &superquadrics_opts,
  1000, 25, 40, 1, 4, 1.0, "",
  "Shows 3D mathematical shapes", 0, NULL};
@@ -726,11 +727,7 @@ init_superquadrics(ModeInfo * mi)
 
        superquadricsstruct *sp;
 
-       if (superquadrics == NULL) {
-               if ((superquadrics = (superquadricsstruct *) calloc(MI_NUM_SCREENS(mi),
-                                     sizeof (superquadricsstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, superquadrics, NULL);
        sp = &superquadrics[screen];
        sp->mono = (MI_IS_MONO(mi) ? 1 : 0);
 
@@ -792,16 +789,6 @@ reshape_superquadrics(ModeInfo * mi, int width, int height)
   ReshapeSuperquadrics(MI_WIDTH(mi), MI_HEIGHT(mi));
 }
 
-ENTRYPOINT void
-release_superquadrics(ModeInfo * mi)
-{
-       if (superquadrics != NULL) {
-               (void) free((void *) superquadrics);
-               superquadrics = NULL;
-       }
-       FreeAllGL(mi);
-}
-
 
 #endif
 
index 9ea84cddfa07cd12ad4f10413e24efc448f1b6cc..165264895d15b0838f3771f75a48ff3261d12569 100644 (file)
@@ -47,6 +47,7 @@
                                   "*suppressRotationAnimation: True\n" \
 
 # define refresh_surface 0
+# define release_surface 0
 # include "xlockmore.h"     /* from the xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"         /* from the xlockmore distribution */
@@ -418,8 +419,11 @@ static void draw(ModeInfo *mi)
 /* new window size or exposure */
 ENTRYPOINT void reshape_surface(ModeInfo *mi, int width, int height)
 {
+  surfacestruct *sp = &surface[MI_SCREEN(mi)];
   GLfloat h = (GLfloat) height / (GLfloat) width;
 
+  glXMakeCurrent(MI_DISPLAY(mi), MI_WINDOW(mi), *(sp->glx_context));
+
   glViewport(0, 0, (GLint) width, (GLint) height);
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
@@ -459,12 +463,7 @@ ENTRYPOINT void init_surface(ModeInfo *mi)
   int    screen = MI_SCREEN(mi);
   surfacestruct *sp;
 
-  if (surface == NULL)
-  {
-    if ((surface = (surfacestruct *) calloc(MI_NUM_SCREENS(mi),
-                                            sizeof(surfacestruct))) == NULL)
-      return;
-  }
+  MI_INIT (mi, surface, NULL);
   sp = &surface[screen];
 
   sp->window = MI_WINDOW(mi);
@@ -637,29 +636,6 @@ ENTRYPOINT void draw_surface(ModeInfo * mi)
 }
 
 
-ENTRYPOINT void release_surface(ModeInfo * mi)
-{
-  if (surface != NULL)
-  {
-    int  screen;
-
-    for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-    {
-      surfacestruct *sp = &surface[screen];
-
-      if (sp->glx_context)
-      {
-        /* Display lists MUST be freed while their glXContext is current. */
-        glXMakeCurrent(MI_DISPLAY(mi), sp->window, *(sp->glx_context));
-      }
-    }
-    (void) free((void *)surface);
-    surface = NULL;
-  }
-  FreeAllGL(mi);
-}
-
-
 XSCREENSAVER_MODULE_2("Surfaces", surfaces, surface)
 
 #endif
index c084af588b586fcab6af76f1972cbd11db9ee14d..82a1f4102e18ba143ad50942d39cff97bdde7000 100644 (file)
@@ -877,14 +877,7 @@ ENTRYPOINT void init_tangram(ModeInfo * mi)
 {
     tangram_configuration *tp;
 
-    if (!tps) {
-        tps = (tangram_configuration *)
-            calloc(MI_NUM_SCREENS(mi), sizeof(tangram_configuration));
-        if (!tps) {
-            fprintf(stderr, "%s: out of memory\n", progname);
-            exit(1);
-        }
-    }
+    MI_INIT (mi, tps, NULL);
 
     tp = &tps[MI_SCREEN(mi)];
 
index 0262f86161427c2d54459e16b133ebab486953a6..5388efd4f75f94b3d35c28a5cba52fb832433dbd 100644 (file)
@@ -1,4 +1,4 @@
-/* texfonts, Copyright (c) 2005-2016 Jamie Zawinski <jwz@jwz.org>
+/* texfonts, Copyright (c) 2005-2017 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
@@ -44,6 +44,7 @@
 #endif /* HAVE_XSHM_EXTENSION */
 
 #include "xft.h"
+#include "pow2.h"
 #include "resources.h"
 #include "texfont.h"
 #include "fps.h"       /* for current_device_rotation() */
@@ -82,20 +83,6 @@ struct texture_font_data {
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
 
-/* return the next larger power of 2. */
-static int
-to_pow2 (int i)
-{
-  static const unsigned int pow2[] = { 
-    1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 
-    2048, 4096, 8192, 16384, 32768, 65536 };
-  int j;
-  for (j = 0; j < sizeof(pow2)/sizeof(*pow2); j++)
-    if (pow2[j] >= i) return pow2[j];
-  abort();  /* too big! */
-}
-
-
 /* Given a Pixmap (of screen depth), converts it to an OpenGL luminance mipmap.
    RGB are averaged to grayscale, and the resulting value is treated as alpha.
    Pass in the size of the pixmap; the size of the texture is returned
@@ -111,26 +98,13 @@ bitmap_to_texture (Display *dpy, Pixmap p, Visual *visual, int depth,
   Bool mipmap_p = True;
   int ow = *wP;
   int oh = *hP;
-  int w2 = to_pow2 (ow);
-  int h2 = to_pow2 (oh);
+  GLsizei w2 = (GLsizei) to_pow2 (ow);
+  GLsizei h2 = (GLsizei) to_pow2 (oh);
   int x, y, max, scale;
   XImage *image = 0;
   unsigned char *data = (unsigned char *) calloc (w2 * 2, (h2 + 1));
   unsigned char *out = data;
 
-  /* If either dimension is larger than the supported size, reduce.
-     We still return the old size to keep the caller's math working,
-     but the texture itself will have fewer pixels in it.
-   */
-  glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max);
-  scale = 1;
-  while (w2 > max || h2 > max)
-    {
-      w2 /= 2;
-      h2 /= 2;
-      scale *= 2;
-    }
-
   /* OpenGLES doesn't support GL_INTENSITY, so instead of using a
      texture with 1 byte per pixel, the intensity value, we have
      to use 2 bytes per pixel: solid white, and an alpha value.
@@ -139,20 +113,24 @@ bitmap_to_texture (Display *dpy, Pixmap p, Visual *visual, int depth,
 #  undef GL_INTENSITY
 # endif
 
-# ifdef GL_INTENSITY
-  GLuint iformat = GL_INTENSITY;
-  GLuint format  = GL_LUMINANCE;
-# else
-  GLuint iformat = GL_LUMINANCE_ALPHA;
-  GLuint format  = GL_LUMINANCE_ALPHA;
-# endif
-  GLuint type    = GL_UNSIGNED_BYTE;
-
 # ifdef HAVE_XSHM_EXTENSION
   Bool use_shm = get_boolean_resource (dpy, "useSHM", "Boolean");
   XShmSegmentInfo shm_info;
 # endif /* HAVE_XSHM_EXTENSION */
 
+  /* If either dimension is larger than the supported size, reduce.
+     We still return the old size to keep the caller's math working,
+     but the texture itself will have fewer pixels in it.
+   */
+  glGetIntegerv (GL_MAX_TEXTURE_SIZE, &max);
+  scale = 1;
+  while (w2 > max || h2 > max)
+    {
+      w2 /= 2;
+      h2 /= 2;
+      scale *= 2;
+    }
+
 # ifdef HAVE_XSHM_EXTENSION
   if (use_shm)
     {
@@ -165,8 +143,15 @@ bitmap_to_texture (Display *dpy, Pixmap p, Visual *visual, int depth,
     }
 # endif /* HAVE_XSHM_EXTENSION */
 
-  if (!image)
-    image = XGetImage (dpy, p, 0, 0, ow, oh, ~0L, ZPixmap);
+  if (!image) {
+    /* XCreateImage fills in (red|green_blue)_mask. XGetImage only does that
+       when reading from a Window, not when it's a Pixmap.
+     */
+    image = XCreateImage (dpy, visual, depth, ZPixmap, 0, NULL, ow, oh,
+                          BitmapPad (dpy), 0);
+    image->data = malloc (image->height * image->bytes_per_line);
+    XGetSubImage (dpy, p, 0, 0, ow, oh, ~0L, ZPixmap, image, 0, 0);
+  }
 
 # ifdef HAVE_JWZGLES
   /* This would work, but it's wasteful for no benefit. */
@@ -187,7 +172,7 @@ bitmap_to_texture (Display *dpy, Pixmap p, Visual *visual, int depth,
                              XGetPixel (image, sx, sy));
       /* instead of averaging all three channels, let's just use red,
          and assume it was already grayscale. */
-      unsigned long r = pixel & visual->red_mask;
+      unsigned long r = pixel & image->red_mask;
       /* This goofy trick is to make any of RGBA/ABGR/ARGB work. */
       pixel = ((r >> 24) | (r >> 16) | (r >> 8) | r) & 0xFF;
 
@@ -226,14 +211,30 @@ bitmap_to_texture (Display *dpy, Pixmap p, Visual *visual, int depth,
     destroy_xshm_image (dpy, image, &shm_info);
   else
 # endif /* HAVE_XSHM_EXTENSION */
+  {
+    /* We malloc'd image->data, so we free it. */
+    free (image->data);
+    image->data = NULL;
     XDestroyImage (image);
+  }
 
   image = 0;
 
-  if (mipmap_p)
-    gluBuild2DMipmaps (GL_TEXTURE_2D, iformat, w2, h2, format, type, data);
-  else
-    glTexImage2D (GL_TEXTURE_2D, 0, iformat, w2, h2, 0, format, type, data);
+  {
+# ifdef GL_INTENSITY
+    GLuint iformat = GL_INTENSITY;
+    GLuint format  = GL_LUMINANCE;
+# else
+    GLuint iformat = GL_LUMINANCE_ALPHA;
+    GLuint format  = GL_LUMINANCE_ALPHA;
+# endif
+    GLuint type    = GL_UNSIGNED_BYTE;
+
+    if (mipmap_p)
+      gluBuild2DMipmaps (GL_TEXTURE_2D, iformat, w2, h2, format, type, data);
+    else
+      glTexImage2D (GL_TEXTURE_2D, 0, iformat, w2, h2, 0, format, type, data);
+  }
 
   {
     char msg[100];
@@ -647,7 +648,16 @@ print_texture_string (texture_font_data *data, const char *string)
       tex_height = data->cache->tex_height;
     }
   else
-    string_to_texture (data, string, &overall, &tex_width, &tex_height);
+    {
+# if defined HAVE_JWXYZ && defined JWXYZ_GL
+      /* TODO, JWXYZ_GL: Mixing Xlib and GL has issues. */
+      memset (&overall, 0, sizeof(overall));
+      tex_width = 8;
+      tex_height = 8;
+# else
+      string_to_texture (data, string, &overall, &tex_width, &tex_height);
+# endif
+    }
 
   {
     int ofront, oblend;
index 53d8dd97b9d145be1cc6a167a461aeaf1b1a0935..1dd5065ddc86f1a5d479defd90fbdca10daf3fc0 100644 (file)
@@ -1031,14 +1031,7 @@ init_tunnel (ModeInfo *mi)
   wire = 0;
 # endif
 
-  if (!tconf) {
-    tconf = (tunnel_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (tunnel_configuration));
-    if (!tconf) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, tconf, NULL);
 
   tc = &tconf[MI_SCREEN(mi)];
 
index eed2fd54f775fa0522bbb19a2fcf54ed88613b02..ddf1eb1cd113c2cb6a5cfcaf7ba2af36c1aa72cc 100644 (file)
@@ -29,6 +29,7 @@ History
 #include <math.h>
 
 # define refresh_topBlock 0
+# define release_topBlock 0
 
 #define DEFAULTS       "*delay:        10000       \n" \
                        "*count:        30           \n" \
@@ -55,6 +56,10 @@ typedef struct
 {
   GLXContext *glx_context;
   trackball_state *trackball;
+  GLfloat rotateSpeed;
+  GLfloat dropSpeed;
+  int maxFalling;
+  int resolution;
   Bool button_down_p;
   int numFallingBlocks;
   GLfloat highest,highestFalling;
@@ -164,8 +169,8 @@ reshape_topBlock (ModeInfo *mi, int width, int height)
 }
 
 /* clean up on exit, not required ... */
-ENTRYPOINT void
-release_topBlock(ModeInfo *mi)
+static void
+free_topBlock(ModeInfo *mi)
 {
   topBlockSTATE *tb = &tbs[MI_SCREEN(mi)];
        NODE *llCurrent, *llOld;
@@ -184,11 +189,7 @@ init_topBlock (ModeInfo *mi)
   topBlockSTATE *tb;
   int wire = MI_IS_WIREFRAME(mi);
 
-  if (!tbs) {
-    tbs = (topBlockSTATE *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (topBlockSTATE));
-    if (!tbs) abort();
-  }
+  MI_INIT (mi, tbs, free_topBlock);
 
   tb = &tbs[MI_SCREEN(mi)];
 
@@ -204,27 +205,31 @@ init_topBlock (ModeInfo *mi)
        tb->carpetWidth = 8 * size;
        tb->carpetLength = tb->carpetWidth;
   
-  maxFalling*=size;
+  tb->maxFalling = maxFalling;
+  tb->maxFalling*=size;
 
        if (spawn<4) { spawn=4; }
        if (spawn>1000) { spawn=1000; }
 
-       if (rotateSpeed<1) {rotateSpeed=1; }
-       if (rotateSpeed>1000) {rotateSpeed=1000;}
-  rotateSpeed /= 100;
+       tb->rotateSpeed = rotateSpeed;
+       if (tb->rotateSpeed<1) {tb->rotateSpeed=1; }
+       if (tb->rotateSpeed>1000) {tb->rotateSpeed=1000;}
+  tb->rotateSpeed /= 100;
 
-       if (resolution<4) {resolution=4;}
-       if (resolution>20) {resolution=20;}
-  resolution*=2;
+       tb->resolution = resolution;
+       if (tb->resolution<4) {tb->resolution=4;}
+       if (tb->resolution>20) {tb->resolution=20;}
+  tb->resolution*=2;
 
        if (maxColors<1) {maxColors=1;}
        if (maxColors>8) {maxColors=8;}
 
-       if (dropSpeed<1) {dropSpeed=1;}
-       if (dropSpeed>9) {dropSpeed=9;} /* 10+ produces blocks that can pass through each other */
+       tb->dropSpeed = dropSpeed;
+       if (tb->dropSpeed<1) {tb->dropSpeed=1;}
+       if (tb->dropSpeed>9) {tb->dropSpeed=9;} /* 10+ produces blocks that can pass through each other */
   
-       dropSpeed = 80/dropSpeed;
-       dropSpeed = (blockHeight/dropSpeed); 
+       tb->dropSpeed = 80/tb->dropSpeed;
+       tb->dropSpeed = (blockHeight/tb->dropSpeed);
 
   reshape_topBlock (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
   glClearDepth(1.0f);
@@ -303,7 +308,7 @@ draw_topBlock (ModeInfo *mi)
 
        generateNewBlock(mi);
 
-       if (rotate && (!tb->button_down_p)) { tb->rotation += rotateSpeed; } 
+       if (rotate && (!tb->button_down_p)) { tb->rotation += tb->rotateSpeed; }
        if (tb->rotation>=360) { tb->rotation=tb->rotation-360; } 
 
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);             /* clear current */
@@ -409,7 +414,7 @@ draw_topBlock (ModeInfo *mi)
            spcN2y = 0;
                        if (llCurrent->height>tb->highestFalling) {tb->highestFalling=llCurrent->height;}
                        /* all blocks fall at the same rate to avoid mid air collisions */
-                       llCurrent->height-=dropSpeed;
+                       llCurrent->height-=tb->dropSpeed;
                        if (llCurrent->height<=0) {
                                llCurrent->falling=0;
                                if (tb->highest==0) { 
@@ -498,7 +503,7 @@ draw_topBlock (ModeInfo *mi)
   if (mi->fps_p) do_fps (mi);
   glFinish();
 
-       if (tb->highest>(5*maxFalling)) { drawCarpet=False; }
+       if (tb->highest>(5*tb->maxFalling)) { drawCarpet=False; }
   glXSwapBuffers(dpy, window);
 }
 
@@ -584,7 +589,7 @@ static void generateNewBlock(ModeInfo *mi)
                   llTail = llCurrent;
                   tb->blockNodeRoot = llCurrent; 
                } else {
-                       if (tb->numFallingBlocks>=maxFalling) {
+                       if (tb->numFallingBlocks>=tb->maxFalling) {
                                /* recycle */
                                llCurrent=llTail->next;
                                tb->blockNodeRoot=llCurrent->next;
@@ -622,7 +627,7 @@ static void generateNewBlock(ModeInfo *mi)
                llCurrent->y=(startOffy-(tb->carpetLength/2)) + getLocation(random() % ((tb->carpetLength/2)+endOffy) );
                llCurrent->color=(random() % maxColors);
                llCurrent->height=getHeight(tb->plusheight+tb->highest); 
-               if (tb->numFallingBlocks>=maxFalling) {
+               if (tb->numFallingBlocks>=tb->maxFalling) {
                        tb->numFallingBlocks--;
                        tb->numFallingBlocks--;
                } 
@@ -702,7 +707,7 @@ static void buildCarpet(ModeInfo *mi)
                           tb->carpet_polys += tube(0, 0, -0.1,
                                                    0, 0, 0.26,
                                                    cylSize, 0,
-                                                   resolution, True, True,
+                                                   tb->resolution, True, True,
                                                    wire);
                           glRotatef(180, 0.0f, 1.0f, 0.0f); /* they are upside down */
                           glRotatef(180, 0.0f, 1.0f, 0.0f); /* recover */
@@ -758,7 +763,7 @@ static void buildBlock(ModeInfo *mi)
                           tb->block_polys += tube(0, 0, 0,
                                                   0, 0, 0.25,
                                                   cylSize, 0,
-                                                  resolution, True, True, 
+                                                  tb->resolution, True, True,
                                                   wire);
                                glTranslatef(0.0f,0.0f,0.25f);                  /* move to the cylinder cap  */
                                glTranslatef(0.0f,0.0f,-0.25f);                 /* move back from the cylinder cap  */
@@ -778,7 +783,7 @@ static void buildBlock(ModeInfo *mi)
                   tb->block_polys += tube(0, 0, 0.1,
                                           0, 0, 1.4,
                                           uddSize, 0,
-                                          resolution, True, True, wire);
+                                          tb->resolution, True, True, wire);
                   glTranslatef(0.0f,-1.0f,0.0f);               /* move to the center */        
                }
        }
@@ -798,11 +803,11 @@ static void buildBlobBlock(ModeInfo *mi)
        glNewList(tb->block,GL_COMPILE);
        glPushMatrix();
   glScalef(1.4,1.4,1.4);
-  unit_sphere (resolution/2,resolution, wire);
+  unit_sphere (tb->resolution/2,tb->resolution, wire);
   glPopMatrix();
   glTranslatef(0.0f,-2.0f,0.0f);
   glScalef(1.4,1.4,1.4);
-  unit_sphere (resolution/2,resolution, wire);
+  unit_sphere (tb->resolution/2,tb->resolution, wire);
        glEndList();    
 }
 
index 2571964ff82e2159cd749027ba3b3045b1105b3d..832d329d1d65cec4f7f2e2fd75df03aa601c7b08 100644 (file)
@@ -407,14 +407,7 @@ init_bit (ModeInfo *mi)
   bit_configuration *bp;
   int i;
 
-  if (!bps) {
-    bps = (bit_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (bit_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 6a42a274cc92290fff757b6787414086299f32b1..dae95f1bd5b5272c745c7ba3c59ff9cd5b19a8de 100644 (file)
@@ -1,4 +1,4 @@
-/* unicrud, Copyright (c) 2016 Jamie Zawinski <jwz@jwz.org>
+/* unicrud, Copyright (c) 2016-2017 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
@@ -33,6 +33,7 @@
 #define DEF_WANDER      "True"
 #define DEF_SPEED       "1.0"
 #define DEF_BLOCK       "ALL"
+#define DEF_TITLES      "True"
 
 typedef struct {
   GLXContext *glx_context;
@@ -56,6 +57,7 @@ static Bool do_spin;
 static GLfloat speed;
 static Bool do_wander;
 static char *do_block;
+static Bool do_titles;
 
 static XrmOptionDescRec opts[] = {
   { "-spin",   ".spin",   XrmoptionNoArg, "True" },
@@ -64,6 +66,8 @@ static XrmOptionDescRec opts[] = {
   { "+wander", ".wander", XrmoptionNoArg, "False" },
   { "-speed",  ".speed",  XrmoptionSepArg, 0 },
   { "-block",  ".block",  XrmoptionSepArg, 0 },
+  { "-titles", ".titles", XrmoptionNoArg, "True"  },
+  { "+titles", ".titles", XrmoptionNoArg, "False" },
 };
 
 static argtype vars[] = {
@@ -71,6 +75,7 @@ static argtype vars[] = {
   {&do_wander, "wander", "Wander", DEF_WANDER, t_Bool},
   {&speed,     "speed",  "Speed",  DEF_SPEED,  t_Float},
   {&do_block,  "block",  "Block",  DEF_BLOCK,  t_String},
+  {&do_titles, "titles", "Titles", DEF_TITLES, t_Bool},
 };
 
 ENTRYPOINT ModeSpecOpt unicrud_opts = {countof(opts), opts, countof(vars), vars, NULL};
@@ -529,10 +534,10 @@ static const struct {
 };
 
 
-static char 
-*strip (char *s)
+static char *
+strip (char *s)
 {
-  int L;
+  unsigned long L;
   while (*s == ' ' || *s == '\t' || *s == '\n')
     s++;
   L = strlen (s);
@@ -625,7 +630,6 @@ pick_unichar (ModeInfo *mi)
   {
     XCharStruct e;
     char text[10];
-    int i;
     i = utf8_encode (bp->unichar, text, sizeof(text) - 1);
     text[i] = 0;
     texture_string_metrics (bp->char_font, text, &e, 0, 0);
@@ -685,9 +689,10 @@ draw_unichar (ModeInfo *mi)
   print_texture_string (bp->char_font, text);
 
   glColor3f (1, 1, 0);
-  print_texture_label (mi->dpy, bp->title_font,
-                       mi->xgwa.width, mi->xgwa.height,
-                       1, title);
+  if (do_titles)
+    print_texture_label (mi->dpy, bp->title_font,
+                         mi->xgwa.width, mi->xgwa.height,
+                         1, title);
 }
 
 
@@ -752,14 +757,7 @@ init_unicrud (ModeInfo *mi)
 {
   unicrud_configuration *bp;
 
-  if (!bps) {
-    bps = (unicrud_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (unicrud_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
index 54dfdda0ba556c7589bf0cfb77ca20ad176dc877..694ea0636c2882febd8f35135be597bf418ff17f 100644 (file)
@@ -10,6 +10,7 @@ unicrud - Bounces a random Unicode character on the screen.
 [\-delay \fInumber\fP]
 [\-speed \fInumber\fP]
 [\-block \fIstring\fP]
+[\-no-titles]
 [\-no-wander]
 [\-no-roll]
 [\-fps]
@@ -34,6 +35,9 @@ Per-frame delay, in microseconds.  Default: 20000 (0.02 seconds).
 .B \-speed \fInumber\fP
 Animation speed.  2.0 means twice as fast, 0.5 means half as fast.
 .TP 8
+.B \-titles | \-no-titles
+Whether to describe the character being shown. Default true.
+.TP 8
 .B \-wander | \-no-wander
 Whether the object should wander around the screen.
 .TP 8
index 236fd8e6bd5ddcd57694a52731409c4f4a1c32e1..eac67f44ae74c5c6f828fc097b3fc10936eb89ca 100644 (file)
@@ -175,14 +175,7 @@ init_unk (ModeInfo *mi)
 {
   unk_configuration *bp;
 
-  if (!bps) {
-    bps = (unk_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (unk_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, NULL);
 
   bp = &bps[MI_SCREEN(mi)];
 
diff --git a/hacks/glx/vigilance.c b/hacks/glx/vigilance.c
new file mode 100644 (file)
index 0000000..e276bd7
--- /dev/null
@@ -0,0 +1,1140 @@
+/* vigilance, Copyright (c) 2017 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 surveillance cameras, taking an interest in their surroundings.
+ */
+
+#define DEFAULTS       "*delay:        20000       \n" \
+                       "*count:        5           \n" \
+                       "*showFPS:      False       \n" \
+                       "*wireframe:    False       \n" \
+                       "*bodyColor:    #666666"   "\n" \
+                       "*capColor:     #FFFFFF"   "\n" \
+                       "*hingeColor:   #444444"   "\n" \
+                       "*mountColor:   #444444"   "\n" \
+                       "*lensColor:    #000000"   "\n" \
+                       "*groundColor:  #004400"   "\n" \
+
+# define refresh_camera 0
+# define release_camera 0
+#undef countof
+#define countof(x) (sizeof((x))/sizeof((*x)))
+
+#define DEF_SPEED       "1.0"
+#define DEF_CAMERA_SIZE "1.0"
+
+#include "xlockmore.h"
+#include "gltrackball.h"
+#include "xpm-ximage.h"
+#include "normals.h"
+
+#include <ctype.h>
+
+#ifdef USE_GL /* whole file */
+
+#undef ABS
+#define ABS(x) ((x)<0?-(x):(x))
+#undef MAX
+#define MAX(A,B) ((A)>(B)?(A):(B))
+#undef MIN
+#define MIN(A,B) ((A)<(B)?(A):(B))
+#undef BELLRAND
+#define BELLRAND(n) ((frand((n)) + frand((n)) + frand((n))) / 3)
+
+#include "gllist.h"
+
+extern const struct gllist
+  *seccam_body, *seccam_cap, *seccam_hinge, *seccam_pipe, *seccam_lens;
+static struct gllist *ground = 0;
+
+static const struct gllist * const *all_objs[] = {
+  &seccam_body, &seccam_cap, &seccam_hinge, &seccam_pipe, &seccam_lens,
+  (const struct gllist * const *) &ground
+};
+
+#define CAMERA_BODY    0
+#define CAMERA_CAP     1
+#define CAMERA_HINGE   2
+#define CAMERA_MOUNT   3
+#define CAMERA_LENS    4
+#define GROUND         5
+
+#define BEAM_ZOFF 0.185        /* distance from origin to lens in model */
+
+typedef enum { IDLE, WARM_UP, ZOT, COOL_DOWN } camera_state;
+
+
+typedef struct {
+  XYZ pos;
+  GLfloat facing;              /* rotation around vertical axis, degrees */
+  GLfloat pitch;               /* front/back tilt, degrees */
+  GLfloat velocity;            /* most recent angular velocity, degrees */
+  long focus_id;               /* pedestrian or camera of interest */
+  XYZ focus;                   /* point of interest */
+  camera_state state;
+  GLfloat tick;
+} camera;
+
+typedef struct pedestrian pedestrian;
+struct pedestrian {
+  long id;
+  XYZ pos;
+  GLfloat length;
+  GLfloat frequency, amplitude;
+  GLfloat ratio;
+  GLfloat speed;
+  pedestrian *next;
+};
+
+typedef struct {
+  GLXContext *glx_context;
+  trackball_state *user_trackball;
+  Bool button_down_p;
+
+  GLuint *dlists;
+  GLfloat component_colors[countof(all_objs)][4];
+
+  int ncameras;
+  camera *cameras;
+  pedestrian *pedestrians;
+} camera_configuration;
+
+static camera_configuration *bps = NULL;
+
+static GLfloat speed_arg;
+#ifdef DEBUG
+static int debug_p;
+#endif
+
+static XrmOptionDescRec opts[] = {
+  { "-speed",      ".speed",     XrmoptionSepArg, 0 },
+#ifdef DEBUG
+  {"-debug",       ".debug",     XrmoptionNoArg, "True" },
+  {"+debug",       ".debug",     XrmoptionNoArg, "False" },
+#endif
+};
+
+static argtype vars[] = {
+  {&speed_arg,   "speed",      "Speed",     DEF_SPEED,      t_Float},
+#ifdef DEBUG
+  {&debug_p,     "debug",      "Debug",     "False",        t_Bool},
+#endif
+};
+
+ENTRYPOINT ModeSpecOpt camera_opts = {
+  countof(opts), opts, countof(vars), vars, NULL};
+
+
+ENTRYPOINT void
+reshape_camera (ModeInfo *mi, int width, int height)
+{
+  GLfloat h = (GLfloat) height / (GLfloat) width;
+  glViewport (0, 0, width, height);
+  glMatrixMode(GL_PROJECTION);
+  glLoadIdentity();
+  gluPerspective (30.0, 1/h, 1.0, 200);
+  glMatrixMode(GL_MODELVIEW);
+  glLoadIdentity();
+  gluLookAt( 0, 0, 30,
+             0, 0, 0,
+             0, 1, 0);
+
+# ifdef HAVE_MOBILE    /* Keep it the same relative size when rotated. */
+  {
+    int o = (int) current_device_rotation();
+    if (o != 0 && o != 180 && o != -180)
+      glScalef (1/h, 1/h, 1/h);
+  }
+# endif
+
+  glClear(GL_COLOR_BUFFER_BIT);
+}
+
+
+ENTRYPOINT Bool
+camera_handle_event (ModeInfo *mi, XEvent *event)
+{
+  camera_configuration *bp = &bps[MI_SCREEN(mi)];
+
+  if (gltrackball_event_handler (event, bp->user_trackball,
+                                 MI_WIDTH (mi), MI_HEIGHT (mi),
+                                 &bp->button_down_p))
+    return True;
+  else if (event->xany.type == KeyPress)
+    {
+      KeySym keysym;
+      char c = 0;
+      XLookupString (&event->xkey, &c, 1, &keysym, 0);
+      if (c == ' ' || c == '\t')
+        {
+          int i;
+          if (bp->cameras[0].state == IDLE && bp->pedestrians)
+            for (i = 0; i < bp->ncameras; i++)
+              {
+                bp->cameras[i].state = WARM_UP;
+                bp->cameras[i].tick  = 1.0;
+              }
+          return True;
+        }
+    }
+
+  return False;
+}
+
+
+static int draw_ground (ModeInfo *, GLfloat color[4]);
+
+static void
+parse_color (ModeInfo *mi, char *key, GLfloat color[4])
+{
+  XColor xcolor;
+  char *string = get_string_resource (mi->dpy, key, "CameraColor");
+  if (!XParseColor (mi->dpy, mi->xgwa.colormap, string, &xcolor))
+    {
+      fprintf (stderr, "%s: unparsable color in %s: %s\n", progname,
+               key, string);
+      exit (1);
+    }
+
+  color[0] = xcolor.red   / 65536.0;
+  color[1] = xcolor.green / 65536.0;
+  color[2] = xcolor.blue  / 65536.0;
+  color[3] = 1;
+}
+
+
+ENTRYPOINT void 
+init_camera (ModeInfo *mi)
+{
+  camera_configuration *bp;
+  int wire = MI_IS_WIREFRAME(mi);
+  int i;
+  MI_INIT (mi, bps, 0);
+
+  bp = &bps[MI_SCREEN(mi)];
+
+  bp->glx_context = init_GL(mi);
+
+  reshape_camera (mi, MI_WIDTH(mi), MI_HEIGHT(mi));
+
+  glShadeModel(GL_SMOOTH);
+
+  glEnable(GL_DEPTH_TEST);
+  glEnable(GL_NORMALIZE);
+  glEnable(GL_CULL_FACE);
+
+  if (!wire)
+    {
+      GLfloat pos[4] = {0.4, 0.2, 0.4, 0.0};
+      GLfloat amb[4] = {0.2, 0.2, 0.2, 1.0};
+      GLfloat dif[4] = {1.0, 1.0, 1.0, 1.0};
+      GLfloat spc[4] = {1.0, 1.0, 1.0, 1.0};
+
+      glEnable(GL_LIGHTING);
+      glEnable(GL_LIGHT0);
+      glEnable(GL_DEPTH_TEST);
+      glEnable(GL_CULL_FACE);
+
+      glLightfv(GL_LIGHT0, GL_POSITION, pos);
+      glLightfv(GL_LIGHT0, GL_AMBIENT,  amb);
+      glLightfv(GL_LIGHT0, GL_DIFFUSE,  dif);
+      glLightfv(GL_LIGHT0, GL_SPECULAR, spc);
+    }
+
+  bp->user_trackball = gltrackball_init (False);
+
+  bp->dlists = (GLuint *) calloc (countof(all_objs)+1, sizeof(GLuint));
+  for (i = 0; i < countof(all_objs); i++)
+    bp->dlists[i] = glGenLists (1);
+
+  for (i = 0; i < countof(all_objs); i++)
+    {
+      const struct gllist *gll = *all_objs[i];
+      char *key = 0;
+      GLfloat spec1[4] = {1.00, 1.00, 1.00, 1.0};
+      GLfloat spec2[4] = {0.40, 0.40, 0.70, 1.0};
+      GLfloat *spec = spec1;
+      GLfloat shiny = 20;
+
+      glNewList (bp->dlists[i], GL_COMPILE);
+
+      glMatrixMode(GL_MODELVIEW);
+      glPushMatrix();
+      glMatrixMode(GL_TEXTURE);
+      glPushMatrix();
+      glMatrixMode(GL_MODELVIEW);
+
+      glRotatef (-90, 1, 0, 0);
+      glRotatef (180, 0, 0, 1);
+      glScalef (6, 6, 6);
+
+      glBindTexture (GL_TEXTURE_2D, 0);
+
+      switch (i) {
+      case CAMERA_BODY:  key = "bodyColor";   break;
+      case CAMERA_CAP:   key = "capColor";    break;
+      case CAMERA_HINGE: key = "hingeColor";  break;
+      case CAMERA_MOUNT: key = "mountColor";  break;
+      case CAMERA_LENS:  key = "lensColor";   spec = spec2; break;
+      case GROUND:       key = "groundColor"; spec = spec2; shiny = 128; break;
+      default: abort(); break;
+      }
+
+      parse_color (mi, key, bp->component_colors[i]);
+
+      glMaterialfv (GL_FRONT_AND_BACK, GL_SPECULAR,  spec);
+      glMaterialf  (GL_FRONT_AND_BACK, GL_SHININESS, shiny);
+
+      switch (i) {
+      case GROUND:
+        if (! ground)
+          ground = (struct gllist *) calloc (1, sizeof(*ground));
+        ground->points = draw_ground (mi, bp->component_colors[i]);
+        break;
+      default:
+        renderList (gll, wire);
+        /* glColor3f (1, 1, 1); renderListNormals (gll, 100, True); */
+        /* glColor3f (1, 1, 0); renderListNormals (gll, 100, False); */
+        break;
+      }
+
+      glMatrixMode(GL_TEXTURE);
+      glPopMatrix();
+      glMatrixMode(GL_MODELVIEW);
+      glPopMatrix();
+
+      glEndList ();
+    }
+
+  bp->ncameras = MI_COUNT(mi);
+  if (bp->ncameras <= 0) bp->ncameras = 1;
+  bp->cameras = (camera *) calloc (bp->ncameras, sizeof (camera));
+
+  {
+    GLfloat range = (MI_COUNT(mi) <= 2) ? 4 : 5.5;
+    GLfloat extent;
+    GLfloat spacing = range / bp->ncameras;
+    if (spacing < 0.7) spacing = 0.7;
+    extent = spacing * (bp->ncameras - 1);
+    for (i = 0; i < bp->ncameras; i++)
+      {
+        camera *c = &bp->cameras[i];
+        c->state = IDLE;
+        c->pos.x = i*spacing - extent/2;
+        c->pos.z += 0.7;
+        if (spacing < 1.6)
+          c->pos.z = (i & 1 ? 1.1 : -0.3);
+        c->focus.x = c->pos.x;
+        c->focus.y = c->pos.y + 1;
+        c->focus.z = c->pos.z + BEAM_ZOFF;
+        c->pitch   = -50;
+      }
+  }
+
+
+# ifdef DEBUG
+  if (!debug_p)
+# endif
+    /* Let's tilt the floor a little. */
+    gltrackball_reset (bp->user_trackball,
+                       -0.70 + frand(1.58),
+                       -0.30 + frand(0.40));
+}
+
+
+static XYZ
+normalize (XYZ p)
+{
+  GLfloat d = sqrt(p.x*p.x + p.y*p.y * p.z*p.z);
+  if (d < 0.0000001)
+    p.x = p.y = p.z = 0;
+  else
+    {
+      p.x /= d;
+      p.y /= d;
+      p.z /= d;
+    }
+    
+  return p;
+}
+
+
+static GLfloat
+vector_angle (XYZ a, XYZ b)
+{
+  double La = sqrt (a.x*a.x + a.y*a.y + a.z*a.z);
+  double Lb = sqrt (b.x*b.x + b.y*b.y + b.z*b.z);
+  double cc, angle;
+
+  if (La == 0 || Lb == 0) return 0;
+  if (a.x == b.x && a.y == b.y && a.z == b.z) return 0;
+
+  /* dot product of two vectors is defined as:
+       La * Lb * cos(angle between vectors)
+     and is also defined as:
+       ax*bx + ay*by + az*bz
+     so:
+      La * Lb * cos(angle) = ax*bx + ay*by + az*bz
+      cos(angle)  = (ax*bx + ay*by + az*bz) / (La * Lb)
+      angle = acos ((ax*bx + ay*by + az*bz) / (La * Lb));
+  */
+  cc = (a.x*b.x + a.y*b.y + a.z*b.z) / (La * Lb);
+  if (cc > 1) cc = 1;  /* avoid fp rounding error (1.000001 => sqrt error) */
+  angle = acos (cc);
+
+  return (angle);
+}
+
+
+static int
+draw_component (ModeInfo *mi, int i, GLfloat color[4])
+{
+  camera_configuration *bp = &bps[MI_SCREEN(mi)];
+  if (! color)
+    color = bp->component_colors[i];
+  glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color);
+  glCallList (bp->dlists[i]);
+  return (*all_objs[i])->points / 3;
+}
+
+
+static int
+draw_double_component (ModeInfo *mi, int i)
+{
+  int count = draw_component (mi, i, 0);
+
+  glFrontFace(GL_CCW);
+  glScalef (1, 1, -1);
+  count += draw_component (mi, i, 0);
+  glScalef (1, 1, -1);
+  glFrontFace(GL_CW);
+  return count;
+}
+
+
+static int
+draw_ray (ModeInfo *mi, camera *c)
+{
+  int wire = MI_IS_WIREFRAME(mi);
+  int count = 0;
+  GLfloat length = 10000;
+  GLfloat thickness = 0.08;
+  int i;
+
+  glPushMatrix();
+  glTranslatef (c->pos.x, c->pos.y, c->pos.z + BEAM_ZOFF);
+  glRotatef (-c->facing, 0, 0, 1);
+  glRotatef ( c->pitch,  1, 0, 0);
+  glRotatef (frand(90),  0, 1, 0);
+  glScalef (thickness, length, thickness);
+  glDisable (GL_LIGHTING);
+
+  for (i = 0; i < 5; i++)
+    {
+      glColor4f (1, 0, 0, 0.1 + (i * 0.18));
+      glBegin (wire ? GL_LINE_LOOP : GL_QUADS);
+      glVertex3f (0, 0, -0.5); glVertex3f (0, 0,  0.5);
+      glVertex3f (0, 1,  0.5); glVertex3f (0, 1, -0.5);
+      glEnd();
+      count++;
+      glBegin (wire ? GL_LINE_LOOP : GL_QUADS);
+      glVertex3f (-0.5, 0, 0); glVertex3f ( 0.5, 0, 0);
+      glVertex3f ( 0.5, 1, 0); glVertex3f (-0.5, 1, 0);
+      glEnd();
+      count++;
+      glBegin (wire ? GL_LINE_LOOP : GL_QUADS);
+      glVertex3f (0, 1, -0.5); glVertex3f (0, 1,  0.5);
+      glVertex3f (0, 0,  0.5); glVertex3f (0, 0, -0.5);
+      glEnd();
+      count++;
+      glBegin (wire ? GL_LINE_LOOP : GL_QUADS);
+      glVertex3f (-0.5, 1, 0); glVertex3f ( 0.5, 1, 0);
+      glVertex3f ( 0.5, 0, 0); glVertex3f (-0.5, 0, 0);
+      glEnd();
+      count++;
+      glScalef (0.7, 1, 0.7);
+    }
+  if (!MI_IS_WIREFRAME(mi))
+    glEnable (GL_LIGHTING);
+  glPopMatrix();
+  return count;
+}
+
+
+static int
+draw_camera_1 (ModeInfo *mi, camera *c)
+{
+  int count = 0;
+  GLfloat scale = 0.01;
+  GLfloat color[4] = { 1, 0, 0, 1 };
+  glPushMatrix();
+
+  glTranslatef (c->pos.x, c->pos.y, c->pos.z);
+  glScalef (scale, scale, scale);
+
+  glRotatef (90, 1, 0, 0);
+  glRotatef (-90, 0, 1, 0);
+
+  count += draw_double_component (mi, CAMERA_MOUNT);
+
+  glRotatef (-c->facing, 0, 1, 0);
+  glRotatef (-c->pitch,  0, 0, 1);
+
+  count += draw_double_component (mi, CAMERA_HINGE);
+
+  if (c->state == WARM_UP)
+    {
+      if (c->tick < 0.2)
+        glTranslatef ((0.2 - c->tick) / (scale * 3), 0, 0);
+    }
+
+  if (c->state == ZOT)
+    {
+      glTranslatef ((0.005 - frand(0.01)) / scale,
+                    (0.005 - frand(0.01)) / scale,
+                    (0.005 - frand(0.01)) / scale);
+    }
+
+  count += draw_double_component (mi, CAMERA_BODY);
+
+  if (c->state == ZOT)
+    {
+      glTranslatef ((0.005 - frand(0.01)) / scale,
+                    (0.005 - frand(0.01)) / scale,
+                    (0.005 - frand(0.01)) / scale);
+    }
+
+  count += draw_double_component (mi, CAMERA_CAP);
+
+  switch (c->state) {
+  case IDLE:      break;
+  case WARM_UP:   color[0] = 1.0 - c->tick; break;
+  case ZOT:       color[0] = 1.0;           break;
+  case COOL_DOWN: color[0] = c->tick;       break;
+  default: abort(); break;
+  }
+
+  count += draw_component (mi, CAMERA_LENS, 
+                           (c->state == IDLE ? 0 : color));
+
+# ifdef DEBUG
+  if (debug_p && c->state != ZOT)
+    {
+      glDisable (GL_LIGHTING);
+      glColor3f (1, 1, 0);
+      glBegin (GL_LINES);
+      glVertex3f (0, BEAM_ZOFF / scale, 0);
+      glVertex3f (-100 / scale, BEAM_ZOFF / scale, 0);
+      glEnd();
+      if (!MI_IS_WIREFRAME(mi))
+        glEnable (GL_LIGHTING);
+    }
+# endif
+
+  glPopMatrix();
+
+  return count;
+}
+
+
+/* The position this pedestrian would appear at during the given ratio
+   through its life cycle.
+ */
+static XYZ
+pedestrian_position (pedestrian *p, GLfloat ratio)
+{
+  XYZ pos = p->pos;
+  if (p->speed < 0)
+    ratio = 1-ratio;
+  pos.x += p->length * ratio;
+  pos.z += sin (M_PI * ratio * p->frequency * 2) * p->amplitude
+    + p->amplitude/2;
+  return pos;
+}
+
+
+static int
+draw_pedestrian (ModeInfo *mi, pedestrian *p)
+{
+  int count = 0;
+# ifdef DEBUG
+  if (debug_p)
+    {
+      GLfloat r;
+      GLfloat step = 0.001;
+      glDisable (GL_LIGHTING);
+      glColor3f (0, 0, 1);
+
+      glBegin (GL_LINE_STRIP);
+      glVertex3f (p->pos.x, p->pos.y, p->pos.z + p->amplitude);
+      glVertex3f (p->pos.x, p->pos.y, 0);
+      glVertex3f (p->pos.x + p->length, p->pos.y, 0);
+      glVertex3f (p->pos.x + p->length, p->pos.y, p->pos.z + p->amplitude);
+      glEnd();
+
+      glBegin (GL_LINE_STRIP);
+      for (r = 0; r <= 1; r += step)
+        {
+          XYZ pos = pedestrian_position (p, r);
+          glVertex3f (pos.x, pos.y, pos.z);
+          count++;
+          if (p->ratio >= r && p->ratio < r + step)
+            {
+              glVertex3f (pos.x, pos.y, pos.z - p->amplitude);
+              glVertex3f (pos.x, pos.y, pos.z + p->amplitude);
+              glVertex3f (pos.x, pos.y, pos.z);
+              count++;
+            }
+        }
+      glEnd();
+      if (!MI_IS_WIREFRAME(mi))
+        glEnable (GL_LIGHTING);
+    }
+# endif
+  return count;
+}
+
+
+/* Start someone walking through the scene.
+ */
+static void
+add_pedestrian (ModeInfo *mi)
+{
+  camera_configuration *bp = &bps[MI_SCREEN(mi)];
+  pedestrian *p = (pedestrian *) calloc (1, sizeof(*p));
+  static int id = 100;
+  p->id = id++;
+  p->length = 35;
+  p->ratio = 0;
+  p->pos.x = -p->length/2;
+  p->pos.y = 3 + frand(10);
+  p->pos.z = -1.5 + frand(4) + ((random() % 10) ? 0 : frand(8));
+  p->frequency = 4 + frand(4);
+  p->amplitude = 0.1 + ((random() % 10) ? BELLRAND(0.45) : BELLRAND(1.5));
+  p->ratio = 0;
+  p->speed = ((4 + frand(4) + ((random() % 10) ? 0 : frand(10)))
+              * (random() & 1 ? 1 : -1)
+              * speed_arg);
+
+  if (bp->pedestrians)
+    {
+      pedestrian *p2;  /* add it to the end */
+      for (p2 = bp->pedestrians; p2->next; p2 = p2->next)
+        ;
+      p2->next = p;
+    }
+  else
+    {
+      p->next = bp->pedestrians;
+      bp->pedestrians = p;
+    }
+}
+
+
+static void
+free_pedestrian (ModeInfo *mi, pedestrian *p)
+{
+  camera_configuration *bp = &bps[MI_SCREEN(mi)];
+  Bool ok = False;
+  if (!p) abort();
+  if (p == bp->pedestrians)
+    {
+      bp->pedestrians = p->next;
+      ok = True;
+    }
+  else
+    {
+      pedestrian *p0;
+      for (p0 = bp->pedestrians; p0; p0 = p0->next)
+        if (p0->next == p)
+          {
+            p0->next = p0->next ? p0->next->next : 0;
+            ok = True;
+            break;
+          }
+    }
+  if (!ok) abort();
+  p->next = 0;
+  free (p);
+}
+
+
+static void
+tick_pedestrian (ModeInfo *mi, pedestrian *p)
+{
+  p->ratio += 0.001 * (p->speed > 0 ? p->speed : -p->speed);
+  if (p->ratio >= 1)
+    free_pedestrian (mi, p);
+}
+
+
+/* Extract the position of the thing this camera would like to look at.
+ */
+static void
+set_camera_focus (ModeInfo *mi, camera *c)
+{
+  camera_configuration *bp = &bps[MI_SCREEN(mi)];
+
+  if (c->focus_id > 0)         /* Look at pedestrian with id N */
+    {
+      long id = c->focus_id;
+      pedestrian *p;
+      for (p = bp->pedestrians; p; p = p->next)
+        if (p->id == id)
+          break;
+      if (p)
+        c->focus = pedestrian_position (p, p->ratio);
+      else
+        c->focus_id = 0;  /* that pedestrian has escaped */
+    }
+  else if (c->focus_id < 0)    /* Look at camera -N-1 */
+    {
+      long n = -c->focus_id - 1;
+      if (bp->ncameras > n)
+        c->focus = bp->cameras[n].pos;
+    }
+}
+
+
+static void
+tick_camera (ModeInfo *mi, camera *c)
+{
+  camera_configuration *bp = &bps[MI_SCREEN(mi)];
+
+  GLfloat X, Y, Z;
+  set_camera_focus (mi, c);
+
+  X = c->focus.x - c->pos.x;
+  Y = c->focus.y - c->pos.y;
+  Z = c->focus.z - c->pos.z - BEAM_ZOFF;
+
+  if (X != 0 || Y != 0)
+    {
+      GLfloat ofacing = c->facing;
+      GLfloat opitch  = c->pitch;
+
+      GLfloat target_facing = atan2 (X, Y) * (180 / M_PI);
+      GLfloat target_pitch  = atan2 (Z, sqrt(X*X + Y*Y)) * (180 / M_PI);
+
+      /* Adjust the current velocity.
+         If we are nearing the target, slow down (but don't stop).
+         Otherwise, speed up (but don't break the speed limit).
+       */
+      {
+        GLfloat accel = 0.5 * speed_arg;
+        GLfloat decel_range = 20;
+        GLfloat max_velocity = 5 * speed_arg;
+        GLfloat close_enough = 0.5 * speed_arg;
+
+        GLfloat dx = target_facing - c->facing;
+        GLfloat dy = target_pitch  - c->pitch;
+        GLfloat angular_distance = sqrt (dx*dx + dy*dy);
+
+        /* Split the velocity into vx and vy components.  This isn't
+           quite right since this treats them as Cartesian rather than
+           polar, but it's close enough.
+         */
+        GLfloat r = (dx == 0) ? 1 : ABS(dy) / ABS(dx);
+        GLfloat vx = 1-r;
+        GLfloat vy = r;
+
+        if (angular_distance < decel_range)  /* Nearing target, slow down */
+          {
+            c->velocity -= accel;
+            if (c->velocity <= 0)
+              c->velocity = accel;
+          }
+        else
+          {
+            c->velocity += accel;
+            if (c->velocity > max_velocity)
+              c->velocity = max_velocity;
+          }
+
+        /* Don't overshoot */
+        if (vx > ABS(dx)) vx = ABS(dx);
+        if (vy > ABS(dy)) vy = ABS(dy);
+
+
+        /* Rotate toward target by current angular velocity. */
+        c->facing += vx * c->velocity * (target_facing > c->facing ? 1 : -1);
+        c->pitch  += vy * c->velocity * (target_pitch  > c->pitch  ? 1 : -1);
+
+        /* If we are pointed *really close* to the target, just lock on,
+           to avoid twitchy overshoot rounding errors.
+         */
+        if (angular_distance < close_enough)
+          {
+            c->facing = target_facing;
+            c->pitch  = target_pitch;
+          }
+
+        /* Constrain to hinge's range of motion */
+        c->facing = MAX (-90, MIN (90, c->facing));
+        c->pitch  = MAX (-90, MIN (55, c->pitch));
+
+        /* After this motion, our prevailing velocity (for next time)
+           is the angular distance we actually moved.
+         */
+        dx = c->facing - ofacing;
+        dy = c->pitch  - opitch;
+        c->velocity = sqrt (dx*dx + dy*dy);
+      }
+    }
+
+# ifdef DEBUG
+  if (debug_p && 1)
+    /* Mark the point on which this camera is focusing. */
+    {
+      glPushMatrix();
+      glDisable (GL_LIGHTING);
+      glColor3f(0.3, 0.3, 0.3);
+      glBegin (GL_LINES);
+      glVertex3f (c->pos.x,   c->pos.y,   c->pos.z + BEAM_ZOFF);
+      glVertex3f (c->focus.x, c->focus.y, c->focus.z);
+      glEnd();
+      glColor3f(1,1,1);
+      glBegin (GL_LINES);
+      glVertex3f (c->focus.x-0.25, c->focus.y, c->focus.z);
+      glVertex3f (c->focus.x+0.25, c->focus.y, c->focus.z);
+      glVertex3f (c->focus.x, c->focus.y-0.25, c->focus.z);
+      glVertex3f (c->focus.x, c->focus.y+0.25, c->focus.z);
+      glVertex3f (c->focus.x, c->focus.y, c->focus.z-0.25);
+      glVertex3f (c->focus.x, c->focus.y, c->focus.z+0.25);
+      glEnd();
+      if (!MI_IS_WIREFRAME(mi))
+        glEnable (GL_LIGHTING);
+      glPopMatrix();
+    }
+# endif
+
+  /* If this camera is looking at another camera, get shy and look away
+     if the target sees us looking.
+   */
+  if (c->focus_id < 0)
+    {
+      camera *c2 = &bp->cameras[-1 - c->focus_id];
+      XYZ a, b;
+      GLfloat aa = c->facing / (180 / M_PI);
+      GLfloat bb = c->pitch  / (180 / M_PI);
+      GLfloat angle;
+
+      a.y = cos(aa)* cos(bb);
+      a.x = sin(aa)* cos(bb);
+      a.z = sin(bb);
+
+      aa = c2->facing / (180 / M_PI);
+      bb = c2->pitch  / (180 / M_PI);
+      b.y = cos(aa)* cos(bb);
+      b.x = sin(aa)* cos(bb);
+      b.z = sin(bb);
+
+      angle = vector_angle (normalize(a), normalize(b)) * (180 / M_PI);
+
+      if (angle > 100)
+        {
+          c->focus_id = 0;
+          /* Look "away" which means in the same direction. */
+          c->focus.x = c->pos.x + (c2->focus.x - c2->pos.x);
+          c->focus.y = c->pos.y + (c2->focus.y - c2->pos.y);
+          c->focus.z = c->pos.z + (c2->focus.z - c2->pos.z);
+          /* Look at either the sky or the ground.*/
+          c->focus.z = c->focus.x * (random() & 1 ? 1 : -1) * 5;
+          c->velocity = c2->velocity * 3;
+        }
+    }
+
+
+  /* Randomly pick some other things to look at.
+   */
+
+  if (c->state == IDLE &&
+      (c->focus_id <= 0
+       ? !(random() % (int) MAX (1, (50 / speed_arg)))
+       : !(random() % (int) MAX (1, (1000 / speed_arg)))))
+    {
+
+      /* Shiny! Start paying attention to something else. */
+
+      if ((bp->ncameras > 1 && !(random() % 20)))      /* look at a camera */
+        {
+          int which = random() % 4;
+          long i;
+          for (i = 0; i < bp->ncameras; i++)
+            if (c == &bp->cameras[i])
+              break;
+
+          /* Look at cameras 1 or 2 away in each direction, but not farther.
+             Since we arrange them in 2 staggered lines, those are the only
+             four that are in line of sight.
+           */
+          if (i >= 2 && which == 0)
+            which = i-2;
+          else if (i >= 1 && which == 1)
+            which = i-1;
+          else if (i < bp->ncameras-1 && which == 2)
+            which = i+2;
+          else /* (i < bp->ncameras-2 && which == 3) */
+            which = i+1;
+
+          c->focus_id = -1 - which;
+        }
+      else                                     /* look at a pedestrian */
+        {
+          int n = 0;
+          pedestrian *p;
+          for (p = bp->pedestrians; p; p = p->next)
+            n++;
+          if (n > 0)
+            {
+              n = random() % n;
+              p = bp->pedestrians;
+              while (n > 0 && p)
+                p = p->next;
+              if (p)
+                c->focus_id = p->id;
+            }
+        }
+    }
+
+  /* Run the animation */
+
+  if (c->state != IDLE)
+    {
+      pedestrian *p = bp->pedestrians; /* first one */
+      if (p) c->focus_id = p->id;
+
+      switch (c->state) {
+      case WARM_UP:   c->tick -= 0.01 * speed_arg; break;
+      case ZOT:       c->tick -= 0.006 * speed_arg; 
+        if (p) p->speed *= 0.995;  /* target takes 1d6 HP damage */
+        break;
+      case COOL_DOWN: c->tick -= 0.02 * speed_arg; break;
+      default: abort(); break;
+      }
+
+      if (c->tick <= 0)
+        {
+          c->tick = 1.0;
+          switch (c->state) {
+          case WARM_UP:   c->state = ZOT; break;
+          case ZOT:       c->state = COOL_DOWN;
+            c->focus_id = 0;
+            if (p) p->ratio = 1.0;  /* threat eliminated */
+            break;
+          case COOL_DOWN: c->state = IDLE; break;
+          default: abort(); break;
+          }
+        }
+    }
+
+  if (bp->cameras[0].state == IDLE &&
+      bp->pedestrians &&
+      bp->pedestrians[0].ratio < 0.3 &&
+      !(random() % MAX (1, (int) (50000 / speed_arg))))
+    {
+      /* CASE NIGHTMARE RED detected, engage SCORPION STARE by authority
+         of MAGINOT BLUE STARS. */
+      int i;
+      for (i = 0; i < bp->ncameras; i++)
+        {
+          bp->cameras[i].state = WARM_UP;
+          bp->cameras[i].tick  = 1.0;
+        }
+    }
+}
+
+
+static int
+draw_ground (ModeInfo *mi, GLfloat color[4])
+{
+  int wire = MI_IS_WIREFRAME(mi);
+  GLfloat i, j, k, h;
+
+  /* When using fog, iOS apparently doesn't like lines or quads that are
+     really long, and extend very far outside of the scene. Maybe?  If the
+     length of the line (cells * cell_size) is greater than 25 or so, lines
+     that are oriented steeply away from the viewer tend to disappear
+     (whether implemented as GL_LINES or as GL_QUADS).
+
+     So we do a bunch of smaller grids instead of one big one.
+  */
+  int cells = 20;
+  GLfloat cell_size = 0.4;
+  int points = 0;
+  int gridsw = 10;
+  int gridsh = 2;
+
+  glPushMatrix();
+
+  if (!wire)
+    {
+      GLfloat fog_color[4] = { 0, 0, 0, 1 };
+
+      glLineWidth (2);
+      glEnable (GL_LINE_SMOOTH);
+      glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
+      glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 
+      glEnable (GL_BLEND);
+
+      glFogi (GL_FOG_MODE, GL_EXP2);
+      glFogfv (GL_FOG_COLOR, fog_color);
+      glFogf (GL_FOG_DENSITY, 0.017);
+      glFogf (GL_FOG_START, -cells/2 * cell_size * gridsh);
+      glEnable (GL_FOG);
+    }
+
+  glColor4fv (color);
+  glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color);
+
+  glTranslatef (-cells * gridsw * cell_size / 2, 0, 0);
+  for (h = 0; h < 2; h++)
+    {
+      glPushMatrix();
+      glTranslatef (0, cells * cell_size / 2, 0);
+      for (j = 0; j < gridsh; j++)
+        {
+          glPushMatrix();
+          for (k = 0; k < gridsw; k++)
+            {
+              glBegin (GL_LINES);
+              for (i = -cells/2; i < cells/2; i++)
+                {
+                  GLfloat a = i * cell_size;
+                  GLfloat b = cells/2 * cell_size;
+                  glVertex3f (a, -b, 0); glVertex3f (a, b, 0); points++;
+                  glVertex3f (-b, a, 0); glVertex3f (b, a, 0); points++;
+                }
+              glEnd();
+              glTranslatef (cells * cell_size, 0, 0);
+            }
+          glPopMatrix();
+          glTranslatef (0, cells * cell_size, 0);
+        }
+      glPopMatrix();
+      glRotatef (90, 1, 0, 0);
+    }
+
+  if (!wire)
+    glDisable (GL_LINE_SMOOTH);
+
+  glPopMatrix();
+
+  return points;
+}
+
+
+ENTRYPOINT void
+draw_camera (ModeInfo *mi)
+{
+  camera_configuration *bp = &bps[MI_SCREEN(mi)];
+  Display *dpy = MI_DISPLAY(mi);
+  Window window = MI_WINDOW(mi);
+  GLfloat camera_size;
+  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 ();
+
+# ifdef HAVE_MOBILE
+  glRotatef (current_device_rotation(), 0, 0, 1);  /* right side up */
+# endif
+
+  gltrackball_rotate (bp->user_trackball);
+
+# ifdef HAVE_MOBILE
+  {
+    GLfloat s = 0.6;
+    glScalef (s, s, s);
+  }
+# endif
+
+# ifdef DEBUG
+  if (debug_p)
+    {
+      GLfloat s = 0.2;
+      glScalef (s, s, s);
+      glRotatef (30, 0, 1, 0);
+      glRotatef (15, 1, 0, 0);
+      glTranslatef (0, 0, -80);
+    }
+# endif
+
+  mi->polygon_count = 0;
+
+  camera_size = 5;
+
+  if (MI_COUNT(mi) <= 2)    /* re-frame the scene a little bit */
+    glTranslatef (0, -1, 7);
+  if (MI_COUNT(mi) >= 20)
+    glTranslatef (0, -1.5, -5);
+  if (MI_COUNT(mi) >= 40)
+    glTranslatef (0, 2, -15);
+
+  glScalef (camera_size, camera_size, camera_size);
+
+  /* +Z is toward sky; +X is toward the right along the back wall;
+     +Y is toward the viewer. */
+  glRotatef (-90, 1, 0, 0);
+  glScalef (1, -1, 1);
+
+  glPushMatrix();
+  glScalef (1/camera_size, 1/camera_size, 1/camera_size);
+  glTranslatef (0, -2.38, -8);  /* Move the ground down and back */
+  glCallList (bp->dlists[GROUND]);
+  mi->polygon_count += ground->points;
+
+  glPopMatrix();
+
+  {
+    pedestrian *p, *p2;
+    for (p = bp->pedestrians, p2 = p ? p->next : 0;
+         p;
+         p = p2, p2 = p2 ? p2->next : 0)
+      {
+        mi->polygon_count += draw_pedestrian (mi, p);
+        tick_pedestrian (mi, p);  /* might free p */
+      }
+
+    if (!bp->pedestrians || !(random() % MAX (1, (int) (200 / speed_arg))))
+      add_pedestrian (mi);
+  }
+
+  for (i = 0; i < bp->ncameras; i++)
+    {
+      camera *c = &bp->cameras[i];
+      mi->polygon_count += draw_camera_1 (mi, c);
+      tick_camera (mi, c);
+    }
+
+  for (i = 0; i < bp->ncameras; i++)
+    {
+      camera *c = &bp->cameras[i];
+      if (c->state == ZOT)  /* Do this last, for alpha blending */
+        mi->polygon_count += draw_ray (mi, c);
+    }
+
+  glPopMatrix ();
+
+  if (mi->fps_p) do_fps (mi);
+  glFinish();
+
+  glXSwapBuffers(dpy, window);
+}
+
+XSCREENSAVER_MODULE_2 ("Vigilance", vigilance, camera)
+
+#endif /* USE_GL */
diff --git a/hacks/glx/vigilance.man b/hacks/glx/vigilance.man
new file mode 100644 (file)
index 0000000..306950d
--- /dev/null
@@ -0,0 +1,57 @@
+.TH XScreenSaver 1 "" "X Version 11"
+.SH NAME
+vigilance - screen saver.
+.SH SYNOPSIS
+.B vigilance
+[\-display \fIhost:display.screen\fP]
+[\-visual \fIvisual\fP]
+[\-window]
+[\-root]
+[\-delay \fInumber\fP]
+[\-speed \fInumber\fP]
+[\-count \fInumber\fP]
+.SH DESCRIPTION
+A set of security cameras keep very careful track of their surroundings.
+You can trust them. Everything is completely under control.
+.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 \fInumber\fP
+Per-frame delay, in microseconds.  Default: 20000 (0.02 seconds).
+.TP 8
+.B \-speed \fInumber\fP
+Animation speed.  2.0 means twice as fast, 0.5 means half as fast.
+.TP 8
+.B \-count \fInumber\fP
+Number of cameras.  1 - 50.  Default: 5.
+.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 2017 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 ea700c303a176a97f31fb4ae474bf8aa3dd08262..3844d95719d69b89969d12d90cdc0f7933f51d04 100644 (file)
@@ -478,14 +478,7 @@ init_voronoi (ModeInfo *mi)
 {
   voronoi_configuration *vp;
 
-  if (!vps) {
-    vps = (voronoi_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (voronoi_configuration));
-    if (!vps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, vps, NULL);
 
   vp = &vps[MI_SCREEN(mi)];
 
index 603a1c40a94cecc77918ff0ccded75140bbbbda3..c90d07359687098ffe5db5f038213a6667c8b18e 100644 (file)
@@ -1,4 +1,4 @@
-/* winduprobot, Copyright (c) 2014, 2015 Jamie Zawinski <jwz@jwz.org>
+/* winduprobot, Copyright (c) 2014-2017 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
@@ -69,6 +69,7 @@
 #define WORDBUBBLES
 
 # define refresh_robot 0
+# define release_robot 0
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
@@ -237,7 +238,7 @@ reshape_robot (ModeInfo *mi, int width, int height)
 {
   GLfloat h = (GLfloat) height / (GLfloat) width;
 
-  glViewport (0, 0, (GLint) width, (GLint) height);
+  glViewport (0, 0, width, height);
 
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
@@ -245,7 +246,7 @@ reshape_robot (ModeInfo *mi, int width, int height)
 
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity();
-  gluLookAt( 0, 20, 30,
+  gluLookAt( 0, 0, 30,
              0, 0, 0,
              0, 1, 0);
 
@@ -343,6 +344,7 @@ load_textures (ModeInfo *mi)
 static int unit_gear (ModeInfo *, GLfloat color[4]);
 static int draw_ground (ModeInfo *, GLfloat color[4]);
 static void init_walker (ModeInfo *, walker *);
+static void free_robot (ModeInfo *mi);
 
 static void
 parse_color (ModeInfo *mi, char *key, GLfloat color[4])
@@ -369,14 +371,7 @@ init_robot (ModeInfo *mi)
   robot_configuration *bp;
   int wire = MI_IS_WIREFRAME(mi);
   int i;
-  if (!bps) {
-    bps = (robot_configuration *)
-      calloc (MI_NUM_SCREENS(mi), sizeof (robot_configuration));
-    if (!bps) {
-      fprintf(stderr, "%s: out of memory\n", progname);
-      exit(1);
-    }
-  }
+  MI_INIT (mi, bps, free_robot);
 
   bp = &bps[MI_SCREEN(mi)];
 
@@ -593,16 +588,13 @@ init_robot (ModeInfo *mi)
 
 # endif /* WORDBUBBLES */
 
-  /* Let's tilt the floor a little. */
 # ifdef DEBUG
   if (!debug_p)
 # endif
-    {
-      gltrackball_start (bp->user_trackball, 0, 500,  1000, 1000);
-      gltrackball_track (bp->user_trackball,
-                         0, 500 + (random() % 200) - 100,
-                         1000, 1000);
-    }
+    /* Let's tilt the floor a little. */
+    gltrackball_reset (bp->user_trackball,
+                       -0.6 + frand(1.2),
+                       -0.6 + frand(0.2));
 }
 
 
@@ -1683,10 +1675,20 @@ static int
 draw_ground (ModeInfo *mi, GLfloat color[4])
 {
   int wire = MI_IS_WIREFRAME(mi);
-  GLfloat i;
-  GLfloat cell_size = 0.9;
-  int cells = 1000 * size;
+  GLfloat i, j, k;
+
+  /* When using fog, iOS apparently doesn't like lines or quads that are
+     really long, and extend very far outside of the scene. Maybe?  If the
+     length of the line (cells * cell_size) is greater than 25 or so, lines
+     that are oriented steeply away from the viewer tend to disappear
+     (whether implemented as GL_LINES or as GL_QUADS).
+
+     So we do a bunch of smaller grids instead of one big one.
+  */
+  int cells = 30;
+  GLfloat cell_size = 0.8;
   int points = 0;
+  int grids = 12;
 
 # ifdef DEBUG
   if (debug_p) return 0;
@@ -1700,7 +1702,7 @@ draw_ground (ModeInfo *mi, GLfloat color[4])
     {
       GLfloat fog_color[4] = { 0, 0, 0, 1 };
 
-      glLineWidth (2);
+      glLineWidth (4);
       glEnable (GL_LINE_SMOOTH);
       glHint (GL_LINE_SMOOTH_HINT, GL_NICEST);
       glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 
@@ -1708,25 +1710,36 @@ draw_ground (ModeInfo *mi, GLfloat color[4])
 
       glFogi (GL_FOG_MODE, GL_EXP2);
       glFogfv (GL_FOG_COLOR, fog_color);
-      glFogf (GL_FOG_DENSITY, 0.017);
-      glFogf (GL_FOG_START, -cells/2 * cell_size);
-# ifndef USE_IPHONE  /* #### Not working on iOS for some reason */
+      glFogf (GL_FOG_DENSITY, 0.015);
+      glFogf (GL_FOG_START, -cells/2 * cell_size * grids);
       glEnable (GL_FOG);
-# endif
     }
 
   glColor4fv (color);
   glMaterialfv (GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, color);
 
-  glBegin (GL_LINES);
-  for (i = -cells/2; i < cells/2; i++)
+  glTranslatef (-cells * grids * cell_size / 2,
+                -cells * grids * cell_size / 2, 0);
+
+  for (j = 0; j < grids; j++)
     {
-      GLfloat a = i * cell_size;
-      GLfloat b = cells/2 * cell_size;
-      glVertex3f (a, -b, 0); glVertex3f (a, b, 0); points++;
-      glVertex3f (-b, a, 0); glVertex3f (b, a, 0); points++;
+      glPushMatrix();
+      for (k = 0; k < grids; k++)
+        {
+          glBegin (GL_LINES);
+          for (i = -cells/2; i < cells/2; i++)
+            {
+              GLfloat a = i * cell_size;
+              GLfloat b = cells/2 * cell_size;
+              glVertex3f (a, -b, 0); glVertex3f (a, b, 0); points++;
+              glVertex3f (-b, a, 0); glVertex3f (b, a, 0); points++;
+            }
+          glEnd();
+          glTranslatef (cells * cell_size, 0, 0);
+        }
+      glPopMatrix();
+      glTranslatef (0, cells * cell_size, 0);
     }
-  glEnd();
 
   if (!wire)
     {
@@ -2295,22 +2308,13 @@ draw_robot (ModeInfo *mi)
   glPushMatrix ();
 
 # ifdef HAVE_MOBILE
-  {
-    int rot = current_device_rotation();
-
-    if (rot == 180 || rot == -180)             /* so much WTF */
-      glRotatef (-68, 1, 0, 0);
-    else if (rot == 90 || rot == -270)
-      glRotatef (68, 0, 1, 0);
-    else if (rot == -90 || rot == 270)
-      glRotatef (-68, 0, 1, 0);
-
-    glRotatef (rot, 0, 0, 1);  /* right side up */
-  }
+  glRotatef (current_device_rotation(), 0, 0, 1);  /* right side up */
 # endif
 
   gltrackball_rotate (bp->user_trackball);
 
+  glTranslatef (0, -20, 0);  /* Move the horizon down the screen */
+
   robot_size = size * 7;
   glScalef (robot_size, robot_size, robot_size);
   look_at_center (mi);
@@ -2457,7 +2461,6 @@ draw_robot (ModeInfo *mi)
     }
   free (sorted);
 
-
   glPopMatrix ();
 
   if (mi->fps_p) do_fps (mi);
@@ -2466,12 +2469,13 @@ draw_robot (ModeInfo *mi)
   glXSwapBuffers(dpy, window);
 }
 
-ENTRYPOINT void
-release_robot (ModeInfo *mi)
+static void
+free_robot (ModeInfo *mi)
 {
 # ifdef WORDBUBBLES
   robot_configuration *bp = &bps[MI_SCREEN(mi)];
-  textclient_close (bp->tc);
+  if (bp->tc)
+    textclient_close (bp->tc);
 # endif
 }
 
index 640ebf75d841575487d576d1568528054e0004e6..798fff067640955edc39ba47af6ee290cd81db52 100644 (file)
@@ -395,7 +395,6 @@ xpm_to_ximage_1 (Display *dpy, Visual *visual, Colormap cmap,
 
       /* Have to convert BGRA to ARGB */
       if (ximage) {
-        int x, y;
         for (y = 0; y < ximage->height; y++)
           for (x = 0; x < ximage->width; x++) {
             unsigned long p = XGetPixel (ximage, x, y);
index b909e8348dd40744ce22038b2c03fb53d3f878f9..c899fa99b0f63dc0155699439054bbdd3a9b5f9a 100644 (file)
@@ -36,6 +36,7 @@ static const char sccsid[] = "@(#)grav.c      5.00 2000/11/01 xlockmore";
                                        "*ignoreRotation: True \n" \
 
 #define BRIGHT_COLORS
+# define release_grav 0
 # define grav_handle_event 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
@@ -73,7 +74,7 @@ ENTRYPOINT ModeSpecOpt grav_opts =
 
 #ifdef USE_MODULES
 ModStruct   grav_description =
-{"grav", "init_grav", "draw_grav", "release_grav",
+{"grav", "init_grav", "draw_grav", (char *) NULL,
  "refresh_grav", "init_grav", (char *) NULL, &grav_opts,
  10000, -12, 1, 1, 64, 1.0, "",
  "Shows orbiting planets", 0, NULL};
@@ -235,6 +236,8 @@ draw_planet(ModeInfo * mi, planetstruct * planet)
        Planet(gp->x, gp->y);
 }
 
+static void free_grav(ModeInfo * mi);
+
 ENTRYPOINT void
 init_grav(ModeInfo * mi)
 {
@@ -243,11 +246,7 @@ init_grav(ModeInfo * mi)
        unsigned char ball;
        gravstruct *gp;
 
-       if (gravs == NULL) {
-               if ((gravs = (gravstruct *) calloc(MI_NUM_SCREENS(mi),
-                                              sizeof (gravstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, gravs, free_grav);
        gp = &gravs[MI_SCREEN(mi)];
 
        gp->width = MI_WIDTH(mi);
@@ -336,21 +335,12 @@ reshape_grav(ModeInfo * mi, int width, int height)
     XClearWindow (MI_DISPLAY (mi), MI_WINDOW(mi));
 }
 
-ENTRYPOINT void
-release_grav(ModeInfo * mi)
+static void
+free_grav(ModeInfo * mi)
 {
-       if (gravs != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       gravstruct *gp = &gravs[screen];
-
-                       if (gp->planets)
-                               (void) free((void *) gp->planets);
-               }
-               (void) free((void *) gravs);
-               gravs = (gravstruct *) NULL;
-       }
+       gravstruct *gp = &gravs[MI_SCREEN(mi)];
+       if (gp->planets)
+               (void) free((void *) gp->planets);
 }
 
 ENTRYPOINT void
index e0ecffb89cb64b770b0fb2f97c802826aec6cfda..f0093a3952e212fe8f49369fe5093949ee212989 100644 (file)
@@ -61,6 +61,7 @@ static const char sccsid[] = "@(#)hop.c       5.00 2000/11/01 xlockmore";
 
 # define SMOOTH_COLORS
 # define reshape_hop 0
+# define release_hop 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 # include "erase.h"
 #else /* STANDALONE */
@@ -152,7 +153,7 @@ ENTRYPOINT ModeSpecOpt hop_opts =
 
 #ifdef USE_MODULES
 ModStruct   hop_description =
-{"hop", "init_hop", "draw_hop", "release_hop",
+{"hop", "init_hop", "draw_hop", (char *) NULL,
  "refresh_hop", "init_hop", (char *) NULL, &hop_opts,
  10000, 1000, 2500, 1, 64, 1.0, "",
  "Shows real plane iterated fractals", 0, NULL};
@@ -193,6 +194,8 @@ typedef struct {
 
 static hopstruct *hops = (hopstruct *) NULL;
 
+static void free_hop(ModeInfo * mi);
+
 ENTRYPOINT void
 init_hop(ModeInfo * mi)
 {
@@ -201,11 +204,7 @@ init_hop(ModeInfo * mi)
        double      range;
        hopstruct  *hp;
 
-       if (hops == NULL) {
-               if ((hops = (hopstruct *) calloc(MI_NUM_SCREENS(mi),
-                                                sizeof (hopstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, hops, free_hop);
        hp = &hops[MI_SCREEN(mi)];
 
        hp->centerx = MI_WIDTH(mi) / 2;
@@ -412,6 +411,8 @@ draw_hop(ModeInfo * mi)
 #ifdef STANDALONE
     if (hp->eraser) {
       hp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), hp->eraser);
+      if (!hp->eraser)
+        init_hop(mi);
       return;
     }
 #endif
@@ -546,26 +547,19 @@ draw_hop(ModeInfo * mi)
        if (++hp->count > MI_CYCLES(mi)) {
 #ifdef STANDALONE
       hp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), hp->eraser);
-#endif /* STANDALONE */
+#else /* !STANDALONE */
                init_hop(mi);
+#endif
        }
 }
 
-ENTRYPOINT void
-release_hop(ModeInfo * mi)
+static void
+free_hop(ModeInfo * mi)
 {
-       if (hops != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       hopstruct  *hp = &hops[screen];
+       hopstruct  *hp = &hops[MI_SCREEN(mi)];
 
-                       if (hp->pointBuffer != NULL)
-                               (void) free((void *) hp->pointBuffer);
-               }
-               (void) free((void *) hops);
-               hops = (hopstruct *) NULL;
-       }
+       if (hp->pointBuffer != NULL)
+               (void) free((void *) hp->pointBuffer);
 }
 
 ENTRYPOINT void
index 70120d6cabf1b5680af64d04dcd106d67b711d5c..cae6360900cff2dee24b1500f019d4c039307f25 100644 (file)
@@ -337,9 +337,7 @@ hyperball_draw (Display *dpy, Window window, void *closure)
         int q_y;
         GC erase_gc;
         GC draw_gc;
-        int old_sum;
         int new_sum;
-        int old_dep;
         int new_dep;
 
         ip = li_ptr->li_ip;
@@ -362,11 +360,8 @@ hyperball_draw (Display *dpy, Window window, void *closure)
         else
           {
             GC *row;
-
-            old_sum = sp->old_dep + sq->old_dep;
             new_sum = sp->new_dep + sq->new_dep;
             row = &hs->hs_color_gcs[col][0];
-            old_dep = old_sum >> 6;
             new_dep = new_sum >> 6;
             erase_gc = hs->black_gc;
             draw_gc = row[new_dep];
index 4fb16c584c80fb417a574ba496b6cb73b25eec2d..0055696b8d110c66703fc8e94f69bdcca3540412 100644 (file)
@@ -254,7 +254,6 @@ hypercube_draw (Display *dpy, Window window, void *closure)
       char moved[POINT_COUNT];
       int redraw;
       int stop;
-      int delay;
 
       icon = hs->hs_icon;
       resize = hs->hs_resize;
@@ -473,7 +472,6 @@ hypercube_draw (Display *dpy, Window window, void *closure)
 
     skip3:
       /* stop = hs->hs_stop; */
-      delay = hs->hs_delay;
       if (stop && this_delay < 10000)
        this_delay = 10000;
     }
diff --git a/hacks/images/apple.xbm b/hacks/images/apple.xbm
new file mode 100644 (file)
index 0000000..13d1deb
--- /dev/null
@@ -0,0 +1,349 @@
+#define apple_width 180
+#define apple_height 180
+static unsigned char apple_bits[] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xC0, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xF8, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 
+  0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0x1F, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0x3F, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0x3F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x3F, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xC0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xC0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xE0, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 
+  0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 
+  0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 
+  0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x07, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x07, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xE0, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 
+  0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 
+  0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 
+  0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x1F, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xFC, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xFC, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xFC, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 
+  0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 
+  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x3F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0x07, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 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, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4A, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xF7, 
+  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0x07, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 
+  0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0x07, 
+  0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 
+  0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 
+  0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0xF0, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xC2, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 
+  0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 
+  0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xFE, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFC, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0xC0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x6F, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x3F, 0x00, 0xE0, 0xFF, 0xFF, 0xFF, 0xFF, 
+  0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0xF8, 0xFF, 0xFF, 0xFF, 0x03, 0x00, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 
+  0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0xFF, 0x7F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0xFF, 
+  0xFF, 0x1F, 0x00, 0x00, 0x00, 0xE0, 0xFF, 0xFF, 0x3F, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xFF, 0xFF, 
+  0x03, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0xF8, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE8, 0x0F, 0x00, 0x00, 
+  0x00, 0x00, 0x00, 0x40, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
+  };
index 01043265d108424adfed298e91fed24762ff7026..6308841f8fb2bfcc503a1f3b8fa5dfe61c5444fc 100644 (file)
@@ -274,14 +274,14 @@ static inline void point2rgb(int depth, unsigned long c, int *r, int *g, int *b)
 #endif
        break;
     case 16:
-       *b = (c & 0x1f) << 3; 
-       *g = ((c >> 5) & 0x3f) << 2;
-       *r = ((c >> 11) & 0x1f) << 3; 
+       *b = (int) (c & 0x1f) << 3;
+       *g = (int) ((c >> 5) & 0x3f) << 2;
+       *r = (int) ((c >> 11) & 0x1f) << 3;
        break;
     case 15:
-       *b = (c & 0x1f) << 3;
-       *g = ((c >> 5) & 0x1f) << 3;
-       *r = ((c >> 10) & 0x1f) << 3;
+       *b = (int) (c & 0x1f) << 3;
+       *g = (int) ((c >> 5) & 0x1f) << 3;
+       *r = (int) ((c >> 10) & 0x1f) << 3;
        break;
     }
 }
index fe3084e4c2a78ee7ba3e46f2403b190d143bc3ae..cbb6fae9f09fec5388927d8b6f62563c63f43178 100644 (file)
@@ -39,6 +39,9 @@
  * Last modified: Tue Dec 30 16:43:33 2014, <dmo2118@gmail.com>
  *              Killed the black margin on the right and bottom.
  *              Reduced the default grid size to 2.
+ * Last modified: Sun Oct 9 11:20:48 2016, <dmo2118@gmail.com>
+ *              Updated for new xshm.c.
+ *              Ditched USE_BIG_XIMAGE.
  */
 
 #include <math.h>
@@ -82,10 +85,6 @@ quite a bit worse when gridsize = 1.
 /* It's a lot faster for me, though - D.O. */
 #define USE_XIMAGE
 
-/* i.e. make the XImage the size of the screen. This is much faster when
- * gridsize = 1. (And SHM is turned off.) */
-#define USE_BIG_XIMAGE
-
 /* Numbers are wave_table size, measured in # of unsigned integers.
  * FPS/radius = 50/radius = 800/radius = 1500/Big-O memory usage
  *
@@ -95,17 +94,13 @@ quite a bit worse when gridsize = 1.
 /* #define USE_FAST_SQRT_HACKISH */ /* 17.8 FPS/2873/4921/5395/O(lg(radius)) */
 #define USE_FAST_SQRT_BIGTABLE2 /* 26.1 FPS/156/2242/5386/O(radius^2) */
 
-#ifndef USE_XIMAGE
-# undef HAVE_XSHM_EXTENSION  /* only applicable when using XImages */
-#endif /* USE_XIMAGE */
-
 #ifdef HAVE_DOUBLE_BUFFER_EXTENSION
 # include "xdbe.h"
 #endif /* HAVE_DOUBLE_BUFFER_EXTENSION */
 
-#ifdef HAVE_XSHM_EXTENSION
+#ifdef USE_XIMAGE
 # include "xshm.h"
-#endif /* HAVE_XSHM_EXTENSION */
+#endif /* USE_XIMAGE */
 
 static const char *interference_defaults [] = {
   ".background:  black",
@@ -180,12 +175,10 @@ struct inter_context {
   GC       copy_gc;
 #ifdef USE_XIMAGE
   XImage  *ximage;
-#endif /* USE_XIMAGE */
 
-#ifdef HAVE_XSHM_EXTENSION
-  Bool use_shm, shm_can_draw;
+  Bool shm_can_draw;
   XShmSegmentInfo shm_info;
-#endif /* HAVE_XSHM_EXTENSION */
+#endif /* USE_XIMAGE */
 
   /*
    * Resources
@@ -346,17 +339,7 @@ static void destroy_image(Display* dpy, struct inter_context* c)
 {
 #ifdef USE_XIMAGE
   if(c->ximage) {
-# ifdef HAVE_XSHM_EXTENSION
-    if(c->use_shm) {
-      destroy_xshm_image(dpy, c->ximage, &c->shm_info);
-    } else
-# endif
-    {
-      /* Don't let XDestroyImage free c->ximage->data. */
-      thread_free(c->ximage->data);
-      c->ximage->data = NULL;
-      XDestroyImage(c->ximage);
-    }
+    destroy_xshm_image(dpy, c->ximage, &c->shm_info);
   }
 #endif
 
@@ -383,7 +366,7 @@ static void inter_free(Display* dpy, struct inter_context* c)
 
   if(c->colors <= 2)
     free(c->pal);
-  else
+  else if(c->pal)
     free_colors(c->screen, c->cmap, c->pal, c->colors);
 
 #ifndef USE_XIMAGE
@@ -603,24 +586,9 @@ static void inter_thread_run(void* self_raw)
              c->ximage->data + (c->ximage->bytes_per_line * img_y),
              c->ximage->bytes_per_line);
 
-# ifndef USE_BIG_XIMAGE
-    /* Move the bits for this horizontal stripe to the server. */
-#  ifdef HAVE_XSHM_EXTENSION
-    if (!c->use_shm)
-#  endif /*  HAVE_XSHM_EXTENSION */
-      XPutImage(c->dpy, TARGET(c), c->copy_gc, c->ximage,
-                0, 0, 0, g*j, c->ximage->width, c->ximage->height);
-# endif
-
-# if defined HAVE_XSHM_EXTENSION && !defined USE_BIG_XIMAGE
-    if (c->use_shm)
-# endif
-    {
-# if defined HAVE_XSHM_EXTENSION || defined USE_BIG_XIMAGE
-      scanline = (char *)scanline + c->ximage->bytes_per_line * g * c->threadpool.count;
-      img_y += g * c->threadpool.count;
-# endif
-    }
+    scanline = (char *)scanline +
+                 c->ximage->bytes_per_line * g * c->threadpool.count;
+    img_y += g * c->threadpool.count;
 
 #endif /* USE_XIMAGE */
   }
@@ -637,74 +605,30 @@ static void create_image(
   /* Set the width so that each thread can work on a different line. */
   unsigned align = thread_memory_alignment(dpy) * 8 - 1;
   unsigned wbits, w, h;
+#endif /* USE_XIMAGE */
 
   c->w = xgwa->width;
   c->h = xgwa->height;
   c->w_div_g = (c->w + c->grid_size - 1) / c->grid_size;
   c->h_div_g = (c->h + c->grid_size - 1) / c->grid_size;
+
+#ifdef USE_XIMAGE
   w = c->w_div_g * c->grid_size;
   h = c->h_div_g * c->grid_size;
 
   /* The width of a scan line, in *bits*. */
   wbits = (w * c->bits_per_pixel + align) & ~align;
 
-# ifdef HAVE_XSHM_EXTENSION
-  /*
-   * Interference used to put one row at a time to the X server. This changes
-   * today.
-   *
-   * XShmPutImage is asynchronous; the contents of the XImage must not be
-   * modified until the server has placed the data on the screen. Waiting for
-   * an XShmCompletionEvent after every line of pixels is a little nutty, so
-   * shared-memory XImages will cover the entire screen, and it only has to be
-   * sent once per frame.
-   *
-   * The non-SHM code, on the other hand is noticeably slower when
-   * gridsize = 1 with one row at a time. If, on the other hand, gridsize >= 2,
-   * there's a slight speed increase with one row at a time.
-   *
-   * This uses a lot more RAM than the single line approach. Users with only
-   * 4 MB of RAM may wish to disable USE_BIG_XIMAGE and specify -no-shm on the
-   * command line. Since this is 2013 and desktop computers are shipping with
-   * 8 GB of RAM, I doubt that this will be a major issue. - D.O.
+  /* This uses a lot more RAM than the single line approach. Users without
+   * enough RAM to fit even a single framebuffer should consider an upgrade for
+   * their 386. - D.O.
    */
 
-  if (c->use_shm)
-    {
-      c->ximage = create_xshm_image(dpy, xgwa->visual, xgwa->depth,
-                                    ZPixmap, 0, &c->shm_info,
-                                    wbits / c->bits_per_pixel, h);
-      if (!c->ximage)
-        c->use_shm = False;
-      /* If create_xshm_image fails, it will not be attempted again. */
-
-      c->shm_can_draw = True;
-    }
-# endif /* HAVE_XSHM_EXTENSION */
+  c->ximage = create_xshm_image(dpy, xgwa->visual, xgwa->depth,
+                                ZPixmap, &c->shm_info,
+                                wbits / c->bits_per_pixel, h);
 
-  if (!c->ximage)
-    {
-      c->ximage =
-        XCreateImage(dpy, xgwa->visual,
-                     xgwa->depth, ZPixmap, 0, 0, /* depth, fmt, offset, data */
-                     w,                          /* width */
-# ifdef USE_BIG_XIMAGE
-                     h,                          /* height */
-# else
-                     c->grid_size,               /* height */
-# endif
-                     8, wbits / 8);              /* pad, bpl */
-
-      if(c->ximage)
-        {
-          if(thread_malloc((void **)&c->ximage->data, dpy,
-                           c->ximage->height * c->ximage->bytes_per_line))
-            {
-              XFree(c->ximage);
-              c->ximage = NULL;
-            }
-        }
-    }
+  c->shm_can_draw = True;
 
   check_no_mem(dpy, c, c->ximage);
 #endif /* USE_XIMAGE */
@@ -721,14 +645,14 @@ static void create_image(
       &c->threadpool,
       &cls,
       dpy,
-#if defined USE_XIMAGE && defined USE_BIG_XIMAGE
+#ifdef USE_XIMAGE
       hardware_concurrency(dpy)
 #else
       1
-      /* At least three issues with threads without USE_BIG_XIMAGE:
+      /* At least two issues with threads without USE_XIMAGE:
        * 1. Most of Xlib isn't thread safe without XInitThreads.
-       * 2. X(Un)LockDisplay would need to be called for each line, which is terrible.
-       * 3. There's only one XImage buffer at the moment.
+       * 2. X(Un)LockDisplay would need to be called for each line, which is
+       *    terrible.
        */
 #endif
       );
@@ -794,13 +718,9 @@ static void inter_init(Display* dpy, Window win, struct inter_context* c)
   XGetWindowAttributes(c->dpy, c->win, &xgwa);
   c->cmap = xgwa.colormap;
   c->screen = xgwa.screen;
-  c->bits_per_pixel = get_bits_per_pixel(c->dpy, xgwa.depth);
+  c->bits_per_pixel = visual_pixmap_depth(xgwa.screen, xgwa.visual);
   check_no_mem(dpy, c, (void *)(ptrdiff_t)c->bits_per_pixel);
 
-#ifdef HAVE_XSHM_EXTENSION
-  c->use_shm = get_boolean_resource(dpy, "useSHM", "Boolean");
-#endif /*  HAVE_XSHM_EXTENSION */
-
   val.function = GXcopy;
   c->copy_gc = XCreateGC(c->dpy, TARGET(c), GCFunction, &val);
 
@@ -868,12 +788,12 @@ static void inter_init(Display* dpy, Window win, struct inter_context* c)
     c->pal[1].pixel = WhitePixel(c->dpy, DefaultScreen(c->dpy));
   }
 
-#ifdef HAVE_XSHM_EXTENSION
-  if(c->use_shm)
-    dbuf = False;
+#ifdef USE_XIMAGE
+  dbuf = False;
   /* Double-buffering doesn't work with MIT-SHM: XShmPutImage must draw to the
    * window. Otherwise, XShmCompletion events will have the XAnyEvent::window
-   * field set to the back buffer, and XScreenSaver will ignore the event. */
+   * field set to the back buffer, and XScreenSaver will ignore the event.
+   */
 #endif
 
   if (dbuf)
@@ -955,9 +875,9 @@ static unsigned long do_inter(struct inter_context* c)
   double now;
   float elapsed;
 
-#if defined USE_XIMAGE && defined HAVE_XSHM_EXTENSION
+#ifdef USE_XIMAGE
   /* Wait a little while for the XServer to become ready if necessary. */
-  if(c->use_shm && !c->shm_can_draw)
+  if(!c->shm_can_draw)
     return 2000;
 #endif
 
@@ -980,23 +900,10 @@ static unsigned long do_inter(struct inter_context* c)
   threadpool_run(&c->threadpool, inter_thread_run);
   threadpool_wait(&c->threadpool);
 
-#ifdef HAVE_XSHM_EXTENSION
-  if (c->use_shm)
-  {
-    XShmPutImage(c->dpy, c->win, c->copy_gc, c->ximage,
-                 0, 0, 0, 0, c->ximage->width, c->ximage->height,
-                 True);
-    c->shm_can_draw = False;
-  }
-#endif
-#if defined HAVE_XSHM_EXTENSION && defined USE_BIG_XIMAGE
-  else
-#endif
-#ifdef USE_BIG_XIMAGE
-  {
-    XPutImage(c->dpy, TARGET(c), c->copy_gc, c->ximage,
-              0, 0, 0, 0, c->ximage->width, c->ximage->height);
-  }
+#ifdef USE_XIMAGE
+  put_xshm_image(c->dpy, c->win, c->copy_gc, c->ximage, 0, 0, 0, 0,
+                 c->ximage->width, c->ximage->height, &c->shm_info);
+  /* c->shm_can_draw = False; */
 #endif
 
 #ifdef HAVE_DOUBLE_BUFFER_EXTENSION
@@ -1070,7 +977,7 @@ interference_event (Display *dpy, Window window, void *closure, XEvent *event)
 #if HAVE_XSHM_EXTENSION
   struct inter_context *c = (struct inter_context *) closure;
 
-  if(c->use_shm && event->type == XShmGetEventBase(dpy) + ShmCompletion)
+  if(event->type == XShmGetEventBase(dpy) + ShmCompletion)
   {
     c->shm_can_draw = True;
     return True;
index c10a8dec38506669e2a563ecc3dbe52e8e89a270..a2dce5e0ab46fbfd41a90ab962e3a322be7420b9 100644 (file)
@@ -2481,17 +2481,7 @@ init_juggle (ModeInfo * mi)
   jugglestruct *sp = 0;
   int i;
 
-  if (juggles == NULL) { /* First-time initialisation */
-
-       /* allocate jugglestruct */
-       if ((juggles =
-                (jugglestruct *)calloc(MI_NUM_SCREENS(mi),
-                                                               sizeof (jugglestruct))) == NULL) {
-         release_juggle(mi);
-         return;
-       }
-  }
-
+  MI_INIT (mi, juggles, 0);
   sp = &juggles[MI_SCREEN(mi)];
 
   if (only && *only && strcmp(only, " ")) {
index a121711d423aad4dce911732e6305519e1888f52..c41aba517f52844c0fae9172354014a5d62408fe 100644 (file)
@@ -46,6 +46,7 @@ static const char sccsid[] = "@(#)julia.c     4.03 97/04/10 xlockmore";
                                        "*ignoreRotation: True   \n" \
 
 # define UNIFORM_COLORS
+# define release_julia 0
 # include "xlockmore.h"                                /* in xscreensaver distribution */
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* in xlockmore distribution */
@@ -152,6 +153,8 @@ incr(ModeInfo * mi, juliastruct * jp)
          }
 }
 
+static void free_julia (ModeInfo * mi);
+
 ENTRYPOINT void
 init_julia(ModeInfo * mi)
 {
@@ -161,11 +164,7 @@ init_julia(ModeInfo * mi)
        XGCValues   gcv;
        int         i;
 
-       if (julias == NULL) {
-               if ((julias = (juliastruct *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (juliastruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, julias, free_julia);
        jp = &julias[MI_SCREEN(mi)];
 
        jp->centerx = MI_WIN_WIDTH(mi) / 2;
@@ -414,35 +413,27 @@ draw_julia (ModeInfo * mi)
        }
 }
 
-ENTRYPOINT void
-release_julia (ModeInfo * mi)
+static void
+free_julia (ModeInfo * mi)
 {
-       if (julias != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       Display    *display = MI_DISPLAY(mi);
-                       juliastruct *jp = &julias[screen];
-                       int         buffer;
-
-                       if (jp->pointBuffer) {
-                               for (buffer = 0; buffer < jp->nbuffers; buffer++)
-                                       if (jp->pointBuffer[buffer])
-                                               (void) free((void *) jp->pointBuffer[buffer]);
-                               (void) free((void *) jp->pointBuffer);
-                       }
-                       if (jp->stippledGC != None)
-                               XFreeGC(display, jp->stippledGC);
-                       if (jp->pixmap != None)
-                               XFreePixmap(display, jp->pixmap);
+       Display    *display = MI_DISPLAY(mi);
+       juliastruct *jp = &julias[MI_SCREEN(mi)];
+       int         buffer;
+
+       if (jp->pointBuffer) {
+               for (buffer = 0; buffer < jp->nbuffers; buffer++)
+                       if (jp->pointBuffer[buffer])
+                               (void) free((void *) jp->pointBuffer[buffer]);
+               (void) free((void *) jp->pointBuffer);
+       }
+       if (jp->stippledGC != None)
+               XFreeGC(display, jp->stippledGC);
+       if (jp->pixmap != None)
+               XFreePixmap(display, jp->pixmap);
 #ifndef HAVE_JWXYZ
-                       if (jp->cursor)
-                         XFreeCursor (display, jp->cursor);
+       if (jp->cursor)
+         XFreeCursor (display, jp->cursor);
 #endif
-               }
-               (void) free((void *) julias);
-               julias = NULL;
-       }
 }
 
 ENTRYPOINT void
index 3439bf443a5980b4951ab16b225579bc8e7ae115..20915419687b1057e212a897b76bb6be9af7ef47 100644 (file)
@@ -126,11 +126,7 @@ init_laser(ModeInfo * mi)
        int         i, c = 0;
        lasersstruct *lp;
 
-       if (lasers == NULL) {
-               if ((lasers = (lasersstruct *) calloc(MI_NUM_SCREENS(mi),
-                                            sizeof (lasersstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, lasers, 0);
        lp = &lasers[MI_SCREEN(mi)];
 
        lp->width = MI_WIDTH(mi);
index e7d9f06ea7c3e771ea327b0417780a26b1e9b96d..1f5d70234231f58477f9181371d55d47e0980dc1 100644 (file)
@@ -518,11 +518,7 @@ init_lightning (ModeInfo * mi)
 {
        Storm      *st;
 
-       if (Helga == NULL) {
-               if ((Helga = (Storm *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (Storm))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, Helga, 0);
        st = &Helga[MI_SCREEN(mi)];
 
        st->scr_width = MI_WIDTH(mi);
index df25c96d5f5615c5106200fa9990328fdc53321e..1a1159f62cdfadc9d4840033b6801d98d2b89497 100644 (file)
@@ -681,11 +681,7 @@ init_lisa (ModeInfo * mi)
        int         lctr;
        lisacons   *lc;
 
-       if (Lisa == NULL) {
-               if ((Lisa = (lisacons *) calloc(MI_NUM_SCREENS(mi),
-                                sizeof (lisacons))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, Lisa, 0);
        lc = &Lisa[MI_SCREEN(mi)];
        lc->width = MI_WIDTH(mi);
        lc->height = MI_HEIGHT(mi);
index e10e721832cb5b7344e5f0a1aa56daa70e639b97..f968421b201525dc7d0258e0c38353da873c55d6 100644 (file)
@@ -221,11 +221,7 @@ init_lissie (ModeInfo * mi)
        lissstruct *lp;
        unsigned char ball;
 
-       if (lisses == NULL) {
-               if ((lisses = (lissstruct *) calloc(MI_NUM_SCREENS(mi),
-                                              sizeof (lissstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, lisses, 0);
        lp = &lisses[MI_SCREEN(mi)];
 
        lp->width = MI_WIDTH(mi);
index f5ce869d36ec60487bce41f64620c4d9b4b41e9b..fd27fd167c63c84a96f66e9efde8c593d461ae8d 100644 (file)
@@ -139,8 +139,8 @@ ModStruct   loop_description =
 
 #define LOOPBITS(n,w,h)\
   if ((lp->pixmaps[lp->init_bits]=\
-  XCreatePixmapFromBitmapData(display,window,(char *)n,w,h,1,0,1))==None){\
-  free_loop(display,lp); return;} else {lp->init_bits++;}
+  XCreatePixmapFromBitmapData(MI_DISPLAY(mi),window,(char *)n,w,h,1,0,1))==None){\
+  free_loop(mi); return;} else {lp->init_bits++;}
 
 static int  local_neighbors = 0;
 
@@ -917,8 +917,10 @@ free_list(loopstruct * lp)
 }
 
 static void
-free_loop(Display *display, loopstruct * lp)
+free_loop(ModeInfo * mi)
 {
+       Display    *display = MI_DISPLAY(mi);
+       loopstruct *lp = &loops[MI_SCREEN(mi)];
        int         shade;
 
        for (shade = 0; shade < lp->init_bits; shade++)
@@ -950,7 +952,7 @@ addtolist(ModeInfo * mi, int col, int row, unsigned char state)
        if ((lp->cellList[state] = (CellList *) malloc(sizeof (CellList))) ==
                        NULL) {
                lp->cellList[state] = current;
-               free_loop(MI_DISPLAY(mi), lp);
+               free_loop(mi);
                return False;
        }
        lp->cellList[state]->pt.x = col;
@@ -1422,14 +1424,6 @@ do_gen(loopstruct * lp)
 ENTRYPOINT void
 release_loop (ModeInfo * mi)
 {
-       if (loops != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_loop(MI_DISPLAY(mi), &loops[screen]);
-               (void) free((void *) loops);
-               loops = (loopstruct *) NULL;
-       }
        if (table != NULL) {
                (void) free((void *) table);
                table = (unsigned int *) NULL;
@@ -1442,17 +1436,12 @@ static void *stop_warning_about_triangleUnit_already;
 ENTRYPOINT void
 init_loop (ModeInfo * mi)
 {
-       Display    *display = MI_DISPLAY(mi);
        int         i, size = MI_SIZE(mi);
        loopstruct *lp;
 
     stop_warning_about_triangleUnit_already = (void *) &triangleUnit;
 
-       if (loops == NULL) {
-               if ((loops = (loopstruct *) calloc(MI_NUM_SCREENS(mi),
-                                              sizeof (loopstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, loops, free_loop);
        lp = &loops[MI_SCREEN(mi)];
 
        lp->redrawing = 0;
@@ -1463,9 +1452,9 @@ init_loop (ModeInfo * mi)
           XGCValues   gcv;
         if (lp->stippledGC == None) {
                        gcv.fill_style = FillOpaqueStippled;
-                       if ((lp->stippledGC = XCreateGC(display, window,
+                       if ((lp->stippledGC = XCreateGC(MI_DISPLAY(mi), window,
                                 GCFillStyle, &gcv)) == None) {
-                               free_loop(display, lp);
+                               free_loop(mi);
                                return;
                        }
                }
@@ -1574,7 +1563,7 @@ init_loop (ModeInfo * mi)
        }
        if ((lp->oldcells = (unsigned char *) calloc(lp->bncols * lp->bnrows,
                        sizeof (unsigned char))) == NULL) {
-               free_loop(display, lp);
+               free_loop(mi);
                return;
        }
        if (lp->newcells != NULL) {
@@ -1583,7 +1572,7 @@ init_loop (ModeInfo * mi)
        }
        if ((lp->newcells = (unsigned char *) calloc(lp->bncols * lp->bnrows,
                        sizeof (unsigned char))) == NULL) {
-               free_loop(display, lp);
+               free_loop(mi);
                return;
        }
        if (!init_table()) {
@@ -1653,7 +1642,7 @@ draw_loop (ModeInfo * mi)
        }
        for (i = 0; i < COLORS; i++)
                if (!draw_state(mi, i)) {
-                       free_loop(MI_DISPLAY(mi), lp);
+                       free_loop(mi);
                        return;
                }
        if (++lp->generation > MI_CYCLES(mi) || lp->dead) {
index 4f90a6a10acf8b1f396556c372c6e3e4cd2ac005..47822abebfc6ae5c76fe221d1e46627395fa2a25 100644 (file)
  * Created: 07-May-2007 
  */
 
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+#if defined(HAVE_STDINT_H)
+#include <stdint.h> 
+#elif defined(HAVE_INTTYPES_H)
 #include <inttypes.h>
+#endif
 #include <string.h>
 #include "screenhack.h"
 #include "analogtv.h"
index b1ca148644c290322b27c6b7fcdd18a5fd6aa508..f18e5a0e3a91d0c74414c7bbed5c62924ecedcc1 100644 (file)
  */
 
 #include "screenhack.h"
-#include <stdio.h>
-
-#ifdef HAVE_XSHM_EXTENSION
 #include "xshm.h"
-#endif
+#include <stdio.h>
 
 #undef countof
 #define countof(x) (sizeof(x)/sizeof(*(x)))
@@ -54,10 +51,7 @@ typedef struct {
   int nscrollers;
   scroller *scrollers;
 
-# ifdef HAVE_XSHM_EXTENSION
-  Bool shm_p;
   XShmSegmentInfo shm_info;
-# endif
 
   int delay;
 
@@ -199,29 +193,12 @@ memscroller_init (Display *dpy, Window window)
       sc->which = i;
       sc->speed = i+1;
 
-      sc->image = 0;
-# ifdef HAVE_XSHM_EXTENSION
-      st->shm_p = get_boolean_resource (dpy, "useSHM", "Boolean");
-      if (st->shm_p)
-        {
-          sc->image = create_xshm_image (st->dpy, st->xgwa.visual,
-                                         st->xgwa.depth,
-                                         ZPixmap, 0, &st->shm_info,
-                                         1, max_height);
-          if (! sc->image)
-            st->shm_p = False;
-        }
-# endif /* HAVE_XSHM_EXTENSION */
+      sc->image = create_xshm_image (st->dpy, st->xgwa.visual,
+                                     st->xgwa.depth,
+                                     ZPixmap, &st->shm_info,
+                                     1, max_height);
 
       if (!sc->image)
-        sc->image = XCreateImage (st->dpy, st->xgwa.visual, st->xgwa.depth,
-                                  ZPixmap, 0, 0, 1, max_height, 8, 0);
-
-      if (sc->image && !sc->image->data)
-        sc->image->data = (char *)
-          malloc (sc->image->bytes_per_line * sc->image->height + 1);
-
-      if (!sc->image || !sc->image->data)
         {
           fprintf (stderr, "%s: out of memory (allocating 1x%d image)\n",
                    progname, sc->image->height);
@@ -572,21 +549,12 @@ memscroller_draw (Display *dpy, Window window, void *closure)
 
       for (j = 0; j < sc->speed; j++)
         {
-# ifdef HAVE_XSHM_EXTENSION
-          if (st->shm_p)
-            XShmPutImage (st->dpy, st->window, st->draw_gc, sc->image,
+          put_xshm_image (st->dpy, st->window, st->draw_gc, sc->image,
                           0, 0,
                           sc->rect.x + sc->rect.width - sc->image->width - j,
                           sc->rect.y,
                           sc->rect.width, sc->rect.height,
-                          False);
-          else
-# endif /* HAVE_XSHM_EXTENSION */
-            XPutImage (st->dpy, st->window, st->draw_gc, sc->image,
-                       0, 0,
-                       sc->rect.x + sc->rect.width - sc->image->width - j,
-                       sc->rect.y,
-                       sc->rect.width, sc->rect.height);
+                          &st->shm_info);
         }
     }
 
index 5b1155a86a2b74c4318d1b81a94e6e072dc999b2..4add45768b9c89d74e4946278a62ad448b92facf 100644 (file)
@@ -9,25 +9,16 @@
  * implied warranty.
  *
  * Concept snarfed from Michael D. Bayne in
- * http://www.go2net.com/internet/deep/1997/04/16/body.html
+ * http://samskivert.com/internet/deep/1997/04/16/body.html
  */
 
 #include "screenhack.h"
-
-#undef HAVE_XSHM_EXTENSION  /* this is broken here at the moment */
-
-
-#ifdef HAVE_XSHM_EXTENSION
-# include "xshm.h"
-#endif /* HAVE_XSHM_EXTENSION */
+#include "xshm.h"
 
 struct state {
   Display *dpy;
   Window window;
-#ifdef HAVE_XSHM_EXTENSION
-  Bool use_shm;
   XShmSegmentInfo shm_info;
-#endif /* HAVE_XSHM_EXTENSION */
 
   int delay;
   int offset;
@@ -61,10 +52,6 @@ moire_init_1 (struct state *st)
   st->offset = get_integer_resource (st->dpy, "offset", "Integer");
   if (st->offset < 2) st->offset = 2;
 
-#ifdef HAVE_XSHM_EXTENSION
-  st->use_shm = get_boolean_resource(st->dpy, "useSHM", "Boolean");
-#endif /*  HAVE_XSHM_EXTENSION */
-
  MONO:
   if (st->colors)
     {
@@ -170,24 +157,9 @@ moire_draw (Display *dpy, Window window, void *closure)
 
       st->depth = visual_depth(DefaultScreenOfDisplay(st->dpy), st->xgwa.visual);
 
-# ifdef HAVE_XSHM_EXTENSION
-      if (st->use_shm)
-        {
-          st->draw_image = create_xshm_image(st->dpy, st->xgwa.visual, 
-                                             st->depth, ZPixmap, 0,
-                                             &st->shm_info, st->xgwa.width, 1);
-          if (!st->draw_image)
-            st->use_shm = False;
-        }
-# endif /* HAVE_XSHM_EXTENSION */
-
-      if (!st->draw_image)
-        {
-          st->draw_image = XCreateImage (st->dpy, st->xgwa.visual,
-                                         st->depth, ZPixmap, 0,            /* depth, format, offset */
-                                         0, st->xgwa.width, 1, 8, 0); /* data, w, h, pad, bpl */
-          st->draw_image->data = (char *) calloc(st->draw_image->height, st->draw_image->bytes_per_line);
-        }
+      st->draw_image = create_xshm_image(st->dpy, st->xgwa.visual,
+                                         st->depth, ZPixmap, &st->shm_info, /* depth, format, shm_info */
+                                         st->xgwa.width, chunk_size);       /* w, h */
     }
 
   /* for (y = 0; y < st->xgwa.height; y++) */
@@ -197,47 +169,27 @@ moire_draw (Display *dpy, Window window, void *closure)
       for (x = 0; x < st->xgwa.width; x++)
        {
          double xx = x + st->draw_xo;
-         double yy = st->draw_y + st->draw_yo;
+         double yy = st->draw_y + ii + st->draw_yo;
          double i = ((xx * xx) + (yy * yy)) / (double) st->draw_factor;
          if (mono_p)
            gcv.foreground = ((((long) i) & 1) ? st->fg_pixel : st->bg_pixel);
          else
            gcv.foreground = st->colors[((long) i) % st->ncolors].pixel;
-         XPutPixel (st->draw_image, x, 0, gcv.foreground);
+         XPutPixel (st->draw_image, x, ii, gcv.foreground);
        }
 
-# ifdef HAVE_XSHM_EXTENSION
-      if (st->use_shm)
-       XShmPutImage(st->dpy, st->window, st->gc, st->draw_image, 0, 0, 0, st->draw_y, st->xgwa.width, 1, False);
-      else
-# endif /*  HAVE_XSHM_EXTENSION */
-       XPutImage (st->dpy, st->window, st->gc, st->draw_image, 0, 0, 0, st->draw_y, st->xgwa.width, 1);
-
-      st->draw_y++;
-      if (st->draw_y >= st->xgwa.height)
+      if (st->draw_y + ii >= st->xgwa.height)
         break;
     }
 
+    put_xshm_image(st->dpy, st->window, st->gc, st->draw_image, 0, 0, 0, st->draw_y, st->xgwa.width, chunk_size, &st->shm_info);
+    st->draw_y += chunk_size;
 
     if (st->draw_y >= st->xgwa.height)
       {
         st->draw_y = 0;
 
-# ifdef HAVE_XSHM_EXTENSION
-        if (!st->use_shm)
-# endif /*  HAVE_XSHM_EXTENSION */
-          if (st->draw_image->data)
-            {
-              free(st->draw_image->data);
-              st->draw_image->data = 0;
-            }
-
-# ifdef HAVE_XSHM_EXTENSION
-        if (st->use_shm)
-          destroy_xshm_image (st->dpy, st->draw_image, &st->shm_info);
-        else
-# endif /*  HAVE_XSHM_EXTENSION */
-          XDestroyImage (st->draw_image);
+        destroy_xshm_image (st->dpy, st->draw_image, &st->shm_info);
         st->draw_image = 0;
 
         return st->delay * 1000000;
@@ -255,11 +207,7 @@ static const char *moire_defaults [] = {
   "*delay:             5",
   "*ncolors:           64",
   "*offset:            50",
-#ifdef HAVE_XSHM_EXTENSION
   "*useSHM:          True",
-#else
-  "*useSHM:          False",
-#endif
 #ifdef HAVE_MOBILE
   "*ignoreRotation: True",
 #endif
index 29d842a114f19bd7126e5466b3bd61ebea91962c..dcabbe54db3d9a412af2c9f20ddf2d1deed8e51e 100644 (file)
@@ -35,6 +35,7 @@ static const char sccsid[] = "@(#)mountain.c  5.00 2000/11/01 xlockmore";
                                        "*fpsSolid: true \n" \
 
 # define SMOOTH_COLORS
+# define release_mountain 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
 # include "xlock.h"            /* in xlockmore distribution */
@@ -47,7 +48,7 @@ ENTRYPOINT ModeSpecOpt mountain_opts =
 
 #ifdef USE_MODULES
 ModStruct   mountain_description =
-{"mountain", "init_mountain", "draw_mountain", "release_mountain",
+{"mountain", "init_mountain", "draw_mountain", (char *) NULL,
  "refresh_mountain", "init_mountain", (char *) NULL, &mountain_opts,
  1000, 30, 4000, 1, 64, 1.0, "",
  "Shows Papo's mountain range", 0, NULL};
@@ -161,6 +162,8 @@ drawamountain(ModeInfo * mi)
                mp->stage++;
 }
 
+static void free_mountain (ModeInfo * mi);
+
 ENTRYPOINT void
 init_mountain (ModeInfo * mi)
 {
@@ -168,11 +171,7 @@ init_mountain (ModeInfo * mi)
        XGCValues   gcv;
        mountainstruct *mp;
 
-       if (mountains == NULL) {
-               if ((mountains = (mountainstruct *) calloc(MI_NUM_SCREENS(mi),
-                                          sizeof (mountainstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, mountains, free_mountain);
        mp = &mountains[MI_SCREEN(mi)];
 
        mp->width = MI_WIDTH(mi);
@@ -261,21 +260,13 @@ reshape_mountain(ModeInfo * mi, int width, int height)
 }
 
 
-ENTRYPOINT void
-release_mountain (ModeInfo * mi)
+static void
+free_mountain (ModeInfo * mi)
 {
-       if (mountains != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++) {
-                       mountainstruct *mp = &mountains[screen];
+       mountainstruct *mp = &mountains[MI_SCREEN(mi)];
 
-                       if (mp->stippledGC)
-                               XFreeGC(MI_DISPLAY(mi), mp->stippledGC);
-               }
-               (void) free((void *) mountains);
-               mountains = (mountainstruct *) NULL;
-       }
+       if (mp->stippledGC)
+               XFreeGC(MI_DISPLAY(mi), mp->stippledGC);
 }
 
 ENTRYPOINT void
index 58b2bed6114562d8d2b0f0e427646a5a748c09f8..de3398ef93635cb6e85e7cd3c139f3869cd7af84 100644 (file)
@@ -55,6 +55,7 @@ static const char sccsid[] = "@(#)pacman.c    5.00 2000/11/01 xlockmore";
 
 #      define UNIFORM_COLORS
 #      define BRIGHT_COLORS
+#      define release_pacman 0
 #   define pacman_handle_event 0
 #      include "xlockmore.h"   /* in xscreensaver distribution */
 #   include <assert.h>
@@ -148,7 +149,7 @@ ModStruct pacman_description = {
     "pacman",                   /* *cmdline_arg; */
     "init_pacman",              /* *init_name; */
     "draw_pacman",              /* *callback_name; */
-    "release_pacman",           /* *release_name; */
+    (char *) NULL,              /* *release_name; */
     "refresh_pacman",           /* *refresh_name; */
     "change_pacman",            /* *change_name; */
     (char *) NULL,              /* *unused_name; */
@@ -166,8 +167,10 @@ static void drawlevel (ModeInfo * mi);
 
 
 static void
-free_pacman (Display * display, pacmangamestruct * pp)
+free_pacman (ModeInfo * mi)
 {
+    Display * display = MI_DISPLAY (mi);
+    pacmangamestruct * pp = &pacman_games[MI_SCREEN (mi)];
     int dir, mouth, i, j, k;
 
     if (pp->ghosts != NULL) {
@@ -1487,12 +1490,7 @@ init_pacman (ModeInfo * mi)
     int dir, mouth;
 #endif
 
-    if (pacman_games == NULL) {
-        if ((pacman_games = (pacmangamestruct *)
-             calloc ((size_t) MI_NUM_SCREENS (mi),
-                     sizeof (pacmangamestruct))) == NULL)
-            return;
-    }
+    MI_INIT (mi, pacman_games, free_pacman);
     pp = &pacman_games[MI_SCREEN (mi)];
 
     pp->width = (unsigned short) MI_WIDTH (mi);
@@ -1562,7 +1560,7 @@ init_pacman (ModeInfo * mi)
         if ((pp->stippledGC = XCreateGC (display, window,
                                          GCForeground | GCBackground,
                                          &gcv)) == None) {
-            free_pacman (display, pp);
+            free_pacman (mi);
             return;
         }
     }
@@ -1578,7 +1576,7 @@ init_pacman (ModeInfo * mi)
     if ((pp->ghostPixmap[0][0][0] = XCreatePixmap (display, window,
                                                    pp->spritexs, pp->spriteys,
                                                    1)) == None) {
-        free_pacman (display, pp);
+        free_pacman (mi);
         return;
     }
 
@@ -1586,7 +1584,7 @@ init_pacman (ModeInfo * mi)
     gcv.background = 1;
     if ((bg_gc = XCreateGC (display, pp->ghostPixmap[0][0][0],
                             GCForeground | GCBackground, &gcv)) == None) {
-        free_pacman (display, pp);
+        free_pacman (mi);
         return;
     }
 
@@ -1595,7 +1593,7 @@ init_pacman (ModeInfo * mi)
     if ((fg_gc = XCreateGC (display, pp->ghostPixmap[0][0][0],
                             GCForeground | GCBackground, &gcv)) == None) {
         XFreeGC (display, bg_gc);
-        free_pacman (display, pp);
+        free_pacman (mi);
         return;
     }
 
@@ -1633,7 +1631,7 @@ init_pacman (ModeInfo * mi)
             if ((pp->pacmanPixmap[dir][mouth] =
                  XCreatePixmap (display, MI_WINDOW (mi), pp->spritexs,
                                 pp->spriteys, 1)) == None) {
-                free_pacman (display, pp);
+                free_pacman (mi);
                 return;
             }
             gcv.foreground = 1;
@@ -1641,7 +1639,7 @@ init_pacman (ModeInfo * mi)
             if ((fg_gc = XCreateGC (display, pp->pacmanPixmap[dir][mouth],
                                     GCForeground | GCBackground,
                                     &gcv)) == None) {
-                free_pacman (display, pp);
+                free_pacman (mi);
                 return;
             }
             gcv.foreground = 0;
@@ -1651,7 +1649,7 @@ init_pacman (ModeInfo * mi)
                                     GCForeground |
                                     GCBackground, &gcv)) == None) {
                 XFreeGC (display, fg_gc);
-                free_pacman (display, pp);
+                free_pacman (mi);
                 return;
             }
             XFillRectangle (display,
@@ -1688,7 +1686,7 @@ init_pacman (ModeInfo * mi)
         if ((pp->ghosts = (ghoststruct *) calloc ((size_t) pp->nghosts,
                                                   sizeof (ghoststruct))) ==
             NULL) {
-            free_pacman (display, pp);
+            free_pacman (mi);
             return;
         }
 
@@ -1750,20 +1748,6 @@ draw_pacman (ModeInfo * mi)
     pacman_tick (mi);
 }
 
-/* Releases resources. */
-ENTRYPOINT void
-release_pacman (ModeInfo * mi)
-{
-    if (pacman_games != NULL) {
-        int screen;
-
-        for (screen = 0; screen < MI_NUM_SCREENS (mi); screen++)
-            free_pacman (MI_DISPLAY (mi), &pacman_games[screen]);
-        free (pacman_games);
-        pacman_games = (pacmangamestruct *) NULL;
-    }
-}
-
 /* Refresh current level. */
 ENTRYPOINT void
 refresh_pacman (ModeInfo * mi)
index dd6e9929966dd9e33a1d8c2c1eeec6872d6f49f5..0836ee7326792f2202059e10bddeeed6fda8585e 100644 (file)
@@ -90,6 +90,7 @@ If one of these are hit penrose will reinitialize.
                                        "*ignoreRotation: True \n" \
 
 # define refresh_penrose 0
+# define release_penrose 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
 # include "xlock.h"            /* from the xlockmore distribution */
@@ -402,8 +403,9 @@ fived_to_loc(int fived[], tiling_c * tp, XPoint *pt)
 
 /* Mop up dynamic data for one screen. */
 static void
-free_penrose(tiling_c * tp)
+free_penrose(ModeInfo * mi)
 {
+       tiling_c * tp = &tilings[MI_SCREEN(mi)];
        register fringe_node_c *fp1, *fp2;
        register forced_node_c *lp1, *lp2;
 
@@ -433,11 +435,7 @@ init_penrose(ModeInfo * mi)
        fringe_node_c *fp;
        int         i, size;
 
-       if (tilings == NULL) {
-               if ((tilings = (tiling_c *) calloc(MI_NUM_SCREENS(mi),
-                                                sizeof (tiling_c))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, tilings, free_penrose);
        tp = &tilings[MI_SCREEN(mi)];
 
 #if 0 /* if you do this, then the -ammann and -no-ammann options don't work.
@@ -475,18 +473,18 @@ init_penrose(ModeInfo * mi)
        tp->origin.y = (tp->height / 2 + NRAND(tp->height)) / 2;
        tp->fringe.n_nodes = 2;
        if (tp->fringe.nodes != NULL)
-               free_penrose(tp);
+               free_penrose(mi);
        if (tp->fringe.nodes != NULL || tp->forced.first != 0) {
                if (MI_IS_VERBOSE(mi)) {
                        (void) fprintf(stderr, "Weirdness in init_penrose()\n");
                        (void) fprintf(stderr, "tp->fringe.nodes = NULL && tp->forced.first = 0\n");
                }
-               free_penrose(tp);       /* Try again */
+               free_penrose(mi);       /* Try again */
                tp->done = True;
        }
        tp->forced.n_nodes = tp->forced.n_visible = 0;
        if ((fp = tp->fringe.nodes = ALLOC_NODE(fringe_node_c)) == NULL) {
-               free_penrose(tp);
+               free_penrose(mi);
                return;
        }
        if (fp == 0) {
@@ -495,7 +493,7 @@ init_penrose(ModeInfo * mi)
                        (void) fprintf(stderr, "fp = 0\n");
                }
                if ((fp = tp->fringe.nodes = ALLOC_NODE(fringe_node_c)) == NULL) {
-                       free_penrose(tp);
+                       free_penrose(mi);
                        return;
                }
                tp->done = True;
@@ -504,7 +502,7 @@ init_penrose(ModeInfo * mi)
        fp->rule_mask = (1 << N_VERTEX_RULES) - 1;
        fp->list_ptr = 0;
        if  ((fp->prev = fp->next = ALLOC_NODE(fringe_node_c)) == NULL) {
-               free_penrose(tp);
+               free_penrose(mi);
                return;
        }
        if (fp->next == 0) {
@@ -513,7 +511,7 @@ init_penrose(ModeInfo * mi)
                        (void) fprintf(stderr, "fp->next = 0\n");
                }
                if ((fp->prev = fp->next = ALLOC_NODE(fringe_node_c)) == NULL) {
-                       free_penrose(tp);
+                       free_penrose(mi);
                        return;
                }
                tp->done = True;
@@ -1250,7 +1248,7 @@ add_random_tile(fringe_node_c * vertex, ModeInfo * mi)
                if (MI_IS_VERBOSE(mi)) {
                        (void) fprintf(stderr, "Weirdness in add_random_tile()\n");
                }
-               free_penrose(tp);
+               free_penrose(mi);
        }
 }
 
@@ -1285,7 +1283,7 @@ draw_penrose(ModeInfo * mi)
                MI_CLEARWINDOW(mi);
 
                if (!add_tile(mi, tp->fringe.nodes, S_LEFT, vtype))
-                       free_penrose(tp);
+                       free_penrose(mi);
                return;
        }
        /* No visible nodes left. */
@@ -1336,20 +1334,6 @@ reshape_penrose(ModeInfo * mi, int width, int height)
        tp->height = height;
 }
 
-/* Total clean-up. */
-ENTRYPOINT void
-release_penrose(ModeInfo * mi)
-{
-       if (tilings != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_penrose(&tilings[screen]);
-               (void) free((void *) tilings);
-               tilings = (tiling_c *) NULL;
-       }
-}
-
 ENTRYPOINT Bool
 penrose_handle_event (ModeInfo *mi, XEvent *event)
 {
index 0c410eafb77ab5e08cac73d99b6f5e1c1c6123c7..c89fb31f4c42c5d8be190299204f4e288de26bda 100644 (file)
@@ -39,6 +39,7 @@ static const char sccsid[] = "@(#)polyominoes.c 5.01 2000/12/18 xlockmore";
                                        "*ncolors: 64 \n" \
                                        "*fpsSolid: true \n" \
 
+# define release_polyominoes 0
 # define polyominoes_handle_event 0
 # define SMOOTH_COLORS
 # include "xlockmore.h"                /* in xscreensaver distribution */
@@ -81,7 +82,7 @@ ENTRYPOINT ModeSpecOpt polyominoes_opts =
 
 #ifdef USE_MODULES
 ModStruct   polyominoes_description = {
-  "polyominoes", "init_polyominoes", "draw_polyominoes", "release_polyominoes",
+  "polyominoes", "init_polyominoes", "draw_polyominoes", (char *) NULL,
   "refresh_polyominoes", "init_polyominoes", (char *) NULL, &polyominoes_opts,
   6000, 1, 8192, 1, 64, 1.0, "",
   "Shows attempts to place polyominoes into a rectangle", 0, NULL
@@ -1052,8 +1053,9 @@ static void free_bitmaps(polyominoesstruct *sp)
 
 #define deallocate(p,t) if ((p)!=NULL) {free(p); p=(t*)NULL;}
 
-static void free_polyominoes(polyominoesstruct *sp)
+static void free_polyominoes(ModeInfo * mi)
 {
+  polyominoesstruct *sp = &polyominoeses[MI_SCREEN(mi)];
   int n;
 
   for (n=0;n<sp->nr_polyominoes;n++) {
@@ -1072,7 +1074,7 @@ static void free_polyominoes(polyominoesstruct *sp)
 }
 
 #define set_allocate(p,type,size) p = (type *) malloc(size);           \
-                             if ((p)==NULL) {free_polyominoes(sp);return 0;}
+                             if ((p)==NULL) {free_polyominoes(mi);return 0;}
 
 #define copy_polyomino(dst,src,new_rand)                               \
   (dst).len=(src).len;                                                 \
@@ -1546,7 +1548,7 @@ into a rectangle whose size is 20x3, 15x4, 12x5 or 10x6.
 */
 
 static
-int set_pentomino_puzzle(polyominoesstruct *sp)
+int set_pentomino_puzzle(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_poly[12], perm_point[5], perm_transform[8], i, p;
 
@@ -1593,7 +1595,7 @@ into a rectangle.
 */
 
 static
-int set_one_sided_pentomino_puzzle(polyominoesstruct *sp)
+int set_one_sided_pentomino_puzzle(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_poly[18], perm_point[5], perm_transform[8], i, p;
 
@@ -1637,7 +1639,7 @@ into a rectangle.
 */
 
 static
-int set_one_sided_hexomino_puzzle(polyominoesstruct *sp)
+int set_one_sided_hexomino_puzzle(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_poly[60], perm_point[6], perm_transform[8], i, p;
 
@@ -1697,7 +1699,7 @@ pentominoes into a rectangle.
 */
 
 static
-int set_tetr_pentomino_puzzle(polyominoesstruct *sp)
+int set_tetr_pentomino_puzzle(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_poly[17], perm_point[5], perm_transform[8], i, p;
 
@@ -1737,7 +1739,7 @@ hexominoes into a rectangle whose size is 18x15.
 */
 
 static
-int set_pent_hexomino_puzzle(polyominoesstruct *sp)
+int set_pent_hexomino_puzzle(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_poly[47], perm_point[6], perm_transform[8], i, p;
 
@@ -1799,7 +1801,7 @@ static struct {int len; point_type point[5];
    8, {0, 1, 2, 3, 4, 5, 6, 7}, 3};
 
 static
-int set_pentomino_puzzle1(polyominoesstruct *sp)
+int set_pentomino_puzzle1(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_point[5], perm_transform[8], i, p;
 
@@ -1831,7 +1833,7 @@ static struct {int len; point_type point[6];
    8, {0, 1, 2, 3, 4, 5, 6, 7}, 4};
 
 static
-int set_hexomino_puzzle1(polyominoesstruct *sp)
+int set_hexomino_puzzle1(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_point[6], perm_transform[8], i, p;
 
@@ -1865,7 +1867,7 @@ static struct {int len; point_type point[7];
    8, {0, 1, 2, 3, 4, 5, 6, 7}, 4};
 
 static
-int set_heptomino_puzzle1(polyominoesstruct *sp)
+int set_heptomino_puzzle1(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_point[7], perm_transform[8], i, p;
 
@@ -1899,7 +1901,7 @@ by Solomon W. Golomb   Princeton University Press 1994
 
 */
 static
-int set_heptomino_puzzle2(polyominoesstruct *sp)
+int set_heptomino_puzzle2(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_point[7], perm_transform[8], i, p;
 
@@ -1934,7 +1936,7 @@ static struct {int len; point_type point[11];
    8, {0, 1, 2, 3, 4, 5, 6, 7}, 6};
 
 static
-int set_elevenomino_puzzle1(polyominoesstruct *sp)
+int set_elevenomino_puzzle1(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_point[11], perm_transform[8], i, p;
 
@@ -1974,7 +1976,7 @@ static struct {int len; point_type point[10];
    8, {0, 1, 2, 3, 4, 5, 6, 7}, 5};
 
 static
-int set_dekomino_puzzle1(polyominoesstruct *sp)
+int set_dekomino_puzzle1(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_point[10], perm_transform[8], i, p;
 
@@ -2009,7 +2011,7 @@ static struct {int len; point_type point[10];
    8, {0, 1, 2, 3, 4, 5, 6, 7}, 5};
 
 static
-int set_octomino_puzzle1(polyominoesstruct *sp)
+int set_octomino_puzzle1(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_point[8], perm_transform[8], i, p;
 
@@ -2036,7 +2038,7 @@ int set_octomino_puzzle1(polyominoesstruct *sp)
 */
 
 static
-int set_pentomino_puzzle2(polyominoesstruct *sp)
+int set_pentomino_puzzle2(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_point[5], perm_transform[8], i, p;
 
@@ -2064,7 +2066,7 @@ int set_pentomino_puzzle2(polyominoesstruct *sp)
 */
 
 static
-int set_elevenomino_puzzle2(polyominoesstruct *sp)
+int set_elevenomino_puzzle2(ModeInfo * mi, polyominoesstruct *sp)
 {
   int perm_point[11], perm_transform[8], i, p;
 
@@ -2087,7 +2089,7 @@ int set_elevenomino_puzzle2(polyominoesstruct *sp)
 The main functions.
 **************************************************/
 
-#define allocate(p,type,size) p = (type *) malloc(size); if ((p)==NULL) {free_polyominoes(sp); return;}
+#define allocate(p,type,size) p = (type *) malloc(size); if ((p)==NULL) {free_polyominoes(mi); return;}
 
 ENTRYPOINT void
 init_polyominoes (ModeInfo * mi)
@@ -2097,16 +2099,9 @@ init_polyominoes (ModeInfo * mi)
   int box1, box2;
   int *perm;
 
-  if (polyominoeses == NULL) {
-    if ((polyominoeses
-         = (polyominoesstruct *) calloc(MI_NUM_SCREENS(mi),sizeof (polyominoesstruct))) 
-        == NULL)
-      return;
-  }
+  MI_INIT (mi, polyominoeses, free_polyominoes);
   sp = &polyominoeses[MI_SCREEN(mi)];
 
-  free_polyominoes(sp);
-
   sp->rot180 = 0;
   sp->counter = 0;
 
@@ -2120,62 +2115,62 @@ init_polyominoes (ModeInfo * mi)
   if (sp->identical) {
     switch (NRAND(9)) {
       case 0:
-        if (!set_pentomino_puzzle1(sp))
+        if (!set_pentomino_puzzle1(mi, sp))
           return;
         break;
       case 1:
-        if (!set_hexomino_puzzle1(sp))
+        if (!set_hexomino_puzzle1(mi, sp))
           return;
         break;
       case 2:
-        if (!set_heptomino_puzzle1(sp))
+        if (!set_heptomino_puzzle1(mi, sp))
           return;
         break;
       case 3:
-        if (!set_heptomino_puzzle2(sp))
+        if (!set_heptomino_puzzle2(mi, sp))
           return;
         break;
       case 4:
-        if (!set_elevenomino_puzzle1(sp))
+        if (!set_elevenomino_puzzle1(mi, sp))
           return;
         break;
       case 5:
-        if (!set_dekomino_puzzle1(sp))
+        if (!set_dekomino_puzzle1(mi, sp))
           return;
         break;
       case 6:
-        if (!set_octomino_puzzle1(sp))
+        if (!set_octomino_puzzle1(mi, sp))
           return;
         break;
       case 7:
-        if (!set_pentomino_puzzle2(sp))
+        if (!set_pentomino_puzzle2(mi, sp))
           return;
         break;
       case 8:
-        if (!set_elevenomino_puzzle2(sp))
+        if (!set_elevenomino_puzzle2(mi, sp))
           return;
         break;
     }
   } else {
     switch (NRAND(5)) {
       case 0:
-        if (!set_pentomino_puzzle(sp))
+        if (!set_pentomino_puzzle(mi, sp))
           return;
         break;
       case 1:
-        if (!set_one_sided_pentomino_puzzle(sp))
+        if (!set_one_sided_pentomino_puzzle(mi, sp))
           return;
         break;
       case 2:
-        if (!set_one_sided_hexomino_puzzle(sp))
+        if (!set_one_sided_hexomino_puzzle(mi, sp))
           return;
         break;
       case 3:
-        if (!set_pent_hexomino_puzzle(sp))
+        if (!set_pent_hexomino_puzzle(mi, sp))
           return;
         break;
       case 4:
-        if (!set_tetr_pentomino_puzzle(sp))
+        if (!set_tetr_pentomino_puzzle(mi, sp))
           return;
         break;
     }
@@ -2269,6 +2264,8 @@ draw_polyominoes (ModeInfo * mi)
 #ifdef STANDALONE
     if (sp->eraser) {
       sp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), sp->eraser);
+      if (!sp->eraser)
+        init_polyominoes(mi);
       return;
     }
 #endif
@@ -2277,8 +2274,9 @@ draw_polyominoes (ModeInfo * mi)
     if (++sp->counter > MI_CYCLES(mi)) {
 #ifdef STANDALONE
       sp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), sp->eraser);
-#endif /* STANDALONE */
+#else /* !STANDALONE */
       init_polyominoes(mi);
+#endif /* !STANDALONE */
       return;
     }
   }
@@ -2286,8 +2284,9 @@ draw_polyominoes (ModeInfo * mi)
   if (sp->box == 0) {
 #ifdef STANDALONE
     sp->eraser = erase_window (MI_DISPLAY(mi), MI_WINDOW(mi), sp->eraser);
-#endif /* STANDALONE */
+#else /* !STANDALONE */
     init_polyominoes(mi);
+#endif
     return;
   }
 
@@ -2373,19 +2372,6 @@ reshape_polyominoes(ModeInfo * mi, int width, int height)
   init_polyominoes (mi);
 }
 
-ENTRYPOINT void
-release_polyominoes(ModeInfo * mi)
-{
-  int screen;
-  
-  if (polyominoeses != NULL) {
-    for (screen=0;screen<MI_NUM_SCREENS(mi); screen++)
-      free_polyominoes(&polyominoeses[screen]);
-    (void) free((void *) polyominoeses);
-    polyominoeses = (polyominoesstruct *) NULL;
-  }
-}
-
 ENTRYPOINT void
 refresh_polyominoes (ModeInfo * mi)
 {
index 4833c370d83d53fbe586080461bf787e8f8aae03..33cb602a1658a0d189d3a1382f8c5b38158d0699 100644 (file)
 #include <math.h>
 
 #include "screenhack.h"
-
-#ifdef HAVE_XSHM_EXTENSION
-# include "xshm.h"
-#endif /* HAVE_XSHM_EXTENSION */
+#include "xshm.h"
 
 /* costs ~6% speed */
 #define dither_when_mapped 1
@@ -52,10 +49,7 @@ struct state {
   char *pd;
   int array_width, array_height;
 
-#ifdef HAVE_XSHM_EXTENSION
-  Bool use_shm;
   XShmSegmentInfo shm_info;
-#endif
 
   GC gc;
   XImage *image;
@@ -379,10 +373,6 @@ rd_init (Display *dpy, Window win)
 
   st->delay = get_integer_resource (st->dpy, "delay", "Float");
 
-#ifdef HAVE_XSHM_EXTENSION
-  st->use_shm = get_boolean_resource(st->dpy, "useSHM", "Boolean");
-#endif
-
   XGetWindowAttributes (st->dpy, win, &st->xgwa);
   st->visual = st->xgwa.visual;
   pixack_init(st, &st->width, &st->height);
@@ -485,35 +475,9 @@ rd_init (Display *dpy, Window win)
     }
   }
 
-  st->pd = malloc(st->npix * (st->pdepth == 1 ? 1 : (st->pdepth / 8)));
-  if (!st->pd) {
-    fprintf(stderr, "not enough memory for %d pixels.\n", st->npix);
-    exit(1);
-  }
-
-  st->image = 0;
-
-#ifdef HAVE_XSHM_EXTENSION
-  if (st->use_shm)
-    {
-      st->image = create_xshm_image(st->dpy, st->xgwa.visual, vdepth,
-                               ZPixmap, 0, &st->shm_info, st->width, st->height);
-      if (!st->image)
-       st->use_shm = False;
-      else
-       {
-         free(st->pd);
-         st->pd = st->image->data;
-       }
-    }
-#endif /* HAVE_XSHM_EXTENSION */
-
-  if (!st->image)
-    {
-      st->image = XCreateImage(st->dpy, st->xgwa.visual, vdepth,
-                          ZPixmap, 0, st->pd,
-                          st->width, st->height, 8, 0);
-    }
+  st->image = create_xshm_image(st->dpy, st->xgwa.visual, vdepth,
+                                ZPixmap, &st->shm_info, st->width, st->height);
+  st->pd = st->image->data;
 
   return st;
 }
@@ -528,14 +492,8 @@ rd_draw (Display *dpy, Window win, void *closure)
   pixack_frame(st, st->pd);
   for (i = 0; i < st->array_width; i += st->width)
     for (j = 0; j < st->array_height; j += st->height)
-#ifdef HAVE_XSHM_EXTENSION
-      if (st->use_shm)
-        XShmPutImage(st->dpy, st->window, st->gc, st->image, 0, 0, i+st->array_x, j+st->array_y,
-                     st->width, st->height, False);
-      else
-#endif
-        XPutImage(st->dpy, win, st->gc, st->image, 0, 0, i+st->array_x, j+st->array_y,
-                  st->width, st->height);
+      put_xshm_image(st->dpy, st->window, st->gc, st->image, 0, 0, i+st->array_x, j+st->array_y,
+                     st->width, st->height, &st->shm_info);
 
   st->array_x += st->array_dx;
   st->array_y += st->array_dy;
index 74c2c09817403b21de23f64adb24afafc0cc11ed..447a4555995b8a88ec8ebfbb20522c71e6f76935 100644 (file)
@@ -39,6 +39,7 @@
  * 31 Oct 1999: Added in lighting hack
  * 13 Nov 1999: Speed up tweaks
  *              Adjust "light" for different bits per colour (-water only)
+ * 09 Oct 2016: Updated for new xshm.c
  *
  */
 
@@ -47,9 +48,7 @@
 
 typedef enum {ripple_drop, ripple_blob, ripple_box, ripple_stir} ripple_mode;
 
-#ifdef HAVE_XSHM_EXTENSION
 #include "xshm.h"
-#endif /* HAVE_XSHM_EXTENSION */
 
 #define TABLE 256
 
@@ -98,10 +97,7 @@ struct state {
 
   async_load_state *img_loader;
 
-#ifdef HAVE_XSHM_EXTENSION
-  Bool use_shm;
   XShmSegmentInfo shm_info;
-#endif /* HAVE_XSHM_EXTENSION */
 };
 
 
@@ -243,8 +239,9 @@ draw_transparent_vanilla(struct state *st, short *src)
 
 
 static void
-set_mask(unsigned long color, unsigned long *mask, int *shift)
+set_mask(unsigned long *mask, int *shift)
 {
+  unsigned long color = *mask;
   *shift = 0;
   while (color != 0 && (color & 1) == 0) {
     (*shift)++;
@@ -546,40 +543,16 @@ setup_X(struct state *st)
     exit(1);
   }
 
-  st->buffer_map = 0;
-
-#ifdef HAVE_XSHM_EXTENSION
-  if (st->use_shm) {
-    st->buffer_map = create_xshm_image(st->dpy, xgwa.visual, depth,
-                                  ZPixmap, 0, &st->shm_info, st->bigwidth, st->bigheight);
-    if (!st->buffer_map) {
-      st->use_shm = False;
-      fprintf(stderr, "create_xshm_image failed\n");
-    }
-  }
-#endif /* HAVE_XSHM_EXTENSION */
-
-  if (!st->buffer_map) {
-    st->buffer_map = XCreateImage(st->dpy, xgwa.visual,
-                             depth, ZPixmap, 0, 0,
-                             st->bigwidth, st->bigheight, 8, 0);
-    st->buffer_map->data = (char *)
-      calloc(st->buffer_map->height, st->buffer_map->bytes_per_line);
-  }
+  st->buffer_map = create_xshm_image(st->dpy, xgwa.visual, depth,
+                                     ZPixmap, &st->shm_info, st->bigwidth, st->bigheight);
 }
 
 
 static void
 DisplayImage(struct state *st)
 {
-#ifdef HAVE_XSHM_EXTENSION
-  if (st->use_shm)
-    XShmPutImage(st->dpy, st->window, st->gc, st->buffer_map, 0, 0, 0, 0,
-                st->bigwidth, st->bigheight, False);
-  else
-#endif /* HAVE_XSHM_EXTENSION */
-    XPutImage(st->dpy, st->window, st->gc, st->buffer_map, 0, 0, 0, 0,
-             st->bigwidth, st->bigheight);
+  put_xshm_image(st->dpy, st->window, st->gc, st->buffer_map, 0, 0, 0, 0,
+                 st->bigwidth, st->bigheight, &st->shm_info);
 }
 
 
@@ -968,9 +941,6 @@ ripples_init (Display *disp, Window win)
   st->fluidity = get_integer_resource(disp, "fluidity", "Integer");
   st->transparent = get_boolean_resource(disp, "water", "Boolean");
   st->grayscale_p = get_boolean_resource(disp, "grayscale", "Boolean");
-#ifdef HAVE_XSHM_EXTENSION
-  st->use_shm = get_boolean_resource(disp, "useSHM", "Boolean");
-#endif /* HAVE_XSHM_EXTENSION */
   st->light = get_integer_resource(disp, "light", "Integer");
 
   if (st->delay < 0) st->delay = 0;
@@ -997,9 +967,11 @@ ripples_init (Display *disp, Window win)
   if (st->transparent && st->light > 0) {
     int maxbits;
     st->draw_transparent = draw_transparent_light;
-    set_mask(st->visual->red_mask,   &st->rmask, &st->rshift);
-    set_mask(st->visual->green_mask, &st->gmask, &st->gshift);
-    set_mask(st->visual->blue_mask,  &st->bmask, &st->bshift);
+    visual_rgb_masks (st->screen, st->visual,
+                      &st->rmask, &st->gmask, &st->bmask);
+    set_mask(&st->rmask, &st->rshift);
+    set_mask(&st->gmask, &st->gshift);
+    set_mask(&st->bmask, &st->bshift);
     if (st->rmask == 0) st->draw_transparent = draw_transparent_vanilla;
 
     /* Adjust the shift value "light" when we don't have 8 bits per colour */
@@ -1009,9 +981,11 @@ ripples_init (Display *disp, Window win)
   } else {
     if (st->grayscale_p)
     { 
-      set_mask(st->visual->red_mask,   &st->rmask, &st->rshift);
-      set_mask(st->visual->green_mask, &st->gmask, &st->gshift);
-      set_mask(st->visual->blue_mask,  &st->bmask, &st->bshift);
+      visual_rgb_masks (st->screen, st->visual,
+                        &st->rmask, &st->gmask, &st->bmask);
+      set_mask(&st->rmask, &st->rshift);
+      set_mask(&st->gmask, &st->gshift);
+      set_mask(&st->bmask, &st->bshift);
     }
     st->draw_transparent = draw_transparent_vanilla;
   }
index 1b3d5b39b51396a505cc96fb727c889ab10be454..293b273cb58bfbfc4b108c191d5c6cba5c8ec0dd 100644 (file)
@@ -127,11 +127,7 @@ init_rotor (ModeInfo * mi)
        unsigned char wasiconified;
        rotorstruct *rp;
 
-       if (rotors == NULL) {
-               if ((rotors = (rotorstruct *) calloc(MI_NUM_SCREENS(mi),
-                                             sizeof (rotorstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, rotors, 0);
        rp = &rotors[MI_SCREEN(mi)];
 
 #ifdef HAVE_JWXYZ
index f70511d8e4f6c97d2a1d4120fb80ae9cd9d7d883..58f805cc72f6c24da3dc50e3e86ecc6099ac724c 100644 (file)
 
 #include <math.h>
 #include "screenhack.h"
-
-#ifdef HAVE_XSHM_EXTENSION
 #include "xshm.h"
-#endif
 
 struct zoom_area {
   int w, h;            /* rectangle width and height */
@@ -69,10 +66,7 @@ struct state {
   async_load_state *img_loader;
   Pixmap pm;
 
-#ifdef HAVE_XSHM_EXTENSION
-  Bool use_shm;
   XShmSegmentInfo shm_info;
-#endif
 };
 
 
@@ -331,13 +325,8 @@ update_position (struct zoom_area *za)
 static void
 DisplayImage (struct state *st, int x, int y, int w, int h)
 {
-#ifdef HAVE_XSHM_EXTENSION
-  if (st->use_shm)
-    XShmPutImage (st->dpy, st->window, st->gc, st->buffer_map, x, y, x, y,
-                  w, h, False);
-  else
-#endif /* HAVE_XSHM_EXTENSION */
-    XPutImage(st->dpy, st->window, st->gc, st->buffer_map, x, y, x, y, w, h);
+  put_xshm_image (st->dpy, st->window, st->gc, st->buffer_map, x, y, x, y,
+                  w, h, &st->shm_info);
 }
 
 
@@ -487,25 +476,8 @@ setup_X (struct state *st)
   st->img_loader = load_image_async_simple (0, xgwa.screen, st->window,
                                             st->pm, 0, 0);
 
-  st->buffer_map = 0;
-
-#ifdef HAVE_XSHM_EXTENSION
-  if (st->use_shm) {
-    st->buffer_map = create_xshm_image(st->dpy, xgwa.visual, depth,
-                                       ZPixmap, 0, &st->shm_info, st->width, st->height);
-    if (!st->buffer_map) {
-      st->use_shm = False;
-      fprintf(stderr, "create_xshm_image failed\n");
-    }
-  }
-#endif /* HAVE_XSHM_EXTENSION */
-
-  if (!st->buffer_map) {
-    st->buffer_map = XCreateImage(st->dpy, xgwa.visual,
-                                  depth, ZPixmap, 0, 0, st->width, st->height, 8, 0);
-    st->buffer_map->data = (char *)calloc (st->buffer_map->height,
-                                           st->buffer_map->bytes_per_line);
-  }
+  st->buffer_map = create_xshm_image(st->dpy, xgwa.visual, depth,
+                                     ZPixmap, &st->shm_info, st->width, st->height);
 }
 
 
@@ -515,9 +487,6 @@ rotzoomer_init (Display *dpy, Window window)
   struct state *st = (struct state *) calloc (1, sizeof(*st));
   st->dpy = dpy;
   st->window = window;
-#ifdef HAVE_XSHM_EXTENSION
-  st->use_shm = get_boolean_resource (st->dpy, "useSHM", "Boolean");
-#endif
   st->num_zoom = get_integer_resource (st->dpy, "numboxes", "Integer");
 
   set_mode(st);
index 8689d4f5da36f5b4f4af3dbb32a536188e1798db..4850911db59bb5415c966d692e7905d17a846f90 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992-2014 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2017 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
@@ -578,7 +578,7 @@ run_screenhack_table (Display *dpy,
 
       if (fpst) fps_cb (dpy, window, fpst, closure);
 #ifdef DEBUG_PAIR
-      if (fpst2) fps_cb (dpy, window, fpst2, closure);
+      if (fpst2) fps_cb (dpy, window2, fpst2, closure2);
 #endif
 
       if (! usleep_and_process_events (dpy, ft,
index 4f1aa34a3051557fabffb46355f19a108c8c2f51..3e3d89b30a6ea0b500ee1f40394954b3b1015011 100644 (file)
@@ -42,6 +42,7 @@ static const char sccsid[] = "@(#)sierpinski.c        5.00 2000/11/01 xlockmore";
                                        "*ignoreRotation: True \n" \
 
 # define BRIGHT_COLORS
+# define release_sierpinski 0
 # define sierpinski_handle_event 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
@@ -55,7 +56,7 @@ ENTRYPOINT ModeSpecOpt sierpinski_opts =
 
 #ifdef USE_MODULES
 ModStruct   sierpinski_description =
-{"sierpinski", "init_sierpinski", "draw_sierpinski", "release_sierpinski",
+{"sierpinski", "init_sierpinski", "draw_sierpinski", (char *) NULL,
  "refresh_sierpinski", "init_sierpinski", (char *) NULL, &sierpinski_opts,
  400000, 2000, 100, 1, 64, 1.0, "",
  "Shows Sierpinski's triangle", 0, NULL};
@@ -115,8 +116,9 @@ startover(ModeInfo * mi)
 }
 
 static void
-free_sierpinski(sierpinskistruct *sp)
+free_sierpinski(ModeInfo * mi)
 {
+       sierpinskistruct *sp = &tris[MI_SCREEN(mi)];
        int corner;
 
        for (corner = 0; corner < MAXCORNERS; corner++)
@@ -132,11 +134,7 @@ init_sierpinski(ModeInfo * mi)
        int         i;
        sierpinskistruct *sp;
 
-       if (tris == NULL) {
-               if ((tris = (sierpinskistruct *) calloc(MI_NUM_SCREENS(mi),
-                                        sizeof (sierpinskistruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, tris, free_sierpinski);
        sp = &tris[MI_SCREEN(mi)];
 
        sp->width = MI_WIDTH(mi);
@@ -153,7 +151,7 @@ init_sierpinski(ModeInfo * mi)
                if (!sp->pointBuffer[i])
                        if ((sp->pointBuffer[i] = (XPoint *) malloc(sp->total_npoints *
                                        sizeof (XPoint))) == NULL) {
-                               free_sierpinski(sp);
+                               free_sierpinski(mi);
                                return;
                        }
        }
@@ -207,19 +205,6 @@ reshape_sierpinski(ModeInfo * mi, int width, int height)
   init_sierpinski (mi);
 }
 
-ENTRYPOINT void
-release_sierpinski(ModeInfo * mi)
-{
-       if (tris != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_sierpinski(&tris[screen]);
-               (void) free((void *) tris);
-               tris = (sierpinskistruct *) NULL;
-       }
-}
-
 ENTRYPOINT void
 refresh_sierpinski(ModeInfo * mi)
 {
index 775c06d9292e2527b06fd5edf36195ddf139113e..6537086b731aab668da321c51a8709b7a2dcaea4 100644 (file)
@@ -35,6 +35,7 @@ static const char sccsid[] = "@(#)slip.c      5.00 2000/11/01 xlockmore";
                                        "*ignoreRotation: True \n" \
 
 # define refresh_slip 0
+# define release_slip 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
 # include "xlock.h"            /* in xlockmore distribution */
@@ -47,7 +48,7 @@ ENTRYPOINT ModeSpecOpt slip_opts =
 
 #ifdef USE_MODULES
 ModStruct   slip_description =
-{"slip", "init_slip", "draw_slip", "release_slip",
+{"slip", "init_slip", "draw_slip", (char *) NULL,
  "init_slip", "init_slip", (char *) NULL, &slip_opts,
  50000, 35, 50, 1, 64, 1.0, "",
  "Shows slipping blits", 0, NULL};
@@ -210,11 +211,7 @@ init_slip (ModeInfo * mi)
 {
        slipstruct *sp;
 
-       if (slips == NULL) {
-               if ((slips = (slipstruct *) calloc(MI_NUM_SCREENS(mi),
-                                              sizeof (slipstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, slips, 0);
        sp = &slips[MI_SCREEN(mi)];
 
        sp->nblits_remaining = 0;
@@ -353,15 +350,6 @@ X Error of failed request:  BadDrawable (invalid Pixmap or Window parameter)
        }
 }
 
-ENTRYPOINT void
-release_slip (ModeInfo * mi)
-{
-       if (slips != NULL) {
-               (void) free((void *) slips);
-               slips = (slipstruct *) NULL;
-       }
-}
-
 ENTRYPOINT Bool
 slip_handle_event (ModeInfo *mi, XEvent *event)
 {
index 468a648d07a8f87ec3eb3618f9f870202b6627b8..edeaa8f7597b8df6d2f4eb7090dcd700604e80f6 100644 (file)
@@ -115,11 +115,7 @@ init_sphere(ModeInfo * mi)
 {
        spherestruct *sp;
 
-       if (spheres == NULL) {
-               if ((spheres = (spherestruct *) calloc(MI_NUM_SCREENS(mi),
-                                            sizeof (spherestruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, spheres, 0);
        sp = &spheres[MI_SCREEN(mi)];
 
        if (sp->points != NULL) {
index bfef07d8b6a30ebcdf7b89882d9ef3ace230cd64..fc73104ca7800d141d03dadfa0b3caee23b4870f 100644 (file)
@@ -127,11 +127,7 @@ init_spiral(ModeInfo * mi)
        spiralstruct *sp;
        int         i;
 
-       if (spirals == NULL) {
-               if ((spirals = (spiralstruct *) calloc(MI_NUM_SCREENS(mi),
-                                            sizeof (spiralstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, spirals, 0);
        sp = &spirals[MI_SCREEN(mi)];
 
 #ifdef HAVE_JWXYZ
index b1739acd534a7977e46bdd7c05de57c5325261d1..5e59ba4a0df0f5009b9b2e3f491d3e27e11da5a0 100644 (file)
@@ -21,54 +21,100 @@ static const char sccsid[] = "@(#)strange.c        5.00 2000/11/01 xlockmore";
 * other special, indirect and consequential damages.
 *
 * Revision History:
+* 10-Apr-2017: dmo2118@gmail.com: Enhancements for accumulator mode:
+*              Performance tuning, varying colors, fixed wobbliness.
+*              New options: point size, zoom, brightness, motion blur.
+* 08-Apr-2017: dmo2118@gmail.com: Merged with current xlockmore strange.c.
+*              Also resurrected the -curve parameter from XScreenSaver 2.31.
+*              Multi-monitor fixes.
+*              More allocation checks.
+* 13-Apr-2010: Added useAccumulator, VARY_SPEED_TO_AVOID_BOREDOM.
+* 22-Dec-2004: TDA: Replace Gauss_Rand with a real Gaussian.
 * 01-Nov-2000: Allocation checks
-* 10-May-1997: jwz@jwz.org: turned into a standalone program.
+* 30-Jul-1998: sineswiper@resonatorsoft.com: added curve factor (discovered
+*              while experimenting with the Gauss_Rand function).
+* 10-May-1997: jwz AT jwz.org: turned into a standalone program.
 *              Made it render into an offscreen bitmap and then copy
 *              that onto the screen, to reduce flicker.
 *
 * strange attractors are not so hard to find...
 */
 
-/* TODO: Bring over tweaks from 3.x version.
-* For a good idea of what's missing, diff strange.c.20081107-good2 against strange.c-3.29
-* We forked from the 3.29 series at 20081107, so anything added since then may be missing.
+/* Be sure to try:
+* ./strange -points 500000 -delay 0 -point-size 3
+* ./strange -points 500000 -delay 0 -point-size 2 -curve 5 -zoom 1.5 -brightness 0.75
 */
 
+/* TODO: Can anything be done about the overflow with -point-size 32? */
+
 #ifdef STANDALONE
 # define MODE_strange
 # define DEFAULTS      "*delay: 10000 \n" \
                                        "*ncolors: 100 \n" \
                                        "*fpsSolid: True \n" \
                                        "*ignoreRotation: True \n" \
+                                       "*useSHM: True \n" \
+                                       "*useThreads: True \n" \
 
 # define SMOOTH_COLORS
 # define refresh_strange 0
+# define release_strange 0
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 #else /* !STANDALONE */
 # include "xlock.h"            /* from the xlockmore distribution */
+# define ENTRYPOINT
 #endif /* !STANDALONE */
 
-#ifdef MODE_strange
-#define DEF_CURVE  "10"
-#define DEF_POINTS "5500"
+#include <errno.h>
+#include "pow2.h"
+#include "thread_util.h"
 
-/*static int curve;*/
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+#ifdef MODE_strange
+#define DEF_CURVE       "10"
+#define DEF_POINTS      "5500"
+#define DEF_POINT_SIZE  "1"
+#define DEF_ZOOM        "0.9" /* approx. 1 / 1.1 */
+#define DEF_BRIGHTNESS  "1.0"
+#define DEF_MOTION_BLUR "3.0" /* Formerly MERGE_FRAMES, but it's IIR now. */
+
+static int curve;
 static int points;
+static int pointSize;
+static float zoom;
+static float brightness;
+static float motionBlur;
 
 static XrmOptionDescRec opts[] =
 {
-/*             {"-curve",  ".strange.curve",  XrmoptionSepArg, 0}, */
-               {"-points", ".strange.points", XrmoptionSepArg, 0},
+               {"-curve",        ".strange.curve",      XrmoptionSepArg, 0},
+               {"-points",       ".strange.points",     XrmoptionSepArg, 0},
+               {"-point-size",   ".strange.pointSize",  XrmoptionSepArg, 0},
+               {"-zoom",         ".strange.zoom",       XrmoptionSepArg, 0},
+               {"-brightness",   ".strange.brightness", XrmoptionSepArg, 0},
+               {"-motion-blur",  ".strange.motionBlur", XrmoptionSepArg, 0},
+               THREAD_OPTIONS
 };
 static argtype vars[] =
 {
-/*             {&curve,  "curve",  "Curve",  DEF_CURVE,  t_Int},*/
-               {&points, "points", "Points", DEF_POINTS, t_Int},
+               {&curve,      "curve",      "Curve",      DEF_CURVE,       t_Int},
+               {&points,     "points",     "Points",     DEF_POINTS,      t_Int},
+               {&pointSize,  "pointSize",  "PointSize",  DEF_POINT_SIZE,  t_Int},
+               {&zoom,       "zoom",       "Zoom",       DEF_ZOOM,        t_Float},
+               {&brightness, "brightness", "Brightness", DEF_BRIGHTNESS,  t_Float},
+               {&motionBlur, "motionBlur", "MotionBlur", DEF_MOTION_BLUR, t_Float},
 };
 static OptionStruct desc[] =
 {
-/*             {"-curve", "set the curve factor of the attractors"},*/
+               {"-curve", "set the curve factor of the attractors"},
                {"-points", "change the number of points/iterations each frame"},
+               {"-point-size", "change the size of individual points"},
+               {"-zoom", "zoom in or out"},
+               {"-brightness", "adjust the brightness for accumulator mode"},
+               {"-motion-blur", "adds motion blur"},
 };
 ENTRYPOINT ModeSpecOpt strange_opts =
 {sizeof opts / sizeof opts[0], opts,
@@ -76,9 +122,9 @@ sizeof vars / sizeof vars[0], vars, desc};
 
 #ifdef USE_MODULES
 ModStruct   strange_description =
-{"strange", "init_strange", "draw_strange", "release_strange",
+{"strange", "init_strange", "draw_strange", (char *) NULL,
 "init_strange", "init_strange", (char *) NULL, &strange_opts,
-1000, 1, 1, 1, 64, 1.0, "",
+10000, 1, 1, 1, 64, 1.0, "",
 "Shows strange attractors", 0, NULL};
 #endif
 
@@ -89,8 +135,10 @@ ModStruct   strange_description =
 typedef float DBL;
 typedef int PRM;
 
-#define UNIT (1<<12)
+#define UNIT_BITS 12
+#define UNIT (1<<UNIT_BITS)
 #define UNIT2 (1<<14)
+#define COLOR_BITS 16
 /* #define UNIT2 (3140*UNIT/1000) */
 
 #define SKIP_FIRST      100
@@ -111,45 +159,97 @@ DBL_To_PRM( 1.0-exp( -16.0*(a)/UNIT2 ) )
 * If it is defined, then support for the accumulator will be compiled.
 * It is also the condition for which the accumulator renderer will engage.
 */
-#define useAccumulator (Root->Max_Pt > 6000)
+#define useAccumulator (A->Max_Pt > 6000)
 #define ACC_GAMMA 10.0
-#define NUM_COLS 150
+#define DEF_NUM_COLS 150
 /* Extra options: */
 #define VARY_SPEED_TO_AVOID_BOREDOM
-#define POINTS_HISTORY
-#define MERGE_FRAMES 3
+/*#define AUTO_ZOOM*/ /* Works funny, but try it with -curve 5. */
 
 /******************************************************************/
 
 #define MAX_PRM 3*5
 
+#if defined(__BIGGEST_ALIGNMENT__) \
+       && (defined(__GNUC__) \
+        && (__GNUC__ == 4 && __GNUC_MINOR__ >= 4 || __GNUC__ >= 5) \
+       || defined(__clang__))
+# define ALIGNED __attribute__((aligned(__BIGGEST_ALIGNMENT__)))
+# define ALIGN_HINT(ptr) __builtin_assume_aligned((ptr), __BIGGEST_ALIGNMENT__)
+#else
+# define ALIGNED
+# define ALIGN_HINT(ptr) (ptr)
+# ifndef __BIGGEST_ALIGNMENT__
+#  define __BIGGEST_ALIGNMENT__ (sizeof(void *))
+# endif
+#endif
+
+
+#ifdef HAVE_INTTYPES_H
+typedef uint16_t ALIGNED PIXEL0;
+typedef uint32_t PIXEL0X;
+typedef uint32_t ALIGNED PIXEL1;
+#else
+typedef unsigned short ALIGNED PIXEL0;
+typedef unsigned long PIXEL0X;
+typedef unsigned long ALIGNED PIXEL1;
+#endif
+
+static const union {
+#ifdef HAVE_INTTYPES_H
+       uint16_t signature;
+       uint8_t bytes[2];
+#else
+       unsigned short signature;
+       unsigned char bytes[2];
+#endif
+} byte_order_union = {MSBFirst};
+
+#define LOCAL_BYTE_ORDER byte_order_union.bytes[1]
+
 typedef struct _ATTRACTOR {
        DBL         Prm1[MAX_PRM], Prm2[MAX_PRM];
        PRM         Prm[MAX_PRM], *Fold;
-       void        (*Iterate) (struct _ATTRACTOR *, PRM, PRM, PRM *, PRM *);
-       XPoint     *Buffer1, *Buffer2;
+       void        (*Iterate) (const struct _ATTRACTOR *, PRM, PRM, PRM *, PRM *);
+       void       *Buffer1, *Buffer2; /* Either XPoint or XRectangle. */
        int         Cur_Pt, Max_Pt;
        int         Col, Count, Speed;
        int         Width, Height;
        Pixmap      dbuf;       /* jwz */
        GC          dbuf_gc;
        #ifdef useAccumulator
-               int **accMap;
+               int visualClass;
+               size_t alignedWidth;
+               unsigned long rMask, gMask, bMask;
+               unsigned rShift, gShift, bShift;
+               PIXEL0 blurFac; /* == 0 when no motion blur is taking place. */
+               double colorFac;
+               XColor *palette;
+               unsigned numCols;
+               unsigned long *cols;
+               XImage *accImage;
+               XShmSegmentInfo shmInfo;
+               struct _THREAD **threads;
+               struct threadpool pool;
        #endif
 } ATTRACTOR;
 
-static ATTRACTOR *Root = (ATTRACTOR *) NULL; 
+static ATTRACTOR *Root = (ATTRACTOR *) NULL;
 
 #ifdef useAccumulator
-static XColor* cols;
-#endif
-
-#ifdef POINTS_HISTORY
-static int numOldPoints;
-static int* oldPointsX;
-static int* oldPointsY;
-static int oldPointsIndex;
-static int startedClearing;
+typedef struct _THREAD {
+       const ATTRACTOR *Attractor;
+       unsigned long Rnd;
+       size_t y0, y1, y2;
+
+       PIXEL0 **accMap;
+       PIXEL0 *bloomRows;
+       PIXEL1 *colorRow;
+       PIXEL0 *motionBlur;
+
+       PRM xmin, xmax, ymin, ymax;
+       unsigned pixelCount;
+} THREAD;
 #endif
 
 static DBL  Amp_Prm[MAX_PRM] =
@@ -165,26 +265,85 @@ static DBL  Mid_Prm[MAX_PRM] =
        0.0, 1.5, -1.0, -.5, 2.5,
 };
 
+#if 0
+
+static inline uint64_t frq(void)
+{
+       return 1000000;
+}
+
+static inline uint64_t tick(void)
+{
+       struct timeval tv;
+       gettimeofday(&tv, NULL);
+       return tv.tv_sec * frq() + tv.tv_usec;
+}
+
+#endif
+
 static      DBL
-Gauss_Rand(DBL c, DBL A, DBL S)
+Old_Gauss_Rand(DBL c, DBL A, DBL S)
 {
-       DBL         y;
+       DBL         y,z;
 
        y = (DBL) LRAND() / MAXRAND;
-       y = A * (1.0 - exp(-y * y * S)) / (1.0 - exp(-S));
+       z = curve / 10;
+       y = A * (z - exp(-y * y * S)) / (z - exp(-S));
        if (NRAND(2))
                return (c + y);
        else
                return (c - y);
 }
 
+#if 0
+/* dmo2118: seems to be responsible for lots of boring-looking rings */
+
+/* I don't know that it makes a difference, but this one actually *is*
+   a Gaussian.  [TDA] */
+
+/* Generate Gaussian random number: mean c, "amplitude" A (actually
+   A is 3*standard deviation).  'S' is unused.  */
+
+/* Note this generates a pair of gaussian variables, so it saves one
+   to give out next time it's called */
+
+static double
+Gauss_Rand(DBL c, DBL A, DBL S)
+{
+       static double d;
+       static Bool ready = 0;
+       if(ready) {
+               ready = 0;
+               return c + A/3 * d;
+       } else {
+               double x, y, w;
+               do {
+                       x = 2.0 * (double)LRAND() / MAXRAND - 1.0;
+                       y = 2.0 * (double)LRAND() / MAXRAND - 1.0;
+                       w = x*x + y*y;
+               } while(w >= 1.0);
+
+               w = sqrt((-2 * log(w))/w);
+               ready = 1;
+               d =          x * w;
+               return c + A/3 * y * w;
+       }
+}
+#endif
+
 static void
 Random_Prm(DBL * Prm)
 {
        int         i;
 
-       for (i = 0; i < MAX_PRM; ++i)
-               Prm[i] = Gauss_Rand(Mid_Prm[i], Amp_Prm[i], 4.0);
+       for (i = 0; i < MAX_PRM; ++i) {
+#if 0
+               if (curve == 10)
+                       Prm[i] = Gauss_Rand (Mid_Prm[i], Amp_Prm[i], 4.0);
+               else
+#endif
+                       Prm[i] = Old_Gauss_Rand (Mid_Prm[i], Amp_Prm[i], 4.0);
+       }
 }
 
 /***************************************************************/
@@ -192,67 +351,82 @@ Random_Prm(DBL * Prm)
   /* 2 examples of non-linear map */
 
 static void
-Iterate_X2(ATTRACTOR * A, PRM x, PRM y, PRM * xo, PRM * yo)
+Iterate_X2(const ATTRACTOR * A, PRM x, PRM y, PRM * xo, PRM * yo)
 {
        PRM         xx, yy, xy, x2y, y2x, Tmp;
 
-       xx = (x * x) / UNIT;
-       x2y = (xx * y) / UNIT;
-       yy = (y * y) / UNIT;
-       y2x = (yy * x) / UNIT;
-       xy = (x * y) / UNIT;
+       xx = (x * x) >> UNIT_BITS;
+       x2y = (xx * y) >> UNIT_BITS;
+       yy = (y * y) >> UNIT_BITS;
+       y2x = (yy * x) >> UNIT_BITS;
+       xy = (x * y) >> UNIT_BITS;
 
        Tmp = A->Prm[1] * xx + A->Prm[2] * xy + A->Prm[3] * yy + A->Prm[4] * x2y;
-       Tmp = A->Prm[0] - y + (Tmp / UNIT);
+       Tmp = A->Prm[0] - y + (Tmp >> UNIT_BITS);
        *xo = DO_FOLD(Tmp);
        Tmp = A->Prm[6] * xx + A->Prm[7] * xy + A->Prm[8] * yy + A->Prm[9] * y2x;
-       Tmp = A->Prm[5] + x + (Tmp / UNIT);
+       Tmp = A->Prm[5] + x + (Tmp >> UNIT_BITS);
        *yo = DO_FOLD(Tmp);
 }
 
 static void
-Iterate_X3(ATTRACTOR * A, PRM x, PRM y, PRM * xo, PRM * yo)
+Iterate_X3(const ATTRACTOR * A, PRM x, PRM y, PRM * xo, PRM * yo)
 {
        PRM         xx, yy, xy, x2y, y2x, Tmp_x, Tmp_y, Tmp_z;
 
-       xx = (x * x) / UNIT;
-       x2y = (xx * y) / UNIT;
-       yy = (y * y) / UNIT;
-       y2x = (yy * x) / UNIT;
-       xy = (x * y) / UNIT;
+       xx = (x * x) >> UNIT_BITS;
+       x2y = (xx * y) >> UNIT_BITS;
+       yy = (y * y) >> UNIT_BITS;
+       y2x = (yy * x) >> UNIT_BITS;
+       xy = (x * y) >> UNIT_BITS;
 
        Tmp_x = A->Prm[1] * xx + A->Prm[2] * xy + A->Prm[3] * yy + A->Prm[4] * x2y;
-       Tmp_x = A->Prm[0] - y + (Tmp_x / UNIT);
+       Tmp_x = A->Prm[0] - y + (Tmp_x >> UNIT_BITS);
        Tmp_x = DO_FOLD(Tmp_x);
 
        Tmp_y = A->Prm[6] * xx + A->Prm[7] * xy + A->Prm[8] * yy + A->Prm[9] * y2x;
-       Tmp_y = A->Prm[5] + x + (Tmp_y / UNIT);
+       Tmp_y = A->Prm[5] + x + (Tmp_y >> UNIT_BITS);
 
        Tmp_y = DO_FOLD(Tmp_y);
 
        Tmp_z = A->Prm[11] * xx + A->Prm[12] * xy + A->Prm[13] * yy + A->Prm[14] * y2x;
-       Tmp_z = A->Prm[10] + x + (Tmp_z / UNIT);
-       Tmp_z = UNIT + Tmp_z * Tmp_z / UNIT;
-
+       Tmp_z = A->Prm[10] + x + (Tmp_z >> UNIT_BITS);
+       Tmp_z = UNIT + ((Tmp_z * Tmp_z) >> UNIT_BITS);
+
+       /* Can happen with -curve 9. */
+       if (!Tmp_z)
+               Tmp_z = 1;
+
+#ifdef HAVE_INTTYPES_H
+       {
+               uint64_t Tmp_z1 = (1 << 30) / Tmp_z;
+               *xo = (Tmp_x * Tmp_z1) >> (30 - UNIT_BITS);
+               *yo = (Tmp_y * Tmp_z1) >> (30 - UNIT_BITS);
+       }
+#else
        *xo = (Tmp_x * UNIT) / Tmp_z;
        *yo = (Tmp_y * UNIT) / Tmp_z;
+#endif
 }
 
-static void (*Funcs[2]) (ATTRACTOR *, PRM, PRM, PRM *, PRM *) = {
+static void (*Funcs[2]) (const ATTRACTOR *, PRM, PRM, PRM *, PRM *) = {
        Iterate_X2, Iterate_X3
 };
 
 /***************************************************************/
 
 static void
-free_strange(Display *display, ATTRACTOR *A)
+free_strange(ModeInfo *mi)
 {
+       Display *display = MI_DISPLAY(mi);
+       ATTRACTOR  *A = &Root[MI_SCREEN(mi)];
+
        if (A->Buffer1 != NULL) {
-               (void) free((void *) A->Buffer1);
+               free(A->Buffer1);
                A->Buffer1 = (XPoint *) NULL;
        }
        if (A->Buffer2 != NULL) {
-               (void) free((void *) A->Buffer2);
+               free(A->Buffer2);
                A->Buffer2 = (XPoint *) NULL;
        }
        if (A->dbuf) {
@@ -264,9 +438,447 @@ free_strange(Display *display, ATTRACTOR *A)
                A->dbuf_gc = None;
        }
        if (A->Fold != NULL) {
-               (void) free((void *) A->Fold);
+               free(A->Fold);
                A->Fold = (PRM *) NULL;
        }
+
+#ifdef useAccumulator
+       if (useAccumulator) {
+               if (A->pool.count) {
+                       threadpool_destroy (&A->pool);
+                       A->pool.count = 0;
+               }
+
+               free (A->threads);
+               A->threads = NULL;
+
+               if (A->accImage) {
+                       destroy_xshm_image (display, A->accImage, &A->shmInfo);
+                       A->accImage = NULL;
+               }
+
+               free (A->palette);
+               A->palette = NULL;
+
+               if (A->cols) {
+                       if (A->visualClass != TrueColor && A->numCols > 2)
+                               XFreeColors (display, MI_COLORMAP(mi), A->cols, A->numCols, 0);
+                       free (A->cols);
+                       A->cols = NULL;
+               }
+       }
+#endif
+}
+
+/* NRAND() is also in use; making three PRNGs in total here. */
+
+/* ISO/IEC 9899 suggests this one. Doesn't require 64-bit math. */
+#define GOODRND(seed) ((seed) = (((seed) * 1103515245 + 12345) & 0x7fffffff))
+#define GOODRND_BITS 31
+
+/* Extremely cheap entropy: this is often a single LEA instruction. */
+#define CHEAPRND(seed) ((seed) = (seed) * 5)
+
+static void
+init_draw (const ATTRACTOR *A, PRM *x, PRM *y,
+           PRM *xmin, PRM *ymin, PRM *xmax, PRM *ymax, unsigned long *rnd)
+{
+       int         n;
+       PRM         xo, yo;
+
+       *xmin = UNIT;
+       *ymin = UNIT;
+       *xmax = -UNIT;
+       *ymax = -UNIT;
+
+       *x = *y = DBL_To_PRM(.0);
+       for (n = SKIP_FIRST; n; --n) {
+               (*A->Iterate) (A, *x, *y, &xo, &yo);
+
+#ifdef AUTO_ZOOM
+               if (xo > *xmax)
+                       *xmax = xo;
+               if (xo < *xmin)
+                       *xmin = xo;
+               if (yo > *ymax)
+                       *ymax = yo;
+               if (yo < *ymin)
+                       *ymin = yo;
+#endif
+
+               /* Can't use NRAND(), because that modifies global state in a
+                * thread-unsafe way.
+                */
+               *x = xo + (GOODRND(*rnd) >> (GOODRND_BITS - 3)) - 4;
+               *y = yo + (GOODRND(*rnd) >> (GOODRND_BITS - 3)) - 4;
+       }
+}
+
+static void
+recalc_scale (const ATTRACTOR *A, PRM xmin, PRM ymin, PRM xmax, PRM ymax,
+              DBL *Lx, DBL *Ly, PRM *mx, PRM *my)
+{
+#ifndef AUTO_ZOOM
+       xmin = -UNIT;
+       ymin = -UNIT;
+       xmax = UNIT;
+       ymax = UNIT;
+#endif
+
+       *Lx = zoom * (DBL) A->Width / (xmax - xmin);
+       *Ly = -zoom * (DBL) A->Height / (ymax - ymin);
+       *mx = A->Width/2 - (xmax + xmin) * *Lx / 2;
+       *my = A->Height/2 - (ymax + ymin) * *Ly / 2;
+}
+
+#ifdef useAccumulator
+
+static void
+thread_destroy (void *Self_Raw)
+{
+       THREAD     *T = (THREAD *)Self_Raw;
+
+       aligned_free (T->accMap[0]);
+       (void) free((void *) T->accMap);
+       aligned_free (T->bloomRows);
+       aligned_free (T->colorRow);
+       aligned_free (T->motionBlur);
+}
+
+static int
+thread_create (void *Self_Raw, struct threadpool *pool, unsigned id)
+{
+       THREAD     *T = (THREAD *)Self_Raw;
+       int         i;
+       const ATTRACTOR *A = GET_PARENT_OBJ(ATTRACTOR, pool, pool);
+
+       memset (T, 0, sizeof(*T));
+
+       T->Attractor = A;
+       A->threads[id] = T;
+
+       T->Rnd = random();
+
+       /* The gap between y0 and y1 is to preheat the box blur. */
+       T->y1 = A->Height * id / pool->count;
+       T->y2 = A->Height * (id + 1) / pool->count;
+       T->y0 = T->y1 < pointSize ? 0 : T->y1 - pointSize;
+
+       T->accMap = (PIXEL0**)calloc(A->Height,sizeof(PIXEL0*));
+       if (!T->accMap) {
+               thread_destroy (T);
+               return ENOMEM;
+       }
+       T->accMap[0] = NULL;
+       if (aligned_malloc ((void **)&T->accMap[0], __BIGGEST_ALIGNMENT__,
+               A->alignedWidth * A->Height * sizeof(PIXEL0))) {
+               thread_destroy (T);
+               return ENOMEM;
+       }
+       for (i=0;i<A->Height;i++)
+               T->accMap[i] = T->accMap[0] + A->alignedWidth * i;
+
+       if (aligned_malloc ((void **)&T->bloomRows, __BIGGEST_ALIGNMENT__,
+               A->alignedWidth * (pointSize + 2) * sizeof(*T->bloomRows))) {
+               thread_destroy (T);
+               return ENOMEM;
+       }
+       if (aligned_malloc ((void **)&T->colorRow, __BIGGEST_ALIGNMENT__,
+               A->alignedWidth * sizeof(*T->colorRow))) {
+               thread_destroy (T);
+               return ENOMEM;
+       }
+       if (A->blurFac) {
+               if (aligned_malloc ((void **)&T->motionBlur, __BIGGEST_ALIGNMENT__,
+                       A->alignedWidth * (T->y2 - T->y1) * sizeof(*T->motionBlur))) {
+                       thread_destroy (T);
+                       return ENOMEM;
+               }
+
+               memset (T->motionBlur, 0, A->alignedWidth * (T->y2 - T->y1) * sizeof(*T->motionBlur));
+       }
+
+       return 0;
+}
+
+static void
+points_thread (void *Self_Raw)
+{
+       /* Restricts viewable area to 2^(32-L_Bits). */
+       const unsigned L_Bits = 19; /* Max. image size: 8192x8192. */
+
+       THREAD     *T = (THREAD *)Self_Raw;
+       const ATTRACTOR *A = T->Attractor;
+       int         n;
+       PRM         x, y, xo, yo;
+       DBL         Lx, Ly;
+       PRM         iLx, iLy, cx, cy;
+       void        (*Iterate) (const ATTRACTOR *, PRM, PRM, PRM *, PRM *);
+       unsigned    Rnd;
+       PRM         xmax, xmin, ymax, ymin;
+
+       Iterate = A->Iterate;
+
+       if (useAccumulator) {
+               memset (T->accMap[0], 0, sizeof(PIXEL0) * A->alignedWidth * A->Height);
+       }
+
+       /* Using CHEAPRND() by itself occasionally gets stuck at 0 mod 8, so seed it
+        * from GOODRND().
+        */
+       init_draw (A, &x, &y, &xmin, &ymin, &xmax, &ymax, &T->Rnd);
+       recalc_scale (A, xmin, ymin, xmax, ymax, &Lx, &Ly, &cx, &cy);
+
+       Rnd = GOODRND(T->Rnd);
+
+       iLx = Lx * (1 << L_Bits);
+       iLy = Ly * (1 << L_Bits);
+       if (!iLx) /* Can happen with small windows. */
+               iLx = 1;
+       if (!iLy)
+               iLy = 1;
+
+       for (n = T->Attractor->Max_Pt / A->pool.count; n; --n) {
+               unsigned mx,my;
+               (*Iterate) (T->Attractor, x, y, &xo, &yo);
+               mx = ((iLx * x) >> L_Bits) + cx;
+               my = ((iLy * y) >> L_Bits) + cy;
+               /* Fun trick: making m[x|y] unsigned means we can skip mx<0 && my<0. */
+               if (mx<A->Width && my<A->Height)
+                       T->accMap[my][mx]++;
+
+               #ifdef AUTO_ZOOM
+               if (xo > xmax)
+                       xmax = xo;
+               if (xo < xmin)
+                       xmin = xo;
+               if (yo > ymax)
+                       ymax = yo;
+               if (yo < ymin)
+                       ymin = yo;
+
+               if (!(n & 0xfff)) {
+                       recalc_scale (A, xmin, ymin, xmax, ymax, &Lx, &Ly, &cx, &cy);
+               }
+               #endif
+
+               /* Skimp on the randomness. */
+               x = xo + (CHEAPRND(Rnd) >> (sizeof(Rnd) * 8 - 3)) - 4;
+               y = yo + (CHEAPRND(Rnd) >> (sizeof(Rnd) * 8 - 3)) - 4;
+       }
+}
+
+static void
+rasterize_thread (void *Self_Raw)
+{
+       THREAD     *T = (THREAD *)Self_Raw;
+       const ATTRACTOR *A = T->Attractor;
+       unsigned    i, j, k;
+       PRM         xmax = 0, xmin = A->Width, ymax = 0, ymin = A->Height;
+       unsigned long colorScale =
+               (double)A->Width * A->Height
+               * (1 << COLOR_BITS) * brightness
+               * A->colorFac
+               * (zoom * zoom) / (0.9 * 0.9)
+               / 640.0 / 480.0
+               / (pointSize * pointSize)
+               * 800000.0
+               / (float)A->Max_Pt
+               * (float)A->numCols/256;
+       #ifdef VARY_SPEED_TO_AVOID_BOREDOM
+       unsigned    pixelCount = 0;
+       #endif
+       PIXEL0     *motionBlurRow = T->motionBlur;
+       void       *outRow = (char *)A->accImage->data
+                            + A->accImage->bytes_per_line * T->y1;
+
+       /* Clang needs these for loop-vectorizing; A->Width doesn't work. */
+       unsigned    w = A->Width, aw = A->alignedWidth;
+
+       if (A->numCols == 2) /* Brighter for monochrome. */
+               colorScale *= 4;
+
+       /* bloomRows: row ring buffer, bloom accumulator, in that order. */
+       memset (T->bloomRows, 0, (pointSize + 1) * aw * sizeof(*T->bloomRows));
+
+       /* This code is highly amenable to auto-vectorization; on GCC use -O3 to get
+        * that. On x86-32, also add -msse2.
+        */
+       for (j=T->y0;j<T->y2;j++) {
+               Bool has_col = False;
+               int accum = 0;
+
+               PIXEL0 *bloomRow =
+                       ALIGN_HINT(T->bloomRows + A->alignedWidth * (j % pointSize));
+               PIXEL0 *accumRow =
+                       ALIGN_HINT(T->bloomRows + A->alignedWidth * pointSize);
+               PIXEL1 *colRow = T->colorRow;
+
+               /* Moderately fast bloom.  */
+
+               for (i=0;i<aw;i++) {
+                       accumRow[i] -= bloomRow[i];
+                       bloomRow[i] = 0;
+               }
+
+               for (k=0;k<A->pool.count;k++) {
+                       const PIXEL0 *inRow = ALIGN_HINT(A->threads[k]->accMap[j]);
+                       for (i=0;i<aw;i++) {
+                               /* Lots of last-level cache misses. Such is life. */
+                               bloomRow[i] += inRow[i];
+                       }
+               }
+
+               /* Hardware prefetching works better going forwards than going backwards.
+                * Since this blurs/blooms/convolves in-place, it expands points to the
+                * right instead of to the left.
+                */
+               for (i=0;i<pointSize-1;i++)
+                       accum += bloomRow[i];
+
+               for (i=0;i<aw;i++) {
+                       PIXEL0 oldBloom = bloomRow[i];
+
+                       /* alignedWidth has extra padding for this one line. */
+                       accum += bloomRow[i+pointSize-1];
+
+                       bloomRow[i] = accum;
+                       accumRow[i] += accum;
+                       accum -= oldBloom;
+               }
+
+               if (j>=T->y1) {
+                       PIXEL0 *accumRow1 = A->blurFac ? motionBlurRow : accumRow;
+                       PIXEL0 blurFac = A->blurFac;
+
+                       if (blurFac) {
+                               /* TODO: Do I vectorize OK? */
+                               if (blurFac == 0x8000) {
+                                       /* Optimization for the default. */
+                                       for (i=0;i<aw;i++)
+                                               motionBlurRow[i] = (motionBlurRow[i] >> 1) + accumRow[i];
+                               } else {
+                                       for (i=0;i<aw;i++)
+                                               motionBlurRow[i] = (PIXEL0)(((PIXEL0X)motionBlurRow[i] * blurFac) >> 16) + accumRow[i];
+                               }
+
+                               motionBlurRow += aw;
+                       }
+
+                       for (i=0;i<aw;i++) {
+                               unsigned col = (accumRow1[i] * colorScale) >> COLOR_BITS;
+                               if (col>A->numCols-1) {
+                                       col = A->numCols-1;
+                               }
+                               #ifdef VARY_SPEED_TO_AVOID_BOREDOM
+                               if (col>0) {
+                                       if (col<A->numCols-1)  /* we don't count maxxed out pixels */
+                                               pixelCount++;
+                                       if (i > xmax)
+                                               xmax = i;
+                                       if (i < xmin)
+                                               xmin = i;
+                                       has_col = True;
+                               }
+                               #endif
+                               colRow[i] = A->cols[col];
+                       }
+
+                       #ifdef VARY_SPEED_TO_AVOID_BOREDOM
+                       if (has_col) {
+                               if (j > ymax)
+                                       ymax = j;
+                               if (j < ymin)
+                                       ymin = j;
+                       }
+                       #endif
+
+#if 0
+                       for (i=0;i<aw;i++) {
+                               if (MI_NPIXELS(mi) < 2)
+                                       XSetForeground(display, gc, MI_WHITE_PIXEL(mi));
+                               else
+                                       /*XSetForeground(display, gc, MI_PIXEL(mi, A->Col % MI_NPIXELS(mi)));*/
+                                       XSetForeground(display, gc, cols[col].pixel);
+
+                               if (A->dbuf != None) {
+                                       XSetForeground(display, A->dbuf_gc, cols[col].pixel);
+                                       XDrawPoint(display, A->dbuf, A->dbuf_gc, i, j);
+                               } else {
+                                       XSetForeground(display, gc, cols[col].pixel);
+                                       XDrawPoint(display, window, gc, i, j);
+                               }
+                       }
+#endif
+
+                       if (A->accImage->bits_per_pixel==32 &&
+                               A->accImage->byte_order==LOCAL_BYTE_ORDER) {
+                               for (i=0;i<aw;i++)
+                                       ((uint32_t *)outRow)[i] = colRow[i];
+                       } else if (A->accImage->bits_per_pixel==16 &&
+                               A->accImage->byte_order==LOCAL_BYTE_ORDER) {
+                               for (i=0;i<aw;i++)
+                                       ((uint16_t *)outRow)[i] = colRow[i];
+                       } else if (A->accImage->bits_per_pixel==8) {
+                               for (i=0;i<aw;i++)
+                                       ((uint8_t *)outRow)[i] = colRow[i];
+                       } else {
+                               for (i=0;i<w;i++)
+                                       XPutPixel (A->accImage, i, j, colRow[i]);
+                       }
+
+                       outRow = (char *)outRow + A->accImage->bytes_per_line;
+               }
+       }
+
+       /*
+       uint64_t dt = 0;
+       uint64_t t0 = tick();
+       dt += tick() - t0;
+
+       printf("B %g\t(%d,%d)\t%dx%d\t%d\n", 1000.0 * dt / frq(),
+               xmin, ymin, xmax - xmin, ymax - ymin, pixelCount);
+       */
+
+       T->xmax = xmax;
+       T->xmin = xmin;
+       T->ymax = ymax;
+       T->ymin = ymin;
+       T->pixelCount = pixelCount;
+}
+
+static void
+ramp_color (const XColor *color_in, XColor *color_out, unsigned i, unsigned n)
+{
+       float li;
+       #define MINBLUE 1
+       #define FULLBLUE 128
+       #define LOW_COLOR(c) ((c)*li/FULLBLUE)
+       #define HIGH_COLOR(c) ((65535-(c))*(li-FULLBLUE)/(256-FULLBLUE)+(c))
+       li = MINBLUE
+               + (255.0-MINBLUE) * log(1.0 + ACC_GAMMA*(float)i/n)
+               / log(1.0 + ACC_GAMMA);
+       if (li<FULLBLUE) {
+               color_out->red = LOW_COLOR(color_in->red);
+               color_out->green = LOW_COLOR(color_in->green);
+               color_out->blue = LOW_COLOR(color_in->blue);
+       } else {
+               color_out->red = HIGH_COLOR(color_in->red);
+               color_out->green = HIGH_COLOR(color_in->green);
+               color_out->blue = HIGH_COLOR(color_in->blue);
+       }
+}
+
+#endif
+
+static void
+draw_points (Display *display, Drawable d, GC gc, const void *Buf,
+             unsigned Count)
+{
+       if (pointSize == 1)
+               XDrawPoints(display, d, gc, (XPoint *)Buf, Count, CoordModeOrigin);
+       else
+               XFillRectangles(display, d, gc, (XRectangle *)Buf, Count);
 }
 
 ENTRYPOINT void
@@ -275,14 +887,16 @@ draw_strange(ModeInfo * mi)
        int         i, j, n, Cur_Pt;
        PRM         x, y, xo, yo;
        DBL         u;
-       XPoint     *Buf;
+       void       *Buf;
        Display    *display = MI_DISPLAY(mi);
        Window      window = MI_WINDOW(mi);
        GC          gc = MI_GC(mi);
        DBL         Lx, Ly;
-       void        (*Iterate) (ATTRACTOR *, PRM, PRM, PRM *, PRM *);
+       void        (*Iterate) (const ATTRACTOR *, PRM, PRM, PRM *, PRM *);
        PRM         xmin, xmax, ymin, ymax;
        ATTRACTOR  *A;
+       unsigned long Rnd = random();
+       int         cx, cy;
 
        if (Root == NULL)
                return;
@@ -298,135 +912,66 @@ draw_strange(ModeInfo * mi)
                A->Prm[j] = DBL_To_PRM((1.0 - u) * A->Prm1[j] + u * A->Prm2[j]);
 
        /* We collect the accumulation of the orbits in the 2d int array field. */
-#ifndef POINTS_HISTORY
-       #ifdef useAccumulator
-               if (useAccumulator) {
-                       for (i=0;i<A->Width;i++) {
-                               for (j=0;j<A->Height;j++) {
-                                       A->accMap[i][j] = 0;
 
-                               }
-                       }
-               }
-       #endif
-#endif
+       init_draw (A, &x, &y, &xmin, &ymin, &xmax, &ymax, &Rnd);
+       recalc_scale (A, xmin, ymin, xmax, ymax, &Lx, &Ly, &cx, &cy);
 
-       x = y = DBL_To_PRM(.0);
-       for (n = SKIP_FIRST; n; --n) {
-               (*Iterate) (A, x, y, &xo, &yo);
-               x = xo + NRAND(8) - 4;
-               y = yo + NRAND(8) - 4;
-       }
+       A->Cur_Pt = 0;
 
        xmax = 0;
-       xmin = UNIT * 4;
+       xmin = A->Width;
        ymax = 0;
-       ymin = UNIT * 4;
-       A->Cur_Pt = 0;
-       Buf = A->Buffer2;
-       Lx = (DBL) A->Width / UNIT / 2.2;
-       Ly = (DBL) A->Height / UNIT / 2.2;
-       for (n = A->Max_Pt; n; --n) {
-               (*Iterate) (A, x, y, &xo, &yo);
-               #ifdef useAccumulator
-               if (useAccumulator) {
-                       int mx,my;
-                       mx = (short) ( A->Width*0.1 + A->Width*0.8 * (xo - xmin) / (xmax - xmin) );
-                       my = (short) ( A->Width*0.1 + (A->Height - A->Width*0.2) * (yo - ymin) / (ymax - ymin) );
-                       if (mx>=0 && my>=0 && mx<A->Width && my<A->Height) {
-                               A->accMap[mx][my]++;
-                       }
-#ifdef POINTS_HISTORY
-               /* #define clearOldPoint(i) { if (startedClearing) { field[oldPoints[i].x][oldPoints[i].y]--; } }
-               #define saveUnplot(X,Y) { clearOldPoint(oldPointsIndex) oldPoints[oldPointsIndex].x = X; oldPoints[oldPointsIndex].y = Y; oldPointsIndex = (oldPointsIndex + 1) % numOldPoints; if (oldPointsIndex==0) { startedClearing=1; } }
-               saveUnplot(mx,my) */
-               if (startedClearing) {
-                       int oldX = oldPointsX[oldPointsIndex];
-                       int oldY = oldPointsY[oldPointsIndex];
-                       if (oldX>=0 && oldY>=0 && oldX<A->Width && oldY<A->Height) {
-                               A->accMap[oldX][oldY]--;
-                       }
-               }
-               oldPointsX[oldPointsIndex] = mx;
-               oldPointsY[oldPointsIndex] = my;
-               oldPointsIndex = (oldPointsIndex + 1) % numOldPoints;
-               if (oldPointsIndex==0) { startedClearing=1; }
-#endif
-               } else {
-               #endif
-                       Buf->x = (int) (Lx * (x + DBL_To_PRM(1.1)));
-                       Buf->y = (int) (Ly * (DBL_To_PRM(1.1) - y));
-                       Buf++;
-                       A->Cur_Pt++;
-               #ifdef useAccumulator
-               }
-               #endif
-               /* (void) fprintf( stderr, "X,Y: %d %d    ", Buf->x, Buf->y ); */
-               if (xo > xmax)
-                       xmax = xo;
-               else if (xo < xmin)
-                       xmin = xo;
-               if (yo > ymax)
-                       ymax = yo;
-               else if (yo < ymin)
-                       ymin = yo;
-               x = xo + NRAND(8) - 4;
-               y = yo + NRAND(8) - 4;
-       }
+       ymin = A->Height;
 
        MI_IS_DRAWN(mi) = True;
 
-       XSetForeground(display, gc, MI_BLACK_PIXEL(mi));
-
        #ifdef useAccumulator
        if (useAccumulator) {
-               float colorScale;
-               int col;
-               #ifdef VARY_SPEED_TO_AVOID_BOREDOM
                int pixelCount = 0;
-               #endif
-               colorScale = (A->Width*A->Height/640.0/480.0*800000.0/(float)A->Max_Pt*(float)NUM_COLS/256);
-               if (A->dbuf != None) {
-                       XSetForeground(display, A->dbuf_gc, 0);
-                       XFillRectangle(display, A->dbuf, A->dbuf_gc, 0, 0, A->Width, A->Height);
-               } else {
-                       XSetForeground(display, gc, MI_BLACK_PIXEL(mi));
-                       XFillRectangle(display, window, gc, 0, 0, A->Width, A->Height);
-               }
-               for (i=0;i<A->Width;i++) {
-                       for (j=0;j<A->Height;j++) {
-                               if (A->accMap[i][j]>0) {
-                                       col = (float)A->accMap[i][j] * colorScale;
-                                       if (col>NUM_COLS-1) {
-                                               col = NUM_COLS-1;
-                                       }
-                                       #ifdef VARY_SPEED_TO_AVOID_BOREDOM
-                                       if (col>0) {
-                                               if (col<NUM_COLS-1)  /* we don't count maxxed out pixels */
-                                                       pixelCount++;
-                                       }
-                                       #endif
-                                       if (MI_NPIXELS(mi) < 2)
-                                               XSetForeground(display, gc, MI_WHITE_PIXEL(mi));
-                                       else
-                                               /*XSetForeground(display, gc, MI_PIXEL(mi, A->Col % MI_NPIXELS(mi)));*/
-                                               XSetForeground(display, gc, cols[col].pixel);
-                                       if (A->dbuf != None) {
-                                               XSetForeground(display, A->dbuf_gc, cols[col].pixel);
-                                               XDrawPoint(display, A->dbuf, A->dbuf_gc, i, j);
-                                       } else {
-                                               XSetForeground(display, gc, cols[col].pixel);
-                                               XDrawPoint(display, window, gc, i, j);
-                                       }
-                               }
+
+               threadpool_run (&A->pool, points_thread);
+
+               if (A->visualClass == TrueColor) {
+                       XColor *src_color = &A->palette[A->Col % MI_NPIXELS(mi)];
+
+                       for (i=0;i<A->numCols;i++) {
+                               XColor color;
+                               ramp_color (src_color, &color, i, A->numCols);
+                               A->cols[i] =
+                                       ((((unsigned long)color.red   << 16) >> A->rShift) & A->rMask) |
+                                       ((((unsigned long)color.green << 16) >> A->gShift) & A->gMask) |
+                                       ((((unsigned long)color.blue  << 16) >> A->bShift) & A->bMask);
                        }
                }
+               threadpool_wait (&A->pool);
+
+               threadpool_run(&A->pool, rasterize_thread);
+               threadpool_wait(&A->pool);
+
+               for (i=0; i!=A->pool.count; ++i) {
+                       THREAD *T = A->threads[i];
+                       if (T->xmax > xmax)
+                               xmax = T->xmax;
+                       if (T->xmin < xmin)
+                               xmin = T->xmin;
+                       if (T->ymax > ymax)
+                               ymax = T->ymax;
+                       if (T->ymin < ymin)
+                               ymin = T->ymin;
+                       pixelCount += T->pixelCount;
+               }
+
+               put_xshm_image (display, A->dbuf != None ? A->dbuf : window,
+                               A->dbuf != None ? A->dbuf_gc : gc, A->accImage,
+                               0, 0, 0, 0, A->accImage->width, A->accImage->height,
+                               &A->shmInfo);
+
                if (A->dbuf != None) {
                        XCopyArea(display, A->dbuf, window, gc, 0, 0, A->Width, A->Height, 0, 0);
                }
                #ifdef VARY_SPEED_TO_AVOID_BOREDOM
-                       /* Increaase the rate of change of the parameters if the attractor has become visually boring. */
-                       if ((xmax - xmin < DBL_To_PRM(.2)) && (ymax - ymin < DBL_To_PRM(.2))) {
+                       /* Increase the rate of change of the parameters if the attractor has become visually boring. */
+                       if ((xmax - xmin < Lx * DBL_To_PRM(.2)) && (ymax - ymin < Ly * DBL_To_PRM(.2))) {
                                A->Speed *= 1.25;
                        } else if (pixelCount>0 && pixelCount<A->Width*A->Height/1000) {
                                A->Speed *= 1.25;  /* A->Count = 1000; */
@@ -445,27 +990,61 @@ draw_strange(ModeInfo * mi)
                #endif
        } else {
        #endif
+       for (n = 0; n != A->Max_Pt; ++n) {
+               int x1, y1;
+               (*Iterate) (A, x, y, &xo, &yo);
+               x1 = (int) (Lx * x) + cx;
+               y1 = (int) (Ly * y) + cy;
+               if (pointSize == 1) {
+                       XPoint *Buf = &((XPoint *)A->Buffer2)[n];
+                       Buf->x = x1;
+                       Buf->y = y1;
+               } else {
+                       XRectangle *Buf = &((XRectangle *)A->Buffer2)[n];
+                       /* Position matches bloom in accumulator mode. */
+                       Buf->x = x1 - pointSize + 1;
+                       Buf->y = y1;
+                       Buf->width = pointSize;
+                       Buf->height = pointSize;
+               }
+
+               if (x1 > xmax)
+                       xmax = x1;
+               if (x1 < xmin)
+                       xmin = x1;
+               if (y1 > ymax)
+                       ymax = y1;
+               if (y1 < ymin)
+                       ymin = y1;
+
+               A->Cur_Pt++;
+               /* (void) fprintf( stderr, "X,Y: %d %d    ", Buf->x, Buf->y ); */
+               x = xo + NRAND(8) - 4;
+               y = yo + NRAND(8) - 4;
+       }
+
+       XSetForeground(display, gc, MI_BLACK_PIXEL(mi));
 
        if (A->dbuf != None) {          /* jwz */
                XSetForeground(display, A->dbuf_gc, 0);
 /* XDrawPoints(display, A->dbuf, A->dbuf_gc, A->Buffer1,
   Cur_Pt,CoordModeOrigin); */
                XFillRectangle(display, A->dbuf, A->dbuf_gc, 0, 0, A->Width, A->Height);
-       } else
-               XDrawPoints(display, window, gc, A->Buffer1, Cur_Pt, CoordModeOrigin);
+       } else {
+               draw_points(display, window, gc, A->Buffer1, Cur_Pt);
+       }
 
-       if (MI_NPIXELS(mi) < 2)
+       if (MI_NPIXELS(mi) <= 2)
                XSetForeground(display, gc, MI_WHITE_PIXEL(mi));
        else
                XSetForeground(display, gc, MI_PIXEL(mi, A->Col % MI_NPIXELS(mi)));
 
        if (A->dbuf != None) {
                XSetForeground(display, A->dbuf_gc, 1);
-               XDrawPoints(display, A->dbuf, A->dbuf_gc, A->Buffer2, A->Cur_Pt,
-                           CoordModeOrigin);
+               draw_points(display, A->dbuf, A->dbuf_gc, A->Buffer2, A->Cur_Pt);
                XCopyPlane(display, A->dbuf, window, gc, 0, 0, A->Width, A->Height, 0, 0, 1);
        } else
-               XDrawPoints(display, window, gc, A->Buffer2, A->Cur_Pt, CoordModeOrigin);
+               draw_points(display, window, gc, A->Buffer2, A->Cur_Pt);
 
        #ifdef useAccumulator
        }
@@ -475,7 +1054,7 @@ draw_strange(ModeInfo * mi)
        A->Buffer1 = A->Buffer2;
        A->Buffer2 = Buf;
 
-       if ((xmax - xmin < DBL_To_PRM(.2)) && (ymax - ymin < DBL_To_PRM(.2)))
+       if ((xmax - xmin < Lx * DBL_To_PRM(.2)) && (ymax - ymin < Ly * DBL_To_PRM(.2)))
                A->Count += 4 * A->Speed;
        else
                A->Count += A->Speed;
@@ -486,7 +1065,9 @@ draw_strange(ModeInfo * mi)
                A->Count = 0;
        }
        A->Col++;
+#ifdef STANDALONE
     mi->recursion_depth = A->Count;
+#endif
 }
 
 
@@ -496,22 +1077,16 @@ ENTRYPOINT void
 init_strange(ModeInfo * mi)
 {
        Display    *display = MI_DISPLAY(mi);
-       Window      window = MI_WINDOW(mi);
 #ifndef NO_DBUF
        GC          gc = MI_GC(mi);
 #endif
        ATTRACTOR  *Attractor;
+       size_t      pointStructSize =
+               pointSize == 1 ? sizeof (XPoint) : sizeof (XRectangle);
 
-#ifdef POINTS_HISTORY
-       startedClearing=0;
-       oldPointsIndex=0;
-#endif
+       if (curve <= 0) curve = 10;
 
-       if (Root == NULL) {
-               if ((Root = (ATTRACTOR *) calloc(MI_NUM_SCREENS(mi),
-                               sizeof (ATTRACTOR))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, Root, free_strange);
        Attractor = &Root[MI_SCREEN(mi)];
 
        if (Attractor->Fold == NULL) {
@@ -519,7 +1094,7 @@ init_strange(ModeInfo * mi)
 
                if ((Attractor->Fold = (PRM *) calloc(UNIT2 + 1,
                                sizeof (PRM))) == NULL) {
-                       free_strange(display, Attractor);
+                       free_strange(mi);
                        return;
                }
                for (i = 0; i <= UNIT2; ++i) {
@@ -539,15 +1114,15 @@ init_strange(ModeInfo * mi)
        Attractor->Max_Pt = points;
 
        if (Attractor->Buffer1 == NULL)
-               if ((Attractor->Buffer1 = (XPoint *) calloc(Attractor->Max_Pt,
-                               sizeof (XPoint))) == NULL) {
-                       free_strange(display, Attractor);
+               if ((Attractor->Buffer1 = calloc(Attractor->Max_Pt,
+                               pointStructSize)) == NULL) {
+                       free_strange(mi);
                        return;
                }
        if (Attractor->Buffer2 == NULL)
-               if ((Attractor->Buffer2 = (XPoint *) calloc(Attractor->Max_Pt,
-                               sizeof (XPoint))) == NULL) {
-                       free_strange(display, Attractor);
+               if ((Attractor->Buffer2 = calloc(Attractor->Max_Pt,
+                               pointStructSize)) == NULL) {
+                       free_strange(mi);
                        return;
                }
 
@@ -559,18 +1134,28 @@ init_strange(ModeInfo * mi)
        Attractor->Speed = 4;
 
        Attractor->Iterate = Funcs[NRAND(2)];
+       if (curve < 10) /* Avoid boring Iterate_X2. */
+               Attractor->Iterate = Iterate_X3;
+
        Random_Prm(Attractor->Prm1);
        Random_Prm(Attractor->Prm2);
 #ifndef NO_DBUF
        if (Attractor->dbuf != None)
                XFreePixmap(display, Attractor->dbuf);
-#ifdef useAccumulator
-#define colorDepth ( useAccumulator ? MI_DEPTH(mi) : 1 )
-#else
-#define colorDepth 1
-#endif
-       Attractor->dbuf = XCreatePixmap(display, window,
-            Attractor->Width, Attractor->Height, colorDepth);
+       #ifdef useAccumulator
+       #define A Attractor
+       if (useAccumulator)
+       {
+               Attractor->dbuf = None;
+       }
+       else
+       #undef A
+       #endif
+       {
+               Attractor->dbuf = XCreatePixmap (display, MI_WINDOW(mi),
+                       Attractor->Width, Attractor->Height,
+                       /* useAccumulator ? MI_DEPTH(mi) : */ 1);
+       }
        /* Allocation checked */
        if (Attractor->dbuf != None) {
                XGCValues   gcv;
@@ -606,53 +1191,135 @@ init_strange(ModeInfo * mi)
 #ifdef useAccumulator
        #define A Attractor
        if (useAccumulator) {
-               XWindowAttributes xgwa;
-               int i,j;
-               XGetWindowAttributes (display, window, &xgwa);
-               /* cmap = xgwa.colormap; */
-               /* cmap = XCreateColormap(display, window, MI_VISUAL(mi), AllocAll); */
-               Attractor->accMap = (int**)calloc(Attractor->Width,sizeof(int*));
-               for (i=0;i<Attractor->Width;i++) {
-                       Attractor->accMap[i] = (int*)calloc(Attractor->Height,sizeof(int));
-                       for (j=0;j<Attractor->Height;j++) {
-                               Attractor->accMap[i][j] = 0;
-                       }
+               static const struct threadpool_class threadClass = {
+                       sizeof(THREAD),
+                       thread_create,
+                       thread_destroy
+               };
+               Screen *screen = MI_SCREENPTR(mi);
+               int i;
+               unsigned maxThreads, threadCount;
+               unsigned bpp = visual_pixmap_depth (screen, MI_VISUAL(mi));
+               size_t threadAlign1 = 8 * thread_memory_alignment(display) - 1;
+               if (A->cols) {
+                       if (A->visualClass != TrueColor && A->numCols > 2)
+                               XFreeColors (display, MI_COLORMAP(mi), A->cols, A->numCols, 0);
+                       free (A->cols);
                }
-#ifdef POINTS_HISTORY
-               numOldPoints = A->Max_Pt * MERGE_FRAMES;
-               oldPointsX = (int*)calloc(numOldPoints,sizeof(int));
-               oldPointsY = (int*)calloc(numOldPoints,sizeof(int));
-#endif
-               cols = (XColor*)calloc(NUM_COLS,sizeof(XColor));
-               for (i=0;i<NUM_COLS;i++) {
-                       float li;
-                       #define MINBLUE 1
-                       #define FULLBLUE 128
-                       li = MINBLUE + (255.0-MINBLUE) * log(1.0 + ACC_GAMMA*(float)i/NUM_COLS) / log(1.0 + ACC_GAMMA);
-                       if (li<FULLBLUE) {
-                               cols[i].red = 0;
-                               cols[i].green = 0;
-                               cols[i].blue = 65536*li/FULLBLUE;
-                       } else {
-                               cols[i].red = 65536*(li-FULLBLUE)/(256-FULLBLUE);
-                               cols[i].green = 65536*(li-FULLBLUE)/(256-FULLBLUE);
-                               cols[i].blue = 65535;
+               if (MI_NPIXELS(mi) <= 2) {
+                       A->numCols = 2;
+                       A->visualClass = StaticColor;
+               } else {
+                       A->numCols = DEF_NUM_COLS;
+                       A->visualClass = visual_class(screen, MI_VISUAL(mi));
+               }
+
+               A->cols = calloc (A->numCols,sizeof(*A->cols));
+               if (!A->cols) {
+                       free_strange(mi);
+                       return;
+               }
+
+               if (A->visualClass == TrueColor) {
+                       /* Rebuilds ramp every frame. No need for XAllocColor. */
+                       /* TODO: This could also include PseudoColor. */
+                       visual_rgb_masks (screen, MI_VISUAL(mi),
+                               &A->rMask, &A->gMask, &A->bMask);
+                       A->rShift = 31 - i_log2 (A->rMask);
+                       A->gShift = 31 - i_log2 (A->gMask);
+                       A->bShift = 31 - i_log2 (A->bMask);
+
+                       free (A->palette);
+                       A->palette = malloc(MI_NPIXELS(mi) * sizeof(XColor));
+                       if (!A->palette) {
+                               free_strange (mi);
+                               return;
                        }
-                       XAllocColor (display, xgwa.colormap, &cols[i]);
-                       /*
-                       if (!XAllocColor(MI_DISPLAY(mi), cmap, &cols[i])) {
-                       if (!XAllocColor(display, cmap, &cols[i])) {
-                               cols[i].pixel = WhitePixel (display, DefaultScreen (display));
-                               cols[i].red = cols[i].green = cols[i].blue = 0xFFFF;
+
+                       for (i=0;i<MI_NPIXELS(mi);i++)
+                               A->palette[i].pixel = MI_PIXEL(mi,i);
+
+                       XQueryColors (display, MI_COLORMAP(mi), A->palette, MI_NPIXELS(mi));
+               } else if (A->numCols == 2) {
+                       A->cols[0] = MI_BLACK_PIXEL (mi);
+                       A->cols[1] = MI_WHITE_PIXEL (mi);
+               } else {
+                       /* No changing colors, unfortunately. */
+                       XColor color;
+
+                       color.pixel = MI_PIXEL(mi,NRAND(MI_NPIXELS(mi)));
+                       XQueryColor (display, MI_COLORMAP(mi), &color);
+
+                       for (;;) {
+                               for (i=0;i<A->numCols;i++) {
+                                       XColor out_color;
+                                       ramp_color (&color, &out_color, i, A->numCols);
+                                       if (!XAllocColor (display, MI_COLORMAP(mi), &out_color))
+                                               break;
+                                       A->cols[i] = out_color.pixel;
+                                       /*
+                                       if (!XAllocColor(MI_DISPLAY(mi), cmap, &cols[i])) {
+                                       if (!XAllocColor(display, cmap, &cols[i])) {
+                                               cols[i].pixel = WhitePixel (display, DefaultScreen (display));
+                                               cols[i].red = cols[i].green = cols[i].blue = 0xFFFF;
+                                       }
+                                       */
+                               }
+
+                               if (i==A->numCols)
+                                       break;
+
+                               XFreeColors (display, MI_COLORMAP(mi), A->cols, i, 0);
+                               A->numCols = A->numCols * 11 / 12;
+                               if (A->numCols < 2) {
+                                       A->numCols = 0;
+                                       free_strange (mi);
+                                       abort();
+                                       return;
+                               }
                        }
-                       */
                }
-               /*
-               XSetWindowColormap(display, window, cmap);
-               (void) XSetWMColormapWindows(display, window, &window, 1);
-               XInstallColormap(display, cmap);
-               XStoreColors(display, cmap, cols, 256);
-               */
+
+               /* Add slack for horizontal blur, then round up to the platform's SIMD
+                * alignment.
+                */
+               A->alignedWidth =
+                       (((A->Width + pointSize) * sizeof(PIXEL0) + (__BIGGEST_ALIGNMENT__ - 1)) &
+                               ~(__BIGGEST_ALIGNMENT__ - 1)) / sizeof(PIXEL0);
+
+               if (A->accImage)
+                       destroy_xshm_image (display, A->accImage, &A->shmInfo);
+               A->accImage = create_xshm_image(display, MI_VISUAL(mi),
+                       MI_DEPTH(mi), ZPixmap, &A->shmInfo,
+                       ((A->alignedWidth * bpp + threadAlign1) & ~threadAlign1) / bpp,
+                       A->Height);
+
+               A->blurFac = (PIXEL0)(65536 * (motionBlur - 1) / (motionBlur + 1));
+               A->colorFac = 2 / (motionBlur + 1);
+
+               /* Don't overdose on threads. */
+               threadCount = hardware_concurrency (display);
+               maxThreads = A->Height / (pointSize * 4);
+               if (maxThreads < 1)
+                       maxThreads = 1;
+               if (threadCount > maxThreads)
+                       threadCount = maxThreads;
+
+               if (A->threads)
+                       free (A->threads);
+               A->threads = malloc (threadCount * sizeof(*A->threads));
+               if (!A->threads) {
+                       free_strange (mi);
+                       return;
+               }
+
+               if (A->pool.count)
+                       threadpool_destroy (&A->pool);
+               if (threadpool_create (&A->pool, &threadClass, display, threadCount)) {
+                       A->pool.count = 0;
+                       free_strange (mi);
+                       return;
+               }
        }
        #undef A
 #endif
@@ -671,31 +1338,7 @@ reshape_strange(ModeInfo * mi, int width, int height)
 
 /***************************************************************/
 
-ENTRYPOINT void
-release_strange(ModeInfo * mi)
-{
-       if (Root != NULL) {
-               int         screen;
-
-#ifdef useAccumulator
-               int i;
-               (void) free((void *) cols);
-               for (i=0;i<Root->Width;i++) {
-                       (void) free((void *) Root->accMap[i]);
-               }
-               (void) free((void *) Root->accMap);
-#endif
-#ifdef POINTS_HISTORY
-               free(oldPointsX);
-               free(oldPointsY);
-#endif
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); ++screen)
-                       free_strange(MI_DISPLAY(mi), &Root[screen]);
-               (void) free((void *) Root);
-               Root = (ATTRACTOR *) NULL; 
-       }
-}
-
+#ifdef STANDALONE
 ENTRYPOINT Bool
 strange_handle_event (ModeInfo *mi, XEvent *event)
 {
@@ -709,5 +1352,6 @@ strange_handle_event (ModeInfo *mi, XEvent *event)
 
 
 XSCREENSAVER_MODULE ("Strange", strange)
+#endif
 
 #endif /* MODE_strange */
index 318f630cf03ab0b0f68d736099ac1577783ad06d..625b659287d932276a4cae0ad8bbe95123c0eb0d 100644 (file)
@@ -32,6 +32,23 @@ or the id number (decimal or hex) of a specific visual.
 How many colors should be used (if possible).  Default 100.
 The colors are chosen randomly.
 .TP 8
+.B \-points \fIinteger\fP
+Change the number of points/iterations each frame.  Default 5500.  More than
+6000 activates the accumulator, which makes parts of the image brighter or
+darker depending on how often the attractor hits each pixel.
+.TP 8
+.B \-point-size \fIinteger\fP
+Changes the size of individual points.  Default 1.
+.TP 8
+.B \-zoom \fIfloat\fP
+Zooms in or out.  Default 0.9.
+.TP 8
+.B \-brightness \fIfloat\fP
+Adjusts the brightness for accumulator mode.  Default 1.0.
+.TP 8
+.B \-motion-blur \fIfloat\fP
+Adds motion blur.  Default 3.0, no motion blur is 1.0.
+.TP 8
 .B \-fps
 Display the current frame rate and CPU load.
 .SH ENVIRONMENT
index 49529f6eace625348344374a7968245616883e96..96a4e6338228d56dd6d39a8236d57b587d4b51d1 100644 (file)
@@ -19,14 +19,15 @@ static const char sccsid[] = "@(#)swirl.c   4.00 97/01/01 xlockmore";
  * event will the author be liable for any lost revenue or profits or
  * other special, indirect and consequential damages.
  *
- * 13-May-97: jwz@jwz.org: turned into a standalone program.
- * 21-Apr-95: improved startup time for TrueColour displays
- *            (limited to 16bpp to save memory) S.Early <sde1000@cam.ac.uk>
- * 09-Jan-95: fixed colour maps (more colourful) and the image now spirals
- *            outwards from the centre with a fixed number of points drawn
- *            every iteration. Thanks to M.Dobie <mrd@ecs.soton.ac.uk>.
- * 1994:      written.   Copyright (c) 1994 M.Dobie <mrd@ecs.soton.ac.uk>
- *            based on original code by R.Taylor
+ * 09-Oct-2016: dmo2118@gmail.com: Updated for new xshm.c.
+ * 13-May-1997: jwz@jwz.org: turned into a standalone program.
+ * 21-Apr-1995: improved startup time for TrueColour displays
+ *              (limited to 16bpp to save memory) S.Early <sde1000@cam.ac.uk>
+ * 09-Jan-1995: fixed colour maps (more colourful) and the image now spirals
+ *              outwards from the centre with a fixed number of points drawn
+ *              every iteration. Thanks to M.Dobie <mrd@ecs.soton.ac.uk>.
+ * 1994:        written.   Copyright (c) 1994 M.Dobie <mrd@ecs.soton.ac.uk>
+ *              based on original code by R.Taylor
  */
 
 #ifdef STANDALONE
@@ -39,10 +40,9 @@ static const char sccsid[] = "@(#)swirl.c    4.00 97/01/01 xlockmore";
 
 # define SMOOTH_COLORS
 # define WRITABLE_COLORS
+# define release_swirl 0
 # include "xlockmore.h"                                /* from the xscreensaver distribution */
-# ifdef HAVE_XSHM_EXTENSION
-#  include "xshm.h"
-# endif /* HAVE_XSHM_EXTENSION */
+# include "xshm.h"
 #else  /* !STANDALONE */
 # include "xlock.h"                                    /* from the xlockmore distribution */
 # undef HAVE_XSHM_EXTENSION
@@ -124,6 +124,7 @@ typedef struct swirl_data {
        /* image stuff */
        unsigned char *image;   /* image data */
        XImage     *ximage;
+       XShmSegmentInfo shm_info;
 
        /* colours stuff */
        int         colours;    /* how many colours possible */
@@ -247,29 +248,11 @@ initialise_image(ModeInfo * mi, SWIRL_P swirl)
   Display *dpy = MI_DISPLAY(mi);
 
   if (swirl->ximage != NULL)
-       XDestroyImage(swirl->ximage);
-
-  swirl->ximage = 0;
-#ifdef HAVE_XSHM_EXTENSION
-  if (mi->use_shm)
-       {
-         swirl->ximage = create_xshm_image(dpy, swirl->visual, swirl->rdepth,
-                                                                               ZPixmap, 0, &mi->shm_info,
-                                                                               swirl->width, swirl->height);
-         if (!swirl->ximage)
-               mi->use_shm = False;
-       }
-#endif /* HAVE_XSHM_EXTENSION */
-
-  if (!swirl->ximage)
-       {
-         swirl->ximage = XCreateImage(dpy, swirl->visual, swirl->rdepth, ZPixmap,
-                                                                  0, 0, swirl->width, swirl->height,
-                                                                  8, 0);
-         swirl->image = (unsigned char *)
-        calloc(swirl->height, swirl->ximage->bytes_per_line);
-      swirl->ximage->data = (char *) swirl->image;
-       }
+       destroy_xshm_image(dpy, swirl->ximage, &swirl->shm_info);
+
+  swirl->ximage = create_xshm_image(dpy, swirl->visual, swirl->rdepth,
+                                    ZPixmap, &swirl->shm_info,
+                                    swirl->width, swirl->height);
 }
 
 /****************************************************************/
@@ -1125,16 +1108,8 @@ draw_point(ModeInfo * mi, SWIRL_P swirl)
 
        /* update the screen */
 
-#ifdef HAVE_XSHM_EXTENSION
-       if (mi->use_shm)
-         XShmPutImage(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), swirl->ximage,
-                                  x, y, x, y, r, r, False);
-       else
-#endif /* !HAVE_XSHM_EXTENSION */
-         /* PURIFY 4.0.1 on SunOS4 and on Solaris 2 reports a 256 byte memory
-                leak on the next line. */
-         XPutImage(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), swirl->ximage,
-                               x, y, x, y, r, r);
+       put_xshm_image(MI_DISPLAY(mi), MI_WINDOW(mi), MI_GC(mi), swirl->ximage,
+                      x, y, x, y, r, r, &swirl->shm_info);
 }
 
 /****************************************************************/
@@ -1237,6 +1212,8 @@ next_point(SWIRL_P swirl)
 
 /****************************************************************/
 
+static void free_swirl (ModeInfo * mi);
+
 /* 
  * init_swirl
  *
@@ -1251,14 +1228,9 @@ init_swirl(ModeInfo * mi)
        Window      window = MI_WINDOW(mi);
        SWIRL_P     swirl;
 
-       /* does the swirls array exist? */
-       if (swirls == NULL) {
-               /* allocate an array, one entry for each screen */
-               swirls = (SWIRL_P) calloc(MI_NUM_SCREENS(mi), sizeof (SWIRL));
-       }
-       /* get a pointer to this swirl */
+       MI_INIT (mi, swirls, free_swirl);
        swirl = &(swirls[MI_SCREEN(mi)]);
-        initialise_swirl(mi, swirl);
+    initialise_swirl(mi, swirl);
                 
         /* get window parameters */
        swirl->win = window;
@@ -1440,34 +1412,24 @@ reshape_swirl(ModeInfo * mi, int width, int height)
 
 /****************************************************************/
 
-ENTRYPOINT void
-release_swirl (ModeInfo * mi)
+static void
+free_swirl (ModeInfo * mi)
 {
-       /* does the swirls array exist? */
-       if (swirls != NULL) {
-               int         i;
-
-               /* free them all */
-               for (i = 0; i < MI_NUM_SCREENS(mi); i++) {
-                       SWIRL_P     swirl = &(swirls[i]);
+       SWIRL_P     swirl = &(swirls[MI_SCREEN(mi)]);
 
 #ifndef STANDALONE
-                       if (swirl->cmap != (Colormap) NULL)
-                               XFreeColormap(MI_DISPLAY(mi), swirl->cmap);
+       if (swirl->cmap != (Colormap) NULL)
+               XFreeColormap(MI_DISPLAY(mi), swirl->cmap);
 #endif /* STANDALONE */
 #ifndef STANDALONE
-                       if (swirl->rgb_values != NULL)
-                               XFree((void *) swirl->rgb_values);
+       if (swirl->rgb_values != NULL)
+               XFree((void *) swirl->rgb_values);
 #endif /* !STANDALONE */
-                       if (swirl->ximage != NULL)
-                               XDestroyImage(swirl->ximage);
-                       if (swirl->knots)
-                               (void) free((void *) swirl->knots);
-               }
-               /* deallocate an array, one entry for each screen */
-               (void) free((void *) swirls);
-               swirls = NULL;
-       }
+       if (swirl->ximage != NULL)
+               destroy_xshm_image(MI_DISPLAY(mi), swirl->ximage,
+                                  &swirl->shm_info);
+       if (swirl->knots)
+               (void) free((void *) swirl->knots);
 }
 
 /****************************************************************/
index 6a7e0cdec898a4a88dca2d7bb758fe7fd08a2956..959d24aff5c6604738963b01bcaaf2b88eee6516 100644 (file)
@@ -527,7 +527,10 @@ static void
 fill_kugel(struct state *st, int i, Pixmap buf, int setcol)
 {
   double ra;
-  int m,col,inc=1,inr=3,d;
+  int m,col,inr=3,d;
+#ifdef USE_POLYGON
+  int inc=1;
+#endif
   d=(int)((ABS(st->kugeln[i].r1)*2));
   if (d==0) d=1;
   
@@ -557,10 +560,12 @@ fill_kugel(struct state *st, int i, Pixmap buf, int setcol)
 #ifdef PRTDBX
          printf("Radius: %f\n",ra);
 #endif
+#ifdef USE_POLYGON
          if(-ra< 3.0) inc=14;
          else if(-ra< 6.0) inc=8;
          else if(-ra<20.0) inc=4;
          else if(-ra<40.0) inc=2;
+#endif
          if(setcol)
            {
              if (m==27)
index d361eb3fb4f4944d1c0dea114b7d3a6f16ae7cb1..ec05fb98dbe27fe614ba8a592b785913f2d3afe8 100644 (file)
@@ -116,10 +116,10 @@ decode_mask (unsigned int mask, unsigned int *pos_ret, unsigned int *size_ret)
 
 
 static unsigned long
-pixel_distance (Visual *v, unsigned long p1, unsigned long p2)
+pixel_distance (Screen *s, Visual *v, unsigned long p1, unsigned long p2)
 {
   static int initted_p = 0;
-  static unsigned int rmsk=0, gmsk=0, bmsk=0;
+  static unsigned long rmsk=0, gmsk=0, bmsk=0;
   static unsigned int rpos=0, gpos=0, bpos=0;
   static unsigned int rsiz=0, gsiz=0, bsiz=0;
 
@@ -130,9 +130,7 @@ pixel_distance (Visual *v, unsigned long p1, unsigned long p2)
   if (!p1 && !p2) return 0;
 
   if (! initted_p) {
-    rmsk = v->red_mask;
-    gmsk = v->green_mask;
-    bmsk = v->blue_mask;
+    visual_rgb_masks (s, v, &rmsk, &gmsk, &bmsk);
     decode_mask (rmsk, &rpos, &rsiz);
     decode_mask (gmsk, &gpos, &gsiz);
     decode_mask (bmsk, &bpos, &bsiz);
@@ -321,7 +319,8 @@ analyze (struct state *st)
           pixels[i++] = (x > 0 && y < h-1 ? XGetPixel (st->img, x-1, y+1) : 0);
 
           for (i = 1; i < countof(pixels); i++)
-            distance += pixel_distance (st->xgwa.visual, pixels[0], pixels[i]);
+            distance += pixel_distance (st->xgwa.screen, st->xgwa.visual,
+                                        pixels[0], pixels[i]);
           distance /= countof(pixels)-1;
           XPutPixel (st->delta, x, y, distance);
         }
@@ -780,15 +779,13 @@ get_deltap (struct state *st)
   XImage *dimg;
 
   Visual *v = st->xgwa.visual;
-  unsigned int rmsk=0, gmsk=0, bmsk=0;
+  unsigned long rmsk=0, gmsk=0, bmsk=0;
   unsigned int rpos=0, gpos=0, bpos=0;
   unsigned int rsiz=0, gsiz=0, bsiz=0;
 
   if (st->deltap) return st->deltap;
 
-  rmsk = v->red_mask;
-  gmsk = v->green_mask;
-  bmsk = v->blue_mask;
+  visual_rgb_masks (st->xgwa.screen, v, &rmsk, &gmsk, &bmsk);
   decode_mask (rmsk, &rpos, &rsiz);
   decode_mask (gmsk, &gpos, &gsiz);
   decode_mask (bmsk, &bpos, &bsiz);
index 8284d16b41c75f050cdcd279498fdbaaac78e9ac..554c704e4e1bfd87b5407d10482e91bc4e30d39a 100644 (file)
@@ -1,4 +1,4 @@
-/* testx11.c, Copyright (c) 2015-2016 Dave Odell <dmo2118@gmail.com>
+/* testx11.c, Copyright (c) 2015-2017 Dave Odell <dmo2118@gmail.com>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -311,7 +311,7 @@ testx11_init (Display *dpy, Window win)
 
   st->copy_pix64 = XCreatePixmap(dpy, win, 64, 64, st->xgwa.depth);
 
-  st->primitives_mini_pix = XCreatePixmap (dpy, win, 16, 16, st->xgwa.depth);
+  st->primitives_mini_pix = XCreatePixmap (dpy, win, 16, 24, st->xgwa.depth);
 
   {
     static const char text[] = "Welcome from testx11_init().";
@@ -690,6 +690,7 @@ testx11_draw (Display *dpy, Window win, void *st_raw)
     /* Box 2 */
     {
       XImage *image = XGetImage(st->dpy, t, 55, 55, 15, 15, 0xffffff, ZPixmap);
+      XPutPixel(image, 2, 0, 0x00000000);
       XPutImage (dpy, t, st->copy_gc, image, 0, 0, 88, 55, 15, 15);
       XDestroyImage(image);
     }
@@ -709,6 +710,7 @@ testx11_draw (Display *dpy, Window win, void *st_raw)
       XDrawPoint (dpy, t, st->copy_gc, 104 + 8, 55 + 8);
 
       XDrawPoint (dpy, st->primitives_mini_pix, st->copy_gc, 0, 0);
+      XDrawPoint (dpy, st->primitives_mini_pix, st->copy_gc, 1, 0);
       XDrawPoint (dpy, st->primitives_mini_pix, st->copy_gc, 15, 15);
       XDrawRectangle (dpy, st->primitives_mini_pix, st->copy_gc,
                       1, 1, 13, 13);
index c2edeb7c90f2d21ae0f5dfa84378ae733cd8e528..2ebbf17297db01dcda1ee404c6c6cb4e4af0e437 100644 (file)
@@ -39,6 +39,7 @@ static const char sccsid[] = "@(#)thornbird.c 5.00 2000/11/01 xlockmore";
                                        "*ignoreRotation: True \n" \
 
 # define BRIGHT_COLORS
+# define release_thornbird 0
 # define thornbird_handle_event 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
@@ -52,7 +53,7 @@ ENTRYPOINT ModeSpecOpt thornbird_opts =
 
 #ifdef USE_MODULES
 ModStruct   thornbird_description =
-{"thornbird", "init_thornbird", "draw_thornbird", "release_thornbird",
+{"thornbird", "init_thornbird", "draw_thornbird", (char *) NULL,
  "refresh_thornbird", "init_thornbird", (char *) NULL, &thornbird_opts,
  1000, 800, 16, 1, 64, 1.0, "",
  "Shows an animated Bird in a Thorn Bush fractal map", 0, NULL};
@@ -91,8 +92,9 @@ typedef struct {
 static thornbirdstruct *thornbirds = (thornbirdstruct *) NULL;
 
 static void
-free_thornbird(thornbirdstruct *hp)
+free_thornbird(ModeInfo * mi)
 {
+       thornbirdstruct *hp = &thornbirds[MI_SCREEN(mi)];
        if (hp->pointBuffer != NULL) {
                int         buffer;
 
@@ -109,12 +111,7 @@ init_thornbird (ModeInfo * mi)
 {
        thornbirdstruct *hp;
 
-       if (thornbirds == NULL) {
-               if ((thornbirds =
-                    (thornbirdstruct *) calloc(MI_NUM_SCREENS(mi),
-                                         sizeof (thornbirdstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, thornbirds, free_thornbird);
        hp = &thornbirds[MI_SCREEN(mi)];
 
 
@@ -132,14 +129,14 @@ init_thornbird (ModeInfo * mi)
        if (hp->pointBuffer == NULL)
                if ((hp->pointBuffer = (XPoint **) calloc(MI_CYCLES(mi),
                                sizeof (XPoint *))) == NULL) {
-                       free_thornbird(hp);
+                       free_thornbird(mi);
                        return;
                }
 
        if (hp->pointBuffer[0] == NULL)
                if ((hp->pointBuffer[0] = (XPoint *) malloc(MI_COUNT(mi) *
                                sizeof (XPoint))) == NULL) {
-                       free_thornbird(hp);
+                       free_thornbird(mi);
                        return;
                }
 
@@ -226,7 +223,7 @@ draw_thornbird(ModeInfo * mi)
        if (hp->pointBuffer[erase] == NULL) {
                if ((hp->pointBuffer[erase] = (XPoint *) malloc(MI_COUNT(mi) *
                                sizeof (XPoint))) == NULL) {
-                       free_thornbird(hp);
+                       free_thornbird(mi);
                        return;
                }
        } else {
@@ -258,19 +255,6 @@ reshape_thornbird(ModeInfo * mi, int width, int height)
   init_thornbird (mi);
 }
 
-ENTRYPOINT void
-release_thornbird(ModeInfo * mi)
-{
-       if (thornbirds != NULL) {
-               int         screen;
-
-               for (screen = 0; screen < MI_NUM_SCREENS(mi); screen++)
-                       free_thornbird(&thornbirds[screen]);
-               (void) free((void *) thornbirds);
-               thornbirds = (thornbirdstruct *) NULL;
-       }
-}
-
 ENTRYPOINT void
 refresh_thornbird (ModeInfo * mi)
 {
index e8400d42c2be356ceb59c70cfb9ffee84b9fd441..d73c1226f547bbc040b10391e5c7af967971d727 100644 (file)
@@ -51,6 +51,7 @@ static const char sccsid[] = "@(#)triangle.c  4.04 97/07/28 xlockmore";
                                        "*fpsSolid: true \n" \
 
 # define SMOOTH_COLORS
+# define release_triangle 0
 # include "xlockmore.h"                /* in xscreensaver distribution */
 #else /* STANDALONE */
 # include "xlock.h"                    /* in xlockmore distribution */
@@ -222,11 +223,7 @@ init_triangle (ModeInfo * mi)
        short      *tmp;
        int         i, dim, one;
 
-       if (triangles == NULL) {
-               if ((triangles = (trianglestruct *) calloc(MI_NUM_SCREENS(mi),
-                                          sizeof (trianglestruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, triangles, 0);
        tp = &triangles[MI_SCREEN(mi)];
 
        tp->width = MI_WIN_WIDTH(mi);
@@ -350,15 +347,6 @@ reshape_triangle(ModeInfo * mi, int width, int height)
   init_triangle (mi);
 }
 
-ENTRYPOINT void
-release_triangle(ModeInfo * mi)
-{
-       if (triangles != NULL) {
-               (void) free((void *) triangles);
-               triangles = NULL;
-       }
-}
-
 ENTRYPOINT void
 refresh_triangle (ModeInfo * mi)
 {
index 7d52a411156bda8047298f13ba6ea15d3acf6514..ae589ad662c75a8e24fbccaf33039ecc2fafb144 100644 (file)
 
 #include <math.h>
 #include "screenhack.h"
-
-#ifdef HAVE_XSHM_EXTENSION
 #include "xshm.h"
-#endif
 
 #define FLOAT double
 
@@ -80,10 +77,7 @@ struct state {
   async_load_state *img_loader;
   Pixmap pm;
 
-  Bool useShm;         /* whether or not to use xshm */
-#ifdef HAVE_XSHM_EXTENSION
   XShmSegmentInfo shmInfo;
-#endif
 };
 
 
@@ -131,28 +125,12 @@ grabImage_done (struct state *st)
                                  st->windowWidth, st->windowHeight,
                             ~0L, ZPixmap);
 
-    if (st->workImage) XDestroyImage (st->workImage);
-    st->workImage = NULL;
-
-#ifdef HAVE_XSHM_EXTENSION
-    if (st->useShm) 
-    {
-       st->workImage = create_xshm_image (st->dpy, xwa.visual, xwa.depth,
-                                      ZPixmap, 0, &st->shmInfo, 
-                                      st->windowWidth, st->windowHeight);
-       if (!st->workImage) 
-       {
-           st->useShm = False;
-           fprintf (stderr, "create_xshm_image failed\n");
-       }
-    }
-
-    if (st->workImage == NULL)
-#endif /* HAVE_XSHM_EXTENSION */
+    if (st->workImage) destroy_xshm_image (st->dpy, st->workImage,
+                                           &st->shmInfo);
 
-       /* just use XSubImage to acquire the right visual, depth, etc;
-        * easier than the other alternatives */
-       st->workImage = XSubImage (st->sourceImage, 0, 0, st->windowWidth, st->windowHeight);
+    st->workImage = create_xshm_image (st->dpy, xwa.visual, xwa.depth,
+                                       ZPixmap, &st->shmInfo,
+                                       st->windowWidth, st->windowHeight);
 }
 
 /* set up the system */
@@ -537,14 +515,8 @@ static void renderFrame (struct state *st)
        renderTile (st, st->sortedTiles[n]);
     }
 
-#ifdef HAVE_XSHM_EXTENSION
-    if (st->useShm)
-       XShmPutImage (st->dpy, st->window, st->backgroundGC, st->workImage, 0, 0, 0, 0,
-                     st->windowWidth, st->windowHeight, False);
-    else
-#endif /* HAVE_XSHM_EXTENSION */
-       XPutImage (st->dpy, st->window, st->backgroundGC, st->workImage, 
-                  0, 0, 0, 0, st->windowWidth, st->windowHeight);
+    put_xshm_image (st->dpy, st->window, st->backgroundGC, st->workImage, 0, 0, 0, 0,
+                    st->windowWidth, st->windowHeight, &st->shmInfo);
 }
 
 /* set up the model */
@@ -734,10 +706,6 @@ static void initParams (struct state *st)
        problems = 1;
     }
 
-#ifdef HAVE_XSHM_EXTENSION
-    st->useShm = get_boolean_resource (st->dpy, "useSHM", "Boolean");
-#endif
-
     if (problems)
     {
        exit (1);
index c24807803c7d90e5e5b951dc9174e01a5ba03edb..1abf29916de8add2071b45dbb50070ea4f798f76 100644 (file)
@@ -103,12 +103,7 @@ init_vines(ModeInfo * mi)
 {
        vinestruct *fp;
 
-       if (vines == NULL) {
-               if ((vines = (vinestruct *) calloc(MI_NUM_SCREENS(mi),
-                                            sizeof (vinestruct))) == NULL) {
-                       return;
-               }
-       }
+       MI_INIT (mi, vines, 0);
        fp = &vines[MI_SCREEN(mi)];
 
        fp->i = 0;
index 2d342a5643d32cbd7a12894894436033c667ea5e..63353a9aef645fdd2fe2066015f01621e358ca65 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 #
-# webcollage, Copyright Â© 1999-2015 by Jamie Zawinski <jwz@jwz.org>
+# webcollage, Copyright Â© 1999-2016 by Jamie Zawinski <jwz@jwz.org>
 # This program decorates the screen with random images from the web.
 # One satisfied customer described it as "a nonstop pop culture brainbath."
 #
@@ -53,11 +53,10 @@ require POSIX;
 use Fcntl ':flock'; # import LOCK_* constants
 use POSIX qw(strftime);
 use LWP::UserAgent;
-use bytes;
 
 
 my $progname = $0; $progname =~ s@.*/@@g;
-my ($version) = ('$Revision: 1.173 $' =~ m/\s(\d[.\d]+)\s/s);
+my ($version) = ('$Revision: 1.176 $' =~ m/\s(\d[.\d]+)\s/s);
 my $copyright = "WebCollage $version, Copyright (c) 1999-2015" .
     " Jamie Zawinski <jwz\@jwz.org>\n" .
     "                  https://www.jwz.org/webcollage/\n";
@@ -75,14 +74,16 @@ my @search_methods = (
 
                       # So let's try Bing instead. No rate limiting yet!
                       #
-                        7, "bingphotos",    \&pick_from_bing_image_photos,
-                        6, "bingimgs",      \&pick_from_bing_images,
-                        6, "bingnums",      \&pick_from_bing_image_numbers,
+                       14, "bingphotos",    \&pick_from_bing_image_photos,
+                       12, "bingimgs",      \&pick_from_bing_images,
+                       11, "bingnums",      \&pick_from_bing_image_numbers,
 
                        21, "flickr_recent", \&pick_from_flickr_recent,
                        16, "flickr_random", \&pick_from_flickr_random,
-                       23, "instagram",     \&pick_from_instagram,
-                        4, "livejournal",   \&pick_from_livejournal_images,
+                        9, "livejournal",   \&pick_from_livejournal_images,
+
+                     # I ran out of usable access tokens, May 2017
+                     # 23, "instagram",     \&pick_from_instagram,
 
                      # No longer exists, as of Apr 2014
                      #  4, "yahoorand",     \&pick_from_yahoo_random_link,
@@ -245,6 +246,7 @@ my %warningless_sites = (
   "imgur.com"               => 1,
   "yfrog.com"               => 1,
   "cdninstagram.com"        => 1,
+  "encrypted-tbn3.gstatic.com" => 1,
 
   "yimg.com"                => 1,  # This is where dailynews.yahoo.com stores
   "eimg.com"                => 1,  # its images, so pick_from_yahoo_news_text()
@@ -988,26 +990,6 @@ sub pick_from_search_engine($$$) {
 
   my @subpages;
 
-  if ($body =~ m/^\{\"/s) {                    # Google AJAX JSON response.
-
-    my @chunks = split (/"GsearchResultClass"/, $body);
-    shift @chunks;
-    my $body2 = '';
-    my $n = 1;
-    foreach (@chunks) {
-      my ($img) = m/"unescapedUrl":"(.*?)"/si;
-      my ($url) = m/"originalContextUrl":"(.*?)"/si;
-      next unless ($img && $url);
-      $url = ("/imgres" .
-              "?imgurl="    . url_quote($img) .
-              "&imgrefurl=" . url_quote($url) .
-              "&...");
-      $body2 .= "<A HREF=\"" . html_quote($url) . "\">$n</A>\n";
-      $n++;
-    }
-    $body = $body2 if $body2;
-  }
-
   my $search_count = "?";
   if ($body =~ m@found (approximately |about )?(<B>)?(\d+)(</B>)? image@) {
     $search_count = $3;
@@ -1056,15 +1038,19 @@ sub pick_from_search_engine($$$) {
   s/(<A )/\n$1/gi;
   foreach (split(/\n/)) {
     $href_count++;
-    my ($u) = m@<A\s.*\bHREF\s*=\s*([^>]+)>@i;
+    my ($u) = m@<A\s.*?\bHREF\s*=\s*([\"\'][^\"\'<>]+)@i;
     next unless $u;
+    my ($u2) = m@<IMG\s.*\bSRC\s*=\s*[\"\']([^\"\'<>]+)@i;
 
     if (m/\bm="\{(.*?)\}"/s) {         # Bing info is inside JSON crud
       my $json = html_unquote($1);
-      my ($href) = ($json =~ m/\bsurl:"(.*?)"/s);
-      my ($img)  = ($json =~ m/\bimgurl:"(.*?)"/s);
+      my ($href) = ($json =~ m/\b(?:surl|purl)\"?:\s*"(.*?)"/s);
+      my ($img)  = ($json =~ m/\b(?:imgurl|murl)\"?:\s*"(.*?)"/s);
       $u = "$img\t$href" if ($img && $href);
 
+    } elsif ($u2 && $u2 =~ m@://[^/]*\.gstatic\.com/@s) { $u = $u2;
+                                                          $u =~ s/^\"|\"$//s;
+
     } elsif ($u =~ m/^\"([^\"]*)\"/) { $u = $1   # quoted string
     } elsif ($u =~ m/^([^\s]*)\s/) { $u = $1;    # or token
     }
@@ -1363,12 +1349,8 @@ sub pick_from_security_camera($) {
 #
 ############################################################################
 
-
-my $google_images_url =     "http://ajax.googleapis.com/ajax/services/" .
-                            "search/images" .
-                            "?v=1.0" .
-                            "&rsz=large" .
-                            "&q=";
+my $google_images_url = 'https://www.google.com/search' .
+                       '?source=lnms&tbm=isch&tbs=isz:l&q=';
 
 # googleimgs
 sub pick_from_google_images($;$$) {
@@ -1385,34 +1367,21 @@ sub pick_from_google_images($;$$) {
     pick_from_search_engine ($timeout, $search_url, $words);
 
   my @candidates = ();
-  my %referers;
   foreach my $u (@subpages) {
-    next unless ($u =~ m@imgres\?imgurl@i);    #  All pics start with this
-    next if ($u =~ m@[/.]google\.com\b@i);     # skip google builtins
-
     $u = html_unquote($u);
-    if ($u =~ m@^/imgres\?imgurl=(.*?)&imgrefurl=(.*?)\&@) {
-      my $ref = $2;
-      my $img = $1;
-      $ref = url_decode($ref);
-      $img = url_decode($img);
-
-      $img = "http://$img" unless ($img =~ m/^https?:/i);
-
-      LOG ($verbose_filter, "  candidate: $ref");
-      push @candidates, $img;
-      $referers{$img} = $ref;
-    }
+    # next if ($u =~ m@^https?://[^.]*\.(google|youtube)\.com/@s);
+    next unless ($u =~ m@^https?://[^/]*\.gstatic\.com@s);
+    LOG ($verbose_filter, "  candidate: $u");
+    push @candidates, $u;
   }
 
   @candidates = depoison (@candidates);
   return () if ($#candidates < 0);
   my $i = int(rand($#candidates+1));
   my $img = $candidates[$i];
-  my $ref = $referers{$img};
 
-  LOG ($verbose_load, "picked image " . ($i+1) . ": $img (on $ref)");
-  return ($ref, $img);
+  LOG ($verbose_load, "picked image " . ($i+1) . ": $img");
+  return ($img, $img);
 }
 
 
@@ -1446,6 +1415,7 @@ sub pick_from_google_image_numbers($) {
 # Google Image Search.
 # By jwz, inspired by the excellent Random Personal Picture Finder
 # at http://www.diddly.com/random/
+# May 2017: Commented out a bunch of formats that have fallen out of favor.
 #
 ############################################################################
 
@@ -1454,32 +1424,32 @@ my @photomakers = (
   # Common digital camera file name formats, as described at
   # http://www.diddly.com/random/about.html
   #
-  sub { sprintf ("dcp%05d.jpg",  int(rand(4000))); },  # Kodak
+# sub { sprintf ("dcp%05d.jpg",  int(rand(4000))); },  # Kodak
   sub { sprintf ("dsc%05d.jpg",  int(rand(4000))); },  # Nikon
   sub { sprintf ("dscn%04d.jpg", int(rand(4000))); },  # Nikon
-  sub { sprintf ("mvc-%03d.jpg", int(rand(999)));  },  # Sony Mavica
-  sub { sprintf ("mvc%05d.jpg",  int(rand(9999))); },  # Sony Mavica
-  sub { sprintf ("P101%04d.jpg", int(rand(9999))); },  # Olympus w/ date=101
-  sub { sprintf ("P%x%02d%04d.jpg",                    # Olympus
-                 int(rand(0xC)), int(rand(30))+1,
-                 rand(9999)); },
+# sub { sprintf ("mvc-%03d.jpg", int(rand(999)));  },  # Sony Mavica
+# sub { sprintf ("mvc%05d.jpg",  int(rand(9999))); },  # Sony Mavica
+# sub { sprintf ("P101%04d.jpg", int(rand(9999))); },  # Olympus w/ date=101
+# sub { sprintf ("P%x%02d%04d.jpg",                    # Olympus
+#                int(rand(0xC)), int(rand(30))+1,
+#                rand(9999)); },
   sub { sprintf ("IMG_%03d.jpg",  int(rand(999))); },  # ?
-  sub { sprintf ("IMAG%04d.jpg",  int(rand(9999))); }, # RCA and Samsung
-  sub { my $n = int(rand(9999));                       # Canon
-          sprintf ("1%02d-%04d.jpg", int($n/100), $n); },
-  sub { my $n = int(rand(9999));                       # Canon
-          sprintf ("1%02d-%04d_IMG.jpg",
-                   int($n/100), $n); },
+# sub { sprintf ("IMAG%04d.jpg",  int(rand(9999))); }, # RCA and Samsung
+# sub { my $n = int(rand(9999));                       # Canon
+#         sprintf ("1%02d-%04d.jpg", int($n/100), $n); },
+# sub { my $n = int(rand(9999));                       # Canon
+#         sprintf ("1%02d-%04d_IMG.jpg",
+#                  int($n/100), $n); },
   sub { sprintf ("IMG_%04d.jpg", int(rand(9999))); },  # Canon
   sub { sprintf ("dscf%04d.jpg", int(rand(9999))); },  # Fuji Finepix
-  sub { sprintf ("pdrm%04d.jpg", int(rand(9999))); },  # Toshiba PDR
-  sub { sprintf ("IM%06d.jpg", int(rand(9999))); },    # HP Photosmart
-  sub { sprintf ("EX%06d.jpg", int(rand(9999))); },    # HP Photosmart
+# sub { sprintf ("pdrm%04d.jpg", int(rand(9999))); },  # Toshiba PDR
+# sub { sprintf ("IM%06d.jpg", int(rand(9999))); },    # HP Photosmart
+# sub { sprintf ("EX%06d.jpg", int(rand(9999))); },    # HP Photosmart
 #  sub { my $n = int(rand(3));                         # Kodak DC-40,50,120
 #        sprintf ("DC%04d%s.jpg", int(rand(9999)),
 #                 $n == 0 ? 'S' : $n == 1 ? 'M' : 'L'); },
   sub { sprintf ("pict%04d.jpg", int(rand(9999))); },  # Minolta Dimage
-  sub { sprintf ("P%07d.jpg", int(rand(9999))); },     # Kodak DC290
+# sub { sprintf ("P%07d.jpg", int(rand(9999))); },     # Kodak DC290
 #  sub { sprintf ("%02d%02d%04d.jpg",                  # Casio QV3000, QV4000
 #                 int(rand(12))+1, int(rand(31))+1,
 #                 int(rand(999))); },
@@ -1488,9 +1458,9 @@ my @photomakers = (
 #                 int(rand(12))+1, int(rand(31))+1,
 #                 int(rand(999))); },
   sub { sprintf ("IMGP%04d.jpg", int(rand(9999))); },  # Pentax Optio S
-  sub { sprintf ("PANA%04d.jpg", int(rand(9999))); },  # Panasonic vid still
+# sub { sprintf ("PANA%04d.jpg", int(rand(9999))); },  # Panasonic vid still
   sub { sprintf ("HPIM%04d.jpg", int(rand(9999))); },  # HP Photosmart
-  sub { sprintf ("PCDV%04d.jpg", int(rand(9999))); },  # ?
+# sub { sprintf ("PCDV%04d.jpg", int(rand(9999))); },  # ?
  );
 
 
@@ -2283,22 +2253,22 @@ sub pick_from_instagram($) {
   # Liberated access tokens.
   # jsdo.it search for: instagram client_id
   # Google search for: instagram "&client_id=" site:jsfiddle.net
-  my @tokens = ('b59fbe4563944b6c88cced13495c0f49', # gramfeed.com
-                'fa26679250df49c48a33fbcf30aae989', # instac.at
-                'd9494686198d4dfeb954979a3e270e5e', # iconosquare.com
-                '793ef48bb18e4197b61afce2d799b81c', # jsdo.it
-                '67b8a3e0073449bba70600d0fc68e6cb', # jsdo.it
-                '26a098e0df4d4b9ea8b4ce6c505b7742', # jsdo.it
-                '2437cbcd906a4c10940f990d283d3cd5', # jsdo.it
-                '191c7d7d5312464cbd92134f36ffdab5', # jsdo.it
-                'acfec809437b4340b2c38f66503af774', # jsdo.it
-                'e9f77604a3a24beba949c12d18130988', # jsdo.it
-                '2cd7bcf68ae346529770073d311575b3', # jsdo.it
-                '830c600fe8d742e2ab3f3b94f9bb22b7', # jsdo.it
-                '55865a0397ad41e5997dd95ef4df8da1', # jsdo.it
-                '192a5742f3644ea8bed1d25e439286a8', # jsdo.it
-                '38ed1477e7a44595861b8842cdb8ba23', # jsdo.it
-                'e52f79f645f54488ad0cc47f6f55ade6', # jsfiddle.net
+  my @tokens = (#'b59fbe4563944b6c88cced13495c0f49', # gramfeed.com
+                #'fa26679250df49c48a33fbcf30aae989', # instac.at
+                #'d9494686198d4dfeb954979a3e270e5e', # iconosquare.com
+                #'793ef48bb18e4197b61afce2d799b81c', # jsdo.it
+                #'67b8a3e0073449bba70600d0fc68e6cb', # jsdo.it
+                #'26a098e0df4d4b9ea8b4ce6c505b7742', # jsdo.it
+                #'2437cbcd906a4c10940f990d283d3cd5', # jsdo.it
+                #'191c7d7d5312464cbd92134f36ffdab5', # jsdo.it
+                #'acfec809437b4340b2c38f66503af774', # jsdo.it
+                #'e9f77604a3a24beba949c12d18130988', # jsdo.it
+                #'2cd7bcf68ae346529770073d311575b3', # jsdo.it
+                #'830c600fe8d742e2ab3f3b94f9bb22b7', # jsdo.it
+                #'55865a0397ad41e5997dd95ef4df8da1', # jsdo.it
+                #'192a5742f3644ea8bed1d25e439286a8', # jsdo.it
+                #'38ed1477e7a44595861b8842cdb8ba23', # jsdo.it
+                #'e52f79f645f54488ad0cc47f6f55ade6', # jsfiddle.net
                 );
 
   my $tok = $tokens[int(rand($#tokens+1))];
@@ -2475,7 +2445,7 @@ sub get_local_file($) {
   error ("$id: $file not in $local_dir?")
     unless ($file =~ m@^\Q$local_dir@o);
 
-  open (my $in, '<', $file) || error ("$id: $file: $!");
+  open (my $in, '<:raw', $file) || error ("$id: $file: $!");
   local $/ = undef;  # read entire file
   my $body = <$in>;
   close ($in) || error ("$id: $file: $!");
@@ -3292,7 +3262,7 @@ sub x_or_pbm_output($) {
     my ($iw, $ih);
 
     my $body = "";
-    open (my $imgf, '<', $bgimage) || error "couldn't open $bgimage: $!";
+    open (my $imgf, '<:raw', $bgimage) || error "couldn't open $bgimage: $!";
     local $/ = undef;  # read entire file
     $body = <$imgf>;
     close ($imgf);
@@ -3394,7 +3364,7 @@ sub paste_image($$$$) {
       return 0;
     }
 
-    open (my $out, '>', $image_tmp1) || error ("writing $image_tmp1: $!");
+    open (my $out, '>:raw', $image_tmp1) || error ("writing $image_tmp1: $!");
     (print $out $body) || error ("writing $image_tmp1: $!");
     close ($out) || error ("writing $image_tmp1: $!");
 
@@ -3428,7 +3398,7 @@ sub paste_image($$$$) {
     rename ($image_tmp2, $image_tmp1);
 
     # re-get the width/height in case the filter resized it.
-    open (my $imgf, '<', $image_tmp1) || return 0;
+    open (my $imgf, '<:raw', $image_tmp1) || return 0;
     $_ = <$imgf>;
     $_ = <$imgf>;
     ($iw, $ih) = m/^(\d+) (\d+)$/;
index 1afd5c85503d5ce1f2b86892dc9626df35957005..1989b3ab1ed2e14de8e853b1f446908b6c478818 100644 (file)
@@ -272,11 +272,7 @@ init_worm (ModeInfo * mi)
        int         size = MI_SIZE(mi);
        int         i, j;
 
-       if (worms == NULL) {
-               if ((worms = (wormstruct *) calloc(MI_NUM_SCREENS(mi),
-                                              sizeof (wormstruct))) == NULL)
-                       return;
-       }
+       MI_INIT (mi, worms, 0);
        wp = &worms[MI_SCREEN(mi)];
        if (MI_NPIXELS(mi) <= 2 || MI_WIN_IS_USE3D(mi))
                wp->nc = 2;
index 1565c8927581b6c3f82319f4adc26b9ca099429e..d1f3e1b707c5cb583de6704763d0c872c6efbd10 100644 (file)
@@ -82,7 +82,7 @@ struct state {
   chansetting *cs;
 
   int change_now;
-
+  int colorbars_only_p;
 };
 
 
@@ -155,6 +155,7 @@ update_smpte_colorbars(analogtv_input *input)
   ypos=ANALOGTV_V/5;
   xpos=ANALOGTV_VIS_START + ANALOGTV_VIS_LEN/2;
 
+  if (! st->colorbars_only_p)
   {
     char localname[256];
     if (gethostname (localname, sizeof (localname))==0) {
@@ -169,8 +170,9 @@ update_smpte_colorbars(analogtv_input *input)
   }
   ypos += st->ugly_font.char_h*5/2;
 
-  analogtv_draw_xpm(st->tv, input,
-                    logo_50_xpm, xpos - 100, ypos);
+  if (! st->colorbars_only_p)
+    analogtv_draw_xpm(st->tv, input,
+                      logo_50_xpm, xpos - 100, ypos);
 
   ypos += 58;
 
@@ -180,6 +182,7 @@ update_smpte_colorbars(analogtv_input *input)
   ypos += st->ugly_font.char_h*4;
 #endif
 
+  if (! st->colorbars_only_p)
   {
     char timestamp[256];
     time_t t = time ((time_t *) 0);
@@ -246,6 +249,7 @@ static const char *xanalogtv_defaults [] = {
 
 static XrmOptionDescRec xanalogtv_options [] = {
   { "-delay",          ".delay",               XrmoptionSepArg, 0 },
+  { "-colorbars-only", ".colorbarsOnly",       XrmoptionNoArg, "True" },
   ANALOGTV_OPTIONS
   { 0, 0, 0, 0 }
 };
@@ -421,7 +425,8 @@ static void load_station_images(struct state *st)
     analogtv_input *input = st->stations[i];
 
     st->chansettings[i].image_loaded_p = True;
-    if (i == 0) {   /* station 0 is always colorbars */
+    if (i == 0 ||   /* station 0 is always colorbars */
+        st->colorbars_only_p) {
       input->updater = update_smpte_colorbars;
       input->do_teletext=1;
     }
@@ -457,6 +462,9 @@ xanalogtv_init (Display *dpy, Window window)
   st->window = window;
   st->tv=analogtv_allocate(dpy, window);
 
+  st->colorbars_only_p =
+    get_boolean_resource(dpy, "colorbarsOnly", "ColorbarsOnly");
+
   add_stations(st);
 
   analogtv_set_defaults(st->tv, "");
index 2c1db6ef9b0fb79ff040fae2df4be76d12cf10a2..7e35081e7a62633ad8b8943d87f63cbfa4daa210 100644 (file)
@@ -41,6 +41,7 @@
 
    * 4-Oct-99, jwz: added support for packed-24bpp (versus 32bpp.)
    * 16-Jan-2002, jwz: added gdk_pixbuf support.
+   * 9-Oct-2016, Dave Odell <dmo2118@gmail.com>: Updated for new xshm.c.
 
  */
 
@@ -54,9 +55,7 @@
 #undef countof
 #define countof(x) (sizeof((x))/sizeof((*x)))
 
-#ifdef HAVE_XSHM_EXTENSION
-# include "xshm.h"
-#endif /* HAVE_XSHM_EXTENSION */
+#include "xshm.h"
 
 #include "images/bob.xbm"
 
@@ -71,12 +70,9 @@ struct state {
   Colormap        colormap;
   Visual          *visual;
   Screen          *screen;
-  Bool            shared;
   Bool            bloom;
   XImage          *xim;
-#ifdef HAVE_XSHM_EXTENSION
   XShmSegmentInfo shminfo;
-#endif /* HAVE_XSHM_EXTENSION */
   GC              gc;
   int             ctab[256];
 
@@ -125,30 +121,15 @@ MakeImage(struct state *st)
 {
   XGCValues gcv;
 
-  /* #### This probably leaks SHM every time the window is resized. */
   if (st->xim)
-    XDestroyImage (st->xim);
-
-#ifdef HAVE_XSHM_EXTENSION
-  st->shared = True;
-  st->xim = create_xshm_image (st->dpy, st->visual, st->depth, ZPixmap, NULL,
-                           &st->shminfo, st->width, st->height);
-#else  /* !HAVE_XSHM_EXTENSION */
-  st->xim = 0;
-#endif /* !HAVE_XSHM_EXTENSION */
+    destroy_xshm_image (st->dpy, st->xim, &st->shminfo);
 
+  st->xim = create_xshm_image (st->dpy, st->visual, st->depth, ZPixmap,
+                               &st->shminfo, st->width, st->height);
   if (!st->xim)
     {
-      st->shared = False;
-      st->xim = XCreateImage (st->dpy, st->visual, st->depth, ZPixmap, 0, NULL,
-                          st->width, st->height, 32, 0);
-      if (st->xim)
-        st->xim->data = (char *) calloc(st->xim->height, st->xim->bytes_per_line);
-      if (!st->xim || !st->xim->data)
-        {
-          fprintf(stderr,"%s: out of memory.\n", progname);
-          exit(1);
-        }
+      fprintf(stderr,"%s: out of memory.\n", progname);
+      exit(1);
     }
 
   if (! st->gc)
@@ -203,14 +184,9 @@ InitColors(struct state *st)
 static void
 DisplayImage(struct state *st)
 {
-#ifdef HAVE_XSHM_EXTENSION
-  if (st->shared)
-    XShmPutImage(st->dpy, st->window, st->gc, st->xim, 0,(st->top - 1) << 1, 0,
-                 (st->top - 1) << 1, st->width, st->height - ((st->top - 1) << 1), False);
-  else
-#endif /* HAVE_XSHM_EXTENSION */
-    XPutImage(st->dpy, st->window, st->gc, st->xim, 0, (st->top - 1) << 1, 0,
-              (st->top - 1) << 1, st->width, st->height - ((st->top - 1) << 1));
+  put_xshm_image(st->dpy, st->window, st->gc, st->xim, 0,(st->top - 1) << 1, 0,
+                 (st->top - 1) << 1, st->width, st->height - ((st->top - 1) << 1),
+                 &st->shminfo);
 }
 
 
index 00994ac878d93763e22f2a28f69e00e473afda34..29e1eb6d8c897b7116a5e79adbf18196db247448 100644 (file)
@@ -1,5 +1,5 @@
 /* xlockmore.c --- xscreensaver compatibility layer for xlockmore modules.
- * xscreensaver, Copyright (c) 1997-2014 Jamie Zawinski <jwz@jwz.org>
+ * xscreensaver, Copyright (c) 1997-2017 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
@@ -23,6 +23,9 @@
 # include <X11/Intrinsic.h>
 #endif /* !HAVE_JWXYZ */
 
+#include <assert.h>
+#include <float.h>
+
 #define countof(x) (sizeof((x))/sizeof(*(x)))
 
 #define MAX_COLORS (1L<<13)
@@ -235,6 +238,44 @@ xlockmore_setup (struct xscreensaver_function_table *xsft, void *arg)
 }
 
 
+static void
+xlockmore_free_screens (ModeInfo *mi)
+{
+  struct xlockmore_function_table *xlmft = mi->xlmft;
+
+  /* Optimization: xlockmore_read_resources calls this lots on first start. */
+  if (!xlmft->got_init)
+    return;
+
+  /* Order is important here: */
+
+  /* 1. Call free_## for all screens. */
+  if (xlmft->hack_free_state) {
+    int old_screen = mi->screen_number;
+    for (mi->screen_number = 0; mi->screen_number < XLOCKMORE_NUM_SCREENS;
+         ++mi->screen_number) {
+      xlmft->hack_free_state (mi);
+    }
+    mi->screen_number = old_screen;
+  }
+
+  /* 2. Call release_##, if it exists. */
+  if (xlmft->hack_release)
+    xlmft->hack_release (mi);
+
+  /* 3. Free the state array. */
+  if (xlmft->state_array) {
+    free(*xlmft->state_array);
+    *xlmft->state_array = NULL;
+    xlmft->state_array = NULL;
+  }
+
+  /* 4. Pretend FreeAllGL(mi) gets called here. */
+
+  mi->xlmft->got_init = 0;
+}
+
+
 static void
 xlockmore_read_resources (ModeInfo *mi)
 {
@@ -249,31 +290,77 @@ xlockmore_read_resources (ModeInfo *mi)
       int   *var_i = (int *) var;
       float *var_f = (float *) var;
 
+      /* If any of the options changed, stop this hack's other instances. */
       switch (xlockmore_opts->vars[i].type)
-       {
-       case t_String:
-         *var_c = get_string_resource (dpy, xlockmore_opts->vars[i].name,
-                                       xlockmore_opts->vars[i].classname);
-         break;
-       case t_Float:
-         *var_f = get_float_resource (dpy, xlockmore_opts->vars[i].name,
-                                      xlockmore_opts->vars[i].classname);
-         break;
-       case t_Int:
-         *var_i = get_integer_resource (dpy, xlockmore_opts->vars[i].name,
-                                        xlockmore_opts->vars[i].classname);
-         break;
-       case t_Bool:
-         *var_b = get_boolean_resource (dpy, xlockmore_opts->vars[i].name,
-                                        xlockmore_opts->vars[i].classname);
-         break;
-       default:
-         abort ();
-       }
+        {
+        case t_String:
+          {
+            char *c = get_string_resource (dpy, xlockmore_opts->vars[i].name,
+                                           xlockmore_opts->vars[i].classname);
+            if ((!c && !*var_c) || (c && *var_c && !strcmp(c, *var_c))) {
+              free (c);
+            } else {
+              xlockmore_free_screens (mi);
+              free (*var_c);
+              *var_c = c;
+            }
+          }
+          break;
+        case t_Float:
+          {
+            float f = get_float_resource (dpy, xlockmore_opts->vars[i].name,
+                                          xlockmore_opts->vars[i].classname);
+            float frac = fabsf(*var_f) * (1.0f / (1l << (FLT_MANT_DIG - 4)));
+            if (f < *var_f - frac || f > *var_f + frac) {
+              xlockmore_free_screens (mi);
+              *var_f = f;
+            }
+          }
+          break;
+        case t_Int:
+          {
+            int ii = get_integer_resource (dpy, xlockmore_opts->vars[i].name,
+                                          xlockmore_opts->vars[i].classname);
+            if (ii != *var_i) {
+              xlockmore_free_screens (mi);
+              *var_i = ii;
+            }
+          }
+          break;
+        case t_Bool:
+          {
+            Bool b = get_boolean_resource (dpy, xlockmore_opts->vars[i].name,
+                                           xlockmore_opts->vars[i].classname);
+            if (b != *var_b) {
+              xlockmore_free_screens (mi);
+              *var_b = b;
+            }
+          }
+          break;
+        default:
+          abort ();
+        }
     }
 }
 
 
+/* We keep a list of all of the screen numbers that are in use and not
+   yet freed so that they can have sensible screen numbers.  If three
+   displays are created (0, 1, 2) and then #1 is closed, then the fourth
+   display will be given the now-unused display number 1. (Everything in
+   here assumes a 1:1 Display/Screen mapping.)
+
+   XLOCKMORE_NUM_SCREENS is the most number of live displays at one time. So
+   if it's 64, then we'll blow up if the system has 64 monitors and also has
+   System Preferences open (the small preview window).
+
+   Note that xlockmore-style savers tend to allocate big structures, so
+   setting XLOCKMORE_NUM_SCREENS to 1000 will waste a few megabytes.  Also
+   most (all?) of them assume that the number of screens never changes, so
+   dynamically expanding this array won't work.
+ */
+
+
 static void *
 xlockmore_init (Display *dpy, Window window, 
                 struct xlockmore_function_table *xlmft)
@@ -292,53 +379,43 @@ xlockmore_init (Display *dpy, Window window,
   mi->window = window;
   XGetWindowAttributes (dpy, window, &mi->xgwa);
   
-#ifdef HAVE_JWXYZ
-  
-# if 0
-  /* In Cocoa and Android-based xscreensaver, all hacks run in the
-     same address space, so each one needs to get its own screen
-     number.  Believe what jwxyz says about screen counts and numbers.
-   */
-  mi->num_screens = ScreenCount (dpy);
-  mi->screen_number = XScreenNumberOfScreen (mi->xgwa.screen);
-# else
-  /* No, that doesn't work.
-     The xlockmore docs/HACKERS.GUIDE says that xlock modes are supposed to
-     support repeated calls to init_*() for the same screen in the same
-     session, but in practice, a number of them blow up if you do that.
-     So instead we're stuck with a world where on OSX/iOS, we have to
-     increment the screen number every time the hack is run. Arrgh.
-   */
-  mi->num_screens = 40;
-  mi->screen_number = xlmft->screen_count;
-  if (mi->screen_number >= mi->num_screens) abort();
-  xlmft->screen_count++;
-# endif
-  root_p = True;
+  /* In Cocoa and Android-based xscreensaver, as well as with DEBUG_PAIR,
+     hacks run in the same address space, so each one needs to get its own
+     screen number.
 
-#else /* real Xlib */
-  
-  /* In Xlib-based xscreensaver, each hack runs in its own address space,
-     so each one only needs to be aware of one screen.
+     Find the first empty slot in live_displays and plug us in.
    */
-  mi->num_screens = 1;
-  mi->screen_number = 0;
-  
-  {  /* kludge for DEBUG_PAIR */
-    static int screen_tick = 0;
-    mi->num_screens++;
-    if (screen_tick)
-      mi->screen_number++;
-    screen_tick++;
+  {
+    const int size = XLOCKMORE_NUM_SCREENS;
+    int i;
+    for (i = 0; i < size; i++) {
+      if (! (xlmft->live_displays & (1 << i)))
+        break;
+    }
+    if (i >= size) abort();
+    xlmft->live_displays |= 1ul << i;
+    xlmft->got_init &= ~(1ul << i);
+    mi->screen_number = i;
   }
 
   root_p = (window == RootWindowOfScreen (mi->xgwa.screen));
 
+#ifndef HAVE_JWXYZ
+
   /* Everybody gets motion events, just in case. */
   XSelectInput (dpy, window, (mi->xgwa.your_event_mask | PointerMotionMask));
 
 #endif /* !HAVE_JWXYZ */
-  
+
+  if (mi->xlmft->hack_release) {
+/*
+    fprintf (
+      stderr,
+      "%s: WARNING: hack_release is not usually recommended; see MI_INIT.\n",
+      progname);
+*/
+  }
+
   color.flags = DoRed|DoGreen|DoBlue;
   color.red = color.green = color.blue = 0;
   if (!XAllocColor(dpy, mi->xgwa.colormap, &color))
@@ -441,9 +518,6 @@ xlockmore_init (Display *dpy, Window window,
 
   mi->wireframe_p = get_boolean_resource (dpy, "wireframe", "Boolean");
   mi->root_p = root_p;
-#ifdef HAVE_XSHM_EXTENSION
-  mi->use_shm = get_boolean_resource (dpy, "useSHM", "Boolean");
-#endif /* !HAVE_XSHM_EXTENSION */
   mi->fps_p = get_boolean_resource (dpy, "doFPS", "DoFPS");
   mi->recursion_depth = -1;  /* see fps.c */
 
@@ -478,24 +552,30 @@ xlockmore_init (Display *dpy, Window window,
         free (name);
       }
   }
-
+  
   xlockmore_read_resources (mi);
 
-  XClearWindow (dpy, window);
-
-  mi->xlmft->hack_init (mi);
-
   return mi;
 }
 
+static void xlockmore_do_init (ModeInfo *mi)
+{
+  if (! (mi->xlmft->got_init & (1 << mi->screen_number))) {
+    mi->xlmft->got_init |= 1 << mi->screen_number;
+    XClearWindow (mi->dpy, mi->window);
+    mi->xlmft->hack_init (mi);
+  }
+}
+
+
 static unsigned long
 xlockmore_draw (Display *dpy, Window window, void *closure)
 {
   ModeInfo *mi = (ModeInfo *) closure;
-
   unsigned long orig_pause = mi->pause;
   unsigned long this_pause;
 
+  xlockmore_do_init (mi);
   mi->xlmft->hack_draw (mi);
 
   this_pause = mi->pause;
@@ -512,6 +592,7 @@ xlockmore_reshape (Display *dpy, Window window, void *closure,
   if (mi && mi->xlmft->hack_reshape)
     {
       XGetWindowAttributes (dpy, window, &mi->xgwa);
+      xlockmore_do_init (mi);
       mi->xlmft->hack_reshape (mi, mi->xgwa.width, mi->xgwa.height);
     }
 }
@@ -520,10 +601,12 @@ static Bool
 xlockmore_event (Display *dpy, Window window, void *closure, XEvent *event)
 {
   ModeInfo *mi = (ModeInfo *) closure;
-  if (mi && mi->xlmft->hack_handle_events)
+  if (mi && mi->xlmft->hack_handle_events) {
+    xlockmore_do_init (mi);
     return mi->xlmft->hack_handle_events (mi, event);
-  else
+  } else {
     return False;
+  }
 }
 
 void
@@ -538,22 +621,61 @@ xlockmore_do_fps (Display *dpy, Window w, fps_state *fpst, void *closure)
 static void
 xlockmore_free (Display *dpy, Window window, void *closure)
 {
-  /* Most of the xlockmore/GL hacks don't have `free' functions, and of
-     those that do have them, they're incomplete or buggy.  So, fuck it.
-     Under X11, we're about to exit anyway, and it doesn't matter.
-     On OSX, we'll leak a little.  Beats crashing.
-   */
-#if 0
   ModeInfo *mi = (ModeInfo *) closure;
-  if (mi->xlmft->hack_free)
-    mi->xlmft->hack_free (mi);
+
+  /* Find us in live_displays and clear that slot. */
+  assert (mi->xlmft->live_displays & (1ul << mi->screen_number));
+  mi->xlmft->live_displays &= ~(1ul << mi->screen_number);
+  if (!mi->xlmft->live_displays)
+    xlockmore_free_screens (mi);
 
   XFreeGC (dpy, mi->gc);
-  free_colors (dpy, mi->xgwa.colormap, mi->colors, mi->npixels);
+  free_colors (mi->xgwa.screen, mi->xgwa.colormap, mi->colors, mi->npixels);
   free (mi->colors);
   free (mi->pixels);
 
   free (mi);
-#endif
 }
 
+
+void
+xlockmore_mi_init (ModeInfo *mi, size_t state_size, void **state_array,
+                         void (*hack_free_state) (ModeInfo *))
+{
+  struct xlockmore_function_table *xlmft = mi->xlmft;
+
+  /* Steal the state_array for safe keeping.
+     Only necessary when the screenhack isn't a once per process deal.
+     (i.e. macOS, iOS, Android)
+   */
+  assert ((!xlmft->state_array && !*state_array) ||
+          xlmft->state_array == state_array);
+  xlmft->state_array = state_array;
+  assert (!xlmft->state_size || xlmft->state_size == state_size);
+  xlmft->state_size = state_size;
+  assert (!xlmft->hack_free_state ||
+          xlmft->hack_free_state == hack_free_state);
+  xlmft->hack_free_state = hack_free_state;
+
+  if (!*xlmft->state_array) {
+    *xlmft->state_array = calloc (XLOCKMORE_NUM_SCREENS, state_size);
+
+    if (!*xlmft->state_array) {
+#ifdef HAVE_JWXYZ
+      /* Throws an exception instead of exiting the process. */
+      jwxyz_abort ("%s: out of memory", progname);
+#else
+      fprintf (stderr, "%s: out of memory\n", progname);
+      exit (1);
+#endif
+    }
+  }
+
+  /* Find the appropriate state object, clear it, and we're done. */
+  {
+    if (xlmft->hack_free_state)
+      xlmft->hack_free_state (mi);
+    memset ((char *)(*xlmft->state_array) + mi->screen_number * state_size, 0,
+            state_size);
+  }
+}
index 5572580d8e6e4dfe226e1768cd3bbe978080451d..fe09961481869246ad0aea95c34c5233580d76c2 100644 (file)
@@ -35,8 +35,9 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
  */
 #define MI_DISPLAY(MI)         ((MI)->dpy)
 #define MI_WINDOW(MI)          ((MI)->window)
-#define MI_NUM_SCREENS(MI)     ((MI)->num_screens)
+#define MI_NUM_SCREENS(MI)     XLOCKMORE_NUM_SCREENS
 #define MI_SCREEN(MI)          ((MI)->screen_number)
+#define MI_SCREENPTR(MI)       ((MI)->xgwa.screen)
 #define MI_WIN_WHITE_PIXEL(MI) ((MI)->white)
 #define MI_WIN_BLACK_PIXEL(MI) ((MI)->black)
 #define MI_NPIXELS(MI)         ((MI)->npixels)
@@ -89,6 +90,43 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
 
 #define MI_CLEARWINDOW(mi) XClearWindow(MI_DISPLAY(mi), MI_WINDOW(mi))
 
+/* MI_INIT and MI_ABORT are XScreenSaver extensions. These exist primarily for
+   the sake of ports to macOS, iOS, and Android, all of which need to restart
+   individual screenhacks repeatedly in the same process. This requires
+   reusing MI_SCREEN() numbers; previously many xlockmore API hacks did not
+   support this the way they were supposed to.
+ */
+
+/* MI_INIT implements the following pattern, as seen in various forms at the
+   beginning of init_##():
+
+   if(!state_array) {
+     state_array = (state_t *)calloc(MI_NUM_SCREENS(mi), sizeof(state_t));
+     if(!state_array) {
+       fprintf(stderr, "%s: out of memory\n", progname);
+       return;
+     }
+   }
+   hack_free_state(mi);
+   memset(&state_array[MI_SCREEN(mi)], 0, sizeof(*state_array));
+
+   It also enables hack_free_state to run when a screen is no longer in use.
+   This is called at some point after the last call to draw_##, but before
+   release_##.
+ */
+
+#define MI_INIT(mi, state_array, hack_free_state) \
+  xlockmore_mi_init ((mi), sizeof(*(state_array)), (void **)&(state_array), \
+                     hack_free_state)
+
+/* Use MI_ABORT if an init_## or draw_## hook needs to shut everything down.
+   This replaces explicit calls to release_## hooks when things go wrong from
+   inside an xlockmore API screenhack.
+
+   At some point this may do something other than just abort().
+ */
+#define MI_ABORT(mi)           abort();
+
 #define FreeAllGL(dpy)         /* */
 
 /* Some other utility macros.
@@ -179,8 +217,7 @@ ERROR!  Sorry, xlockmore.h requires ANSI C (gcc, for example.)
           refresh_ ## PREFIX,                                          \
           release_ ## PREFIX,                                          \
           PREFIX   ## _handle_event,                                   \
-          & PREFIX ## _opts,                                           \
-          0                                                            \
+          & PREFIX ## _opts                                            \
   };                                                                   \
                                                                        \
   struct xscreensaver_function_table                                   \
index 1d54b7814f65f6c5563c63672836347decfbd476..432e600c39f82652e29d65f0c9a504e9ec8d53ad 100644 (file)
 #include <time.h>
 
 #include "screenhackI.h"
-
-#ifdef HAVE_XSHM_EXTENSION
-# include "xshm.h"
-#endif /* HAVE_XSHM_EXTENSION */
+#include "xshm.h"
 
 
 typedef struct ModeInfo ModeInfo;
@@ -80,6 +77,10 @@ extern void xlockmore_setup (struct xscreensaver_function_table *, void *);
 extern void xlockmore_do_fps (Display *, Window, fps_state *, void *);
 
 
+extern void xlockmore_mi_init (ModeInfo *, size_t, void **,
+                               void (*) (ModeInfo *));
+
+
 /* The xlockmore RNG API is implemented in utils/yarandom.h. */
 
 
@@ -88,7 +89,6 @@ struct ModeInfo {
   Display *dpy;
   Window window;
   Bool root_p;
-  int num_screens;
   int screen_number;
   int npixels;
   unsigned long *pixels;
@@ -117,11 +117,6 @@ struct ModeInfo {
   Bool fps_p;
   unsigned long polygon_count;  /* These values are for -fps display only */
   double recursion_depth;
-
-#ifdef HAVE_XSHM_EXTENSION
-  Bool use_shm;
-  XShmSegmentInfo shm_info;
-#endif
 };
 
 typedef enum {  t_String, t_Float, t_Int, t_Bool } xlockmore_type;
@@ -158,11 +153,21 @@ struct xlockmore_function_table {
   void (*hack_draw) (ModeInfo *);
   void (*hack_reshape) (ModeInfo *, int, int);
   void (*hack_refresh) (ModeInfo *);
-  void (*hack_free) (ModeInfo *);
+  void (*hack_release) (ModeInfo *);
   Bool (*hack_handle_events) (ModeInfo *, XEvent *);
   ModeSpecOpt *opts;
 
-  unsigned int screen_count; /* Only used on the OS X and iOS ports. */
+  size_t state_size;
+  void **state_array;
+  void (*hack_free_state) (ModeInfo *);
+  unsigned long live_displays, got_init;
 };
 
+#ifdef HAVE_JWXYZ
+# define XLOCKMORE_NUM_SCREENS \
+  (sizeof(((struct xlockmore_function_table *)0)->live_displays) * 8)
+#else
+# define XLOCKMORE_NUM_SCREENS 2 /* For DEBUG_PAIR. */
+#endif
+
 #endif /* __XLOCKMORE_INTERNAL_H__ */
index 2864acba769576bc784b71506c98749447157beb..34cda469566be5ca2e82f7dac9452ac0f9d38f55 100644 (file)
@@ -32,7 +32,7 @@ INSTALL_DIRS  = @INSTALL_DIRS@
 
 X_CFLAGS       = @X_CFLAGS@
 
-INCLUDES_1     = -I$(srcdir) -I..
+INCLUDES_1     = -I$(srcdir) -I.. -I../utils
 INCLUDES       = $(INCLUDES_1) @INCLUDES@
 
 SRCS           = jwxyz-android.c jwxyz-cocoa.m jwxyz-common.c jwxyz-gl.c \
index 3c85d253b579b88e37da88abfa047fc820b36283..6559b69be3b66a54edc117428bfeee876d13e5b2 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2016-2017 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
@@ -38,6 +38,7 @@
 #include "jwxyz-android.h"
 #include "textclient.h"
 #include "grabscreen.h"
+#include "pow2.h"
 
 
 #define countof(x) (sizeof(x)/sizeof(*(x)))
@@ -47,6 +48,7 @@ extern struct xscreensaver_function_table *xscreensaver_function_table;
 struct function_table_entry {
   const char *progname;
   struct xscreensaver_function_table *xsft;
+  int api;
 };
 
 #include "gen/function-table.h"
@@ -143,20 +145,94 @@ static jmethodID entryGetKey, entryGetValue;
 static pthread_mutex_t mutg = PTHREAD_MUTEX_INITIALIZER;
 
 static void screenhack_do_fps (Display *, Window, fps_state *, void *);
+static char *get_string_resource_window (Window window, char *name);
+
+
+/* Also creates double-buffered windows. */
+static void
+create_pixmap (Window win, Drawable p)
+{
+  // See also:
+  // https://web.archive.org/web/20140213220709/http://blog.vlad1.com/2010/07/01/how-to-go-mad-while-trying-to-render-to-a-texture/
+  // https://software.intel.com/en-us/articles/using-opengl-es-to-accelerate-apps-with-legacy-2d-guis
+  // https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_image_native_buffer.txt
+
+  Assert (p->frame.width, "p->frame.width");
+  Assert (p->frame.height, "p->frame.height");
+
+  struct running_hack *rh = win->window.rh;
+
+  if (rh->gl_fbo_p) {
+    glGenTextures (1, &p->texture);
+    glBindTexture (GL_TEXTURE_2D, p->texture);
+
+    glTexImage2D (GL_TEXTURE_2D, 0, GL_RGBA,
+                  to_pow2(p->frame.width), to_pow2(p->frame.height),
+                  0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+  } else {
+    EGLint attribs[5];
+    attribs[0] = EGL_WIDTH;
+    attribs[1] = p->frame.width;
+    attribs[2] = EGL_HEIGHT;
+    attribs[3] = p->frame.height;
+    attribs[4] = EGL_NONE;
+
+    p->egl_surface = eglCreatePbufferSurface(rh->egl_display, rh->egl_config,
+                                           attribs);
+    Assert (p->egl_surface != EGL_NO_SURFACE,
+            "XCreatePixmap: got EGL_NO_SURFACE");
+  }
+}
+
+
+static void
+free_pixmap (struct running_hack *rh, Pixmap p)
+{
+  if (rh->gl_fbo_p) {
+    glDeleteTextures (1, &p->texture);
+  } else {
+    eglDestroySurface(rh->egl_display, p->egl_surface);
+  }
+}
+
+
+static void
+restore_surface (struct running_hack *rh)
+{
+  /* This is necessary because GLSurfaceView (in Java) will call
+     eglSwapBuffers under the (ordinarily reasonable) assumption that the EGL
+     surface associated with the EGL context hasn't been changed.
+   */
+  eglMakeCurrent (rh->egl_display, rh->egl_surface, rh->egl_surface,
+                  rh->egl_ctx);
+  rh->current_drawable = NULL;
+}
+
+
+static void
+get_egl_surface (struct running_hack *rh)
+{
+  rh->egl_surface = eglGetCurrentSurface(EGL_DRAW);
+  Assert(eglGetCurrentSurface(EGL_READ) == rh->egl_surface,
+         "doinit: EGL_READ != EGL_DRAW");
+}
 
 
 // Initialized OpenGL and runs the screenhack's init function.
 //
 static void
 doinit (jobject jwxyz_obj, struct running_hack *rh, JNIEnv *env,
-        const struct function_table_entry *chosen, jint api, 
+        const struct function_table_entry *chosen,
         jobject defaults, jint w, jint h)
 {
   if (setjmp (jmp_target)) goto END;  // Jump here from jwxyz_abort and return.
 
   progname = chosen->progname;
   rh->xsft = chosen->xsft;
-  rh->api = api;
+  rh->api = chosen->api;
   rh->jni_env = env;
   rh->jobject = jwxyz_obj;  // update this every time we call into C
 
@@ -171,41 +247,10 @@ doinit (jobject jwxyz_obj, struct running_hack *rh, JNIEnv *env,
   wnd->frame.height = h;
   wnd->type = WINDOW;
 
-  rh->egl_window_ctx = eglGetCurrentContext();
-  Assert(rh->egl_window_ctx != EGL_NO_CONTEXT, "doinit: EGL_NO_CONTEXT");
-
-  wnd->egl_surface = eglGetCurrentSurface(EGL_DRAW);
-  Assert(eglGetCurrentSurface(EGL_READ) == wnd->egl_surface,
-         "doinit: EGL_READ != EGL_DRAW");
-
-  rh->egl_display = eglGetCurrentDisplay();
-  Assert(rh->egl_display != EGL_NO_DISPLAY, "doinit: EGL_NO_DISPLAY");
-
-  EGLint config_attribs[3];
-  config_attribs[0] = EGL_CONFIG_ID;
-  eglQueryContext(rh->egl_display, rh->egl_window_ctx, EGL_CONFIG_ID,
-                  &config_attribs[1]);
-  config_attribs[2] = EGL_NONE;
-
-  EGLint num_config;
-  eglChooseConfig(rh->egl_display, config_attribs,
-                  &rh->egl_config, 1, &num_config);
-  Assert(num_config == 1, "no EGL config chosen");
-
-  rh->egl_xlib_ctx = eglCreateContext(rh->egl_display, rh->egl_config,
-                                      EGL_NO_CONTEXT, NULL);
-  Assert(rh->egl_xlib_ctx != EGL_NO_CONTEXT, "doinit: EGL_NO_CONTEXT");
-  Assert(rh->egl_xlib_ctx != rh->egl_window_ctx, "Only one context here?!");
-
   rh->window = wnd;
-  rh->dpy = jwxyz_make_display(wnd);
-  Assert(wnd == XRootWindow(rh->dpy, 0), "Wrong root window.");
-  // TODO: Zero looks right, but double-check that is the right number
-
   progclass = rh->xsft->progclass;
 
   if ((*env)->ExceptionOccurred(env)) abort();
-  jwzgles_reset();
 
   // This has to come before resource processing. It does not do graphics.
   if (rh->xsft->setup_cb)
@@ -223,14 +268,14 @@ doinit (jobject jwxyz_obj, struct running_hack *rh, JNIEnv *env,
   if ((*env)->ExceptionOccurred(env)) abort();
 
   const struct { const char *key, *val; } default_defaults[] = {
-    { "doubleBuffer", "false" },
-    { "multiSample",  "false" },
+    { "doubleBuffer", "True" },
+    { "multiSample",  "False" },
     { "texFontCacheSize", "30" },
     { "textMode", "date" },
     { "textURL",
       "https://en.wikipedia.org/w/index.php?title=Special:NewPages&feed=rss" },
-    { "grabDesktopImages",  "true" },
-    { "chooseRandomImages", "true" },
+    { "grabDesktopImages",  "True" },
+    { "chooseRandomImages", "True" },
   };
 
   for (int i = 0; i < countof(default_defaults); i++) {
@@ -290,6 +335,110 @@ doinit (jobject jwxyz_obj, struct running_hack *rh, JNIEnv *env,
   (*env)->DeleteLocalRef (env, c);
   if ((*env)->ExceptionOccurred(env)) abort();
 
+  // GL init. Must come after resource processing.
+
+  rh->egl_ctx = eglGetCurrentContext();
+  Assert(rh->egl_ctx != EGL_NO_CONTEXT, "doinit: EGL_NO_CONTEXT");
+
+  get_egl_surface (rh);
+
+  rh->egl_display = eglGetCurrentDisplay();
+  Assert(rh->egl_display != EGL_NO_DISPLAY, "doinit: EGL_NO_DISPLAY");
+
+  unsigned egl_major, egl_minor;
+  if (sscanf ((const char *)eglQueryString(rh->egl_display, EGL_VERSION),
+              "%u.%u", &egl_major, &egl_minor) < 2)
+  {
+    egl_major = 1;
+    egl_minor = 0;
+  }
+
+  EGLint config_attribs[3];
+  config_attribs[0] = EGL_CONFIG_ID;
+  eglQueryContext(rh->egl_display, rh->egl_ctx, EGL_CONFIG_ID,
+                  &config_attribs[1]);
+  config_attribs[2] = EGL_NONE;
+
+  EGLint num_config;
+  eglChooseConfig(rh->egl_display, config_attribs,
+                  &rh->egl_config, 1, &num_config);
+  Assert(num_config == 1, "no EGL config chosen");
+
+  const GLubyte *extensions = glGetString (GL_EXTENSIONS);
+  rh->gl_fbo_p = jwzgles_gluCheckExtension (
+    (const GLubyte *)"GL_OES_framebuffer_object", extensions);
+
+  if (rh->gl_fbo_p) {
+    PFNGLGENFRAMEBUFFERSOESPROC glGenFramebuffersOES =
+      (PFNGLGENFRAMEBUFFERSOESPROC)
+        eglGetProcAddress ("glGenFramebuffersOES");
+
+    rh->glBindFramebufferOES = (PFNGLBINDFRAMEBUFFEROESPROC)
+        eglGetProcAddress ("glBindFramebufferOES");
+    rh->glFramebufferTexture2DOES = (PFNGLFRAMEBUFFERTEXTURE2DOESPROC)
+      eglGetProcAddress ("glFramebufferTexture2DOES");
+
+    glGetIntegerv (GL_FRAMEBUFFER_BINDING_OES, &rh->fb_default);
+    Assert (!rh->fb_default, "default framebuffer not current framebuffer");
+    glGenFramebuffersOES (1, &rh->fb_pixmap);
+    wnd->texture = 0;
+  } else {
+    wnd->egl_surface = rh->egl_surface;
+  }
+
+  /* TODO: Maybe ask for EGL_SWAP_BEHAVIOR_PRESERVED_BIT on the Java side of
+           things via EGLConfigChooser. I (Dave) seem to automatically get
+           this (n = 1), but maybe other devices won't.
+   */
+  rh->frontbuffer_p = False;
+
+  if (rh->api == API_XLIB ||
+      (rh->api == API_GL &&
+       strcmp("True", get_string_resource_window(wnd, "doubleBuffer")))) {
+
+    rh->frontbuffer_p = True;
+
+# if 0 /* Might need to be 0 for Adreno...? */
+    if (egl_major > 1 || (egl_major == 1 && egl_minor >= 2)) {
+      EGLint surface_type;
+      eglGetConfigAttrib(rh->egl_display, rh->egl_config, EGL_SURFACE_TYPE,
+                         &surface_type);
+      if(surface_type & EGL_SWAP_BEHAVIOR_PRESERVED_BIT) {
+        eglSurfaceAttrib(rh->egl_display, rh->egl_surface, EGL_SWAP_BEHAVIOR,
+                         EGL_BUFFER_PRESERVED);
+        rh->frontbuffer_p = False;
+      }
+    }
+# endif
+
+    if (rh->frontbuffer_p) {
+      /* create_pixmap needs rh->gl_fbo_p and wnd->frame. */
+      create_pixmap (wnd, wnd);
+
+      /* No preserving backbuffers, so manual blit from back to "front". */
+      rh->frontbuffer.type = PIXMAP;
+      rh->frontbuffer.frame = wnd->frame;
+      rh->frontbuffer.pixmap.depth = visual_depth (NULL, NULL);
+
+      if(rh->gl_fbo_p) {
+        rh->frontbuffer.texture = 0;
+      } else {
+        Assert (wnd->egl_surface != rh->egl_surface,
+                "oops: wnd->egl_surface == rh->egl_surface");
+        rh->frontbuffer.egl_surface = rh->egl_surface;
+      }
+    }
+  }
+
+  rh->dpy = jwxyz_make_display(wnd);
+  Assert(wnd == XRootWindow(rh->dpy, 0), "Wrong root window.");
+  // TODO: Zero looks right, but double-check that is the right number
+
+  /* Requires valid rh->dpy. */
+  rh->copy_gc = XCreateGC (rh->dpy, &rh->frontbuffer, 0, NULL);
+  rh->gles_state = jwzgles_make_state();
+  restore_surface(rh);
  END: ;
 }
 
@@ -333,8 +482,11 @@ drawXScreenSaver (JNIEnv *env, struct running_hack *rh)
      but the screen is getting filled with random bits.  So let's wait a
      few frames before really starting up.
    */
-  if (++rh->frame_count < 8)
+  if (++rh->frame_count < 8) {
+    /* glClearColor (1.0, 0.0, 1.0, 0.0); */
+    glClear (GL_COLOR_BUFFER_BIT); /* We always need to draw *something*. */
     goto END;
+  }
 
   prepare_context(rh);
 
@@ -358,9 +510,12 @@ drawXScreenSaver (JNIEnv *env, struct running_hack *rh)
     rh->closure = init_cb (rh->dpy, rh->window, rh->xsft->setup_arg);
     rh->initted_p = True;
 
-    rh->ignore_rotation_p =
+    /* ignore_rotation_p doesn't quite work at the moment. */
+    rh->ignore_rotation_p = False;
+/*
       (rh->api == API_XLIB &&
        get_boolean_resource (rh->dpy, "ignoreRotation", "IgnoreRotation"));
+*/
 
     if (get_boolean_resource (rh->dpy, "doFPS", "DoFPS")) {
       rh->fpst = fps_init (rh->dpy, rh->window);
@@ -393,6 +548,14 @@ drawXScreenSaver (JNIEnv *env, struct running_hack *rh)
   if (rh->fpst && rh->xsft->fps_cb)
     rh->xsft->fps_cb (rh->dpy, rh->window, rh->fpst, rh->closure);
 
+  if (rh->frontbuffer_p) {
+    jwxyz_copy_area (rh->dpy, rh->window, &rh->frontbuffer, rh->copy_gc,
+                     0, 0, rh->window->frame.width, rh->window->frame.height,
+                     0, 0);
+  }
+
+  restore_surface (rh);
+
  END: ;
 
 # ifdef DEBUG_FPS
@@ -439,8 +602,7 @@ acquireClass (JNIEnv *env, const char *className, jobject *globalRef)
 //
 JNIEXPORT void JNICALL
 Java_org_jwz_xscreensaver_jwxyz_nativeInit (JNIEnv *env, jobject thiz,
-                                            jstring jhack, jint api,
-                                            jobject defaults,
+                                            jstring jhack, jobject defaults,
                                             jint w, jint h)
 {
   pthread_mutex_lock(&mutg);
@@ -501,7 +663,7 @@ Java_org_jwz_xscreensaver_jwxyz_nativeInit (JNIEnv *env, jobject thiz,
 
   (*env)->ReleaseStringUTFChars(env, jhack, hack);
 
-  doinit (thiz, rh, env, &function_table[chosen], api, defaults, w, h);
+  doinit (thiz, rh, env, &function_table[chosen], defaults, w, h);
 
   pthread_mutex_unlock(&mutg);
 }
@@ -537,6 +699,16 @@ Java_org_jwz_xscreensaver_jwxyz_nativeResize (JNIEnv *env, jobject thiz,
     wnd->frame.height = h;
   }
 
+  get_egl_surface (rh);
+  if (rh->frontbuffer_p) {
+    free_pixmap (rh, wnd);
+    create_pixmap (wnd, wnd);
+
+    rh->frontbuffer.frame = wnd->frame;
+    if (!rh->gl_fbo_p)
+      rh->frontbuffer.egl_surface = rh->egl_surface;
+  }
+
   jwxyz_window_resized (rh->dpy);
   if (rh->initted_p)
     rh->xsft->reshape_cb (rh->dpy, rh->window, rh->closure,
@@ -548,6 +720,8 @@ Java_org_jwz_xscreensaver_jwxyz_nativeResize (JNIEnv *env, jobject thiz,
     glMatrixMode (GL_MODELVIEW);
   }
 
+  restore_surface (rh);
+
  END:
   pthread_mutex_unlock(&mutg);
 }
@@ -577,6 +751,8 @@ Java_org_jwz_xscreensaver_jwxyz_nativeDone (JNIEnv *env, jobject thiz)
 
   if (rh->initted_p)
     rh->xsft->free_cb (rh->dpy, rh->window, rh->closure);
+  XFreeGC (rh->dpy, rh->copy_gc);
+  jwzgles_free_state ();
   jwxyz_free_display(rh->dpy);
 
   free(rh);
@@ -733,12 +909,35 @@ Java_org_jwz_xscreensaver_jwxyz_sendKeyEvent (JNIEnv *env, jobject thiz,
 void
 prepare_context (struct running_hack *rh)
 {
-  Window w = rh->window;
-  eglMakeCurrent (rh->egl_display, w->egl_surface, w->egl_surface,
-                  rh->egl_window_ctx);
-  rh->current_drawable = rh->window;
+  /* Don't set matrices here; set them when an Xlib call triggers
+     jwxyz_bind_drawable/jwxyz_set_matrices.
+   */
+  rh->current_drawable = NULL;
+  jwzgles_make_current (rh->gles_state);
+}
+
+static void
+finish_bind_drawable (Display *dpy, Drawable dst)
+{
+  jwxyz_assert_gl ();
+
+  glViewport (0, 0, dst->frame.width, dst->frame.height);
+  jwxyz_set_matrices (dpy, dst->frame.width, dst->frame.height, False);
+}
+
+
+static void
+bind_drawable_fbo (struct running_hack *rh, Drawable d)
+{
+  rh->glBindFramebufferOES (GL_FRAMEBUFFER_OES,
+                            d->texture ? rh->fb_pixmap : rh->fb_default);
+  if (d->texture) {
+    rh->glFramebufferTexture2DOES (GL_FRAMEBUFFER_OES, GL_COLOR_ATTACHMENT0_OES,
+                                   GL_TEXTURE_2D, d->texture, 0);
+  }
 }
 
+
 void
 jwxyz_bind_drawable (Display *dpy, Window w, Drawable d)
 {
@@ -746,16 +945,13 @@ jwxyz_bind_drawable (Display *dpy, Window w, Drawable d)
   JNIEnv *env = w->window.rh->jni_env;
   if ((*env)->ExceptionOccurred(env)) abort();
   if (rh->current_drawable != d) {
-    EGLContext ctx = d == w ? rh->egl_window_ctx : rh->egl_xlib_ctx;
-    eglMakeCurrent (rh->egl_display, d->egl_surface, d->egl_surface, ctx);
-    // Log("%p %p %p %p %p", rh->egl_display, d->egl_surface, ctx, w, d);
-    rh->current_drawable = d;
-    jwxyz_assert_gl ();
-
-    if (d != w) {
-      glViewport (0, 0, d->frame.width, d->frame.height);
-      jwxyz_set_matrices (dpy, d->frame.width, d->frame.height, False);
+    if (rh->gl_fbo_p) {
+      bind_drawable_fbo (rh, d);
+    } else {
+      eglMakeCurrent (rh->egl_display, d->egl_surface, d->egl_surface, rh->egl_ctx);
     }
+    finish_bind_drawable (dpy, d);
+    rh->current_drawable = d;
   }
 }
 
@@ -802,11 +998,46 @@ jwxyz_copy_area (Display *dpy, Drawable src, Drawable dst, GC gc,
                  int src_x, int src_y, unsigned int width, unsigned int height,
                  int dst_x, int dst_y)
 {
-#if 0
-  // Hilarious display corruption ahoy!
-  jwxyz_gl_copy_area_copy_tex_image (dpy, src, dst, gc, src_x, src_y,
+  Window w = XRootWindow (dpy, 0);
+  struct running_hack *rh = w->window.rh;
+
+  if (rh->gl_fbo_p && src->texture && src != dst) {
+    bind_drawable_fbo (rh, dst);
+    finish_bind_drawable (dpy, dst);
+    rh->current_drawable = NULL;
+
+    glBindTexture (GL_TEXTURE_2D, src->texture);
+
+    jwxyz_gl_draw_image (GL_TEXTURE_2D, to_pow2(src->frame.width),
+                         to_pow2(src->frame.height),
+                         src_x, src->frame.height - src_y - height,
+                         width, height, dst_x, dst_y);
+    return;
+  }
+
+#if 1
+  // Kumppa: 0.24 FPS
+  // Hilarious display corruption ahoy! (Note to self: it's on the emulator.)
+  // TODO for Dave: Recheck behavior on the emulator with the better Pixmap support.
+
+  rh->current_drawable = NULL;
+  if (rh->gl_fbo_p)
+    bind_drawable_fbo (rh, src);
+  else
+    eglMakeCurrent (rh->egl_display, dst->egl_surface, src->egl_surface, rh->egl_ctx);
+
+  jwxyz_gl_copy_area_read_tex_image (dpy, src->frame.height, src_x, src_y,
                                      width, height, dst_x, dst_y);
+
+  if (rh->gl_fbo_p)
+    bind_drawable_fbo (rh, dst);
+  finish_bind_drawable (dpy, dst);
+
+  jwxyz_gl_copy_area_write_tex_image (dpy, gc, src_x, src_y, width, height,
+                                      dst_x, dst_y);
+
 #else
+  // Kumppa: 0.17 FPS
   jwxyz_gl_copy_area_read_pixels (dpy, src, dst, gc, src_x, src_y,
                                   width, height, dst_x, dst_y);
 #endif
@@ -832,11 +1063,6 @@ Pixmap
 XCreatePixmap (Display *dpy, Drawable d,
                unsigned int width, unsigned int height, unsigned int depth)
 {
-  // See also:
-  // https://web.archive.org/web/20140213220709/http://blog.vlad1.com/2010/07/01/how-to-go-mad-while-trying-to-render-to-a-texture/
-  // https://software.intel.com/en-us/articles/using-opengl-es-to-accelerate-apps-with-legacy-2d-guis
-  // https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_image_native_buffer.txt
-
   Window win = XRootWindow(dpy, 0);
 
   Pixmap p = malloc(sizeof(*p));
@@ -850,19 +1076,9 @@ XCreatePixmap (Display *dpy, Drawable d,
          "XCreatePixmap: bad depth");
   p->pixmap.depth = depth;
 
-  // Native EGL is Android 2.3/API 9. EGL in Java is available from API 1.
-  struct running_hack *rh = win->window.rh;
-  EGLint attribs[5];
-  attribs[0] = EGL_WIDTH;
-  attribs[1] = width;
-  attribs[2] = EGL_HEIGHT;
-  attribs[3] = height;
-  attribs[4] = EGL_NONE;
-  p->egl_surface = eglCreatePbufferSurface(rh->egl_display, rh->egl_config,
-                                           attribs);
-  Assert(p->egl_surface != EGL_NO_SURFACE,
-         "XCreatePixmap: got EGL_NO_SURFACE");
+  create_pixmap (win, p);
 
+  /* For debugging. */
   jwxyz_bind_drawable (dpy, win, p);
   glClearColor (frand(1), frand(1), frand(1), 0);
   glClear (GL_COLOR_BUFFER_BIT);
@@ -877,7 +1093,8 @@ XFreePixmap (Display *d, Pixmap p)
   struct running_hack *rh = XRootWindow(d, 0)->window.rh;
   if (rh->current_drawable == p)
     rh->current_drawable = NULL;
-  eglDestroySurface(rh->egl_display, p->egl_surface);
+
+  free_pixmap (rh, p);
   free (p);
   return 0;
 }
@@ -912,10 +1129,9 @@ jstring_dup (JNIEnv *env, jstring str)
 }
 
 
-char *
-get_string_resource (Display *dpy, char *name, char *class)
+static char *
+get_string_resource_window (Window window, char *name)
 {
-  Window window = RootWindow (dpy, 0);
   JNIEnv *env = window->window.rh->jni_env;
   jobject obj = window->window.rh->jobject;
 
@@ -940,6 +1156,13 @@ get_string_resource (Display *dpy, char *name, char *class)
 }
 
 
+char *
+get_string_resource (Display *dpy, char *name, char *class)
+{
+  return get_string_resource_window (RootWindow (dpy, 0), name);
+}
+
+
 /* Returns the contents of the URL. */
 char *
 textclient_mobile_url_string (Display *dpy, const char *url)
@@ -977,46 +1200,72 @@ textclient_mobile_url_string (Display *dpy, const char *url)
 }
 
 
+float
+jwxyz_scale (Window main_window)
+{
+  return 2;
+}
+
+
+const char *
+jwxyz_default_font_family (int require)
+{
+  /* Font families in XLFDs are totally ignored (for now). */
+  return "sans-serif";
+}
+
+
 void *
-jwxyz_load_native_font (Display *dpy, const char *name,
-                        char **native_name_ret, float *size_ret,
+jwxyz_load_native_font (Window window,
+                        int traits_jwxyz, int mask_jwxyz,
+                        const char *font_name_ptr, size_t font_name_length,
+                        int font_name_type, float size,
+                        char **family_name_ret,
                         int *ascent_ret, int *descent_ret)
 {
-  Window window = RootWindow (dpy, 0);
   JNIEnv *env = window->window.rh->jni_env;
   jobject obj = window->window.rh->jobject;
 
-  jstring jstr = (*env)->NewStringUTF (env, name);
+  jstring jname = NULL;
+  if (font_name_ptr) {
+    char *name_nul = malloc(font_name_length + 1);
+    memcpy(name_nul, font_name_ptr, font_name_length);
+    name_nul[font_name_length] = 0;
+    jname = (*env)->NewStringUTF (env, name_nul);
+    free(name_nul);
+  }
+
   jclass     c = (*env)->GetObjectClass (env, obj);
   jmethodID  m = (*env)->GetMethodID (env, c, "loadFont",
-                           "(Ljava/lang/String;)[Ljava/lang/Object;");
+                           "(IILjava/lang/String;IF)[Ljava/lang/Object;");
   if ((*env)->ExceptionOccurred(env)) abort();
 
   jobjectArray array = (m
-                        ? (*env)->CallObjectMethod (env, obj, m, jstr)
+                        ? (*env)->CallObjectMethod (env, obj, m, (jint)mask_jwxyz,
+                                                    (jint)traits_jwxyz, jname,
+                                                    (jint)font_name_type, (jfloat)size)
                         : NULL);
+
   (*env)->DeleteLocalRef (env, c);
-  (*env)->DeleteLocalRef (env, jstr);
-  jstr = 0;
 
   if (array) {
     jobject font = (*env)->GetObjectArrayElement (env, array, 0);
-    jobject name = (jstring) ((*env)->GetObjectArrayElement (env, array, 1));
-    jobject size = (*env)->GetObjectArrayElement (env, array, 2);
-    jobject asc  = (*env)->GetObjectArrayElement (env, array, 3);
-    jobject desc = (*env)->GetObjectArrayElement (env, array, 4);
+    jobject family_name =
+      (jstring) ((*env)->GetObjectArrayElement (env, array, 1));
+    jobject asc  = (*env)->GetObjectArrayElement (env, array, 2);
+    jobject desc = (*env)->GetObjectArrayElement (env, array, 3);
     if ((*env)->ExceptionOccurred(env)) abort();
 
-    *native_name_ret = jstring_dup (env, name);
+    if (family_name_ret)
+      *family_name_ret = jstring_dup (env, family_name);
 
     jobject paint = (*env)->NewGlobalRef (env, font);
     if ((*env)->ExceptionOccurred(env)) abort();
 
-    c = (*env)->GetObjectClass(env, size);
+    c = (*env)->GetObjectClass(env, asc);
     m = (*env)->GetMethodID (env, c, "floatValue", "()F");
     if ((*env)->ExceptionOccurred(env)) abort();
 
-    *size_ret    =       (*env)->CallFloatMethod (env, size, m);
     *ascent_ret  = (int) (*env)->CallFloatMethod (env, asc,  m);
     *descent_ret = (int) (*env)->CallFloatMethod (env, desc, m);
 
@@ -1176,6 +1425,10 @@ jwxyz_load_random_image (Display *dpy,
                          int *width_ret, int *height_ret,
                          char **name_ret)
 {
+
+  /* This function needs to be implemented for Android */
+  return 0;
+
   Window window = RootWindow (dpy, 0);
   struct running_hack *rh = window->window.rh;
   JNIEnv *env = rh->jni_env;
index 493f456a5c55ef5213a5e1aec1af4fdc68e151a4..14bfc7feaf29fe7970ded19cff60f9931c0c61d0 100644 (file)
 #include "../hacks/fps.h"
 
 #include <android/log.h>
+/* Native EGL is Android 2.3/API 9. EGL in Java is available from API 1. */
 #include <EGL/egl.h>
+#include <GLES/glext.h>
 #include <jni.h>
 
 /* Keep synchronized with check-configs.pl and jwxyz.java. */
 #define API_XLIB 0
 #define API_GL   1
 
+struct jwxyz_Drawable {
+  enum { WINDOW, PIXMAP } type;
+  XRectangle frame;
+  union {
+    EGLSurface egl_surface;
+    GLuint texture; /* If this is 0, it's the default framebuffer. */
+  };
+  union {
+    struct {
+      struct running_hack *rh;
+      int last_mouse_x, last_mouse_y;
+    } window;
+    struct {
+      int depth;
+    } pixmap;
+  };
+};
+
 struct running_hack {
   struct xscreensaver_function_table *xsft;
   jint api;
@@ -33,32 +53,32 @@ struct running_hack {
   JNIEnv *jni_env;
   jobject jobject;
 
+  /* These are set up in Java by the GLSurfaceView. */
+  EGLContext egl_ctx;
+  EGLSurface egl_surface;
   EGLDisplay egl_display;
+  GLint fb_default;
+
   EGLConfig egl_config;
-  EGLContext egl_window_ctx, egl_xlib_ctx;
+
+  PFNGLBINDFRAMEBUFFEROESPROC glBindFramebufferOES;
+  PFNGLFRAMEBUFFERTEXTURE2DOESPROC glFramebufferTexture2DOES;
+
+  struct jwxyz_Drawable frontbuffer;
+  GC copy_gc;
+  Bool gl_fbo_p, frontbuffer_p;
+  GLuint fb_pixmap;
+
   Drawable current_drawable;
   Bool ignore_rotation_p;
 
+  jwzgles_state *gles_state;
+
   unsigned long frame_count;
   Bool initted_p;
   struct event_queue *event_queue;
 };
 
-struct jwxyz_Drawable {
-  enum { WINDOW, PIXMAP } type;
-  XRectangle frame;
-  EGLSurface egl_surface;
-  union {
-    struct {
-      struct running_hack *rh;
-      int last_mouse_x, last_mouse_y;
-    } window;
-    struct {
-      int depth;
-    } pixmap;
-  };
-};
-
 
 extern void prepare_context (struct running_hack *rh);
 
@@ -67,7 +87,7 @@ extern void prepare_context (struct running_hack *rh);
 
 JNIEXPORT void JNICALL
 Java_org_jwz_xscreensaver_jwxyz_nativeInit (JNIEnv *, jobject thiz,
-                                            jstring jhack, jint api,
+                                            jstring jhack,
                                             jobject defaults,
                                             jint w, jint h);
 
index 6c575771e242bf1bea6a12843637e032ad4e9a42..5f2f61cfe83f1abbb1c9c6dd2702a3bf50aa5461 100644 (file)
@@ -85,6 +85,8 @@ struct jwxyz_Drawable {
 
 #endif // JWXYZ_GL
 
+extern NSString *nsstring_from(const char *str, size_t len, int utf8_p);
+
 #ifdef USE_IPHONE
 extern void create_framebuffer (GLuint *gl_framebuffer,
                                 GLuint *gl_renderbuffer);
index 10da646f92a81e3b0b0856480b8a1a2b8c338242..4585e6584ce231202379e5ef32a529bf0ea6d9f9 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2017 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
@@ -20,6 +20,7 @@
 
 #import "jwxyzI.h"
 #import "jwxyz-cocoa.h"
+#import "utf8wc.h"
 
 #include <stdarg.h>
 
 # import <OpenGLES/ES1/gl.h>
 # import <OpenGLES/ES1/glext.h>
 # define NSOpenGLContext EAGLContext
+# define NSFont          UIFont
+
+# define NSFontTraitMask      UIFontDescriptorSymbolicTraits
+// The values for the flags for NSFontTraitMask and
+// UIFontDescriptorSymbolicTraits match up, not that it really matters here.
+# define NSBoldFontMask       UIFontDescriptorTraitBold
+# define NSFixedPitchFontMask UIFontDescriptorTraitMonoSpace
+# define NSItalicFontMask     UIFontDescriptorTraitItalic
 #endif
 
+#import <CoreText/CTLine.h>
+#import <CoreText/CTRun.h>
+
 /* OS X/iOS-specific JWXYZ implementation. */
 
 void
@@ -59,6 +71,7 @@ jwxyz_abort (const char *fmt, ...)
                                   encoding:NSUTF8StringEncoding]
                 userInfo: nil]
     raise];
+# undef abort
   abort();  // not reached
 }
 
@@ -79,6 +92,452 @@ jwxyz_drawable_depth (Drawable d)
 }
 
 
+float
+jwxyz_scale (Window main_window)
+{
+  float scale = 1;
+
+# ifdef USE_IPHONE
+  /* Since iOS screens are physically smaller than desktop screens, scale up
+     the fonts to make them more readable.
+
+     Note that X11 apps on iOS also have the backbuffer sized in points
+     instead of pixels, resulting in an effective X11 screen size of 768x1024
+     or so, even if the display has significantly higher resolution.  That is
+     unrelated to this hack, which is really about DPI.
+   */
+  scale = main_window->window.view.hackedContentScaleFactor;
+  if (scale < 1) // iPad Pro magnifies the backbuffer by 3x, which makes text
+    scale = 1;   // excessively blurry in BSOD.
+# endif
+
+  return scale;
+}
+
+
+/* Font metric terminology, as used by X11:
+
+   "lbearing" is the distance from the logical origin to the leftmost pixel.
+   If a character's ink extends to the left of the origin, it is negative.
+
+   "rbearing" is the distance from the logical origin to the rightmost pixel.
+
+   "descent" is the distance from the logical origin to the bottommost pixel.
+   For characters with descenders, it is positive.  For superscripts, it
+   is negative.
+
+   "ascent" is the distance from the logical origin to the topmost pixel.
+   It is the number of pixels above the baseline.
+
+   "width" is the distance from the logical origin to the position where
+   the logical origin of the next character should be placed.
+
+   If "rbearing" is greater than "width", then this character overlaps the
+   following character.  If smaller, then there is trailing blank space.
+ */
+static void
+utf8_metrics (Display *dpy, NSFont *nsfont, NSString *nsstr, XCharStruct *cs)
+{
+  // Returns the metrics of the multi-character, single-line UTF8 string.
+
+  Drawable d = XRootWindow (dpy, 0);
+
+  CGContextRef cgc = d->cgc;
+  NSDictionary *attr =
+    [NSDictionary dictionaryWithObjectsAndKeys:
+                    nsfont, NSFontAttributeName,
+                  nil];
+  NSAttributedString *astr = [[NSAttributedString alloc]
+                               initWithString:nsstr
+                                   attributes:attr];
+  CTLineRef ctline = CTLineCreateWithAttributedString (
+                       (__bridge CFAttributedStringRef) astr);
+  CGContextSetTextPosition (cgc, 0, 0);
+  CGContextSetShouldAntialias (cgc, True);  // #### Guess?
+
+  memset (cs, 0, sizeof(*cs));
+
+  // "CTRun represents set of consecutive glyphs sharing the same
+  // attributes and direction".
+  //
+  // We also get multiple runs any time font subsitution happens:
+  // E.g., if the current font is Verdana-Bold, a &larr; character
+  // in the NSString will actually be rendered in LucidaGrande-Bold.
+  //
+  int count = 0;
+  for (id runid in (NSArray *)CTLineGetGlyphRuns(ctline)) {
+    CTRunRef run = (CTRunRef) runid;
+    CFRange r = { 0, };
+    CGRect bbox = CTRunGetImageBounds (run, cgc, r);
+    CGFloat ascent, descent, leading;
+    CGFloat advancement =
+      CTRunGetTypographicBounds (run, r, &ascent, &descent, &leading);
+
+# ifndef USE_IPHONE
+    // Only necessary for when LCD smoothing is enabled, which iOS doesn't do.
+    bbox.origin.x    -= 2.0/3.0;
+    bbox.size.width  += 4.0/3.0;
+    bbox.size.height += 1.0/2.0;
+# endif
+
+    // Create the metrics for this run:
+    XCharStruct cc;
+    cc.ascent   = ceil  (bbox.origin.y + bbox.size.height);
+    cc.descent  = ceil (-bbox.origin.y);
+    cc.lbearing = floor (bbox.origin.x);
+    cc.rbearing = ceil  (bbox.origin.x + bbox.size.width);
+    cc.width    = floor (advancement + 0.5);
+
+    // Add those metrics into the cumulative metrics:
+    if (count == 0)
+      *cs = cc;
+    else
+      {
+        cs->ascent   = MAX (cs->ascent,     cc.ascent);
+        cs->descent  = MAX (cs->descent,    cc.descent);
+        cs->lbearing = MIN (cs->lbearing,   cs->width + cc.lbearing);
+        cs->rbearing = MAX (cs->rbearing,   cs->width + cc.rbearing);
+        cs->width    = MAX (cs->width,      cs->width + cc.width);
+      }
+
+    // Why no y? What about vertical text?
+    // XCharStruct doesn't encapsulate that but XGlyphInfo does.
+
+    count++;
+  }
+
+  [astr release];
+  CFRelease (ctline);
+}
+
+
+static NSArray *
+font_family_members (NSString *family_name)
+{
+# ifndef USE_IPHONE
+  return [[NSFontManager sharedFontManager]
+          availableMembersOfFontFamily:family_name];
+# else
+  return [UIFont fontNamesForFamilyName:family_name];
+# endif
+}
+
+
+const char *
+jwxyz_default_font_family (int require)
+{
+  return require & JWXYZ_STYLE_MONOSPACE ? "Courier" : "Verdana";
+}
+
+
+static NSFontTraitMask
+nsfonttraitmask_for (int font_style)
+{
+  NSFontTraitMask result = 0;
+  if (font_style & JWXYZ_STYLE_BOLD)
+    result |= NSBoldFontMask;
+  if (font_style & JWXYZ_STYLE_ITALIC)
+    result |= NSItalicFontMask;
+  if (font_style & JWXYZ_STYLE_MONOSPACE)
+    result |= NSFixedPitchFontMask;
+  return result;
+}
+
+
+static NSFont *
+try_font (NSFontTraitMask traits, NSFontTraitMask mask,
+          NSString *family_name, float size)
+{
+  NSArray *family_members = font_family_members (family_name);
+  if (!family_members.count) {
+    family_members = font_family_members (
+      [NSString stringWithUTF8String:jwxyz_default_font_family (
+        traits & NSFixedPitchFontMask ? JWXYZ_STYLE_MONOSPACE : 0)]);
+  }
+
+# ifndef USE_IPHONE
+  for (unsigned k = 0; k != family_members.count; ++k) {
+
+    NSArray *member = [family_members objectAtIndex:k];
+    NSFontTraitMask font_mask =
+    [(NSNumber *)[member objectAtIndex:3] unsignedIntValue];
+
+    if ((font_mask & mask) == traits) {
+
+      NSString *name = [member objectAtIndex:0];
+      NSFont *f = [NSFont fontWithName:name size:size];
+      if (!f)
+        break;
+
+      /* Don't use this font if it (probably) doesn't include ASCII characters.
+       */
+      NSStringEncoding enc = [f mostCompatibleStringEncoding];
+      if (! (enc == NSUTF8StringEncoding ||
+             enc == NSISOLatin1StringEncoding ||
+             enc == NSNonLossyASCIIStringEncoding ||
+             enc == NSISOLatin2StringEncoding ||
+             enc == NSUnicodeStringEncoding ||
+             enc == NSWindowsCP1250StringEncoding ||
+             enc == NSWindowsCP1252StringEncoding ||
+             enc == NSMacOSRomanStringEncoding)) {
+        // NSLog(@"skipping \"%@\": encoding = %d", name, enc);
+        break;
+      }
+      // NSLog(@"using \"%@\": %d", name, enc);
+
+      return f;
+    }
+  }
+# else // USE_IPHONE
+
+  // This trick needs iOS 3.1, see "Using SDK-Based Development".
+  Class has_font_descriptor = [UIFontDescriptor class];
+
+  for (NSString *fn in family_members) {
+# define MATCH(X) \
+       ([fn rangeOfString:X options:NSCaseInsensitiveSearch].location \
+       != NSNotFound)
+
+    NSFontTraitMask font_mask;
+    if (has_font_descriptor) {
+      // This only works on iOS 7 and later.
+      font_mask = [[UIFontDescriptor
+                    fontDescriptorWithFontAttributes:
+                    @{UIFontDescriptorNameAttribute:fn}]
+                   symbolicTraits];
+    } else {
+      font_mask = 0;
+      if (MATCH(@"Bold"))
+        font_mask |= NSBoldFontMask;
+      if (MATCH(@"Italic") || MATCH(@"Oblique"))
+        font_mask |= NSItalicFontMask;
+      if (MATCH(@"Courier"))
+        font_mask |= NSFixedPitchFontMask;
+    }
+
+    if ((font_mask & mask) == traits) {
+
+      /* Check if it can do ASCII.  No good way to accomplish this!
+         These are fonts present in iPhone Simulator as of June 2012
+         that don't include ASCII.
+       */
+      if (MATCH(@"AppleGothic") ||     // Korean
+          MATCH(@"Dingbats") ||                // Dingbats
+          MATCH(@"Emoji") ||           // Emoticons
+          MATCH(@"Geeza") ||           // Arabic
+          MATCH(@"Hebrew") ||          // Hebrew
+          MATCH(@"HiraKaku") ||                // Japanese
+          MATCH(@"HiraMin") ||         // Japanese
+          MATCH(@"Kailasa") ||         // Tibetan
+          MATCH(@"Ornaments") ||       // Dingbats
+          MATCH(@"STHeiti")            // Chinese
+       )
+         break;
+
+      return [UIFont fontWithName:fn size:size];
+    }
+# undef MATCH
+  }
+# endif
+
+  return NULL;
+}
+
+
+/* Returns a random font in the given size and face.
+ */
+static NSFont *
+random_font (NSFontTraitMask traits, NSFontTraitMask mask, float size)
+{
+
+# ifndef USE_IPHONE
+  // Providing Unbold or Unitalic in the mask for availableFontNamesWithTraits
+  // returns an empty list, at least on a system with default fonts only.
+  NSArray *families = [[NSFontManager sharedFontManager]
+                       availableFontFamilies];
+  if (!families) return 0;
+# else
+  NSArray *families = [UIFont familyNames];
+
+  // There are many dups in the families array -- uniquify it.
+  {
+    NSArray *sorted_families =
+    [families sortedArrayUsingSelector:@selector(compare:)];
+    NSMutableArray *new_families =
+    [NSMutableArray arrayWithCapacity:sorted_families.count];
+
+    NSString *prev_family = @"";
+    for (NSString *family in sorted_families) {
+      if ([family compare:prev_family])
+        [new_families addObject:family];
+      prev_family = family;
+    }
+
+    families = new_families;
+  }
+# endif // USE_IPHONE
+
+  long n = [families count];
+  if (n <= 0) return 0;
+
+  int j;
+  for (j = 0; j < n; j++) {
+    int i = random() % n;
+    NSString *family_name = [families objectAtIndex:i];
+
+    NSFont *result = try_font (traits, mask, family_name, size);
+    if (result)
+      return result;
+  }
+
+  // None of the fonts support ASCII?
+  return 0;
+}
+
+void *
+jwxyz_load_native_font (Window main_window, int traits_jwxyz, int mask_jwxyz,
+                        const char *font_name_ptr, size_t font_name_length,
+                        int font_name_type, float size,
+                        char **family_name_ret,
+                        int *ascent_ret, int *descent_ret)
+{
+  NSFont *nsfont = NULL;
+
+  NSFontTraitMask
+    traits = nsfonttraitmask_for (traits_jwxyz),
+    mask = nsfonttraitmask_for (mask_jwxyz);
+
+  NSString *font_name = font_name_type != JWXYZ_FONT_RANDOM ?
+    [[NSString alloc] initWithBytes:font_name_ptr
+                             length:font_name_length
+                           encoding:NSUTF8StringEncoding] :
+    nil;
+
+  size *= jwxyz_scale (main_window);
+
+  if (font_name_type == JWXYZ_FONT_RANDOM) {
+
+    nsfont = random_font (traits, mask, size);
+    [font_name release];
+
+  } else if (font_name_type == JWXYZ_FONT_FACE) {
+
+    nsfont = [NSFont fontWithName:font_name size:size];
+
+  } else if (font_name_type == JWXYZ_FONT_FAMILY) {
+  
+    Assert (size > 0, "zero font size");
+
+    if (!nsfont)
+      nsfont   = try_font (traits, mask, font_name, size);
+
+    // if that didn't work, turn off attibutes until it does
+    // (e.g., there is no "Monaco-Bold".)
+    //
+    if (!nsfont && (mask & NSItalicFontMask)) {
+      traits &= ~NSItalicFontMask;
+      mask &= ~NSItalicFontMask;
+      nsfont = try_font (traits, mask, font_name, size);
+    }
+    if (!nsfont && (mask & NSBoldFontMask)) {
+      traits &= ~NSBoldFontMask;
+      mask &= ~NSBoldFontMask;
+      nsfont = try_font (traits, mask, font_name, size);
+    }
+    if (!nsfont && (mask & NSFixedPitchFontMask)) {
+      traits &= ~NSFixedPitchFontMask;
+      mask &= ~NSFixedPitchFontMask;
+      nsfont = try_font (traits, mask, font_name, size);
+    }
+  }
+
+  if (nsfont)
+  {
+    if (family_name_ret)
+      *family_name_ret = strdup (nsfont.familyName.UTF8String);
+
+    CFRetain (nsfont);   // needed for garbage collection?
+
+    *ascent_ret  =  ceil ([nsfont ascender]);
+    *descent_ret = -floor ([nsfont descender]);
+
+    Assert([nsfont fontName], "broken NSFont in fid");
+  }
+
+  return nsfont;
+}
+
+
+void
+jwxyz_release_native_font (Display *dpy, void *native_font)
+{
+  // #### 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];
+  //  CFRelease (fid->nsfont);
+}
+
+
+// Given a UTF8 string, return an NSString.  Bogus UTF8 characters are ignored.
+// We have to do this because stringWithCString returns NULL if there are
+// any invalid characters at all.
+//
+static NSString *
+sanitize_utf8 (const char *in, size_t in_len, Bool *latin1_pP)
+{
+  size_t out_len = in_len * 4;   // length of string might increase
+  char *s2 = (char *) malloc (out_len);
+  char *out = s2;
+  const char *in_end  = in  + in_len;
+  const char *out_end = out + out_len;
+  Bool latin1_p = True;
+
+  while (in < in_end)
+    {
+      unsigned long uc;
+      long L1 = utf8_decode ((const unsigned char *) in, in_end - in, &uc);
+      long L2 = utf8_encode (uc, out, out_end - out);
+      in  += L1;
+      out += L2;
+      if (uc > 255) latin1_p = False;
+    }
+  *out = 0;
+  NSString *nsstr =
+    [NSString stringWithCString:s2 encoding:NSUTF8StringEncoding];
+  free (s2);
+  if (latin1_pP) *latin1_pP = latin1_p;
+  return (nsstr ? nsstr : @"");
+}
+
+
+NSString *
+nsstring_from(const char *str, size_t len, int utf8_p)
+{
+  Bool latin1_p;
+  NSString *nsstr = utf8_p ?
+    sanitize_utf8 (str, len, &latin1_p) :
+    [[[NSString alloc] initWithBytes:str
+                              length:len
+                            encoding:NSISOLatin1StringEncoding]
+     autorelease];
+  return nsstr;
+}
+
+void
+jwxyz_render_text (Display *dpy, void *native_font,
+                   const char *str, size_t len, int utf8_p,
+                   XCharStruct *cs_ret, char **pixmap_ret)
+{
+  utf8_metrics (dpy, (NSFont *)native_font, nsstring_from (str, len, utf8_p),
+                cs_ret);
+
+  Assert (!pixmap_ret, "TODO");
+}
+
+
 void
 jwxyz_get_pos (Window w, XPoint *xvpos, XPoint *xp)
 {
@@ -377,8 +836,14 @@ jwxyz_copy_area (Display *dpy, Drawable src, Drawable dst, GC gc,
      OS X. (Early 2009 Mac mini, OS X 10.10)
    */
 # ifdef USE_IPHONE
-  jwxyz_gl_copy_area_copy_tex_image (dpy, src, dst, gc, src_x, src_y,
-                                     width, height, dst_x, dst_y);
+
+  /* TODO: This might not still work. */
+  jwxyz_bind_drawable (dpy, dpy->main_window, src);
+  jwxyz_gl_copy_area_read_tex_image (dpy, jwxyz_frame (src)->height,
+                                     src_x, src_y, width, height, dst_x, dst_y);
+  jwxyz_bind_drawable (dpy, dpy->main_window, dst);
+  jwxyz_gl_copy_area_write_tex_image (dpy, gc, src_x, src_y,
+                                      width, height, dst_x, dst_y);
 # else // !USE_IPHONE
   jwxyz_gl_copy_area_read_pixels (dpy, src, dst, gc,
                                   src_x, src_y, width, height, dst_x, dst_y);
@@ -423,7 +888,7 @@ jwxyz_assert_drawable (Window main_window, Drawable d)
   }
   @catch (NSException *exception) {
     perror([[exception reason] UTF8String]);
-    abort();
+    jwxyz_abort();
   }
 #endif // !USE_IPHONE && !__OPTIMIZE__
 }
index a40909948eda0067f5e912e572c02bec929eab0f..20deb4400c37ef0675149e372be10b5291417890 100644 (file)
    and iOS is in jwxyz.m.
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #ifdef HAVE_JWXYZ /* whole file */
 
+#include <stdarg.h>
+#include <stdio.h>
+
 #include "jwxyzI.h"
+#include "utf8wc.h"
+#include "xft.h"
 
 /* There's only one Window for a given jwxyz_Display. */
 #define assert_window(dpy, w) \
   Assert (w == RootWindow (dpy, 0), "not a window")
 
 
+struct jwxyz_Font {
+  Display *dpy;
+  void *native_font;
+  int refcount; // for deciding when to release the native font
+  int ascent, descent;
+  char *xa_font;
+
+  // In X11, "Font" is just an ID, and "XFontStruct" contains the metrics.
+  // But we need the metrics on both of them, so they go here.
+  XFontStruct metrics;
+};
+
+struct jwxyz_XFontSet {
+  XFontStruct *font;
+};
+
+
 void
 Log (const char *fmt, ...)
 {
@@ -54,20 +78,23 @@ XDisplayHeight (Display *dpy, int screen)
 
 
 /* XLFDs use dots per inch, but Xlib uses millimeters. Go figure. */
-static const unsigned dpi = 75;
+static int
+size_mm (Display *dpy, unsigned size)
+{
+  /* ((mm / inch) / (points / inch)) * dots / (dots / points) */
+  return (25.4 / 72) * size / jwxyz_scale (XRootWindow (dpy,0)) + 0.5;
+}
 
 int
 XDisplayWidthMM (Display *dpy, int screen)
 {
-  const unsigned denom = dpi * 10 / 2;
-  return (254 * XDisplayWidth (dpy, screen) + denom) / (2 * denom);
+  return size_mm (dpy, XDisplayWidth (dpy, screen));
 }
 
 int
 XDisplayHeightMM (Display *dpy, int screen)
 {
-  const unsigned denom = dpi * 10 / 2;
-  return (254 * XDisplayHeight (dpy, screen) + denom) / (2 * denom);
+  return size_mm (dpy, XDisplayHeight (dpy, screen));
 }
 
 
@@ -733,11 +760,26 @@ XDestroyImage (XImage *ximage)
 }
 
 
+XImage *
+XGetImage (Display *dpy, Drawable d, int x, int y,
+           unsigned int width, unsigned int height,
+           unsigned long plane_mask, int format)
+{
+  unsigned depth = jwxyz_drawable_depth (d);
+  XImage *image = XCreateImage (dpy, 0, depth, format, 0, 0, width, height,
+                                0, 0);
+  image->data = (char *) malloc (height * image->bytes_per_line);
+
+  return XGetSubImage (dpy, d, x, y, width, height, plane_mask, format,
+                       image, 0, 0);
+}
+
+
 Pixmap
 XCreatePixmapFromBitmapData (Display *dpy, Drawable drawable,
                              const char *data,
                              unsigned int w, unsigned int h,
-                             unsigned long fg, unsigned int bg,
+                             unsigned long fg, unsigned long bg,
                              unsigned int depth)
 {
   Pixmap p = XCreatePixmap (dpy, drawable, w, h, depth);
@@ -766,6 +808,637 @@ XGetAtomName (Display *dpy, Atom atom)
 }
 
 
+// This is XQueryFont, but for the XFontStruct embedded in 'Font'
+//
+static void
+query_font (Font fid)
+{
+  Assert (fid && fid->native_font, "no native font in fid");
+
+  int first = 32;
+  int last = 255;
+
+  Display *dpy = fid->dpy;
+  void *native_font = fid->native_font;
+
+  XFontStruct *f = &fid->metrics;
+  XCharStruct *min = &f->min_bounds;
+  XCharStruct *max = &f->max_bounds;
+
+  f->fid               = fid;
+  f->min_char_or_byte2 = first;
+  f->max_char_or_byte2 = last;
+  f->default_char      = 'M';
+  f->ascent            = fid->ascent;
+  f->descent           = fid->descent;
+
+  min->width    = 32767;  // set to smaller values in the loop
+  min->ascent   = 32767;
+  min->descent  = 32767;
+  min->lbearing = 32767;
+  min->rbearing = 32767;
+
+  f->per_char = (XCharStruct *) calloc (last-first+2, sizeof (XCharStruct));
+
+  for (int i = first; i <= last; i++) {
+    XCharStruct *cs = &f->per_char[i-first];
+    char s = (char) i;
+    jwxyz_render_text (dpy, native_font, &s, 1, False, cs, 0);
+
+    max->width    = MAX (max->width,    cs->width);
+    max->ascent   = MAX (max->ascent,   cs->ascent);
+    max->descent  = MAX (max->descent,  cs->descent);
+    max->lbearing = MAX (max->lbearing, cs->lbearing);
+    max->rbearing = MAX (max->rbearing, cs->rbearing);
+
+    min->width    = MIN (min->width,    cs->width);
+    min->ascent   = MIN (min->ascent,   cs->ascent);
+    min->descent  = MIN (min->descent,  cs->descent);
+    min->lbearing = MIN (min->lbearing, cs->lbearing);
+    min->rbearing = MIN (min->rbearing, cs->rbearing);
+/*
+    Log (" %3d %c: w=%3d lb=%3d rb=%3d as=%3d ds=%3d "
+         " bb=%5.1f x %5.1f @ %5.1f %5.1f  adv=%5.1f %5.1f\n"
+         i, i, cs->width, cs->lbearing, cs->rbearing,
+         cs->ascent, cs->descent,
+         bbox.size.width, bbox.size.height,
+         bbox.origin.x, bbox.origin.y,
+         advancement.width, advancement.height);
+ */
+  }
+}
+
+
+// Since 'Font' includes the metrics, this just makes a copy of that.
+//
+XFontStruct *
+XQueryFont (Display *dpy, Font fid)
+{
+  // copy XFontStruct
+  XFontStruct *f = (XFontStruct *) calloc (1, sizeof(*f));
+  *f = fid->metrics;
+  f->fid = fid;
+
+  // build XFontProps
+  f->n_properties = 1;
+  f->properties = malloc (sizeof(*f->properties) * f->n_properties);
+  f->properties[0].name = XA_FONT;
+  Assert (sizeof (f->properties[0].card32) >= sizeof (char *),
+          "atoms probably needs a real implementation");
+  // If XInternAtom is ever implemented, use it here.
+  f->properties[0].card32 = (unsigned long)fid->xa_font;
+
+  // copy XCharStruct array
+  int size = (f->max_char_or_byte2 - f->min_char_or_byte2) + 1;
+  f->per_char = (XCharStruct *) calloc (size + 2, sizeof (XCharStruct));
+
+  memcpy (f->per_char, fid->metrics.per_char,
+          size * sizeof (XCharStruct));
+
+  return f;
+}
+
+
+static Font
+copy_font (Font fid)
+{
+  fid->refcount++;
+  return fid;
+}
+
+
+/* On Cocoa and iOS, fonts may be specified as "Georgia Bold 24" instead
+   of XLFD strings; also they can be comma-separated strings with multiple
+   font names.  First one that exists wins.
+ */
+static void
+try_native_font (Display *dpy, const char *name, Font fid)
+{
+  if (!name) return;
+  const char *spc = strrchr (name, ' ');
+  if (!spc) return;
+
+  char *token = strdup (name);
+  char *otoken = token;
+  char *name2;
+  char *lasts;
+
+  while ((name2 = strtok_r (token, ",", &lasts))) {
+    token = 0;
+
+    while (*name2 == ' ' || *name2 == '\t' || *name2 == '\n')
+      name2++;
+
+    spc = strrchr (name2, ' ');
+    if (!spc) continue;
+
+    int dsize = 0;
+    if (1 != sscanf (spc, " %d ", &dsize))
+      continue;
+    float size = dsize;
+
+    if (size < 4) continue;
+
+    name2[strlen(name2) - strlen(spc)] = 0;
+
+    fid->native_font = jwxyz_load_native_font(XRootWindow(dpy,0), 0, 0, name2,
+                                              strlen(name2) - strlen(spc),
+                                              JWXYZ_FONT_FACE, size, NULL,
+                                              &fid->ascent, &fid->descent);
+    if (fid->native_font) {
+      fid->xa_font = strdup (name); // Maybe this should be an XLFD?
+      break;
+    } else {
+      Log("No native font: \"%s\" %.0f", name2, size);
+    }
+  }
+
+  free (otoken);
+}
+
+
+static const char *
+xlfd_field_end (const char *s)
+{
+  const char *s2 = strchr(s, '-');
+  if (!s2)
+    s2 = s + strlen(s);
+  return s2;
+}
+
+
+static size_t
+xlfd_next (const char **s, const char **s2)
+{
+  if (!**s2) {
+    *s = *s2;
+  } else {
+    Assert (**s2 == '-', "xlfd parse error");
+    *s = *s2 + 1;
+    *s2 = xlfd_field_end (*s);
+  }
+
+  return *s2 - *s;
+}
+
+
+static void
+try_xlfd_font (Display *dpy, const char *name, Font fid)
+{
+  const char *family_name = NULL; /* Not NULL-terminated. */
+  size_t family_name_size = 0;
+  int require = 0,
+   // Default mask is for the built-in X11 font aliases.
+   mask = JWXYZ_STYLE_MONOSPACE | JWXYZ_STYLE_BOLD | JWXYZ_STYLE_ITALIC;
+  Bool rand  = False;
+  float size = 12; /* In points (1/72 in.) */
+
+  const char *s = (name ? name : "");
+
+  size_t L = strlen (s);
+# define CMP(STR) (L == strlen(STR) && !strncasecmp (s, (STR), L))
+# define UNSPEC   (L == 0 || (L == 1 && *s == '*'))
+  if      (CMP ("6x10"))     size = 8,  require |= JWXYZ_STYLE_MONOSPACE;
+  else if (CMP ("6x10bold")) size = 8,  require |= JWXYZ_STYLE_MONOSPACE | JWXYZ_STYLE_BOLD;
+  else if (CMP ("fixed"))    size = 12, require |= JWXYZ_STYLE_MONOSPACE;
+  else if (CMP ("9x15"))     size = 12, require |= JWXYZ_STYLE_MONOSPACE;
+  else if (CMP ("9x15bold")) size = 12, require |= JWXYZ_STYLE_MONOSPACE | JWXYZ_STYLE_BOLD;
+  else if (CMP ("vga"))      size = 12, require |= JWXYZ_STYLE_MONOSPACE;
+  else if (CMP ("console"))  size = 12, require |= JWXYZ_STYLE_MONOSPACE;
+  else if (CMP ("gallant"))  size = 12, require |= JWXYZ_STYLE_MONOSPACE;
+  else {
+
+    int forbid = 0;
+
+    // Incorrect fields are ignored.
+
+    if (*s == '-')
+      ++s;
+    const char *s2 = xlfd_field_end(s);
+
+    // Foundry (ignore)
+
+    L = xlfd_next (&s, &s2); // Family name
+    // This used to substitute Georgia for Times. Now it doesn't.
+    if (CMP ("random")) {
+      rand = True;
+    } else if (CMP ("fixed")) {
+      require |= JWXYZ_STYLE_MONOSPACE;
+      family_name = "Courier";
+      family_name_size = strlen(family_name);
+    } else if (!UNSPEC) {
+      family_name = s;
+      family_name_size = L;
+    }
+
+    L = xlfd_next (&s, &s2); // Weight name
+    if (CMP ("bold") || CMP ("demibold"))
+      require |= JWXYZ_STYLE_BOLD;
+    else if (CMP ("medium") || CMP ("regular"))
+      forbid |= JWXYZ_STYLE_BOLD;
+
+    L = xlfd_next (&s, &s2); // Slant
+    if (CMP ("i") || CMP ("o"))
+      require |= JWXYZ_STYLE_ITALIC;
+    else if (CMP ("r"))
+      forbid |= JWXYZ_STYLE_ITALIC;
+
+    xlfd_next (&s, &s2); // Set width name (ignore)
+    xlfd_next (&s, &s2); // Add style name (ignore)
+
+    L = xlfd_next (&s, &s2); // Pixel size
+    char *s3;
+    uintmax_t pxsize = strtoumax(s, &s3, 10);
+    if (UNSPEC || s2 != s3)
+      pxsize = UINTMAX_MAX; // i.e. it's invalid.
+
+    L = xlfd_next (&s, &s2); // Point size
+    uintmax_t ptsize = strtoumax(s, &s3, 10);
+    if (UNSPEC || s2 != s3)
+      ptsize = UINTMAX_MAX;
+
+    xlfd_next (&s, &s2); // Resolution X (ignore)
+    xlfd_next (&s, &s2); // Resolution Y (ignore)
+
+    L = xlfd_next (&s, &s2); // Spacing
+    if (CMP ("p"))
+      forbid |= JWXYZ_STYLE_MONOSPACE;
+    else if (CMP ("m") || CMP ("c"))
+      require |= JWXYZ_STYLE_MONOSPACE;
+
+    xlfd_next (&s, &s2); // Average width (ignore)
+
+    // -*-courier-bold-r-*-*-14-*-*-*-*-*-*-*         14 px
+    // -*-courier-bold-r-*-*-*-140-*-*-m-*-*-*        14 pt
+    // -*-courier-bold-r-*-*-140-*                    14 pt, via wildcard
+    // -*-courier-bold-r-*-140-*                      14 pt, not handled
+    // -*-courier-bold-r-*-*-14-180-*-*-*-*-*-*       error
+
+    L = xlfd_next (&s, &s2); // Charset registry
+    if (ptsize != UINTMAX_MAX) {
+      // It was in the ptsize field, so that's definitely what it is.
+      size = ptsize / 10.0;
+    } else if (pxsize != UINTMAX_MAX) {
+      size = pxsize;
+      // If it's a fully qualified XLFD, then this really is the pxsize.
+      // Otherwise, this is probably point size with a multi-field wildcard.
+      if (L == 0)
+        size /= 10.0;
+    }
+
+    mask = require | forbid;
+  }
+# undef CMP
+# undef UNSPEC
+
+  if (!family_name && !rand) {
+    family_name = jwxyz_default_font_family (require);
+    family_name_size = strlen (family_name);
+  }
+
+  if (size < 6 || size > 1000)
+    size = 12;
+
+  char *family_name_ptr = NULL;
+  fid->native_font = jwxyz_load_native_font (XRootWindow(dpy,0),
+                                             require, mask,
+                                             family_name, family_name_size,
+                                             rand ? JWXYZ_FONT_RANDOM : JWXYZ_FONT_FAMILY,
+                                             size, &family_name_ptr,
+                                             &fid->ascent, &fid->descent);
+
+  if (fid->native_font) {
+    unsigned dpi_d = XDisplayHeightMM (dpy,0) * 10 / 2;
+    unsigned dpi = (254 * XDisplayHeight (dpy,0) + dpi_d) / (2 * dpi_d);
+    asprintf(&fid->xa_font, "-*-%s-%s-%c-*-*-%u-%u-%u-%u-%c-0-iso10646-1",
+             family_name_ptr,
+             (require & JWXYZ_STYLE_BOLD) ? "bold" : "medium",
+             (require & JWXYZ_STYLE_ITALIC) ? 'o' : 'r',
+             (unsigned)(dpi * size / 72.27 + 0.5),
+             (unsigned)(size * 10 + 0.5), dpi, dpi,
+             (require & JWXYZ_STYLE_MONOSPACE) ? 'm' : 'p');
+  }
+
+  free (family_name_ptr);
+}
+
+
+Font
+XLoadFont (Display *dpy, const char *name)
+{
+  Font fid = (Font) calloc (1, sizeof(*fid));
+
+  fid->refcount = 1;
+  fid->dpy = dpy;
+  try_native_font (dpy, name, fid);
+
+  if (!fid->native_font && name &&
+      strchr (name, ' ') &&
+      !strchr (name, '*')) {
+    // If name contains a space but no stars, it is a native font spec --
+    // return NULL so that we know it really didn't exist.  Else, it is an
+    //  XLFD font, so keep trying.
+    free (fid);
+    return 0;
+  }
+
+  if (! fid->native_font)
+    try_xlfd_font (dpy, name, fid);
+
+  //Log("parsed \"%s\" to %s %.1f", name, fid->ps_name, fid->size);
+
+  /*
+  fid->native_font = jwxyz_load_native_font (dpy, name,
+                                             &fid->ascent, &fid->descent);
+  if (!fid->native_font) {
+    free (fid);
+    return 0;
+  }
+   */
+  query_font (fid);
+
+  return fid;
+}
+
+
+XFontStruct *
+XLoadQueryFont (Display *dpy, const char *name)
+{
+  Font fid = XLoadFont (dpy, name);
+  if (!fid) return 0;
+  return XQueryFont (dpy, fid);
+}
+
+int
+XUnloadFont (Display *dpy, Font fid)
+{
+  if (--fid->refcount < 0) abort();
+  if (fid->refcount > 0) return 0;
+
+  if (fid->native_font)
+    jwxyz_release_native_font (fid->dpy, fid->native_font);
+
+  if (fid->metrics.per_char)
+    free (fid->metrics.per_char);
+
+  free (fid);
+  return 0;
+}
+
+int
+XFreeFontInfo (char **names, XFontStruct *info, int n)
+{
+  int i;
+  if (names) {
+    for (i = 0; i < n; i++)
+      if (names[i]) free (names[i]);
+    free (names);
+  }
+  if (info) {
+    for (i = 0; i < n; i++)
+      if (info[i].per_char) {
+        free (info[i].per_char);
+        free (info[i].properties);
+      }
+    free (info);
+  }
+  return 0;
+}
+
+int
+XFreeFont (Display *dpy, XFontStruct *f)
+{
+  Font fid = f->fid;
+  XFreeFontInfo (0, f, 1);
+  XUnloadFont (dpy, fid);
+  return 0;
+}
+
+
+int
+XSetFont (Display *dpy, GC gc, Font fid)
+{
+  XGCValues *gcv = jwxyz_gc_gcv(gc);
+  Font font2 = copy_font (fid);
+  if (gcv->font)
+    XUnloadFont (dpy, gcv->font);
+  gcv->font = font2;
+  return 0;
+}
+
+
+XFontSet
+XCreateFontSet (Display *dpy, char *name,
+                char ***missing_charset_list_return,
+                int *missing_charset_count_return,
+                char **def_string_return)
+{
+  char *name2 = strdup (name);
+  char *s = strchr (name, ',');
+  if (s) *s = 0;
+  XFontSet set = 0;
+  XFontStruct *f = XLoadQueryFont (dpy, name2);
+  if (f)
+  {
+    set = (XFontSet) calloc (1, sizeof(*set));
+    set->font = f;
+  }
+  free (name2);
+  if (missing_charset_list_return)  *missing_charset_list_return = 0;
+  if (missing_charset_count_return) *missing_charset_count_return = 0;
+  if (def_string_return) *def_string_return = 0;
+  return set;
+}
+
+
+void
+XFreeFontSet (Display *dpy, XFontSet set)
+{
+  XFreeFont (dpy, set->font);
+  free (set);
+}
+
+
+void
+XFreeStringList (char **list)
+{
+  int i;
+  if (!list) return;
+  for (i = 0; list[i]; i++)
+    XFree (list[i]);
+  XFree (list);
+}
+
+
+int
+XTextExtents (XFontStruct *f, const char *s, int length,
+              int *dir_ret, int *ascent_ret, int *descent_ret,
+              XCharStruct *cs)
+{
+  // Unfortunately, adding XCharStructs together to get the extents for a
+  // string doesn't work: Cocoa uses non-integral character advancements, but
+  // XCharStruct.width is an integer. Plus that doesn't take into account
+  // kerning pairs, alternate glyphs, and fun stuff like the word "Zapfino" in
+  // Zapfino.
+
+  Font ff = f->fid;
+  Display *dpy = ff->dpy;
+  jwxyz_render_text (dpy, ff->native_font, s, length, False, cs, 0);
+  *dir_ret = 0;
+  *ascent_ret  = f->ascent;
+  *descent_ret = f->descent;
+  return 0;
+}
+
+int
+XTextWidth (XFontStruct *f, const char *s, int length)
+{
+  int ascent, descent, dir;
+  XCharStruct cs;
+  XTextExtents (f, s, length, &dir, &ascent, &descent, &cs);
+  return cs.width;
+}
+
+
+int
+XTextExtents16 (XFontStruct *f, const XChar2b *s, int length,
+                int *dir_ret, int *ascent_ret, int *descent_ret,
+                XCharStruct *cs)
+{
+  // Bool latin1_p = True;
+  int i, utf8_len = 0;
+  char *utf8 = XChar2b_to_utf8 (s, &utf8_len);   // already sanitized
+
+  for (i = 0; i < length; i++)
+    if (s[i].byte1 > 0) {
+      // latin1_p = False;
+      break;
+    }
+
+  {
+    Font ff = f->fid;
+    Display *dpy = ff->dpy;
+    jwxyz_render_text (dpy, ff->native_font, utf8, strlen(utf8),
+                       True, cs, 0);
+  }
+
+  *dir_ret = 0;
+  *ascent_ret  = f->ascent;
+  *descent_ret = f->descent;
+  free (utf8);
+  return 0;
+}
+
+
+/* "Returns the distance in pixels in the primary draw direction from
+ the drawing origin to the origin of the next character to be drawn."
+
+ "overall_ink_return is set to the bbox of the string's character ink."
+
+ "The overall_ink_return for a nondescending, horizontally drawn Latin
+ character is conventionally entirely above the baseline; that is,
+ overall_ink_return.height <= -overall_ink_return.y."
+
+ [So this means that y is the top of the ink, and height grows down:
+ For above-the-baseline characters, y is negative.]
+
+ "The overall_ink_return for a nonkerned character is entirely at, and to
+ the right of, the origin; that is, overall_ink_return.x >= 0."
+
+ [So this means that x is the left of the ink, and width grows right.
+ For left-of-the-origin characters, x is negative.]
+
+ "A character consisting of a single pixel at the origin would set
+ overall_ink_return fields y = 0, x = 0, width = 1, and height = 1."
+ */
+int
+Xutf8TextExtents (XFontSet set, const char *str, int len,
+                  XRectangle *overall_ink_return,
+                  XRectangle *overall_logical_return)
+{
+  XCharStruct cs;
+  Font f = set->font->fid;
+
+  jwxyz_render_text (f->dpy, f->native_font, str, len, True, &cs, NULL);
+
+  /* "The overall_logical_return is the bounding box that provides minimum
+   spacing to other graphical features for the string. Other graphical
+   features, for example, a border surrounding the text, should not
+   intersect this rectangle."
+
+   So I think that means they're the same?  Or maybe "ink" is the bounding
+   box, and "logical" is the advancement?  But then why is the return value
+   the advancement?
+   */
+  if (overall_ink_return)
+    XCharStruct_to_XmbRectangle (cs, *overall_ink_return);
+  if (overall_logical_return)
+    XCharStruct_to_XmbRectangle (cs, *overall_logical_return);
+
+  return cs.width;
+}
+
+
+int
+XDrawString (Display *dpy, Drawable d, GC gc, int x, int y,
+             const char  *str, int len)
+{
+  return jwxyz_draw_string (dpy, d, gc, x, y, str, len, False);
+}
+
+
+int
+XDrawString16 (Display *dpy, Drawable d, GC gc, int x, int y,
+               const XChar2b *str, int len)
+{
+  XChar2b *b2 = malloc ((len + 1) * sizeof(*b2));
+  char *s2;
+  int ret;
+  memcpy (b2, str, len * sizeof(*b2));
+  b2[len].byte1 = b2[len].byte2 = 0;
+  s2 = XChar2b_to_utf8 (b2, 0);
+  free (b2);
+  ret = jwxyz_draw_string (dpy, d, gc, x, y, s2, strlen(s2), True);
+  free (s2);
+  return ret;
+}
+
+
+void
+Xutf8DrawString (Display *dpy, Drawable d, XFontSet set, GC gc,
+                 int x, int y, const char *str, int len)
+{
+  jwxyz_draw_string (dpy, d, gc, x, y, str, len, True);
+}
+
+
+int
+XDrawImageString (Display *dpy, Drawable d, GC gc, int x, int y,
+                  const char *str, int len)
+{
+  int ascent, descent, dir;
+  XCharStruct cs;
+  XTextExtents (&jwxyz_gc_gcv (gc)->font->metrics, str, len,
+                &dir, &ascent, &descent, &cs);
+  jwxyz_fill_rect (dpy, d, gc,
+                   x + MIN (0, cs.lbearing),
+                   y - MAX (0, ascent),
+                   MAX (MAX (0, cs.rbearing) -
+                        MIN (0, cs.lbearing),
+                        cs.width),
+                   MAX (0, ascent) + MAX (0, descent),
+                   jwxyz_gc_gcv(gc)->background);
+  return XDrawString (dpy, d, gc, x, y, str, len);
+}
+
+
+void *
+jwxyz_native_font (Font f)
+{
+  return f->native_font;
+}
+
+
 int
 XSetForeground (Display *dpy, GC gc, unsigned long fg)
 {
@@ -953,22 +1626,24 @@ visual_class (Screen *s, Visual *v)
   return TrueColor;
 }
 
+void
+visual_rgb_masks (Screen *s, Visual *v, unsigned long *red_mask,
+                  unsigned long *green_mask, unsigned long *blue_mask)
+{
+  *red_mask = v->red_mask;
+  *green_mask = v->green_mask;
+  *blue_mask = v->blue_mask;
+}
+
 int
-get_bits_per_pixel (Display *dpy, int depth)
+visual_pixmap_depth (Screen *s, Visual *v)
 {
-  Assert (depth == 32 || depth == 1, "unexpected depth");
-  return depth;
+  return 32;
 }
 
 int
 screen_number (Screen *screen)
 {
-  Display *dpy = DisplayOfScreen (screen);
-  int i;
-  for (i = 0; i < ScreenCount (dpy); i++)
-    if (ScreenOfDisplay (dpy, i) == screen)
-      return i;
-  abort ();
   return 0;
 }
 
index 2f15b1aa0199e050c6bce59b17d177561cc3ed5d..0766a4521f884f73dc107b3eacf9e87ed4f8036f 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2017 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
 #include "yarandom.h"
 #include "utf8wc.h"
 #include "xft.h"
+#include "pow2.h"
 
 #if defined HAVE_COCOA
 # include <CoreGraphics/CGGeometry.h>
@@ -185,7 +186,6 @@ union color_bytes
 struct jwxyz_Display {
   Window main_window;
   Screen *screen;
-  int screen_count;
   struct jwxyz_sources_data *timers_data;
 
   Bool gl_texture_npot_p;
@@ -204,7 +204,6 @@ struct jwxyz_Screen {
   GLenum pixel_format, pixel_type;
   unsigned long black, white;
   Visual *visual;
-  int screen_number;
 };
 
 struct jwxyz_GC {
@@ -213,24 +212,14 @@ struct jwxyz_GC {
   // CGImageRef clip_mask;  // CGImage copy of the Pixmap in gcv.clip_mask
 };
 
-struct jwxyz_Font {
-  Display *dpy;
-  char *ps_name;
-  void *native_font;
-  int refcount; // for deciding when to release the native font
-  float size;   // points
-  int ascent, descent;
-  char *xa_font;
-
-  // In X11, "Font" is just an ID, and "XFontStruct" contains the metrics.
-  // But we need the metrics on both of them, so they go here.
-  XFontStruct metrics;
-};
-
 struct jwxyz_XFontSet {
   XFontStruct *font;
 };
 
+struct jwxyz_linked_point {
+    short x, y;
+    linked_point *next;
+};
 
 /* XGetImage in CoreGraphics JWXYZ has to deal with funky pixel formats
    necessitating fast & flexible pixel conversion. OpenGL does image format
@@ -307,6 +296,9 @@ void
 jwxyz_set_matrices (Display *dpy, unsigned width, unsigned height,
                     Bool window_p)
 {
+  Assert (width, "no width");
+  Assert (height, "no height");
+
   /* TODO: Check registration pattern from Interference with rectangles instead of points. */
 
   // The projection matrix is always set as follows. The modelview matrix is
@@ -369,25 +361,6 @@ static GLboolean gl_check_ext(const struct gl_caps *caps,
 
 // NSOpenGLContext *jwxyz_debug_context;
 
-/* We keep a list of all of the Displays that have been created and not
-   yet freed so that they can have sensible display numbers.  If three
-   displays are created (0, 1, 2) and then #1 is closed, then the fourth
-   display will be given the now-unused display number 1. (Everything in
-   here assumes a 1:1 Display/Screen mapping.)
-
-   The size of this array is the most number of live displays at one time.
-   So if it's 20, then we'll blow up if the system has 19 monitors and also
-   has System Preferences open (the small preview window).
-
-   Note that xlockmore-style savers tend to allocate big structures, so
-   setting this to 1000 will waste a few megabytes.  Also some of them assume
-   that the number of screens never changes, so dynamically expanding this
-   array won't work.
- */
-# ifndef USE_IPHONE
-static Display *jwxyz_live_displays[20] = { 0, };
-# endif
-
 
 Display *
 jwxyz_make_display (Window w)
@@ -395,24 +368,6 @@ jwxyz_make_display (Window w)
   Display *d = (Display *) calloc (1, sizeof(*d));
   d->screen = (Screen *) calloc (1, sizeof(Screen));
   d->screen->dpy = d;
-  
-  d->screen_count = 1;
-  d->screen->screen_number = 0;
-# ifndef USE_IPHONE
-  {
-    // Find the first empty slot in live_displays and plug us in.
-    int size = sizeof(jwxyz_live_displays) / sizeof(*jwxyz_live_displays);
-    int i;
-    for (i = 0; i < size; i++) {
-      if (! jwxyz_live_displays[i])
-        break;
-    }
-    if (i >= size) abort();
-    jwxyz_live_displays[i] = d;
-    d->screen_count = size;
-    d->screen->screen_number = i;
-  }
-# endif // !USE_IPHONE
 
 # ifndef HAVE_JWZGLES
   struct gl_version version;
@@ -491,7 +446,6 @@ jwxyz_make_display (Window w)
   v->red_mask   = jwxyz_alloc_color (d, 0xFFFF, 0x0000, 0x0000, 0x0000);
   v->green_mask = jwxyz_alloc_color (d, 0x0000, 0xFFFF, 0x0000, 0x0000);
   v->blue_mask  = jwxyz_alloc_color (d, 0x0000, 0x0000, 0xFFFF, 0x0000);
-  v->bits_per_rgb = 8;
   d->screen->visual = v;
 
   d->timers_data = jwxyz_sources_init (XtDisplayToApplicationContext (d));
@@ -547,21 +501,6 @@ jwxyz_free_display (Display *dpy)
 
   jwxyz_sources_free (dpy->timers_data);
 
-# ifndef USE_IPHONE
-  {
-    // Find us in live_displays and clear that slot.
-    int size = ScreenCount(dpy);
-    int i;
-    for (i = 0; i < size; i++) {
-      if (dpy == jwxyz_live_displays[i]) {
-        jwxyz_live_displays[i] = 0;
-        break;
-      }
-    }
-    if (i >= size) abort();
-  }
-# endif // !USE_IPHONE
-
   free (dpy->screen->visual);
   free (dpy->screen);
   free (dpy);
@@ -675,13 +614,7 @@ XDisplayNumberOfScreen (Screen *s)
 int
 XScreenNumberOfScreen (Screen *s)
 {
-  return s? s->screen_number : 0;
-}
-
-int
-jwxyz_ScreenCount (Display *dpy)
-{
-  return dpy ? dpy->screen_count : 0;
+  return 0;
 }
 
 unsigned long
@@ -912,26 +845,19 @@ static void set_white (void)
 }
 
 
-static GLsizei to_pow2 (size_t x);
-
-
 void
-jwxyz_gl_copy_area_copy_tex_image (Display *dpy, Drawable src, Drawable dst,
-                                   GC gc, int src_x, int src_y,
+jwxyz_gl_copy_area_read_tex_image (Display *dpy, unsigned src_height,
+                                   int src_x, int src_y,
                                    unsigned int width, unsigned int height,
                                    int dst_x, int dst_y)
 {
-  const XRectangle *src_frame = jwxyz_frame (src);
-
-  Assert(gc->gcv.function == GXcopy, "XCopyArea: Unknown function");
-
-  jwxyz_bind_drawable (dpy, dpy->main_window, src);
-
 #  if defined HAVE_COCOA && !defined USE_IPHONE
   /* TODO: Does this help? */
   /* glFinish(); */
 #  endif
 
+  /* TODO: Fix TestX11 + mode_preserve with this one. */
+
   unsigned tex_w = width, tex_h = height;
   if (!dpy->gl_texture_npot_p) {
     tex_w = to_pow2(tex_w);
@@ -944,20 +870,47 @@ jwxyz_gl_copy_area_copy_tex_image (Display *dpy, Drawable src, Drawable dst,
 
   if (tex_w == width && tex_h == height) {
     glCopyTexImage2D (dpy->gl_texture_target, 0, internalformat,
-                      src_x, src_frame->height - src_y - height,
-                      width, height, 0);
+                      src_x, src_height - src_y - height, width, height, 0);
   } else {
     glTexImage2D (dpy->gl_texture_target, 0, internalformat, tex_w, tex_h,
                   0, dpy->screen->pixel_format, gl_pixel_type(dpy), NULL);
     glCopyTexSubImage2D (dpy->gl_texture_target, 0, 0, 0,
-                         src_x, src_frame->height - src_y - height,
-                         width, height);
+                         src_x, src_height - src_y - height, width, height);
+  }
+}
+
+void
+jwxyz_gl_copy_area_write_tex_image (Display *dpy, GC gc, int src_x, int src_y,
+                                    unsigned int width, unsigned int height,
+                                    int dst_x, int dst_y)
+{
+  Assert(gc->gcv.function == GXcopy, "XCopyArea: Unknown function");
+
+  /* TODO: Copy-pasted from read_tex_image. */
+  unsigned tex_w = width, tex_h = height;
+  if (!dpy->gl_texture_npot_p) {
+    tex_w = to_pow2(tex_w);
+    tex_h = to_pow2(tex_h);
   }
 
-  jwxyz_bind_drawable (dpy, dpy->main_window, dst);
-  set_white ();
   glBindTexture (dpy->gl_texture_target, dpy->rect_texture);
-  glEnable (dpy->gl_texture_target);
+
+  jwxyz_gl_draw_image (dpy->gl_texture_target, tex_w, tex_h, 0, 0,
+                       width, height, dst_x, dst_y);
+
+  clear_texture (dpy);
+}
+
+
+void
+jwxyz_gl_draw_image (GLenum gl_texture_target,
+                     unsigned int tex_w, unsigned int tex_h,
+                     int src_x, int src_y,
+                     unsigned int width, unsigned int height,
+                     int dst_x, int dst_y)
+{
+  set_white ();
+  glEnable (gl_texture_target);
 
   glEnableClientState (GL_TEXTURE_COORD_ARRAY);
   glEnableClientState (GL_VERTEX_ARRAY);
@@ -971,20 +924,35 @@ jwxyz_gl_copy_area_copy_tex_image (Display *dpy, Drawable src, Drawable dst,
     {dst_x + width, dst_y + height},
     {dst_x + width, dst_y}
   };
-  
-#ifdef HAVE_JWZGLES
-  static const GLshort tex_coords[4][2] = {{0, 1}, {0, 0}, {1, 0}, {1, 1}};
-#else
-  GLshort tex_coords[4][2] = {{0, height}, {0, 0}, {width, 0}, {width, height}};
-#endif
+
+  GLfloat
+    tex_x0 = src_x, tex_y0 = src_y + height,
+    tex_x1 = src_x + width, tex_y1 = src_y;
+
+# ifndef HAVE_JWZGLES
+  if (gl_texture_target != GL_TEXTURE_RECTANGLE_EXT)
+# endif
+  {
+    GLfloat mx = 1.0f / tex_w, my = 1.0f / tex_h;
+    tex_x0 *= mx;
+    tex_y0 *= my;
+    tex_x1 *= mx;
+    tex_y1 *= my;
+  }
+
+  GLfloat tex_coords[4][2] =
+  {
+    {tex_x0, tex_y0},
+    {tex_x0, tex_y1},
+    {tex_x1, tex_y1},
+    {tex_x1, tex_y0}
+  };
 
   glVertexPointer (2, GL_FLOAT, 0, vertices);
-  glTexCoordPointer (2, GL_SHORT, 0, tex_coords);
+  glTexCoordPointer (2, GL_FLOAT, 0, tex_coords);
   glDrawArrays (GL_TRIANGLE_FAN, 0, 4);
-  
-  clear_texture (dpy);
-  
-  glDisable (dpy->gl_texture_target);
+
+  glDisable (gl_texture_target);
 }
 
 void
@@ -993,40 +961,9 @@ jwxyz_gl_copy_area_read_pixels (Display *dpy, Drawable src, Drawable dst,
                                 unsigned int width, unsigned int height,
                                 int dst_x, int dst_y)
 {
-# if 1
   XImage *img = XGetImage (dpy, src, src_x, src_y, width, height, ~0, ZPixmap);
   XPutImage (dpy, dst, gc, img, 0, 0, dst_x, dst_y, width, height);
   XDestroyImage (img);
-# endif
-
-# if 0
-  /* Something may or may not be broken in here. (shrug) */
-  bind_drawable(dpy, src);
-
-  /* Error checking would be nice. */
-  void *pixels = malloc (src_rect.size.width * 4 * src_rect.size.height);
-
-  glPixelStorei (GL_PACK_ROW_LENGTH, 0);
-  glPixelStorei (GL_PACK_ALIGNMENT, 4);
-
-  glReadPixels (src_rect.origin.x, dst_frame.size.height - (src_rect.origin.y + src_rect.size.height),
-                src_rect.size.width, src_rect.size.height,
-                GL_RGBA, GL_UNSIGNED_BYTE, // TODO: Pick better formats.
-                pixels);
-
-  bind_drawable (dpy, dst);
-
-  glPixelZoom (1.0f, 1.0f);
-
-  glPixelStorei (GL_UNPACK_ROW_LENGTH, 0);
-  glPixelStorei (GL_UNPACK_ALIGNMENT, 4);
-
-  glRasterPos2i (dst_rect.origin.x, dst_rect.origin.y + dst_rect.size.height);
-  glDrawPixels (dst_rect.size.width, dst_rect.size.height,
-                GL_RGBA, GL_UNSIGNED_BYTE, pixels);
-
-  free(pixels);
-# endif
 }
 
 
@@ -1283,11 +1220,18 @@ XFillPolygon (Display *dpy, Drawable d, GC gc,
 
   /* Complex: Pedal, and for some reason Attraction, Mountain, Qix, SpeedMine, Starfish
    * Nonconvex: Goop, Pacman, Rocks, Speedmine
+   *
+   * We currently do Nonconvex with the simple-to-implement ear clipping
+   * algorithm, but in the future we can replace that with an algorithm
+   * with slower big-O growth
+   *
    */
   
-  Assert(shape == Convex, "XFillPolygon: (TODO) Unimplemented shape");
   
   // TODO: Feed vertices straight to OpenGL for CoordModeOrigin.
+
+  if (shape == Convex) {
+
   GLshort *vertices = malloc(npoints * sizeof(GLshort) * 2); // TODO: Oh look, another unchecked malloc.
   short v[2] = {0, 0};
   
@@ -1305,35 +1249,20 @@ XFillPolygon (Display *dpy, Drawable d, GC gc,
   
   free(vertices);
 
-  /*
-  CGRect wr = d->frame;
-  int i;
-  push_fg_gc (dpy, d, gc, YES);
-  CGContextRef cgc = d->cgc;
-  CGContextBeginPath (cgc);
-  float x = 0, y = 0;
-  for (i = 0; i < npoints; i++) {
-    if (i > 0 && mode == CoordModePrevious) {
-      x += points[i].x;
-      y -= points[i].y;
-    } else {
-      x = wr.origin.x + points[i].x;
-      y = wr.origin.y + wr.size.height - points[i].y;
-    }
-        
-    if (i == 0)
-      CGContextMoveToPoint (cgc, x, y);
-    else
-      CGContextAddLineToPoint (cgc, x, y);
+  } else if (shape == Nonconvex) {
+
+  // TODO: assert that x,y of first and last point match, as that is assumed
+
+  linked_point *root;
+  root = (linked_point *) malloc( sizeof(linked_point) );
+  set_points_list(points,npoints,root);
+  traverse_points_list(root);
+
+  } else {
+    Assert((shape == Convex || shape == Nonconvex), "XFillPolygon: (TODO) Unimplemented shape");
   }
-  CGContextClosePath (cgc);
-  if (gc->gcv.fill_rule == EvenOddRule)
-    CGContextEOFillPath (cgc);
-  else
-    CGContextFillPath (cgc);
-  pop_gc (d, gc);
-  invalidate_drawable_cache (d);
-  */
+  
+
   return 0;
 }
 
@@ -1575,31 +1504,6 @@ flipbits (unsigned const char *in, unsigned char *out, int length)
 }
 */
 
-// Copied and pasted from OSX/XScreenSaverView.m
-static GLsizei
-to_pow2 (size_t x)
-{
-  if (x <= 1)
-    return 1;
-
-  size_t mask = (size_t)-1;
-  unsigned bits = sizeof(x) * CHAR_BIT;
-  unsigned log2 = bits;
-
-  --x;
-  while (bits) {
-    if (!(x & mask)) {
-      log2 -= bits;
-      x <<= bits;
-    }
-
-    bits >>= 1;
-    mask <<= bits;
-  }
-
-  return 1 << log2;
-}
-
 
 int
 XPutImage (Display *dpy, Drawable d, GC gc, XImage *ximage,
@@ -1832,12 +1736,11 @@ XPutImage (Display *dpy, Drawable d, GC gc, XImage *ximage,
   return 0;
 }
 
-/* At the moment nothing actually uses XGetSubImage. */
-/* #### Actually lots of things call XGetImage, which calls XGetSubImage.
-   E.g., Twang calls XGetImage on the window intending to get a
+/* At the moment only XGetImage and get_xshm_image use XGetSubImage. */
+/* #### Twang calls XGetImage on the window intending to get a
    buffer full of black.  This is returning a buffer full of white
    instead of black for some reason. */
-static XImage *
+XImage *
 XGetSubImage (Display *dpy, Drawable d, int x, int y,
               unsigned int width, unsigned int height,
               unsigned long plane_mask, int format,
@@ -1913,19 +1816,6 @@ XGetSubImage (Display *dpy, Drawable d, int x, int y,
   return dest_image;
 }
 
-XImage *
-XGetImage (Display *dpy, Drawable d, int x, int y,
-           unsigned int width, unsigned int height,
-           unsigned long plane_mask, int format)
-{
-  unsigned depth = jwxyz_drawable_depth (d);
-  XImage *image = XCreateImage (dpy, 0, depth, format, 0, 0, width, height,
-                                0, 0);
-  image->data = (char *) malloc (height * image->bytes_per_line);
-
-  return XGetSubImage (dpy, d, x, y, width, height, plane_mask, format,
-                       image, 0, 0);
-}
 
 /* Returns a transformation matrix to do rotation as per the provided
    EXIF "Orientation" value.
@@ -2131,944 +2021,257 @@ copy_pixmap (Display *dpy, Pixmap p)
 #endif
 
 
-// This is XQueryFont, but for the XFontStruct embedded in 'Font'
-//
-static void
-query_font (Font fid)
-{
-  if (!fid || !fid->native_font) {
-    Assert (0, "no native font in fid");
-    return;
-  }
-
-  int first = 32;
-  int last = 255;
-
-  Display *dpy = fid->dpy;
-  void *native_font = fid->native_font;
-
-  XFontStruct *f = &fid->metrics;
-  XCharStruct *min = &f->min_bounds;
-  XCharStruct *max = &f->max_bounds;
-
-  f->fid               = fid;
-  f->min_char_or_byte2 = first;
-  f->max_char_or_byte2 = last;
-  f->default_char      = 'M';
-  f->ascent            = fid->ascent;
-  f->descent           = fid->descent;
-
-  min->width    = 32767;  // set to smaller values in the loop
-  min->ascent   = 32767;
-  min->descent  = 32767;
-  min->lbearing = 32767;
-  min->rbearing = 32767;
-
-  f->per_char = (XCharStruct *) calloc (last-first+2, sizeof (XCharStruct));
-
-  for (int i = first; i <= last; i++) {
-    XCharStruct *cs = &f->per_char[i-first];
-    char s = (char) i;
-    jwxyz_render_text (dpy, native_font, &s, 1, GL_FALSE, cs, 0);
-
-    max->width    = MAX (max->width,    cs->width);
-    max->ascent   = MAX (max->ascent,   cs->ascent);
-    max->descent  = MAX (max->descent,  cs->descent);
-    max->lbearing = MAX (max->lbearing, cs->lbearing);
-    max->rbearing = MAX (max->rbearing, cs->rbearing);
-
-    min->width    = MIN (min->width,    cs->width);
-    min->ascent   = MIN (min->ascent,   cs->ascent);
-    min->descent  = MIN (min->descent,  cs->descent);
-    min->lbearing = MIN (min->lbearing, cs->lbearing);
-    min->rbearing = MIN (min->rbearing, cs->rbearing);
-/*
-    Log (" %3d %c: w=%3d lb=%3d rb=%3d as=%3d ds=%3d\n",
-         i, i, cs->width, cs->lbearing, cs->rbearing, 
-         cs->ascent, cs->descent);
- */
-  }
-}
-
-
-// Since 'Font' includes the metrics, this just makes a copy of that.
-//
-XFontStruct *
-XQueryFont (Display *dpy, Font fid)
-{
-  // copy XFontStruct
-  XFontStruct *f = (XFontStruct *) calloc (1, sizeof(*f));
-  *f = fid->metrics;
-  f->fid = fid;
-
-  // build XFontProps
-  f->n_properties = 1;
-  f->properties = malloc (sizeof(*f->properties) * f->n_properties);
-  f->properties[0].name = XA_FONT;
-  Assert (sizeof (f->properties[0].card32) >= sizeof (char *),
-          "atoms probably needs a real implementation");
-  // If XInternAtom is ever implemented, use it here.
-  f->properties[0].card32 = (unsigned long)(char *)fid->xa_font;
-
-  // copy XCharStruct array
-  int size = (f->max_char_or_byte2 - f->min_char_or_byte2) + 1;
-  f->per_char = (XCharStruct *) calloc (size + 2, sizeof (XCharStruct));
-
-  memcpy (f->per_char, fid->metrics.per_char,
-          size * sizeof (XCharStruct));
-
-  return f;
-}
-
-
-static Font
-copy_font (Font fid)
-{
-  fid->refcount++;
-  return fid;
-}
-
-
-#if 0
-
-
-static NSArray *
-font_family_members (NSString *family_name)
-{
-# ifndef USE_IPHONE
-  return [[NSFontManager sharedFontManager]
-          availableMembersOfFontFamily:family_name];
-# else
-  return [UIFont fontNamesForFamilyName:family_name];
-# endif
-}
-
-
-static NSString *
-default_font_family (NSFontTraitMask require)
-{
-  return require & NSFixedPitchFontMask ? @"Courier" : @"Verdana";
-}
-
-
-static NSFont *
-try_font (NSFontTraitMask traits, NSFontTraitMask mask,
-          NSString *family_name, float size,
-          char **name_ret)
+int
+jwxyz_draw_string (Display *dpy, Drawable d, GC gc, int x, int y,
+                   const char *str, size_t len, int utf8_p)
 {
-  Assert (size > 0, "zero font size");
-
-  NSArray *family_members = font_family_members (family_name);
-  if (!family_members.count)
-    family_members = font_family_members (default_font_family (traits));
+  Font ff = gc->gcv.font;
+  XCharStruct cs;
 
-# ifndef USE_IPHONE
-  for (unsigned k = 0; k != family_members.count; ++k) {
-
-    NSArray *member = [family_members objectAtIndex:k];
-    NSFontTraitMask font_mask =
-    [(NSNumber *)[member objectAtIndex:3] unsignedIntValue];
-
-    if ((font_mask & mask) == traits) {
-
-      NSString *name = [member objectAtIndex:0];
-      NSFont *f = [NSFont fontWithName:name size:size];
-      if (!f)
-        break;
-
-      /* Don't use this font if it (probably) doesn't include ASCII characters.
-       */
-      NSStringEncoding enc = [f mostCompatibleStringEncoding];
-      if (! (enc == NSUTF8StringEncoding ||
-             enc == NSISOLatin1StringEncoding ||
-             enc == NSNonLossyASCIIStringEncoding ||
-             enc == NSISOLatin2StringEncoding ||
-             enc == NSUnicodeStringEncoding ||
-             enc == NSWindowsCP1250StringEncoding ||
-             enc == NSWindowsCP1252StringEncoding ||
-             enc == NSMacOSRomanStringEncoding)) {
-        // NSLog(@"skipping \"%@\": encoding = %d", name, enc);
-        break;
-      }
-      // NSLog(@"using \"%@\": %d", name, enc);
+  char *data = 0;
+  jwxyz_render_text (dpy, jwxyz_native_font (ff), str, len, utf8_p, &cs, &data);
+  int w = cs.rbearing - cs.lbearing;
+  int h = cs.ascent + cs.descent;
 
-      // *name_ret = strdup ([name cStringUsingEncoding:NSUTF8StringEncoding]);
-      *name_ret = strdup (name.UTF8String);
-      return f;
-    }
-  }
-# else // USE_IPHONE
-
-  for (NSString *fn in family_members) {
-# define MATCH(X) \
-         ([fn rangeOfString:X options:NSCaseInsensitiveSearch].location \
-         != NSNotFound)
-
-    // The magic invocation for getting font names is
-    // [[UIFontDescriptor
-    //   fontDescriptorWithFontAttributes:@{UIFontDescriptorNameAttribute: name}]
-    //  symbolicTraits]
-    // ...but this only works on iOS 7 and later.
-    NSFontTraitMask font_mask = 0;
-    if (MATCH(@"Bold"))
-      font_mask |= NSBoldFontMask;
-    if (MATCH(@"Italic") || MATCH(@"Oblique"))
-      font_mask |= NSItalicFontMask;
-
-    if ((font_mask & mask) == traits) {
-
-      /* Check if it can do ASCII.  No good way to accomplish this!
-         These are fonts present in iPhone Simulator as of June 2012
-         that don't include ASCII.
-       */
-      if (MATCH(@"AppleGothic") ||     // Korean
-          MATCH(@"Dingbats") ||                // Dingbats
-          MATCH(@"Emoji") ||           // Emoticons
-          MATCH(@"Geeza") ||           // Arabic
-          MATCH(@"Hebrew") ||          // Hebrew
-          MATCH(@"HiraKaku") ||                // Japanese
-          MATCH(@"HiraMin") ||         // Japanese
-          MATCH(@"Kailasa") ||         // Tibetan
-          MATCH(@"Ornaments") ||       // Dingbats
-          MATCH(@"STHeiti")            // Chinese
-       )
-         break;
-
-      *name_ret = strdup (fn.UTF8String);
-      return [UIFont fontWithName:fn size:size];
-    }
-# undef MATCH
+  if (w < 0 || h < 0) abort();
+  if (w == 0 || h == 0) {
+    if (data) free(data);
+    return 0;
   }
 
-# endif
-
-  return NULL;
-}
-
-
-
-/* On Cocoa and iOS, fonts may be specified as "Georgia Bold 24" instead
-   of XLFD strings; also they can be comma-separated strings with multiple
-   font names.  First one that exists wins.
- */
-static NSFont *
-try_native_font (const char *name, float scale,
-                 char **name_ret, float *size_ret, char **xa_font)
-{
-  if (!name) return 0;
-  const char *spc = strrchr (name, ' ');
-  if (!spc) return 0;
-
-  NSFont *f = 0;
-  char *token = strdup (name);
-  char *name2;
-
-  while ((name2 = strtok (token, ","))) {
-    token = 0;
-
-    while (*name2 == ' ' || *name2 == '\t' || *name2 == '\n')
-      name2++;
-
-    spc = strrchr (name2, ' ');
-    if (!spc) continue;
-
-    int dsize = 0;
-    if (1 != sscanf (spc, " %d ", &dsize))
-      continue;
-    float size = dsize;
-
-    if (size <= 4) continue;
-
-    size *= scale;
+  XImage *img = XCreateImage (dpy, dpy->screen->visual, 32,
+                              ZPixmap, 0, data, w, h, 0, 0);
 
-    name2[strlen(name2) - strlen(spc)] = 0;
+  /* The image of text is a 32-bit image, in white.
+     Take the red channel for intensity and use that as alpha.
+     replace RGB with the GC's foreground color.
+     This expects that XPutImage respects alpha and only writes
+     the bits that are not masked out.
+     This also assumes that XPutImage expects ARGB.
+   */
+  {
+    char *s = data;
+    char *end = s + (w * h * 4);
+    uint8_t rgba[4];
+    jwxyz_query_color (dpy, gc->gcv.foreground, rgba);
+    while (s < end) {
 
-    NSString *nsname = [NSString stringWithCString:name2
-                                          encoding:NSUTF8StringEncoding];
-    f = [NSFont fontWithName:nsname size:size];
-    if (f) {
-      *name_ret = name2;
-      *size_ret = size;
-      *xa_font = strdup (name); // Maybe this should be an XLFD?
-      break;
-    } else {
-      NSLog(@"No native font: \"%@\" %.0f", nsname, size);
+      s[3] = s[1];
+      s[0] = rgba[0];
+      s[1] = rgba[1];
+      s[2] = rgba[2];
+      s += 4;
     }
   }
 
-  free (token);
-  return f;
-}
-
-
-/* Returns a random font in the given size and face.
- */
-static NSFont *
-random_font (NSFontTraitMask traits, NSFontTraitMask mask,
-             float size, NSString **family_ret, char **name_ret)
-{
-
-# ifndef USE_IPHONE
-  // Providing Unbold or Unitalic in the mask for availableFontNamesWithTraits
-  // returns an empty list, at least on a system with default fonts only.
-  NSArray *families = [[NSFontManager sharedFontManager]
-                       availableFontFamilies];
-  if (!families) return 0;
-# else
-  NSArray *families = [UIFont familyNames];
-
-  // There are many dups in the families array -- uniquify it.
   {
-    NSArray *sorted_families =
-    [families sortedArrayUsingSelector:@selector(compare:)];
-    NSMutableArray *new_families =
-    [NSMutableArray arrayWithCapacity:sorted_families.count];
-
-    NSString *prev_family = nil;
-    for (NSString *family in sorted_families) {
-      if ([family compare:prev_family])
-        [new_families addObject:family];
-    }
-
-    families = new_families;
+    Bool old_alpha = gc->gcv.alpha_allowed_p;
+    jwxyz_XSetAlphaAllowed (dpy, gc, True);
+    XPutImage (dpy, d, gc, img, 0, 0,
+               x + cs.lbearing,
+               y - cs.ascent,
+               w, h);
+    jwxyz_XSetAlphaAllowed (dpy, gc, old_alpha);
+    XDestroyImage (img);
   }
-# endif // USE_IPHONE
 
-  long n = [families count];
-  if (n <= 0) return 0;
-
-  int j;
-  for (j = 0; j < n; j++) {
-    int i = random() % n;
-    NSString *family_name = [families objectAtIndex:i];
-
-    NSFont *result = try_font (traits, mask, family_name, size, name_ret);
-    if (result) {
-      [*family_ret release];
-      *family_ret = family_name;
-      [*family_ret retain];
-      return result;
-    }
-  }
-
-  // None of the fonts support ASCII?
   return 0;
 }
 
 
-// Fonts need this. XDisplayHeightMM and friends should probably be consistent
-// with this as well if they're ever implemented.
-static const unsigned dpi = 75;
-
-
-static const char *
-xlfd_field_end (const char *s)
-{
-  const char *s2 = strchr(s, '-');
-  if (!s2)
-    s2 = s + strlen(s);
-  return s2;
-}
-
-
-static size_t
-xlfd_next (const char **s, const char **s2)
-{
-  if (!**s2) {
-    *s = *s2;
-  } else {
-    Assert (**s2 == '-', "xlfd parse error");
-    *s = *s2 + 1;
-    *s2 = xlfd_field_end (*s);
-  }
-
-  return *s2 - *s;
-}
-
-static NSFont *
-try_xlfd_font (const char *name, float scale,
-               char **name_ret, float *size_ret, char **xa_font)
-{
-  NSFont *nsfont = 0;
-  NSString *family_name = nil;
-  NSFontTraitMask require = 0, forbid = 0;
-  GLboolean rand  = GL_FALSE;
-  float size = 0;
-  char *ps_name = 0;
-
-  const char *s = (name ? name : "");
-
-  size_t L = strlen (s);
-# define CMP(STR) (L == strlen(STR) && !strncasecmp (s, (STR), L))
-# define UNSPEC   (L == 0 || L == 1 && *s == '*')
-  if      (CMP ("6x10"))     size = 8,  require |= NSFixedPitchFontMask;
-  else if (CMP ("6x10bold")) size = 8,  require |= NSFixedPitchFontMask | NSBoldFontMask;
-  else if (CMP ("fixed"))    size = 12, require |= NSFixedPitchFontMask;
-  else if (CMP ("9x15"))     size = 12, require |= NSFixedPitchFontMask;
-  else if (CMP ("9x15bold")) size = 12, require |= NSFixedPitchFontMask | NSBoldFontMask;
-  else if (CMP ("vga"))      size = 12, require |= NSFixedPitchFontMask;
-  else if (CMP ("console"))  size = 12, require |= NSFixedPitchFontMask;
-  else if (CMP ("gallant"))  size = 12, require |= NSFixedPitchFontMask;
-  else {
-
-    // Incorrect fields are ignored.
-
-    if (*s == '-')
-      ++s;
-    const char *s2 = xlfd_field_end(s);
-
-    // Foundry (ignore)
-
-    L = xlfd_next (&s, &s2); // Family name
-    // This used to substitute Georgia for Times. Now it doesn't.
-    if (CMP ("random")) {
-      rand = GL_TRUE;
-    } else if (CMP ("fixed")) {
-      require |= NSFixedPitchFontMask;
-      family_name = @"Courier";
-    } else if (!UNSPEC) {
-      family_name = [[[NSString alloc] initWithBytes:s
-                                              length:L
-                                            encoding:NSUTF8StringEncoding]
-                     autorelease];
-    }
-
-    L = xlfd_next (&s, &s2); // Weight name
-    if (CMP ("bold") || CMP ("demibold"))
-      require |= NSBoldFontMask;
-    else if (CMP ("medium") || CMP ("regular"))
-      forbid |= NSBoldFontMask;
-
-    L = xlfd_next (&s, &s2); // Slant
-    if (CMP ("i") || CMP ("o"))
-      require |= NSItalicFontMask;
-    else if (CMP ("r"))
-      forbid |= NSItalicFontMask;
-
-    xlfd_next (&s, &s2); // Set width name (ignore)
-    xlfd_next (&s, &s2); // Add style name (ignore)
-
-    xlfd_next (&s, &s2); // Pixel size (ignore)
-
-    xlfd_next (&s, &s2); // Point size
-    char *s3;
-    uintmax_t n = strtoumax(s, &s3, 10);
-    if (s2 == s3)
-      size = n / 10.0;
-
-    xlfd_next (&s, &s2); // Resolution X (ignore)
-    xlfd_next (&s, &s2); // Resolution Y (ignore)
-
-    xlfd_next (&s, &s2); // Spacing
-    if (CMP ("p"))
-      forbid |= NSFixedPitchFontMask;
-    else if (CMP ("m") || CMP ("c"))
-      require |= NSFixedPitchFontMask;
-
-    // Don't care about average_width or charset registry.
-  }
-# undef CMP
-# undef UNSPEC
-
-  if (!family_name && !rand)
-    family_name = default_font_family (require);
-
-  if (size < 6 || size > 1000)
-    size = 12;
-
-  size *= scale;
-
-  NSFontTraitMask mask = require | forbid;
-
-  if (rand) {
-    nsfont   = random_font (require, mask, size, &family_name, &ps_name);
-    [family_name autorelease];
-  }
-
-  if (!nsfont)
-    nsfont   = try_font (require, mask, family_name, size, &ps_name);
-
-  // if that didn't work, turn off attibutes until it does
-  // (e.g., there is no "Monaco-Bold".)
-  //
-  if (!nsfont && (mask & NSItalicFontMask)) {
-    require &= ~NSItalicFontMask;
-    mask &= ~NSItalicFontMask;
-    nsfont = try_font (require, mask, family_name, size, &ps_name);
-  }
-  if (!nsfont && (mask & NSBoldFontMask)) {
-    require &= ~NSBoldFontMask;
-    mask &= ~NSBoldFontMask;
-    nsfont = try_font (require, mask, family_name, size, &ps_name);
-  }
-  if (!nsfont && (mask & NSFixedPitchFontMask)) {
-    require &= ~NSFixedPitchFontMask;
-    mask &= ~NSFixedPitchFontMask;
-    nsfont = try_font (require, mask, family_name, size, &ps_name);
-  }
-
-  if (nsfont) {
-    *name_ret = ps_name;
-    *size_ret = size;
-    float actual_size = size / scale;
-    asprintf(xa_font, "-*-%s-%s-%c-*-*-%u-%u-%u-%u-%c-0-iso10646-1",
-             family_name.UTF8String,
-             (require & NSBoldFontMask) ? "bold" : "medium",
-             (require & NSItalicFontMask) ? 'o' : 'r',
-             (unsigned)(dpi * actual_size / 72.27 + 0.5),
-             (unsigned)(actual_size * 10 + 0.5), dpi, dpi,
-             (require & NSFixedPitchFontMask) ? 'm' : 'p');
-    return nsfont;
-  } else {
-    return 0;
-  }
-}
-
-#endif
-
-Font
-XLoadFont (Display *dpy, const char *name)
-{
-  Font fid = (Font) calloc (1, sizeof(*fid));
-  fid->refcount = 1;
-  fid->dpy = dpy;
-
-  // (TODO) float scale = 1;
-
-# ifdef USE_IPHONE
-  /* Since iOS screens are physically smaller than desktop screens, scale up
-     the fonts to make them more readable.
-
-     Note that X11 apps on iOS also have the backbuffer sized in points
-     instead of pixels, resulting in an effective X11 screen size of 768x1024
-     or so, even if the display has significantly higher resolution.  That is
-     unrelated to this hack, which is really about DPI.
-   */
-  /* scale = 2; */
-# endif
-
-  fid->dpy = dpy;
-  fid->native_font = jwxyz_load_native_font (dpy, name,
-                                             &fid->ps_name, &fid->size,
-                                             &fid->ascent, &fid->descent);
-  if (!fid->native_font) {
-    free (fid);
-    return 0;
-  }
-  query_font (fid);
-
-  return fid;
-}
-
-
-XFontStruct *
-XLoadQueryFont (Display *dpy, const char *name)
-{
-  Font fid = XLoadFont (dpy, name);
-  if (!fid) return 0;
-  return XQueryFont (dpy, fid);
-}
-
 int
-XUnloadFont (Display *dpy, Font fid)
+XSetClipMask (Display *dpy, GC gc, Pixmap m)
 {
-  if (--fid->refcount < 0) abort();
-  if (fid->refcount > 0) return 0;
-
-  if (fid->native_font)
-    jwxyz_release_native_font (fid->dpy, fid->native_font);
-
-  if (fid->ps_name)
-    free (fid->ps_name);
-  if (fid->metrics.per_char)
-    free (fid->metrics.per_char);
-
-  // #### 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];
-  //  CFRelease (fid->nsfont);
+//####  abort();
+/*
+  TODO
 
-  free (fid);
-  return 0;
-}
+  Assert (!!gc->gcv.clip_mask == !!gc->clip_mask, "GC clip mask mixup");
 
-int
-XFreeFontInfo (char **names, XFontStruct *info, int n)
-{
-  int i;
-  if (names) {
-    for (i = 0; i < n; i++)
-      if (names[i]) free (names[i]);
-    free (names);
-  }
-  if (info) {
-    for (i = 0; i < n; i++)
-      if (info[i].per_char) {
-        free (info[i].per_char);
-        free (info[i].properties);
-      }
-    free (info);
+  if (gc->gcv.clip_mask) {
+    XFreePixmap (dpy, gc->gcv.clip_mask);
+    CGImageRelease (gc->clip_mask);
   }
-  return 0;
-}
 
-int
-XFreeFont (Display *dpy, XFontStruct *f)
-{
-  Font fid = f->fid;
-  XFreeFontInfo (0, f, 1);
-  XUnloadFont (dpy, fid);
+  gc->gcv.clip_mask = copy_pixmap (dpy, m);
+  if (gc->gcv.clip_mask)
+    gc->clip_mask =
+      CGBitmapContextCreateImage (gc->gcv.clip_mask->cgc);
+  else
+    gc->clip_mask = 0;
+*/
+  
   return 0;
 }
 
-
 int
-XSetFont (Display *dpy, GC gc, Font fid)
+XSetClipOrigin (Display *dpy, GC gc, int x, int y)
 {
-  Font font2 = copy_font (fid);
-  if (gc->gcv.font)
-    XUnloadFont (dpy, gc->gcv.font);
-  gc->gcv.font = font2;
+  gc->gcv.clip_x_origin = x;
+  gc->gcv.clip_y_origin = y;
   return 0;
 }
 
-
-XFontSet
-XCreateFontSet (Display *dpy, char *name, 
-                char ***missing_charset_list_return,
-                int *missing_charset_count_return,
-                char **def_string_return)
+void set_points_list(XPoint *points, int npoints, linked_point *root)
 {
-  char *name2 = strdup (name);
-  char *s = strchr (name, ',');
-  if (s) *s = 0;
-  XFontSet set = 0;
-  XFontStruct *f = XLoadQueryFont (dpy, name2);
-  if (f)
-    {
-      set = (XFontSet) calloc (1, sizeof(*set));
-      set->font = f;
-    }
-  free (name2);
-  if (missing_charset_list_return)  *missing_charset_list_return = 0;
-  if (missing_charset_count_return) *missing_charset_count_return = 0;
-  if (def_string_return) *def_string_return = 0;
-  return set;
-}
-
+    linked_point *current;  
 
-void
-XFreeFontSet (Display *dpy, XFontSet set)
-{
-  XFreeFont (dpy, set->font);
-  free (set);
+    current = root;
+    for (int i = 0; i < npoints - 2 ; i++) {
+        current->x = points[i].x;
+        current->y = points[i].y;
+        current->next = (linked_point *) malloc(sizeof(linked_point)); 
+        current = current->next;
+    }
+    current->x = points[npoints-2].x;
+    current->y = points[npoints-2].y;
+    current->next = root;
 }
 
 
-const char *
-jwxyz_nativeFontName (Font f, float *size)
+double compute_edge_length(linked_point * a, linked_point * b)
 {
-  if (size) *size = f->size;
-  return f->ps_name;
-}
 
+    int xdiff, ydiff, xsq, ysq, added;
+    double xy_add, edge_length;
 
-void
-XFreeStringList (char **list)
-{
-  int i;
-  if (!list) return;
-  for (i = 0; list[i]; i++)
-    XFree (list[i]);
-  XFree (list);
+    xdiff = a->x - b->x;
+    ydiff = a->y - b->y;
+    xsq = xdiff * xdiff;
+    ysq = ydiff * ydiff;
+    added = xsq + ysq;
+    xy_add = (double) added;
+    edge_length = sqrt(xy_add);
+    return edge_length;
 }
 
-
-// Given a UTF8 string, return an NSString.  Bogus UTF8 characters are ignored.
-// We have to do this because stringWithCString returns NULL if there are
-// any invalid characters at all.
-//
-/* TODO
-static NSString *
-sanitize_utf8 (const char *in, int in_len, Bool *latin1_pP)
+double get_angle(double a, double b, double c)
 {
-  int out_len = in_len * 4;   // length of string might increase
-  char *s2 = (char *) malloc (out_len);
-  char *out = s2;
-  const char *in_end  = in  + in_len;
-  const char *out_end = out + out_len;
-  Bool latin1_p = True;
-
-  while (in < in_end)
-    {
-      unsigned long uc;
-      long L1 = utf8_decode ((const unsigned char *) in, in_end - in, &uc);
-      long L2 = utf8_encode (uc, out, out_end - out);
-      in  += L1;
-      out += L2;
-      if (uc > 255) latin1_p = False;
-    }
-  *out = 0;
-  NSString *nsstr =
-    [NSString stringWithCString:s2 encoding:NSUTF8StringEncoding];
-  free (s2);
-  if (latin1_pP) *latin1_pP = latin1_p;
-  return (nsstr ? nsstr : @"");
+    double cos_a, i_cos_a;
+    cos_a = (((b * b) + (c * c)) - (a * a)) / (double) (2.0 * b * c);
+    i_cos_a = acos(cos_a);
+    return i_cos_a;
 }
-*/
 
-int
-XTextExtents (XFontStruct *f, const char *s, int length,
-              int *dir_ret, int *ascent_ret, int *descent_ret,
-              XCharStruct *cs)
-{
-  // Unfortunately, adding XCharStructs together to get the extents for a
-  // string doesn't work: Cocoa uses non-integral character advancements, but
-  // XCharStruct.width is an integer. Plus that doesn't take into account
-  // kerning pairs, alternate glyphs, and fun stuff like the word "Zapfino" in
-  // Zapfino.
-
-  Font ff = f->fid;
-  Display *dpy = ff->dpy;
-  jwxyz_render_text (dpy, ff->native_font, s, length, GL_FALSE, cs, 0);
-  *dir_ret = 0;
-  *ascent_ret  = f->ascent;
-  *descent_ret = f->descent;
-  return 0;
-}
 
-int
-XTextWidth (XFontStruct *f, const char *s, int length)
+Bool is_same_slope(linked_point * a)
 {
-  int ascent, descent, dir;
-  XCharStruct cs;
-  XTextExtents (f, s, length, &dir, &ascent, &descent, &cs);
-  return cs.width;
-}
 
+    int abx, bcx, aby, bcy, aa, bb;
+    linked_point *b;
+    linked_point *c;
 
-int
-XTextExtents16 (XFontStruct *f, const XChar2b *s, int length,
-                int *dir_ret, int *ascent_ret, int *descent_ret,
-                XCharStruct *cs)
-{
-  // Bool latin1_p = True;
-  int i, utf8_len = 0;
-  char *utf8 = XChar2b_to_utf8 (s, &utf8_len);   // already sanitized
+    b = a->next;
+    c = b->next;
 
-  for (i = 0; i < length; i++)
-    if (s[i].byte1 > 0) {
-      // latin1_p = False;
-      break;
+    // test if slopes are indefinite for both line segments
+    if (a->x == b->x) {
+        return b->x == c->x;
+    } else if (b->x == c->x) {
+        return False;   // false, as ax/bx is not indefinite
     }
 
-  {
-    Font ff = f->fid;
-    Display *dpy = ff->dpy;
-    jwxyz_render_text (dpy, ff->native_font, utf8, strlen(utf8),
-                       GL_TRUE, cs, 0);
-  }
+    abx = a->x - b->x;
+    bcx = b->x - c->x;
+    aby = a->y - b->y;
+    bcy = b->y - c->y;
+    aa = abx * bcy;
+    bb = bcx * aby;
 
-  *dir_ret = 0;
-  *ascent_ret  = f->ascent;
-  *descent_ret = f->descent;
-  free (utf8);
-  return 0;
+    return aa == bb;
 }
 
-
-/* "Returns the distance in pixels in the primary draw direction from
-   the drawing origin to the origin of the next character to be drawn."
-
-   "overall_ink_return is set to the bbox of the string's character ink."
-
-   "The overall_ink_return for a nondescending, horizontally drawn Latin
-   character is conventionally entirely above the baseline; that is,
-   overall_ink_return.height <= -overall_ink_return.y."
-
-     [So this means that y is the top of the ink, and height grows down:
-      For above-the-baseline characters, y is negative.]
-
-   "The overall_ink_return for a nonkerned character is entirely at, and to
-   the right of, the origin; that is, overall_ink_return.x >= 0."
-
-     [So this means that x is the left of the ink, and width grows right.
-      For left-of-the-origin characters, x is negative.]
-
-   "A character consisting of a single pixel at the origin would set
-   overall_ink_return fields y = 0, x = 0, width = 1, and height = 1."
- */
-int
-Xutf8TextExtents (XFontSet set, const char *str, int len,
-                  XRectangle *overall_ink_return,
-                  XRectangle *overall_logical_return)
+void draw_three_vertices(linked_point * a, Bool triangle)
 {
-#if 0
-  Bool latin1_p;
-  NSString *nsstr = sanitize_utf8 (str, len, &latin1_p);
-  XCharStruct cs;
 
-  utf8_metrics (set->font->fid, nsstr, &cs);
+    linked_point *b;
+    linked_point *c;
+    GLenum drawType;
 
-  /* "The overall_logical_return is the bounding box that provides minimum
-     spacing to other graphical features for the string. Other graphical
-     features, for example, a border surrounding the text, should not
-     intersect this rectangle."
-
-     So I think that means they're the same?  Or maybe "ink" is the bounding
-     box, and "logical" is the advancement?  But then why is the return value
-     the advancement?
-   */
-  if (overall_ink_return)
-    XCharStruct_to_XmbRectangle (cs, *overall_ink_return);
-  if (overall_logical_return)
-    XCharStruct_to_XmbRectangle (cs, *overall_logical_return);
-
-  return cs.width;
-#endif
-  abort();
-}
+    b = a->next;
+    c = b->next;
 
+    GLfloat vertices[3][2] = {
+        {a->x, a->y},
+        {b->x, b->y},
+        {c->x, c->y}
+    };
 
-static int
-draw_string (Display *dpy, Drawable d, GC gc, int x, int y,
-             const char *str, size_t len, GLboolean utf8)
-{
-  Font ff = gc->gcv.font;
-  XCharStruct cs;
-
-  char *data = 0;
-  jwxyz_render_text (dpy, ff->native_font, str, len, utf8, &cs, &data);
-  int w = cs.rbearing - cs.lbearing;
-  int h = cs.ascent + cs.descent;
-
-  if (w < 0 || h < 0) abort();
-  if (w == 0 || h == 0) {
-    if (data) free(data);
-    return 0;
-  }
-
-  XImage *img = XCreateImage (dpy, dpy->screen->visual, 32,
-                              ZPixmap, 0, data, w, h, 0, 0);
-
-  /* The image of text is a 32-bit image, in white.
-     Take the red channel for intensity and use that as alpha.
-     replace RGB with the GC's foreground color.
-     This expects that XPutImage respects alpha and only writes
-     the bits that are not masked out.
-     This also assumes that XPutImage expects ARGB.
-   */
-  {
-    char *s = data;
-    char *end = s + (w * h * 4);
-    uint8_t rgba[4];
-    jwxyz_query_color (dpy, gc->gcv.foreground, rgba);
-    while (s < end) {
-
-      s[3] = s[1];
-      s[0] = rgba[0];
-      s[1] = rgba[1];
-      s[2] = rgba[2];
-      s += 4;
+    if (triangle) {
+        drawType = GL_TRIANGLES;
+    } else {
+        drawType = GL_LINES;
     }
-  }
-
-  XPutImage (dpy, d, gc, img, 0, 0, 
-             x + cs.lbearing,
-             y - cs.ascent,
-             w, h);
-  XDestroyImage (img);
 
-  return 0;
-}
+    glEnableClientState(GL_VERTEX_ARRAY);
+    glVertexPointer(2, GL_FLOAT, 0, vertices);
+    glDrawArrays(drawType, 0, 3);
 
-int
-XDrawString (Display *dpy, Drawable d, GC gc, int x, int y,
-             const char  *str, int len)
-{
-  return draw_string (dpy, d, gc, x, y, str, len, GL_FALSE);
+    free(b);  // cut midpoint off from remaining polygon vertex list
+    a->next = c;
 }
 
 
-int
-XDrawString16 (Display *dpy, Drawable d, GC gc, int x, int y,
-             const XChar2b *str, int len)
+Bool is_an_ear(linked_point * a)
 {
-  XChar2b *b2 = malloc ((len + 1) * sizeof(*b2));
-  char *s2;
-  int ret;
-  memcpy (b2, str, len * sizeof(*b2));
-  b2[len].byte1 = b2[len].byte2 = 0;
-  s2 = XChar2b_to_utf8 (b2, 0);
-  free (b2);
-  ret = draw_string (dpy, d, gc, x, y, s2, strlen(s2), GL_TRUE);
-  free (s2);
-  return ret;
-}
+    double edge_ab, edge_bc, edge_ac;
+    double angle_a, angle_b, angle_c;
+    double my_pi;
+    linked_point *b, *c;
 
+    b = a->next;
+    c = b->next;
+    my_pi = (double) M_PI;
 
-void
-Xutf8DrawString (Display *dpy, Drawable d, XFontSet set, GC gc,
-                 int x, int y, const char *str, int len)
-{
-  draw_string (dpy, d, gc, x, y, str, len, GL_TRUE);
+    edge_ab = compute_edge_length(a, b);
+    edge_bc = compute_edge_length(b, c);
+    edge_ac = compute_edge_length(a, c);
+    angle_a = get_angle(edge_bc, edge_ab, edge_ac);
+    angle_b = get_angle(edge_ac, edge_ab, edge_bc);
+    angle_c = get_angle(edge_ab, edge_ac, edge_bc);
+
+    return angle_a < my_pi && angle_b < my_pi && angle_c < my_pi;
 }
 
 
-int
-XDrawImageString (Display *dpy, Drawable d, GC gc, int x, int y,
-                  const char *str, int len)
+Bool is_three_point_loop(linked_point * head)
 {
-  int ascent, descent, dir;
-  XCharStruct cs;
-  XTextExtents (&gc->gcv.font->metrics, str, len,
-                &dir, &ascent, &descent, &cs);
-  jwxyz_fill_rect (dpy, d, gc,
-                   x + MIN (0, cs.lbearing),
-                   y - MAX (0, ascent),
-                   MAX (MAX (0, cs.rbearing) -
-                        MIN (0, cs.lbearing),
-                        cs.width),
-                   MAX (0, ascent) + MAX (0, descent),
-                   gc->gcv.background);
-  return XDrawString (dpy, d, gc, x, y, str, len);
+    return head->x == head->next->next->next->x
+        && head->y == head->next->next->next->y;
 }
 
 
-int
-XSetClipMask (Display *dpy, GC gc, Pixmap m)
+void traverse_points_list(linked_point * root)
 {
-//####  abort();
-/*
-  TODO
+    linked_point *head;
+    head = root;
 
-  Assert (!!gc->gcv.clip_mask == !!gc->clip_mask, "GC clip mask mixup");
+    while (!is_three_point_loop(head)) {
+        if (is_an_ear(head)) {
+            draw_three_vertices(head, True);
+        } else if (is_same_slope(head)) {
+            draw_three_vertices(head, False);
+        } else {
+            head = head->next;
+        }
+    }
 
-  if (gc->gcv.clip_mask) {
-    XFreePixmap (dpy, gc->gcv.clip_mask);
-    CGImageRelease (gc->clip_mask);
-  }
+    // handle final three vertices in polygon
+    if (is_an_ear(head)) {
+        draw_three_vertices(head, True);
+    } else if (is_same_slope(head)) {
+        draw_three_vertices(head, False);
+    } else {
+        free(head->next->next);
+        free(head->next);
+        free(head);
+        Assert (False, "traverse_points_list: unknown configuration");
+    }
 
-  gc->gcv.clip_mask = copy_pixmap (dpy, m);
-  if (gc->gcv.clip_mask)
-    gc->clip_mask =
-      CGBitmapContextCreateImage (gc->gcv.clip_mask->cgc);
-  else
-    gc->clip_mask = 0;
-*/
-  
-  return 0;
+    free(head->next);
+    free(head);
 }
 
-int
-XSetClipOrigin (Display *dpy, GC gc, int x, int y)
-{
-  gc->gcv.clip_x_origin = x;
-  gc->gcv.clip_y_origin = y;
-  return 0;
-}
+
 
 #endif /* JWXYZ_GL -- entire file */
index 7da705abcbe1cff7f67a944ccf4eae31c2e7af06..a849b2a9b919af56b26b7d380492b8e8db54e153 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2006-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2017 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
@@ -12,7 +12,9 @@
 /* This is the portable implementation of Xt timers and inputs, for libjwxyz.
  */
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #ifdef HAVE_JWXYZ /* whole file */
 
index 6b87102652ca440097bc667f4e2ce93faffd0e3c..adcd5e9d82632f0bfde8f2182a6861cca1bf8bda 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2017 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
@@ -46,7 +46,6 @@ typedef void * XPointer;
 typedef unsigned long Time;
 typedef unsigned int KeySym;
 typedef unsigned int KeyCode;
-typedef unsigned int VisualID;
 typedef unsigned long Atom; /* Must be as large as a char *. */
 
 typedef struct jwxyz_Display           Display;
@@ -93,6 +92,8 @@ typedef struct jwxyz_XtIntervalId *   XtIntervalId;
 typedef struct jwxyz_XtInputId *       XtInputId;
 typedef void *                         XtPointer;
 typedef unsigned long                  XtInputMask;
+typedef struct jwxyz_linked_point      linked_point;
+
 #define XtInputReadMask                        (1L<<0)
 #define XtInputWriteMask               (1L<<1)
 #define XtInputExceptMask              (1L<<2)
@@ -311,9 +312,6 @@ typedef unsigned long                       XtInputMask;
 #define XWidthMMOfScreen(s) (XDisplayWidthMM(DisplayOfScreen(s),0))
 #define XHeightMMOfScreen(s) (XDisplayHeightMM(DisplayOfScreen(s),0))
 
-#define ScreenCount(dpy) jwxyz_ScreenCount(dpy)
-extern int jwxyz_ScreenCount(Display *);
-
 extern Window XRootWindow (Display *, int screen);
 extern Screen *XDefaultScreenOfDisplay (Display *);
 extern Visual *XDefaultVisualOfScreen (Screen *);
@@ -430,6 +428,10 @@ extern int XDestroyImage (XImage *);
 extern int XPutImage (Display *, Drawable, GC, XImage *, 
                       int src_x, int src_y, int dest_x, int dest_y,
                       unsigned int w, unsigned int h);
+extern XImage *XGetSubImage (Display *dpy, Drawable d, int x, int y,
+                             unsigned int width, unsigned int height,
+                             unsigned long plane_mask, int format,
+                             XImage *dest_image, int dest_x, int dest_y);
 extern XImage *XGetImage (Display *, Drawable, int x, int y,
                           unsigned int w, unsigned int h,
                           unsigned long pm, int fmt);
@@ -437,7 +439,7 @@ extern Pixmap XCreatePixmapFromBitmapData (Display *, Drawable,
                                            const char *data,
                                            unsigned int w, unsigned int h,
                                            unsigned long fg,
-                                           unsigned int bg,
+                                           unsigned long bg,
                                            unsigned int depth);
 extern XPixmapFormatValues *XListPixmapFormats (Display *, int *count_ret);
 
@@ -479,7 +481,6 @@ extern int Xutf8TextExtents (XFontSet, const char *, int num_bytes,
                              XRectangle *overall_logical_return);
 extern void Xutf8DrawString (Display *, Drawable, XFontSet, GC,
                              int x, int y, const char *, int num_bytes);
-extern const char *jwxyz_nativeFontName (Font, float *size);
 
 extern Pixmap XCreatePixmap (Display *, Drawable,
                              unsigned int width, unsigned int height,
@@ -488,6 +489,15 @@ extern int XFreePixmap (Display *, Pixmap);
 
 extern char *XGetAtomName (Display *, Atom);
 
+extern void set_points_list(XPoint *points, int npoints, linked_point *root);
+extern void traverse_points_list(linked_point * root);
+extern void draw_three_vertices(linked_point * a, Bool triangle);
+extern double compute_edge_length(linked_point * a, linked_point * b);
+extern double get_angle(double a, double b, double c);
+extern Bool is_same_slope(linked_point * a);
+extern Bool is_an_ear(linked_point * a);
+extern Bool is_three_point_loop(linked_point * head);
+
 // Log()/Logv(), for debugging JWXYZ. Screenhacks should still use
 // fprintf(stderr, ...).
 extern void Log(const char *format, ...)
@@ -521,9 +531,13 @@ extern void glXMakeCurrent (Display *, Window, GLXContext);
 // also declared in utils/visual.h
 extern int has_writable_cells (Screen *, Visual *);
 extern int visual_depth (Screen *, Visual *);
+extern int visual_pixmap_depth (Screen *, Visual *);
 extern int visual_cells (Screen *, Visual *);
 extern int visual_class (Screen *, Visual *);
-extern int get_bits_per_pixel (Display *, int);
+extern void visual_rgb_masks (Screen *screen, Visual *visual,
+                              unsigned long *red_mask,
+                              unsigned long *green_mask,
+                              unsigned long *blue_mask);
 extern int screen_number (Screen *);
 
 // also declared in utils/grabclient.h
@@ -533,12 +547,11 @@ extern Bool use_subwindow_mode_p (Screen *, Window);
 extern void clear_gl_error (void);
 extern void check_gl_error (const char *type);
 
+// A Visual is supposed to be an opaque type, even though Xlib.h defines it.
+// Only utils/xft.c uses this, out of necessity.
 struct jwxyz_Visual {
-  VisualID visualid;   /* visual id of this visual */
   int class;           /* class of screen (monochrome, etc.) */
   unsigned long red_mask, green_mask, blue_mask;       /* mask values */
-  int bits_per_rgb;    /* log base 2 of distinct color values */
-//  int map_entries;   /* color map entries */
 };
 
 struct jwxyz_XGCValues {
index 23526cfc77a8ab12121d2dce0da2340b19200d64..109394f2022f0d75643e63011f9cb992583c8604 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1991-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1991-2017 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 NSMakeSize   CGSizeMake
 # define NSBezierPath UIBezierPath
 # define colorWithDeviceRed colorWithRed
-
-# define NSFontTraitMask      UIFontDescriptorSymbolicTraits
-// The values for the flags for NSFontTraitMask and
-// UIFontDescriptorSymbolicTraits match up, not that it really matters here.
-# define NSBoldFontMask       UIFontDescriptorTraitBold
-# define NSFixedPitchFontMask UIFontDescriptorTraitMonoSpace
-# define NSItalicFontMask     UIFontDescriptorTraitItalic
 #else
 # import <Cocoa/Cocoa.h>
 #endif
 
 #import <CoreText/CTFont.h>
 #import <CoreText/CTLine.h>
-#import <CoreText/CTRun.h>
 
 #import "jwxyzI.h"
 #import "jwxyz-cocoa.h"
 #import "utf8wc.h"
 #import "xft.h"
 
-# undef MAX
-# undef MIN
-# define MAX(a,b) ((a)>(b)?(a):(b))
-# define MIN(a,b) ((a)<(b)?(a):(b))
-
 
 struct jwxyz_Display {
   Window main_window;
   Screen *screen;
-  int screen_count;
   struct jwxyz_sources_data *timers_data;
 
 # ifndef USE_IPHONE
@@ -95,7 +81,6 @@ struct jwxyz_Screen {
   CGBitmapInfo bitmap_info;
   unsigned long black, white;
   Visual *visual;
-  int screen_number;
 };
 
 struct jwxyz_GC {
@@ -104,22 +89,6 @@ struct jwxyz_GC {
   CGImageRef clip_mask;  // CGImage copy of the Pixmap in gcv.clip_mask
 };
 
-struct jwxyz_Font {
-  Display *dpy;
-  char *ps_name;
-  NSFont *nsfont;
-  float size;   // points
-  char *xa_font;
-
-  // In X11, "Font" is just an ID, and "XFontStruct" contains the metrics.
-  // But we need the metrics on both of them, so they go here.
-  XFontStruct metrics;
-};
-
-struct jwxyz_XFontSet {
-  XFontStruct *font;
-};
-
 
 // 24/32bpp -> 32bpp image conversion.
 // Any of RGBA, BGRA, ABGR, or ARGB can be represented by a rotate of 0/8/16/24
@@ -362,26 +331,6 @@ query_color_float (Display *dpy, unsigned long pixel, float *rgba)
 }
 
 
-/* We keep a list of all of the Displays that have been created and not
-   yet freed so that they can have sensible display numbers.  If three
-   displays are created (0, 1, 2) and then #1 is closed, then the fourth
-   display will be given the now-unused display number 1. (Everything in
-   here assumes a 1:1 Display/Screen mapping.)
-
-   The size of this array is the most number of live displays at one time.
-   So if it's 20, then we'll blow up if the system has 19 monitors and also
-   has System Preferences open (the small preview window).
-
-   Note that xlockmore-style savers tend to allocate big structures, so
-   setting this to 1000 will waste a few megabytes.  Also some of them assume
-   that the number of screens never changes, so dynamically expanding this
-   array won't work.
- */
-# ifndef USE_IPHONE
-static Display *jwxyz_live_displays[20] = { 0, };
-# endif
-
-
 Display *
 jwxyz_make_display (Window w)
 {
@@ -391,24 +340,6 @@ jwxyz_make_display (Window w)
   d->screen = (Screen *) calloc (1, sizeof(Screen));
   d->screen->dpy = d;
   
-  d->screen_count = 1;
-  d->screen->screen_number = 0;
-# ifndef USE_IPHONE
-  {
-    // Find the first empty slot in live_displays and plug us in.
-    int size = sizeof(jwxyz_live_displays) / sizeof(*jwxyz_live_displays);
-    int i;
-    for (i = 0; i < size; i++) {
-      if (! jwxyz_live_displays[i])
-        break;
-    }
-    if (i >= size) abort();
-    jwxyz_live_displays[i] = d;
-    d->screen_count = size;
-    d->screen->screen_number = i;
-  }
-# endif // !USE_IPHONE
-
   d->screen->bitmap_info = CGBitmapContextGetBitmapInfo (cgc);
   d->screen->black = jwxyz_alloc_color (d, 0x0000, 0x0000, 0x0000, 0xFFFF);
   d->screen->white = jwxyz_alloc_color (d, 0xFFFF, 0xFFFF, 0xFFFF, 0xFFFF);
@@ -447,7 +378,6 @@ jwxyz_make_display (Window w)
           (byte_order == kCGBitmapByteOrder32Little ||
            byte_order == kCGBitmapByteOrder32Big),
           "invalid bits per channel");
-  v->bits_per_rgb = 8;
   d->screen->visual = v;
   
   d->timers_data = jwxyz_sources_init (XtDisplayToApplicationContext (d));
@@ -465,21 +395,6 @@ jwxyz_free_display (Display *dpy)
 {
   jwxyz_sources_free (dpy->timers_data);
   
-# ifndef USE_IPHONE
-  {
-    // Find us in live_displays and clear that slot.
-    int size = ScreenCount(dpy);
-    int i;
-    for (i = 0; i < size; i++) {
-      if (dpy == jwxyz_live_displays[i]) {
-        jwxyz_live_displays[i] = 0;
-        break;
-      }
-    }
-    if (i >= size) abort();
-  }
-# endif // !USE_IPHONE
-
   free (dpy->screen->visual);
   free (dpy->screen);
   free (dpy);
@@ -594,13 +509,7 @@ XDisplayNumberOfScreen (Screen *s)
 int
 XScreenNumberOfScreen (Screen *s)
 {
-  return s? s->screen_number : 0;
-}
-
-int
-jwxyz_ScreenCount (Display *dpy)
-{
-  return dpy ? dpy->screen_count : 0;
+  return 0;
 }
 
 unsigned long
@@ -1449,9 +1358,10 @@ XPutImage (Display *dpy, Drawable d, GC gc, XImage *ximage,
 
 
 XImage *
-XGetImage (Display *dpy, Drawable d, int x, int y,
-           unsigned int width, unsigned int height,
-           unsigned long plane_mask, int format)
+XGetSubImage (Display *dpy, Drawable d, int x, int y,
+              unsigned int width, unsigned int height,
+              unsigned long plane_mask, int format,
+              XImage *image, int dest_x, int dest_y)
 {
   const unsigned char *data = 0;
   size_t depth, ibpp, ibpl;
@@ -1477,9 +1387,6 @@ XGetImage (Display *dpy, Drawable d, int x, int y,
   data += (y * ibpl) + (x * (ibpp/8));
   
   format = (depth == 1 ? XYPixmap : ZPixmap);
-  XImage *image = XCreateImage (dpy, 0, (unsigned int) depth,
-                                format, 0, 0, width, height, 0, 0);
-  image->data = (char *) malloc (height * image->bytes_per_line);
   
   int obpl = image->bytes_per_line;
   
@@ -1504,13 +1411,14 @@ XGetImage (Display *dpy, Drawable d, int x, int y,
         unsigned char r = *iline2++;  // use    B  or  G  or  G  or  R
         if (ibpp == 32) iline2++;     // ignore A  or  R  or  B  or  A
 
-        XPutPixel (image, xx, yy, (r ? 1 : 0));
+        XPutPixel (image, xx + dest_x, yy + dest_y, (r ? 1 : 0));
       }
       iline += ibpl;
     }
   } else {
     const unsigned char *iline = data;
-    unsigned char *oline = (unsigned char *) image->data;
+    unsigned char *oline = (unsigned char *) image->data + dest_y * obpl +
+                             dest_x * 4;
 
     mode = convert_mode_merge (mode,
              convert_mode_invert (
@@ -1756,838 +1664,6 @@ copy_pixmap (Display *dpy, Pixmap p)
 }
 
 
-/* Font metric terminology, as used by X11:
-
-   "lbearing" is the distance from the logical origin to the leftmost pixel.
-   If a character's ink extends to the left of the origin, it is negative.
-
-   "rbearing" is the distance from the logical origin to the rightmost pixel.
-
-   "descent" is the distance from the logical origin to the bottommost pixel.
-   For characters with descenders, it is positive.  For superscripts, it
-   is negative.
-
-   "ascent" is the distance from the logical origin to the topmost pixel.
-   It is the number of pixels above the baseline.
-
-   "width" is the distance from the logical origin to the position where
-   the logical origin of the next character should be placed.
-
-   If "rbearing" is greater than "width", then this character overlaps the
-   following character.  If smaller, then there is trailing blank space.
- */
-static void
-utf8_metrics (Font fid, NSString *nsstr, XCharStruct *cs)
-{
-  // Returns the metrics of the multi-character, single-line UTF8 string.
-
-  NSFont *nsfont = fid->nsfont;
-  Drawable d = XRootWindow (fid->dpy, 0);
-
-  CGContextRef cgc = d->cgc;
-  NSDictionary *attr =
-    [NSDictionary dictionaryWithObjectsAndKeys:
-                    nsfont, NSFontAttributeName,
-                  nil];
-  NSAttributedString *astr = [[NSAttributedString alloc]
-                               initWithString:nsstr
-                                   attributes:attr];
-  CTLineRef ctline = CTLineCreateWithAttributedString (
-                       (__bridge CFAttributedStringRef) astr);
-  CGContextSetTextPosition (cgc, 0, 0);
-  CGContextSetShouldAntialias (cgc, True);  // #### Guess?
-
-  memset (cs, 0, sizeof(*cs));
-
-  // "CTRun represents set of consecutive glyphs sharing the same
-  // attributes and direction".
-  //
-  // We also get multiple runs any time font subsitution happens:
-  // E.g., if the current font is Verdana-Bold, a &larr; character
-  // in the NSString will actually be rendered in LucidaGrande-Bold.
-  //
-  int count = 0;
-  for (id runid in (NSArray *)CTLineGetGlyphRuns(ctline)) {
-    CTRunRef run = (CTRunRef) runid;
-    CFRange r = { 0, };
-    CGRect bbox = CTRunGetImageBounds (run, cgc, r);
-    CGFloat ascent, descent, leading;
-    CGFloat advancement =
-      CTRunGetTypographicBounds (run, r, &ascent, &descent, &leading);
-
-# ifndef USE_IPHONE
-    // Only necessary for when LCD smoothing is enabled, which iOS doesn't do.
-    bbox.origin.x    -= 2.0/3.0;
-    bbox.size.width  += 4.0/3.0;
-    bbox.size.height += 1.0/2.0;
-# endif
-
-    // Create the metrics for this run:
-    XCharStruct cc;
-    cc.ascent   = ceil  (bbox.origin.y + bbox.size.height);
-    cc.descent  = ceil (-bbox.origin.y);
-    cc.lbearing = floor (bbox.origin.x);
-    cc.rbearing = ceil  (bbox.origin.x + bbox.size.width);
-    cc.width    = floor (advancement + 0.5);
-
-    // Add those metrics into the cumulative metrics:
-    if (count == 0)
-      *cs = cc;
-    else
-      {
-        cs->ascent   = MAX (cs->ascent,     cc.ascent);
-        cs->descent  = MAX (cs->descent,    cc.descent);
-        cs->lbearing = MIN (cs->lbearing,   cs->width + cc.lbearing);
-        cs->rbearing = MAX (cs->rbearing,   cs->width + cc.rbearing);
-        cs->width    = MAX (cs->width,      cs->width + cc.width);
-      }
-
-    // Why no y? What about vertical text?
-    // XCharStruct doesn't encapsulate that but XGlyphInfo does.
-
-    count++;
-  }
-
-  [astr release];
-  CFRelease (ctline);
-}
-
-
-
-// This is XQueryFont, but for the XFontStruct embedded in 'Font'
-//
-static void
-query_font (Font fid)
-{
-  if (!fid || !fid->nsfont) {
-    Assert (0, "no NSFont in fid");
-    return;
-  }
-  if (![fid->nsfont fontName]) {
-    Assert(0, "broken NSFont in fid");
-    return;
-  }
-
-  int first = 32;
-  int last = 255;
-
-  XFontStruct *f = &fid->metrics;
-  XCharStruct *min = &f->min_bounds;
-  XCharStruct *max = &f->max_bounds;
-
-  f->fid               = fid;
-  f->min_char_or_byte2 = first;
-  f->max_char_or_byte2 = last;
-  f->default_char      = 'M';
-  f->ascent            =  ceil ([fid->nsfont ascender]);
-  f->descent           = -floor ([fid->nsfont descender]);
-
-  min->width    = 32767;  // set to smaller values in the loop
-  min->ascent   = 32767;
-  min->descent  = 32767;
-  min->lbearing = 32767;
-  min->rbearing = 32767;
-
-  f->per_char = (XCharStruct *) calloc (last-first+2, sizeof (XCharStruct));
-
-  for (int i = first; i <= last; i++) {
-    XCharStruct *cs = &f->per_char[i-first];
-
-    char s2[2];
-    s2[0] = i;
-    s2[1] = 0;
-    NSString *nsstr = [NSString stringWithCString:s2
-                               encoding:NSISOLatin1StringEncoding];
-    utf8_metrics (fid, nsstr, cs);
-
-    max->width    = MAX (max->width,    cs->width);
-    max->ascent   = MAX (max->ascent,   cs->ascent);
-    max->descent  = MAX (max->descent,  cs->descent);
-    max->lbearing = MAX (max->lbearing, cs->lbearing);
-    max->rbearing = MAX (max->rbearing, cs->rbearing);
-
-    min->width    = MIN (min->width,    cs->width);
-    min->ascent   = MIN (min->ascent,   cs->ascent);
-    min->descent  = MIN (min->descent,  cs->descent);
-    min->lbearing = MIN (min->lbearing, cs->lbearing);
-    min->rbearing = MIN (min->rbearing, cs->rbearing);
-
-# if 0
-    fprintf(stderr, " %3d %c: w=%3d lb=%3d rb=%3d as=%3d ds=%3d "
-                    " bb=%5.1f x %5.1f @ %5.1f %5.1f  adv=%5.1f %5.1f\n",
-            i, i, cs->width, cs->lbearing, cs->rbearing, 
-            cs->ascent, cs->descent,
-            bbox.size.width, bbox.size.height,
-            bbox.origin.x, bbox.origin.y,
-            advancement.width, advancement.height);
-# endif // 0
-  }
-}
-
-
-// Since 'Font' includes the metrics, this just makes a copy of that.
-//
-XFontStruct *
-XQueryFont (Display *dpy, Font fid)
-{
-  // copy XFontStruct
-  XFontStruct *f = (XFontStruct *) calloc (1, sizeof(*f));
-  *f = fid->metrics;
-
-  // build XFontProps
-  f->n_properties = 1;
-  f->properties = malloc (sizeof(*f->properties) * f->n_properties);
-  f->properties[0].name = XA_FONT;
-  Assert (sizeof (f->properties[0].card32) >= sizeof (char *),
-          "atoms probably needs a real implementation");
-  // If XInternAtom is ever implemented, use it here.
-  f->properties[0].card32 = (unsigned long)fid->xa_font;
-
-  // copy XCharStruct array
-  int size = (f->max_char_or_byte2 - f->min_char_or_byte2) + 1;
-  f->per_char = (XCharStruct *) calloc (size + 2, sizeof (XCharStruct));
-  memcpy (f->per_char, fid->metrics.per_char,
-          size * sizeof (XCharStruct));
-
-  return f;
-}
-
-
-static Font
-copy_font (Font fid)
-{
-  // copy 'Font' struct
-  Font fid2 = (Font) malloc (sizeof(*fid2));
-  *fid2 = *fid;
-
-  // copy XCharStruct array
-  int size = fid->metrics.max_char_or_byte2 - fid->metrics.min_char_or_byte2;
-  fid2->metrics.per_char = (XCharStruct *) 
-    malloc ((size + 2) * sizeof (XCharStruct));
-  memcpy (fid2->metrics.per_char, fid->metrics.per_char, 
-          size * sizeof (XCharStruct));
-
-  // copy the other pointers
-  fid2->ps_name = strdup (fid->ps_name);
-  fid2->xa_font = strdup (fid->xa_font);
-//  [fid2->nsfont retain];
-  fid2->metrics.fid = fid2;
-
-  return fid2;
-}
-
-
-static NSArray *
-font_family_members (NSString *family_name)
-{
-# ifndef USE_IPHONE
-  return [[NSFontManager sharedFontManager]
-          availableMembersOfFontFamily:family_name];
-# else
-  return [UIFont fontNamesForFamilyName:family_name];
-# endif
-}
-
-
-static NSString *
-default_font_family (NSFontTraitMask require)
-{
-  return require & NSFixedPitchFontMask ? @"Courier" : @"Verdana";
-}
-
-
-static NSFont *
-try_font (NSFontTraitMask traits, NSFontTraitMask mask,
-          NSString *family_name, float size,
-          char **name_ret)
-{
-  Assert (size > 0, "zero font size");
-
-  NSArray *family_members = font_family_members (family_name);
-  if (!family_members.count)
-    family_members = font_family_members (default_font_family (traits));
-
-# ifndef USE_IPHONE
-  for (unsigned k = 0; k != family_members.count; ++k) {
-
-    NSArray *member = [family_members objectAtIndex:k];
-    NSFontTraitMask font_mask =
-    [(NSNumber *)[member objectAtIndex:3] unsignedIntValue];
-
-    if ((font_mask & mask) == traits) {
-
-      NSString *name = [member objectAtIndex:0];
-      NSFont *f = [NSFont fontWithName:name size:size];
-      if (!f)
-        break;
-
-      /* Don't use this font if it (probably) doesn't include ASCII characters.
-       */
-      NSStringEncoding enc = [f mostCompatibleStringEncoding];
-      if (! (enc == NSUTF8StringEncoding ||
-             enc == NSISOLatin1StringEncoding ||
-             enc == NSNonLossyASCIIStringEncoding ||
-             enc == NSISOLatin2StringEncoding ||
-             enc == NSUnicodeStringEncoding ||
-             enc == NSWindowsCP1250StringEncoding ||
-             enc == NSWindowsCP1252StringEncoding ||
-             enc == NSMacOSRomanStringEncoding)) {
-        // NSLog(@"skipping \"%@\": encoding = %d", name, enc);
-        break;
-      }
-      // NSLog(@"using \"%@\": %d", name, enc);
-
-      // *name_ret = strdup ([name cStringUsingEncoding:NSUTF8StringEncoding]);
-      *name_ret = strdup (name.UTF8String);
-      return f;
-    }
-  }
-# else // USE_IPHONE
-
-  // This trick needs iOS 3.1, see "Using SDK-Based Development".
-  Class has_font_descriptor = [UIFontDescriptor class];
-
-  for (NSString *fn in family_members) {
-# define MATCH(X) \
-         ([fn rangeOfString:X options:NSCaseInsensitiveSearch].location \
-         != NSNotFound)
-
-    NSFontTraitMask font_mask;
-    if (has_font_descriptor) {
-      // This only works on iOS 7 and later.
-      font_mask = [[UIFontDescriptor
-                    fontDescriptorWithFontAttributes:
-                    @{UIFontDescriptorNameAttribute:fn}]
-                   symbolicTraits];
-    } else {
-      font_mask = 0;
-      if (MATCH(@"Bold"))
-        font_mask |= NSBoldFontMask;
-      if (MATCH(@"Italic") || MATCH(@"Oblique"))
-        font_mask |= NSItalicFontMask;
-      if (MATCH(@"Courier"))
-        font_mask |= NSFixedPitchFontMask;
-    }
-
-    if ((font_mask & mask) == traits) {
-
-      /* Check if it can do ASCII.  No good way to accomplish this!
-         These are fonts present in iPhone Simulator as of June 2012
-         that don't include ASCII.
-       */
-      if (MATCH(@"AppleGothic") ||     // Korean
-          MATCH(@"Dingbats") ||                // Dingbats
-          MATCH(@"Emoji") ||           // Emoticons
-          MATCH(@"Geeza") ||           // Arabic
-          MATCH(@"Hebrew") ||          // Hebrew
-          MATCH(@"HiraKaku") ||                // Japanese
-          MATCH(@"HiraMin") ||         // Japanese
-          MATCH(@"Kailasa") ||         // Tibetan
-          MATCH(@"Ornaments") ||       // Dingbats
-          MATCH(@"STHeiti")            // Chinese
-       )
-         break;
-
-      *name_ret = strdup (fn.UTF8String);
-      return [UIFont fontWithName:fn size:size];
-    }
-# undef MATCH
-  }
-
-# endif
-
-  return NULL;
-}
-
-
-/* On Cocoa and iOS, fonts may be specified as "Georgia Bold 24" instead
-   of XLFD strings; also they can be comma-separated strings with multiple
-   font names.  First one that exists wins.
- */
-static NSFont *
-try_native_font (const char *name, float scale,
-                 char **name_ret, float *size_ret, char **xa_font)
-{
-  if (!name) return 0;
-  const char *spc = strrchr (name, ' ');
-  if (!spc) return 0;
-
-  NSFont *f = 0;
-  char *token = strdup (name);
-  char *otoken = token;
-  char *name2;
-  char *lasts;
-
-  while ((name2 = strtok_r (token, ",", &lasts))) {
-    token = 0;
-
-    while (*name2 == ' ' || *name2 == '\t' || *name2 == '\n')
-      name2++;
-
-    spc = strrchr (name2, ' ');
-    if (!spc) continue;
-
-    int dsize = 0;
-    if (1 != sscanf (spc, " %d ", &dsize))
-      continue;
-    float size = dsize;
-
-    if (size < 4) continue;
-
-    size *= scale;
-
-    name2[strlen(name2) - strlen(spc)] = 0;
-
-    NSString *nsname = [NSString stringWithCString:name2
-                                          encoding:NSUTF8StringEncoding];
-    f = [NSFont fontWithName:nsname size:size];
-    if (f) {
-      *name_ret = strdup (name2);
-      *size_ret = size;
-      *xa_font = strdup (name); // Maybe this should be an XLFD?
-      break;
-    } else {
-      NSLog(@"No native font: \"%@\" %.0f", nsname, size);
-# if 0
-      for (NSString *fam in [UIFont familyNames]) {
-        NSLog(@"Family: %@", fam);
-        for (NSString *f in [UIFont fontNamesForFamilyName:fam]) {
-          NSLog(@"  Font: %@", f);
-        }
-      }
-# endif
-    }
-  }
-
-  free (otoken);
-  return f;
-}
-
-
-/* Returns a random font in the given size and face.
- */
-static NSFont *
-random_font (NSFontTraitMask traits, NSFontTraitMask mask,
-             float size, NSString **family_ret, char **name_ret)
-{
-
-# ifndef USE_IPHONE
-  // Providing Unbold or Unitalic in the mask for availableFontNamesWithTraits
-  // returns an empty list, at least on a system with default fonts only.
-  NSArray *families = [[NSFontManager sharedFontManager]
-                       availableFontFamilies];
-  if (!families) return 0;
-# else
-  NSArray *families = [UIFont familyNames];
-
-  // There are many dups in the families array -- uniquify it.
-  {
-    NSArray *sorted_families =
-    [families sortedArrayUsingSelector:@selector(compare:)];
-    NSMutableArray *new_families =
-    [NSMutableArray arrayWithCapacity:sorted_families.count];
-
-    NSString *prev_family = @"";
-    for (NSString *family in sorted_families) {
-      if ([family compare:prev_family])
-        [new_families addObject:family];
-      prev_family = family;
-    }
-
-    families = new_families;
-  }
-# endif // USE_IPHONE
-
-  long n = [families count];
-  if (n <= 0) return 0;
-
-  int j;
-  for (j = 0; j < n; j++) {
-    int i = random() % n;
-    NSString *family_name = [families objectAtIndex:i];
-
-    NSFont *result = try_font (traits, mask, family_name, size, name_ret);
-    if (result) {
-      [*family_ret release];
-      *family_ret = family_name;
-      [*family_ret retain];
-      return result;
-    }
-  }
-
-  // None of the fonts support ASCII?
-  return 0;
-}
-
-
-static const char *
-xlfd_field_end (const char *s)
-{
-  const char *s2 = strchr(s, '-');
-  if (!s2)
-    s2 = s + strlen(s);
-  return s2;
-}
-
-
-static size_t
-xlfd_next (const char **s, const char **s2)
-{
-  if (!**s2) {
-    *s = *s2;
-  } else {
-    Assert (**s2 == '-', "xlfd parse error");
-    *s = *s2 + 1;
-    *s2 = xlfd_field_end (*s);
-  }
-
-  return *s2 - *s;
-}
-
-
-static NSFont *
-try_xlfd_font (Display *dpy, const char *name, float scale,
-               char **name_ret, float *size_ret, char **xa_font)
-{
-  NSFont *nsfont = 0;
-  NSString *family_name = nil;
-  NSFontTraitMask require = 0,
-   // Default mask is for the built-in X11 font aliases.
-   mask = NSFixedPitchFontMask | NSBoldFontMask | NSItalicFontMask;
-  BOOL rand  = NO;
-  float size = 12; /* In points (1/72 in.) */
-  char *ps_name = 0;
-
-  const char *s = (name ? name : "");
-
-  size_t L = strlen (s);
-# define CMP(STR) (L == strlen(STR) && !strncasecmp (s, (STR), L))
-# define UNSPEC   (L == 0 || L == 1 && *s == '*')
-  if      (CMP ("6x10"))     size = 8,  require |= NSFixedPitchFontMask;
-  else if (CMP ("6x10bold")) size = 8,  require |= NSFixedPitchFontMask | NSBoldFontMask;
-  else if (CMP ("fixed"))    size = 12, require |= NSFixedPitchFontMask;
-  else if (CMP ("9x15"))     size = 12, require |= NSFixedPitchFontMask;
-  else if (CMP ("9x15bold")) size = 12, require |= NSFixedPitchFontMask | NSBoldFontMask;
-  else if (CMP ("vga"))      size = 12, require |= NSFixedPitchFontMask;
-  else if (CMP ("console"))  size = 12, require |= NSFixedPitchFontMask;
-  else if (CMP ("gallant"))  size = 12, require |= NSFixedPitchFontMask;
-  else {
-
-    NSFontTraitMask forbid = 0;
-
-    // Incorrect fields are ignored.
-
-    if (*s == '-')
-      ++s;
-    const char *s2 = xlfd_field_end(s);
-
-    // Foundry (ignore)
-
-    L = xlfd_next (&s, &s2); // Family name
-    // This used to substitute Georgia for Times. Now it doesn't.
-    if (CMP ("random")) {
-      rand = YES;
-    } else if (CMP ("fixed")) {
-      require |= NSFixedPitchFontMask;
-      family_name = @"Courier";
-    } else if (!UNSPEC) {
-      family_name = [[[NSString alloc] initWithBytes:s
-                                              length:L
-                                            encoding:NSUTF8StringEncoding]
-                     autorelease];
-    }
-
-    L = xlfd_next (&s, &s2); // Weight name
-    if (CMP ("bold") || CMP ("demibold"))
-      require |= NSBoldFontMask;
-    else if (CMP ("medium") || CMP ("regular"))
-      forbid |= NSBoldFontMask;
-
-    L = xlfd_next (&s, &s2); // Slant
-    if (CMP ("i") || CMP ("o"))
-      require |= NSItalicFontMask;
-    else if (CMP ("r"))
-      forbid |= NSItalicFontMask;
-
-    xlfd_next (&s, &s2); // Set width name (ignore)
-    xlfd_next (&s, &s2); // Add style name (ignore)
-
-    L = xlfd_next (&s, &s2); // Pixel size (ignore)
-    char *s3;
-    uintmax_t pxsize = strtoumax(s, &s3, 10);
-    if (UNSPEC || s2 != s3)
-      pxsize = UINTMAX_MAX; // i.e. it's invalid.
-
-    L = xlfd_next (&s, &s2); // Point size
-    uintmax_t ptsize = strtoumax(s, &s3, 10);
-    if (UNSPEC || s2 != s3)
-      ptsize = UINTMAX_MAX;
-
-    xlfd_next (&s, &s2); // Resolution X (ignore)
-    xlfd_next (&s, &s2); // Resolution Y (ignore)
-
-    L = xlfd_next (&s, &s2); // Spacing
-    if (CMP ("p"))
-      forbid |= NSFixedPitchFontMask;
-    else if (CMP ("m") || CMP ("c"))
-      require |= NSFixedPitchFontMask;
-
-    xlfd_next (&s, &s2); // Average width (ignore)
-
-    // -*-courier-bold-r-*-*-14-*-*-*-*-*-*-*         14 px
-    // -*-courier-bold-r-*-*-*-140-*-*-m-*-*-*        14 pt
-    // -*-courier-bold-r-*-*-140-*                    14 pt, via wildcard
-    // -*-courier-bold-r-*-140-*                      14 pt, not handled
-    // -*-courier-bold-r-*-*-14-180-*-*-*-*-*-*       error
-
-    L = xlfd_next (&s, &s2); // Charset registry
-    if (ptsize != UINTMAX_MAX) {
-      // It was in the ptsize field, so that's definitely what it is.
-      size = ptsize / 10.0;
-    } else if (pxsize != UINTMAX_MAX) {
-      size = pxsize;
-      // If it's a fully qualified XLFD, then this really is the pxsize.
-      // Otherwise, this is probably point size with a multi-field wildcard.
-      if (L == 0)
-        size /= 10.0;
-    }
-
-    mask = require | forbid;
-  }
-# undef CMP
-# undef UNSPEC
-
-  if (!family_name && !rand)
-    family_name = default_font_family (require);
-
-  if (size < 6 || size > 1000)
-    size = 12;
-
-  size *= scale;
-
-  if (rand) {
-    nsfont   = random_font (require, mask, size, &family_name, &ps_name);
-    [family_name autorelease];
-  }
-
-  if (!nsfont)
-    nsfont   = try_font (require, mask, family_name, size, &ps_name);
-
-  // if that didn't work, turn off attibutes until it does
-  // (e.g., there is no "Monaco-Bold".)
-  //
-  if (!nsfont && (mask & NSItalicFontMask)) {
-    require &= ~NSItalicFontMask;
-    mask &= ~NSItalicFontMask;
-    nsfont = try_font (require, mask, family_name, size, &ps_name);
-  }
-  if (!nsfont && (mask & NSBoldFontMask)) {
-    require &= ~NSBoldFontMask;
-    mask &= ~NSBoldFontMask;
-    nsfont = try_font (require, mask, family_name, size, &ps_name);
-  }
-  if (!nsfont && (mask & NSFixedPitchFontMask)) {
-    require &= ~NSFixedPitchFontMask;
-    mask &= ~NSFixedPitchFontMask;
-    nsfont = try_font (require, mask, family_name, size, &ps_name);
-  }
-
-  if (nsfont) {
-    unsigned dpi_d = XDisplayHeightMM (dpy,0) * 10 / 2;
-    unsigned dpi = (254 * XDisplayHeight (dpy,0) + dpi_d) / (2 * dpi_d);
-    *name_ret = ps_name;
-    *size_ret = size;
-    float actual_size = size / scale;
-    asprintf(xa_font, "-*-%s-%s-%c-*-*-%u-%u-%u-%u-%c-0-iso10646-1",
-             family_name.UTF8String,
-             (require & NSBoldFontMask) ? "bold" : "medium",
-             (require & NSItalicFontMask) ? 'o' : 'r',
-             (unsigned)(dpi * actual_size / 72.27 + 0.5),
-             (unsigned)(actual_size * 10 + 0.5), dpi, dpi,
-             (require & NSFixedPitchFontMask) ? 'm' : 'p');
-    return nsfont;
-  } else {
-    if (ps_name) free (ps_name);
-    return 0;
-  }
-}
-
-
-Font
-XLoadFont (Display *dpy, const char *name)
-{
-  Font fid = (Font) calloc (1, sizeof(*fid));
-
-  float scale = 1;
-
-# ifdef USE_IPHONE
-  /* Since iOS screens are physically smaller than desktop screens, scale up
-     the fonts to make them more readable.
-
-     Note that X11 apps on iOS also have the backbuffer sized in points
-     instead of pixels, resulting in an effective X11 screen size of 768x1024
-     or so, even if the display has significantly higher resolution.  That is
-     unrelated to this hack, which is really about DPI.
-   */
-  scale = dpy->main_window->window.view.hackedContentScaleFactor;
-  if (scale < 1) // iPad Pro magnifies the backbuffer by 3x, which makes text
-    scale = 1;   // excessively blurry in BSOD.
-# endif
-
-  fid->dpy = dpy;
-  fid->nsfont = try_native_font (name, scale, &fid->ps_name, &fid->size,
-                                 &fid->xa_font);
-
-  if (!fid->nsfont && name &&
-      strchr (name, ' ') &&
-      !strchr (name, '*')) {
-    // If name contains a space but no stars, it is a native font spec --
-    // return NULL so that we know it really didn't exist.  Else, it is an
-    //  XLFD font, so keep trying.
-    XUnloadFont (dpy, fid);
-    return 0;
-  }
-
-  if (! fid->nsfont)
-    fid->nsfont = try_xlfd_font (dpy, name, scale, &fid->ps_name, &fid->size,
-                                 &fid->xa_font);
-
-  // We should never return NULL for XLFD fonts.
-  if (!fid->nsfont) {
-    Assert (0, "no font");
-    return 0;
-  }
-  CFRetain (fid->nsfont);   // needed for garbage collection?
-
-  //NSLog(@"parsed \"%s\" to %s %.1f", name, fid->ps_name, fid->size);
-
-  query_font (fid);
-
-  return fid;
-}
-
-
-XFontStruct *
-XLoadQueryFont (Display *dpy, const char *name)
-{
-  Font fid = XLoadFont (dpy, name);
-  if (!fid) return 0;
-  return XQueryFont (dpy, fid);
-}
-
-int
-XUnloadFont (Display *dpy, Font fid)
-{
-  if (fid->ps_name)
-    free (fid->ps_name);
-  if (fid->metrics.per_char)
-    free (fid->metrics.per_char);
-
-  // #### 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];
-  //  CFRelease (fid->nsfont);
-
-  free (fid);
-  return 0;
-}
-
-int
-XFreeFontInfo (char **names, XFontStruct *info, int n)
-{
-  int i;
-  if (names) {
-    for (i = 0; i < n; i++)
-      if (names[i]) free (names[i]);
-    free (names);
-  }
-  if (info) {
-    for (i = 0; i < n; i++)
-      if (info[i].per_char) {
-        free (info[i].per_char);
-        free (info[i].properties);
-      }
-    free (info);
-  }
-  return 0;
-}
-
-int
-XFreeFont (Display *dpy, XFontStruct *f)
-{
-  Font fid = f->fid;
-  XFreeFontInfo (0, f, 1);
-  XUnloadFont (dpy, fid);
-  return 0;
-}
-
-
-int
-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];
-  CFRetain (gc->gcv.font->nsfont);   // needed for garbage collection?
-  return 0;
-}
-
-
-XFontSet
-XCreateFontSet (Display *dpy, char *name, 
-                char ***missing_charset_list_return,
-                int *missing_charset_count_return,
-                char **def_string_return)
-{
-  char *name2 = strdup (name);
-  char *s = strchr (name, ',');
-  if (s) *s = 0;
-  XFontSet set = 0;
-  XFontStruct *f = XLoadQueryFont (dpy, name2);
-  if (f)
-    {
-      set = (XFontSet) calloc (1, sizeof(*set));
-      set->font = f;
-    }
-  free (name2);
-  if (missing_charset_list_return)  *missing_charset_list_return = 0;
-  if (missing_charset_count_return) *missing_charset_count_return = 0;
-  if (def_string_return) *def_string_return = 0;
-  return set;
-}
-
-
-void
-XFreeFontSet (Display *dpy, XFontSet set)
-{
-  XFreeFont (dpy, set->font);
-  free (set);
-}
-
-
-const char *
-jwxyz_nativeFontName (Font f, float *size)
-{
-  if (size) *size = f->size;
-  return f->ps_name;
-}
-
-
-void
-XFreeStringList (char **list)
-{
-  int i;
-  if (!list) return;
-  for (i = 0; list[i]; i++)
-    XFree (list[i]);
-  XFree (list);
-}
-
-
 // Returns the verbose Unicode name of this character, like "agrave" or
 // "daggerdouble".  Used by fontglide debugMetrics.
 //
@@ -2595,9 +1671,10 @@ char *
 jwxyz_unicode_character_name (Display *dpy, Font fid, unsigned long uc)
 {
   char *ret = 0;
+  NSFont *nsfont = (NSFont *) jwxyz_native_font (fid);
   CTFontRef ctfont =
-    CTFontCreateWithName ((CFStringRef) [fid->nsfont fontName],
-                          [fid->nsfont pointSize],
+    CTFontCreateWithName ((CFStringRef) [nsfont fontName],
+                          [nsfont pointSize],
                           NULL);
   Assert (ctfont, "no CTFontRef for UIFont");
 
@@ -2615,153 +1692,12 @@ jwxyz_unicode_character_name (Display *dpy, Font fid, unsigned long uc)
 }
 
 
-// Given a UTF8 string, return an NSString.  Bogus UTF8 characters are ignored.
-// We have to do this because stringWithCString returns NULL if there are
-// any invalid characters at all.
-//
-static NSString *
-sanitize_utf8 (const char *in, int in_len, Bool *latin1_pP)
-{
-  int out_len = in_len * 4;   // length of string might increase
-  char *s2 = (char *) malloc (out_len);
-  char *out = s2;
-  const char *in_end  = in  + in_len;
-  const char *out_end = out + out_len;
-  Bool latin1_p = True;
-
-  while (in < in_end)
-    {
-      unsigned long uc;
-      long L1 = utf8_decode ((const unsigned char *) in, in_end - in, &uc);
-      long L2 = utf8_encode (uc, out, out_end - out);
-      in  += L1;
-      out += L2;
-      if (uc > 255) latin1_p = False;
-    }
-  *out = 0;
-  NSString *nsstr =
-    [NSString stringWithCString:s2 encoding:NSUTF8StringEncoding];
-  free (s2);
-  if (latin1_pP) *latin1_pP = latin1_p;
-  return (nsstr ? nsstr : @"");
-}
-
-
 int
-XTextExtents (XFontStruct *f, const char *s, int length,
-              int *dir_ret, int *ascent_ret, int *descent_ret,
-              XCharStruct *cs)
+jwxyz_draw_string (Display *dpy, Drawable d, GC gc, int x, int y,
+                   const char *str, size_t len, int utf8_p)
 {
-  // Unfortunately, adding XCharStructs together to get the extents for a
-  // string doesn't work: Cocoa uses non-integral character advancements, but
-  // XCharStruct.width is an integer. Plus that doesn't take into account
-  // kerning pairs, alternate glyphs, and fun stuff like the word "Zapfino" in
-  // Zapfino.
-
-  NSString *nsstr = [[[NSString alloc] initWithBytes:s
-                                              length:length
-                                            encoding:NSISOLatin1StringEncoding]
-                     autorelease];
-  utf8_metrics (f->fid, nsstr, cs);
-  *dir_ret = 0;
-  *ascent_ret  = f->ascent;
-  *descent_ret = f->descent;
-  return 0;
-}
-
-int
-XTextWidth (XFontStruct *f, const char *s, int length)
-{
-  int ascent, descent, dir;
-  XCharStruct cs;
-  XTextExtents (f, s, length, &dir, &ascent, &descent, &cs);
-  return cs.width;
-}
+  NSString *nsstr = nsstring_from (str, len, utf8_p);
 
-
-int
-XTextExtents16 (XFontStruct *f, const XChar2b *s, int length,
-                int *dir_ret, int *ascent_ret, int *descent_ret,
-                XCharStruct *cs)
-{
-  // Bool latin1_p = True;
-  int i, utf8_len = 0;
-  char *utf8 = XChar2b_to_utf8 (s, &utf8_len);   // already sanitized
-
-  for (i = 0; i < length; i++)
-    if (s[i].byte1 > 0) {
-      // latin1_p = False;
-      break;
-    }
-
-  {
-    NSString *nsstr = [NSString stringWithCString:utf8
-                                encoding:NSUTF8StringEncoding];
-    utf8_metrics (f->fid, nsstr, cs);
-  }
-
-  *dir_ret = 0;
-  *ascent_ret  = f->ascent;
-  *descent_ret = f->descent;
-  free (utf8);
-  return 0;
-}
-
-
-/* "Returns the distance in pixels in the primary draw direction from
-   the drawing origin to the origin of the next character to be drawn."
-
-   "overall_ink_return is set to the bbox of the string's character ink."
-
-   "The overall_ink_return for a nondescending, horizontally drawn Latin
-   character is conventionally entirely above the baseline; that is,
-   overall_ink_return.height <= -overall_ink_return.y."
-
-     [So this means that y is the top of the ink, and height grows down:
-      For above-the-baseline characters, y is negative.]
-
-   "The overall_ink_return for a nonkerned character is entirely at, and to
-   the right of, the origin; that is, overall_ink_return.x >= 0."
-
-     [So this means that x is the left of the ink, and width grows right.
-      For left-of-the-origin characters, x is negative.]
-
-   "A character consisting of a single pixel at the origin would set
-   overall_ink_return fields y = 0, x = 0, width = 1, and height = 1."
- */
-int
-Xutf8TextExtents (XFontSet set, const char *str, int len,
-                  XRectangle *overall_ink_return,
-                  XRectangle *overall_logical_return)
-{
-  Bool latin1_p;
-  NSString *nsstr = sanitize_utf8 (str, len, &latin1_p);
-  XCharStruct cs;
-
-  utf8_metrics (set->font->fid, nsstr, &cs);
-
-  /* "The overall_logical_return is the bounding box that provides minimum
-     spacing to other graphical features for the string. Other graphical
-     features, for example, a border surrounding the text, should not
-     intersect this rectangle."
-
-     So I think that means they're the same?  Or maybe "ink" is the bounding
-     box, and "logical" is the advancement?  But then why is the return value
-     the advancement?
-   */
-  if (overall_ink_return)
-    XCharStruct_to_XmbRectangle (cs, *overall_ink_return);
-  if (overall_logical_return)
-    XCharStruct_to_XmbRectangle (cs, *overall_logical_return);
-
-  return cs.width;
-}
-
-
-static int
-draw_string (Display *dpy, Drawable d, GC gc, int x, int y,
-             NSString *nsstr)
-{
   if (! nsstr) return 1;
 
   XRectangle wr = d->frame;
@@ -2790,7 +1726,7 @@ draw_string (Display *dpy, Drawable d, GC gc, int x, int y,
 
   NSDictionary *attr =
     [NSDictionary dictionaryWithObjectsAndKeys:
-                    gc->gcv.font->nsfont, NSFontAttributeName,
+                    (NSFont *) jwxyz_native_font (gc->gcv.font), NSFontAttributeName,
                     fg, NSForegroundColorAttributeName,
                   nil];
 
@@ -2831,67 +1767,6 @@ draw_string (Display *dpy, Drawable d, GC gc, int x, int y,
 }
 
 
-int
-XDrawString (Display *dpy, Drawable d, GC gc, int x, int y,
-             const char  *str, int len)
-{
-  char *s2 = (char *) malloc (len + 1);
-  strncpy (s2, str, len);
-  s2[len] = 0;
-  NSString *nsstr = [NSString stringWithCString:s2
-                                       encoding:NSISOLatin1StringEncoding];
-  int ret = draw_string (dpy, d, gc, x, y, nsstr);
-  free (s2);
-  return ret;
-}
-
-
-int
-XDrawString16 (Display *dpy, Drawable d, GC gc, int x, int y,
-             const XChar2b *str, int len)
-{
-  char *s2 = XChar2b_to_utf8 (str, 0);   // already sanitized
-  NSString *nsstr =
-    [NSString stringWithCString:s2 encoding:NSUTF8StringEncoding];
-  int ret = draw_string (dpy, d, gc, x, y, nsstr);
-  free (s2);
-  return ret;
-}
-
-
-void
-Xutf8DrawString (Display *dpy, Drawable d, XFontSet set, GC gc,
-                 int x, int y, const char *str, int len)
-{
-  char *s2 = (char *) malloc (len + 1);
-  strncpy (s2, str, len);
-  s2[len] = 0;
-  NSString *nsstr = sanitize_utf8 (str, len, 0);
-  draw_string (dpy, d, gc, x, y, nsstr);
-  free (s2);
-}
-
-
-int
-XDrawImageString (Display *dpy, Drawable d, GC gc, int x, int y,
-                  const char *str, int len)
-{
-  int ascent, descent, dir;
-  XCharStruct cs;
-  XTextExtents (&gc->gcv.font->metrics, str, len,
-                &dir, &ascent, &descent, &cs);
-  jwxyz_fill_rect (dpy, d, gc,
-                   x + MIN (0, cs.lbearing),
-                   y - MAX (0, ascent),
-                   MAX (MAX (0, cs.rbearing) -
-                        MIN (0, cs.lbearing),
-                        cs.width),
-                   MAX (0, ascent) + MAX (0, descent),
-                   gc->gcv.background);
-  return XDrawString (dpy, d, gc, x, y, str, len);
-}
-
-
 int
 XSetClipMask (Display *dpy, GC gc, Pixmap m)
 {
index 61b654f37eee6a8b0857984599664f0ad4ab97aa..f82d6148a857a816bf688cbbc7fe4656cddd1bb4 100644 (file)
 
 #define Assert(C, ...) do { if (!(C)) jwxyz_abort (__VA_ARGS__); } while(0)
 
-/* OSX/jwxyz.m, utils/jwxyz-gl.c */
+#undef MAX
+#undef MIN
+#define MAX(a,b) ((a)>(b)?(a):(b))
+#define MIN(a,b) ((a)<(b)?(a):(b))
+
+#define JWXYZ_FONT_FAMILY       0 /* i.e. -[NSFont familyName] via XLFD */
+#define JWXYZ_FONT_FACE         1 /*      -[NSFont fontName]   via native */
+#define JWXYZ_FONT_RANDOM       2
+
+#define JWXYZ_STYLE_BOLD        1
+#define JWXYZ_STYLE_ITALIC      2
+#define JWXYZ_STYLE_MONOSPACE   4
+
+/* jwxyz.m, jwxyz-gl.c */
 extern Display *jwxyz_make_display (Window w);
 extern void jwxyz_free_display (Display *);
 extern void jwxyz_window_resized (Display *);
@@ -36,10 +49,30 @@ extern void jwxyz_fill_rects (Display *dpy, Drawable d, GC gc,
                               unsigned long pixel);
 extern XGCValues *jwxyz_gc_gcv (GC gc);
 extern unsigned int jwxyz_gc_depth (GC gc);
+extern int jwxyz_draw_string (Display *dpy, Drawable d, GC gc, int x, int y,
+                              const char *str, size_t len, Bool utf8);
 
-/* OSX/jwxyz-cocoa.m, android/jwxyz-android.c */
+/* jwxyz-cocoa.m, jwxyz-android.c */
 extern const XRectangle *jwxyz_frame (Drawable d); /* XGetGeometry sux. */
 extern unsigned int jwxyz_drawable_depth (Drawable d);
+
+/* 'scale' is pixels per point, with 72 points per inch. This matches the
+   meaning of -[UIView contentScaleFactor] on iOS.
+ */
+extern float jwxyz_scale (Window main_window);
+
+extern const char *jwxyz_default_font_family (int require);
+extern void *jwxyz_load_native_font (Window main_window,
+                                     int traits_jwxyz, int mask_jwxyz,
+                                     const char *font_name_ptr,
+                                     size_t font_name_length,
+                                     int font_name_type, float size,
+                                     char **family_name_ret,
+                                     int *ascent_ret, int *descent_ret);
+extern void jwxyz_release_native_font (Display *, void *native_font);
+extern void jwxyz_render_text (Display *, void *native_font,
+                               const char *str, size_t len, int utf8_p,
+                               XCharStruct *cs_ret, char **pixmap_ret);
 extern void jwxyz_get_pos (Window w, XPoint *vpos, XPoint *p);
 extern void jwxyz_copy_area (Display *dpy, Drawable src, Drawable dst, GC gc,
                              int src_x, int src_y,
@@ -50,7 +83,7 @@ extern double current_device_rotation (void);
 extern Bool ignore_rotation_p (Display *);
 #endif
 
-/* utils/jwxyz-common.c */
+/* jwxyz-common.c */
 extern void jwxyz_validate_pixel (Display *dpy, unsigned long pixel,
                                   unsigned int depth, Bool alpha_allowed_p);
 extern Bool jwxyz_dumb_drawing_mode(Display *dpy, Drawable d, GC gc,
@@ -61,6 +94,7 @@ extern void jwxyz_fill_rect (Display *, Drawable, GC,
                              unsigned int width, unsigned int height,
                              unsigned long pixel);
 extern void jwxyz_gcv_defaults (Display *dpy, XGCValues *gcv, int depth);
+extern void *jwxyz_native_font (Font f);
 
 # if defined JWXYZ_QUARTZ
 
@@ -90,6 +124,16 @@ extern CGPoint map_point (Drawable d, int x, int y);
 
 # elif defined JWXYZ_GL
 
+#  if defined(USE_IPHONE)
+#   include <OpenGLES/ES1/gl.h>
+#  elif defined(HAVE_COCOA)
+#   include <OpenGL/gl.h>
+#  elif defined(HAVE_ANDROID)
+#   include <GLES/gl.h>
+#  else
+#   include <GL/gl.h>
+#  endif
+
 /* utils/jwxyz-gl.c */
 extern void jwxyz_prepare_context (Display *dpy);
 extern void jwxyz_set_matrices (Display *dpy, unsigned width, unsigned height,
@@ -100,12 +144,22 @@ extern void jwxyz_set_matrices (Display *dpy, unsigned width, unsigned height,
    also work with FBOs and one context for everything. Surprisingly slow and
    unreliable.
  */
-extern void jwxyz_gl_copy_area_copy_tex_image (Display *dpy, Drawable src,
-                                               Drawable dst, GC gc,
+extern void jwxyz_gl_copy_area_read_tex_image (Display *dpy,
+                                               unsigned src_height,
                                                int src_x, int src_y,
                                                unsigned int width,
                                                unsigned int height,
                                                int dst_x, int dst_y);
+extern void jwxyz_gl_copy_area_write_tex_image (Display *dpy, GC gc,
+                                                int src_x, int src_y,
+                                                unsigned int width,
+                                                unsigned int height,
+                                                int dst_x, int dst_y);
+extern void jwxyz_gl_draw_image (GLenum target,
+                                 unsigned int tex_w, unsigned int tex_h,
+                                 int src_x, int src_y,
+                                 unsigned int width, unsigned int height,
+                                 int dst_x, int dst_y);
 
 /* glReadPixels followed by glTexImage2D. This is terrible, so only use this
    if nothing else works.
@@ -123,14 +177,6 @@ extern void jwxyz_assert_display (Display *);
 extern void jwxyz_assert_drawable (Window main_window, Drawable d);
 extern void jwxyz_assert_gl (void);
 
-extern void *jwxyz_load_native_font (Display *, const char *name,
-                                     char **native_name_ret, float *size_ret,
-                                     int *ascent_ret, int *descent_ret);
-extern void jwxyz_release_native_font (Display *, void *native_font);
-extern void jwxyz_render_text (Display *, void *native_font,
-                               const char *str, size_t len, int utf8_p,
-                               XCharStruct *cs_ret, char **pixmap_ret);
-
 # endif /* JWXYZ_GL */
 
 #endif
index 912a4be31c770f237037c07ef6cc85dcfc95f89c..3df134ab003e41d56fb39a0be514c7ef9f444e44 100644 (file)
 
 #include "jwzglesI.h"
 
+#include "pow2.h"
+
 #define STRINGIFY(X) #X
 
 #undef countof
@@ -324,7 +326,7 @@ typedef struct {
 } texgen_state;
 
 
-typedef struct {       /* global state */
+struct jwzgles_state {  /* global state */
 
   vert_set set;                /* set being built */
 
@@ -342,7 +344,7 @@ typedef struct {    /* global state */
   /* Implementing glPushClientAttrib? Don't forget about these! */
   draw_array varray, narray, carray, tarray;
 
-} jwzgles_state;
+};
 
 
 static jwzgles_state *state = 0;
@@ -618,10 +620,13 @@ make_room (const char *name, void **array, int span, int *count, int *size)
 
 
 void
-jwzgles_reset (void)
+jwzgles_free_state (void)
 {
-  if (! state)
-    state = (jwzgles_state *) calloc (1, sizeof (*state));
+  /* Tricky: jwzgles_make_state doesn't require an active GLES context, but
+     jwzgles_free_state does.
+   */
+
+  LOG1("jwzgles_free_state %p", state);
 
   if (state->lists.lists)
     {
@@ -636,12 +641,31 @@ jwzgles_reset (void)
   if (state->set.tex)     free (state->set.tex);
   if (state->set.color)   free (state->set.color);
 
-  memset (state, 0, sizeof(*state));
+  free (state);
+  state = NULL;
+}
+
 
-  state->s.mode = state->t.mode = state->r.mode = state->q.mode =
-    GL_EYE_LINEAR;
-  state->s.obj[0] = state->s.eye[0] = 1;  /* s = 1 0 0 0 */
-  state->t.obj[1] = state->t.eye[1] = 1;  /* t = 0 1 0 0 */
+jwzgles_state *
+jwzgles_make_state (void)
+{
+  jwzgles_state *s = (jwzgles_state *) calloc (1, sizeof (*s));
+
+  LOG1("jwzgles_make_state %p", s);
+
+  s->s.mode = s->t.mode = s->r.mode = s->q.mode = GL_EYE_LINEAR;
+  s->s.obj[0] = s->s.eye[0] = 1;  /* s = 1 0 0 0 */
+  s->t.obj[1] = s->t.eye[1] = 1;  /* t = 0 1 0 0 */
+
+  return s;
+}
+
+
+void
+jwzgles_make_current (jwzgles_state *s)
+{
+  LOG1("jwzgles_make_current %p", s);
+  state = s;
 }
 
 
@@ -2952,15 +2976,6 @@ jwzgles_glGenTextures (GLuint n, GLuint *ret)
 }
 
 
-/* return the next larger power of 2. */
-static int
-to_pow2 (int value)
-{
-  int i = 1;
-  while (i < value) i <<= 1;
-  return i;
-}
-
 void
 jwzgles_glTexImage1D (GLenum target, GLint level,
                       GLint internalFormat,
@@ -3289,8 +3304,8 @@ jwzgles_gluBuild2DMipmaps (GLenum target,
      Note that this required a corresponding hack in glTexParameterf().
    */
 
-  int w2 = to_pow2(width);
-  int h2 = to_pow2(height);
+  GLsizei w2 = (GLsizei)to_pow2(width);
+  GLsizei h2 = (GLsizei)to_pow2(height);
 
   void *d2 = (void *) data;
 
index 588e301e924adf2d3fe9513bced92074db78870a..dc71b075db33c4c60281b413395ea41df57a220a 100644 (file)
 #endif
 
 
-extern void jwzgles_reset (void);
+typedef struct jwzgles_state jwzgles_state;
+
+extern jwzgles_state *jwzgles_make_state (void);
+extern void jwzgles_free_state (void);
+extern void jwzgles_make_current (jwzgles_state *);
 
 
 /* Prototypes for the things re-implemented in jwzgles.c 
index c830df766a333add07816358da322d2dddaa487c..7a8ef81287bb73951b427a3891cbeafad6f07cf9 100644 (file)
@@ -1,4 +1,4 @@
-# Auto-generated: Mon Oct 10 19:58:09 PDT 2016
+# Auto-generated: Wed Jul  5 10:52:59 PDT 2017
 driver/demo-Gtk-conf.c
 driver/demo-Gtk.c
 driver/screensaver-properties.desktop.in
@@ -233,6 +233,7 @@ hacks/config/unicrud.xml
 hacks/config/unknownpleasures.xml
 hacks/config/vermiculate.xml
 hacks/config/vidwhacker.xml
+hacks/config/vigilance.xml
 hacks/config/vines.xml
 hacks/config/voronoi.xml
 hacks/config/wander.xml
diff --git a/po/ca.po b/po/ca.po
deleted file mode 100644 (file)
index 7fc5724..0000000
--- a/po/ca.po
+++ /dev/null
@@ -1,8905 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: PACKAGE VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2006-02-13 12:26+0100\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso-8859-1\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: driver/demo-Gtk-conf.c:818
-msgid "Browse..."
-msgstr ""
-
-#: driver/demo-Gtk-conf.c:1110
-msgid "Select file."
-msgstr ""
-
-#: driver/demo-Gtk-support.c:135
-#, c-format
-msgid "Couldn't find pixmap file: %s"
-msgstr ""
-
-#: driver/demo-Gtk-support.c:147 driver/demo-Gtk-support.c:179
-#, c-format
-msgid "Error loading pixmap file: %s"
-msgstr ""
-
-#: driver/demo-Gtk-support.c:182
-#, c-format
-msgid "reason: %s\n"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:161 driver/xscreensaver-demo.glade2.h:71
-#, fuzzy
-msgid "XScreenSaver"
-msgstr "Protector de pantalla"
-
-#: driver/demo-Gtk-widgets.c:182 driver/xscreensaver-demo.glade2.h:84
-msgid "_File"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:202 driver/xscreensaver-demo.glade2.h:76
-msgid "_Blank Screen Now"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:211
-msgid ""
-"Activate the XScreenSaver daemon now (locking the screen if so configured.)"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:215 driver/xscreensaver-demo.glade2.h:89
-msgid "_Lock Screen Now"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:224
-msgid "Lock the screen now (even if \"Lock Screen\" is unchecked.)"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:228 driver/xscreensaver-demo.glade2.h:87
-msgid "_Kill Daemon"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:237
-msgid "Tell the running XScreenSaver daemon to exit."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:241 driver/xscreensaver-demo.glade2.h:98
-msgid "_Restart Daemon"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:250
-msgid "Kill and re-launch the XScreenSaver daemon."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:263
-msgid "_Exit"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:272
-msgid ""
-"Exit the xscreensaver-demo program (but leave the XScreenSaver daemon "
-"running in the background.)"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:276 driver/xscreensaver-demo.glade2.h:85
-msgid "_Help"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:296 driver/xscreensaver-demo.glade2.h:72
-msgid "_About..."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:305
-msgid "Display version information."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:309 driver/xscreensaver-demo.glade2.h:83
-msgid "_Documentation..."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:318
-msgid "Go to the documentation on the XScreenSaver web page."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:348
-msgid "Cycle After"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:370 driver/xscreensaver-demo.glade2.h:63
-msgid "Whether a password should be required to un-blank the screen."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:372
-msgid "Lock Screen After"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:380
-msgid "Blank After"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:403 driver/demo-Gtk-widgets.c:453
-#: driver/demo-Gtk-widgets.c:467 driver/demo-Gtk-widgets.c:1016
-msgid "How long before the monitor goes completely black."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:407 driver/demo-Gtk-widgets.c:419
-#: driver/demo-Gtk-widgets.c:431 driver/demo-Gtk-widgets.c:1020
-#: driver/demo-Gtk-widgets.c:1032 driver/demo-Gtk-widgets.c:1044
-#: driver/xscreensaver-demo.glade2.h:106
-msgid "minutes"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:482 driver/demo-Gtk.c:3233
-msgid "Preview"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:490 driver/xscreensaver-demo.glade2.h:10
-msgid ""
-"Demo the selected screen saver in full-screen mode (click the mouse to "
-"return.)"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:492
-msgid "Settings..."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:500 driver/xscreensaver-demo.glade2.h:7
-msgid "Customization and explanation of the selected screen saver."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:521
-msgid "Mode:"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:539
-#, fuzzy
-msgid "Disable Screen Saver"
-msgstr "Protector de pantalla"
-
-#: driver/demo-Gtk-widgets.c:542
-msgid "Blank Screen Only"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:545
-#, fuzzy
-msgid "Only One Screen Saver"
-msgstr "Protector de pantalla"
-
-#: driver/demo-Gtk-widgets.c:548
-#, fuzzy
-msgid "Random Screen Saver"
-msgstr "Protector de pantalla"
-
-#: driver/demo-Gtk-widgets.c:571 driver/demo-Gtk.c:2419
-msgid "Use"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:591 driver/demo-Gtk.c:2429
-#, fuzzy
-msgid "Screen Saver"
-msgstr "Protector de pantalla"
-
-#: driver/demo-Gtk-widgets.c:644
-msgid "\\/"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:652 driver/xscreensaver-demo.glade2.h:39
-msgid ""
-"Run the next screen saver in the list in full-screen mode (click the mouse "
-"to return.)"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:654
-msgid "/\\"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:662 driver/xscreensaver-demo.glade2.h:40
-msgid ""
-"Run the previous screen saver in the list in full-screen mode (click the "
-"mouse to return.)"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:664 driver/demo-Gtk-widgets.c:1607
-#: driver/xscreensaver-demo.glade2.h:11
-msgid "Description"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:691
-msgid "Display Modes"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:707
-msgid "Diagnostics"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:751
-msgid "Whether the daemon should print lots of debugging information."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:753
-msgid "Verbose Diagnostics"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:768
-msgid ""
-"Whether any error output of the display modes should be redirected to the "
-"screen."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:770
-msgid "Display Subprocess Errors"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:785
-msgid ""
-"Whether the splash screen (with the version number and `Help' button) should "
-"be momentarily displayed when the daemon first starts up."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:787
-msgid "Display Splash Screen at Startup"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:796
-msgid "Colormaps"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:840 driver/xscreensaver-demo.glade2.h:70
-msgid ""
-"Whether to install a private colormap when running in 8-bit mode on the "
-"default Visual."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:842
-msgid "Install Colormap"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:865 driver/xscreensaver-demo.glade2.h:69
-msgid ""
-"Whether the screen should slowly fade to black when the screen saver "
-"activates."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:867
-msgid "Fade To Black When Blanking"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:882 driver/xscreensaver-demo.glade2.h:68
-msgid ""
-"Whether the screen should slowly fade in from black when the screen saver "
-"deactivates."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:884
-msgid "Fade From Black When Unblanking"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:910
-msgid "Fade Duration"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:928 driver/xscreensaver-demo.glade2.h:26
-msgid "How long it should take for the screen to fade in and out."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:932 driver/xscreensaver-demo.glade2.h:111
-msgid "seconds"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:942 driver/xscreensaver-demo.glade2.h:13
-msgid "Display Power Management"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:986 driver/xscreensaver-demo.glade2.h:67
-msgid "Whether the monitor should be powered down after a while."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:988
-msgid "Power Management Enabled"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1056
-msgid "Off After"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1069
-msgid "Suspend After"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1082
-msgid "Standby After"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1105 driver/xscreensaver-demo.glade2.h:28
-msgid "How long until the monitor goes into power-saving mode."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1119 driver/xscreensaver-demo.glade2.h:29
-msgid "How long until the monitor powers down."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1123 driver/xscreensaver-demo.glade2.h:30
-msgid "Image Manipulation"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1167 driver/xscreensaver-demo.glade2.h:64
-msgid ""
-"Whether the image-manipulating modes should be allowed to operate on an "
-"image of your desktop."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1169
-msgid "Grab Desktop Images"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1184
-msgid ""
-"Whether the image-manipulating modes should operate on images captured from "
-"the system's video input (if there is one)."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1186
-msgid "Grab Video Frames"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1201 driver/xscreensaver-demo.glade2.h:66
-msgid ""
-"Whether the image-manipulating modes should operate on random images loaded "
-"from disk."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1203
-msgid "Choose Random Image:"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1236 driver/xscreensaver-demo.glade2.h:53
-msgid "The directory from which images will be randomly chosen."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1238
-msgid "Browse"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1246 driver/demo-Gtk-widgets.c:1599
-#: driver/xscreensaver-demo.glade2.h:2
-msgid "Advanced"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1444
-msgid "XScreenSaver: Mode-Specific Settings"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1466 driver/xscreensaver-demo.glade2.h:41
-msgid "Settings"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1495 driver/xscreensaver-demo.glade2.h:43
-msgid "Standard"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1532
-msgid "Visual:"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1550 driver/demo-Gtk-widgets.c:1573
-#: driver/demo-Gtk.c:1695 driver/demo-Gtk.c:3252
-#: driver/xscreensaver-demo.glade2.h:3
-msgid "Any"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1551 driver/xscreensaver-demo.glade2.h:4
-msgid "Best"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1552 driver/xscreensaver-demo.glade2.h:8
-msgid "Default"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1553 driver/xscreensaver-demo.glade2.h:9
-msgid "Default-N"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1554 driver/xscreensaver-demo.glade2.h:18
-msgid "GL"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1555 driver/xscreensaver-demo.glade2.h:54
-msgid "TrueColor"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1556 driver/xscreensaver-demo.glade2.h:38
-msgid "PseudoColor"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1557 driver/xscreensaver-demo.glade2.h:44
-msgid "StaticGray"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1558 driver/xscreensaver-demo.glade2.h:22
-msgid "GrayScale"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1559 driver/xscreensaver-demo.glade2.h:12
-msgid "DirectColor"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1560 driver/xscreensaver-demo.glade2.h:6
-#: hacks/config/fuzzyflakes.xml.h:3
-msgid "Color"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1561 driver/xscreensaver-demo.glade2.h:21
-msgid "Gray"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1562 driver/xscreensaver-demo.glade2.h:32
-msgid "Mono"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1572
-msgid ""
-"The X visual type that this demo will require.  If that visual is available "
-"it will be used, otherwise, this demo will not be run."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1575
-msgid "Command Line:"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1647
-msgid "Documentation..."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1655
-msgid "Click here to read the manual for this display mode, if it has one."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1680
-msgid "Advanced >>"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1688
-msgid "Edit the command line directly."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1690
-msgid "Standard <<"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1698
-msgid "Back to the graphical configuration options."
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1709 driver/demo-Gtk.c:832
-msgid "OK"
-msgstr ""
-
-#: driver/demo-Gtk-widgets.c:1718
-msgid "Cancel"
-msgstr ""
-
-#: driver/demo-Gtk.c:692 driver/demo-Gtk.c:4282
-#, c-format
-msgid ""
-"Warning:\n"
-"\n"
-"The XScreenSaver daemon doesn't seem to be running\n"
-"on display \"%s\".  Launch it now?"
-msgstr ""
-
-#: driver/demo-Gtk.c:740
-msgid "For updates, check http://www.jwz.org/xscreensaver/"
-msgstr ""
-
-#: driver/demo-Gtk.c:870
-msgid ""
-"Error:\n"
-"\n"
-"No Help URL has been specified.\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:967
-msgid ""
-"Error:\n"
-"\n"
-"The xscreensaver daemon did not start up properly.\n"
-"\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:979
-msgid ""
-"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"
-"\n"
-"                        xhost +localhost\n"
-"\n"
-"and then selecting `File / Restart Daemon'.\n"
-"\n"
-"Note that turning off access control will allow anyone logged\n"
-"on to this machine to access your screen, which might be\n"
-"considered a security problem.  Please read the xscreensaver\n"
-"manual and FAQ for more information.\n"
-"\n"
-"You shouldn't run X as root. Instead, you should log in as a\n"
-"normal user, and `su' as necessary."
-msgstr ""
-
-#: driver/demo-Gtk.c:995
-msgid "Please check your $PATH and permissions."
-msgstr ""
-
-#: driver/demo-Gtk.c:1033
-msgid ""
-"Error:\n"
-"\n"
-"Couldn't determine init file name!\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:1038
-#, c-format
-msgid ""
-"Error:\n"
-"\n"
-"Couldn't write %s\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:1101
-msgid ""
-"Error:\n"
-"\n"
-"no `manualCommand' resource set."
-msgstr ""
-
-#: driver/demo-Gtk.c:1284
-#, c-format
-msgid ""
-"Error:\n"
-"\n"
-"Unparsable time format: \"%s\"\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:1991
-#, c-format
-msgid ""
-"Error:\n"
-"\n"
-"Directory does not exist: \"%s\"\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:2021 driver/demo-Gtk.c:2052
-#, c-format
-msgid ""
-"Error:\n"
-"\n"
-"File does not exist: \"%s\"\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:2877
-msgid "Descriptions not available: no XML support compiled in."
-msgstr ""
-
-#: driver/demo-Gtk.c:2882
-msgid "No description available."
-msgstr ""
-
-#: driver/demo-Gtk.c:3204
-msgid "Blank Screen"
-msgstr ""
-
-#: driver/demo-Gtk.c:3210
-#, fuzzy
-msgid "Screen Saver Disabled"
-msgstr "Protector de pantalla"
-
-#: driver/demo-Gtk.c:3243
-#, c-format
-msgid "%s: %.100s Settings"
-msgstr ""
-
-#: driver/demo-Gtk.c:3407
-#, c-format
-msgid ""
-"Warning:\n"
-"\n"
-"file \"%s\" has changed, reloading.\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:3492
-msgid "No Preview"
-msgstr ""
-
-#: driver/demo-Gtk.c:3492
-msgid "Available"
-msgstr ""
-
-#: driver/demo-Gtk.c:3493
-msgid "Not"
-msgstr ""
-
-#: driver/demo-Gtk.c:3493
-msgid "Installed"
-msgstr ""
-
-#: driver/demo-Gtk.c:4292
-#, c-format
-msgid ""
-"Warning:\n"
-"\n"
-"%s is running as user \"%s\" on host \"%s\".\n"
-"But the xscreensaver managing display \"%s\"\n"
-"is running as user \"%s\" on host \"%s\".\n"
-"\n"
-"Since they are different users, they won't be reading/writing\n"
-"the same ~/.xscreensaver file, so %s isn't\n"
-"going to work right.\n"
-"\n"
-"You should either re-run %s as \"%s\", or re-run\n"
-"xscreensaver as \"%s\".\n"
-"\n"
-"Restart the xscreensaver daemon now?\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:4317
-#, c-format
-msgid ""
-"Warning:\n"
-"\n"
-"%s is running as user \"%s\" on host \"%s\".\n"
-"But the xscreensaver managing display \"%s\"\n"
-"is running as user \"%s\" on host \"%s\".\n"
-"\n"
-"If those two machines don't share a file system (that is,\n"
-"if they don't see the same ~%s/.xscreensaver file) then\n"
-"%s won't work right.\n"
-"\n"
-"Restart the daemon on \"%s\" as \"%s\" now?\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:4339
-#, c-format
-msgid ""
-"Warning:\n"
-"\n"
-"This is %s version %s.\n"
-"But the xscreensaver managing display \"%s\"\n"
-"is version %s.  This could cause problems.\n"
-"\n"
-"Restart the xscreensaver daemon now?\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:4800
-#, c-format
-msgid "%s: unknown option: %s\n"
-msgstr ""
-
-#: driver/demo-Gtk.c:4865
-#, fuzzy
-msgid "Screensaver Preferences"
-msgstr "Protector de pantalla"
-
-#: driver/screensaver-properties.desktop.in.h:1
-msgid "Change screensaver properties"
-msgstr ""
-
-#: driver/screensaver-properties.desktop.in.h:2
-#, fuzzy
-msgid "Screensaver"
-msgstr "Protector de pantalla"
-
-#: driver/xscreensaver-demo.glade2.h:1
-msgid "*"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:5
-msgid "Choose _Random Image:"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:14
-msgid "F_ade Duration"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:15
-msgid "Fade from Black When _Unblanking"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:16
-msgid "Fade to Black when _Blanking"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:17
-msgid "Fading and Colormaps"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:19
-msgid "Grab Desktop _Images"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:20
-msgid "Grab _Video Frames"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:23
-msgid "How long after the screen blanks until a password will be required."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:24
-msgid "How long before the screen saver activates."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:25
-msgid ""
-"How long each display mode should run before choosing a new one (in Random "
-"mode.)"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:27
-msgid "How long until the monitor goes completely black."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:31
-msgid "Install _Colormap"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:33
-msgid "Never blank the screen or power down the monitor."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:34
-msgid ""
-"No Preview\n"
-"Available"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:36
-msgid ""
-"Not\n"
-"Installed"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:42
-msgid "Stand_by After"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:45
-msgid "Sus_pend After"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:46
-msgid "Text Manipulation"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:47
-msgid "Text _file"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:48
-msgid ""
-"Text-displaying modes will display the contents of this URL (HTML or RSS)."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:49
-msgid "Text-displaying modes will display the contents of this file."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:50
-msgid "Text-displaying modes will display the local host name, date, and time."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:51
-msgid "Text-displaying modes will display the output of this program."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:52
-msgid "Text-displaying modes will display the text typed here."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:55
-msgid ""
-"Very few (or no) screen savers appear to be available.\n"
-"\n"
-"This probably means that the \"xscreensaver-extras\" and\n"
-"\"xscreensaver-gl-extras\" packages are not installed."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:59
-msgid "When idle or locked, blacken the screen only."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:60
-msgid ""
-"When idle or locked, choose a random display mode from among the checked "
-"items in the list below."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:61
-msgid ""
-"When idle or locked, choose a random display mode from among the checked "
-"items in the list below.  Run that same mode on each monitor."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:62
-msgid "When idle or locked, run the display mode selected below."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:65
-msgid ""
-"Whether the image-manipulating modes should operate on images captured from "
-"the system's video input (if there is one.)"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:73
-msgid "_Advanced"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:74
-msgid "_Advanced >>"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:75
-msgid "_Blank After"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:77
-msgid "_Blank Screen Only"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:78
-msgid "_Browse"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:79
-msgid "_Command Line:"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:80
-msgid "_Cycle After"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:81
-#, fuzzy
-msgid "_Disable Screen Saver"
-msgstr "Protector de pantalla"
-
-#: driver/xscreensaver-demo.glade2.h:82
-msgid "_Display Modes"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:86
-msgid "_Host Name and Time"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:88
-#, fuzzy
-msgid "_Lock Screen After  "
-msgstr "Protector de pantalla"
-
-#: driver/xscreensaver-demo.glade2.h:90
-msgid "_Mode:"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:91
-msgid "_Off After"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:92
-#, fuzzy
-msgid "_Only One Screen Saver"
-msgstr "Protector de pantalla"
-
-#: driver/xscreensaver-demo.glade2.h:93
-msgid "_Power Management Enabled"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:94
-msgid "_Preview"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:95
-msgid "_Program"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:96
-msgid "_Quit"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:97
-#, fuzzy
-msgid "_Random Screen Saver"
-msgstr "Protector de pantalla"
-
-#: driver/xscreensaver-demo.glade2.h:99
-#, fuzzy
-msgid "_Same Random Savers"
-msgstr "Protector de pantalla"
-
-#: driver/xscreensaver-demo.glade2.h:100
-msgid "_Settings..."
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:101
-msgid "_Standard <<"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:102
-msgid "_Text"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:103
-msgid "_URL"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:104
-msgid "_Visual:"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:105
-msgid "dialog1"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:107
-msgid "no preview"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:108
-msgid "not installed"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:109
-msgid "nothing"
-msgstr ""
-
-#: driver/xscreensaver-demo.glade2.h:110
-msgid "preview"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:1
-msgid "Anemone"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:2 hacks/config/fuzzyflakes.xml.h:1
-msgid "Arms"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:3 hacks/config/anemotaxis.xml.h:5
-#: hacks/config/ant.xml.h:6 hacks/config/antinspect.xml.h:4
-#: hacks/config/antmaze.xml.h:3 hacks/config/antspotlight.xml.h:3
-#: hacks/config/apollonian.xml.h:5 hacks/config/atlantis.xml.h:4
-#: hacks/config/attraction.xml.h:8 hacks/config/atunnel.xml.h:3
-#: hacks/config/barcode.xml.h:4 hacks/config/blaster.xml.h:3
-#: hacks/config/blinkbox.xml.h:5 hacks/config/blitspin.xml.h:4
-#: hacks/config/blocktube.xml.h:4 hacks/config/boing.xml.h:2
-#: hacks/config/bouboule.xml.h:3 hacks/config/bouncingcow.xml.h:6
-#: hacks/config/boxed.xml.h:6 hacks/config/boxfit.xml.h:8
-#: hacks/config/braid.xml.h:4 hacks/config/bubble3d.xml.h:4
-#: hacks/config/bubbles.xml.h:8 hacks/config/bumps.xml.h:3
-#: hacks/config/cage.xml.h:2 hacks/config/carousel.xml.h:5
-#: hacks/config/ccurve.xml.h:7 hacks/config/celtic.xml.h:3
-#: hacks/config/circuit.xml.h:4 hacks/config/cloudlife.xml.h:3
-#: hacks/config/compass.xml.h:3 hacks/config/coral.xml.h:7
-#: hacks/config/critical.xml.h:3 hacks/config/crystal.xml.h:6
-#: hacks/config/cube21.xml.h:6 hacks/config/cubenetic.xml.h:8
-#: hacks/config/cubestorm.xml.h:4 hacks/config/cynosure.xml.h:4
-#: hacks/config/dangerball.xml.h:3 hacks/config/decayscreen.xml.h:2
-#: hacks/config/deluxe.xml.h:4 hacks/config/demon.xml.h:4
-#: hacks/config/discrete.xml.h:2 hacks/config/distort.xml.h:4
-#: hacks/config/drift.xml.h:3 hacks/config/endgame.xml.h:3
-#: hacks/config/engine.xml.h:8 hacks/config/epicycle.xml.h:5
-#: hacks/config/eruption.xml.h:5 hacks/config/euler2d.xml.h:3
-#: hacks/config/extrusion.xml.h:3 hacks/config/fadeplot.xml.h:4
-#: hacks/config/fireworkx.xml.h:3 hacks/config/flag.xml.h:2
-#: hacks/config/flame.xml.h:6 hacks/config/flipflop.xml.h:1
-#: hacks/config/flipscreen3d.xml.h:1 hacks/config/fliptext.xml.h:3
-#: hacks/config/flow.xml.h:2 hacks/config/fluidballs.xml.h:5
-#: hacks/config/flyingtoasters.xml.h:5 hacks/config/fontglide.xml.h:4
-#: hacks/config/forest.xml.h:1 hacks/config/fuzzyflakes.xml.h:7
-#: hacks/config/galaxy.xml.h:3 hacks/config/gears.xml.h:2
-#: hacks/config/gflux.xml.h:6 hacks/config/glblur.xml.h:4
-#: hacks/config/glforestfire.xml.h:4 hacks/config/glhanoi.xml.h:3
-#: hacks/config/glknots.xml.h:3 hacks/config/glmatrix.xml.h:8
-#: hacks/config/glplanet.xml.h:2 hacks/config/glsnake.xml.h:6
-#: hacks/config/gltext.xml.h:4 hacks/config/goop.xml.h:4
-#: hacks/config/grav.xml.h:2 hacks/config/greynetic.xml.h:1
-#: hacks/config/halo.xml.h:2 hacks/config/hopalong.xml.h:9
-#: hacks/config/hyperball.xml.h:2 hacks/config/hypercube.xml.h:2
-#: hacks/config/hypertorus.xml.h:6 hacks/config/ifs.xml.h:4
-#: hacks/config/interaggregate.xml.h:1 hacks/config/interference.xml.h:7
-#: hacks/config/intermomentary.xml.h:1 hacks/config/jigglypuff.xml.h:6
-#: hacks/config/jigsaw.xml.h:3 hacks/config/juggle.xml.h:2
-#: hacks/config/juggler3d.xml.h:2 hacks/config/julia.xml.h:2
-#: hacks/config/kaleidescope.xml.h:2 hacks/config/klein.xml.h:2
-#: hacks/config/kumppa.xml.h:3 hacks/config/lament.xml.h:2
-#: hacks/config/laser.xml.h:3 hacks/config/lavalite.xml.h:10
-#: hacks/config/lightning.xml.h:1 hacks/config/lisa.xml.h:2
-#: hacks/config/lissie.xml.h:3 hacks/config/lmorph.xml.h:3
-#: hacks/config/loop.xml.h:1 hacks/config/maze.xml.h:4
-#: hacks/config/memscroller.xml.h:5 hacks/config/menger.xml.h:3
-#: hacks/config/metaballs.xml.h:4 hacks/config/mirrorblob.xml.h:11
-#: hacks/config/mismunch.xml.h:2 hacks/config/moebius.xml.h:3
-#: hacks/config/moire2.xml.h:2 hacks/config/molecule.xml.h:11
-#: hacks/config/morph3d.xml.h:3 hacks/config/mountain.xml.h:2
-#: hacks/config/munch.xml.h:3 hacks/config/nerverot.xml.h:9
-#: hacks/config/noof.xml.h:2 hacks/config/pacman.xml.h:1
-#: hacks/config/penetrate.xml.h:3 hacks/config/penrose.xml.h:3
-#: hacks/config/petri.xml.h:5 hacks/config/phosphor.xml.h:4
-#: hacks/config/piecewise.xml.h:4 hacks/config/pinion.xml.h:5
-#: hacks/config/pipes.xml.h:5 hacks/config/polyhedra.xml.h:17
-#: hacks/config/polyominoes.xml.h:2 hacks/config/polytopes.xml.h:11
-#: hacks/config/pong.xml.h:1 hacks/config/popsquares.xml.h:3
-#: hacks/config/providence.xml.h:2 hacks/config/pulsar.xml.h:11
-#: hacks/config/pyro.xml.h:4 hacks/config/qix.xml.h:7
-#: hacks/config/queens.xml.h:1 hacks/config/rd-bomb.xml.h:9
-#: hacks/config/ripples.xml.h:4 hacks/config/rocks.xml.h:4
-#: hacks/config/rotor.xml.h:3 hacks/config/rubik.xml.h:3
-#: hacks/config/sballs.xml.h:4 hacks/config/shadebobs.xml.h:3
-#: hacks/config/sierpinski.xml.h:2 hacks/config/sierpinski3d.xml.h:2
-#: hacks/config/slidescreen.xml.h:2 hacks/config/slip.xml.h:2
-#: hacks/config/speedmine.xml.h:3 hacks/config/sphere.xml.h:2
-#: hacks/config/spheremonics.xml.h:5 hacks/config/spiral.xml.h:3
-#: hacks/config/spotlight.xml.h:2 hacks/config/sproingies.xml.h:2
-#: hacks/config/squiral.xml.h:4 hacks/config/stairs.xml.h:1
-#: hacks/config/starfish.xml.h:3 hacks/config/starwars.xml.h:6
-#: hacks/config/strange.xml.h:1 hacks/config/substrate.xml.h:7
-#: hacks/config/superquadrics.xml.h:4 hacks/config/swirl.xml.h:2
-#: hacks/config/t3d.xml.h:6 hacks/config/tangram.xml.h:2
-#: hacks/config/thornbird.xml.h:2 hacks/config/triangle.xml.h:1
-#: hacks/config/truchet.xml.h:1 hacks/config/twang.xml.h:3
-#: hacks/config/vines.xml.h:1 hacks/config/worm.xml.h:3
-#: hacks/config/wormhole.xml.h:2 hacks/config/xearth.xml.h:7
-#: hacks/config/xfishtank.xml.h:3 hacks/config/xflame.xml.h:4
-#: hacks/config/xjack.xml.h:1 hacks/config/xmatrix.xml.h:5
-#: hacks/config/xmountains.xml.h:13 hacks/config/xplanet.xml.h:8
-#: hacks/config/xrayswarm.xml.h:2 hacks/config/zoom.xml.h:2
-msgid "Fast"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:4 hacks/config/anemotaxis.xml.h:6
-#: hacks/config/blaster.xml.h:4 hacks/config/bouboule.xml.h:4
-#: hacks/config/boxed.xml.h:7 hacks/config/coral.xml.h:8
-#: hacks/config/cubenetic.xml.h:9 hacks/config/eruption.xml.h:6
-#: hacks/config/euler2d.xml.h:4 hacks/config/fiberlamp.xml.h:2
-#: hacks/config/flame.xml.h:7 hacks/config/fluidballs.xml.h:6
-#: hacks/config/fuzzyflakes.xml.h:8 hacks/config/kaleidescope.xml.h:3
-#: hacks/config/lisa.xml.h:3 hacks/config/pedal.xml.h:4
-#: hacks/config/petri.xml.h:7 hacks/config/qix.xml.h:8
-#: hacks/config/substrate.xml.h:8 hacks/config/thornbird.xml.h:3
-#: hacks/config/whirlwindwarp.xml.h:1 hacks/config/wormhole.xml.h:3
-#: hacks/config/xfishtank.xml.h:4
-msgid "Few"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:5 hacks/config/anemotaxis.xml.h:7
-#: hacks/config/ant.xml.h:9 hacks/config/apollonian.xml.h:7
-#: hacks/config/attraction.xml.h:18 hacks/config/blaster.xml.h:6
-#: hacks/config/bouboule.xml.h:5 hacks/config/braid.xml.h:7
-#: hacks/config/coral.xml.h:9 hacks/config/critical.xml.h:4
-#: hacks/config/crystal.xml.h:8 hacks/config/cubenetic.xml.h:13
-#: hacks/config/cynosure.xml.h:6 hacks/config/deco.xml.h:5
-#: hacks/config/deluxe.xml.h:6 hacks/config/demon.xml.h:6
-#: hacks/config/discrete.xml.h:4 hacks/config/drift.xml.h:9
-#: hacks/config/epicycle.xml.h:8 hacks/config/eruption.xml.h:12
-#: hacks/config/euler2d.xml.h:8 hacks/config/fadeplot.xml.h:6
-#: hacks/config/fiberlamp.xml.h:6 hacks/config/flag.xml.h:5
-#: hacks/config/flame.xml.h:11 hacks/config/flow.xml.h:7
-#: hacks/config/fluidballs.xml.h:13 hacks/config/forest.xml.h:3
-#: hacks/config/fuzzyflakes.xml.h:12 hacks/config/galaxy.xml.h:6
-#: hacks/config/grav.xml.h:4 hacks/config/halo.xml.h:4
-#: hacks/config/hopalong.xml.h:15 hacks/config/ifs.xml.h:8
-#: hacks/config/imsmap.xml.h:9 hacks/config/interference.xml.h:14
-#: hacks/config/julia.xml.h:6 hacks/config/kaleidescope.xml.h:5
-#: hacks/config/laser.xml.h:6 hacks/config/lightning.xml.h:3
-#: hacks/config/lisa.xml.h:5 hacks/config/lissie.xml.h:6
-#: hacks/config/loop.xml.h:4 hacks/config/metaballs.xml.h:6
-#: hacks/config/mismunch.xml.h:4 hacks/config/moire.xml.h:5
-#: hacks/config/moire2.xml.h:3 hacks/config/mountain.xml.h:4
-#: hacks/config/nerverot.xml.h:15 hacks/config/pedal.xml.h:6
-#: hacks/config/penrose.xml.h:4 hacks/config/petri.xml.h:11
-#: hacks/config/polyominoes.xml.h:5 hacks/config/qix.xml.h:14
-#: hacks/config/rd-bomb.xml.h:12 hacks/config/ripples.xml.h:8
-#: hacks/config/rocks.xml.h:5 hacks/config/rotor.xml.h:6
-#: hacks/config/shadebobs.xml.h:5 hacks/config/sierpinski.xml.h:4
-#: hacks/config/slip.xml.h:4 hacks/config/sphere.xml.h:3
-#: hacks/config/spiral.xml.h:6 hacks/config/squiral.xml.h:9
-#: hacks/config/starfish.xml.h:5 hacks/config/strange.xml.h:2
-#: hacks/config/swirl.xml.h:3 hacks/config/thornbird.xml.h:4
-#: hacks/config/triangle.xml.h:3 hacks/config/vines.xml.h:2
-#: hacks/config/whirlwindwarp.xml.h:4 hacks/config/worm.xml.h:4
-#: hacks/config/xearth.xml.h:12 hacks/config/xfishtank.xml.h:8
-msgid "Many"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:6 hacks/config/ant.xml.h:11
-#: hacks/config/apollonian.xml.h:8 hacks/config/attraction.xml.h:19
-#: hacks/config/bouboule.xml.h:6 hacks/config/braid.xml.h:9
-#: hacks/config/critical.xml.h:5 hacks/config/crystal.xml.h:10
-#: hacks/config/cynosure.xml.h:7 hacks/config/deco.xml.h:8
-#: hacks/config/deluxe.xml.h:7 hacks/config/demon.xml.h:7
-#: hacks/config/discrete.xml.h:6 hacks/config/drift.xml.h:10
-#: hacks/config/epicycle.xml.h:9 hacks/config/eruption.xml.h:14
-#: hacks/config/euler2d.xml.h:9 hacks/config/fadeplot.xml.h:7
-#: hacks/config/flag.xml.h:6 hacks/config/flame.xml.h:12
-#: hacks/config/flow.xml.h:8 hacks/config/forest.xml.h:4
-#: hacks/config/galaxy.xml.h:7 hacks/config/grav.xml.h:5
-#: hacks/config/halo.xml.h:6 hacks/config/hopalong.xml.h:17
-#: hacks/config/imsmap.xml.h:10 hacks/config/interference.xml.h:15
-#: hacks/config/julia.xml.h:7 hacks/config/laser.xml.h:8
-#: hacks/config/lightning.xml.h:4 hacks/config/lisa.xml.h:6
-#: hacks/config/lissie.xml.h:7 hacks/config/loop.xml.h:5
-#: hacks/config/metaballs.xml.h:10 hacks/config/moire.xml.h:7
-#: hacks/config/moire2.xml.h:5 hacks/config/mountain.xml.h:6
-#: hacks/config/penrose.xml.h:5 hacks/config/polyominoes.xml.h:6
-#: hacks/config/popsquares.xml.h:4 hacks/config/rd-bomb.xml.h:13
-#: hacks/config/rocks.xml.h:6 hacks/config/rotor.xml.h:7
-#: hacks/config/shadebobs.xml.h:6 hacks/config/sierpinski.xml.h:5
-#: hacks/config/slip.xml.h:5 hacks/config/sphere.xml.h:4
-#: hacks/config/spiral.xml.h:8 hacks/config/squiral.xml.h:10
-#: hacks/config/starfish.xml.h:6 hacks/config/strange.xml.h:3
-#: hacks/config/swirl.xml.h:5 hacks/config/thornbird.xml.h:5
-#: hacks/config/triangle.xml.h:4 hacks/config/vines.xml.h:3
-#: hacks/config/worm.xml.h:5 hacks/config/xearth.xml.h:17
-#: hacks/config/xfishtank.xml.h:9
-msgid "Number of Colors"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:7 hacks/config/fireflies.xml.h:32
-#: hacks/config/pyro.xml.h:8
-msgid "Often"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:8
-msgid "Rarely"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:9 hacks/config/anemotaxis.xml.h:10
-#: hacks/config/ant.xml.h:15 hacks/config/antinspect.xml.h:6
-#: hacks/config/antmaze.xml.h:5 hacks/config/antspotlight.xml.h:5
-#: hacks/config/apollonian.xml.h:11 hacks/config/atlantis.xml.h:13
-#: hacks/config/attraction.xml.h:26 hacks/config/atunnel.xml.h:6
-#: hacks/config/barcode.xml.h:6 hacks/config/blaster.xml.h:8
-#: hacks/config/blinkbox.xml.h:8 hacks/config/blitspin.xml.h:7
-#: hacks/config/blocktube.xml.h:9 hacks/config/boing.xml.h:10
-#: hacks/config/bouboule.xml.h:8 hacks/config/bouncingcow.xml.h:10
-#: hacks/config/boxed.xml.h:15 hacks/config/boxfit.xml.h:12
-#: hacks/config/braid.xml.h:11 hacks/config/bubble3d.xml.h:6
-#: hacks/config/bubbles.xml.h:10 hacks/config/bumps.xml.h:4
-#: hacks/config/cage.xml.h:4 hacks/config/carousel.xml.h:14
-#: hacks/config/ccurve.xml.h:11 hacks/config/celtic.xml.h:8
-#: hacks/config/circuit.xml.h:10 hacks/config/cloudlife.xml.h:11
-#: hacks/config/compass.xml.h:4 hacks/config/coral.xml.h:12
-#: hacks/config/critical.xml.h:6 hacks/config/crystal.xml.h:11
-#: hacks/config/cube21.xml.h:16 hacks/config/cubenetic.xml.h:22
-#: hacks/config/cubestorm.xml.h:8 hacks/config/cynosure.xml.h:9
-#: hacks/config/dangerball.xml.h:5 hacks/config/decayscreen.xml.h:17
-#: hacks/config/deluxe.xml.h:8 hacks/config/demon.xml.h:8
-#: hacks/config/discrete.xml.h:7 hacks/config/distort.xml.h:11
-#: hacks/config/drift.xml.h:12 hacks/config/endgame.xml.h:5
-#: hacks/config/engine.xml.h:15 hacks/config/epicycle.xml.h:10
-#: hacks/config/eruption.xml.h:19 hacks/config/euler2d.xml.h:14
-#: hacks/config/extrusion.xml.h:11 hacks/config/fadeplot.xml.h:8
-#: hacks/config/fireworkx.xml.h:9 hacks/config/flag.xml.h:7
-#: hacks/config/flame.xml.h:14 hacks/config/flipflop.xml.h:5
-#: hacks/config/flipscreen3d.xml.h:6 hacks/config/fliptext.xml.h:13
-#: hacks/config/flow.xml.h:10 hacks/config/fluidballs.xml.h:18
-#: hacks/config/flyingtoasters.xml.h:11 hacks/config/fontglide.xml.h:13
-#: hacks/config/forest.xml.h:5 hacks/config/fuzzyflakes.xml.h:15
-#: hacks/config/galaxy.xml.h:11 hacks/config/gears.xml.h:7
-#: hacks/config/gflux.xml.h:12 hacks/config/glblur.xml.h:14
-#: hacks/config/glforestfire.xml.h:14 hacks/config/glhanoi.xml.h:8
-#: hacks/config/glknots.xml.h:17 hacks/config/glmatrix.xml.h:18
-#: hacks/config/glplanet.xml.h:8 hacks/config/glsnake.xml.h:12
-#: hacks/config/gltext.xml.h:15 hacks/config/goop.xml.h:10
-#: hacks/config/grav.xml.h:8 hacks/config/greynetic.xml.h:3
-#: hacks/config/halo.xml.h:10 hacks/config/hopalong.xml.h:21
-#: hacks/config/hyperball.xml.h:8 hacks/config/hypercube.xml.h:7
-#: hacks/config/hypertorus.xml.h:18 hacks/config/ifs.xml.h:13
-#: hacks/config/interaggregate.xml.h:4 hacks/config/interference.xml.h:17
-#: hacks/config/intermomentary.xml.h:4 hacks/config/jigglypuff.xml.h:16
-#: hacks/config/jigsaw.xml.h:5 hacks/config/juggle.xml.h:8
-#: hacks/config/juggler3d.xml.h:12 hacks/config/julia.xml.h:8
-#: hacks/config/kaleidescope.xml.h:7 hacks/config/klein.xml.h:7
-#: hacks/config/kumppa.xml.h:8 hacks/config/lament.xml.h:6
-#: hacks/config/laser.xml.h:10 hacks/config/lavalite.xml.h:27
-#: hacks/config/lightning.xml.h:5 hacks/config/lisa.xml.h:8
-#: hacks/config/lissie.xml.h:9 hacks/config/lmorph.xml.h:11
-#: hacks/config/loop.xml.h:7 hacks/config/maze.xml.h:14
-#: hacks/config/memscroller.xml.h:7 hacks/config/menger.xml.h:16
-#: hacks/config/metaballs.xml.h:13 hacks/config/mirrorblob.xml.h:18
-#: hacks/config/mismunch.xml.h:10 hacks/config/moebius.xml.h:7
-#: hacks/config/moire2.xml.h:6 hacks/config/molecule.xml.h:23
-#: hacks/config/morph3d.xml.h:6 hacks/config/mountain.xml.h:7
-#: hacks/config/munch.xml.h:7 hacks/config/nerverot.xml.h:20
-#: hacks/config/noof.xml.h:5 hacks/config/pacman.xml.h:5
-#: hacks/config/penetrate.xml.h:6 hacks/config/penrose.xml.h:8
-#: hacks/config/petri.xml.h:23 hacks/config/phosphor.xml.h:7
-#: hacks/config/piecewise.xml.h:9 hacks/config/pinion.xml.h:13
-#: hacks/config/pipes.xml.h:15 hacks/config/polyhedra.xml.h:111
-#: hacks/config/polyominoes.xml.h:10 hacks/config/polytopes.xml.h:20
-#: hacks/config/pong.xml.h:4 hacks/config/popsquares.xml.h:5
-#: hacks/config/providence.xml.h:5 hacks/config/pulsar.xml.h:15
-#: hacks/config/pyro.xml.h:13 hacks/config/qix.xml.h:19
-#: hacks/config/queens.xml.h:4 hacks/config/rd-bomb.xml.h:17
-#: hacks/config/ripples.xml.h:12 hacks/config/rocks.xml.h:9
-#: hacks/config/rotor.xml.h:11 hacks/config/rubik.xml.h:9
-#: hacks/config/sballs.xml.h:13 hacks/config/shadebobs.xml.h:9
-#: hacks/config/sierpinski.xml.h:7 hacks/config/sierpinski3d.xml.h:8
-#: hacks/config/slidescreen.xml.h:6 hacks/config/slip.xml.h:7
-#: hacks/config/speedmine.xml.h:13 hacks/config/sphere.xml.h:5
-#: hacks/config/spheremonics.xml.h:19 hacks/config/spiral.xml.h:9
-#: hacks/config/spotlight.xml.h:4 hacks/config/sproingies.xml.h:6
-#: hacks/config/squiral.xml.h:14 hacks/config/stairs.xml.h:3
-#: hacks/config/starfish.xml.h:8 hacks/config/starwars.xml.h:12
-#: hacks/config/strange.xml.h:4 hacks/config/substrate.xml.h:15
-#: hacks/config/superquadrics.xml.h:8 hacks/config/swirl.xml.h:6
-#: hacks/config/t3d.xml.h:11 hacks/config/tangram.xml.h:4
-#: hacks/config/thornbird.xml.h:7 hacks/config/triangle.xml.h:5
-#: hacks/config/truchet.xml.h:2 hacks/config/twang.xml.h:9
-#: hacks/config/vines.xml.h:4 hacks/config/worm.xml.h:7
-#: hacks/config/wormhole.xml.h:5 hacks/config/xearth.xml.h:22
-#: hacks/config/xfishtank.xml.h:10 hacks/config/xflame.xml.h:5
-#: hacks/config/xjack.xml.h:2 hacks/config/xmatrix.xml.h:15
-#: hacks/config/xplanet.xml.h:59 hacks/config/xrayswarm.xml.h:3
-#: hacks/config/zoom.xml.h:6
-msgid "Slow"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:10 hacks/config/anemotaxis.xml.h:12
-#: hacks/config/ant.xml.h:17 hacks/config/antinspect.xml.h:7
-#: hacks/config/antmaze.xml.h:6 hacks/config/antspotlight.xml.h:6
-#: hacks/config/apollonian.xml.h:12 hacks/config/attraction.xml.h:28
-#: hacks/config/atunnel.xml.h:7 hacks/config/barcode.xml.h:7
-#: hacks/config/blaster.xml.h:9 hacks/config/blinkbox.xml.h:9
-#: hacks/config/blocktube.xml.h:11 hacks/config/boing.xml.h:12
-#: hacks/config/bouboule.xml.h:9 hacks/config/boxfit.xml.h:14
-#: hacks/config/braid.xml.h:12 hacks/config/bubble3d.xml.h:7
-#: hacks/config/bubbles.xml.h:11 hacks/config/bumps.xml.h:5
-#: hacks/config/cage.xml.h:6 hacks/config/celtic.xml.h:9
-#: hacks/config/circuit.xml.h:11 hacks/config/cloudlife.xml.h:13
-#: hacks/config/compass.xml.h:5 hacks/config/coral.xml.h:14
-#: hacks/config/critical.xml.h:7 hacks/config/crystal.xml.h:12
-#: hacks/config/cubenetic.xml.h:24 hacks/config/cynosure.xml.h:10
-#: hacks/config/dangerball.xml.h:6 hacks/config/decayscreen.xml.h:18
-#: hacks/config/deluxe.xml.h:9 hacks/config/demon.xml.h:10
-#: hacks/config/discrete.xml.h:9 hacks/config/distort.xml.h:13
-#: hacks/config/drift.xml.h:13 hacks/config/endgame.xml.h:6
-#: hacks/config/engine.xml.h:16 hacks/config/epicycle.xml.h:11
-#: hacks/config/eruption.xml.h:20 hacks/config/euler2d.xml.h:15
-#: hacks/config/extrusion.xml.h:13 hacks/config/fadeplot.xml.h:10
-#: hacks/config/fireworkx.xml.h:11 hacks/config/flag.xml.h:9
-#: hacks/config/flame.xml.h:15 hacks/config/flipflop.xml.h:7
-#: hacks/config/flipscreen3d.xml.h:7 hacks/config/fliptext.xml.h:14
-#: hacks/config/flow.xml.h:12 hacks/config/fluidballs.xml.h:20
-#: hacks/config/forest.xml.h:6 hacks/config/fuzzyflakes.xml.h:17
-#: hacks/config/galaxy.xml.h:12 hacks/config/glblur.xml.h:16
-#: hacks/config/glforestfire.xml.h:15 hacks/config/glplanet.xml.h:10
-#: hacks/config/gltext.xml.h:17 hacks/config/goop.xml.h:11
-#: hacks/config/grav.xml.h:9 hacks/config/greynetic.xml.h:4
-#: hacks/config/halo.xml.h:11 hacks/config/hopalong.xml.h:23
-#: hacks/config/hyperball.xml.h:9 hacks/config/hypercube.xml.h:8
-#: hacks/config/ifs.xml.h:14 hacks/config/interaggregate.xml.h:5
-#: hacks/config/intermomentary.xml.h:5 hacks/config/jigsaw.xml.h:7
-#: hacks/config/juggle.xml.h:9 hacks/config/julia.xml.h:10
-#: hacks/config/kaleidescope.xml.h:8 hacks/config/klein.xml.h:8
-#: hacks/config/kumppa.xml.h:9 hacks/config/lament.xml.h:7
-#: hacks/config/laser.xml.h:11 hacks/config/lavalite.xml.h:30
-#: hacks/config/lightning.xml.h:6 hacks/config/lisa.xml.h:9
-#: hacks/config/lissie.xml.h:11 hacks/config/lmorph.xml.h:12
-#: hacks/config/loop.xml.h:9 hacks/config/memscroller.xml.h:8
-#: hacks/config/menger.xml.h:18 hacks/config/metaballs.xml.h:15
-#: hacks/config/mirrorblob.xml.h:20 hacks/config/mismunch.xml.h:12
-#: hacks/config/moebius.xml.h:10 hacks/config/moire2.xml.h:7
-#: hacks/config/molecule.xml.h:25 hacks/config/morph3d.xml.h:7
-#: hacks/config/mountain.xml.h:8 hacks/config/munch.xml.h:9
-#: hacks/config/nerverot.xml.h:22 hacks/config/noof.xml.h:6
-#: hacks/config/pacman.xml.h:6 hacks/config/penrose.xml.h:9
-#: hacks/config/petri.xml.h:25 hacks/config/phosphor.xml.h:8
-#: hacks/config/piecewise.xml.h:11 hacks/config/pipes.xml.h:16
-#: hacks/config/polyominoes.xml.h:11 hacks/config/pong.xml.h:5
-#: hacks/config/popsquares.xml.h:6 hacks/config/providence.xml.h:7
-#: hacks/config/pulsar.xml.h:17 hacks/config/qix.xml.h:22
-#: hacks/config/queens.xml.h:6 hacks/config/rotor.xml.h:12
-#: hacks/config/rubik.xml.h:11 hacks/config/sballs.xml.h:14
-#: hacks/config/shadebobs.xml.h:10 hacks/config/sierpinski.xml.h:9
-#: hacks/config/sierpinski3d.xml.h:10 hacks/config/slidescreen.xml.h:7
-#: hacks/config/slip.xml.h:9 hacks/config/speedmine.xml.h:15
-#: hacks/config/sphere.xml.h:6 hacks/config/spheremonics.xml.h:22
-#: hacks/config/spiral.xml.h:10 hacks/config/spotlight.xml.h:5
-#: hacks/config/sproingies.xml.h:8 hacks/config/squiral.xml.h:16
-#: hacks/config/stairs.xml.h:5 hacks/config/starfish.xml.h:9
-#: hacks/config/strange.xml.h:5 hacks/config/substrate.xml.h:16
-#: hacks/config/superquadrics.xml.h:10 hacks/config/swirl.xml.h:7
-#: hacks/config/t3d.xml.h:13 hacks/config/tangram.xml.h:5
-#: hacks/config/thornbird.xml.h:8 hacks/config/triangle.xml.h:6
-#: hacks/config/truchet.xml.h:3 hacks/config/twang.xml.h:10
-#: hacks/config/vines.xml.h:5 hacks/config/whirlygig.xml.h:13
-#: hacks/config/worm.xml.h:8 hacks/config/xearth.xml.h:25
-#: hacks/config/xflame.xml.h:6 hacks/config/xjack.xml.h:3
-#: hacks/config/xmatrix.xml.h:18 hacks/config/xplanet.xml.h:60
-#: hacks/config/xrayswarm.xml.h:4 hacks/config/zoom.xml.h:7
-msgid "Speed"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:11
-msgid "Tentacles"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:12 hacks/config/cubestorm.xml.h:11
-#: hacks/config/deluxe.xml.h:10 hacks/config/fuzzyflakes.xml.h:18
-#: hacks/config/glknots.xml.h:19 hacks/config/lmorph.xml.h:13
-#: hacks/config/pong.xml.h:7 hacks/config/starfish.xml.h:11
-#: hacks/config/thornbird.xml.h:9
-msgid "Thick"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:13 hacks/config/fuzzyflakes.xml.h:19
-#: hacks/config/glknots.xml.h:20 hacks/config/moire2.xml.h:8
-#: hacks/config/thornbird.xml.h:10
-msgid "Thickness"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:14 hacks/config/cubestorm.xml.h:12
-#: hacks/config/deluxe.xml.h:11 hacks/config/fuzzyflakes.xml.h:20
-#: hacks/config/glknots.xml.h:21 hacks/config/lmorph.xml.h:14
-#: hacks/config/pong.xml.h:8 hacks/config/starfish.xml.h:12
-#: hacks/config/thornbird.xml.h:11
-msgid "Thin"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:15
-msgid "Turn speed"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:16 hacks/config/ant.xml.h:22
-#: hacks/config/apollonian.xml.h:13 hacks/config/attraction.xml.h:32
-#: hacks/config/bouboule.xml.h:11 hacks/config/braid.xml.h:13
-#: hacks/config/critical.xml.h:8 hacks/config/crystal.xml.h:13
-#: hacks/config/cynosure.xml.h:11 hacks/config/deco.xml.h:10
-#: hacks/config/deluxe.xml.h:14 hacks/config/demon.xml.h:13
-#: hacks/config/discrete.xml.h:11 hacks/config/drift.xml.h:14
-#: hacks/config/epicycle.xml.h:13 hacks/config/euler2d.xml.h:17
-#: hacks/config/fadeplot.xml.h:12 hacks/config/flag.xml.h:13
-#: hacks/config/flame.xml.h:16 hacks/config/flow.xml.h:15
-#: hacks/config/forest.xml.h:8 hacks/config/galaxy.xml.h:14
-#: hacks/config/grav.xml.h:11 hacks/config/halo.xml.h:13
-#: hacks/config/hopalong.xml.h:25 hacks/config/imsmap.xml.h:15
-#: hacks/config/interference.xml.h:19 hacks/config/julia.xml.h:12
-#: hacks/config/laser.xml.h:12 hacks/config/lightning.xml.h:8
-#: hacks/config/lisa.xml.h:12 hacks/config/lissie.xml.h:13
-#: hacks/config/loop.xml.h:12 hacks/config/metaballs.xml.h:16
-#: hacks/config/moire.xml.h:11 hacks/config/moire2.xml.h:9
-#: hacks/config/mountain.xml.h:9 hacks/config/nerverot.xml.h:23
-#: hacks/config/penrose.xml.h:10 hacks/config/polyominoes.xml.h:12
-#: hacks/config/rd-bomb.xml.h:20 hacks/config/rocks.xml.h:12
-#: hacks/config/rotor.xml.h:13 hacks/config/shadebobs.xml.h:12
-#: hacks/config/sierpinski.xml.h:12 hacks/config/slip.xml.h:12
-#: hacks/config/sphere.xml.h:8 hacks/config/spiral.xml.h:12
-#: hacks/config/squiral.xml.h:18 hacks/config/starfish.xml.h:14
-#: hacks/config/strange.xml.h:8 hacks/config/swirl.xml.h:9
-#: hacks/config/thornbird.xml.h:13 hacks/config/triangle.xml.h:8
-#: hacks/config/vines.xml.h:7 hacks/config/worm.xml.h:9
-#: hacks/config/xearth.xml.h:28 hacks/config/xfishtank.xml.h:11
-msgid "Two"
-msgstr ""
-
-#: hacks/config/anemone.xml.h:17
-msgid "Wiggling tentacles. By Gabriel Finch."
-msgstr ""
-
-#: hacks/config/anemone.xml.h:18
-msgid "Withdraw freqency"
-msgstr ""
-
-#: hacks/config/anemotaxis.xml.h:1
-msgid "Anemotaxis"
-msgstr ""
-
-#: hacks/config/anemotaxis.xml.h:2
-msgid ""
-"Anemotaxis demonstrates a search algorithm designed for locating a source of "
-"odor in turbulent atmosphere. The searcher is able to sense the odor and "
-"determine local instantaneous wind direction. The goal is to find the source "
-"in the shortest mean time. Written by Eugene Balkovsky."
-msgstr ""
-
-#: hacks/config/anemotaxis.xml.h:3
-msgid "Distance"
-msgstr ""
-
-#: hacks/config/anemotaxis.xml.h:4 hacks/config/hyperball.xml.h:1
-#: hacks/config/hypercube.xml.h:1
-msgid "Far"
-msgstr ""
-
-#: hacks/config/anemotaxis.xml.h:8 hacks/config/hyperball.xml.h:7
-#: hacks/config/hypercube.xml.h:6
-msgid "Near"
-msgstr ""
-
-#: hacks/config/anemotaxis.xml.h:9
-msgid "Searchers"
-msgstr ""
-
-#: hacks/config/anemotaxis.xml.h:11
-msgid "Sources"
-msgstr ""
-
-#: hacks/config/ant.xml.h:1
-msgid ""
-"A cellular automaton that is really a two-dimensional Turing machine: as the "
-"heads (``ants'') walk along the screen, they change pixel values in their "
-"path. Then, as they pass over changed pixels, their behavior is influenced. "
-"Written by David Bagley."
-msgstr ""
-
-#: hacks/config/ant.xml.h:2
-msgid "Ant"
-msgstr ""
-
-#: hacks/config/ant.xml.h:3
-msgid "Ant Size"
-msgstr ""
-
-#: hacks/config/ant.xml.h:4
-msgid "Ants Count"
-msgstr ""
-
-#: hacks/config/ant.xml.h:5
-msgid "Draw Eyes"
-msgstr ""
-
-#: hacks/config/ant.xml.h:7
-msgid "Four Sided Cells"
-msgstr ""
-
-#: hacks/config/ant.xml.h:8 hacks/config/attraction.xml.h:13
-#: hacks/config/cloudlife.xml.h:7 hacks/config/cube21.xml.h:8
-#: hacks/config/cubenetic.xml.h:11 hacks/config/demon.xml.h:5
-#: hacks/config/discrete.xml.h:3 hacks/config/distort.xml.h:5
-#: hacks/config/fadeplot.xml.h:5 hacks/config/flag.xml.h:4
-#: hacks/config/flow.xml.h:4 hacks/config/fluidballs.xml.h:12
-#: hacks/config/fuzzyflakes.xml.h:10 hacks/config/gleidescope.xml.h:7
-#: hacks/config/halftone.xml.h:8 hacks/config/hopalong.xml.h:13
-#: hacks/config/interference.xml.h:11 hacks/config/julia.xml.h:5
-#: hacks/config/lissie.xml.h:4 hacks/config/loop.xml.h:2
-#: hacks/config/moire.xml.h:4 hacks/config/piecewise.xml.h:5
-#: hacks/config/rd-bomb.xml.h:11 hacks/config/rorschach.xml.h:5
-#: hacks/config/rubik.xml.h:4 hacks/config/sierpinski.xml.h:3
-#: hacks/config/slip.xml.h:3
-msgid "Large"
-msgstr ""
-
-#: hacks/config/ant.xml.h:10
-msgid "Nine Sided Cells"
-msgstr ""
-
-#: hacks/config/ant.xml.h:12
-msgid "Random Cell Shape"
-msgstr ""
-
-#: hacks/config/ant.xml.h:13 hacks/config/speedmine.xml.h:11
-msgid "Sharp Turns"
-msgstr ""
-
-#: hacks/config/ant.xml.h:14
-msgid "Six Sided Cells"
-msgstr ""
-
-#: hacks/config/ant.xml.h:16 hacks/config/attraction.xml.h:27
-#: hacks/config/cloudlife.xml.h:12 hacks/config/cube21.xml.h:17
-#: hacks/config/cubenetic.xml.h:23 hacks/config/demon.xml.h:9
-#: hacks/config/discrete.xml.h:8 hacks/config/distort.xml.h:12
-#: hacks/config/fadeplot.xml.h:9 hacks/config/flag.xml.h:8
-#: hacks/config/flow.xml.h:11 hacks/config/fluidballs.xml.h:19
-#: hacks/config/fuzzyflakes.xml.h:16 hacks/config/gleidescope.xml.h:12
-#: hacks/config/halftone.xml.h:14 hacks/config/hopalong.xml.h:22
-#: hacks/config/interference.xml.h:18 hacks/config/julia.xml.h:9
-#: hacks/config/lissie.xml.h:10 hacks/config/loop.xml.h:8
-#: hacks/config/metaballs.xml.h:14 hacks/config/moire.xml.h:9
-#: hacks/config/piecewise.xml.h:10 hacks/config/rd-bomb.xml.h:18
-#: hacks/config/rorschach.xml.h:8 hacks/config/rubik.xml.h:10
-#: hacks/config/sierpinski.xml.h:8 hacks/config/slip.xml.h:8
-msgid "Small"
-msgstr ""
-
-#: hacks/config/ant.xml.h:18
-msgid "Three Sided Cells"
-msgstr ""
-
-#: hacks/config/ant.xml.h:19 hacks/config/demon.xml.h:12
-#: hacks/config/discrete.xml.h:10 hacks/config/fadeplot.xml.h:11
-#: hacks/config/flag.xml.h:12 hacks/config/flow.xml.h:14
-#: hacks/config/lissie.xml.h:12 hacks/config/loop.xml.h:11
-#: hacks/config/rubik.xml.h:12 hacks/config/sierpinski.xml.h:11
-#: hacks/config/slip.xml.h:11
-msgid "Timeout"
-msgstr ""
-
-#: hacks/config/ant.xml.h:20
-msgid "Truchet Lines"
-msgstr ""
-
-#: hacks/config/ant.xml.h:21
-msgid "Twelve Sided Cells"
-msgstr ""
-
-#: hacks/config/antinspect.xml.h:1
-msgid "AntInspect"
-msgstr ""
-
-#: hacks/config/antinspect.xml.h:2
-msgid "Draw Shadows"
-msgstr ""
-
-#: hacks/config/antinspect.xml.h:3
-msgid ""
-"Draws a trio of ants moving their spheres around a circle. Written by Blair "
-"Tennessy."
-msgstr ""
-
-#: hacks/config/antinspect.xml.h:5 hacks/config/antmaze.xml.h:4
-#: hacks/config/antspotlight.xml.h:4 hacks/config/atlantis.xml.h:11
-#: hacks/config/atunnel.xml.h:5 hacks/config/blocktube.xml.h:8
-#: hacks/config/boing.xml.h:8 hacks/config/boxed.xml.h:14
-#: hacks/config/bubble3d.xml.h:5 hacks/config/cage.xml.h:3
-#: hacks/config/carousel.xml.h:12 hacks/config/circuit.xml.h:9
-#: hacks/config/cube21.xml.h:13 hacks/config/cubenetic.xml.h:21
-#: hacks/config/cubestorm.xml.h:7 hacks/config/dangerball.xml.h:4
-#: hacks/config/endgame.xml.h:4 hacks/config/engine.xml.h:14
-#: hacks/config/extrusion.xml.h:10 hacks/config/flipflop.xml.h:4
-#: hacks/config/flipscreen3d.xml.h:5 hacks/config/fliptext.xml.h:12
-#: hacks/config/fluidballs.xml.h:17 hacks/config/flurry.xml.h:9
-#: hacks/config/flyingtoasters.xml.h:10 hacks/config/gears.xml.h:6
-#: hacks/config/gflux.xml.h:11 hacks/config/glblur.xml.h:13
-#: hacks/config/gleidescope.xml.h:10 hacks/config/glforestfire.xml.h:13
-#: hacks/config/glhanoi.xml.h:7 hacks/config/glknots.xml.h:16
-#: hacks/config/glmatrix.xml.h:17 hacks/config/glplanet.xml.h:7
-#: hacks/config/glslideshow.xml.h:19 hacks/config/glsnake.xml.h:10
-#: hacks/config/gltext.xml.h:14 hacks/config/hypertorus.xml.h:17
-#: hacks/config/jigglypuff.xml.h:15 hacks/config/juggler3d.xml.h:11
-#: hacks/config/klein.xml.h:6 hacks/config/lament.xml.h:5
-#: hacks/config/lavalite.xml.h:26 hacks/config/menger.xml.h:15
-#: hacks/config/mirrorblob.xml.h:17 hacks/config/moebius.xml.h:6
-#: hacks/config/molecule.xml.h:22 hacks/config/morph3d.xml.h:5
-#: hacks/config/noof.xml.h:4 hacks/config/pinion.xml.h:12
-#: hacks/config/pipes.xml.h:14 hacks/config/polyhedra.xml.h:110
-#: hacks/config/polytopes.xml.h:18 hacks/config/providence.xml.h:4
-#: hacks/config/pulsar.xml.h:14 hacks/config/queens.xml.h:3
-#: hacks/config/rubik.xml.h:6 hacks/config/sballs.xml.h:12
-#: hacks/config/sierpinski3d.xml.h:6 hacks/config/spheremonics.xml.h:18
-#: hacks/config/sproingies.xml.h:4 hacks/config/stairs.xml.h:2
-#: hacks/config/starwars.xml.h:11 hacks/config/superquadrics.xml.h:7
-#: hacks/config/timetunnel.xml.h:9
-msgid "Show Frames-per-Second"
-msgstr ""
-
-#: hacks/config/antmaze.xml.h:1
-msgid "AntMaze"
-msgstr ""
-
-#: hacks/config/antmaze.xml.h:2
-msgid ""
-"Antmaze draws a few views of a few ants walking around in a simple maze. "
-"Written by Blair Tennessy."
-msgstr ""
-
-#: hacks/config/antspotlight.xml.h:1
-msgid "AntSpotlight"
-msgstr ""
-
-#: hacks/config/antspotlight.xml.h:2
-msgid ""
-"Antspotlight draws an ant (with a headlight) who walks on top of an image of "
-"your desktop or other image. Written by Blair Tennessy."
-msgstr ""
-
-#: hacks/config/apollonian.xml.h:1
-msgid "Apollonian"
-msgstr ""
-
-#: hacks/config/apollonian.xml.h:2
-msgid "Deep"
-msgstr ""
-
-#: hacks/config/apollonian.xml.h:3
-msgid "Depth"
-msgstr ""
-
-#: hacks/config/apollonian.xml.h:4
-msgid "Draw Labels"
-msgstr ""
-
-#: hacks/config/apollonian.xml.h:6
-msgid "Include Alternate Geometries"
-msgstr ""
-
-#: hacks/config/apollonian.xml.h:9
-msgid ""
-"Packs a large circle with smaller circles, demonstrating the Descartes "
-"Circle Theorem. Written by Allan R. Wilks and David Bagley."
-msgstr ""
-
-#: hacks/config/apollonian.xml.h:10
-msgid "Shallow"
-msgstr ""
-
-#: hacks/config/apple2.xml.h:1
-msgid "Apple ]["
-msgstr ""
-
-#: hacks/config/apple2.xml.h:2
-msgid "Basic Programming Mode"
-msgstr ""
-
-#: hacks/config/apple2.xml.h:3 hacks/config/halo.xml.h:8
-#: hacks/config/imsmap.xml.h:11
-msgid "Random Mode"
-msgstr ""
-
-#: hacks/config/apple2.xml.h:4
-msgid ""
-"Simulates an original Apple ][ Plus computer in all its 1979 glory. It also "
-"reproduces the appearance of display on a color television set of the "
-"period. In \"Text Mode\", it displays the output of a program, or the "
-"contents of a file or URL, as configured on the \"Advanced\" tab of the main "
-"Screensaver Preferences window. In \"Slideshow Mode\", it chooses a number "
-"of images from the image source you configured into XScreenSaver and "
-"displays them within the limitations of the Apple ][ display hardware. (Six "
-"available colors in hi-res mode!) In \"Basic Programming Mode\", a simulated "
-"user types in a BASIC program and runs it. By Trevor Blackwell."
-msgstr ""
-
-#: hacks/config/apple2.xml.h:5
-msgid "Slideshow Mode"
-msgstr ""
-
-#: hacks/config/apple2.xml.h:6
-msgid "Text Mode"
-msgstr ""
-
-#: hacks/config/apple2.xml.h:7 hacks/config/fliptext.xml.h:17
-#: hacks/config/fontglide.xml.h:15 hacks/config/noseguy.xml.h:7
-#: hacks/config/phosphor.xml.h:9 hacks/config/starwars.xml.h:17
-msgid "Text Program"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:1
-msgid "Agressive"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:2
-msgid "Atlantis"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:3
-msgid "Clear Water"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:5
-msgid "Flat Background"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:6
-msgid "Gradient Background"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:7
-msgid "Number of Sharks"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:8
-msgid "Shark Proximity"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:9
-msgid "Shark Speed"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:10
-msgid "Shimmering Water"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:12
-msgid "Shy"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:14 hacks/config/cage.xml.h:5
-#: hacks/config/extrusion.xml.h:12 hacks/config/gears.xml.h:8
-#: hacks/config/glplanet.xml.h:9 hacks/config/glsnake.xml.h:13
-#: hacks/config/gltext.xml.h:16 hacks/config/menger.xml.h:17
-#: hacks/config/mismunch.xml.h:11 hacks/config/molecule.xml.h:24
-#: hacks/config/munch.xml.h:8 hacks/config/providence.xml.h:6
-#: hacks/config/sierpinski3d.xml.h:9 hacks/config/speedmine.xml.h:14
-#: hacks/config/spheremonics.xml.h:21 hacks/config/sproingies.xml.h:7
-#: hacks/config/stairs.xml.h:4 hacks/config/stonerview.xml.h:2
-#: hacks/config/superquadrics.xml.h:9 hacks/config/webcollage.xml.h:8
-msgid "Solid"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:15
-msgid ""
-"This is xfishtank writ large: a GL animation of a number of sharks, "
-"dolphins, and whales. The swimming motions are great. Originally written by "
-"Mark Kilgard."
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:16
-msgid "Whale Speed"
-msgstr ""
-
-#: hacks/config/atlantis.xml.h:17 hacks/config/atunnel.xml.h:10
-#: hacks/config/blinkbox.xml.h:10 hacks/config/blocktube.xml.h:13
-#: hacks/config/boing.xml.h:15 hacks/config/boxed.xml.h:17
-#: hacks/config/cage.xml.h:9 hacks/config/crackberg.xml.h:23
-#: hacks/config/cube21.xml.h:28 hacks/config/cubestorm.xml.h:14
-#: hacks/config/dangerball.xml.h:11 hacks/config/extrusion.xml.h:19
-#: hacks/config/flipflop.xml.h:8 hacks/config/flyingtoasters.xml.h:14
-#: hacks/config/gears.xml.h:11 hacks/config/glforestfire.xml.h:20
-#: hacks/config/glhanoi.xml.h:10 hacks/config/glknots.xml.h:23
-#: hacks/config/glplanet.xml.h:15 hacks/config/glsnake.xml.h:15
-#: hacks/config/gltext.xml.h:21 hacks/config/jigglypuff.xml.h:25
-#: hacks/config/juggler3d.xml.h:13 hacks/config/lament.xml.h:9
-#: hacks/config/lavalite.xml.h:32 hacks/config/menger.xml.h:21
-#: hacks/config/mirrorblob.xml.h:23 hacks/config/moebius.xml.h:11
-#: hacks/config/molecule.xml.h:27 hacks/config/pinion.xml.h:15
-#: hacks/config/polyhedra.xml.h:166 hacks/config/providence.xml.h:9
-#: hacks/config/pulsar.xml.h:20 hacks/config/queens.xml.h:7
-#: hacks/config/sballs.xml.h:18 hacks/config/sierpinski3d.xml.h:12
-#: hacks/config/speedmine.xml.h:18 hacks/config/spheremonics.xml.h:26
-#: hacks/config/sproingies.xml.h:10 hacks/config/stairs.xml.h:7
-#: hacks/config/stonerview.xml.h:4 hacks/config/superquadrics.xml.h:12
-#: hacks/config/tangram.xml.h:8
-msgid "Wireframe"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:1
-msgid "Attraction"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:2
-msgid "Ball Count"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:3
-msgid "Ball Mass"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:4 hacks/config/fluidballs.xml.h:3
-msgid "Balls"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:5
-msgid "Bounce Off Walls"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:6 hacks/config/hopalong.xml.h:1
-#: hacks/config/interference.xml.h:5 hacks/config/qix.xml.h:2
-#: hacks/config/wander.xml.h:3
-msgid "Color Contrast"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:7
-msgid "Environmental Viscosity"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:9
-msgid "Filled Splines"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:10 hacks/config/carousel.xml.h:7
-#: hacks/config/ccurve.xml.h:9 hacks/config/cloudlife.xml.h:5
-#: hacks/config/cubenetic.xml.h:10 hacks/config/euler2d.xml.h:5
-#: hacks/config/flame.xml.h:9 hacks/config/fliptext.xml.h:9
-#: hacks/config/glslideshow.xml.h:13 hacks/config/goop.xml.h:6
-#: hacks/config/halftone.xml.h:7 hacks/config/hopalong.xml.h:10
-#: hacks/config/hyperball.xml.h:3 hacks/config/hypercube.xml.h:3
-#: hacks/config/interference.xml.h:8 hacks/config/jigglypuff.xml.h:8
-#: hacks/config/kumppa.xml.h:4 hacks/config/lavalite.xml.h:12
-#: hacks/config/nerverot.xml.h:11 hacks/config/petri.xml.h:8
-#: hacks/config/pyro.xml.h:5 hacks/config/qix.xml.h:10
-#: hacks/config/speedmine.xml.h:5 hacks/config/spheremonics.xml.h:6
-#: hacks/config/spiral.xml.h:4 hacks/config/squiral.xml.h:6
-#: hacks/config/superquadrics.xml.h:5 hacks/config/t3d.xml.h:7
-#: hacks/config/twang.xml.h:5 hacks/config/wander.xml.h:8
-#: hacks/config/xmountains.xml.h:17
-msgid "High"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:11
-msgid "Ignore Screen Edges"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:12
-msgid "Inward"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:14
-msgid ""
-"Like qix, this uses a simple simple motion model to generate many different "
-"display modes. The control points attract each other up to a certain "
-"distance, and then begin to repel each other. The attraction/repulsion is "
-"proportional to the distance between any two particles, similar to the "
-"strong and weak nuclear forces. One of the most interesting ways to watch "
-"this hack is simply as bouncing balls, because their motions and "
-"interactions with each other are so odd. Sometimes two balls will get into a "
-"tight orbit around each other, to be interrupted later by a third, or by the "
-"edge of the screen. It looks quite chaotic. Written by Jamie Zawinski, based "
-"on Lisp code by John Pezaris."
-msgstr ""
-
-#: hacks/config/attraction.xml.h:15 hacks/config/deluxe.xml.h:5
-#: hacks/config/lmorph.xml.h:7 hacks/config/pedal.xml.h:5
-#: hacks/config/starfish.xml.h:4 hacks/config/whirlygig.xml.h:10
-msgid "Lines"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:16 hacks/config/blocktube.xml.h:5
-#: hacks/config/braid.xml.h:6 hacks/config/celtic.xml.h:4
-#: hacks/config/crackberg.xml.h:13 hacks/config/cube21.xml.h:9
-#: hacks/config/cynosure.xml.h:5 hacks/config/drift.xml.h:8
-#: hacks/config/eruption.xml.h:11 hacks/config/euler2d.xml.h:6
-#: hacks/config/fiberlamp.xml.h:5 hacks/config/fireflies.xml.h:21
-#: hacks/config/flow.xml.h:6 hacks/config/fontglide.xml.h:8
-#: hacks/config/galaxy.xml.h:5 hacks/config/juggle.xml.h:4
-#: hacks/config/klein.xml.h:4 hacks/config/laser.xml.h:5
-#: hacks/config/menger.xml.h:4 hacks/config/metaballs.xml.h:5
-#: hacks/config/mismunch.xml.h:3 hacks/config/munch.xml.h:4
-#: hacks/config/nerverot.xml.h:13 hacks/config/petri.xml.h:9
-#: hacks/config/polyominoes.xml.h:4 hacks/config/rotor.xml.h:5
-#: hacks/config/shadebobs.xml.h:4 hacks/config/sierpinski3d.xml.h:3
-#: hacks/config/spheremonics.xml.h:7 hacks/config/substrate.xml.h:11
-#: hacks/config/timetunnel.xml.h:6 hacks/config/wander.xml.h:10
-#: hacks/config/whirlwindwarp.xml.h:3
-msgid "Long"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:17 hacks/config/carousel.xml.h:9
-#: hacks/config/ccurve.xml.h:10 hacks/config/cloudlife.xml.h:8
-#: hacks/config/cubenetic.xml.h:12 hacks/config/euler2d.xml.h:7
-#: hacks/config/flame.xml.h:10 hacks/config/fliptext.xml.h:10
-#: hacks/config/glslideshow.xml.h:16 hacks/config/goop.xml.h:7
-#: hacks/config/halftone.xml.h:9 hacks/config/hopalong.xml.h:14
-#: hacks/config/hyperball.xml.h:6 hacks/config/hypercube.xml.h:5
-#: hacks/config/interference.xml.h:12 hacks/config/jigglypuff.xml.h:11
-#: hacks/config/kumppa.xml.h:6 hacks/config/lavalite.xml.h:14
-#: hacks/config/nerverot.xml.h:14 hacks/config/petri.xml.h:10
-#: hacks/config/pyro.xml.h:7 hacks/config/qix.xml.h:13
-#: hacks/config/speedmine.xml.h:6 hacks/config/spheremonics.xml.h:8
-#: hacks/config/spiral.xml.h:5 hacks/config/squiral.xml.h:8
-#: hacks/config/superquadrics.xml.h:6 hacks/config/t3d.xml.h:8
-#: hacks/config/twang.xml.h:7 hacks/config/wander.xml.h:11
-msgid "Low"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:20
-msgid "Orbital Mode"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:21
-msgid "Outward"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:22
-msgid "Polygons"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:23 hacks/config/fuzzyflakes.xml.h:13
-#: hacks/config/spotlight.xml.h:3 hacks/config/xplanet.xml.h:55
-msgid "Radius"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:24
-msgid "Repulsion Threshold"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:25 hacks/config/blocktube.xml.h:7
-#: hacks/config/braid.xml.h:10 hacks/config/celtic.xml.h:7
-#: hacks/config/crackberg.xml.h:17 hacks/config/cube21.xml.h:12
-#: hacks/config/cynosure.xml.h:8 hacks/config/drift.xml.h:11
-#: hacks/config/eruption.xml.h:18 hacks/config/euler2d.xml.h:12
-#: hacks/config/fiberlamp.xml.h:7 hacks/config/fireflies.xml.h:34
-#: hacks/config/flow.xml.h:9 hacks/config/galaxy.xml.h:9
-#: hacks/config/juggle.xml.h:7 hacks/config/klein.xml.h:5
-#: hacks/config/laser.xml.h:9 hacks/config/menger.xml.h:14
-#: hacks/config/metaballs.xml.h:12 hacks/config/mismunch.xml.h:8
-#: hacks/config/munch.xml.h:6 hacks/config/nerverot.xml.h:19
-#: hacks/config/petri.xml.h:22 hacks/config/polyominoes.xml.h:9
-#: hacks/config/rotor.xml.h:9 hacks/config/shadebobs.xml.h:8
-#: hacks/config/sierpinski3d.xml.h:5 hacks/config/spheremonics.xml.h:17
-#: hacks/config/substrate.xml.h:14 hacks/config/timetunnel.xml.h:8
-#: hacks/config/wander.xml.h:12 hacks/config/whirlwindwarp.xml.h:6
-msgid "Short"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:29
-msgid "Splines"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:30 hacks/config/fireflies.xml.h:42
-msgid "Tails"
-msgstr ""
-
-#: hacks/config/attraction.xml.h:31 hacks/config/euler2d.xml.h:16
-#: hacks/config/juggle.xml.h:10
-msgid "Trail Length"
-msgstr ""
-
-#: hacks/config/atunnel.xml.h:1
-msgid "Atunnel"
-msgstr ""
-
-#: hacks/config/atunnel.xml.h:2
-msgid ""
-"Draws an animation of a textured tunnel in GL. Requires OpenGL, and a "
-"machine with fast hardware support for texture maps. Written by Eric "
-"Lassauge and Roman Podobedov."
-msgstr ""
-
-#: hacks/config/atunnel.xml.h:4 hacks/config/distort.xml.h:9
-#: hacks/config/glforestfire.xml.h:10 hacks/config/lament.xml.h:4
-#: hacks/config/sballs.xml.h:6
-msgid "Normal"
-msgstr ""
-
-#: hacks/config/atunnel.xml.h:8 hacks/config/cube21.xml.h:24
-#: hacks/config/glforestfire.xml.h:18 hacks/config/lament.xml.h:8
-#: hacks/config/sballs.xml.h:17
-msgid "Untextured"
-msgstr ""
-
-#: hacks/config/atunnel.xml.h:9
-msgid "Use light"
-msgstr ""
-
-#: hacks/config/barcode.xml.h:1
-msgid "Barcode"
-msgstr ""
-
-#: hacks/config/barcode.xml.h:2
-msgid "Barcode Clock (24 Hour)"
-msgstr ""
-
-#: hacks/config/barcode.xml.h:3
-msgid "Barcode Clock (AM/PM)"
-msgstr ""
-
-#: hacks/config/barcode.xml.h:5
-msgid "Scrolling Barcodes"
-msgstr ""
-
-#: hacks/config/barcode.xml.h:8
-msgid ""
-"This draws a random sequence of colorful barcodes scrolling across your "
-"screen. CONSUME! By Dan Bornstein."
-msgstr ""
-
-#: hacks/config/blaster.xml.h:1
-msgid "Blaster"
-msgstr ""
-
-#: hacks/config/blaster.xml.h:2
-msgid ""
-"Draws a simulation of flying space-combat robots (cleverly disguised as "
-"colored circles) doing battle in front of a moving star field. Written by "
-"Jonathan Lin."
-msgstr ""
-
-#: hacks/config/blaster.xml.h:5 hacks/config/penetrate.xml.h:4
-msgid "Lasers"
-msgstr ""
-
-#: hacks/config/blaster.xml.h:7
-msgid "Robots"
-msgstr ""
-
-#: hacks/config/blaster.xml.h:10 hacks/config/glplanet.xml.h:11
-msgid "Stars"
-msgstr ""
-
-#: hacks/config/blinkbox.xml.h:1
-msgid "BlinkBox"
-msgstr ""
-
-#: hacks/config/blinkbox.xml.h:2
-msgid "Box Size"
-msgstr ""
-
-#: hacks/config/blinkbox.xml.h:3
-msgid "Dissolve"
-msgstr ""
-
-#: hacks/config/blinkbox.xml.h:4 hacks/config/phosphor.xml.h:3
-msgid "Fade"
-msgstr ""
-
-#: hacks/config/blinkbox.xml.h:6
-msgid "Motion Blur"
-msgstr ""
-
-#: hacks/config/blinkbox.xml.h:7
-msgid ""
-"Shows a ball contained inside of a bounding box. Colored blocks blink in "
-"when the ball hits the edges. Written by Jeremy English."
-msgstr ""
-
-#: hacks/config/blitspin.xml.h:1
-msgid "90 deg Rotation Speed"
-msgstr ""
-
-#: hacks/config/blitspin.xml.h:2
-msgid "Bitmap to rotate"
-msgstr ""
-
-#: hacks/config/blitspin.xml.h:3
-msgid "BlitSpin"
-msgstr ""
-
-#: hacks/config/blitspin.xml.h:5
-msgid "Fuzzy Rotation Speed"
-msgstr ""
-
-#: hacks/config/blitspin.xml.h:6
-msgid "Grab Screen"
-msgstr ""
-
-#: hacks/config/blitspin.xml.h:8
-msgid ""
-"The ``blitspin'' hack repeatedly rotates a bitmap by 90 degrees by using "
-"logical operations: the bitmap is divided into quadrants, and the quadrants "
-"are shifted clockwise. Then the same thing is done again with progressively "
-"smaller quadrants, except that all sub-quadrants of a given size are rotated "
-"in parallel. Written by Jamie Zawinski based on some cool SmallTalk code "
-"seen in in Byte Magazine in 1981. As you watch it, the image appears to "
-"dissolve into static and then reconstitute itself, but rotated. You can "
-"provide the image to use, as an XBM or XPM file, or tell it to grab a screen "
-"image and rotate that."
-msgstr ""
-
-#: hacks/config/blocktube.xml.h:1
-msgid "BlockTube"
-msgstr ""
-
-#: hacks/config/blocktube.xml.h:2 hacks/config/timetunnel.xml.h:3
-msgid "Color Change Time"
-msgstr ""
-
-#: hacks/config/blocktube.xml.h:3
-msgid "Color Hold Time"
-msgstr ""
-
-#: hacks/config/blocktube.xml.h:6
-msgid "Reflective Blocks"
-msgstr ""
-
-#: hacks/config/blocktube.xml.h:10
-msgid "Solid Blocks"
-msgstr ""
-
-#: hacks/config/blocktube.xml.h:12
-msgid ""
-"This hack draws a swirling, falling tunnel of reflective slabs. They fade "
-"from hue to hue. Written by Lars R. Damerow."
-msgstr ""
-
-#: hacks/config/boing.xml.h:1
-msgid "Boing"
-msgstr ""
-
-#: hacks/config/boing.xml.h:3 hacks/config/boxed.xml.h:8
-#: hacks/config/fireflies.xml.h:17 hacks/config/pinion.xml.h:7
-msgid "Huge"
-msgstr ""
-
-#: hacks/config/boing.xml.h:4 hacks/config/crackberg.xml.h:12
-msgid "Lighting"
-msgstr ""
-
-#: hacks/config/boing.xml.h:5
-msgid "Meridians"
-msgstr ""
-
-#: hacks/config/boing.xml.h:6
-msgid "Parallels"
-msgstr ""
-
-#: hacks/config/boing.xml.h:7
-msgid "Scanlines"
-msgstr ""
-
-#: hacks/config/boing.xml.h:9 hacks/config/galaxy.xml.h:10
-#: hacks/config/lisa.xml.h:7 hacks/config/lissie.xml.h:8
-#: hacks/config/loop.xml.h:6 hacks/config/penrose.xml.h:7
-#: hacks/config/pong.xml.h:3 hacks/config/rotor.xml.h:10
-#: hacks/config/rubik.xml.h:8 hacks/config/sproingies.xml.h:5
-#: hacks/config/wander.xml.h:13 hacks/config/worm.xml.h:6
-msgid "Size"
-msgstr ""
-
-#: hacks/config/boing.xml.h:11
-msgid "Smoothing"
-msgstr ""
-
-#: hacks/config/boing.xml.h:13
-msgid ""
-"This bouncing ball is a clone of the first graphics demo for the Amiga 1000, "
-"which was written by Dale Luck and RJ Mical during a break at the 1984 "
-"Consumer Electronics Show (or so the legend goes.) This looks like the "
-"original Amiga demo if you turn off \"smoothing\" and \"lighting\" and turn "
-"on \"scanlines\". Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/boing.xml.h:14 hacks/config/boxed.xml.h:16
-#: hacks/config/fireflies.xml.h:43 hacks/config/pinion.xml.h:14
-msgid "Tiny"
-msgstr ""
-
-#: hacks/config/bouboule.xml.h:1
-msgid "Bouboule"
-msgstr ""
-
-#: hacks/config/bouboule.xml.h:2 hacks/config/rocks.xml.h:3
-msgid "Do Red/Blue 3D separation"
-msgstr ""
-
-#: hacks/config/bouboule.xml.h:7
-msgid "Number of Spots"
-msgstr ""
-
-#: hacks/config/bouboule.xml.h:10
-msgid ""
-"This draws what looks like a spinning, deforming balloon with varying-sized "
-"spots painted on its invisible surface. Written by Jeremie Petit."
-msgstr ""
-
-#: hacks/config/bouncingcow.xml.h:1
-msgid "A Cow. A Trampoline. Together, they fight crime. By Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/bouncingcow.xml.h:2 hacks/config/boxed.xml.h:1
-#: hacks/config/carousel.xml.h:3 hacks/config/ccurve.xml.h:3
-#: hacks/config/cubestorm.xml.h:1 hacks/config/flyingtoasters.xml.h:3
-#: hacks/config/fontglide.xml.h:1 hacks/config/gears.xml.h:1
-#: hacks/config/gflux.xml.h:1 hacks/config/glknots.xml.h:1
-#: hacks/config/glmatrix.xml.h:1 hacks/config/jigglypuff.xml.h:1
-#: hacks/config/pinion.xml.h:3 hacks/config/polyhedra.xml.h:3
-#: hacks/config/pyro.xml.h:1 hacks/config/rd-bomb.xml.h:6
-#: hacks/config/rocks.xml.h:1 hacks/config/starwars.xml.h:1
-#: hacks/config/wormhole.xml.h:1 hacks/config/xfishtank.xml.h:1
-msgid "Animation Speed"
-msgstr ""
-
-#: hacks/config/bouncingcow.xml.h:3
-msgid "Beefy Cow"
-msgstr ""
-
-#: hacks/config/bouncingcow.xml.h:4
-msgid "Bounce Speed"
-msgstr ""
-
-#: hacks/config/bouncingcow.xml.h:5
-msgid "BouncingCow"
-msgstr ""
-
-#: hacks/config/bouncingcow.xml.h:7
-msgid "Herd"
-msgstr ""
-
-#: hacks/config/bouncingcow.xml.h:8
-msgid "Moo"
-msgstr ""
-
-#: hacks/config/bouncingcow.xml.h:9
-msgid "Number of Cows"
-msgstr ""
-
-#: hacks/config/bouncingcow.xml.h:11
-msgid "Wireframe Cow"
-msgstr ""
-
-#: hacks/config/boxed.xml.h:2 hacks/config/fluidballs.xml.h:2
-msgid "Ball Size"
-msgstr ""
-
-#: hacks/config/boxed.xml.h:3
-msgid "Boxed"
-msgstr ""
-
-#: hacks/config/boxed.xml.h:4
-msgid ""
-"Draws a box full of 3D bouncing balls that explode. Written by Sander van "
-"Grieken."
-msgstr ""
-
-#: hacks/config/boxed.xml.h:5
-msgid "Explosion Force"
-msgstr ""
-
-#: hacks/config/boxed.xml.h:9 hacks/config/pipes.xml.h:9
-#: hacks/config/substrate.xml.h:12 hacks/config/wormhole.xml.h:4
-msgid "Lots"
-msgstr ""
-
-#: hacks/config/boxed.xml.h:10 hacks/config/cubestorm.xml.h:5
-#: hacks/config/fontglide.xml.h:9 hacks/config/glknots.xml.h:6
-#: hacks/config/polyhedra.xml.h:84
-msgid "Motion Speed"
-msgstr ""
-
-#: hacks/config/boxed.xml.h:11
-msgid "Nuke"
-msgstr ""
-
-#: hacks/config/boxed.xml.h:12
-msgid "Number of Balls"
-msgstr ""
-
-#: hacks/config/boxed.xml.h:13 hacks/config/hopalong.xml.h:18
-msgid "Popcorn"
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:1 hacks/config/popsquares.xml.h:1
-msgid "Border"
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:2
-msgid "BoxFit"
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:3 hacks/config/cubenetic.xml.h:1
-msgid "Boxes"
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:4
-msgid "Boxes Only"
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:5
-msgid "Boxes or Circles"
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:6
-msgid "Circles Only"
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:7
-msgid "Color Gradient"
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:9
-#, fuzzy
-msgid "Grab Images"
-msgstr "Protector de pantalla"
-
-#: hacks/config/boxfit.xml.h:10
-msgid "Grow By"
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:11
-msgid ""
-"Packs the screen with growing squares or circles, colored according to a "
-"horizontal or vertical gradient, or according to the colors of the desktop "
-"or a loaded image file. The objects grow until they touch, then stop. When "
-"the screen is full, they shrink away and the process restarts. Written by "
-"Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/boxfit.xml.h:13 hacks/config/xearth.xml.h:23
-msgid "Spacing"
-msgstr ""
-
-#: hacks/config/braid.xml.h:1
-msgid "Braid"
-msgstr ""
-
-#: hacks/config/braid.xml.h:2
-msgid ""
-"Draws random color-cycling inter-braided concentric circles. Written by John "
-"Neil."
-msgstr ""
-
-#: hacks/config/braid.xml.h:3 hacks/config/bsod.xml.h:9
-#: hacks/config/coral.xml.h:6 hacks/config/cynosure.xml.h:3
-#: hacks/config/deco.xml.h:4 hacks/config/drift.xml.h:2
-#: hacks/config/epicycle.xml.h:3 hacks/config/eruption.xml.h:3
-#: hacks/config/euler2d.xml.h:1 hacks/config/flame.xml.h:5
-#: hacks/config/galaxy.xml.h:2 hacks/config/glsnake.xml.h:5
-#: hacks/config/helix.xml.h:3 hacks/config/hopalong.xml.h:2
-#: hacks/config/imsmap.xml.h:6 hacks/config/klein.xml.h:1
-#: hacks/config/laser.xml.h:2 hacks/config/menger.xml.h:2
-#: hacks/config/metaballs.xml.h:3 hacks/config/mismunch.xml.h:1
-#: hacks/config/moire.xml.h:3 hacks/config/molecule.xml.h:10
-#: hacks/config/munch.xml.h:2 hacks/config/nerverot.xml.h:8
-#: hacks/config/pedal.xml.h:3 hacks/config/polyhedra.xml.h:16
-#: hacks/config/polyominoes.xml.h:1 hacks/config/rorschach.xml.h:3
-#: hacks/config/rotzoomer.xml.h:5 hacks/config/shadebobs.xml.h:2
-#: hacks/config/sierpinski3d.xml.h:1 hacks/config/spheremonics.xml.h:4
-#: hacks/config/starfish.xml.h:2 hacks/config/substrate.xml.h:6
-#: hacks/config/vidwhacker.xml.h:3 hacks/config/wander.xml.h:7
-#: hacks/config/xspirograph.xml.h:3
-msgid "Duration"
-msgstr ""
-
-#: hacks/config/braid.xml.h:5 hacks/config/epicycle.xml.h:7
-#: hacks/config/nerverot.xml.h:12
-msgid "Line Thickness"
-msgstr ""
-
-#: hacks/config/braid.xml.h:8
-msgid "Max Rings"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:1 hacks/config/molecule.xml.h:1
-#: hacks/config/vidwhacker.xml.h:1
-msgid "2 minutes"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:2 hacks/config/molecule.xml.h:2
-msgid "5 seconds"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:3
-msgid "AmigaDOS"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:4
-msgid "Apple II"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:5
-msgid "Atari"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:6
-msgid "BSD"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:7
-msgid "BSOD"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:8
-msgid ""
-"BSOD stands for ``Blue Screen of Death.'' The finest in personal computer "
-"emulation, this hack simulates popular screen savers from a number of less "
-"robust operating systems. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/bsod.xml.h:10
-msgid "HPUX"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:11
-msgid "HVX/GCOS6"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:12
-msgid "Linux (fsck)"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:13
-msgid "Linux (hppa)"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:14
-msgid "Linux (sparc)"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:15
-msgid "MS-DOS"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:16
-msgid "Mac Bomb"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:17
-msgid "MacOS X"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:18
-msgid "MacsBug"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:19
-msgid "NCD X Terminal  "
-msgstr ""
-
-#: hacks/config/bsod.xml.h:20
-msgid "Nvidia"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:21
-msgid "OS/2"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:22
-msgid "OS/390"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:23
-msgid "SCO"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:24
-msgid "Sad Mac"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:25
-msgid "Solaris"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:26
-msgid "Tru64"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:27
-msgid "VMS"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:28
-msgid "Windows 2000  "
-msgstr ""
-
-#: hacks/config/bsod.xml.h:29
-msgid "Windows 3.1"
-msgstr ""
-
-#: hacks/config/bsod.xml.h:30
-msgid "Windows NT"
-msgstr ""
-
-#: hacks/config/bubble3d.xml.h:1
-msgid "Bubble Color"
-msgstr ""
-
-#: hacks/config/bubble3d.xml.h:2
-msgid "Bubble3D"
-msgstr ""
-
-#: hacks/config/bubble3d.xml.h:3
-msgid ""
-"Draws a stream of rising, undulating 3D bubbles, rising toward the top of "
-"the screen, with nice specular reflections. Written by Richard Jones."
-msgstr ""
-
-#: hacks/config/bubble3d.xml.h:8
-msgid "Transparent Bubbles"
-msgstr ""
-
-#: hacks/config/bubbles.xml.h:1 hacks/config/xfishtank.xml.h:2
-msgid "Bubbles"
-msgstr ""
-
-#: hacks/config/bubbles.xml.h:2
-msgid "Bubbles Fall"
-msgstr ""
-
-#: hacks/config/bubbles.xml.h:3
-msgid "Bubbles Float"
-msgstr ""
-
-#: hacks/config/bubbles.xml.h:4
-msgid "Bubbles Rise"
-msgstr ""
-
-#: hacks/config/bubbles.xml.h:5
-msgid "Bubbles exist in three dimensions"
-msgstr ""
-
-#: hacks/config/bubbles.xml.h:6
-msgid "Don't hide bubbles when they pop"
-msgstr ""
-
-#: hacks/config/bubbles.xml.h:7
-msgid "Draw circles instead of pixmap bubbles"
-msgstr ""
-
-#: hacks/config/bubbles.xml.h:9
-msgid "Leave Trails"
-msgstr ""
-
-#: hacks/config/bubbles.xml.h:12
-msgid ""
-"This simulates the kind of bubble formation that happens when water boils:"
-"small bubbles appear, and as they get closer to each other, they combine to "
-"form larger bubbles, which eventually pop. Written by James Macnicol."
-msgstr ""
-
-#: hacks/config/bumps.xml.h:1
-msgid ""
-"A bit like `Spotlight', except that instead of merely exposing part of your "
-"desktop, it creates a bump map from it. Basically, it 3D-izes a roaming "
-"section of your desktop, based on color intensity. Written by Shane Smit."
-msgstr ""
-
-#: hacks/config/bumps.xml.h:2
-msgid "Bumps"
-msgstr ""
-
-#: hacks/config/cage.xml.h:1
-msgid "Cage"
-msgstr ""
-
-#: hacks/config/cage.xml.h:7 hacks/config/cube21.xml.h:22
-msgid "Textured"
-msgstr ""
-
-#: hacks/config/cage.xml.h:8
-msgid ""
-"This draws Escher's ``Impossible Cage,'' a 3d analog of a moebius strip, and "
-"rotates it in three dimensions. Written by Marcelo Vianna."
-msgstr ""
-
-#: hacks/config/carousel.xml.h:1 hacks/config/coral.xml.h:1
-#: hacks/config/deco.xml.h:1 hacks/config/helix.xml.h:1
-#: hacks/config/imsmap.xml.h:1 hacks/config/jigsaw.xml.h:2
-#: hacks/config/moire.xml.h:1 hacks/config/pedal.xml.h:1
-#: hacks/config/rorschach.xml.h:1 hacks/config/wander.xml.h:2
-#: hacks/config/xspirograph.xml.h:1
-msgid "1 Minute"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:2
-msgid "5 Seconds"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:4
-msgid "Carousel"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:6 hacks/config/electricsheep.xml.h:7
-#: hacks/config/fliptext.xml.h:8
-msgid "Frame Rate"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:8
-msgid ""
-"Loads several random images, and displays them flying in a circular "
-"formation. The circle changes speed and direction randomly, tilts on its "
-"axis, and the images move in and out. To tell it where to find the images to "
-"display, go to the \"Advanced\" tab on the Screensaver Preferences window. "
-"Select \"Choose Random Images\", and enter your image directory in the text "
-"field right below that. (Note: not the the \"Advanced\" button at the bottom "
-"of this window: the tab at the top of the *other* window.) This program "
-"requires a good video card capable of supporting large textures. Written by "
-"Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/carousel.xml.h:10
-msgid "No Tilting"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:11
-msgid "Number of Images:"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:13 hacks/config/glslideshow.xml.h:20
-msgid "Show Image Titles"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:15
-msgid "Tilt In/Out Only"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:16
-msgid "Tilt In/Out and Left/Right"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:17
-msgid "Tilt Left/Right Only"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:18 hacks/config/glslideshow.xml.h:21
-#: hacks/config/mirrorblob.xml.h:21
-msgid "Time until loading a new image:"
-msgstr ""
-
-#: hacks/config/carousel.xml.h:19
-msgid "Zoom In/Out"
-msgstr ""
-
-#: hacks/config/ccurve.xml.h:1
-msgid "0 seconds"
-msgstr ""
-
-#: hacks/config/ccurve.xml.h:2 hacks/config/polyhedra.xml.h:2
-msgid "30 seconds"
-msgstr ""
-
-#: hacks/config/ccurve.xml.h:4
-msgid "C Curve"
-msgstr ""
-
-#: hacks/config/ccurve.xml.h:5
-msgid "Change Image Every"
-msgstr ""
-
-#: hacks/config/ccurve.xml.h:6 hacks/config/coral.xml.h:5
-#: hacks/config/imsmap.xml.h:5 hacks/config/kumppa.xml.h:1
-#: hacks/config/qix.xml.h:6 hacks/config/squiral.xml.h:2
-#: hacks/config/wander.xml.h:4 hacks/config/xmatrix.xml.h:2
-msgid "Density"
-msgstr ""
-
-#: hacks/config/ccurve.xml.h:8
-msgid ""
-"Generates self-similar linear fractals, including the classic ``C Curve.'' "
-"Written by Rick Campbell."
-msgstr ""
-
-#: hacks/config/celtic.xml.h:1
-msgid "Celtic"
-msgstr ""
-
-#: hacks/config/celtic.xml.h:2
-msgid "Draw Graph"
-msgstr ""
-
-#: hacks/config/celtic.xml.h:5
-msgid "Pause"
-msgstr ""
-
-#: hacks/config/celtic.xml.h:6
-msgid ""
-"Repeatedly draws random Celtic cross-stitch patterns. By Max Froumentin."
-msgstr ""
-
-#: hacks/config/circuit.xml.h:1
-msgid "Animates a number of 3D electronic components. Written by Ben Buxton."
-msgstr ""
-
-#: hacks/config/circuit.xml.h:2
-msgid "Circuit"
-msgstr ""
-
-#: hacks/config/circuit.xml.h:3 hacks/config/gflux.xml.h:4
-#: hacks/config/pulsar.xml.h:2
-msgid "Directional Lighting"
-msgstr ""
-
-#: hacks/config/circuit.xml.h:5
-msgid "Flat Coloring"
-msgstr ""
-
-#: hacks/config/circuit.xml.h:6
-msgid "Parts"
-msgstr ""
-
-#: hacks/config/circuit.xml.h:7 hacks/config/flipscreen3d.xml.h:4
-#: hacks/config/gleidescope.xml.h:9 hacks/config/glplanet.xml.h:6
-#: hacks/config/ifs.xml.h:10
-msgid "Rotate"
-msgstr ""
-
-#: hacks/config/circuit.xml.h:8 hacks/config/pinion.xml.h:10
-msgid "Rotation Speed"
-msgstr ""
-
-#: hacks/config/circuit.xml.h:12 hacks/config/cube21.xml.h:18
-#: hacks/config/cubestorm.xml.h:9 hacks/config/dangerball.xml.h:9
-#: hacks/config/engine.xml.h:17 hacks/config/klein.xml.h:9
-#: hacks/config/polyhedra.xml.h:145 hacks/config/whirlygig.xml.h:14
-msgid "Spin"
-msgstr ""
-
-#: hacks/config/cloudlife.xml.h:1 hacks/config/demon.xml.h:2
-#: hacks/config/petri.xml.h:1
-msgid "Cell Size"
-msgstr ""
-
-#: hacks/config/cloudlife.xml.h:2
-msgid "CloudLife"
-msgstr ""
-
-#: hacks/config/cloudlife.xml.h:4
-msgid ""
-"Generates cloud-like formations based on a variant of Conway's Life. The "
-"difference is that cells have a maximum age, after which they count as 3 for "
-"populating the next generation. This makes long-lived formations explode "
-"instead of just sitting there burning a hole in your screen. Written by Don "
-"Marti."
-msgstr ""
-
-#: hacks/config/cloudlife.xml.h:6
-msgid "Initial Density"
-msgstr ""
-
-#: hacks/config/cloudlife.xml.h:9
-msgid "Max Age"
-msgstr ""
-
-#: hacks/config/cloudlife.xml.h:10
-msgid "Old"
-msgstr ""
-
-#: hacks/config/cloudlife.xml.h:14
-msgid "Young"
-msgstr ""
-
-#: hacks/config/compass.xml.h:1
-msgid "Compass"
-msgstr ""
-
-#: hacks/config/compass.xml.h:2 hacks/config/deluxe.xml.h:3
-#: hacks/config/fontglide.xml.h:3 hacks/config/fuzzyflakes.xml.h:5
-#: hacks/config/interference.xml.h:6 hacks/config/kumppa.xml.h:2
-#: hacks/config/nerverot.xml.h:6 hacks/config/piecewise.xml.h:3
-#: hacks/config/pipes.xml.h:4
-msgid "Double Buffer"
-msgstr ""
-
-#: hacks/config/compass.xml.h:6
-msgid ""
-"This draws a compass, with all elements spinning about randomly, for that "
-"``lost and nauseous'' feeling. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/coral.xml.h:2 hacks/config/deco.xml.h:2
-#: hacks/config/glslideshow.xml.h:1 hacks/config/helix.xml.h:2
-#: hacks/config/imsmap.xml.h:2 hacks/config/moire.xml.h:2
-#: hacks/config/pedal.xml.h:2 hacks/config/rorschach.xml.h:2
-#: hacks/config/xspirograph.xml.h:2
-msgid "1 Second"
-msgstr ""
-
-#: hacks/config/coral.xml.h:3
-msgid "Coral"
-msgstr ""
-
-#: hacks/config/coral.xml.h:4 hacks/config/fireworkx.xml.h:2
-#: hacks/config/gflux.xml.h:3 hacks/config/glblur.xml.h:2
-#: hacks/config/glmatrix.xml.h:3 hacks/config/imsmap.xml.h:4
-#: hacks/config/lavalite.xml.h:6 hacks/config/pyro.xml.h:2
-#: hacks/config/qix.xml.h:5 hacks/config/squiral.xml.h:1
-#: hacks/config/xearth.xml.h:4
-msgid "Dense"
-msgstr ""
-
-#: hacks/config/coral.xml.h:10 hacks/config/squiral.xml.h:13
-msgid "Seeds"
-msgstr ""
-
-#: hacks/config/coral.xml.h:11
-msgid ""
-"Simulates coral growth, albeit somewhat slowly. Written by Frederick Roeber."
-msgstr ""
-
-#: hacks/config/coral.xml.h:13 hacks/config/fireworkx.xml.h:10
-#: hacks/config/gflux.xml.h:13 hacks/config/glblur.xml.h:15
-#: hacks/config/glmatrix.xml.h:19 hacks/config/imsmap.xml.h:13
-#: hacks/config/lavalite.xml.h:29 hacks/config/pyro.xml.h:14
-#: hacks/config/qix.xml.h:21 hacks/config/squiral.xml.h:15
-#: hacks/config/xearth.xml.h:24 hacks/config/xmatrix.xml.h:17
-msgid "Sparse"
-msgstr ""
-
-#: hacks/config/cosmos.xml.h:1
-msgid "Cosmos"
-msgstr ""
-
-#: hacks/config/cosmos.xml.h:2
-msgid ""
-"Draws fireworks and zooming, fading flares. By Tom Campbell. You can find it "
-"at &lt;http://www.cosmosx.org/&gt;"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:1
-msgid "Confused"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:2
-msgid "Crackberg"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:3
-msgid "Display FPS"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:4
-msgid "Eagle Nest"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:5
-msgid "Flat Shading"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:6
-msgid ""
-"Flies through height maps, optionally animating the creation and destruction "
-"of generated tiles; tiles `grow' into place."
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:7
-msgid "Frame Delay"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:8
-msgid "Growing"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:9
-msgid "Ice"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:10
-msgid "Immediate"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:11 hacks/config/glslideshow.xml.h:14
-msgid "Letterbox"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:14
-msgid "Mouse Hole"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:15
-msgid "Plain"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:16 hacks/config/flurry.xml.h:8
-#: hacks/config/fontglide.xml.h:12 hacks/config/jigglypuff.xml.h:13
-#: hacks/config/sballs.xml.h:10 hacks/config/whirlygig.xml.h:12
-msgid "Random"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:18
-msgid "Subdivisions"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:19
-msgid "Swampy"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:20
-msgid "Visibility"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:21
-msgid "Vomit"
-msgstr ""
-
-#: hacks/config/crackberg.xml.h:22 hacks/config/flurry.xml.h:11
-msgid "Water"
-msgstr ""
-
-#: hacks/config/critical.xml.h:1
-msgid "Critical"
-msgstr ""
-
-#: hacks/config/critical.xml.h:2
-msgid ""
-"Draws a system of self-organizing lines. It starts out as random squiggles, "
-"but after a few iterations, order begins to appear. Written by Martin Pool."
-msgstr ""
-
-#: hacks/config/crystal.xml.h:1
-msgid "Center on Screen"
-msgstr ""
-
-#: hacks/config/crystal.xml.h:2 hacks/config/deluxe.xml.h:1
-#: hacks/config/fadeplot.xml.h:1 hacks/config/flow.xml.h:1
-#: hacks/config/galaxy.xml.h:1 hacks/config/glforestfire.xml.h:1
-#: hacks/config/grav.xml.h:1 hacks/config/julia.xml.h:1
-#: hacks/config/laser.xml.h:1 hacks/config/lisa.xml.h:1
-#: hacks/config/lissie.xml.h:2 hacks/config/morph3d.xml.h:2
-#: hacks/config/mountain.xml.h:1 hacks/config/piecewise.xml.h:2
-#: hacks/config/qix.xml.h:4 hacks/config/rocks.xml.h:2
-#: hacks/config/rotor.xml.h:2 hacks/config/rubik.xml.h:1
-#: hacks/config/shadebobs.xml.h:1 hacks/config/sierpinski.xml.h:1
-#: hacks/config/slip.xml.h:1 hacks/config/spiral.xml.h:1
-#: hacks/config/sproingies.xml.h:1 hacks/config/superquadrics.xml.h:1
-#: hacks/config/swirl.xml.h:1 hacks/config/worm.xml.h:2
-msgid "Count"
-msgstr ""
-
-#: hacks/config/crystal.xml.h:3
-msgid "Crystal"
-msgstr ""
-
-#: hacks/config/crystal.xml.h:4
-msgid "Draw Cell"
-msgstr ""
-
-#: hacks/config/crystal.xml.h:5 hacks/config/spheremonics.xml.h:3
-#: hacks/config/xearth.xml.h:6
-msgid "Draw Grid"
-msgstr ""
-
-#: hacks/config/crystal.xml.h:7
-msgid "Horizontal Symmetries"
-msgstr ""
-
-#: hacks/config/crystal.xml.h:9
-msgid ""
-"Moving polygons, similar to a kaleidescope (more like a kaleidescope than "
-"the hack called `kaleid,' actually.) This one by Jouk Jansen."
-msgstr ""
-
-#: hacks/config/crystal.xml.h:14
-msgid "Vertical Symmetries"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:1
-msgid ""
-"Animates a Rubik-like puzzle known as Cube 21 or Square-1. The rotations are "
-"chosen randomly. Requires OpenGL. Written by Vasek Potocek."
-msgstr ""
-
-#: hacks/config/cube21.xml.h:2
-msgid "Classic Edition"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:3
-msgid "Cube 21"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:4
-msgid "Cube size"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:5
-msgid "Delay in ending position"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:7
-msgid "Global speed"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:10
-msgid "Random color"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:11 hacks/config/rocks.xml.h:8
-msgid "Rotation"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:14
-msgid "Silver Edition"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:15
-msgid "Six random colors"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:19
-msgid "Spinning"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:20
-msgid "Start as cube"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:21
-msgid "Start as random shape"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:23
-msgid "Two random colors"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:25
-msgid "Wander on screen"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:26
-msgid "Wandering"
-msgstr ""
-
-#: hacks/config/cube21.xml.h:27
-msgid "White"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:2
-msgid "Cubenetic"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:3
-msgid "Display Solid Colors"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:4
-msgid "Display Surface Patterns"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:5
-msgid "Display Wireframe"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:6 hacks/config/glblur.xml.h:3
-#: hacks/config/glknots.xml.h:2 hacks/config/gltext.xml.h:3
-#: hacks/config/lavalite.xml.h:7 hacks/config/menger.xml.h:1
-#: hacks/config/molecule.xml.h:4 hacks/config/spheremonics.xml.h:1
-#: hacks/config/tangram.xml.h:1
-msgid "Don't Rotate"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:7
-msgid ""
-"Draws a pulsating set of overlapping boxes with ever-chaning blobby patterns "
-"undulating across their surfaces. It's sort of a cubist Lavalite. Written by "
-"Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:14 hacks/config/glblur.xml.h:6
-#: hacks/config/glknots.xml.h:8 hacks/config/gltext.xml.h:7
-#: hacks/config/lavalite.xml.h:19 hacks/config/menger.xml.h:7
-#: hacks/config/molecule.xml.h:15 hacks/config/spheremonics.xml.h:10
-msgid "Rotate around X and Y axes"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:15 hacks/config/glblur.xml.h:7
-#: hacks/config/glknots.xml.h:9 hacks/config/gltext.xml.h:8
-#: hacks/config/lavalite.xml.h:20 hacks/config/menger.xml.h:8
-#: hacks/config/molecule.xml.h:16 hacks/config/spheremonics.xml.h:11
-msgid "Rotate around X and Z axes"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:16 hacks/config/glblur.xml.h:8
-#: hacks/config/glknots.xml.h:10 hacks/config/gltext.xml.h:9
-#: hacks/config/lavalite.xml.h:21 hacks/config/menger.xml.h:9
-#: hacks/config/molecule.xml.h:17 hacks/config/spheremonics.xml.h:12
-msgid "Rotate around X axis"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:17 hacks/config/glblur.xml.h:9
-#: hacks/config/glknots.xml.h:11 hacks/config/gltext.xml.h:10
-#: hacks/config/lavalite.xml.h:22 hacks/config/menger.xml.h:10
-#: hacks/config/molecule.xml.h:18 hacks/config/spheremonics.xml.h:13
-msgid "Rotate around Y and Z axes"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:18 hacks/config/glblur.xml.h:10
-#: hacks/config/glknots.xml.h:12 hacks/config/gltext.xml.h:11
-#: hacks/config/lavalite.xml.h:23 hacks/config/menger.xml.h:11
-#: hacks/config/molecule.xml.h:19 hacks/config/spheremonics.xml.h:14
-msgid "Rotate around Y axis"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:19 hacks/config/glblur.xml.h:11
-#: hacks/config/glknots.xml.h:13 hacks/config/gltext.xml.h:12
-#: hacks/config/lavalite.xml.h:24 hacks/config/menger.xml.h:12
-#: hacks/config/molecule.xml.h:20 hacks/config/spheremonics.xml.h:15
-msgid "Rotate around Z axis"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:20 hacks/config/glblur.xml.h:12
-#: hacks/config/glknots.xml.h:14 hacks/config/gltext.xml.h:13
-#: hacks/config/lavalite.xml.h:25 hacks/config/menger.xml.h:13
-#: hacks/config/molecule.xml.h:21 hacks/config/spheremonics.xml.h:16
-msgid "Rotate around all three axes"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:25
-msgid "Surface Pattern Complexity"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:26
-msgid "Surface Pattern Overlap"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:27
-msgid "Surface Pattern Speed"
-msgstr ""
-
-#: hacks/config/cubenetic.xml.h:28 hacks/config/cubestorm.xml.h:13
-#: hacks/config/dangerball.xml.h:10 hacks/config/engine.xml.h:20
-#: hacks/config/glblur.xml.h:18 hacks/config/glforestfire.xml.h:19
-#: hacks/config/glknots.xml.h:22 hacks/config/glplanet.xml.h:14
-#: hacks/config/gltext.xml.h:20 hacks/config/lavalite.xml.h:31
-#: hacks/config/menger.xml.h:20 hacks/config/molecule.xml.h:26
-#: hacks/config/polyhedra.xml.h:165 hacks/config/spheremonics.xml.h:25
-#: hacks/config/wander.xml.h:15
-msgid "Wander"
-msgstr ""
-
-#: hacks/config/cubestorm.xml.h:2
-msgid "CubeStorm"
-msgstr ""
-
-#: hacks/config/cubestorm.xml.h:3
-msgid ""
-"Draws a series of rotating 3D boxes that intersect each other and eventually "
-"fill space. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/cubestorm.xml.h:6
-msgid "Number of Cubes"
-msgstr ""
-
-#: hacks/config/cubestorm.xml.h:10
-msgid "Strut Thickness"
-msgstr ""
-
-#: hacks/config/cynosure.xml.h:1
-msgid ""
-"A hack similar to `greynetic', but less frenetic. The first implementation "
-"was by Stephen Linhart; then Ozymandias G. Desiderata wrote a Java applet "
-"clone. That clone was discovered by Jamie Zawinski, and ported to C for "
-"inclusion here."
-msgstr ""
-
-#: hacks/config/cynosure.xml.h:2
-msgid "Cynosure"
-msgstr ""
-
-#: hacks/config/dangerball.xml.h:1
-msgid "DangerBall"
-msgstr ""
-
-#: hacks/config/dangerball.xml.h:2
-msgid ""
-"Draws a ball that periodically extrudes many random spikes. Ouch! Written by "
-"Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/dangerball.xml.h:7
-msgid "Spike Count"
-msgstr ""
-
-#: hacks/config/dangerball.xml.h:8
-msgid "Spike Growth"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:1
-msgid "DecayScreen"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:3
-msgid "Fuzzy Melt"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:4
-msgid "Melt Away From Center"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:5
-msgid "Melt Down"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:6
-msgid "Melt Down, Left"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:7
-msgid "Melt Down, Right"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:8
-msgid "Melt Left"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:9
-msgid "Melt Right"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:10
-msgid "Melt Towards Center"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:11
-msgid "Melt Up"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:12
-msgid "Melt Up, Left"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:13
-msgid "Melt Up, Right"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:14
-msgid "Melty Melt"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:15
-msgid "Random Melt Style"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:16
-msgid "Shuffle Melt"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:19
-msgid "Stretchy Melt"
-msgstr ""
-
-#: hacks/config/decayscreen.xml.h:20
-msgid ""
-"This takes an image and makes it melt. You've no doubt seen this effect "
-"before, but no screensaver would really be complete without it. It works "
-"best if there's something colorful visible. Warning, if the effect continues "
-"after the screen saver is off, seek medical attention. Written by David "
-"Wald, Vivek Khera, Jamie Zawinski, and Vince Levey."
-msgstr ""
-
-#: hacks/config/deco.xml.h:3
-msgid "Deco"
-msgstr ""
-
-#: hacks/config/deco.xml.h:6 hacks/config/menger.xml.h:5
-#: hacks/config/sierpinski3d.xml.h:4
-msgid "Max Depth"
-msgstr ""
-
-#: hacks/config/deco.xml.h:7
-msgid "Min Size"
-msgstr ""
-
-#: hacks/config/deco.xml.h:9
-msgid ""
-"This one subdivides and colors rectangles randomly. It looks kind of like "
-"Brady-Bunch-era rec-room wall paneling. (Raven says: ``this screensaver is "
-"ugly enough to peel paint.'') Written by Jamie Zawinski, inspired by Java "
-"code by Michael Bayne."
-msgstr ""
-
-#: hacks/config/deco.xml.h:11 hacks/config/rd-bomb.xml.h:23
-#: hacks/config/whirlygig.xml.h:20 hacks/config/xearth.xml.h:33
-#: hacks/config/zoom.xml.h:10
-msgid "x"
-msgstr ""
-
-#: hacks/config/deluxe.xml.h:2
-msgid "Deluxe"
-msgstr ""
-
-#: hacks/config/deluxe.xml.h:12
-msgid ""
-"This draws a pulsing sequence of stars, circles, and lines. It would look "
-"better if it was faster, but as far as I can tell, there is no way to make "
-"this be both: fast, and flicker-free. Yet another reason X sucks. Written by "
-"Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/deluxe.xml.h:13
-msgid "Transparency"
-msgstr ""
-
-#: hacks/config/demon.xml.h:1
-msgid ""
-"A cellular automaton that starts with a random field, and organizes it into "
-"stripes and spirals. Written by David Bagley."
-msgstr ""
-
-#: hacks/config/demon.xml.h:3
-msgid "Demon"
-msgstr ""
-
-#: hacks/config/demon.xml.h:11
-msgid "States"
-msgstr ""
-
-#: hacks/config/discrete.xml.h:1
-msgid "Discrete"
-msgstr ""
-
-#: hacks/config/discrete.xml.h:5
-msgid ""
-"More ``discrete map'' systems, including new variants of Hopalong and Julia, "
-"and a few others. Written by Tim Auckland."
-msgstr ""
-
-#: hacks/config/distort.xml.h:1
-msgid "Black Hole"
-msgstr ""
-
-#: hacks/config/distort.xml.h:2
-msgid "Bounce"
-msgstr ""
-
-#: hacks/config/distort.xml.h:3
-msgid "Distort"
-msgstr ""
-
-#: hacks/config/distort.xml.h:6
-msgid "Lens Count"
-msgstr ""
-
-#: hacks/config/distort.xml.h:7
-msgid "Lens Size"
-msgstr ""
-
-#: hacks/config/distort.xml.h:8
-msgid "Magnify"
-msgstr ""
-
-#: hacks/config/distort.xml.h:10
-msgid "Reflect"
-msgstr ""
-
-#: hacks/config/distort.xml.h:14
-msgid "Swamp Thing"
-msgstr ""
-
-#: hacks/config/distort.xml.h:15
-msgid ""
-"This hack grabs an image of the screen, and then lets a transparent lens "
-"wander around the screen, magnifying whatever is underneath. Written by "
-"Jonas Munsin."
-msgstr ""
-
-#: hacks/config/distort.xml.h:16 hacks/config/moire.xml.h:12
-#: hacks/config/rd-bomb.xml.h:21 hacks/config/ripples.xml.h:16
-#: hacks/config/rotzoomer.xml.h:10 hacks/config/swirl.xml.h:10
-#: hacks/config/twang.xml.h:15 hacks/config/xflame.xml.h:7
-msgid "Use Shared Memory"
-msgstr ""
-
-#: hacks/config/distort.xml.h:17
-msgid "Vortex"
-msgstr ""
-
-#: hacks/config/drift.xml.h:1
-msgid "Drift"
-msgstr ""
-
-#: hacks/config/drift.xml.h:4
-msgid "Fractal Growth"
-msgstr ""
-
-#: hacks/config/drift.xml.h:5
-msgid "High Dimensional Sphere"
-msgstr ""
-
-#: hacks/config/drift.xml.h:6
-msgid ""
-"How could one possibly describe this except as ``drifting recursive fractal "
-"cosmic flames?'' Another fine hack from the Scott Draves collection of fine "
-"hacks."
-msgstr ""
-
-#: hacks/config/drift.xml.h:7
-msgid "Lissojous Figures"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:1
-msgid "1 Gbyte cache"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:2
-msgid "100 Mbyte cache"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:3
-msgid "3 Gbyte cache"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:4
-msgid "300 Mbyte cache"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:5
-msgid "ElectricSheep"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:6
-msgid ""
-"ElectricSheep is an xscreensaver module that displays mpeg video of an "
-"animated fractal flame. In the background, it contributes render cycles to "
-"the next animation. Periodically it uploades completed frames to the server, "
-"where they are compressed for distribution to all clients. This program is "
-"recommended only if you have a high bandwidth, always-on connection to the "
-"Internet. By Scott Draves. You can find it at &lt;http://www.electricsheep."
-"org/&gt;."
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:8
-msgid "Nickname"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:9
-msgid "No Animation"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:10
-msgid "No Network"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:11
-msgid "Repititions of each Sheep"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:12
-msgid "URL"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:13
-msgid "Unlimited"
-msgstr ""
-
-#: hacks/config/electricsheep.xml.h:14 hacks/config/gleidescope.xml.h:13
-#: hacks/config/hyperball.xml.h:16 hacks/config/hypercube.xml.h:16
-#: hacks/config/zoom.xml.h:8
-msgid "Zoom"
-msgstr ""
-
-#: hacks/config/endgame.xml.h:1
-msgid ""
-"Black slips out of three mating nets, but the fourth one holds him tight! A "
-"brilliant composition! Written by Blair Tennessy."
-msgstr ""
-
-#: hacks/config/endgame.xml.h:2
-msgid "Endgame"
-msgstr ""
-
-#: hacks/config/engine.xml.h:1
-msgid "Audi Quattro (5 cylinders)"
-msgstr ""
-
-#: hacks/config/engine.xml.h:2
-msgid "BMW M3 (4 cylinders)"
-msgstr ""
-
-#: hacks/config/engine.xml.h:3
-msgid "BMW M5 (6 cylinders)"
-msgstr ""
-
-#: hacks/config/engine.xml.h:4
-msgid "Corvette Z06 (8 cylinders, V)"
-msgstr ""
-
-#: hacks/config/engine.xml.h:5
-msgid "Dodge Viper (10 cylinders, V)"
-msgstr ""
-
-#: hacks/config/engine.xml.h:6
-msgid ""
-"Draws a simple model of an engine that floats around the screen. Written by "
-"Ben Buxton and Ed Beroset."
-msgstr ""
-
-#: hacks/config/engine.xml.h:7
-msgid "Engine"
-msgstr ""
-
-#: hacks/config/engine.xml.h:9
-msgid "Honda Insight (3 cylinders)"
-msgstr ""
-
-#: hacks/config/engine.xml.h:10
-msgid "Jaguar XKE (12 cylinders, V)"
-msgstr ""
-
-#: hacks/config/engine.xml.h:11
-msgid "Porsche 911 (6 cylinders, flat)"
-msgstr ""
-
-#: hacks/config/engine.xml.h:12
-msgid "Random Engine"
-msgstr ""
-
-#: hacks/config/engine.xml.h:13
-msgid "Show Engine Name"
-msgstr ""
-
-#: hacks/config/engine.xml.h:18
-msgid "Subaru XT (6 cylinders, V)"
-msgstr ""
-
-#: hacks/config/engine.xml.h:19
-msgid "VW Beetle (4 cylinders, flat)"
-msgstr ""
-
-#: hacks/config/epicycle.xml.h:1
-msgid "1 minute"
-msgstr ""
-
-#: hacks/config/epicycle.xml.h:2 hacks/config/polyhedra.xml.h:1
-msgid "1 second"
-msgstr ""
-
-#: hacks/config/epicycle.xml.h:4
-msgid "Epicycle"
-msgstr ""
-
-#: hacks/config/epicycle.xml.h:6
-msgid "Harmonics"
-msgstr ""
-
-#: hacks/config/epicycle.xml.h:12
-msgid ""
-"This program draws the path traced out by a point on the edge of a circle. "
-"That circle rotates around a point on the rim of another circle, and so on, "
-"several times. These were the basis for the pre-heliocentric model of "
-"planetary motion. Written by James Youngman."
-msgstr ""
-
-#: hacks/config/eruption.xml.h:1
-msgid "An exposive version of XFlame. By W.P. van Paassen."
-msgstr ""
-
-#: hacks/config/eruption.xml.h:2
-msgid "Cooling factor"
-msgstr ""
-
-#: hacks/config/eruption.xml.h:4
-msgid "Eruption"
-msgstr ""
-
-#: hacks/config/eruption.xml.h:7 hacks/config/fluidballs.xml.h:9
-#: hacks/config/qix.xml.h:9 hacks/config/speedmine.xml.h:4
-msgid "Gravity"
-msgstr ""
-
-#: hacks/config/eruption.xml.h:8
-msgid "Heat"
-msgstr ""
-
-#: hacks/config/eruption.xml.h:9
-msgid "Inferno"
-msgstr ""
-
-#: hacks/config/eruption.xml.h:10
-msgid "Little"
-msgstr ""
-
-#: hacks/config/eruption.xml.h:13
-msgid "Negative"
-msgstr ""
-
-#: hacks/config/eruption.xml.h:15
-msgid "Number of Particles"
-msgstr ""
-
-#: hacks/config/eruption.xml.h:16
-msgid "Pleasant"
-msgstr ""
-
-#: hacks/config/eruption.xml.h:17
-msgid "Positive"
-msgstr ""
-
-#: hacks/config/euler2d.xml.h:2
-msgid "Euler2d"
-msgstr ""
-
-#: hacks/config/euler2d.xml.h:10 hacks/config/whirlwindwarp.xml.h:5
-msgid "Particles"
-msgstr ""
-
-#: hacks/config/euler2d.xml.h:11
-msgid "Power"
-msgstr ""
-
-#: hacks/config/euler2d.xml.h:13
-msgid ""
-"Simulates two dimensional Incompressible Inviscid Fluid Flow. Written by "
-"Stephen Montgomery-Smith."
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:1
-msgid ""
-"Draws various rotating extruded shapes that twist around, lengthen, and turn "
-"inside out. Created by David Konerding from the samples that come with the "
-"GL Extrusion library by Linas Vepstas."
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:2
-msgid "Extrusion"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:4
-msgid "Helix 2"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:5
-msgid "Helix 3"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:6
-msgid "Helix 4"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:7
-msgid "Join Offset"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:8 hacks/config/polytopes.xml.h:16
-msgid "Random Object"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:9
-msgid "Screw"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:14
-msgid "Taper"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:15
-msgid "Texture Image"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:16
-msgid "Twistoid"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:17 hacks/config/glplanet.xml.h:12
-#: hacks/config/pulsar.xml.h:19
-msgid "Use Flat Coloring"
-msgstr ""
-
-#: hacks/config/extrusion.xml.h:18 hacks/config/glplanet.xml.h:13
-msgid "Use Lighting"
-msgstr ""
-
-#: hacks/config/fadeplot.xml.h:2
-msgid ""
-"Draws what looks like a waving ribbon following a sinusoidal path. Written "
-"by Bas van Gaalen and Charles Vidal."
-msgstr ""
-
-#: hacks/config/fadeplot.xml.h:3
-msgid "FadePlot"
-msgstr ""
-
-#: hacks/config/fiberlamp.xml.h:1
-msgid "Draws a groovy rotating fiber optic lamp. Written by Tim Auckland."
-msgstr ""
-
-#: hacks/config/fiberlamp.xml.h:3
-msgid "Fiberlamp"
-msgstr ""
-
-#: hacks/config/fiberlamp.xml.h:4
-msgid "Fibers"
-msgstr ""
-
-#: hacks/config/fiberlamp.xml.h:8
-msgid "Time between Knocks"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:1
-msgid "10 times"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:2
-msgid ""
-"A bunch of fireflies chase a few baits around the screen, leaving colorful "
-"tails which get blown around by the wind. Written by Matt Perry. This "
-"program is not included with the XScreenSaver package, but if you don't have "
-"it already, you can find it at &lt;http://somewhere.fscked.org/fireflies/"
-"&gt;."
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:3
-msgid "Add some fireflies"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:4
-msgid "Bait accel"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:5
-msgid "Bait speed"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:6
-msgid "Color cycle speed"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:7
-msgid "Draw baits"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:8
-msgid "Faded colors"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:9
-msgid "Fast Forward speed"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:10
-msgid "Fireflies"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:11
-msgid "Firefly accel"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:12
-msgid "Firefly size"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:13
-msgid "Firefly speed"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:14
-msgid "Frames per sec"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:15
-msgid "Glow factor"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:16
-msgid "Half"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:18 hacks/config/fluidballs.xml.h:10
-msgid "Hurricane"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:19
-msgid "Invisible"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:20
-msgid "Kill some fireflies"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:22
-msgid "Make all swarms do something"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:23
-msgid "Matrix (pause and rotate)"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:24
-msgid "Maximum baits"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:25
-msgid "Maximum flies"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:26
-msgid "Merge two swarms"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:27
-msgid "Minimum baits"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:28
-msgid "Minimum flies"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:29
-msgid "Narrow"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:30
-msgid "Never"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:31
-msgid "Normal swarm motion"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:33
-msgid "Opaque"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:35
-msgid "Split a swarm"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:36 hacks/config/fluidballs.xml.h:21
-#: hacks/config/glforestfire.xml.h:16
-msgid "Still"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:37
-msgid "Swarm bursts into rainbow               "
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:38
-msgid "Swarm comes to a halt"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:39
-msgid "Swarm does loops"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:40
-msgid "Swarm hyperspeed"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:41
-msgid "Swarm tails glow"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:44
-msgid "Wide"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:45 hacks/config/fluidballs.xml.h:23
-msgid "Wind"
-msgstr ""
-
-#: hacks/config/fireflies.xml.h:46
-msgid "Wind picks up"
-msgstr ""
-
-#: hacks/config/fireworkx.xml.h:1 hacks/config/lavalite.xml.h:3
-msgid "Activity"
-msgstr ""
-
-#: hacks/config/fireworkx.xml.h:4
-msgid "Fireworkx"
-msgstr ""
-
-#: hacks/config/fireworkx.xml.h:5
-msgid "Light Flash"
-msgstr ""
-
-#: hacks/config/fireworkx.xml.h:6
-msgid ""
-"Pyrotechnics simulation eye-candy, MMX optimized. Turn off Light for speed. "
-"Clicks on the preview window Explodes..! Written by Rony B Chandran. http://"
-"www.ronybc.8k.com"
-msgstr ""
-
-#: hacks/config/fireworkx.xml.h:7
-msgid "Self Glowing Smoke!"
-msgstr ""
-
-#: hacks/config/fireworkx.xml.h:8
-msgid "Shoot The Shells up"
-msgstr ""
-
-#: hacks/config/flag.xml.h:1
-msgid "Bitmap for Flag"
-msgstr ""
-
-#: hacks/config/flag.xml.h:3
-msgid "Flag"
-msgstr ""
-
-#: hacks/config/flag.xml.h:10
-msgid "Text for Flag"
-msgstr ""
-
-#: hacks/config/flag.xml.h:11
-msgid ""
-"This draws a waving colored flag, that undulates its way around the screen. "
-"The trick is the flag can contain arbitrary text and images. By default, it "
-"displays either the current system name and OS type, or a picture of "
-"``Bob,'' but you can replace the text or the image with a command-line "
-"option. Written by Charles Vidal and Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/flame.xml.h:1 hacks/config/jigsaw.xml.h:1
-#: hacks/config/maze.xml.h:1 hacks/config/wander.xml.h:1
-msgid "0 Seconds"
-msgstr ""
-
-#: hacks/config/flame.xml.h:2 hacks/config/gleidescope.xml.h:1
-#: hacks/config/glslideshow.xml.h:2 hacks/config/maze.xml.h:2
-#: hacks/config/mirrorblob.xml.h:1
-msgid "10 Seconds"
-msgstr ""
-
-#: hacks/config/flame.xml.h:3
-msgid "Another iterative fractal generator. Written by Scott Draves."
-msgstr ""
-
-#: hacks/config/flame.xml.h:4 hacks/config/jigglypuff.xml.h:4
-msgid "Complexity"
-msgstr ""
-
-#: hacks/config/flame.xml.h:8
-msgid "Flame"
-msgstr ""
-
-#: hacks/config/flame.xml.h:13
-msgid "Number of Fractals"
-msgstr ""
-
-#: hacks/config/flipflop.xml.h:2
-msgid "FlipFlop"
-msgstr ""
-
-#: hacks/config/flipflop.xml.h:3
-msgid ""
-"Flipflop draws a grid of 3D colored tiles that change positions with each "
-"other. Written by Kevin Ogden."
-msgstr ""
-
-#: hacks/config/flipflop.xml.h:6
-msgid "Solid Tiles"
-msgstr ""
-
-#: hacks/config/flipscreen3d.xml.h:2
-msgid "Flipscreen3d"
-msgstr ""
-
-#: hacks/config/flipscreen3d.xml.h:3
-msgid ""
-"Grabs an image of the desktop, turns it into a GL texture map, and spins it "
-"around and deforms it in various ways. Written by Ben Buxton."
-msgstr ""
-
-#: hacks/config/fliptext.xml.h:1 hacks/config/starwars.xml.h:3
-msgid "Centered Text"
-msgstr ""
-
-#: hacks/config/fliptext.xml.h:2
-msgid ""
-"Draws successive pages of text. The lines flip in and out in a soothing 3D "
-"pattern. The text can be the output of a program or the contents of a file "
-"or URL, as configured on the \"Advanced\" tab of the main Screensaver "
-"Preferences window. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/fliptext.xml.h:4
-msgid "FlipText"
-msgstr ""
-
-#: hacks/config/fliptext.xml.h:5 hacks/config/starwars.xml.h:7
-msgid "Flush Left Text"
-msgstr ""
-
-#: hacks/config/fliptext.xml.h:6 hacks/config/starwars.xml.h:8
-msgid "Flush Right Text"
-msgstr ""
-
-#: hacks/config/fliptext.xml.h:7 hacks/config/starwars.xml.h:9
-msgid "Font Point Size"
-msgstr ""
-
-#: hacks/config/fliptext.xml.h:11
-msgid "Random Text Alignment"
-msgstr ""
-
-#: hacks/config/fliptext.xml.h:15 hacks/config/starwars.xml.h:15
-msgid "Text Columns"
-msgstr ""
-
-#: hacks/config/fliptext.xml.h:16 hacks/config/starwars.xml.h:16
-msgid "Text Lines"
-msgstr ""
-
-#: hacks/config/flow.xml.h:3
-msgid "Flow"
-msgstr ""
-
-#: hacks/config/flow.xml.h:5
-msgid "Length of trails"
-msgstr ""
-
-#: hacks/config/flow.xml.h:13
-msgid ""
-"Strange attractors formed of flows in a 3D differential equation phase "
-"space. Written by Tim Auckland."
-msgstr ""
-
-#: hacks/config/flow.xml.h:16
-msgid "turn on/off bounding box."
-msgstr ""
-
-#: hacks/config/flow.xml.h:17
-msgid "turn on/off double buffering."
-msgstr ""
-
-#: hacks/config/flow.xml.h:18
-msgid "turn on/off periodic attractors."
-msgstr ""
-
-#: hacks/config/flow.xml.h:19
-msgid "turn on/off ride in the flow."
-msgstr ""
-
-#: hacks/config/flow.xml.h:20
-msgid "turn on/off rotating around attractor."
-msgstr ""
-
-#: hacks/config/flow.xml.h:21
-msgid "turn on/off search for new attractors."
-msgstr ""
-
-#: hacks/config/fluidballs.xml.h:1
-msgid "      Freefall"
-msgstr ""
-
-#: hacks/config/fluidballs.xml.h:4
-msgid "Clay"
-msgstr ""
-
-#: hacks/config/fluidballs.xml.h:7
-msgid "FluidBalls"
-msgstr ""
-
-#: hacks/config/fluidballs.xml.h:8 hacks/config/twang.xml.h:4
-msgid "Friction"
-msgstr ""
-
-#: hacks/config/fluidballs.xml.h:11
-msgid "Jupiter"
-msgstr ""
-
-#: hacks/config/fluidballs.xml.h:14
-msgid ""
-"Models the physics of bouncing balls, or of particles in a gas or fluid, "
-"depending on the settings. If \"Shake Box\" is selected, then every now and "
-"then, the box will be rotated, changing which direction is down (in order to "
-"keep the settled balls in motion.) By Peter Birtles and Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/fluidballs.xml.h:15
-msgid "Rubber"
-msgstr ""
-
-#: hacks/config/fluidballs.xml.h:16
-msgid "Shake Box"
-msgstr ""
-
-#: hacks/config/fluidballs.xml.h:22
-msgid "Various Ball Sizes"
-msgstr ""
-
-#: hacks/config/flurry.xml.h:1
-msgid "Binary"
-msgstr ""
-
-#: hacks/config/flurry.xml.h:2
-msgid "Classic"
-msgstr ""
-
-#: hacks/config/flurry.xml.h:3
-msgid "Fire"
-msgstr ""
-
-#: hacks/config/flurry.xml.h:4
-msgid "Flurry"
-msgstr ""
-
-#: hacks/config/flurry.xml.h:5
-msgid "Insane"
-msgstr ""
-
-#: hacks/config/flurry.xml.h:6
-msgid "Psychedelic"
-msgstr ""
-
-#: hacks/config/flurry.xml.h:7
-msgid "RGB"
-msgstr ""
-
-#: hacks/config/flurry.xml.h:10
-msgid ""
-"This port of the OSX screensaver of the same name draws a colourful star"
-"(fish)like flurry of particles. xscreensaver port by Tobias Sargeant &lt;"
-"tobias.sargeant@bigpond.com&gt; Original Mac version by Calum Robinson &lt;"
-"calumr@mac.com&gt; http://homepage.mac.com/calumr"
-msgstr ""
-
-#: hacks/config/flyingtoasters.xml.h:1
-msgid ""
-"A fleet of 3d space-age jet-powered flying toasters (and toast!) Inspired by "
-"the ancient Berkeley Systems After Dark flying toasters. By Jamie Zawinski "
-"and Baconmonkey."
-msgstr ""
-
-#: hacks/config/flyingtoasters.xml.h:2
-msgid "Air Speed"
-msgstr ""
-
-#: hacks/config/flyingtoasters.xml.h:4
-msgid "Chrome Toasters"
-msgstr ""
-
-#: hacks/config/flyingtoasters.xml.h:6
-msgid "Flying Toasters"
-msgstr ""
-
-#: hacks/config/flyingtoasters.xml.h:7 hacks/config/glslideshow.xml.h:17
-#: hacks/config/jigglypuff.xml.h:12 hacks/config/juggle.xml.h:5
-#: hacks/config/mirrorblob.xml.h:15 hacks/config/pipes.xml.h:10
-msgid "None"
-msgstr ""
-
-#: hacks/config/flyingtoasters.xml.h:8
-msgid "Number of Slices"
-msgstr ""
-
-#: hacks/config/flyingtoasters.xml.h:9
-msgid "Number of Toasters"
-msgstr ""
-
-#: hacks/config/flyingtoasters.xml.h:12
-msgid "Solid Colors"
-msgstr ""
-
-#: hacks/config/flyingtoasters.xml.h:13
-msgid "Swarm"
-msgstr ""
-
-#: hacks/config/fontglide.xml.h:2
-msgid "Brief"
-msgstr ""
-
-#: hacks/config/fontglide.xml.h:5
-msgid "Font Border Thickness"
-msgstr ""
-
-#: hacks/config/fontglide.xml.h:6
-msgid "FontGlide"
-msgstr ""
-
-#: hacks/config/fontglide.xml.h:7
-msgid "Horizontally scrolling text"
-msgstr ""
-
-#: hacks/config/fontglide.xml.h:10
-msgid "Pages of text"
-msgstr ""
-
-#: hacks/config/fontglide.xml.h:11
-msgid ""
-"Puts text on the screen using large characters that glide in from the edges, "
-"assemble, then disperse. Alternately, it can simply scroll whole sentences "
-"from right to left. The text can be the output of a program or the contents "
-"of a file or URL, as configured on the \"Advanced\" tab of the main "
-"Screensaver Preferences window. Written Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/fontglide.xml.h:14
-msgid "Text Linger"
-msgstr ""
-
-#: hacks/config/fontglide.xml.h:16
-msgid "Vapor Trails"
-msgstr ""
-
-#: hacks/config/forest.xml.h:2 hacks/config/glforestfire.xml.h:6
-msgid "Forest"
-msgstr ""
-
-#: hacks/config/forest.xml.h:7
-msgid ""
-"This draws fractal trees. Written by Peter Baumung. Everybody loves "
-"fractals, right?"
-msgstr ""
-
-#: hacks/config/fuzzyflakes.xml.h:2
-msgid "Border Thickness"
-msgstr ""
-
-#: hacks/config/fuzzyflakes.xml.h:4
-msgid "Delay"
-msgstr ""
-
-#: hacks/config/fuzzyflakes.xml.h:6
-msgid "Falling colored snowflake/flower shapes. Written by Barry Dmytro."
-msgstr ""
-
-#: hacks/config/fuzzyflakes.xml.h:9
-msgid "FuzzyFlakes"
-msgstr ""
-
-#: hacks/config/fuzzyflakes.xml.h:11 hacks/config/xspirograph.xml.h:4
-msgid "Layers"
-msgstr ""
-
-#: hacks/config/fuzzyflakes.xml.h:14
-msgid "Random Colors"
-msgstr ""
-
-#: hacks/config/galaxy.xml.h:4
-msgid "Galaxy"
-msgstr ""
-
-#: hacks/config/galaxy.xml.h:8
-msgid "Rotate Viewpoint"
-msgstr ""
-
-#: hacks/config/galaxy.xml.h:13
-msgid ""
-"This draws spinning galaxies, which then collide and scatter their stars to "
-"the, uh, four winds or something. Originally an Amiga program by Uli "
-"Siegmund."
-msgstr ""
-
-#: hacks/config/gears.xml.h:3
-msgid "Gears"
-msgstr ""
-
-#: hacks/config/gears.xml.h:4
-msgid "Planetary Gear System"
-msgstr ""
-
-#: hacks/config/gears.xml.h:5 hacks/config/goop.xml.h:9
-msgid "Rotational Speed"
-msgstr ""
-
-#: hacks/config/gears.xml.h:9
-msgid ""
-"This draws sets of turning, interlocking gears, rotating in three "
-"dimensions. Another GL hack, by Danny Sung, Brian Paul, Ed Mackey, and Jamie "
-"Zawinski."
-msgstr ""
-
-#: hacks/config/gears.xml.h:10
-msgid "Three Gear System"
-msgstr ""
-
-#: hacks/config/gflux.xml.h:2
-msgid "Checkerboard"
-msgstr ""
-
-#: hacks/config/gflux.xml.h:5
-msgid ""
-"Draws a rippling waves on a rotating wireframe grid, using GL. Written by "
-"Josiah Pease."
-msgstr ""
-
-#: hacks/config/gflux.xml.h:7
-msgid "Flat Lighting"
-msgstr ""
-
-#: hacks/config/gflux.xml.h:8
-msgid "GFlux"
-msgstr ""
-
-#: hacks/config/gflux.xml.h:9
-msgid "Mesh Density"
-msgstr ""
-
-#: hacks/config/gflux.xml.h:10
-#, fuzzy
-msgid "Screen Image"
-msgstr "Protector de pantalla"
-
-#: hacks/config/gflux.xml.h:14 hacks/config/interference.xml.h:21
-msgid "Wave Speed"
-msgstr ""
-
-#: hacks/config/gflux.xml.h:15 hacks/config/glmatrix.xml.h:20
-msgid "Waves"
-msgstr ""
-
-#: hacks/config/gflux.xml.h:16
-msgid "Wire Mesh"
-msgstr ""
-
-#: hacks/config/glblur.xml.h:1
-msgid "Blur Smoothness"
-msgstr ""
-
-#: hacks/config/glblur.xml.h:5
-msgid "GLBlur"
-msgstr ""
-
-#: hacks/config/glblur.xml.h:17
-msgid ""
-"This program draws a box and a few line segments, and generates a radial "
-"blur outward from it. This creates flowing field effects. This is done by "
-"rendering the scene into a small texture, then repeatedly rendering "
-"increasingly-enlarged and increasingly-transparent versions of that texture "
-"onto the frame buffer. As such, it's quite graphics intensive: don't bother "
-"trying to run this if you don't have hardware-accelerated OpenGL texture "
-"support. It will hurt your machine bad."
-msgstr ""
-
-#: hacks/config/gleidescope.xml.h:2 hacks/config/glslideshow.xml.h:6
-#: hacks/config/mirrorblob.xml.h:3
-msgid "5 Minutes"
-msgstr ""
-
-#: hacks/config/gleidescope.xml.h:3
-msgid ""
-"An OpenGL kaleidescope that operates on your desktop image, or on image "
-"files loaded from disk. Written by andrew dean."
-msgstr ""
-
-#: hacks/config/gleidescope.xml.h:4
-msgid "Gleidescope"
-msgstr ""
-
-#: hacks/config/gleidescope.xml.h:5
-msgid "Image Duration"
-msgstr ""
-
-#: hacks/config/gleidescope.xml.h:6
-msgid "Image file"
-msgstr ""
-
-#: hacks/config/gleidescope.xml.h:8
-msgid "Move"
-msgstr ""
-
-#: hacks/config/gleidescope.xml.h:11
-msgid "Size of tube"
-msgstr ""
-
-#: hacks/config/glforestfire.xml.h:2
-msgid "Desert"
-msgstr ""
-
-#: hacks/config/glforestfire.xml.h:3
-msgid ""
-"Draws an animation of sprinkling fire-like 3D triangles in a landscape "
-"filled with trees. Requires OpenGL, and a machine with fast hardware support "
-"for texture maps. Written by Eric Lassauge &lt;lassauge@users.sourceforge."
-"net&gt;."
-msgstr ""
-
-#: hacks/config/glforestfire.xml.h:5 hacks/config/glmatrix.xml.h:9
-msgid "Fog"
-msgstr ""
-
-#: hacks/config/glforestfire.xml.h:7
-msgid "GLForestFire"
-msgstr ""
-
-#: hacks/config/glforestfire.xml.h:8
-msgid "Huge Fire"
-msgstr ""
-
-#: hacks/config/glforestfire.xml.h:9
-msgid "No shadow"
-msgstr ""
-
-#: hacks/config/glforestfire.xml.h:11
-msgid "Number of trees"
-msgstr ""
-
-#: hacks/config/glforestfire.xml.h:12
-msgid "Rain"
-msgstr ""
-
-#: hacks/config/glforestfire.xml.h:17
-msgid "Track mouse"
-msgstr ""
-
-#: hacks/config/glhanoi.xml.h:1
-msgid "Enable fog"
-msgstr ""
-
-#: hacks/config/glhanoi.xml.h:2
-msgid "Enable lighting"
-msgstr ""
-
-#: hacks/config/glhanoi.xml.h:4
-msgid "Frame Delay (us)"
-msgstr ""
-
-#: hacks/config/glhanoi.xml.h:5
-msgid "GLHanoi"
-msgstr ""
-
-#: hacks/config/glhanoi.xml.h:6
-msgid "Number of Disks"
-msgstr ""
-
-#: hacks/config/glhanoi.xml.h:9
-msgid ""
-"Solves the Towers of Hanoi puzzle. Move N disks from one pole to another, "
-"one disk at a time, with no disk ever resting on a disk smaller than itself. "
-"Written by Dave Atkinson."
-msgstr ""
-
-#: hacks/config/glknots.xml.h:4
-msgid "GLKnots"
-msgstr ""
-
-#: hacks/config/glknots.xml.h:5
-msgid ""
-"Generates some twisting 3d knot patterns. Spins 'em around. Written by Jamie "
-"Zawinski."
-msgstr ""
-
-#: hacks/config/glknots.xml.h:7 hacks/config/lavalite.xml.h:17
-#: hacks/config/spheremonics.xml.h:9
-msgid "Resolution"
-msgstr ""
-
-#: hacks/config/glknots.xml.h:15
-msgid "Segmented"
-msgstr ""
-
-#: hacks/config/glknots.xml.h:18 hacks/config/lavalite.xml.h:28
-#: hacks/config/xmountains.xml.h:25
-msgid "Smooth"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:2 hacks/config/xmatrix.xml.h:1
-msgid "Binary Encoding"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:4
-msgid "Draw Glyphs"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:5
-msgid "Draw Outlines"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:6
-msgid "Draw Solid Boxes"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:7
-msgid ""
-"Draws 3D dropping characters similar to what is seen in the title sequence "
-"of \"The Matrix\". See also \"xmatrix\" for a 2D rendering of the similar "
-"effect that appeared on the computer monitors actually *in* the movie. "
-"Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:10
-msgid "GLMatrix"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:11 hacks/config/xmatrix.xml.h:7
-msgid "Genetic Encoding"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:12
-msgid "Glyph Density"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:13
-msgid "Glyph Speed"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:14 hacks/config/xmatrix.xml.h:8
-msgid "Hexadecimal Encoding"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:15 hacks/config/xmatrix.xml.h:11
-msgid "Matrix Encoding"
-msgstr ""
-
-#: hacks/config/glmatrix.xml.h:16
-msgid "Panning"
-msgstr ""
-
-#: hacks/config/glplanet.xml.h:1
-msgid ""
-"Draws a planet bouncing around in space. Written by David Konerding. The "
-"built-in image is a map of the earth (extracted from `xearth'), but you can "
-"wrap any texture around the sphere, e.g., the planetary textures that come "
-"with `ssystem'."
-msgstr ""
-
-#: hacks/config/glplanet.xml.h:3
-msgid "GLPlanet"
-msgstr ""
-
-#: hacks/config/glplanet.xml.h:4
-msgid "Image File"
-msgstr ""
-
-#: hacks/config/glplanet.xml.h:5
-msgid "Roll"
-msgstr ""
-
-#: hacks/config/glslideshow.xml.h:4 hacks/config/rd-bomb.xml.h:5
-#: hacks/config/substrate.xml.h:4 hacks/config/xplanet.xml.h:4
-#, no-c-format
-msgid "100%"
-msgstr ""
-
-#: hacks/config/glslideshow.xml.h:5 hacks/config/glsnake.xml.h:2
-#: hacks/config/mirrorblob.xml.h:2
-msgid "30 Seconds"
-msgstr ""
-
-#: hacks/config/glslideshow.xml.h:8
-#, no-c-format
-msgid "50%"
-msgstr ""
-
-#: hacks/config/glslideshow.xml.h:9
-msgid "Always show at least this much of the image:"
-msgstr ""
-
-#: hacks/config/glslideshow.xml.h:10 hacks/config/mirrorblob.xml.h:6
-msgid "Crossfade Duration:"
-msgstr ""
-
-#: hacks/config/glslideshow.xml.h:11
-msgid "Frame Rate:"
-msgstr ""
-
-#: hacks/config/glslideshow.xml.h:12
-msgid "GLSlideshow"
-msgstr ""
-
-#: hacks/config/glslideshow.xml.h:15
-msgid ""
-"Loads a random sequence of images and smoothly scans and zooms around in "
-"each, fading from pan to pan. To tell it where to find the images to "
-"display, go to the \"Advanced\" tab on the Screensaver Preferences window. "
-"Select \"Choose Random Images\", and enter your image directory in the text "
-"field right below that. (Note: not the the \"Advanced\" button at the bottom "
-"of this window: the tab at the top of the *other* window.) This program "
-"requires a good video card capable of supporting large textures. Written by "
-"Jamie Zawinski and Mike Oliphant."
-msgstr ""
-
-#: hacks/config/glslideshow.xml.h:18
-msgid "Pan/Zoom Duration:"
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:1 hacks/config/lavalite.xml.h:1
-msgid "1"
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:3
-msgid "Angular Velocity"
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:4
-msgid ""
-"Draws a simulation of the Rubik's Snake puzzle. Written by Jamie Wilkinson, "
-"Andrew Bennetts, and Peter Aylett."
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:7
-msgid "GlSnake"
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:8
-msgid "Loose"
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:9
-msgid "Packing"
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:11
-msgid "Show Titles"
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:14
-msgid "Tight"
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:16
-msgid "Y Angular Velocity"
-msgstr ""
-
-#: hacks/config/glsnake.xml.h:17
-msgid "Z Angular Velocity"
-msgstr ""
-
-#: hacks/config/gltext.xml.h:1
-msgid "Always face front"
-msgstr ""
-
-#: hacks/config/gltext.xml.h:2
-msgid ""
-"Displays a few lines of text spinning around in a solid 3D font. Written by "
-"Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/gltext.xml.h:5
-msgid "GLText"
-msgstr ""
-
-#: hacks/config/gltext.xml.h:6
-msgid "Program"
-msgstr ""
-
-#: hacks/config/gltext.xml.h:18
-msgid "Spin all the way around"
-msgstr ""
-
-#: hacks/config/gltext.xml.h:19 hacks/config/noseguy.xml.h:5
-msgid "Text"
-msgstr ""
-
-#: hacks/config/goban.xml.h:1
-msgid "Goban"
-msgstr ""
-
-#: hacks/config/goban.xml.h:2
-msgid ""
-"Replays historical games of go (aka wei-chi and baduk) on the screen. By "
-"Scott Draves. You can find it at &lt;http://www.draves.org/goban/&gt;."
-msgstr ""
-
-#: hacks/config/goop.xml.h:1
-msgid "Additive Colors (reflected light)"
-msgstr ""
-
-#: hacks/config/goop.xml.h:2
-msgid "Blob Count"
-msgstr ""
-
-#: hacks/config/goop.xml.h:3
-msgid "Elasticity"
-msgstr ""
-
-#: hacks/config/goop.xml.h:5
-msgid "Goop"
-msgstr ""
-
-#: hacks/config/goop.xml.h:8
-msgid "Opaque Blobs"
-msgstr ""
-
-#: hacks/config/goop.xml.h:12
-msgid "Speed Limit"
-msgstr ""
-
-#: hacks/config/goop.xml.h:13
-msgid "Subtractive Colors (transmitted light)"
-msgstr ""
-
-#: hacks/config/goop.xml.h:14
-msgid ""
-"This draws set of animating, transparent, amoeba-like blobs. The blobs "
-"change shape as they wander around the screen, and they are translucent, so "
-"you can see the lower blobs through the higher ones, and when one passes "
-"over another, their colors merge. I got the idea for this from a cool mouse "
-"pad I have, which achieves the same kind of effect in real life by having "
-"several layers plastic with colored oil between them. Written by Jamie "
-"Zawinski."
-msgstr ""
-
-#: hacks/config/goop.xml.h:15
-msgid "Transparent Blobs"
-msgstr ""
-
-#: hacks/config/goop.xml.h:16
-msgid "XOR Blobs"
-msgstr ""
-
-#: hacks/config/grav.xml.h:3
-msgid "Grav"
-msgstr ""
-
-#: hacks/config/grav.xml.h:6
-msgid "Object Trails"
-msgstr ""
-
-#: hacks/config/grav.xml.h:7
-msgid "Orbital Decay"
-msgstr ""
-
-#: hacks/config/grav.xml.h:10
-msgid ""
-"This program draws a simple orbital simulation. If you turn on trails, it "
-"looks kind of like a cloud-chamber photograph. Written by Greg Bowering."
-msgstr ""
-
-#: hacks/config/greynetic.xml.h:2
-msgid "Greynetic"
-msgstr ""
-
-#: hacks/config/greynetic.xml.h:5
-msgid ""
-"This draws random colored and stippled rectangles. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/halftone.xml.h:1
-msgid "Delay (Large = low cpu load)"
-msgstr ""
-
-#: hacks/config/halftone.xml.h:2
-msgid "Dot fill factor"
-msgstr ""
-
-#: hacks/config/halftone.xml.h:3
-msgid "Dot size"
-msgstr ""
-
-#: hacks/config/halftone.xml.h:4
-msgid ""
-"Draws the gravity force in each point on the screen seen through a halftone "
-"dot pattern. The gravity force is calculated from a set of moving mass "
-"points. View it from a distance for best effect. Written by Peter Jaric &lt;"
-"peter@jaric.org&gt;."
-msgstr ""
-
-#: hacks/config/halftone.xml.h:5
-msgid "Gravity points"
-msgstr ""
-
-#: hacks/config/halftone.xml.h:6
-msgid "Halftone"
-msgstr ""
-
-#: hacks/config/halftone.xml.h:10
-msgid "Maximum mass"
-msgstr ""
-
-#: hacks/config/halftone.xml.h:11
-msgid "Maximum speed"
-msgstr ""
-
-#: hacks/config/halftone.xml.h:12
-msgid "Minimum mass"
-msgstr ""
-
-#: hacks/config/halftone.xml.h:13
-msgid "Minimum speed"
-msgstr ""
-
-#: hacks/config/halo.xml.h:1
-msgid "Animate Circles"
-msgstr ""
-
-#: hacks/config/halo.xml.h:3
-msgid "Halo"
-msgstr ""
-
-#: hacks/config/halo.xml.h:5
-msgid "Number of Circles"
-msgstr ""
-
-#: hacks/config/halo.xml.h:7
-msgid "Ramp Mode"
-msgstr ""
-
-#: hacks/config/halo.xml.h:9
-msgid "Seuss Mode"
-msgstr ""
-
-#: hacks/config/halo.xml.h:12
-msgid ""
-"This draws trippy psychedelic circular patterns that hurt to look at. It can "
-"also animate the control-points, but that takes a lot of CPU and bandwidth. "
-"Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/helix.xml.h:4
-msgid "Helix"
-msgstr ""
-
-#: hacks/config/helix.xml.h:5
-msgid ""
-"This repeatedly generates spirally string-art-ish patterns. Written by Jamie "
-"Zawinski."
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:3
-msgid "EJK1"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:4
-msgid "EJK2"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:5
-msgid "EJK3"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:6
-msgid "EJK4"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:7
-msgid "EJK5"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:8
-msgid "EJK6"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:11
-msgid "Hopalong"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:12
-msgid "Jong"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:16
-msgid "Martin"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:19
-msgid "RR"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:20
-msgid "Sine"
-msgstr ""
-
-#: hacks/config/hopalong.xml.h:24
-msgid ""
-"This draws lacy fractal patterns, based on iteration in the imaginary plane, "
-"from a 1986 Scientific American article. Mostly written by Patrick Naughton."
-msgstr ""
-
-#: hacks/config/hyperball.xml.h:4
-msgid "Hyperball"
-msgstr ""
-
-#: hacks/config/hyperball.xml.h:5
-msgid ""
-"Hyperball is to hypercube as dodecahedron is to cube: this displays a 2D "
-"projection of the sequence of 3D objects which are the projections of the 4D "
-"analog to the dodecahedron. Technically, it is a \"120 cell polytope.\" "
-"Written by Joe Keane. See also the \"polytopes\" hack for a more general "
-"version of this using OpenGL."
-msgstr ""
-
-#: hacks/config/hyperball.xml.h:10 hacks/config/hypercube.xml.h:10
-msgid "XW Rotation"
-msgstr ""
-
-#: hacks/config/hyperball.xml.h:11 hacks/config/hypercube.xml.h:11
-msgid "XY Rotation"
-msgstr ""
-
-#: hacks/config/hyperball.xml.h:12 hacks/config/hypercube.xml.h:12
-msgid "XZ Rotation"
-msgstr ""
-
-#: hacks/config/hyperball.xml.h:13 hacks/config/hypercube.xml.h:13
-msgid "YW Rotation"
-msgstr ""
-
-#: hacks/config/hyperball.xml.h:14 hacks/config/hypercube.xml.h:14
-msgid "YZ Rotation"
-msgstr ""
-
-#: hacks/config/hyperball.xml.h:15 hacks/config/hypercube.xml.h:15
-msgid "ZW Rotation"
-msgstr ""
-
-#: hacks/config/hypercube.xml.h:4
-msgid "Hypercube"
-msgstr ""
-
-#: hacks/config/hypercube.xml.h:9
-msgid ""
-"This displays 2D projections of the sequence of 3D objects which are the "
-"projections of the 4D analog to the cube: as a square is composed of four "
-"lines, each touching two others; and a cube is composed of six squares, each "
-"touching four others; a hypercube is composed of eight cubes, each touching "
-"six others. To make it easier to visualize the rotation, it uses a different "
-"color for the edges of each face. Don't think about it too long, or your "
-"brain will melt. Written by Joe Keane, Fritz Mueller, and Jamie Zawinski. "
-"See also the \"polytopes\" hack for a more general version of this using "
-"OpenGL."
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:1 hacks/config/polytopes.xml.h:1
-msgid "-4.0"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:2 hacks/config/polytopes.xml.h:5
-msgid "4.0"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:3
-msgid "4D Hypertorus"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:4
-msgid "Color Wheel"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:5 hacks/config/polytopes.xml.h:10
-msgid "Display Speed"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:7 hacks/config/polytopes.xml.h:12
-msgid "Orthographic 3d"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:8 hacks/config/polytopes.xml.h:13
-msgid "Orthographic 4d"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:9 hacks/config/polytopes.xml.h:14
-msgid "Perspective 3d"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:10 hacks/config/polytopes.xml.h:15
-msgid "Perspective 4d"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:11
-msgid "See-Through Bands"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:12
-msgid "See-Through Spirals (1 Spiral)"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:13
-msgid "See-Through Spirals (16 Spirals)"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:14
-msgid "See-Through Spirals (2 Spirals)"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:15
-msgid "See-Through Spirals (4 Spirals)"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:16
-msgid "See-Through Spirals (8 Spirals)"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:19
-msgid "Solid Object"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:20 hacks/config/mirrorblob.xml.h:19
-#: hacks/config/polytopes.xml.h:21 hacks/config/pulsar.xml.h:16
-msgid "Solid Surface"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:21
-msgid ""
-"This program shows a rotating Clifford Torus: a torus lying on the \"surface"
-"\" of a 4D hypersphere. Written by Carsten Steger, inspired by Thomas "
-"Banchoff's book \"Beyond the Third Dimension: Geometry, Computer Graphics, "
-"and Higher Dimensions\", Scientific American Library, 1990."
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:22 hacks/config/polytopes.xml.h:23
-msgid "Transparent Surface"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:23
-msgid "Two-Sided"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:24 hacks/config/polytopes.xml.h:24
-msgid "WX Rotation Speed"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:25 hacks/config/polytopes.xml.h:25
-msgid "WY Rotation Speed"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:26 hacks/config/polytopes.xml.h:26
-msgid "WZ Rotation Speed"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:27 hacks/config/polytopes.xml.h:27
-msgid "Wireframe Mesh"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:28 hacks/config/polytopes.xml.h:28
-msgid "XY Rotation Speed"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:29 hacks/config/polytopes.xml.h:29
-msgid "XZ Rotation Speed"
-msgstr ""
-
-#: hacks/config/hypertorus.xml.h:30 hacks/config/polytopes.xml.h:30
-msgid "YZ Rotation Speed"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:1
-msgid "2"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:2
-msgid "Blend"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:3
-msgid "Detail"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:5
-msgid "Function"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:6
-msgid "Functions"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:7
-msgid "IFS"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:9
-msgid "Number of Colours"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:11 hacks/config/phosphor.xml.h:6
-msgid "Scale"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:12
-msgid "Single"
-msgstr ""
-
-#: hacks/config/ifs.xml.h:15
-msgid ""
-"This one draws spinning, colliding iterated-function-system images. Note "
-"that the \"quality\" parameter is exponential. Number of points drawn is "
-"functions^detail. The number of colours is only used in Blend mode to "
-"provide a palette to create the base colours. These are then blended "
-"together in a non-colourmap friendly fashion. Written by Chris Le Sueur."
-msgstr ""
-
-#: hacks/config/ifs.xml.h:16
-msgid "Translate"
-msgstr ""
-
-#: hacks/config/imsmap.xml.h:3
-msgid "Brightness Gradients"
-msgstr ""
-
-#: hacks/config/imsmap.xml.h:7
-msgid "Hue Gradients"
-msgstr ""
-
-#: hacks/config/imsmap.xml.h:8
-msgid "IMSmap"
-msgstr ""
-
-#: hacks/config/imsmap.xml.h:12
-msgid "Saturation Gradients"
-msgstr ""
-
-#: hacks/config/imsmap.xml.h:14
-msgid ""
-"This generates random cloud-like patterns. It looks quite different in "
-"monochrome and color. The basic idea is to take four points on the edge of "
-"the image, and assign each a random ``elevation''. Then find the point "
-"between them, and give it a value which is the average of the other four, "
-"plus some small random offset. Then coloration is done based on elevation. "
-"The color selection is done by binding the elevation to either hue, "
-"saturation, or brightness, and assigning random values to the others. The "
-"``brightness'' mode tends to yield cloudlike patterns, and the others tend "
-"to generate images that look like heat-maps or CAT-scans. Written by Juergen "
-"Nickelsen and Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/interaggregate.xml.h:2
-msgid "Interaggregate"
-msgstr ""
-
-#: hacks/config/interaggregate.xml.h:3 hacks/config/intermomentary.xml.h:3
-msgid "Number of Discs"
-msgstr ""
-
-#: hacks/config/interaggregate.xml.h:6
-msgid ""
-"The Intersection Aggregate is a fun visualization defining the relationships "
-"between objects with Casey Reas, William Ngan, and Robert Hodgin. "
-"Commissioned for display at the Whitney Museum of American Art. A surface "
-"filled with 100 medium to small sized circles. Each circle has a different "
-"size and direction, but moves at the same slow rate. Display: A. The "
-"instantaneous intersections of the circles. B. The aggregate intersections "
-"of the circles. Ported to XScreensaver from the art project \"InterAggregate"
-"\" at http://www.complexification.net"
-msgstr ""
-
-#: hacks/config/interference.xml.h:1 hacks/config/rotzoomer.xml.h:1
-msgid "0"
-msgstr ""
-
-#: hacks/config/interference.xml.h:2
-msgid "360"
-msgstr ""
-
-#: hacks/config/interference.xml.h:3
-msgid "Anim Speed"
-msgstr ""
-
-#: hacks/config/interference.xml.h:4
-msgid ""
-"Another color-field hack, this one works by computing decaying sinusoidal "
-"waves, and allowing them to interfere with each other as their origins move. "
-"Written by Hannu Mallat."
-msgstr ""
-
-#: hacks/config/interference.xml.h:9
-msgid "Hue"
-msgstr ""
-
-#: hacks/config/interference.xml.h:10
-msgid "Interference"
-msgstr ""
-
-#: hacks/config/interference.xml.h:13 hacks/config/t3d.xml.h:9
-#: hacks/config/xearth.xml.h:11 hacks/config/zoom.xml.h:5
-msgid "Magnification"
-msgstr ""
-
-#: hacks/config/interference.xml.h:16
-msgid "Number of Waves"
-msgstr ""
-
-#: hacks/config/interference.xml.h:20
-msgid "Wave Size"
-msgstr ""
-
-#: hacks/config/intermomentary.xml.h:2
-msgid "Intermomentary"
-msgstr ""
-
-#: hacks/config/intermomentary.xml.h:6
-msgid ""
-"The Intersection Momentary is a fun visualization defining the relationships "
-"between objects with Casey Reas, William Ngan, and Robert Hodgin. "
-"Commissioned for display at the Whitney Museum of American Art. A surface "
-"filled with 100 medium to small sized circles. Each circle has a different "
-"size and direction, but moves at the same slow rate. Display: A. The "
-"instantaneous intersections of the circles. B. The aggregate intersections "
-"of the circles. Ported to XScreensaver from the art project \"InterMomentary"
-"\" at http://www.complexification.net"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:2
-msgid "Chrome"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:3
-msgid "Clown barf"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:5
-msgid "Cycle"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:7
-msgid "Flower box"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:9
-msgid "Inertial damping"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:10
-msgid "JigglyPuff"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:14
-msgid "Rotation speed"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:17 hacks/config/sphere.xml.h:7
-msgid "Sphere"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:18
-msgid "Sphere strength"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:19
-msgid "Spookiness"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:20
-msgid "Spoooooky"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:21 hacks/config/polyhedra.xml.h:148
-#: hacks/config/sballs.xml.h:16
-msgid "Tetrahedron"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:22
-msgid ""
-"This little gem does bad things with quasi-spherical objects. The gist of it "
-"is that you have what is, structurally, a tetrahedron with tesselated faces. "
-"the vertices on these faces have forces on them in the form of one "
-"proportional to their distance from the surface of a sphere, and one which "
-"is proportional to how far they differ from some ideal distance from their "
-"neighbors. They also have inertia. The forces and distance are parameters "
-"and there are also a couple of visual parameters. The resulting effect can "
-"range from a shape that does nothing, to a frenetic polygon storm. Somewhere "
-"in between there it usually manifests as a blob that jiggles in a kind of "
-"disturbing manner. woo. It doesn't matter, however. You should just pick "
-"'random'. It overrides all the other options, except for fps, delay and "
-"complexity. By Keith Macleod"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:23
-msgid "Vertex-vertex behavior"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:24
-msgid "Vertex-vertex force"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:26
-msgid "collapse"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:27
-msgid "expand"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:28
-msgid "none"
-msgstr ""
-
-#: hacks/config/jigglypuff.xml.h:29
-msgid "strong"
-msgstr ""
-
-#: hacks/config/jigsaw.xml.h:4
-msgid "Jigsaw"
-msgstr ""
-
-#: hacks/config/jigsaw.xml.h:6
-msgid "Solved Duration"
-msgstr ""
-
-#: hacks/config/jigsaw.xml.h:8
-msgid ""
-"This grabs a screen image, carves it up into a jigsaw puzzle, shuffles it, "
-"and then solves the puzzle. This works especially well when you feed it an "
-"external video signal instead of letting it grab the screen image (actually, "
-"I guess this is generally true...) When it is grabbing a video image, it is "
-"sometimes pretty hard to guess what the image is going to look like once the "
-"puzzle is solved. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/juggle.xml.h:1
-msgid "Draws a juggling stick-man. Written by Tim Auckland."
-msgstr ""
-
-#: hacks/config/juggle.xml.h:3
-msgid "Juggle"
-msgstr ""
-
-#: hacks/config/juggle.xml.h:6
-msgid "Performance Length"
-msgstr ""
-
-#: hacks/config/juggle.xml.h:11
-msgid "Use Pattern "
-msgstr ""
-
-#: hacks/config/juggle.xml.h:12
-msgid "turn on/off Balls."
-msgstr ""
-
-#: hacks/config/juggle.xml.h:13
-msgid "turn on/off Bowling Balls."
-msgstr ""
-
-#: hacks/config/juggle.xml.h:14
-msgid "turn on/off Clubs."
-msgstr ""
-
-#: hacks/config/juggle.xml.h:15
-msgid "turn on/off Flaming Torches."
-msgstr ""
-
-#: hacks/config/juggle.xml.h:16
-msgid "turn on/off Knives."
-msgstr ""
-
-#: hacks/config/juggle.xml.h:17
-msgid "turn on/off Rings."
-msgstr ""
-
-#: hacks/config/juggle.xml.h:18
-msgid "turn on/off pattern descriptions."
-msgstr ""
-
-#: hacks/config/juggler3d.xml.h:1
-msgid ""
-"3D simulation of a juggler performing with balls, clubs and rings. Written "
-"by Brian Apps and partially based on his Win32 Juggle Saver program."
-msgstr ""
-
-#: hacks/config/juggler3d.xml.h:3
-msgid "Juggler Horizontal Speed"
-msgstr ""
-
-#: hacks/config/juggler3d.xml.h:4
-msgid "Juggler Spin Speed"
-msgstr ""
-
-#: hacks/config/juggler3d.xml.h:5
-msgid "Juggler3D"
-msgstr ""
-
-#: hacks/config/juggler3d.xml.h:6
-msgid "Juggling Speed"
-msgstr ""
-
-#: hacks/config/juggler3d.xml.h:7
-msgid "Max Height"
-msgstr ""
-
-#: hacks/config/juggler3d.xml.h:8
-msgid "Max Objects"
-msgstr ""
-
-#: hacks/config/juggler3d.xml.h:9
-msgid "Min Height"
-msgstr ""
-
-#: hacks/config/juggler3d.xml.h:10
-msgid "Min Objects"
-msgstr ""
-
-#: hacks/config/julia.xml.h:3 hacks/config/rorschach.xml.h:4
-msgid "Iterations"
-msgstr ""
-
-#: hacks/config/julia.xml.h:4
-msgid "Julia"
-msgstr ""
-
-#: hacks/config/julia.xml.h:11
-msgid ""
-"This one draws spinning, animating (are you detecting a pattern here yet?) "
-"explorations of the Julia set. You've probably seen static images of this "
-"fractal form before, but it's a lot of fun to watch in motion as well. One "
-"interesting thing is that there is a small swinging dot passing in front of "
-"the image, which indicates the control point from which the rest of the "
-"image was generated. Written by Sean McCullough."
-msgstr ""
-
-#: hacks/config/kaleidescope.xml.h:1
-msgid ""
-"Another clone of an ancient meme, consisting largely of frenetic rotational "
-"motion of colored lines. This one is by Ron Tapia. The motion is nice, but I "
-"think it needs more solids, or perhaps just brighter colors. More variations "
-"in the rotational speed might help, too."
-msgstr ""
-
-#: hacks/config/kaleidescope.xml.h:4
-msgid "Kaleidescope"
-msgstr ""
-
-#: hacks/config/kaleidescope.xml.h:6 hacks/config/qix.xml.h:18
-msgid "Segments"
-msgstr ""
-
-#: hacks/config/kaleidescope.xml.h:9
-msgid "Symmetry"
-msgstr ""
-
-#: hacks/config/kaleidescope.xml.h:10
-msgid "Trails"
-msgstr ""
-
-#: hacks/config/klein.xml.h:3
-msgid "Klein"
-msgstr ""
-
-#: hacks/config/klein.xml.h:10
-msgid ""
-"This draws a visualization of a Klein bottle or some other interesting "
-"parametric surfaces. Written by Andrey Mirtchovski."
-msgstr ""
-
-#: hacks/config/klein.xml.h:11
-msgid "Use Randomized Surfaces and Primitives"
-msgstr ""
-
-#: hacks/config/klein.xml.h:12
-msgid "Wander Around the Screen"
-msgstr ""
-
-#: hacks/config/kumppa.xml.h:5
-msgid "Kumppa"
-msgstr ""
-
-#: hacks/config/kumppa.xml.h:7
-msgid "Randomize"
-msgstr ""
-
-#: hacks/config/kumppa.xml.h:10
-msgid ""
-"Spiraling, spinning, and very, very fast splashes of color rush toward the "
-"screen. Written by Teemu Suutari."
-msgstr ""
-
-#: hacks/config/lament.xml.h:1
-msgid ""
-"Animates a simulation of Lemarchand's Box, repeatedly solving itself. "
-"Requires OpenGL, and a machine with fast hardware support for texture maps. "
-"Warning: occasionally opens doors. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/lament.xml.h:3
-msgid "Lament"
-msgstr ""
-
-#: hacks/config/laser.xml.h:4
-msgid "Laser"
-msgstr ""
-
-#: hacks/config/laser.xml.h:7
-msgid ""
-"Moving radiating lines, that look vaguely like scanning laser beams. Written "
-"by Pascal Pensa. (Frankie say: relax.)"
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:2 hacks/config/xmountains.xml.h:2
-msgid "10"
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:4
-msgid "Classic Lavalite"
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:5
-msgid "Cone Lavalite"
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:8
-msgid ""
-"Draws a 3D Simulation a Lava Lite(r): odd-shaped blobs of a mysterious "
-"substance are heated, slowly rise to the top of the bottle, and then drop "
-"back down as they cool. This program requires OpenGL and a fairly fast "
-"machine (both CPU and 3D performance.) Written by Jamie Zawinski. \"LAVA LITE"
-"(r) and the configuration of the LAVA(r) brand motion lamp are registered "
-"trademarks of Haggerty Enterprises, Inc. The configuration of the globe and "
-"base of the motion lamp are registered trademarks of Haggerty Enterprises, "
-"Inc. in the U.S.A. and in other countries around the world.\""
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:9
-msgid "Faceted"
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:11
-msgid "Giant Lavalite"
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:13
-msgid "LavaLite"
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:15
-msgid "Max Blobs"
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:16
-msgid "Random Lamp Style"
-msgstr ""
-
-#: hacks/config/lavalite.xml.h:18
-msgid "Rocket Lavalite"
-msgstr ""
-
-#: hacks/config/lightning.xml.h:2
-msgid "Lightning"
-msgstr ""
-
-#: hacks/config/lightning.xml.h:7
-msgid ""
-"This one draws crackling fractal lightning bolts. It's simple, direct, and "
-"to the point. If only it had sound... Written by Keith Romberg."
-msgstr ""
-
-#: hacks/config/lisa.xml.h:4
-msgid "Lisa"
-msgstr ""
-
-#: hacks/config/lisa.xml.h:10
-msgid "Steps"
-msgstr ""
-
-#: hacks/config/lisa.xml.h:11
-msgid ""
-"This draws Lisajous loops, by Caleb Cullen. Remember that device they had "
-"the Phantom Zone prisoners in during their trial in Superman? I think that "
-"was one of these."
-msgstr ""
-
-#: hacks/config/lissie.xml.h:1
-msgid ""
-"Another Lissajous figure. This one draws the progress of circular shapes "
-"along a path. Written by Alexander Jolk."
-msgstr ""
-
-#: hacks/config/lissie.xml.h:5
-msgid "Lissie"
-msgstr ""
-
-#: hacks/config/lmorph.xml.h:1
-msgid "Closed Figures"
-msgstr ""
-
-#: hacks/config/lmorph.xml.h:2
-msgid "Control Points"
-msgstr ""
-
-#: hacks/config/lmorph.xml.h:4
-msgid "Interpolation Steps"
-msgstr ""
-
-#: hacks/config/lmorph.xml.h:5
-msgid "LMorph"
-msgstr ""
-
-#: hacks/config/lmorph.xml.h:6
-msgid "Less"
-msgstr ""
-
-#: hacks/config/lmorph.xml.h:8
-msgid "More"
-msgstr ""
-
-#: hacks/config/lmorph.xml.h:9
-msgid "Open Figures"
-msgstr ""
-
-#: hacks/config/lmorph.xml.h:10
-msgid "Open and Closed Figures"
-msgstr ""
-
-#: hacks/config/lmorph.xml.h:15
-msgid ""
-"This generates random spline-ish line drawings and morphs between them. "
-"Written by Sverre H. Huseby and Glenn T. Lines."
-msgstr ""
-
-#: hacks/config/loop.xml.h:3
-msgid "Loop"
-msgstr ""
-
-#: hacks/config/loop.xml.h:10
-msgid ""
-"This one produces loop-shaped colonies that spawn, age, and eventually die. "
-"Written by David Bagley."
-msgstr ""
-
-#: hacks/config/maze.xml.h:3
-msgid "Backtracking Generator"
-msgstr ""
-
-#: hacks/config/maze.xml.h:5 hacks/config/slidescreen.xml.h:3
-msgid "Grid Size"
-msgstr ""
-
-#: hacks/config/maze.xml.h:6
-msgid "Head Toward Exit"
-msgstr ""
-
-#: hacks/config/maze.xml.h:7
-msgid "Ignorant of Exit Direction"
-msgstr ""
-
-#: hacks/config/maze.xml.h:8
-msgid "Joining Generator"
-msgstr ""
-
-#: hacks/config/maze.xml.h:9
-msgid "Maze"
-msgstr ""
-
-#: hacks/config/maze.xml.h:10
-msgid "Post-Solve Delay"
-msgstr ""
-
-#: hacks/config/maze.xml.h:11
-msgid "Pre-Solve Delay"
-msgstr ""
-
-#: hacks/config/maze.xml.h:12
-msgid "Random Generator"
-msgstr ""
-
-#: hacks/config/maze.xml.h:13
-msgid "Seeding Generator"
-msgstr ""
-
-#: hacks/config/maze.xml.h:15
-msgid "Solve Speed"
-msgstr ""
-
-#: hacks/config/maze.xml.h:16
-msgid ""
-"This is the ancient X maze demo, modified to work with xscreensaver. It "
-"generates a random maze, then solves it with visual feedback. Originally by "
-"Jim Randell; modified by a cast of thousands."
-msgstr ""
-
-#: hacks/config/memscroller.xml.h:1
-msgid "Draw Green"
-msgstr ""
-
-#: hacks/config/memscroller.xml.h:2
-msgid "Draw Random Numbers"
-msgstr ""
-
-#: hacks/config/memscroller.xml.h:3
-msgid "Draw in RGB"
-msgstr ""
-
-#: hacks/config/memscroller.xml.h:4
-msgid "Dump Memory"
-msgstr ""
-
-#: hacks/config/memscroller.xml.h:6
-msgid "MemScroller"
-msgstr ""
-
-#: hacks/config/memscroller.xml.h:9
-msgid ""
-"This draws a dump of its own process memory scrolling across the screen in "
-"three windows at three different rates. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/menger.xml.h:6
-msgid "Menger"
-msgstr ""
-
-#: hacks/config/menger.xml.h:19
-msgid ""
-"This draws the three-dimensional variant of the recursive Menger Gasket, a "
-"cube-based fractal object analagous to the Sierpinski Tetrahedron. Written "
-"by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/metaballs.xml.h:1
-msgid "Big"
-msgstr ""
-
-#: hacks/config/metaballs.xml.h:2
-msgid ""
-"Draws two dimensional metaballs: overlapping and merging balls with fuzzy "
-"edges. By W.P. van Paassen."
-msgstr ""
-
-#: hacks/config/metaballs.xml.h:7
-msgid "MetaBall Movement"
-msgstr ""
-
-#: hacks/config/metaballs.xml.h:8
-msgid "MetaBall Radius"
-msgstr ""
-
-#: hacks/config/metaballs.xml.h:9
-msgid "MetaBalls"
-msgstr ""
-
-#: hacks/config/metaballs.xml.h:11
-msgid "Number of MetaBalls"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:4
-msgid "Blobby"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:5 hacks/config/nerverot.xml.h:2
-msgid "Calm"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:7
-msgid ""
-"Draws a wobbly blob that distorts the image behind it. Requires OpenGL "
-"hardware acceleration for nice animation. Written by Jon Dowdall."
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:8
-msgid "Enable Colouring"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:9
-msgid "Enable Reflected Image"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:10
-msgid "Enable Walls"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:12
-msgid "Field Points"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:13
-msgid "Freaky"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:14
-msgid "MirrorBlob"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:16
-msgid "Offset Texture Coordinates"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:22
-msgid "Very Freaky"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:24
-msgid "X Resolution"
-msgstr ""
-
-#: hacks/config/mirrorblob.xml.h:25
-msgid "Y Resolution"
-msgstr ""
-
-#: hacks/config/mismunch.xml.h:5
-msgid "Mismunch"
-msgstr ""
-
-#: hacks/config/mismunch.xml.h:6
-msgid ""
-"Munching errors! This is a creatively broken misimplementation of the "
-"classic munching squares graphics hack. Written by Steven Hazel."
-msgstr ""
-
-#: hacks/config/mismunch.xml.h:7
-msgid "One"
-msgstr ""
-
-#: hacks/config/mismunch.xml.h:9
-msgid "Simultaneous Squares"
-msgstr ""
-
-#: hacks/config/mismunch.xml.h:13 hacks/config/munch.xml.h:10
-#: hacks/config/qix.xml.h:26
-msgid "XOR"
-msgstr ""
-
-#: hacks/config/moebius.xml.h:1
-msgid ""
-"Another M. C. Escher hack by Marcelo Vianna, this one draws ``Moebius Strip "
-"II,'' a GL image of ants walking along the surface of a moebius strip."
-msgstr ""
-
-#: hacks/config/moebius.xml.h:2
-msgid "Draw Ants"
-msgstr ""
-
-#: hacks/config/moebius.xml.h:4
-msgid "Mesh Floor"
-msgstr ""
-
-#: hacks/config/moebius.xml.h:5
-msgid "Moebius"
-msgstr ""
-
-#: hacks/config/moebius.xml.h:8
-msgid "Solid Floor"
-msgstr ""
-
-#: hacks/config/moebius.xml.h:9 hacks/config/qix.xml.h:20
-msgid "Solid Objects"
-msgstr ""
-
-#: hacks/config/moire.xml.h:6
-msgid "Moire"
-msgstr ""
-
-#: hacks/config/moire.xml.h:8 hacks/config/rorschach.xml.h:6
-msgid "Offset"
-msgstr ""
-
-#: hacks/config/moire.xml.h:10
-msgid ""
-"This one draws cool circular interference patterns. Most of the circles you "
-"see aren't explicitly rendered, but show up as a result of interactions "
-"between the other pixels that were drawn. Written by Jamie Zawinski, "
-"inspired by Java code by Michael Bayne. As he pointed out, the beauty of "
-"this one is that the heart of the display algorithm can be expressed with "
-"just a pair of loops and a handful of arithmetic, giving it a high ``display "
-"hack metric''."
-msgstr ""
-
-#: hacks/config/moire2.xml.h:1
-msgid ""
-"Another example of the fun you can have with moire interference patterns; "
-"this hack generates fields of concentric circles or ovals, and combines the "
-"planes with various operations. The planes are moving independently of one "
-"another, causing the interference lines to ``spray.'' Written by Jamie "
-"Zawinski."
-msgstr ""
-
-#: hacks/config/moire2.xml.h:4
-msgid "Moire2"
-msgstr ""
-
-#: hacks/config/molecule.xml.h:3
-msgid "Describe Molecule"
-msgstr ""
-
-#: hacks/config/molecule.xml.h:5
-msgid "Draw Atomic Bonds"
-msgstr ""
-
-#: hacks/config/molecule.xml.h:6
-msgid "Draw Atomic Nuclei"
-msgstr ""
-
-#: hacks/config/molecule.xml.h:7 hacks/config/spheremonics.xml.h:2
-msgid "Draw Bounding Box"
-msgstr ""
-
-#: hacks/config/molecule.xml.h:8
-msgid "Draw Electron Shells"
-msgstr ""
-
-#: hacks/config/molecule.xml.h:9
-msgid ""
-"Draws several different representations of molecules. Some common molecules "
-"are built in, and it can also read PDB (Protein Data Base) files as input. "
-"Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/molecule.xml.h:12
-msgid "Label Atoms"
-msgstr ""
-
-#: hacks/config/molecule.xml.h:13
-msgid "Molecule"
-msgstr ""
-
-#: hacks/config/molecule.xml.h:14
-msgid "PDB File or Directory"
-msgstr ""
-
-#: hacks/config/morph3d.xml.h:1
-msgid ""
-"Another 3d shape-changing GL hack, by Marcelo Vianna. It has the same shiny-"
-"plastic feel as Superquadrics, as many computer-generated objects do..."
-msgstr ""
-
-#: hacks/config/morph3d.xml.h:4
-msgid "Morph3D"
-msgstr ""
-
-#: hacks/config/mountain.xml.h:3
-msgid ""
-"Generates random 3d plots that look vaguely mountainous. Written by Pascal "
-"Pensa."
-msgstr ""
-
-#: hacks/config/mountain.xml.h:5
-msgid "Mountain"
-msgstr ""
-
-#: hacks/config/munch.xml.h:1
-msgid ""
-"DATAI 2 ADDB 1,2 ROTC 2,-22 XOR 1,2 JRST .-4 As reported by HAKMEM, in 1962, "
-"Jackson Wright wrote the above PDP-1 code. That code still lives on in this "
-"screenhack, some 35 years later. The number of lines of enclosing code has "
-"increased substantially, however. This version is by Tim Showalter."
-msgstr ""
-
-#: hacks/config/munch.xml.h:5
-msgid "Munch"
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:1
-msgid "Blot Count"
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:3
-msgid "Changes"
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:4
-msgid "Colors"
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:5
-msgid "Crunchiness"
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:7
-msgid ""
-"Draws different shapes composed of nervously vibrating squiggles, as if seen "
-"through a camera operated by a monkey on crack. By Dan Bornstein."
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:10
-msgid "Frequent"
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:16
-msgid "NerveRot"
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:17
-msgid "Nervousness"
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:18 hacks/config/pyro.xml.h:12
-msgid "Seldom"
-msgstr ""
-
-#: hacks/config/nerverot.xml.h:21
-msgid "Spastic"
-msgstr ""
-
-#: hacks/config/noof.xml.h:1
-msgid "Draws some rotatey patterns, using OpenGL. Written by Mark Kilgard."
-msgstr ""
-
-#: hacks/config/noof.xml.h:3
-msgid "Noof"
-msgstr ""
-
-#: hacks/config/noseguy.xml.h:1
-msgid ""
-"A little man with a big nose wanders around your screen saying things. The "
-"things which he says are the output of a program or the contents of a file "
-"or URL, as configured on the \"Advanced\" tab of the main Screensaver "
-"Preferences window. By Dan Heller and Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/noseguy.xml.h:2
-msgid "Get Text from File"
-msgstr ""
-
-#: hacks/config/noseguy.xml.h:3
-msgid "Get Text from Program"
-msgstr ""
-
-#: hacks/config/noseguy.xml.h:4
-msgid "Noseguy"
-msgstr ""
-
-#: hacks/config/noseguy.xml.h:6
-msgid "Text File"
-msgstr ""
-
-#: hacks/config/noseguy.xml.h:8
-msgid "Use Text Below"
-msgstr ""
-
-#: hacks/config/pacman.xml.h:2
-msgid "Pacman"
-msgstr ""
-
-#: hacks/config/pacman.xml.h:3
-msgid "Player Size"
-msgstr ""
-
-#: hacks/config/pacman.xml.h:4
-msgid ""
-"Simulates a game of Pac-Man on a randomly-created level. Written by Edwin de "
-"Jong."
-msgstr ""
-
-#: hacks/config/pedal.xml.h:7
-msgid "Pedal"
-msgstr ""
-
-#: hacks/config/pedal.xml.h:8
-msgid ""
-"This is sort of a combination spirograph/string-art. It generates a large, "
-"complex polygon, and lets the X server do the bulk of the work by giving it "
-"an even/odd winding rule. Written by Dale Moore, based on some ancient PDP-"
-"11 code."
-msgstr ""
-
-#: hacks/config/penetrate.xml.h:1
-msgid "Always play well"
-msgstr ""
-
-#: hacks/config/penetrate.xml.h:2
-msgid "Explosions"
-msgstr ""
-
-#: hacks/config/penetrate.xml.h:5
-msgid "Penetrate"
-msgstr ""
-
-#: hacks/config/penetrate.xml.h:7
-msgid "Start badly, but learn"
-msgstr ""
-
-#: hacks/config/penetrate.xml.h:8
-msgid ""
-"This hack simulates the classic arcade game Missile Command. Written by Adam "
-"Miller."
-msgstr ""
-
-#: hacks/config/penrose.xml.h:1
-msgid "Draw Ammann Lines"
-msgstr ""
-
-#: hacks/config/penrose.xml.h:2
-msgid ""
-"Draws quasiperiodic tilings; think of the implications on modern formica "
-"technology. Written by Timo Korvola. In April 1997, Sir Roger Penrose, a "
-"British math professor who has worked with Stephen Hawking on such topics as "
-"relativity, black holes, and whether time has a beginning, filed a copyright-"
-"infringement lawsuit against the Kimberly-Clark Corporation, which Penrose "
-"said copied a pattern he created (a pattern demonstrating that ``a "
-"nonrepeating pattern could exist in nature'') for its Kleenex quilted toilet "
-"paper. Penrose said he doesn't like litigation but, ``When it comes to the "
-"population of Great Britain being invited by a multinational to wipe their "
-"bottoms on what appears to be the work of a Knight of the Realm, then a last "
-"stand must be taken.'' As reported by News of the Weird #491, 4-jul-1997."
-msgstr ""
-
-#: hacks/config/penrose.xml.h:6
-msgid "Penrose"
-msgstr ""
-
-#: hacks/config/petri.xml.h:2
-msgid "Colony Shape"
-msgstr ""
-
-#: hacks/config/petri.xml.h:3
-msgid "Death Comes"
-msgstr ""
-
-#: hacks/config/petri.xml.h:4
-msgid "Diamond"
-msgstr ""
-
-#: hacks/config/petri.xml.h:6
-msgid "Fertility"
-msgstr ""
-
-#: hacks/config/petri.xml.h:12
-msgid "Maximum Lifespan"
-msgstr ""
-
-#: hacks/config/petri.xml.h:13
-msgid "Maximum Rate of Death"
-msgstr ""
-
-#: hacks/config/petri.xml.h:14
-msgid "Maximum Rate of Growth"
-msgstr ""
-
-#: hacks/config/petri.xml.h:15
-msgid "Minimum Lifespan"
-msgstr ""
-
-#: hacks/config/petri.xml.h:16
-msgid "Minimum Rate of Death"
-msgstr ""
-
-#: hacks/config/petri.xml.h:17
-msgid "Minimum Rate of Growth"
-msgstr ""
-
-#: hacks/config/petri.xml.h:18
-msgid "Mold Varieties"
-msgstr ""
-
-#: hacks/config/petri.xml.h:19
-msgid "Offspring"
-msgstr ""
-
-#: hacks/config/petri.xml.h:20
-msgid "Petri"
-msgstr ""
-
-#: hacks/config/petri.xml.h:21
-msgid "Quickly"
-msgstr ""
-
-#: hacks/config/petri.xml.h:24
-msgid "Slowly"
-msgstr ""
-
-#: hacks/config/petri.xml.h:26
-msgid "Square"
-msgstr ""
-
-#: hacks/config/petri.xml.h:27
-msgid ""
-"This simulates colonies of mold growing in a petri dish. Growing colored "
-"circles overlap and leave spiral interference in their wake. Written by Dan "
-"Bornstein."
-msgstr ""
-
-#: hacks/config/phosphor.xml.h:1
-msgid ""
-"Draws a simulation of an old terminal, with large pixels and long-sustain "
-"phosphor. This program is also a fully-functional VT100 emulator! The text "
-"can be the output of a program or the contents of a file or URL, as "
-"configured on the \"Advanced\" tab of the main Screensaver Preferences "
-"window. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/phosphor.xml.h:2
-msgid "Dump pipe"
-msgstr ""
-
-#: hacks/config/phosphor.xml.h:5
-msgid "Phosphor"
-msgstr ""
-
-#: hacks/config/phosphor.xml.h:10
-msgid "Use PTY"
-msgstr ""
-
-#: hacks/config/piecewise.xml.h:1
-msgid "Color shifting speed"
-msgstr ""
-
-#: hacks/config/piecewise.xml.h:6
-msgid "Maximum radius"
-msgstr ""
-
-#: hacks/config/piecewise.xml.h:7
-msgid "Minimum radius"
-msgstr ""
-
-#: hacks/config/piecewise.xml.h:8
-msgid "Piecewise"
-msgstr ""
-
-#: hacks/config/piecewise.xml.h:12
-msgid ""
-"This draws a bunch of moving circles which switch from visibility to "
-"invisibility at intersection points. Written by Geoffrey Irving."
-msgstr ""
-
-#: hacks/config/pinion.xml.h:1
-msgid "100"
-msgstr ""
-
-#: hacks/config/pinion.xml.h:2
-msgid "2000"
-msgstr ""
-
-#: hacks/config/pinion.xml.h:4
-msgid ""
-"Draws an interconnected set of gears moving across the screen. Written by "
-"Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/pinion.xml.h:6
-msgid "Gear Size"
-msgstr ""
-
-#: hacks/config/pinion.xml.h:8
-msgid "Max RPM"
-msgstr ""
-
-#: hacks/config/pinion.xml.h:9
-msgid "Pinion"
-msgstr ""
-
-#: hacks/config/pinion.xml.h:11
-msgid "Scrolling Speed"
-msgstr ""
-
-#: hacks/config/pipes.xml.h:1
-msgid "Allow Tight Turns"
-msgstr ""
-
-#: hacks/config/pipes.xml.h:2
-msgid "Ball Joints"
-msgstr ""
-
-#: hacks/config/pipes.xml.h:3
-msgid "Curved Pipes"
-msgstr ""
-
-#: hacks/config/pipes.xml.h:6
-msgid "Fisheye Lens"
-msgstr ""
-
-#: hacks/config/pipes.xml.h:7
-msgid "Gadgetry"
-msgstr ""
-
-#: hacks/config/pipes.xml.h:8
-msgid ""
-"If you've ever been in the same room with a Windows NT machine, you've "
-"probably seen this GL hack. This version is by Marcelo Vianna."
-msgstr ""
-
-#: hacks/config/pipes.xml.h:11
-msgid "Number of Pipe Systems"
-msgstr ""
-
-#: hacks/config/pipes.xml.h:12
-msgid "Pipe Fittings"
-msgstr ""
-
-#: hacks/config/pipes.xml.h:13
-msgid "Pipes"
-msgstr ""
-
-#: hacks/config/pipes.xml.h:17
-msgid "System Length"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:4 hacks/config/sballs.xml.h:1
-msgid "Cube"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:5
-msgid "Cubitruncated Cuboctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:6
-msgid "Cuboctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:7
-msgid "Cubohemioctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:8
-msgid "Deltoidal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:9
-msgid "Deltoidal Icositetrahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:10
-msgid "Disdyakisdodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:11
-msgid "Disdyakistriacontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:12
-msgid "Display Random Polyhedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:13
-msgid ""
-"Displays different 3D solids and some information about each. A new solid is "
-"chosen every few seconds. There are 75 uniform polyhedra, plus 5 infinite "
-"sets of prisms and antiprisms; including their duals brings the total to "
-"160. Written by Dr. Zvi Har'El and Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:14
-msgid "Ditrigonal Dodecadodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:15 hacks/config/sballs.xml.h:2
-msgid "Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:18
-msgid "Great Cubicuboctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:19
-msgid "Great Deltoidal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:20
-msgid "Great Deltoidal Icositetrahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:21
-msgid "Great Dirhombicosidodecacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:22
-msgid "Great Dirhombicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:23
-msgid "Great Disdyakisdodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:24
-msgid "Great Disdyakistriacontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:25
-msgid "Great Ditrigonal Dodecacronic Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:26
-msgid "Great Ditrigonal Dodecicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:27
-msgid "Great Ditrigonal Icosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:28
-msgid "Great Dodecacronic Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:29
-msgid "Great Dodecadodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:30
-msgid "Great Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:31
-msgid "Great Dodecahemicosacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:32
-msgid "Great Dodecahemicosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:33
-msgid "Great Dodecahemidodecacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:34
-msgid "Great Dodecahemidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:35
-msgid "Great Dodecicosacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:36
-msgid "Great Dodecicosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:37
-msgid "Great Dodecicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:38
-msgid "Great Hexacronic Icositetrahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:39
-msgid "Great Hexagonal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:40
-msgid "Great Icosacronic Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:41
-msgid "Great Icosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:42
-msgid "Great Icosicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:43
-msgid "Great Icosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:44
-msgid "Great Icosihemidodecacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:45
-msgid "Great Icosihemidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:46
-msgid "Great Inverted Pentagonal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:47
-msgid "Great Inverted Snub Icosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:48
-msgid "Great Pentagonal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:49
-msgid "Great Pentagrammic Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:50
-msgid "Great Pentakisdodekahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:51
-msgid "Great Retrosnub Icosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:52
-msgid "Great Rhombic Triacontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:53
-msgid "Great Rhombicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:54
-msgid "Great Rhombicuboctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:55
-msgid "Great Rhombidodecacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:56
-msgid "Great Rhombidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:57
-msgid "Great Rhombihexacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:58
-msgid "Great Rhombihexahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:59
-msgid "Great Snub Dodecicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:60
-msgid "Great Snub Icosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:61
-msgid "Great Stellapentakisdodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:62
-msgid "Great Stellated Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:63
-msgid "Great Stellated Truncated Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:64
-msgid "Great Triakisicosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:65
-msgid "Great Triakisoctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:66
-msgid "Great Triambic Icosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:67
-msgid "Great Truncated Cuboctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:68
-msgid "Great Truncated Icosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:69
-msgid "Great Truncated Icosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:70
-msgid "Hexahemioctacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:71 hacks/config/sballs.xml.h:5
-msgid "Icosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:72
-msgid "Icosidodecadodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:73
-msgid "Icosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:74
-msgid "Icositruncated Dodecadodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:75
-msgid "Inverted Snub Dodecadodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:76
-msgid "Medial Deltoidal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:77
-msgid "Medial Disdyakistriacontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:78
-msgid "Medial Hexagonal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:79
-msgid "Medial Icosacronic Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:80
-msgid "Medial Inverted Pentagonal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:81
-msgid "Medial Pentagonal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:82
-msgid "Medial Rhombic Triacontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:83
-msgid "Medial Triambic Icosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:85 hacks/config/sballs.xml.h:7
-msgid "Octahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:86
-msgid "Octahemioctacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:87
-msgid "Octahemioctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:88
-msgid "Pentagonal Antiprism"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:89
-msgid "Pentagonal Deltohedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:90
-msgid "Pentagonal Dipyramid"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:91
-msgid "Pentagonal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:92
-msgid "Pentagonal Icositetrahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:93
-msgid "Pentagonal Prism"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:94
-msgid "Pentagrammic Antiprism"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:95
-msgid "Pentagrammic Concave Deltohedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:96
-msgid "Pentagrammic Crossed Antiprism"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:97
-msgid "Pentagrammic Deltohedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:98
-msgid "Pentagrammic Dipyramid"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:99
-msgid "Pentagrammic Prism"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:100
-msgid "Pentakisdodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:101
-msgid "Polyhedra"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:102
-msgid "Rhombic Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:103
-msgid "Rhombic Triacontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:104
-msgid "Rhombicosacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:105
-msgid "Rhombicosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:106
-msgid "Rhombicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:107
-msgid "Rhombicuboctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:108
-msgid "Rhombidodecadodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:109
-msgid "Show Description"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:112
-msgid "Small Cubicuboctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:113
-msgid "Small Ditrigonal Dodecacronic Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:114
-msgid "Small Ditrigonal Dodecicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:115
-msgid "Small Ditrigonal Icosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:116
-msgid "Small Dodecacronic Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:117
-msgid "Small Dodecahemicosacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:118
-msgid "Small Dodecahemicosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:119
-msgid "Small Dodecahemidodecacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:120
-msgid "Small Dodecahemidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:121
-msgid "Small Dodecicosacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:122
-msgid "Small Dodecicosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:123
-msgid "Small Dodecicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:124
-msgid "Small Hexacronic Icositetrahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:125
-msgid "Small Hexagonal Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:126
-msgid "Small Hexagrammic Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:127
-msgid "Small Icosacronic Hexecontahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:128
-msgid "Small Icosicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:129
-msgid "Small Icosihemidodecacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:130
-msgid "Small Icosihemidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:131
-msgid "Small Retrosnub Icosicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:132
-msgid "Small Rhombidodecacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:133
-msgid "Small Rhombidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:134
-msgid "Small Rhombihexacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:135
-msgid "Small Rhombihexahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:136
-msgid "Small Snub Icosicosidodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:137
-msgid "Small Stellapentakisdodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:138
-msgid "Small Stellated Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:139
-msgid "Small Stellated Truncated Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:140
-msgid "Small Triambic Icosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:141
-msgid "Snub Cube"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:142
-msgid "Snub Dodecadodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:143
-msgid "Snub Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:144
-msgid "Snub Icosidodecadodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:146
-msgid "Stellated Truncated Hexahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:147
-msgid "Tetradyakishexahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:149
-msgid "Tetrahemihexacron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:150
-msgid "Tetrahemihexahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:151
-msgid "Tetrakishexahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:152
-msgid "Triakisicosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:153
-msgid "Triakisoctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:154
-msgid "Triakistetrahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:155
-msgid "Tridyakisicosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:156
-msgid "Truncated Cube"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:157
-msgid "Truncated Cuboctahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:158
-msgid "Truncated Dodecadodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:159
-msgid "Truncated Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:160
-msgid "Truncated Great Dodecahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:161
-msgid "Truncated Icosahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:162
-msgid "Truncated Icosidodechedon"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:163
-msgid "Truncated Octahedron"
-msgstr ""
-
-#: hacks/config/polyhedra.xml.h:164
-msgid "Truncated Tetrahedron"
-msgstr ""
-
-#: hacks/config/polyominoes.xml.h:3
-msgid "Identical Pieces"
-msgstr ""
-
-#: hacks/config/polyominoes.xml.h:7
-msgid "Polyominoes"
-msgstr ""
-
-#: hacks/config/polyominoes.xml.h:8
-msgid ""
-"Repeatedly attempts to completely fill a rectangle with irregularly-shaped "
-"puzzle pieces. Written by Stephen Montgomery-Smith."
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:2
-msgid "120-Cell"
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:3
-msgid "16-Cell (Hyper-Octahedron)"
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:4
-msgid "24-Cell"
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:6
-msgid "5-Cell (Hyper-Tetrahedron)"
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:7
-msgid "600-Cell"
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:8
-msgid "8-Cell (Hypercube / Tesseract)"
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:9
-msgid "Colors By 4D Depth"
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:17
-msgid "Regular 4D Polytopes"
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:19
-msgid "Single Color"
-msgstr ""
-
-#: hacks/config/polytopes.xml.h:22
-msgid ""
-"This program shows one of the six regular 4D polytopes rotating in 4D. "
-"Written by Carsten Steger, inspired by H.S.M Coxeter's book \"Regular "
-"Polytopes\", 3rd Edition, Dover Publications, Inc., 1973, and Thomas "
-"Banchoff's book \"Beyond the Third Dimension: Geometry, Computer Graphics, "
-"and Higher Dimensions\", Scientific American Library, 1990."
-msgstr ""
-
-#: hacks/config/pong.xml.h:2
-msgid "Pong"
-msgstr ""
-
-#: hacks/config/pong.xml.h:6
-msgid ""
-"The pong program simulates an ancient Pong home video game, as well as "
-"various artifacts from displaying it on a color TV set. Written by Jeremy "
-"English and Trevor Blackwell."
-msgstr ""
-
-#: hacks/config/popsquares.xml.h:2
-msgid "End color"
-msgstr ""
-
-#: hacks/config/popsquares.xml.h:7
-msgid "Start color"
-msgstr ""
-
-#: hacks/config/popsquares.xml.h:8
-msgid "Subdivision"
-msgstr ""
-
-#: hacks/config/popsquares.xml.h:9
-msgid ""
-"This draws a pop-art-ish looking grid of pulsing colors. By Levi Burton."
-msgstr ""
-
-#: hacks/config/popsquares.xml.h:10
-msgid "Twitch"
-msgstr ""
-
-#: hacks/config/popsquares.xml.h:11
-msgid "popsquares"
-msgstr ""
-
-#: hacks/config/providence.xml.h:1
-msgid "Draw Eye"
-msgstr ""
-
-#: hacks/config/providence.xml.h:3
-msgid "Providence"
-msgstr ""
-
-#: hacks/config/providence.xml.h:8
-msgid ""
-"The providence code displays an eye, shrouded in glory, set upon the base of "
-"a pyramid. Written by Blair Tennessy."
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:1
-msgid "Anti-alias Lines"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:3
-msgid ""
-"Draws some intersecting planes, making use of alpha blending, fog, textures, "
-"and mipmaps, plus a ``frames per second'' meter so that you can tell how "
-"fast your graphics card is... Requires OpenGL. Written by David Konerding."
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:4
-msgid "Enable Blending"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:5
-msgid "Enable Depth Buffer"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:6
-msgid "Enable Fog"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:7
-msgid "Enable Lighting"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:8
-msgid "Enable Texture Filtering"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:9
-msgid "Enable Texture Mipmaps"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:10
-msgid "Enable Texturing"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:12
-msgid "Pulsar"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:13
-msgid "Quad Count"
-msgstr ""
-
-#: hacks/config/pulsar.xml.h:18
-msgid "Texture PPM File"
-msgstr ""
-
-#: hacks/config/pyro.xml.h:3
-msgid "Explosive Yield"
-msgstr ""
-
-#: hacks/config/pyro.xml.h:6
-msgid "Launch Frequency"
-msgstr ""
-
-#: hacks/config/pyro.xml.h:9
-msgid "Particle Density"
-msgstr ""
-
-#: hacks/config/pyro.xml.h:10
-msgid "Pyro"
-msgstr ""
-
-#: hacks/config/pyro.xml.h:11
-msgid ""
-"Pyro draws exploding fireworks. Blah blah blah. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/qix.xml.h:1
-msgid "Additive Colors"
-msgstr ""
-
-#: hacks/config/qix.xml.h:3
-msgid "Corners"
-msgstr ""
-
-#: hacks/config/qix.xml.h:11
-msgid "Line Segments"
-msgstr ""
-
-#: hacks/config/qix.xml.h:12
-msgid "Linear Motion"
-msgstr ""
-
-#: hacks/config/qix.xml.h:15
-msgid "Max Size"
-msgstr ""
-
-#: hacks/config/qix.xml.h:16
-msgid "Qix"
-msgstr ""
-
-#: hacks/config/qix.xml.h:17
-msgid "Random Motion"
-msgstr ""
-
-#: hacks/config/qix.xml.h:23
-msgid "Subtractive Colors"
-msgstr ""
-
-#: hacks/config/qix.xml.h:24
-msgid ""
-"This is the swiss army chainsaw of qix programs. It bounces a series of line "
-"segments around the screen, and uses variations on this basic motion pattern "
-"to produce all sorts of different presentations: line segments, filled "
-"polygons, overlapping translucent areas... Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/qix.xml.h:25
-msgid "Transparent"
-msgstr ""
-
-#: hacks/config/queens.xml.h:2
-msgid "Queens"
-msgstr ""
-
-#: hacks/config/queens.xml.h:5
-msgid ""
-"Solves the N-Queens problem (where, in this program, N is between 5 and 10 "
-"queens.) The problem is: how may one place N queens on an NxN chessboard "
-"such that no queen can attack a sister? Written by Blair Tennessy."
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:1
-msgid "/"
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:3
-#, no-c-format
-msgid "1%"
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:7
-msgid ""
-"Another variation of the `Bomb' program by Scott Draves. This draws a grid "
-"of growing square-like shapes that, once they overtake each other, react in "
-"unpredictable ways. ``RD'' stands for reaction-diffusion."
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:8
-msgid "Epoch"
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:10
-msgid "Fill Screen"
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:14
-msgid "RD-Bomb"
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:15
-msgid "Reaction/Diffusion"
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:16
-msgid "Seed Radius"
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:19 hacks/config/twang.xml.h:12
-msgid "Tile Size"
-msgstr ""
-
-#: hacks/config/rd-bomb.xml.h:22
-msgid "Wander Speed"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:1
-msgid "Big Drops"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:2
-msgid "Colors    Two"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:3
-msgid "Drizzle"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:5
-msgid "Grab Screen Image"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:6
-msgid "Grayscale"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:7
-msgid "Lighting Effect"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:9
-msgid "Moving Splashes"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:10
-msgid "Psychedelic Colors"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:11
-msgid "Ripples"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:13
-msgid "Small Drops"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:14
-msgid "Storm"
-msgstr ""
-
-#: hacks/config/ripples.xml.h:15
-msgid ""
-"This draws rippling interference patterns like splashing water. With the -"
-"water option, it manipulates your desktop image to look like something is "
-"dripping into it. Written by Tom Hammersley."
-msgstr ""
-
-#: hacks/config/rocks.xml.h:7
-msgid "Rocks"
-msgstr ""
-
-#: hacks/config/rocks.xml.h:10
-msgid "Steering"
-msgstr ""
-
-#: hacks/config/rocks.xml.h:11
-msgid ""
-"This draws an animation of flight through an asteroid field, with changes in "
-"rotation and direction. It can also display 3D separations for red/blue "
-"glasses! Mostly written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/rocks.xml.h:13
-msgid "Velocity"
-msgstr ""
-
-#: hacks/config/rorschach.xml.h:7
-msgid "Rorschach"
-msgstr ""
-
-#: hacks/config/rorschach.xml.h:9
-msgid ""
-"This generates random inkblot patterns. The algorithm is deceptively simple "
-"for how well it works; it merely walks a dot around the screen randomly, and "
-"then reflects the image horizontally, vertically, or both. Any deep-seated "
-"neurotic tendencies which this program reveals are your own problem. Written "
-"by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/rorschach.xml.h:10
-msgid "With X Symmetry"
-msgstr ""
-
-#: hacks/config/rorschach.xml.h:11
-msgid "With Y Symmetry"
-msgstr ""
-
-#: hacks/config/rotor.xml.h:1
-msgid ""
-"Another ancient xlock demo, this one by Tom Lawrence. It draws a line "
-"segment moving along a complex spiraling curve."
-msgstr ""
-
-#: hacks/config/rotor.xml.h:4 hacks/config/wander.xml.h:9
-msgid "Length"
-msgstr ""
-
-#: hacks/config/rotor.xml.h:8
-msgid "Rotor"
-msgstr ""
-
-#: hacks/config/rotzoomer.xml.h:2
-msgid "60"
-msgstr ""
-
-#: hacks/config/rotzoomer.xml.h:3
-msgid "Animate"
-msgstr ""
-
-#: hacks/config/rotzoomer.xml.h:4
-msgid ""
-"Creates a collage of rotated and scaled portions of the screen. Written by "
-"Claudio Matsuoka."
-msgstr ""
-
-#: hacks/config/rotzoomer.xml.h:6
-msgid "Rectangle Count"
-msgstr ""
-
-#: hacks/config/rotzoomer.xml.h:7
-msgid "RotZoomer"
-msgstr ""
-
-#: hacks/config/rotzoomer.xml.h:8
-msgid "Stationary Rectangles"
-msgstr ""
-
-#: hacks/config/rotzoomer.xml.h:9
-msgid "Sweeping Arcs"
-msgstr ""
-
-#: hacks/config/rotzoomer.xml.h:11
-msgid "Wandering Rectangles"
-msgstr ""
-
-#: hacks/config/rubik.xml.h:2
-msgid ""
-"Draws a Rubik's Cube that rotates in three dimensions and repeatedly "
-"shuffles and solves itself. Another fine GL hack by Marcelo Vianna."
-msgstr ""
-
-#: hacks/config/rubik.xml.h:5
-msgid "Rubik"
-msgstr ""
-
-#: hacks/config/rubik.xml.h:7
-msgid "Show Shuffling"
-msgstr ""
-
-#: hacks/config/sballs.xml.h:3
-msgid ""
-"Draws an animation of textured balls spinning like crazy in GL. Requires "
-"OpenGL, and a machine with fast hardware support for texture maps. Written "
-"by Eric Lassauge &lt;lassauge@users.sourceforge.net&gt;."
-msgstr ""
-
-#: hacks/config/sballs.xml.h:8
-msgid "Plane"
-msgstr ""
-
-#: hacks/config/sballs.xml.h:9
-msgid "Pyramid"
-msgstr ""
-
-#: hacks/config/sballs.xml.h:11
-msgid "Sballs"
-msgstr ""
-
-#: hacks/config/sballs.xml.h:15
-msgid "Star"
-msgstr ""
-
-#: hacks/config/shadebobs.xml.h:7
-msgid "ShadeBobs"
-msgstr ""
-
-#: hacks/config/shadebobs.xml.h:11
-msgid ""
-"This draws smoothly-shaded oscillating oval patterns, that look something "
-"like vapor trails or neon tubes. Written by Shane Smit."
-msgstr ""
-
-#: hacks/config/sierpinski.xml.h:6
-msgid "Sierpinski"
-msgstr ""
-
-#: hacks/config/sierpinski.xml.h:10
-msgid ""
-"This draws the two-dimensional variant of the recursive Sierpinski triangle "
-"fractal. Written by Desmond Daignault."
-msgstr ""
-
-#: hacks/config/sierpinski3d.xml.h:7
-msgid "Sierpinski3D"
-msgstr ""
-
-#: hacks/config/sierpinski3d.xml.h:11
-msgid ""
-"This draws the three-dimensional variant of the recursive Sierpinski "
-"triangle fractal, using GL. Written by Tim Robinson and Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/slidescreen.xml.h:1 hacks/config/twang.xml.h:1
-#: hacks/config/zoom.xml.h:1
-msgid "Border Width"
-msgstr ""
-
-#: hacks/config/slidescreen.xml.h:4
-msgid "Slide Speed"
-msgstr ""
-
-#: hacks/config/slidescreen.xml.h:5
-msgid "SlideScreen"
-msgstr ""
-
-#: hacks/config/slidescreen.xml.h:8
-msgid ""
-"This takes an image, divides it into a grid, and then randomly shuffles the "
-"squares around as if it was one of those annoying ``16-puzzle'' games, where "
-"there is a grid of squares, one of which is missing. I hate trying to solve "
-"those puzzles, but watching one permute itself is more amusing. Written by "
-"Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/slip.xml.h:6
-msgid "Slip"
-msgstr ""
-
-#: hacks/config/slip.xml.h:10
-msgid ""
-"This program throws some random bits on the screen, then sucks them through "
-"a jet engine and spews them out the other side. To avoid turning the image "
-"completely to mush, every now and then it will and then it interjects some "
-"splashes of color into the scene, or go into a spin cycle, or stretch the "
-"image like taffy, or (this is my addition) grab an image of your current "
-"desktop to chew on. Originally written by Scott Draves; whacked on by Jamie "
-"Zawinski."
-msgstr ""
-
-#: hacks/config/sonar.xml.h:1
-msgid "Ping known hosts"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:2
-msgid "Ping mode..."
-msgstr ""
-
-#: hacks/config/sonar.xml.h:3
-msgid "Ping subnet/24 (254 hosts)"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:4
-msgid "Ping subnet/25 (126 hosts)"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:5
-msgid "Ping subnet/26 (62 hosts)"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:6
-msgid "Ping subnet/27 (31 hosts)"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:7
-msgid "Ping subnet/28 (14 hosts)"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:8
-msgid "Ping subnet/29 (6 hosts)"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:9
-msgid "Ping subnet/30 (2 hosts)"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:10
-msgid "Resolve Host Names"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:11
-msgid "Show Ping Times"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:12
-msgid "Simulation Team Members"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:13
-msgid "Sonar"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:14
-msgid "Team A Name"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:15
-msgid "Team B Name"
-msgstr ""
-
-#: hacks/config/sonar.xml.h:16
-msgid ""
-"This program draws a simulation of a sonar screen. By default, it displays a "
-"random assortment of ``bogies'' on the screen, but if installed as \"setuid "
-"root\", it can ping (pun intended) your local network, and actually plot the "
-"proximity of the other hosts on your network to you. Written by Stephen "
-"Martin and Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/sonar.xml.h:17
-msgid "vs."
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:1
-msgid "Allow Wall Collisions"
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:2
-msgid "Display Crosshair"
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:7
-msgid "Max Velocity"
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:8
-msgid "Mine Shaft"
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:9
-msgid "Present Bonuses"
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:10
-msgid "Rocky Walls"
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:12
-msgid ""
-"Simulates speeding down a rocky mineshaft, or a funky dancing worm. Written "
-"by Conrad Parker."
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:16
-msgid "SpeedMine"
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:17
-msgid "Thrust"
-msgstr ""
-
-#: hacks/config/speedmine.xml.h:19 hacks/config/worm.xml.h:10
-msgid "Worm"
-msgstr ""
-
-#: hacks/config/sphere.xml.h:1
-msgid ""
-"Another of the classic screenhacks of the distant past, this one draws "
-"shaded spheres in multiple colors. This hack traces its lineage back to Tom "
-"Duff in 1982."
-msgstr ""
-
-#: hacks/config/sphereeversion.xml.h:1
-msgid "SphereEversion"
-msgstr ""
-
-#: hacks/config/sphereeversion.xml.h:2
-msgid ""
-"SphereEversion draws an animation of a sphere being turned inside out. A "
-"sphere can be turned inside out, without any tears, sharp creases or "
-"discontinuities, if the surface of the sphere is allowed to intersect "
-"itself. This program animates what is known as the Thurston Eversion. "
-"Written by Nathaniel Thurston and Michael McGuffin. This program is not "
-"included with the XScreenSaver package, but if you don't have it already, "
-"you can find it at &lt;http://www.dgp.utoronto.ca/~mjmcguff/eversion/&gt;."
-msgstr ""
-
-#: hacks/config/spheremonics.xml.h:20
-msgid "Smoothed Lines"
-msgstr ""
-
-#: hacks/config/spheremonics.xml.h:23
-msgid "Spheremonics"
-msgstr ""
-
-#: hacks/config/spheremonics.xml.h:24
-msgid ""
-"These closed objects are commonly called spherical harmonics, although they "
-"are only remotely related to the mathematical definition found in the "
-"solution to certain wave functions, most notable the eigenfunctions of "
-"angular momentum operators. Written by Paul Bourke and Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/spiral.xml.h:2 hacks/config/superquadrics.xml.h:2
-msgid "Cycles"
-msgstr ""
-
-#: hacks/config/spiral.xml.h:7
-msgid ""
-"Moving circular patterns, by Peter Schmitzberger. Moving circular patterns "
-"means moire; interference patterns, of course."
-msgstr ""
-
-#: hacks/config/spiral.xml.h:11
-msgid "Spiral"
-msgstr ""
-
-#: hacks/config/spotlight.xml.h:1
-msgid ""
-"Draws a spotlight scanning across a black screen, illuminating the "
-"underlying desktop when it passes. Written by Rick Schultz."
-msgstr ""
-
-#: hacks/config/spotlight.xml.h:6
-msgid "Spotlight"
-msgstr ""
-
-#: hacks/config/sproingies.xml.h:3
-msgid "Q-Bert meets Marble Madness! Written by Ed Mackey."
-msgstr ""
-
-#: hacks/config/sproingies.xml.h:9
-msgid "Sproingies"
-msgstr ""
-
-#: hacks/config/squiral.xml.h:3
-msgid ""
-"Draws a set of interacting, square-spiral-producing automata. The spirals "
-"grow outward until they hit something, then they go around it. Written by "
-"Jeff Epler."
-msgstr ""
-
-#: hacks/config/squiral.xml.h:5
-msgid "Handedness"
-msgstr ""
-
-#: hacks/config/squiral.xml.h:7
-msgid "Left"
-msgstr ""
-
-#: hacks/config/squiral.xml.h:11 hacks/config/twang.xml.h:8
-msgid "Randomness"
-msgstr ""
-
-#: hacks/config/squiral.xml.h:12
-msgid "Right"
-msgstr ""
-
-#: hacks/config/squiral.xml.h:17
-msgid "Squiral"
-msgstr ""
-
-#: hacks/config/ssystem.xml.h:1
-msgid "SSystem"
-msgstr ""
-
-#: hacks/config/ssystem.xml.h:2
-msgid ""
-"SSystem is a GL Solar System simulator. It simulates flybys of Sun, the nine "
-"planets and a few major satellites, with four camera modes. Written by Raul "
-"Alonso. This is not included with the XScreenSaver package, but is packaged "
-"separately. Note: SSystem does not work as a screen saver on all systems, "
-"because it doesn't communicate with xscreensaver properly. It happens to "
-"work with some window managers, but not with others, so your mileage may "
-"vary. SSystem was once available at &lt;http://www1.las.es/~amil/ssystem/"
-"&gt;, but is now gone. You may still be able to find copies elsewhere. "
-"SSystem has since evolved into Celestia, found at &lt;http://www.shatters."
-"net/celestia/&gt;. Sadly, Celestia does not work with xscreensaver at all. "
-"You are encouraged to nag the authors into adding xscreensaver support!"
-msgstr ""
-
-#: hacks/config/stairs.xml.h:6
-msgid "Stairs"
-msgstr ""
-
-#: hacks/config/stairs.xml.h:8
-msgid ""
-"by Marcelo Vianna's third Escher GL hack, this one draws an ``infinite'' "
-"staircase."
-msgstr ""
-
-#: hacks/config/starfish.xml.h:1
-msgid "Color Gradients"
-msgstr ""
-
-#: hacks/config/starfish.xml.h:7
-msgid "Pulsating Blob"
-msgstr ""
-
-#: hacks/config/starfish.xml.h:10
-msgid "Starfish"
-msgstr ""
-
-#: hacks/config/starfish.xml.h:13
-msgid ""
-"This generates a sequence of undulating, throbbing, star-like patterns which "
-"pulsate, rotate, and turn inside out. Another display mode uses these shapes "
-"to lay down a field of colors, which are then cycled. The motion is very "
-"organic. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/starwars.xml.h:2
-msgid "Anti-aliased Lines"
-msgstr ""
-
-#: hacks/config/starwars.xml.h:4
-msgid ""
-"Draws a stream of text slowly scrolling into the distance at an angle, over "
-"a star field, like at the beginning of the movie of the same name. The text "
-"can be the output of a program or the contents of a file or URL, as "
-"configured on the \"Advanced\" tab of the main Screensaver Preferences "
-"window. Written by Jamie Zawinski and Claudio Matauoka."
-msgstr ""
-
-#: hacks/config/starwars.xml.h:5
-msgid "Fade Out"
-msgstr ""
-
-#: hacks/config/starwars.xml.h:10
-msgid "Scroll Speed"
-msgstr ""
-
-#: hacks/config/starwars.xml.h:13
-msgid "Star Rotation Speed"
-msgstr ""
-
-#: hacks/config/starwars.xml.h:14
-msgid "StarWars"
-msgstr ""
-
-#: hacks/config/starwars.xml.h:18
-msgid "Texture-Mapped Font"
-msgstr ""
-
-#: hacks/config/starwars.xml.h:19
-msgid "Thick Lines"
-msgstr ""
-
-#: hacks/config/starwars.xml.h:20
-msgid "Wrap Long Lines"
-msgstr ""
-
-#: hacks/config/stonerview.xml.h:1
-msgid ""
-"Chains of colorful squares dance around each other in complex spiral "
-"patterns. Written by Andrew Plotkin, based on SGI's `electropaint' "
-"screensaver."
-msgstr ""
-
-#: hacks/config/stonerview.xml.h:3
-msgid "StonerView"
-msgstr ""
-
-#: hacks/config/strange.xml.h:6
-msgid "Strange"
-msgstr ""
-
-#: hacks/config/strange.xml.h:7
-msgid ""
-"This draws strange attractors: it's a colorful, unpredictably-animating "
-"field of dots that swoops and twists around. The motion is very nice. "
-"Written by Massimino Pascal."
-msgstr ""
-
-#: hacks/config/substrate.xml.h:2 hacks/config/xplanet.xml.h:2
-#, no-c-format
-msgid "0%"
-msgstr ""
-
-#: hacks/config/substrate.xml.h:5
-msgid "Circle Percentage"
-msgstr ""
-
-#: hacks/config/substrate.xml.h:9
-msgid "Initial Cracks"
-msgstr ""
-
-#: hacks/config/substrate.xml.h:10
-msgid ""
-"Lines like crystals grow on a computational substrate. A simple "
-"perpendicular growth rule creates intricate city-like structures. By J. "
-"Tarbell and Mike Kershaw."
-msgstr ""
-
-#: hacks/config/substrate.xml.h:13
-msgid "Sandgrains"
-msgstr ""
-
-#: hacks/config/substrate.xml.h:17
-msgid "Substrate"
-msgstr ""
-
-#: hacks/config/substrate.xml.h:18
-msgid "Wireframe only"
-msgstr ""
-
-#: hacks/config/superquadrics.xml.h:3
-msgid ""
-"Ed Mackey reports that he wrote the first version of this program in BASIC "
-"on a Commodore 64 in 1987, as a 320x200 black and white wireframe. Now it is "
-"GL and has specular reflections."
-msgstr ""
-
-#: hacks/config/superquadrics.xml.h:11
-msgid "Superquadrics"
-msgstr ""
-
-#: hacks/config/swirl.xml.h:4
-msgid ""
-"More flowing, swirly patterns. This version is by M. Dobie and R. Taylor, "
-"but you might have seen a Mac program similar to this called FlowFazer. "
-"There is also a cool Java applet of a similar concept."
-msgstr ""
-
-#: hacks/config/swirl.xml.h:8
-msgid "Swirl"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:1
-msgid "0 deg"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:2
-msgid "5 Minute Tick Marks"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:3
-msgid "90 deg"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:4
-msgid "Bigger"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:5
-msgid "Cycle Seconds"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:10
-msgid "Minute Tick Marks"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:12
-msgid "Smaller"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:14
-msgid "T3D"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:15
-msgid ""
-"This draws a working analog clock composed of floating, throbbing bubbles. "
-"Written by Bernd Paysan."
-msgstr ""
-
-#: hacks/config/t3d.xml.h:16
-msgid "Turn Side-to-Side"
-msgstr ""
-
-#: hacks/config/t3d.xml.h:17
-msgid "Wobbliness"
-msgstr ""
-
-#: hacks/config/tangram.xml.h:3
-msgid ""
-"Lets you watch the computer solve Tangram puzzles Written by Jeremy English."
-msgstr ""
-
-#: hacks/config/tangram.xml.h:6
-msgid "Tangram"
-msgstr ""
-
-#: hacks/config/tangram.xml.h:7
-msgid "Viewing Time"
-msgstr ""
-
-#: hacks/config/tangram.xml.h:9
-msgid "X Camera Rotate"
-msgstr ""
-
-#: hacks/config/tangram.xml.h:10
-msgid "Y Camera Rotate"
-msgstr ""
-
-#: hacks/config/tangram.xml.h:11
-msgid "Z Camera Rotate"
-msgstr ""
-
-#: hacks/config/thornbird.xml.h:1
-msgid ""
-"Displays a view of the ``Bird in a Thornbush'' fractal. Written by Tim "
-"Auckland."
-msgstr ""
-
-#: hacks/config/thornbird.xml.h:6
-msgid "Points"
-msgstr ""
-
-#: hacks/config/thornbird.xml.h:12
-msgid "Thornbird"
-msgstr ""
-
-#: hacks/config/timetunnel.xml.h:1
-msgid "0 sec"
-msgstr ""
-
-#: hacks/config/timetunnel.xml.h:2
-msgid "30 sec"
-msgstr ""
-
-#: hacks/config/timetunnel.xml.h:4
-msgid "Draw Logo"
-msgstr ""
-
-#: hacks/config/timetunnel.xml.h:5
-msgid ""
-"Draws an animation similar to the opening and closing effects on the Dr. Who "
-"television show. Written by Sean P. Brennan."
-msgstr ""
-
-#: hacks/config/timetunnel.xml.h:7
-msgid "Run Backward"
-msgstr ""
-
-#: hacks/config/timetunnel.xml.h:10
-msgid "Start sequence time"
-msgstr ""
-
-#: hacks/config/timetunnel.xml.h:11
-msgid "Timetunnel"
-msgstr ""
-
-#: hacks/config/triangle.xml.h:2
-msgid ""
-"Generates random mountain ranges using iterative subdivision of triangles. "
-"Written by Tobias Gloth."
-msgstr ""
-
-#: hacks/config/triangle.xml.h:7
-msgid "Triangle"
-msgstr ""
-
-#: hacks/config/truchet.xml.h:4
-msgid ""
-"This draws line- and arc-based Truchet patterns that tile the screen. "
-"Written by Adrian Likins."
-msgstr ""
-
-#: hacks/config/truchet.xml.h:5
-msgid "Truchet"
-msgstr ""
-
-#: hacks/config/twang.xml.h:2
-msgid ""
-"Divides the screen into a grid, and plucks them. Written by Dan Bornstein."
-msgstr ""
-
-#: hacks/config/twang.xml.h:6
-msgid "Jumpy"
-msgstr ""
-
-#: hacks/config/twang.xml.h:11
-msgid "Springiness"
-msgstr ""
-
-#: hacks/config/twang.xml.h:13
-msgid "Transference"
-msgstr ""
-
-#: hacks/config/twang.xml.h:14
-msgid "Twang"
-msgstr ""
-
-#: hacks/config/vermiculate.xml.h:1
-msgid "Draws squiggly worm-like paths. Written by Tyler Pierce."
-msgstr ""
-
-#: hacks/config/vermiculate.xml.h:2
-msgid "Vermiculate"
-msgstr ""
-
-#: hacks/config/vidwhacker.xml.h:2
-msgid "2 seconds"
-msgstr ""
-
-#: hacks/config/vidwhacker.xml.h:4
-msgid "Image Directory"
-msgstr ""
-
-#: hacks/config/vidwhacker.xml.h:5
-msgid ""
-"This is actually just a shell script that grabs a frame of video from the "
-"system's video input, and then uses some PBM filters (chosen at random) to "
-"manipulate and recombine the video frame in various ways (edge detection, "
-"subtracting the image from a rotated version of itself, etc.) Then it "
-"displays that image for a few seconds, and does it again. This works really "
-"well if you just feed broadcast television into it."
-msgstr ""
-
-#: hacks/config/vidwhacker.xml.h:6
-msgid "VidWhacker"
-msgstr ""
-
-#: hacks/config/vines.xml.h:6
-msgid ""
-"This one generates a continuous sequence of small, curvy geometric patterns. "
-"It scatters them around your screen until it fills up, then it clears the "
-"screen and starts over. Written by Tracy Camp and David Hansen."
-msgstr ""
-
-#: hacks/config/vines.xml.h:8
-msgid "Vines"
-msgstr ""
-
-#: hacks/config/wander.xml.h:5
-msgid "Draw Spots"
-msgstr ""
-
-#: hacks/config/wander.xml.h:6
-msgid ""
-"Draws a colorful random-walk, in various forms. Written by Rick Campbell."
-msgstr ""
-
-#: hacks/config/wander.xml.h:14
-msgid "Sustain"
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:1
-msgid "2 min"
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:2
-msgid "30 secs"
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:3
-msgid "Delay:                    None"
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:4
-msgid "Dictionary File"
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:5
-msgid "Opacity:      Transparent"
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:6
-msgid "Overall Filter Program"
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:7
-msgid "Per-Image Filter Program"
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:9
-msgid ""
-"This program makes collages out of random images pulled off of the World "
-"Wide Web. It finds these images by doing random web searches, and then "
-"extracting images from the returned pages. It can also be set up to filter "
-"the images through the `VidWhacker' program. WARNING: THE INTERNET SOMETIMES "
-"CONTAINS PORNOGRAPHY. The Internet being what it is, absolutely anything "
-"might show up in the collage including -- quite possibly -- pornography, or "
-"even nudity. Please act accordingly. Written by Jamie Zawinski."
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:10
-msgid "URL Timeout:     2 secs"
-msgstr ""
-
-#: hacks/config/webcollage.xml.h:11
-msgid "WebCollage"
-msgstr ""
-
-#: hacks/config/whirlwindwarp.xml.h:2
-msgid ""
-"Floating stars are acted upon by a mixture of simple 2D forcefields. The "
-"strength of each forcefield changes continuously, and it is also switched on "
-"and off at random. By Paul 'Joey' Clark."
-msgstr ""
-
-#: hacks/config/whirlwindwarp.xml.h:7
-msgid "Trail Size"
-msgstr ""
-
-#: hacks/config/whirlwindwarp.xml.h:8
-msgid "WhirlwindWarp"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:1
-msgid "Amplitude"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:2
-msgid "Circle"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:3
-msgid "Draws zooming chains of sinusoidal spots. Written by Ashton Trey Belew."
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:4
-msgid "Explain modes"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:5
-msgid "Fun"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:6
-msgid "Funky"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:7
-msgid "Innie"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:8
-msgid "Leave a trail"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:9
-msgid "Linear"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:11
-msgid "Lissajous"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:15
-msgid "Test"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:16
-msgid "Use Double Buffering"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:17
-msgid "Whirlies"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:18
-msgid "WhirlyGig"
-msgstr ""
-
-#: hacks/config/whirlygig.xml.h:19
-msgid "Wrap the screen"
-msgstr ""
-
-#: hacks/config/worm.xml.h:1
-msgid ""
-"An ancient xlock hack that draws multicolored worms that crawl around the "
-"screen. Written by Brad Taylor, Dave Lemke, Boris Putanec, and Henrik "
-"Theiling."
-msgstr ""
-
-#: hacks/config/wormhole.xml.h:6
-msgid "Star speed"
-msgstr ""
-
-#: hacks/config/wormhole.xml.h:7
-msgid "Stars Created"
-msgstr ""
-
-#: hacks/config/wormhole.xml.h:8
-msgid "Wormhole"
-msgstr ""
-
-#: hacks/config/wormhole.xml.h:9
-msgid ""
-"Wormhole simulates flying through a colored wormhole in space. Written by "
-"Jon Rafkind."
-msgstr ""
-
-#: hacks/config/xanalogtv.xml.h:1
-msgid "XAnalogTV"
-msgstr ""
-
-#: hacks/config/xanalogtv.xml.h:2
-msgid ""
-"XAnalogTV shows a detailed simulation of an old TV set showing various test "
-"patterns, with various picture artifacts like snow, bloom, distortion, "
-"ghosting, and hash noise. It also simulates the TV warming up. It will cycle "
-"through 12 channels, some with images you give it, and some with color bars "
-"or nothing but static. By Trevor Blackwell."
-msgstr ""
-
-#: hacks/config/xaos.xml.h:1
-msgid "XaoS"
-msgstr ""
-
-#: hacks/config/xaos.xml.h:2
-msgid ""
-"XaoS generates fast fly-through animations of the Mandelbrot and other "
-"fractal sets. Written by Thomas Marsh and Jan Hubicka. This is not included "
-"with the XScreenSaver package, but if you don't have it already, you can "
-"find it at &lt;http://xaos.theory.org/&gt;."
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:1
-msgid "12-Hour Time"
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:2
-msgid "24-Hour Time"
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:3
-msgid "Cycle Colors"
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:4
-msgid "Display Seconds"
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:5
-msgid "Huge Font"
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:6 hacks/config/xmatrix.xml.h:10
-msgid "Large Font"
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:7
-msgid "Medium Font"
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:8 hacks/config/xmatrix.xml.h:16
-msgid "Small Font"
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:9
-msgid "XDaliClock"
-msgstr ""
-
-#: hacks/config/xdaliclock.xml.h:10
-msgid ""
-"XDaliClock draws a large digital clock, the numbers of which change by "
-"``melting'' into their new shapes. Written by Jamie Zawinski. This is not "
-"included with the XScreenSaver package, but if you don't have it already, "
-"you can find it at &lt;http://www.jwz.org/xdaliclock/&gt;."
-msgstr ""
-
-#: hacks/config/xearth.xml.h:1
-msgid "Bright"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:2 hacks/config/xplanet.xml.h:7
-msgid "Date/Time Stamp"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:3
-msgid "Day  Dim"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:5
-msgid "Display Stars"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:8
-msgid "Label Cities"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:9 hacks/config/xplanet.xml.h:49
-msgid "Lower Left"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:10 hacks/config/xplanet.xml.h:50
-msgid "Lower Right"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:13 hacks/config/xplanet.xml.h:51
-msgid "Mercator Projection"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:14
-msgid "Night   Dim"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:15
-msgid "No Stars"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:16
-msgid "North/South Rotation"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:18 hacks/config/xplanet.xml.h:53
-msgid "Orthographic Projection"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:19 hacks/config/xplanet.xml.h:56
-msgid "Real Time"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:20
-msgid "Shaded Image"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:21
-msgid "Sharp"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:26
-msgid "Terminator   Blurry"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:27 hacks/config/xplanet.xml.h:61
-msgid "Time Warp"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:29 hacks/config/xplanet.xml.h:62
-msgid "Upper Left"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:30 hacks/config/xplanet.xml.h:63
-msgid "Upper Right"
-msgstr ""
-
-#: hacks/config/xearth.xml.h:31
-msgid ""
-"XEarth draws an image of the Earth, as seen from your favorite vantage point "
-"in space, correctly shaded for the current position of the Sun. Written by "
-"Kirk Johnson. This is not included with the XScreenSaver package, but if you "
-"don't have it already, you can find it at &lt;http://www.cs.colorado.edu/"
-"~tuna/xearth/&gt;. There is also a similar (but more recent) program called "
-"xplanet to be found at &lt;http://xplanet.sourceforge.net/&gt;."
-msgstr ""
-
-#: hacks/config/xearth.xml.h:32
-msgid "Xearth"
-msgstr ""
-
-#: hacks/config/xfishtank.xml.h:5
-msgid "Fish"
-msgstr ""
-
-#: hacks/config/xfishtank.xml.h:6
-msgid "Fish Speed"
-msgstr ""
-
-#: hacks/config/xfishtank.xml.h:7
-msgid ""
-"Fish! This is not included with the XScreenSaver package, but if you don't "
-"have it already, you can find it at &lt;http://metalab.unc.edu/pub/Linux/X11/"
-"demos/&gt;."
-msgstr ""
-
-#: hacks/config/xfishtank.xml.h:12
-msgid "XFishTank"
-msgstr ""
-
-#: hacks/config/xflame.xml.h:1
-msgid "Bitmap File"
-msgstr ""
-
-#: hacks/config/xflame.xml.h:2
-msgid ""
-"Draws a simulation of pulsing fire. It can also take an arbitrary image and "
-"set it on fire too. Written by Carsten Haitzler, hacked on by many others."
-msgstr ""
-
-#: hacks/config/xflame.xml.h:3
-msgid "Enable Blooming"
-msgstr ""
-
-#: hacks/config/xflame.xml.h:8
-msgid "Xflame"
-msgstr ""
-
-#: hacks/config/xjack.xml.h:4
-msgid ""
-"This program behaves schizophrenically and makes a lot of typos. Written by "
-"Jamie Zawinski. If you haven't seen Stanley Kubrick's masterpiece, ``The "
-"Shining,'' you won't get it. Those who have describe this hack as "
-"``inspired.''"
-msgstr ""
-
-#: hacks/config/xjack.xml.h:5
-msgid "Xjack"
-msgstr ""
-
-#: hacks/config/xlyap.xml.h:1
-msgid ""
-"This generates pretty fractal pictures by doing funky math involving the "
-"``Lyapunov exponent.'' It has a cool interactive mode, too. Written by Ron "
-"Record."
-msgstr ""
-
-#: hacks/config/xlyap.xml.h:2
-msgid "Xlyap"
-msgstr ""
-
-#: hacks/config/xmatrix.xml.h:3
-msgid ""
-"Draws dropping characters similar to what is seen on the computer monitors "
-"in \"The Matrix\". See also \"glmatrix\" for a 3D rendering of the similar "
-"effect that appeared in the title sequence of the movie. Written by Jamie "
-"Zawinski."
-msgstr ""
-
-#: hacks/config/xmatrix.xml.h:4
-msgid "Expansion Algorithm"
-msgstr ""
-
-#: hacks/config/xmatrix.xml.h:6
-msgid "Full"
-msgstr ""
-
-#: hacks/config/xmatrix.xml.h:9
-msgid "Knock Knock"
-msgstr ""
-
-#: hacks/config/xmatrix.xml.h:12
-msgid "Phone Number"
-msgstr ""
-
-#: hacks/config/xmatrix.xml.h:13
-msgid "Run Trace Program"
-msgstr ""
-
-#: hacks/config/xmatrix.xml.h:14
-msgid "Slider Algorithm"
-msgstr ""
-
-#: hacks/config/xmatrix.xml.h:19
-msgid "Synergistic Algorithm"
-msgstr ""
-
-#: hacks/config/xmatrix.xml.h:20
-msgid "Xmatrix"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:1
-msgid "1.0"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:3
-msgid "14"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:4
-msgid "7"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:5
-msgid "Altitude  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:6
-msgid "Ambient  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:7
-msgid "Angle of Light"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:8
-msgid "Contour  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:9
-msgid "Contrast  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:10
-msgid "Craggy"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:11
-msgid "Cross Update"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:12
-msgid "Distance  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:14
-msgid "Foreground"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:15
-msgid "Fractal Options"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:16
-msgid "Height  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:18
-msgid "Horizontal  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:19
-msgid "Iteration  0"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:20
-msgid "Light Level"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:21
-msgid "Recursion  0"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:22
-msgid "Reflections"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:23
-msgid "Sea Level  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:24
-msgid "Side View"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:26
-msgid "Smoothing  0"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:27
-msgid "Speed  Slow"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:28
-msgid "Terrain"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:29
-msgid "Top View"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:30
-msgid "V. Shift  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:31
-msgid "V. Stretch  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:32
-msgid "Variance  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:33
-msgid "Vertical  Low"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:34
-msgid "Viewpoint"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:35
-msgid ""
-"XMountains generates realistic-looking fractal terrains of snow-capped "
-"mountains near water, with either a top view or a side view. Written by "
-"Stephen Booth. This is not included with the XScreenSaver package, but if "
-"you don't have it already, you can find it at &lt;http://www.epcc.ed.ac.uk/"
-"~spb/xmountains/&gt;. (Make sure you have version 2.7 or newer!)"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:36
-msgid "Xf  0.0"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:37
-msgid "Xmountains"
-msgstr ""
-
-#: hacks/config/xmountains.xml.h:38
-msgid "Yf  0.0"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:5
-msgid "Ancient Projection"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:6
-msgid "Azimuthal Projection"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:9
-msgid "From Ariel"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:10
-msgid "From Callisto"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:11
-msgid "From Charon"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:12
-msgid "From Deimos"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:13
-msgid "From Dione"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:14
-msgid "From Earth"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:15
-msgid "From Enceladus"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:16
-msgid "From Europa"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:17
-msgid "From Ganymede"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:18
-msgid "From Hyperion"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:19
-msgid "From Iapetus"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:20
-msgid "From Io"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:21
-msgid "From Jupiter"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:22
-msgid "From Major"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:23
-msgid "From Mars"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:24
-msgid "From Mercury"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:25
-msgid "From Mimas"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:26
-msgid "From Miranda"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:27
-msgid "From Moon"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:28
-msgid "From Neptune"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:29
-msgid "From Nereid"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:30
-msgid "From Oberon"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:31
-msgid "From Phobos"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:32
-msgid "From Phoebe"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:33
-msgid "From Pluto"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:34
-msgid "From Random"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:35
-msgid "From Rhea"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:36
-msgid "From Saturn"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:37
-msgid "From Sun"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:38
-msgid "From Tethys"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:39
-msgid "From Titan"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:40
-msgid "From Titania"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:41
-msgid "From Triton"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:42
-msgid "From Umbriel"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:43
-msgid "From Uranus"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:44
-msgid "From Venus"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:45
-msgid "Hemisphere Projection"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:46
-msgid "Lambert Projection"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:47
-msgid "Latitude"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:48
-msgid "Longitude"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:52
-msgid "Mollweide Projection"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:54
-msgid "Peters Projection"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:57
-msgid "Rectangular Projection"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:58
-msgid "Render as a Globe"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:64
-msgid "View Ariel"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:65
-msgid "View Callisto"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:66
-msgid "View Charon"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:67
-msgid "View Deimos"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:68
-msgid "View Dione"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:69
-msgid "View Earth"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:70
-msgid "View Enceladus"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:71
-msgid "View Europa"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:72
-msgid "View Ganymede"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:73
-msgid "View Hyperion"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:74
-msgid "View Iapetus"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:75
-msgid "View Io"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:76
-msgid "View Jupiter"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:77
-msgid "View Major"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:78
-msgid "View Mars"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:79
-msgid "View Mercury"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:80
-msgid "View Mimas"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:81
-msgid "View Miranda"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:82
-msgid "View Moon"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:83
-msgid "View Neptune"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:84
-msgid "View Nereid"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:85
-msgid "View Oberon"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:86
-msgid "View Phobos"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:87
-msgid "View Phoebe"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:88
-msgid "View Pluto"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:89
-msgid "View Random"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:90
-msgid "View Rhea"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:91
-msgid "View Saturn"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:92
-msgid "View Sun"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:93
-msgid "View Tethys"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:94
-msgid "View Titan"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:95
-msgid "View Titania"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:96
-msgid "View Triton"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:97
-msgid "View Umbriel"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:98
-msgid "View Uranus"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:99
-msgid "View Venus"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:100
-msgid "Xplanet"
-msgstr ""
-
-#: hacks/config/xplanet.xml.h:101
-msgid ""
-"Xplanet draws an image of the Earth, as seen from your favorite vantage "
-"point in space, correctly shaded for the current position of the Sun. "
-"Written by Hari Nair. This is not included with the XScreenSaver package, "
-"but if you don't have it already, you can find it at &lt;http://xplanet."
-"sourceforge.net/&gt;."
-msgstr ""
-
-#: hacks/config/xrayswarm.xml.h:1
-msgid ""
-"Draws a few swarms of critters flying around the screen, with nicely faded "
-"color trails behind them. Written by Chris Leger."
-msgstr ""
-
-#: hacks/config/xrayswarm.xml.h:5
-msgid "XRaySwarm"
-msgstr ""
-
-#: hacks/config/xsnow.xml.h:1
-msgid ""
-"Draws falling snow and the occasional tiny Santa. By Rick Jansen. You can "
-"find it at &lt;http://www.euronet.nl/~rja/Xsnow/&gt;."
-msgstr ""
-
-#: hacks/config/xsnow.xml.h:2
-msgid "Xsnow"
-msgstr ""
-
-#: hacks/config/xspirograph.xml.h:5
-msgid ""
-"Simulates that pen-in-nested-plastic-gears toy from your childhood. By Rohit "
-"Singh."
-msgstr ""
-
-#: hacks/config/xspirograph.xml.h:6
-msgid "XSpiroGraph"
-msgstr ""
-
-#: hacks/config/xteevee.xml.h:1
-msgid "Color Bars Enabled"
-msgstr ""
-
-#: hacks/config/xteevee.xml.h:2
-msgid "Cycle Through Modes"
-msgstr ""
-
-#: hacks/config/xteevee.xml.h:3
-msgid "Rolling Enabled"
-msgstr ""
-
-#: hacks/config/xteevee.xml.h:4
-msgid "Static Enabled"
-msgstr ""
-
-#: hacks/config/xteevee.xml.h:5
-msgid "XTeeVee"
-msgstr ""
-
-#: hacks/config/xteevee.xml.h:6
-msgid ""
-"XTeeVee simulates various television problems, including static, loss of "
-"vertical hold, and a test pattern. By Greg Knauss."
-msgstr ""
-
-#: hacks/config/zoom.xml.h:3
-msgid "Lens Offset"
-msgstr ""
-
-#: hacks/config/zoom.xml.h:4
-msgid "Lenses"
-msgstr ""
-
-#: hacks/config/zoom.xml.h:9
-msgid ""
-"Zooms in on a part of the screen and then moves around. With the -lenses "
-"option the result is like looking through many overlapping lenses rather "
-"than just a simple zoom. Written by James Macnicol."
-msgstr ""
-
-#, fuzzy
-#~ msgid "Display _Splash Screen at Startup"
-#~ msgstr "Protector de pantalla"
-
-#~ msgid "Configure the settings of the screensaver."
-#~ msgstr "Configurar el protector de pantalla."
-
-#, fuzzy
-#~ msgid "Preview of screen saver"
-#~ msgstr "Protector de pantalla"
index e4fc6ebc3691e24812e889a494e55e7962e8a106..f2bc8d9cae7be3b9f36edc8cd26f9c3dbd791fb3 100644 (file)
@@ -107,18 +107,18 @@ SRCS              = alpha.c colors.c fade.c grabscreen.c grabclient.c hsv.c \
                  visual-gl.c xmu.c logo.c yarandom.c erase.c \
                  xshm.c xdbe.c colorbars.c minixpm.c textclient.c \
                  textclient-mobile.c aligned_malloc.c thread_util.c \
-                 async_netdb.c xft.c utf8wc.c
+                 async_netdb.c xft.c utf8wc.c pow2.c
 OBJS           = alpha.o colors.o fade.o grabscreen.o grabclient.o hsv.o \
                  overlay.o resources.o spline.o usleep.o visual.o \
                  visual-gl.o xmu.o logo.o yarandom.o erase.o \
                  xshm.o xdbe.o colorbars.o minixpm.o textclient.o \
                  textclient-mobile.o aligned_malloc.o thread_util.o \
-                 async_netdb.o xft.o utf8wc.o
+                 async_netdb.o xft.o utf8wc.o pow2.o
 HDRS           = alpha.h colors.h fade.h grabscreen.h hsv.h resources.h \
                  spline.h usleep.h utils.h version.h visual.h vroot.h xmu.h \
                  yarandom.h erase.h xshm.h xdbe.h colorbars.h minixpm.h \
                  xscreensaver-intl.h textclient.h aligned_malloc.h \
-                 thread_util.h async_netdb.h xft.h utf8wc.h
+                 thread_util.h async_netdb.h xft.h utf8wc.h pow2.h
 STAR           = *
 LOGOS          = images/$(STAR).xpm \
                  images/$(STAR).png \
@@ -283,6 +283,7 @@ minixpm.o: $(srcdir)/minixpm.h
 overlay.o: ../config.h
 overlay.o: $(srcdir)/utils.h
 overlay.o: $(srcdir)/visual.h
+pow2.o: $(srcdir)/pow2.h
 resources.o: ../config.h
 resources.o: $(srcdir)/resources.h
 resources.o: $(srcdir)/utils.h
@@ -316,8 +317,10 @@ xdbe.o: $(srcdir)/utils.h
 xdbe.o: $(srcdir)/xdbe.h
 xft.o: ../config.h
 xmu.o: ../config.h
+xshm.o: $(srcdir)/aligned_malloc.h
 xshm.o: ../config.h
 xshm.o: $(srcdir)/resources.h
+xshm.o: $(srcdir)/thread_util.h
 xshm.o: $(srcdir)/utils.h
 xshm.o: $(srcdir)/xshm.h
 yarandom.o: ../config.h
index c805b9e089c3b7270e7e04bac46d49dc49bcfb8d..b345ad1e586c209556c6e4fb6f8eba82c076d19f 100644 (file)
@@ -18,11 +18,13 @@ implied warranty.
 #include <stddef.h>
 #include <stdlib.h>
 
-#if !ALIGNED_MALLOC_HAS_MEMALIGN
-
 #include <assert.h>
 #include <errno.h>
 
+/* aligned_alloc() (C11) or posix_memalign() (POSIX) are other possibilities
+   for aligned_malloc().
+ */
+
 int aligned_malloc(void **ptr, unsigned alignment, size_t size)
 {
        void *block_start;
@@ -41,7 +43,6 @@ int aligned_malloc(void **ptr, unsigned alignment, size_t size)
 
 void aligned_free(void *ptr)
 {
-       free(((void **)(ptr))[-1]);
+       if(ptr)
+               free(((void **)(ptr))[-1]);
 }
-
-#endif
index 43c9219005524a0b3b9cd8696a2aaf8f00b86c68..b3f43c9c451ddf061290481c1a83eb67c4901e91 100644 (file)
@@ -18,31 +18,9 @@ implied warranty.
 
 #include <stdlib.h>
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if defined ANDROID
-# include <android/api-level.h>
-#endif
-
-#if (_POSIX_VERSION >= 200112L || _XOPEN_VERSION >= 600) && \
-  (!defined ANDROID || __ANDROID_API__ >= 15)
-# define ALIGNED_MALLOC_HAS_MEMALIGN 1
-#endif
-
-#if ALIGNED_MALLOC_HAS_MEMALIGN
-
-# define aligned_malloc posix_memalign
-# define aligned_free   free
-
-#else /* !ALIGNED_MALLOC_HAS_MEMALIGN */
-
  /* This can't simply be named posix_memalign, since the real thing uses
     free(), but this one can't. */
  int aligned_malloc(void **ptr, unsigned alignment, size_t size);
  void aligned_free(void *);
 
-#endif /* ALIGNED_MALLOC_HAS_MEMALIGN */
-
 #endif /* __ALIGNED_MALLOC_H__ */
index 78a5b553222a3244983c710ecad10e6cb1ac5de5..b43f1e7c1183a202b24e133b81c6c6a321a80e03 100644 (file)
@@ -11,6 +11,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) HSV.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) LOGO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) MINIXPM.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) OVERLAY.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) POW2.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) RESOURCES.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) SPLINE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) TEXTCLIENT.C
index 514f28e0c1fdb2dad8f5fbf75c7a13b66a817f56..618547363d7ca6214ec1c2125825728be0838d47 100644 (file)
@@ -11,6 +11,7 @@ $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) HSV.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) LOGO.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) MINIXPM.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) OVERLAY.C
+$ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) POW2.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) RESOURCES.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) SPLINE.C
 $ CC/DECC/PREFIX=ALL/DEFINE=(VMS,HAVE_CONFIG_H)/INCL=([],[-]) TEXTCLIENT.C
index a1a360e476d8dbc23dc5b866250a325da96cc7fb..fc002012d05d3c111c0cac17e6de14c9c244f201 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1992-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1992-2017 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
@@ -783,7 +783,12 @@ osx_load_image_file_async (Screen *screen, Window xwindow, Drawable drawable,
                             (XtPointer) (XtInputReadMask | XtInputExceptMask),
                             xscreensaver_getimage_file_cb, (XtPointer) clo2);
 # else /* USE_IPHONE */
-  ios_load_random_image (ios_load_random_image_cb, clo2);
+  {
+    XWindowAttributes xgwa;
+    XGetWindowAttributes (DisplayOfScreen (screen), xwindow, &xgwa);
+    ios_load_random_image (ios_load_random_image_cb, clo2,
+                           xgwa.width, xgwa.height);
+  }
 # endif /* USE_IPHONE */
 }
 
index 237f63ef0422ddc1d662a77340744dad89774322..f0d7a0b653f37ba8c19728777fee791629ebfc6b 100644 (file)
@@ -97,7 +97,8 @@ extern void ios_load_random_image (void (*callback) (void *uiimage,
                                                      const char *filename,
                                                      int w, int h,
                                                      void *closure),
-                                   void *closure);
+                                   void *closure,
+                                   int width, int height);
 #endif /* USE_IPHONE */
 
 #ifdef HAVE_ANDROID
diff --git a/utils/pow2.c b/utils/pow2.c
new file mode 100644 (file)
index 0000000..9cce3d8
--- /dev/null
@@ -0,0 +1,51 @@
+/* pow2, Copyright (c) 2016 Dave Odell <dmo2118@gmail.com>
+ *
+ * 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.
+ */
+
+#include "pow2.h"
+
+#include <limits.h>
+
+int
+i_log2 (size_t x)
+{
+  /* -1 works best for to_pow2. */
+  if (!x)
+    return -1;
+
+  /* GCC 3.4 also has this. */
+# if defined __GNUC__ && __GNUC__ >= 4 || defined __clang__
+  return sizeof(long) * CHAR_BIT - __builtin_clzl(x) - 1;
+# else
+  {
+    unsigned bits = sizeof(x) * CHAR_BIT;
+    size_t mask = (size_t)-1;
+    unsigned result = bits - 1;
+
+    while (bits) {
+      if (!(x & mask)) {
+        result -= bits;
+        x <<= bits;
+      }
+
+      bits >>= 1;
+      mask <<= bits;
+    }
+
+    return result;
+  }
+# endif
+}
+
+size_t
+to_pow2 (size_t x)
+{
+  return !x ? 1 : 1 << (i_log2(x - 1) + 1);
+}
diff --git a/utils/pow2.h b/utils/pow2.h
new file mode 100644 (file)
index 0000000..3927e84
--- /dev/null
@@ -0,0 +1,20 @@
+/* pow2, Copyright (c) 2016 Dave Odell <dmo2118@gmail.com>
+ *
+ * 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.
+ */
+
+#ifndef POW2_H
+#define POW2_H
+
+#include <stdlib.h>
+
+extern int i_log2(size_t x);
+extern size_t to_pow2 (size_t x); /* return the next larger power of 2. */
+
+#endif /* POW2_H */
index 27de26589f30e6bcbd30c1701ce3047f968a3d66..9dbbf2fafced6c0e20d4d469234b0f0e27675520 100644 (file)
@@ -1,2 +1,2 @@
 static const char screensaver_id[] =
-       "@(#)xscreensaver 5.36 (10-Oct-2016), by Jamie Zawinski (jwz@jwz.org)";
+       "@(#)xscreensaver 5.37 (05-Jul-2017), by Jamie Zawinski (jwz@jwz.org)";
index 89b4f33e69f3d7af84fc2a5931ae594c1916a47e..c6764ba929f9edc0fd92bea1b596002705c65db9 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1993-2014 by Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1993-2017 by 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
@@ -339,16 +339,30 @@ pick_best_gl_visual (Screen *screen)
 }
 
 
-Visual *
-id_to_visual (Screen *screen, int id)
+static XVisualInfo *
+visual_info_id (Screen *screen, int id)
 {
   Display *dpy = DisplayOfScreen (screen);
-  XVisualInfo vi_in, *vi_out;
+  XVisualInfo vi_in;
   int out_count;
   vi_in.screen = screen_number (screen);
   vi_in.visualid = id;
-  vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
-                          &vi_in, &out_count);
+  return XGetVisualInfo (dpy, VisualScreenMask | VisualIDMask,
+                         &vi_in, &out_count);
+}
+
+static XVisualInfo *
+visual_info (Screen *screen, Visual *visual)
+{
+  XVisualInfo *vi_out = visual_info_id (screen, XVisualIDFromVisual (visual));
+  if (! vi_out) abort ();
+  return vi_out;
+}
+
+Visual *
+id_to_visual (Screen *screen, int id)
+{
+  XVisualInfo *vi_out = visual_info_id (screen, id);
   if (vi_out)
     {
       Visual *v = vi_out[0].visual;
@@ -361,27 +375,34 @@ id_to_visual (Screen *screen, int id)
 int
 visual_depth (Screen *screen, Visual *visual)
 {
-  Display *dpy = DisplayOfScreen (screen);
-  XVisualInfo vi_in, *vi_out;
-  int out_count, d;
-  vi_in.screen = screen_number (screen);
-  vi_in.visualid = XVisualIDFromVisual (visual);
-  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
-                          &vi_in, &out_count);
-  if (! vi_out) abort ();
-  d = vi_out [0].depth;
+  XVisualInfo *vi_out = visual_info (screen, visual);
+  int d = vi_out [0].depth;
   XFree ((char *) vi_out);
   return d;
 }
 
 
-#if 0
 /* You very probably don't want to be using this.
    Pixmap depth doesn't refer to the depths of pixmaps, but rather, to
    the depth of protocol-level on-the-wire pixmap data, that is, XImages.
    To get this info, you should be looking at XImage->bits_per_pixel
    instead.  (And allocating the data for your XImage structures by
    multiplying ximage->bytes_per_line by ximage->height.)
+
+   Still, it can be useful to know bits_per_pixel before the XImage exists.
+
+   XCreateImage calls _XGetBitsPerPixel to figure this out, but that function
+   is private to Xlib.
+
+   For some reason, _XGetBitsPerPixel tries a hard-coded list of depths if
+   it doesn't find a matching pixmap format, but I (Dave Odell) couldn't
+   find any justification for this in the X11 spec. And the XFree86 CVS
+   repository doesn't quite go back far enough to shed any light on what
+   the deal is with that.
+   http://cvsweb.xfree86.org/cvsweb/xc/lib/X11/ImUtil.c
+
+   The hard-coded list apparently was added between X11R5 and X11R6.
+   See <ftp://ftp.x.org/pub/>.
  */
 int
 visual_pixmap_depth (Screen *screen, Visual *visual)
@@ -405,21 +426,13 @@ visual_pixmap_depth (Screen *screen, Visual *visual)
     XFree (pfv);
   return pdepth;
 }
-#endif /* 0 */
 
 
 int
 visual_class (Screen *screen, Visual *visual)
 {
-  Display *dpy = DisplayOfScreen (screen);
-  XVisualInfo vi_in, *vi_out;
-  int out_count, c;
-  vi_in.screen = screen_number (screen);
-  vi_in.visualid = XVisualIDFromVisual (visual);
-  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
-                          &vi_in, &out_count);
-  if (! vi_out) abort ();
-  c = vi_out [0].class;
+  XVisualInfo *vi_out = visual_info (screen, visual);
+  int c = vi_out [0].class;
   XFree ((char *) vi_out);
   return c;
 }
@@ -448,14 +461,7 @@ void
 describe_visual (FILE *f, Screen *screen, Visual *visual, Bool private_cmap_p)
 {
   char n[10];
-  Display *dpy = DisplayOfScreen (screen);
-  XVisualInfo vi_in, *vi_out;
-  int out_count;
-  vi_in.screen = screen_number (screen);
-  vi_in.visualid = XVisualIDFromVisual (visual);
-  vi_out = XGetVisualInfo (dpy, (VisualScreenMask | VisualIDMask),
-                          &vi_in, &out_count);
-  if (! vi_out) abort ();
+  XVisualInfo *vi_out = visual_info (screen, visual);
   if (private_cmap_p)
     sprintf(n, "%3d", vi_out->colormap_size);
   else
@@ -489,15 +495,8 @@ screen_number (Screen *screen)
 int
 visual_cells (Screen *screen, Visual *visual)
 {
-  Display *dpy = DisplayOfScreen (screen);
-  XVisualInfo vi_in, *vi_out;
-  int out_count, c;
-  vi_in.screen = screen_number (screen);
-  vi_in.visualid = XVisualIDFromVisual (visual);
-  vi_out = XGetVisualInfo (dpy, VisualScreenMask|VisualIDMask,
-                          &vi_in, &out_count);
-  if (! vi_out) abort ();
-  c = vi_out [0].colormap_size;
+  XVisualInfo *vi_out = visual_info (screen, visual);
+  int c = vi_out [0].colormap_size;
   XFree ((char *) vi_out);
   return c;
 }
@@ -544,46 +543,13 @@ find_similar_visual(Screen *screen, Visual *old_visual)
 }
 
 
-int
-get_bits_per_pixel(Display *dpy, int depth)
+void
+visual_rgb_masks (Screen *screen, Visual *visual, unsigned long *red_mask,
+                  unsigned long *green_mask, unsigned long *blue_mask)
 {
-  unsigned i = 0;
-  int count, result;
-  XPixmapFormatValues *formats = XListPixmapFormats(dpy, &count);
-
-  /* XCreateImage calls _XGetBitsPerPixel to figure this out, but that function
-     is private to Xlib.
-
-     For some reason, _XGetBitsPerPixel tries a hard-coded list of depths if
-     it doesn't find a matching pixmap format, but I (Dave Odell) couldn't
-     find any justification for this in the X11 spec. And the XFree86 CVS
-     repository doesn't quite go back far enough to shed any light on what
-     the deal is with that.
-     http://cvsweb.xfree86.org/cvsweb/xc/lib/X11/ImUtil.c
-
-     The hard-coded list apparently was added between X11R5 and X11R6.
-     See <ftp://ftp.x.org/pub/>.
-   */
-
-  if (!formats) return 0;
-
-  for (;;)
-    {
-      if (i == (unsigned)count)
-        {
-          result = 0;
-          break;
-        }
-
-      if (formats[i].depth == depth)
-        {
-          result = formats[i].bits_per_pixel;
-          break;
-        }
-
-      ++i;
-    }
-
-  XFree (formats);
-  return result;
+  XVisualInfo *vi_out = visual_info (screen, visual);
+  *red_mask = vi_out->red_mask;
+  *green_mask = vi_out->green_mask;
+  *blue_mask = vi_out->blue_mask;
+  XFree ((char *) vi_out);
 }
index 2176efcdbf23b5f0eedbc96bd3dbf7e13115c8e0..18ff7a6cc20f3ce32da7b3572dafe0518d83b1ed 100644 (file)
@@ -15,7 +15,7 @@
 extern Visual *get_visual (Screen *, const char *name, Bool, Bool);
 extern Visual *get_visual_resource (Screen *, char *, char *, Bool);
 extern int visual_depth (Screen *, Visual *);
-/* extern int visual_pixmap_depth (Screen *, Visual *); */
+extern int visual_pixmap_depth (Screen *, Visual *);
 extern int visual_class (Screen *, Visual *);
 extern int visual_cells (Screen *, Visual *);
 extern int screen_number (Screen *);
@@ -24,7 +24,10 @@ extern void describe_visual (FILE *f, Screen *, Visual *, Bool private_cmap_p);
 extern Visual *get_overlay_visual (Screen *, unsigned long *pixel_return);
 extern Bool has_writable_cells (Screen *, Visual *);
 extern Visual *id_to_visual (Screen *, int);
-extern int get_bits_per_pixel(Display *dpy, int depth);
+extern void visual_rgb_masks (Screen *screen, Visual *visual,
+                              unsigned long *red_mask,
+                              unsigned long *green_mask,
+                              unsigned long *blue_mask);
 
 extern Visual *get_gl_visual (Screen *);
 extern void describe_gl_visual (FILE *, Screen *, Visual *, Bool priv_cmap_p);
index 28439c030b92c7041bd2e21b8cf37af5ab7e1ee4..8992140dd50bf38855f1912d80da7fe4d37390eb 100644 (file)
@@ -1,5 +1,4 @@
-/* xscreensaver, Copyright (c) 1993, 1994, 1995, 1996, 1997, 1998, 2001, 2006
- *  by Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 1993-2017 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
@@ -21,7 +20,7 @@
    needed, anyway.)
 
    If you don't have man pages for this extension, see
-   http://www.x.org/X11R6.8.1/docs/Xext/
+   https://www.x.org/releases/current/doc/xextproto/shm.html
 
    (This document seems not to ever remain available on the web in one place
    for very long; you can search for it by the title, "MIT-SHM -- The MIT
 
 #include "utils.h"
 
-#ifdef HAVE_XSHM_EXTENSION     /* whole file */
-
 /* #define DEBUG */
 
 #include <errno.h>             /* for perror() */
-#include <X11/Xutil.h>         /* for XDestroyImage() */
+
+#ifdef HAVE_JWXYZ
+# include "jwxyz.h"
+#else
+# include <X11/Xutil.h>                /* for XDestroyImage() */
+#endif
 
 #include "xshm.h"
 #include "resources.h"         /* for get_string_resource() */
+#include "thread_util.h"        /* for thread_malloc() */
 
 #ifdef DEBUG
 # include <X11/Xmu/Error.h>
@@ -56,6 +59,8 @@ extern char *progname;
    of our XSHM calls, sigh.
  */
 
+#ifdef HAVE_XSHM_EXTENSION
+
 static Bool shm_got_x_error = False;
 XErrorHandler old_handler = 0;
 static int
@@ -87,28 +92,73 @@ shm_ehandler (Display *dpy, XErrorEvent *error)
     old_handler = 0;                                   \
 } while(0)
 
+#endif /* HAVE_XSHM_EXTENSION */
+
+
+static void
+print_error (int err)
+{
+  fprintf(stderr, "%s: %s\n", progname, strerror(err));
+}
+
+static XImage *
+create_fallback (Display *dpy, Visual *visual,
+                 unsigned int depth,
+                 int format, XShmSegmentInfo *shm_info,
+                 unsigned int width, unsigned int height)
+{
+  XImage *image = XCreateImage (dpy, visual, depth, format, 0, NULL,
+                                width, height, BitmapPad(dpy), 0);
+  shm_info->shmid = -1;
+
+  if (!image) {
+    print_error (ENOMEM);
+  } else {
+    /* Sometimes the XImage data needs to be aligned, such as for SIMD (SSE2
+       in Fireworkx), or multithreading (AnalogTV).
+     */
+    int error = thread_malloc ((void **)&image->data, dpy,
+                               image->height * image->bytes_per_line);
+    if (error) {
+      print_error (error);
+      XDestroyImage (image);
+      image = NULL;
+    } else {
+      memset (image->data, 0, image->height * image->bytes_per_line);
+    }
+  }
+
+  return image;
+}
+
 
 XImage *
 create_xshm_image (Display *dpy, Visual *visual,
                   unsigned int depth,
-                  int format, char *data,
-                  XShmSegmentInfo *shm_info,
+                  int format, XShmSegmentInfo *shm_info,
                   unsigned int width, unsigned int height)
 {
+#ifndef HAVE_XSHM_EXTENSION
+
+  return create_fallback (dpy, visual, depth, format, shm_info, width, height);
+
+#else /* HAVE_XSHM_EXTENSION */
+
   Status status;
   XImage *image = 0;
-  if (!get_boolean_resource(dpy, "useSHM", "Boolean"))
-    return 0;
-
-  if (!XShmQueryExtension (dpy))
-    return 0;
+  if (!get_boolean_resource(dpy, "useSHM", "Boolean") ||
+      !XShmQueryExtension (dpy)) {
+    return create_fallback (dpy, visual, depth, format, shm_info,
+                            width, height);
+  }
 
   CATCH_X_ERROR(dpy);
   image = XShmCreateImage(dpy, visual, depth,
-                         format, data, shm_info, width, height);
+                          format, NULL, shm_info, width, height);
   UNCATCH_X_ERROR(dpy);
   if (shm_got_x_error)
-    return 0;
+    return create_fallback (dpy, visual, depth, format, shm_info,
+                            width, height);
 
 #ifdef DEBUG
   fprintf(stderr, "\n%s: XShmCreateImage(... %d, %d)\n", progname,
@@ -184,13 +234,75 @@ create_xshm_image (Display *dpy, Visual *visual,
 #endif
     }
 
+  if (!image) {
+    return create_fallback (dpy, visual, depth, format, shm_info,
+                            width, height);
+  }
+
   return image;
+
+#endif /* HAVE_XSHM_EXTENSION */
+}
+
+
+Bool
+put_xshm_image (Display *dpy, Drawable d, GC gc, XImage *image,
+                int src_x, int src_y, int dest_x, int dest_y,
+                unsigned int width, unsigned int height,
+                XShmSegmentInfo *shm_info)
+{
+#ifdef HAVE_XSHM_EXTENSION
+  assert (shm_info); /* Don't just s/XShmPutImage/put_xshm_image/. */
+  if (shm_info->shmid != -1) {
+    /* XShmPutImage is asynchronous; the contents of the XImage must not be
+       modified until the server has placed the pixels on the screen and the
+       client has received an XShmCompletionEvent. Breaking this rule can cause
+       tearing. That said, put_xshm_image doesn't provide a send_event
+       parameter, so we're always breaking this rule. Not that it seems to
+       matter; everything (so far) looks fine without it.
+
+       ####: Add a send_event parameter. And fake it for XPutImage.
+     */
+    return XShmPutImage (dpy, d, gc, image, src_x, src_y, dest_x, dest_y,
+                         width, height, False);
+  }
+#endif /* HAVE_XSHM_EXTENSION */
+
+  return XPutImage (dpy, d, gc, image, src_x, src_y, dest_x, dest_y,
+                    width, height);
+}
+
+
+Bool
+get_xshm_image (Display *dpy, Drawable d, XImage *image, int x, int y,
+                unsigned long plane_mask, XShmSegmentInfo *shm_info)
+{
+#ifdef HAVE_XSHM_EXTENSION
+  if (shm_info->shmid != -1) {
+    return XShmGetImage (dpy, d, image, x, y, plane_mask);
+  }
+#endif /* HAVE_XSHM_EXTENSION */
+  return XGetSubImage (dpy, d, x, y, image->width, image->height, plane_mask,
+                       image->format, image, 0, 0) != NULL;
 }
 
 
 void
 destroy_xshm_image (Display *dpy, XImage *image, XShmSegmentInfo *shm_info)
 {
+#ifdef HAVE_XSHM_EXTENSION
+  if (shm_info->shmid == -1) {
+#endif /* HAVE_XSHM_EXTENSION */
+
+    /* Don't let XDestroyImage free image->data. */
+    thread_free (image->data);
+    image->data = NULL;
+    XDestroyImage (image);
+    return;
+
+#ifdef HAVE_XSHM_EXTENSION
+  }
+
   Status status;
 
   CATCH_X_ERROR(dpy);
@@ -223,7 +335,6 @@ destroy_xshm_image (Display *dpy, XImage *image, XShmSegmentInfo *shm_info)
 #endif
 
   XSync(dpy, False);
-}
-
 
 #endif /* HAVE_XSHM_EXTENSION */
+}
index 947a71ac3c6e8cb85d4f352839249b5a2658bbcf..6159b36aab791c302f9e08b7de4d1125999732dc 100644 (file)
@@ -17,6 +17,7 @@
  */
 
 #ifndef __XSCREENSAVER_XSHM_H__
+#define __XSCREENSAVER_XSHM_H__
 
 #ifdef HAVE_XSHM_EXTENSION
 
 # include <sys/shm.h>
 # include <X11/extensions/XShm.h>
 
+#else /* !HAVE_XSHM_EXTENSION */
+
+typedef struct {
+  int shmid; /* Always -1. */
+} dummy_segment_info;
+
+/* In case XShmSegmentInfo  */
+#undef XShmSegmentInfo
+#define XShmSegmentInfo dummy_segment_info
+
+#endif
+
 extern XImage *create_xshm_image (Display *dpy, Visual *visual,
-                                 unsigned int depth,
-                                 int format, char *data,
-                                 XShmSegmentInfo *shm_info,
-                                 unsigned int width, unsigned int height);
+                                  unsigned int depth,
+                                  int format, XShmSegmentInfo *shm_info,
+                                  unsigned int width, unsigned int height);
+extern Bool put_xshm_image (Display *dpy, Drawable d, GC gc, XImage *image,
+                            int src_x, int src_y, int dest_x, int dest_y,
+                            unsigned int width, unsigned int height,
+                            XShmSegmentInfo *shm_info);
+extern Bool get_xshm_image (Display *dpy, Drawable d, XImage *image,
+                            int x, int y, unsigned long plane_mask,
+                            XShmSegmentInfo *shm_info);
 extern void destroy_xshm_image (Display *dpy, XImage *image,
                                 XShmSegmentInfo *shm_info);
 
-#endif /* HAVE_XSHM_EXTENSION */
-
 #endif /* __XSCREENSAVER_XSHM_H__ */
index 243875458fdebd8631b494d2ecbddf31ca05101e..858e71f4c6380e9de60bc0745d29a1754c7b277b 100644 (file)
@@ -1,5 +1,5 @@
 %define        name xscreensaver
-%define        version 5.36
+%define        version 5.37
 
 Summary:       X screen saver and locker
 Name:          %{name}