http://www.jwz.org/xscreensaver/xscreensaver-5.12.tar.gz
[xscreensaver] / hacks / epicycle.c
index c77cee690f0433fd1fb39dbef6d7a04755062509..004c0ea56a1a9d123efc4a1ebc0b7dc52e81230e 100644 (file)
 static const char *epicycle_defaults [] = {
   ".background:        black",
   ".foreground:        white",
+  "*fpsSolid:  true",
   "*colors:    100",
   "*color0:    red",
-  "*delay:     1000",
+  "*delay:     20000",
   "*holdtime:  2",
   "*lineWidth: 4",
   "*minCircles:  2",
@@ -224,14 +225,6 @@ random_divisor(struct state *st)
 }
 
 
-static void
-oom(struct state *st)
-{
-  fprintf(stderr, "Failed to allocate memory!\n");
-  exit(-1);
-}
-
-
 /* Construct a circle or die.
  */
 static Circle *
@@ -310,8 +303,7 @@ static Body *
 new_body(struct state *st)
 {
   Body *p = malloc(sizeof(Body));
-  if (NULL == p)
-    oom(st);
+  if (!p) abort();
   p->epicycles = new_circle_chain(st);
   p->current_color = 0;                /* ?? start them all on different colors? */
   p->next = NULL;
@@ -427,8 +419,7 @@ colour_init(struct state *st, XWindowAttributes *pxgwa)
   if (!mono_p)
     {
       st->colors = (XColor *) malloc(sizeof(*st->colors) * (st->ncolors+1));
-      if (!st->colors)
-       oom(st);
+      if (!st->colors) abort();
          
       make_smooth_colormap (st->dpy, pxgwa->visual, st->cmap, st->colors, &st->ncolors,
                            True, /* allocate */