-/* xscreensaver, Copyright (c) 1992 Jamie Zawinski <jwz@lucid.com>
+/* xscreensaver, Copyright (c) 1992, 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
* implied warranty.
*/
-#include "screenhack.h"
#include <math.h>
-#if __STDC__
-#include <values.h>
-#endif
+#include "screenhack.h"
static double sins [360];
static double coss [360];
factor3 = 2;
factor4 = 2;
- divisor = ((frand (3.0) + 1) * (((random() % 1) * 2) - 1));
+ divisor = ((frand (3.0) + 1) * (((random() & 1) * 2) - 1));
if ((random () & 1) == 0)
{
d_angle = random () % 360;
#define random_factor() \
- (((random() % 7) ? ((random() % 1) + 1) : 3) \
- * (((random() % 1) * 2) - 1))
+ (((random() % 7) ? ((random() & 1) + 1) : 3) \
+ * (((random() & 1) * 2) - 1))
while (gcd (gcd (gcd (factor1, factor2), factor3), factor4) != 1)
{
{
hsv_to_rgb (random () % 360, frand (1.0), frand (0.5) + 0.5,
&color.red, &color.green, &color.blue);
- if (got_color = XAllocColor (dpy, cmap, &color))
+ if ((got_color = XAllocColor (dpy, cmap, &color)))
XSetForeground (dpy, draw_gc, color.pixel);
else
XSetForeground (dpy, draw_gc, default_fg_pixel);
char *progclass = "Helix";
char *defaults [] = {
- "*background: black",
+ "Helix.background: black", /* to placate SGI */
0
};
-XrmOptionDescRec options [] = { 0 };
+XrmOptionDescRec options [] = { { 0, } };
int options_size = 0;
void