This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project wmaker-crm.git.

The branch, next has been updated
       via  7bf8efef5423a45f8cb3ffabeeb2754188460a44 (commit)
       via  e9764aab71835608054589013957635c0e0616e4 (commit)
       via  95ee539d6d33710cee9bbe051436b2147cebd295 (commit)
       via  f68ec6c91334bf97d43ee94a4568c8d4f2396939 (commit)
      from  a6410d61e5a3c2bfe949038de4e68f4450ef7767 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://repo.or.cz/w/wmaker-crm.git/commit/7bf8efef5423a45f8cb3ffabeeb2754188460a44

commit 7bf8efef5423a45f8cb3ffabeeb2754188460a44
Author: Christophe CURIS <[email protected]>
Date:   Sun Jun 16 21:51:02 2013 +0200

    WRaster: Changed formula for reconverting angle to the (0-360) bounds
    
    There is a dedicaded floating point modulo operator that does a
    better job (faster, no precision loss), so we use it instead of the
    complicated formula that uses type conversions.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/wrlib/rotate.c b/wrlib/rotate.c
index d296815..f04b95e 100644
--- a/wrlib/rotate.c
+++ b/wrlib/rotate.c
@@ -52,7 +52,9 @@ RImage *RRotateImage(RImage * image, float angle)
         */
        static const float min_usable_angle = 0.00699;
 
-       angle = ((int)angle % 360) + (angle - (int)angle);
+       angle = fmod(angle, 360.0);
+       if (angle < 0.0)
+               angle += 360.0;
 
        if (angle < min_usable_angle) {
                /* Rotate by 0 degree */

http://repo.or.cz/w/wmaker-crm.git/commit/e9764aab71835608054589013957635c0e0616e4

commit e9764aab71835608054589013957635c0e0616e4
Author: Christophe CURIS <[email protected]>
Date:   Sun Jun 16 21:51:01 2013 +0200

    wmaker: Changed math on floating point by integer operation
    
    For this case we happen to already have the same variable as integer
    type, so it is better to use them directly for computation.
    
    Please note that the floating point variables do not contain more
    precision in this use case, otherwise the change would not be
    transparent.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/src/misc.c b/src/misc.c
index b2f40f6..4c4eaca 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -190,7 +190,7 @@ void SlideWindows(Window *wins[], int n, int from_x, int 
from_y, int to_x, int t
        dx = (float) dx_int;
        dy = (float) dy_int;
 
-       if (fabs(dx) > fabs(dy)) {
+       if (abs(dx_int) > abs(dy_int)) {
                dx_is_bigger = 1;
        }
 

http://repo.or.cz/w/wmaker-crm.git/commit/95ee539d6d33710cee9bbe051436b2147cebd295

commit 95ee539d6d33710cee9bbe051436b2147cebd295
Author: Christophe CURIS <[email protected]>
Date:   Sun Jun 16 21:50:57 2013 +0200

    Configure: Added explicit check for math library header
    
    Compilation will not work if the header is missing, so make sure
    it is present and compilable first. This can highligh sooner if
    a user forgot to install the corresponding dev package.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/m4/wm_libmath.m4 b/m4/wm_libmath.m4
index 3ff2c46..8d056a2 100644
--- a/m4/wm_libmath.m4
+++ b/m4/wm_libmath.m4
@@ -22,7 +22,9 @@
 # Checks the needed library link flags needed to have math lib
 # Sets variable LIBM with the appropriates flags
 AC_DEFUN_ONCE([WM_CHECK_LIBM],
-[AC_CHECK_FUNC(atan,
+[AC_CHECK_HEADER([math.h], [],
+                 [AC_MSG_ERROR([header for math library not found])])
+AC_CHECK_FUNC(atan,
     [LIBM=],
     [AC_CHECK_LIB(m, [atan],
         [LIBM=-lm],

http://repo.or.cz/w/wmaker-crm.git/commit/f68ec6c91334bf97d43ee94a4568c8d4f2396939

commit f68ec6c91334bf97d43ee94a4568c8d4f2396939
Author: Christophe CURIS <[email protected]>
Date:   Sun Jun 16 21:50:56 2013 +0200

    Configure: Moved check for Math lib to a dedicated M4 macro
    
    Took the opportunity to rewrite the check using autoconf macros
    to generate a more compatible configure script.
    
    Signed-off-by: Christophe CURIS <[email protected]>

diff --git a/configure.ac b/configure.ac
index 1066113..75ceab0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -477,12 +477,7 @@ dnl
 dnl libWINGS uses math functions, check whether usage requires linking
 dnl against libm
 dnl
-AC_CHECK_FUNC(atan,[mathneedslibm=no;LIBM=],[mathneedslibm=dunno])
-if test "x$mathneedslibm" = "xdunno" ; then
-       AC_CHECK_LIB(m, atan, [LIBM=-lm])
-fi
-AC_SUBST(LIBM)
-
+WM_CHECK_LIBM
 
 dnl
 dnl libWINGS uses FcPatternDel from libfontconfig
diff --git a/m4/wm_libmath.m4 b/m4/wm_libmath.m4
new file mode 100644
index 0000000..3ff2c46
--- /dev/null
+++ b/m4/wm_libmath.m4
@@ -0,0 +1,32 @@
+# wm_libmath.m4 - Macros to check proper libMath usage for WINGs
+#
+# Copyright (c) 2013 Christophe Curis
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# WM_CHECK_LIBM
+# -------------
+#
+# Checks the needed library link flags needed to have math lib
+# Sets variable LIBM with the appropriates flags
+AC_DEFUN_ONCE([WM_CHECK_LIBM],
+[AC_CHECK_FUNC(atan,
+    [LIBM=],
+    [AC_CHECK_LIB(m, [atan],
+        [LIBM=-lm],
+        [AC_MSG_WARN(Could not find Math library, you may experience problems)
+         LIBM=] )] ) dnl
+AC_SUBST(LIBM) dnl
+])

-----------------------------------------------------------------------

Summary of changes:
 configure.ac     |    7 +------
 m4/wm_libmath.m4 |   34 ++++++++++++++++++++++++++++++++++
 src/misc.c       |    2 +-
 wrlib/rotate.c   |    4 +++-
 4 files changed, 39 insertions(+), 8 deletions(-)
 create mode 100644 m4/wm_libmath.m4


repo.or.cz automatic notification. Contact project admin [email protected]
if you want to unsubscribe, or site admin [email protected] if you receive
no reply.
-- 
wmaker-crm.git ("The Window Maker window manager")


-- 
To unsubscribe, send mail to [email protected].

Reply via email to