ftp://ftp.jp.xemacs.org/pub/NetBSD/packages/distfiles/xscreensaver-4.15.tar.gz
[xscreensaver] / hacks / juggle.c
index 2650ad27cf483ac2dafe6d76f2c1a93c354332b8..bc58f372255c14bbb03f011fd8bd1a7c26e098a4 100644 (file)
@@ -1,9 +1,8 @@
 /* -*- Mode: C; tab-width: 4 -*- */
 /* juggle */
 
-#if !defined( lint ) && !defined( SABER )
+#if 0
 static const char sccsid[] = "@(#)juggle.c     5.00 2000/11/01 xlockmore";
-
 #endif
 
 /*-
@@ -147,16 +146,13 @@ static XrmOptionDescRec opts[] =
 };
 static argtype vars[] =
 {
-  {(caddr_t *) &pattern, (char *) "pattern",
+  {&pattern, "pattern", 
    (char *) "Pattern", (char *) DEF_PATTERN, t_String},
-  {(caddr_t *) &trail, (char *) "trail",
-   (char *) "Trail", (char *) DEF_TRAIL, t_Int},
+  {&trail, "trail", "Trail", DEF_TRAIL, t_Int},
 #ifdef UNI
-  {(caddr_t *) &uni, (char *) "uni",
-   (char *) "Uni", (char *) DEF_UNI, t_Bool},
+  {&uni, "uni", "Uni", DEF_UNI, t_Bool},
 #endif
-  {(caddr_t *) &solid, (char *) "solid",
-   (char *) "Solid", (char *) DEF_SOLID, t_Bool}
+  {&solid, "solid", "Solid", DEF_SOLID, t_Bool}
 };
 static OptionStruct desc[] =
 {
@@ -1474,7 +1470,13 @@ draw_juggle(ModeInfo * mi)
 
        {
          struct timeval tv;
-         (void)gettimeofday(&tv, NULL);
+# ifdef GETTIMEOFDAY_TWO_ARGS
+      struct timezone tzp;
+         gettimeofday(&tv, &tzp);
+# else
+         gettimeofday(&tv);
+# endif
+
          sp->time = (int) ((tv.tv_sec - sp->begintime)*1000 + tv.tv_usec/1000);
        }
        for (traj = sp->head->next; traj != sp->head; traj = traj->next) {