ftp://ftp.krokus.ru/pub/OpenBSD/distfiles/xscreensaver-4.21.tar.gz
[xscreensaver] / hacks / glx / flurry.c
index 63b89f666a83b42b49d62fa14a66e14e4a44325d..3a40be48e5ab8b258aa50d9c053ed3fb2fe1c7c4 100644 (file)
@@ -37,16 +37,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 /* flurry */
 
-#if !defined( lint ) && !defined( SABER )
+#if 0
 static const char sccsid[] = "@(#)flurry.c     4.07 97/11/24 xlockmore";
-
 #endif
 
-/*-
- * due to a Bug/feature in VMS X11/Intrinsic.h has to be placed before xlock.
- * otherwise caddr_t is not defined correctly
- */
-
 #define DEF_PRESET     "classic"
 #define DEF_BRIGHTNESS "8"
 
@@ -55,10 +49,10 @@ static const char sccsid[] = "@(#)flurry.c  4.07 97/11/24 xlockmore";
 # define PROGCLASS             "Flurry"
 # define HACK_INIT             init_flurry
 # define HACK_DRAW             draw_flurry
-# define HACK_RESHAPE          reshape_flurry
-# define flurry_opts           xlockmore_opts
-# define DEFAULTS              "*showFPS:      False   \n" \
-                               "*preset:       " DEF_PRESET "   \n"
+# define HACK_RESHAPE  reshape_flurry
+# define flurry_opts   xlockmore_opts
+# define DEFAULTS              "*delay:      10000 \n" \
+                                               "*showFPS:    False \n"
 
 # include "xlockmore.h"                /* from the xscreensaver distribution */
 
@@ -71,7 +65,7 @@ static XrmOptionDescRec opts[] = {
 };
 
 static argtype vars[] = {
-    {(caddr_t *) &preset_str, "preset",     "Preset",     DEF_PRESET,     t_String},
+    {&preset_str, "preset",     "Preset",     DEF_PRESET,     t_String},
 };
 
 #define countof(x) (sizeof((x))/sizeof((*x)))
@@ -107,8 +101,12 @@ static double gTimeCounter = 0.0;
 
 double currentTime(void) {
   struct timeval tv;
-
-  gettimeofday(&tv, NULL);
+# ifdef GETTIMEOFDAY_TWO_ARGS
+  struct timezone tzp;
+  gettimeofday(&tv, &tzp);
+# else
+  gettimeofday(&tv);
+# endif
 
   return (double)tv.tv_sec + (double)tv.tv_usec / 1000000.0;
 }