pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/filelight Fixed the computation of the coordi...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/da1c17f51d7d
branches:  trunk
changeset: 534347:da1c17f51d7d
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Wed Oct 17 10:03:59 2007 +0000

description:
Fixed the computation of the coordinates. Using `int's for trigonometry
is weird.

PKGREVISION++

diffstat:

 sysutils/filelight/Makefile         |   4 ++--
 sysutils/filelight/distinfo         |   4 +++-
 sysutils/filelight/patches/patch-aa |  26 ++++++++++++++++++++++++++
 sysutils/filelight/patches/patch-ab |  18 ++++++++++++++++++
 4 files changed, 49 insertions(+), 3 deletions(-)

diffs (78 lines):

diff -r af90c4e334e5 -r da1c17f51d7d sysutils/filelight/Makefile
--- a/sysutils/filelight/Makefile       Wed Oct 17 09:51:14 2007 +0000
+++ b/sysutils/filelight/Makefile       Wed Oct 17 10:03:59 2007 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.9 2007/09/21 13:04:17 wiz Exp $
+# $NetBSD: Makefile,v 1.10 2007/10/17 10:03:59 rillig Exp $
 #
 
 DISTNAME=      filelight-1.0
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    sysutils
 MASTER_SITES=  http://www.methylblue.com/filelight/packages/
 EXTRACT_SUFX=  .tar.bz2
diff -r af90c4e334e5 -r da1c17f51d7d sysutils/filelight/distinfo
--- a/sysutils/filelight/distinfo       Wed Oct 17 09:51:14 2007 +0000
+++ b/sysutils/filelight/distinfo       Wed Oct 17 10:03:59 2007 +0000
@@ -1,5 +1,7 @@
-$NetBSD: distinfo,v 1.2 2006/10/06 18:15:10 rillig Exp $
+$NetBSD: distinfo,v 1.3 2007/10/17 10:03:59 rillig Exp $
 
 SHA1 (filelight-1.0.tar.bz2) = 2a4644c598dfcc408af0af65e655e2525494708d
 RMD160 (filelight-1.0.tar.bz2) = 67ce0deb03f14cc280f7471156c4f2a3135ebb5e
 Size (filelight-1.0.tar.bz2) = 530449 bytes
+SHA1 (patch-aa) = f068ff507d46c00a5ac6a941e3b5e564b3b9b3ff
+SHA1 (patch-ab) = 36669e158ad403669adb803adf242fa64b7caa5d
diff -r af90c4e334e5 -r da1c17f51d7d sysutils/filelight/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/filelight/patches/patch-aa       Wed Oct 17 10:03:59 2007 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-aa,v 1.3 2007/10/17 10:04:00 rillig Exp $
+
+--- src/part/radialMap/map.cpp.orig    2001-08-06 01:00:00.000000000 +0200
++++ src/part/radialMap/map.cpp 2007-10-17 11:56:15.000000000 +0200
+@@ -337,7 +337,7 @@ RadialMap::Map::paint( unsigned int scal
+    {
+       int width = rect.width() / 2;
+       //clever geometric trick to find largest angle that will give biggest arrow head
+-      int a_max = int(acos( (double)width / double((width + 5) * scaleFactor) ) * (180*16 / M_PI));
++      double a_max = acos( (double)width / double((width + 5) * scaleFactor) ) * (180*16 / M_PI);
+ 
+       for( ConstIterator<Segment> it = m_signature[x].constIterator(); it != m_signature[x].end(); ++it )
+       {
+@@ -351,10 +351,10 @@ RadialMap::Map::paint( unsigned int scal
+             //draw arrow head to indicate undisplayed files/directories
+             QPointArray pts( 3 );
+             QPoint pos, cpos = rect.center();
+-            int a[3] = { (*it)->start(), (*it)->length(), 0 };
++            double a[3] = { (*it)->start(), (*it)->length(), 0 };
+ 
+             a[2] = a[0] + (a[1] / 2); //assign to halfway between
+-            if( a[1] > a_max )
++            if(a[1] > a_max )
+             {
+                a[1] = a_max;
+                a[0] = a[2] - a_max / 2;
diff -r af90c4e334e5 -r da1c17f51d7d sysutils/filelight/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sysutils/filelight/patches/patch-ab       Wed Oct 17 10:03:59 2007 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-ab,v 1.1 2007/10/17 10:04:00 rillig Exp $
+
+--- src/part/radialMap/sincos.h.orig   2001-08-06 01:00:00.000000000 +0200
++++ src/part/radialMap/sincos.h        2007-10-17 11:06:22.000000000 +0200
+@@ -9,11 +9,11 @@
+ #if !defined(__GLIBC__) || (__GLIBC__ < 2) ||  (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1)
+ 
+    void
+-   sincos( int angleRadians, double *Sin, double *Cos );
++   sincos( double angleRadians, double *Sin, double *Cos );
+ 
+ #ifdef SINCOS_H_IMPLEMENTATION
+    void
+-   sincos( int angleRadians, double *Sin, double *Cos )
++   sincos( double angleRadians, double *Sin, double *Cos )
+    {
+       *Sin = sin( angleRadians );
+       *Cos = cos( angleRadians );



Home | Main Index | Thread Index | Old Index