X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=hacks%2Fjuggle.c;h=bc58f372255c14bbb03f011fd8bd1a7c26e098a4;hb=e4fa2ac140f7bc56571373a7b7eb585fa4500e38;hp=758d2576f145e37a3e002ea5b72b94ac61c87587;hpb=a94197e76a5dea5cb60542840809d6c20d0abbf3;p=xscreensaver diff --git a/hacks/juggle.c b/hacks/juggle.c index 758d2576..bc58f372 100644 --- a/hacks/juggle.c +++ b/hacks/juggle.c @@ -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 /*- @@ -100,7 +99,6 @@ so the answer is to do a single 661 and then drop straight down to (5). into the Adam notation, [*] which means 'lose the current ball'.] */ -#define STANDALONE #ifdef STANDALONE #define MODE_juggle #define PROGCLASS "Juggle" @@ -148,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[] = { @@ -1133,7 +1128,6 @@ init_juggle(ModeInfo * mi) } if (pattern == NULL && patternindex == NULL) { /* pattern list needs indexing */ - int i; int nelements = sizeof(portfolio)/sizeof(patternstruct); int maxballs; int numpat = 0; @@ -1476,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) {