diff options
author | wiz <wiz@pkgsrc.org> | 2002-02-24 21:42:55 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2002-02-24 21:42:55 +0000 |
commit | d60e59d8955eb488fa7e6cb5d5cd34cefa34ab27 (patch) | |
tree | 3096db34a751e0de79b5176ac804f354593fd506 /x11 | |
parent | ae7566726c203ac50ad699cb995b33f981073f78 (diff) | |
download | pkgsrc-d60e59d8955eb488fa7e6cb5d5cd34cefa34ab27.tar.gz |
Update xscreensaver to 4.01.
Changes since 4.00:
* New hacks: `twang', `glsnake', `boxed', `sballs', and `glforestfire'.
* New hacks `apollonian', `euler2d', `juggle', `polyominoes' and
`thornbird', from xlockmore.
* Merged recent xlockmore changes into `ant', `braid', `demon',
`discrete', `drift', `fadeplot', `forest', `grav', `hopalong',
`ifs', `laser', `lightning', `lisa', `lissie', `loop', `mountain',
`penrose', `rotor', `sierpinski', `slip', `sphere', `spiral',
`strange', and `vines'.
* Fixed the `gltext' bug that sometimes caused horizontal lines to
vanish again. This time for sure.
* Sped up `webcollage' by adding a C helper program to replace the PPM
pipeline. It also pastes images semi-transparently now.
* Added support for the gdk_pixbuf library: if this lib is available,
then `blitspin', `xflame', and `flag' can load GIF, JPEG, and PNG
images in addition to XPM and XBM. [not enabled in pkg]
* Fixed a rare race condition where the desktop-grabbing hacks could
sometimes leave the screen wedged, if the user moved the mouse
exactly when they were grabbing the screen image (it would un-wedge
the next time the saver timed out or was activated.)
* Fixed incorrect colors in the screen-grabbing GL hacks (`gflux' and
`flipscreen3d'.)
* Made SIGHUP restart the daemon process (though using
`xscreensaver-command -restart' is still the preferred way.)
* Tweaks to `xspirograph'.
* Minor configure and portability tweaks.
Diffstat (limited to 'x11')
-rw-r--r-- | x11/xscreensaver-gnome/PLIST | 28 | ||||
-rw-r--r-- | x11/xscreensaver/Makefile.common | 4 | ||||
-rw-r--r-- | x11/xscreensaver/PLIST | 27 | ||||
-rw-r--r-- | x11/xscreensaver/distinfo | 12 | ||||
-rw-r--r-- | x11/xscreensaver/patches/patch-aa | 25 | ||||
-rw-r--r-- | x11/xscreensaver/patches/patch-ab | 6 | ||||
-rw-r--r-- | x11/xscreensaver/patches/patch-ac | 13 | ||||
-rw-r--r-- | x11/xscreensaver/patches/patch-ad | 87 |
8 files changed, 168 insertions, 34 deletions
diff --git a/x11/xscreensaver-gnome/PLIST b/x11/xscreensaver-gnome/PLIST index a2594f2a22e..8e89c158c81 100644 --- a/x11/xscreensaver-gnome/PLIST +++ b/x11/xscreensaver-gnome/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2002/02/09 21:12:57 wiz Exp $ +@comment $NetBSD: PLIST,v 1.4 2002/02/24 21:42:57 wiz Exp $ bin/screensaver-properties-capplet bin/xscreensaver bin/xscreensaver-command @@ -10,11 +10,13 @@ bin/xscreensaver-gl-helper bin/xscreensaver.kss lib/X11/app-defaults/XScreenSaver libexec/xscreensaver/ant +libexec/xscreensaver/apollonian libexec/xscreensaver/atlantis libexec/xscreensaver/attraction libexec/xscreensaver/blaster libexec/xscreensaver/blitspin libexec/xscreensaver/bouboule +libexec/xscreensaver/boxed libexec/xscreensaver/braid libexec/xscreensaver/bsod libexec/xscreensaver/bubble3d @@ -38,6 +40,7 @@ libexec/xscreensaver/distort libexec/xscreensaver/drift libexec/xscreensaver/engine libexec/xscreensaver/epicycle +libexec/xscreensaver/euler2d libexec/xscreensaver/extrusion libexec/xscreensaver/fadeplot libexec/xscreensaver/flag @@ -48,7 +51,9 @@ libexec/xscreensaver/forest libexec/xscreensaver/galaxy libexec/xscreensaver/gears libexec/xscreensaver/gflux +libexec/xscreensaver/glforestfire libexec/xscreensaver/glplanet +libexec/xscreensaver/glsnake libexec/xscreensaver/gltext libexec/xscreensaver/goop libexec/xscreensaver/grav @@ -62,6 +67,7 @@ libexec/xscreensaver/ifs libexec/xscreensaver/imsmap libexec/xscreensaver/interference libexec/xscreensaver/jigsaw +libexec/xscreensaver/juggle libexec/xscreensaver/julia libexec/xscreensaver/kaleidescope libexec/xscreensaver/kumppa @@ -89,6 +95,7 @@ libexec/xscreensaver/penrose libexec/xscreensaver/petri libexec/xscreensaver/phosphor libexec/xscreensaver/pipes +libexec/xscreensaver/polyominoes libexec/xscreensaver/pulsar libexec/xscreensaver/pyro libexec/xscreensaver/qix @@ -99,6 +106,7 @@ libexec/xscreensaver/rorschach libexec/xscreensaver/rotor libexec/xscreensaver/rotzoomer libexec/xscreensaver/rubik +libexec/xscreensaver/sballs libexec/xscreensaver/shadebobs libexec/xscreensaver/sierpinski libexec/xscreensaver/sierpinski3d @@ -119,8 +127,10 @@ libexec/xscreensaver/strange libexec/xscreensaver/superquadrics libexec/xscreensaver/swirl libexec/xscreensaver/t3d +libexec/xscreensaver/thornbird libexec/xscreensaver/triangle libexec/xscreensaver/truchet +libexec/xscreensaver/twang libexec/xscreensaver/vermiculate libexec/xscreensaver/vidwhacker libexec/xscreensaver/vines @@ -156,6 +166,8 @@ man/man1/flame.1 man/man1/forest.1 man/man1/galaxy.1 man/man1/gflux.1 +man/man1/glforestfire.1 +man/man1/glsnake.1 man/man1/gltext.1 man/man1/goop.1 man/man1/grav.1 @@ -192,6 +204,7 @@ man/man1/rd-bomb.1 man/man1/rocks.1 man/man1/rorschach.1 man/man1/rotzoomer.1 +man/man1/sballs.1 man/man1/sierpinski.1 man/man1/slidescreen.1 man/man1/slip.1 @@ -206,6 +219,7 @@ man/man1/starwars.1 man/man1/strange.1 man/man1/swirl.1 man/man1/t3d.1 +man/man1/twang.1 man/man1/vidwhacker.1 man/man1/vines.1 man/man1/webcollage.1 @@ -222,17 +236,21 @@ man/man1/xscreensaver-getimage-video.1 man/man1/xscreensaver-getimage.1 man/man1/xscreensaver-gl-helper.1 man/man1/xscreensaver.1 +man/man1/xspirograph.1 man/man1/xsublim.1 man/man1/xteevee.1 man/man1/zoom.1 share/control-center/Desktop/screensaver-properties.desktop +share/control-center/capplets/screensaver.desktop share/control-center/screensavers/README share/control-center/screensavers/ant.xml +share/control-center/screensavers/apollonian.xml share/control-center/screensavers/atlantis.xml share/control-center/screensavers/attraction.xml share/control-center/screensavers/blaster.xml share/control-center/screensavers/blitspin.xml share/control-center/screensavers/bouboule.xml +share/control-center/screensavers/boxed.xml share/control-center/screensavers/braid.xml share/control-center/screensavers/bsod.xml share/control-center/screensavers/bubble3d.xml @@ -258,6 +276,7 @@ share/control-center/screensavers/drift.xml share/control-center/screensavers/electricsheep.xml share/control-center/screensavers/engine.xml share/control-center/screensavers/epicycle.xml +share/control-center/screensavers/euler2d.xml share/control-center/screensavers/extrusion.xml share/control-center/screensavers/fadeplot.xml share/control-center/screensavers/flag.xml @@ -268,7 +287,9 @@ share/control-center/screensavers/forest.xml share/control-center/screensavers/galaxy.xml share/control-center/screensavers/gears.xml share/control-center/screensavers/gflux.xml +share/control-center/screensavers/glforestfire.xml share/control-center/screensavers/glplanet.xml +share/control-center/screensavers/glsnake.xml share/control-center/screensavers/gltext.xml share/control-center/screensavers/goban.xml share/control-center/screensavers/goop.xml @@ -283,6 +304,7 @@ share/control-center/screensavers/ifs.xml share/control-center/screensavers/imsmap.xml share/control-center/screensavers/interference.xml share/control-center/screensavers/jigsaw.xml +share/control-center/screensavers/juggle.xml share/control-center/screensavers/julia.xml share/control-center/screensavers/kaleidescope.xml share/control-center/screensavers/kumppa.xml @@ -310,6 +332,7 @@ share/control-center/screensavers/penrose.xml share/control-center/screensavers/petri.xml share/control-center/screensavers/phosphor.xml share/control-center/screensavers/pipes.xml +share/control-center/screensavers/polyominoes.xml share/control-center/screensavers/pulsar.xml share/control-center/screensavers/pyro.xml share/control-center/screensavers/qix.xml @@ -320,6 +343,7 @@ share/control-center/screensavers/rorschach.xml share/control-center/screensavers/rotor.xml share/control-center/screensavers/rotzoomer.xml share/control-center/screensavers/rubik.xml +share/control-center/screensavers/sballs.xml share/control-center/screensavers/shadebobs.xml share/control-center/screensavers/sierpinski.xml share/control-center/screensavers/sierpinski3d.xml @@ -342,8 +366,10 @@ share/control-center/screensavers/strange.xml share/control-center/screensavers/superquadrics.xml share/control-center/screensavers/swirl.xml share/control-center/screensavers/t3d.xml +share/control-center/screensavers/thornbird.xml share/control-center/screensavers/triangle.xml share/control-center/screensavers/truchet.xml +share/control-center/screensavers/twang.xml share/control-center/screensavers/vermiculate.xml share/control-center/screensavers/vidwhacker.xml share/control-center/screensavers/vines.xml diff --git a/x11/xscreensaver/Makefile.common b/x11/xscreensaver/Makefile.common index 0992d1dcfad..0efe6f2c65b 100644 --- a/x11/xscreensaver/Makefile.common +++ b/x11/xscreensaver/Makefile.common @@ -1,7 +1,7 @@ -# $NetBSD: Makefile.common,v 1.22 2002/02/09 21:12:56 wiz Exp $ +# $NetBSD: Makefile.common,v 1.23 2002/02/24 21:42:55 wiz Exp $ # -DISTNAME= xscreensaver-4.00 +DISTNAME= xscreensaver-4.01 CATEGORIES= x11 MASTER_SITES= ${HOMEPAGE} \ ftp://ftp.fu-berlin.de/unix/X11/graphics/xscreensaver/ diff --git a/x11/xscreensaver/PLIST b/x11/xscreensaver/PLIST index 40ca37013bc..ffe2db9e194 100644 --- a/x11/xscreensaver/PLIST +++ b/x11/xscreensaver/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.3 2002/02/09 21:12:56 wiz Exp $ +@comment $NetBSD: PLIST,v 1.4 2002/02/24 21:42:56 wiz Exp $ bin/xscreensaver bin/xscreensaver-command bin/xscreensaver-demo @@ -9,11 +9,13 @@ bin/xscreensaver-gl-helper bin/xscreensaver.kss lib/X11/app-defaults/XScreenSaver libexec/xscreensaver/ant +libexec/xscreensaver/apollonian libexec/xscreensaver/atlantis libexec/xscreensaver/attraction libexec/xscreensaver/blaster libexec/xscreensaver/blitspin libexec/xscreensaver/bouboule +libexec/xscreensaver/boxed libexec/xscreensaver/braid libexec/xscreensaver/bsod libexec/xscreensaver/bubble3d @@ -25,11 +27,13 @@ libexec/xscreensaver/circuit libexec/xscreensaver/compass libexec/xscreensaver/config/README libexec/xscreensaver/config/ant.xml +libexec/xscreensaver/config/apollonian.xml libexec/xscreensaver/config/atlantis.xml libexec/xscreensaver/config/attraction.xml libexec/xscreensaver/config/blaster.xml libexec/xscreensaver/config/blitspin.xml libexec/xscreensaver/config/bouboule.xml +libexec/xscreensaver/config/boxed.xml libexec/xscreensaver/config/braid.xml libexec/xscreensaver/config/bsod.xml libexec/xscreensaver/config/bubble3d.xml @@ -55,6 +59,7 @@ libexec/xscreensaver/config/drift.xml libexec/xscreensaver/config/electricsheep.xml libexec/xscreensaver/config/engine.xml libexec/xscreensaver/config/epicycle.xml +libexec/xscreensaver/config/euler2d.xml libexec/xscreensaver/config/extrusion.xml libexec/xscreensaver/config/fadeplot.xml libexec/xscreensaver/config/flag.xml @@ -65,7 +70,9 @@ libexec/xscreensaver/config/forest.xml libexec/xscreensaver/config/galaxy.xml libexec/xscreensaver/config/gears.xml libexec/xscreensaver/config/gflux.xml +libexec/xscreensaver/config/glforestfire.xml libexec/xscreensaver/config/glplanet.xml +libexec/xscreensaver/config/glsnake.xml libexec/xscreensaver/config/gltext.xml libexec/xscreensaver/config/goban.xml libexec/xscreensaver/config/goop.xml @@ -80,6 +87,7 @@ libexec/xscreensaver/config/ifs.xml libexec/xscreensaver/config/imsmap.xml libexec/xscreensaver/config/interference.xml libexec/xscreensaver/config/jigsaw.xml +libexec/xscreensaver/config/juggle.xml libexec/xscreensaver/config/julia.xml libexec/xscreensaver/config/kaleidescope.xml libexec/xscreensaver/config/kumppa.xml @@ -107,6 +115,7 @@ libexec/xscreensaver/config/penrose.xml libexec/xscreensaver/config/petri.xml libexec/xscreensaver/config/phosphor.xml libexec/xscreensaver/config/pipes.xml +libexec/xscreensaver/config/polyominoes.xml libexec/xscreensaver/config/pulsar.xml libexec/xscreensaver/config/pyro.xml libexec/xscreensaver/config/qix.xml @@ -117,6 +126,7 @@ libexec/xscreensaver/config/rorschach.xml libexec/xscreensaver/config/rotor.xml libexec/xscreensaver/config/rotzoomer.xml libexec/xscreensaver/config/rubik.xml +libexec/xscreensaver/config/sballs.xml libexec/xscreensaver/config/shadebobs.xml libexec/xscreensaver/config/sierpinski.xml libexec/xscreensaver/config/sierpinski3d.xml @@ -139,8 +149,10 @@ libexec/xscreensaver/config/strange.xml libexec/xscreensaver/config/superquadrics.xml libexec/xscreensaver/config/swirl.xml libexec/xscreensaver/config/t3d.xml +libexec/xscreensaver/config/thornbird.xml libexec/xscreensaver/config/triangle.xml libexec/xscreensaver/config/truchet.xml +libexec/xscreensaver/config/twang.xml libexec/xscreensaver/config/vermiculate.xml libexec/xscreensaver/config/vidwhacker.xml libexec/xscreensaver/config/vines.xml @@ -177,6 +189,7 @@ libexec/xscreensaver/distort libexec/xscreensaver/drift libexec/xscreensaver/engine libexec/xscreensaver/epicycle +libexec/xscreensaver/euler2d libexec/xscreensaver/extrusion libexec/xscreensaver/fadeplot libexec/xscreensaver/flag @@ -187,7 +200,9 @@ libexec/xscreensaver/forest libexec/xscreensaver/galaxy libexec/xscreensaver/gears libexec/xscreensaver/gflux +libexec/xscreensaver/glforestfire libexec/xscreensaver/glplanet +libexec/xscreensaver/glsnake libexec/xscreensaver/gltext libexec/xscreensaver/goop libexec/xscreensaver/grav @@ -201,6 +216,7 @@ libexec/xscreensaver/ifs libexec/xscreensaver/imsmap libexec/xscreensaver/interference libexec/xscreensaver/jigsaw +libexec/xscreensaver/juggle libexec/xscreensaver/julia libexec/xscreensaver/kaleidescope libexec/xscreensaver/kumppa @@ -228,6 +244,7 @@ libexec/xscreensaver/penrose libexec/xscreensaver/petri libexec/xscreensaver/phosphor libexec/xscreensaver/pipes +libexec/xscreensaver/polyominoes libexec/xscreensaver/pulsar libexec/xscreensaver/pyro libexec/xscreensaver/qix @@ -238,6 +255,7 @@ libexec/xscreensaver/rorschach libexec/xscreensaver/rotor libexec/xscreensaver/rotzoomer libexec/xscreensaver/rubik +libexec/xscreensaver/sballs libexec/xscreensaver/shadebobs libexec/xscreensaver/sierpinski libexec/xscreensaver/sierpinski3d @@ -258,8 +276,10 @@ libexec/xscreensaver/strange libexec/xscreensaver/superquadrics libexec/xscreensaver/swirl libexec/xscreensaver/t3d +libexec/xscreensaver/thornbird libexec/xscreensaver/triangle libexec/xscreensaver/truchet +libexec/xscreensaver/twang libexec/xscreensaver/vermiculate libexec/xscreensaver/vidwhacker libexec/xscreensaver/vines @@ -295,6 +315,8 @@ man/man1/flame.1 man/man1/forest.1 man/man1/galaxy.1 man/man1/gflux.1 +man/man1/glforestfire.1 +man/man1/glsnake.1 man/man1/gltext.1 man/man1/goop.1 man/man1/grav.1 @@ -331,6 +353,7 @@ man/man1/rd-bomb.1 man/man1/rocks.1 man/man1/rorschach.1 man/man1/rotzoomer.1 +man/man1/sballs.1 man/man1/sierpinski.1 man/man1/slidescreen.1 man/man1/slip.1 @@ -345,6 +368,7 @@ man/man1/starwars.1 man/man1/strange.1 man/man1/swirl.1 man/man1/t3d.1 +man/man1/twang.1 man/man1/vidwhacker.1 man/man1/vines.1 man/man1/webcollage.1 @@ -361,6 +385,7 @@ man/man1/xscreensaver-getimage-video.1 man/man1/xscreensaver-getimage.1 man/man1/xscreensaver-gl-helper.1 man/man1/xscreensaver.1 +man/man1/xspirograph.1 man/man1/xsublim.1 man/man1/xteevee.1 man/man1/zoom.1 diff --git a/x11/xscreensaver/distinfo b/x11/xscreensaver/distinfo index ad326b5ee8e..ebfa8157f0e 100644 --- a/x11/xscreensaver/distinfo +++ b/x11/xscreensaver/distinfo @@ -1,7 +1,9 @@ -$NetBSD: distinfo,v 1.9 2002/02/09 21:13:55 wiz Exp $ +$NetBSD: distinfo,v 1.10 2002/02/24 21:42:56 wiz Exp $ -SHA1 (xscreensaver-4.00.tar.gz) = f930b6c8b36a26ebc92457ed2772e1a78a2e309b -Size (xscreensaver-4.00.tar.gz) = 1855130 bytes -SHA1 (patch-aa) = d0499f6557e1977da73b0b6b5e433f263e0e2084 -SHA1 (patch-ab) = fe0c6c387ce5956c7851f8e1f31777961b8bd69a +SHA1 (xscreensaver-4.01.tar.gz) = 09f087d653c9c8d6b3777aa3f348c5e2f7217686 +Size (xscreensaver-4.01.tar.gz) = 2156101 bytes +SHA1 (patch-aa) = de4fb926398ee76d4d30960ee12f731eb3a03919 +SHA1 (patch-ab) = 3f60a99f7d45f38b6c4afe2fcc6eafc9456acb30 +SHA1 (patch-ac) = 0408f5f6ddf3ea80a981c223ab41f7464c4e1357 +SHA1 (patch-ad) = e245611bfd7de949a788fe38f9bcc99b52f286c7 SHA1 (patch-ae) = c3e7ddffb2caab5c545b0834c93238455852dea6 diff --git a/x11/xscreensaver/patches/patch-aa b/x11/xscreensaver/patches/patch-aa index fd1bafdc7fd..6bf2f540251 100644 --- a/x11/xscreensaver/patches/patch-aa +++ b/x11/xscreensaver/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.14 2002/02/09 21:12:57 wiz Exp $ +$NetBSD: patch-aa,v 1.15 2002/02/24 21:42:56 wiz Exp $ ---- configure.orig Wed Jan 2 09:15:22 2002 +--- configure.orig Sun Feb 24 10:56:28 2002 +++ configure -@@ -1536,7 +1536,7 @@ +@@ -1544,7 +1544,7 @@ # implement the "install-strip" target properly (strip executables, # but do not try to strip scripts.) # @@ -11,22 +11,3 @@ $NetBSD: patch-aa,v 1.14 2002/02/09 21:12:57 wiz Exp $ # random libc stuff echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -@@ -3790,15 +3790,15 @@ - # there must be a better way than this... - if test -z "`echo $with_configdir | sed 's@^/.*@@'`" ; then - # absolute path -- CONFIGDIR=$with_configdir -+ HACK_CONF_DIR=$with_configdir - else - # relative path -- CONFIGDIR="\${exec_prefix}$with_configdir" -+ HACK_CONF_DIR="\${exec_prefix}$with_configdir" - fi - fi - - # canonicalize slashes. --CONFIGDIR=`echo "${CONFIGDIR}" | sed 's@/$@@;s@//*@/@g'` -+HACK_CONF_DIR=`echo "${HACK_CONF_DIR}" | sed 's@/$@@;s@//*@/@g'` - - - diff --git a/x11/xscreensaver/patches/patch-ab b/x11/xscreensaver/patches/patch-ab index 82c96efcd9e..80f1d30490d 100644 --- a/x11/xscreensaver/patches/patch-ab +++ b/x11/xscreensaver/patches/patch-ab @@ -1,8 +1,8 @@ -$NetBSD: patch-ab,v 1.8 2001/05/18 13:26:23 abs Exp $ +$NetBSD: patch-ab,v 1.9 2002/02/24 21:42:56 wiz Exp $ ---- hacks/Makefile.in.orig Fri May 18 13:27:34 2001 +--- hacks/Makefile.in.orig Sun Feb 24 10:56:29 2002 +++ hacks/Makefile.in -@@ -363,6 +363,12 @@ +@@ -428,6 +428,12 @@ .c.o: $(CC) -c $(INCLUDES) $(DEFS) $(CFLAGS) $(X_CFLAGS) $< diff --git a/x11/xscreensaver/patches/patch-ac b/x11/xscreensaver/patches/patch-ac new file mode 100644 index 00000000000..a82714d583e --- /dev/null +++ b/x11/xscreensaver/patches/patch-ac @@ -0,0 +1,13 @@ +$NetBSD: patch-ac,v 1.4 2002/02/24 21:42:56 wiz Exp $ + +--- driver/Makefile.in.orig Sun Feb 24 18:19:18 2002 ++++ driver/Makefile.in +@@ -762,7 +762,7 @@ + + + xscreensaver-demo: @PREFERRED_DEMO_PROGRAM@ +- $(INSTALL_PROGRAM) @PREFERRED_DEMO_PROGRAM@ $@ ++ cp -p @PREFERRED_DEMO_PROGRAM@ $@ + + xscreensaver-demo-Xm: $(DEMO_OBJS) $(MOTIF_OBJS) + $(CC) $(LDFLAGS) -o $@ $(DEMO_OBJS) $(MOTIF_OBJS) $(LIBS) $(X_LIBS) \ diff --git a/x11/xscreensaver/patches/patch-ad b/x11/xscreensaver/patches/patch-ad new file mode 100644 index 00000000000..e1e10872cf3 --- /dev/null +++ b/x11/xscreensaver/patches/patch-ad @@ -0,0 +1,87 @@ +$NetBSD: patch-ad,v 1.5 2002/02/24 21:42:57 wiz Exp $ + +--- hacks/glx/glsnake.c.orig Thu Feb 14 13:06:38 2002 ++++ hacks/glx/glsnake.c +@@ -65,7 +65,7 @@ + #ifdef USE_GL /* whole file */ + + #include <GL/glu.h> +-#include <sys/timeb.h> ++#include <sys/time.h> + #include <string.h> + #include <unistd.h> + #include <stdio.h> +@@ -98,8 +98,8 @@ + int is_legal; + int last_turn; + int selected; +- struct timeb last_iteration; +- struct timeb last_morph; ++ struct timeval last_iteration; ++ struct timeval last_morph; + int morphing; + nodeang_t node[24]; + GLfloat roty; +@@ -660,6 +660,7 @@ + #define RANDSIGN() ((random() & 1) ? 1 : -1) + + void glsnake_init(ModeInfo *mi) { ++ struct timezone localtimezone; + glsnake_configuration * bp; + int wire = MI_IS_WIREFRAME(mi); + +@@ -693,8 +694,8 @@ + bp->dragging = 0; + bp->interactive = 0; + +- ftime(&(bp->last_iteration)); +- memcpy(&(bp->last_morph), &(bp->last_iteration), sizeof(struct timeb)); ++ gettimeofday(&(bp->last_iteration), &localtimezone); ++ memcpy(&(bp->last_morph), &(bp->last_iteration), sizeof(struct timeval)); + /* srand((unsigned int) bp->last_iteration.time); */ + + /* load the model files */ +@@ -871,7 +872,8 @@ + long morf_msec; + float iter_angle_max; + int i; +- struct timeb current_time; ++ struct timeval current_time; ++ struct timezone localtimezone; + int still_morphing; + + /* Do nothing to the model if we are paused */ +@@ -881,7 +883,7 @@ + return; + } + /* ftime is winDOS compatible */ +- ftime(¤t_time); ++ gettimeofday(¤t_time, &localtimezone); + + /* <spiv> Well, ftime gives time with millisecond resolution. + * <Jaq> if current time is exactly equal to last iteration, +@@ -892,18 +894,18 @@ + * it would be the same + * <spiv> b) The code will divide by zero + */ +- iter_msec = (long) current_time.millitm - bp->last_iteration.millitm + +- ((long) current_time.time - bp->last_iteration.time) * 1000L; ++ iter_msec = ((long) current_time.tv_usec - bp->last_iteration.tv_usec)/1000L + ++ ((long) current_time.tv_sec - bp->last_iteration.tv_sec) * 1000L; + if (iter_msec) { + /* save the current time */ +- memcpy(&(bp->last_iteration), ¤t_time, sizeof(struct timeb)); ++ memcpy(&(bp->last_iteration), ¤t_time, sizeof(struct timeval)); + + /* work out if we have to switch models */ +- morf_msec = bp->last_iteration.millitm - bp->last_morph.millitm + +- ((long) (bp->last_iteration.time - bp->last_morph.time) * 1000L); ++ morf_msec = (bp->last_iteration.tv_usec - bp->last_morph.tv_usec)/1000L + ++ ((long) (bp->last_iteration.tv_sec - bp->last_morph.tv_sec) * 1000L); + + if ((morf_msec > statictime) && !bp->interactive) { +- memcpy(&(bp->last_morph), &(bp->last_iteration), sizeof(struct timeb)); ++ memcpy(&(bp->last_morph), &(bp->last_iteration), sizeof(struct timeval)); + start_morph(RAND(bp->m_count), 0, bp); + } + |