-/* xscreensaver, Copyright (c) 1993, 1995, 1996
+/* xscreensaver, Copyright (c) 1993, 1995, 1996, 1998
* Jamie Zawinski <jwz@jwz.org>
*
* Permission to use, copy, modify, distribute, and sell this software and its
#include <math.h>
#include "screenhack.h"
+#include <signal.h> /* so we can ignore SIGFPE */
+
#define POINT_BUFFER_SIZE 10
#define MAXLEV 4
#define MAXKINDS 10
XGCValues gcv;
XWindowAttributes xgwa;
Colormap cmap;
+
+#if defined(SIGFPE) && defined(SIG_IGN)
+ /* No doubt a better fix would be to track down where the NaN is coming
+ from, and code around that; but this should do. Apparently most systems
+ (Linux, Solaris, Irix, ...) ignore FPE by default -- but FreeBSD dumps
+ core by default. */
+ signal (SIGFPE, SIG_IGN);
+#endif
+
XGetWindowAttributes (dpy, window, &xgwa);
width = xgwa.width;
height = xgwa.height;
XDrawPoints (dpy, win, gc, points, num_points, CoordModeOrigin);
num_points = 0;
/* if (delay) usleep (delay); */
- /* XSync (dpy, True); */
+ /* XSync (dpy, False); */
}
}
}
total_points = 0;
(void) recurse (0.0, 0.0, 0, dpy, window);
XDrawPoints (dpy, window, gc, points, num_points, CoordModeOrigin);
- XSync (dpy, True);
+ XSync (dpy, False);
if (delay) usleep (delay);
}
-#ifdef __hpux
+#if defined(__hpux) && defined(PLOSS)
/* I don't understand why this is necessary, but I'm told that this program
does nothing at all on HP-sUX without it.
+
+ I'm further told that HPUX 11.0 doesn't define PLOSS, and works ok without
+ this section. Go figure.
*/
#undef random
#undef srandom
{
init_flame (dpy, window);
while (1)
- flame (dpy, window);
+ {
+ flame (dpy, window);
+ screenhack_handle_events (dpy);
+ }
}