ftp://ftp.uni-heidelberg.de/pub/X11/contrib/applications/xscreensaver-1.27.tar.Z
[xscreensaver] / hacks / flame.c
index 370ab4d7bce8c7a66cef1ee399fbc3b225aa2886..3f98e3e3036efbf670f287091a1776a9bbb611ef 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 1993 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1993, 1995 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
@@ -48,8 +48,6 @@
 
 #include "screenhack.h"
 
-/*#include <math.h>*/
-
 #define POINT_BUFFER_SIZE 10
 #define MAXLEV 4
 
@@ -97,7 +95,6 @@ init_flame (dpy, window)
      Display *dpy;
      Window window;
 {
-  int i;
   XGCValues gcv;
   XWindowAttributes xgwa;
   Colormap cmap;
@@ -249,12 +246,29 @@ flame (dpy, window)
   if (delay) usleep (delay);
 }
 
+
+#ifdef __hpux
+/* I don't understand why this is necessary, but I'm told that this program
+   does nothing at all on HP-sUX without it.
+ */
+#undef random
+#undef srandom
+#include <math.h>
+int matherr(x)
+   register struct exception *x;
+{
+  if (x->type == PLOSS) return 1;
+  else return 0;
+}
+#endif /* __hpux */
+
+
 \f
 char *progclass = "Flame";
 
 char *defaults [] = {
-  "*background:        black",
-  "*foreground:        white",
+  "Flame.background:   black",         /* to placate SGI */
+  "Flame.foreground:   white",
   "*colors:    128",
   "*iterations:        25",
   "*delay:     50000",