ftp://ftp.jp.xemacs.org/pub/NetBSD/packages/distfiles/xscreensaver-4.15.tar.gz
[xscreensaver] / hacks / glx / flurry.c
index 63b89f666a83b42b49d62fa14a66e14e4a44325d..e6a7565765557956f62ceb12636620e1daf124ff 100644 (file)
@@ -37,9 +37,8 @@ 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
 
 /*-
@@ -71,7 +70,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 +106,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;
 }