[xscreensaver/f14/master] * Mon Aug 9 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.11-9.respin1 - Fix sinc() (in ri

Mamoru Tasaka mtasaka at fedoraproject.org
Sun Aug 8 18:13:54 UTC 2010


commit e65e1359d620e9b1d0b4aee1c0cbd2fe4db2b9fb
Author: Mamoru Tasaka <tasaka1 at localhost.localdomain>
Date:   Mon Aug 9 03:13:51 2010 +0900

    * Mon Aug  9 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.11-9.respin1
    - Fix sinc() (in ripple.c) argument when window is small
      (may fix bug 622188)

 xscreensaver-5.11-ripple-sinc.patch |   19 +++++++++++++++++++
 xscreensaver.spec                   |   15 ++++++++++++---
 2 files changed, 31 insertions(+), 3 deletions(-)
---
diff --git a/xscreensaver-5.11-ripple-sinc.patch b/xscreensaver-5.11-ripple-sinc.patch
new file mode 100644
index 0000000..55108e4
--- /dev/null
+++ b/xscreensaver-5.11-ripple-sinc.patch
@@ -0,0 +1,19 @@
+--- xscreensaver-5.11/hacks/ripples.c.debug	2008-08-06 11:09:13.000000000 +0900
++++ xscreensaver-5.11/hacks/ripples.c	2010-08-09 02:44:15.000000000 +0900
+@@ -703,6 +703,7 @@ sinc(struct state *st, double x)
+   int i;
+   i = (int)(x * TABLE + 0.5);
+   if (i >= TABLE) i = (TABLE-1) - (i-(TABLE-1));
++  if (i < 0) return 0.;
+   return st->cos_tab[i];
+ #elif 0
+   return cos(x * M_PI/2);
+@@ -732,7 +733,7 @@ add_circle_drop(struct state *st, int x,
+       r = cx*cx + cy*cy;
+       if (r > r2) break;
+       buf[xx + yy*st->width] =
+-        (short)(dheight * sinc(st, sqrt(r)/radius));
++        (short)(dheight * sinc(st, (radius > 0) ? sqrt(r)/radius : 0.));
+     }
+ }
+ 
diff --git a/xscreensaver.spec b/xscreensaver.spec
index 6a13efa..68f3b5b 100644
--- a/xscreensaver.spec
+++ b/xscreensaver.spec
@@ -5,7 +5,7 @@
 
 
 %define modular_conf  1
-%define fedora_rel    8.1
+%define fedora_rel    9
 
 %define extrarel      .respin1
 
@@ -59,11 +59,15 @@ Patch31:         xscreensaver-5.11-no-window2-MappingNotify-bz587537.patch
 # bug 603587
 # xjack crashes with too small window
 # (Patch32 was revised by the upstream)
+# (and again revised on Fedora)
 Patch32:         xscreensaver-5.11-xjack-with-small-window.patch
+# gcc45 emits new undefined behavior warnings
+Patch33:         xscreensaver-5.11-undefined-behavior.patch
 #
 ## Patches to be sent to the upsteam
-# gcc45 emits new undefined behavior warnings
-Patch33:	xscreensaver-5.11-undefined-behavior.patch
+# Fix sinc (in ripple.c) function when window is small
+# may fix bug 622188
+Patch34:         xscreensaver-5.11-ripple-sinc.patch
 #
 # Patches end
 Requires:        xscreensaver-base = %{epoch}:%{version}-%{release}
@@ -224,6 +228,7 @@ This package contains some test programs to debug XScreenSaver.
 %patch31 -p1 -b .nowin2_sig
 %patch32 -p1 -b .xjack_smallwin
 %patch33 -p1 -b .undef
+%patch34 -p1 -b .ripple_sinc
 
 change_option(){
    set +x
@@ -704,6 +709,10 @@ exit 0
 %defattr(-,root,root,-)
 
 %changelog
+* Mon Aug  9 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.11-9.respin1
+- Fix sinc() (in ripple.c) argument when window is small
+  (may fix bug 622188)
+
 * Sun Jul 25 2010 Mamoru Tasaka <mtasaka at ioa.s.u-tokyo.ac.jp> - 1:5.11-8.1.respin1
 - And more fix for the below patch
 


More information about the scm-commits mailing list