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 945f4d238926c607c6917cc043f87099d23a3987 (commit)
via b64d9e6be0e23b32c4020304d019742745752627 (commit)
via 9ab220345679662118e107d9879e563dc1546578 (commit)
via d28edde23e957920db47f3f8a86d099ed912a1ae (commit)
via 79a95d717393d50fa4d1c22a97cc88f6264de335 (commit)
via 1df08cc492020c9e663f122fc3f293a2d20b1565 (commit)
from bae28b2fae3b6dac2b3c5448d567125a1b85525e (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/945f4d238926c607c6917cc043f87099d23a3987
commit 945f4d238926c607c6917cc043f87099d23a3987
Author: Alwin <[email protected]>
Date: Mon May 25 21:56:19 2015 +0200
WPrefs: creating more space for translations
Making some wasted pixels available in the Options section of Icon
Preferences, by redividing the heights and vertical offsets.
The reason is that one or more translations may easily become
larger, and will automatically be wrapped to a second line. In the
current situation, those two lines appear more or less stripped,
depending on the font size. The upper and/or lower part of the fonts
become invisible, which make them hard to read. It's ugly also.
Currently the Dutch and other translations benefit from this
change.
diff --git a/WPrefs.app/Icons.c b/WPrefs.app/Icons.c
index a58630a..4e7f237 100644
--- a/WPrefs.app/Icons.c
+++ b/WPrefs.app/Icons.c
@@ -411,22 +411,22 @@ static void createPanel(Panel * p)
/* WMSetFrameTitle(panel->optF, _("Icon Display")); */
panel->arrB = WMCreateSwitchButton(panel->optF);
- WMResizeWidget(panel->arrB, 198, 20);
- WMMoveWidget(panel->arrB, 12, 10);
+ WMResizeWidget(panel->arrB, 198, 26);
+ WMMoveWidget(panel->arrB, 12, 8);
WMSetButtonText(panel->arrB, _("Auto-arrange icons"));
WMSetBalloonTextForView(_("Keep icons and miniwindows arranged all the
time."), WMWidgetView(panel->arrB));
panel->omnB = WMCreateSwitchButton(panel->optF);
- WMResizeWidget(panel->omnB, 198, 20);
- WMMoveWidget(panel->omnB, 12, 35);
+ WMResizeWidget(panel->omnB, 198, 26);
+ WMMoveWidget(panel->omnB, 12, 34);
WMSetButtonText(panel->omnB, _("Omnipresent miniwindows"));
WMSetBalloonTextForView(_("Make miniwindows be present in all
workspaces."), WMWidgetView(panel->omnB));
panel->sclB = WMCreateSwitchButton(panel->optF);
- WMResizeWidget(panel->sclB, 198, 28);
- WMMoveWidget(panel->sclB, 12, 56);
+ WMResizeWidget(panel->sclB, 198, 26);
+ WMMoveWidget(panel->sclB, 12, 60);
WMSetButtonText(panel->sclB, _("Single click activation"));
WMSetBalloonTextForView(_("Launch applications and restore windows with
a single click."), WMWidgetView(panel->sclB));
http://repo.or.cz/w/wmaker-crm.git/commit/b64d9e6be0e23b32c4020304d019742745752627
commit b64d9e6be0e23b32c4020304d019742745752627
Author: Christophe CURIS <[email protected]>
Date: Sun May 24 15:49:09 2015 +0200
wrlib: changed Gamma Correction calculation to use single-precision float
The original code was using double precision floating point to perform the
color corrections for the creation of the standard colormap. This precision
is not necessary because color coding is 16 bits anyway, and on some
architecture the double precision comes with a cost.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/m4/wm_libmath.m4 b/m4/wm_libmath.m4
index 77ed8d7..5a8143c 100644
--- a/m4/wm_libmath.m4
+++ b/m4/wm_libmath.m4
@@ -70,6 +70,7 @@ AC_CACHE_CHECK([if sinf+cosf are defined in math.h],
[wm_cv_libm_sinf],
a = atan2f(a, b);
b = cosf(a);
a = sinf(b);
+ a = powf(a, b);
return (int)a;])],
[wm_cv_libm_sinf="`echo "$wm_arg" | sed -e 's,^.*% *,,' `" ; break])
done
diff --git a/wrlib/context.c b/wrlib/context.c
index d74bf53..ee0b993 100644
--- a/wrlib/context.c
+++ b/wrlib/context.c
@@ -38,6 +38,10 @@
#include "scale.h"
+#ifndef HAVE_FLOAT_MATHFUNC
+#define powf(x, y) ((float) pow((double)(x), (double)(y)))
+#endif
+
static Bool bestContext(Display * dpy, int screen_number, RContext * context);
static const RContextAttributes DEFAULT_CONTEXT_ATTRIBS = {
@@ -248,13 +252,13 @@ static Bool allocatePseudoColor(RContext *ctx)
if ((ctx->attribs->flags & RC_GammaCorrection) && ctx->attribs->rgamma
> 0
&& ctx->attribs->ggamma > 0 && ctx->attribs->bgamma > 0) {
- double rg, gg, bg;
- double tmp;
+ float rg, gg, bg;
+ float tmp;
/* do gamma correction */
- rg = 1.0 / ctx->attribs->rgamma;
- gg = 1.0 / ctx->attribs->ggamma;
- bg = 1.0 / ctx->attribs->bgamma;
+ rg = 1.0F / ctx->attribs->rgamma;
+ gg = 1.0F / ctx->attribs->ggamma;
+ bg = 1.0F / ctx->attribs->bgamma;
for (r = 0; r < cpc; r++) {
for (g = 0; g < cpc; g++) {
for (b = 0; b < cpc; b++) {
@@ -263,14 +267,14 @@ static Bool allocatePseudoColor(RContext *ctx)
colors[i].blue = (b * 0xffff) / (cpc -
1);
colors[i].flags = DoRed | DoGreen |
DoBlue;
- tmp = (double)colors[i].red / 65536.0;
- colors[i].red = (unsigned
short)(65536.0 * pow(tmp, rg));
+ tmp = (float) colors[i].red / 65536.0F;
+ colors[i].red = (unsigned
short)(65536.0F * powf(tmp, rg));
- tmp = (double)colors[i].green / 65536.0;
- colors[i].green = (unsigned
short)(65536.0 * pow(tmp, gg));
+ tmp = (float) colors[i].green /
65536.0F;
+ colors[i].green = (unsigned
short)(65536.0F * powf(tmp, gg));
- tmp = (double)colors[i].blue / 65536.0;
- colors[i].blue = (unsigned
short)(65536.0 * pow(tmp, bg));
+ tmp = (float) colors[i].blue / 65536.0F;
+ colors[i].blue = (unsigned
short)(65536.0F * powf(tmp, bg));
i++;
}
http://repo.or.cz/w/wmaker-crm.git/commit/9ab220345679662118e107d9879e563dc1546578
commit 9ab220345679662118e107d9879e563dc1546578
Author: Christophe CURIS <[email protected]>
Date: Sun May 24 15:49:08 2015 +0200
Use single-precision math functions when available
Since C99 we have floating point functions available for single precision,
so as it is what we need we detect them (configure) and use them when
appropriate. The goal is to avoid unnecessary float->double + double->float
conversion.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/m4/wm_libmath.m4 b/m4/wm_libmath.m4
index df2b54f..77ed8d7 100644
--- a/m4/wm_libmath.m4
+++ b/m4/wm_libmath.m4
@@ -50,5 +50,35 @@ AS_IF([test "x$wm_cv_libm_pi" = "xno"],
[Defines how to access the value of Pi])
AS_IF([test "x$wm_cv_libm_pi" != "xyes"],
[CFLAGS="$CFLAGS $wm_cv_libm_pi"]) ])
+AC_CACHE_CHECK([if sinf+cosf are defined in math.h], [wm_cv_libm_sinf],
+ [wm_cv_libm_sinf="no"
+ wm_save_CFLAGS="$CFLAGS"
+ wm_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBM"
+ for wm_arg in dnl
+ "% yes" dnl natively available (C99 compliant)
+ "-D_XOPEN_SOURCE=600" ; dnl Explicit request
+ do
+ CFLAGS="$wm_save_CFLAGS `echo "$wm_arg" | sed -e 's, *%.*$,,' `"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
+@%:@include <math.h>
+], [dnl
+ float a, b;
+
+ a = WM_PI;
+ b = sqrtf(a);
+ a = atan2f(a, b);
+ b = cosf(a);
+ a = sinf(b);
+ return (int)a;])],
+ [wm_cv_libm_sinf="`echo "$wm_arg" | sed -e 's,^.*% *,,' `" ; break])
+ done
+ LIBS="$wm_save_LIBS"
+ CFLAGS="$wm_save_CFLAGS"])
+AS_IF([test "x$wm_cv_libm_sinf" != "xno"],
+ [AC_DEFINE([HAVE_FLOAT_MATHFUNC], [1],
+ [Defined if the 'float'-typed math function are available (sinf,
cosf)])
+ AS_IF([test "x$wm_cv_libm_sinf" != "xyes"],
+ [CFLAGS="$CFLAGS $wm_cd_libm_sinf"]) ])
AC_SUBST(LIBM) dnl
])
diff --git a/src/actions.c b/src/actions.c
index 299bc78..5adfab4 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -52,6 +52,13 @@
#include "event.h"
+#ifndef HAVE_FLOAT_MATHFUNC
+#define sinf(x) ((float)sin((double)(x)))
+#define cosf(x) ((float)cos((double)(x)))
+#define sqrtf(x) ((float)sqrt((double)(x)))
+#define atan2f(y, x) ((float)atan((double)(y) / (double)(x)))
+#endif
+
static void find_Maximus_geometry(WWindow *wwin, WArea usableArea, int *new_x,
int *new_y,
unsigned int *new_width, unsigned int
*new_height);
static void save_old_geometry(WWindow *wwin, int directions);
@@ -792,8 +799,8 @@ static void animateResizeFlip(WScreen *scr, int x, int y,
int w, int h, int fx,
if (angle > final_angle)
angle = final_angle;
- dx = (cw / 10) - ((cw / 5) * sin(angle));
- dch = (ch / 2) * cos(angle);
+ dx = (cw / 10) - ((cw / 5) * sinf(angle));
+ dch = (ch / 2) * cosf(angle);
midy = cy + (ch / 2);
points[0].x = cx + dx;
@@ -857,19 +864,19 @@ animateResizeTwist(WScreen *scr, int x, int y, int w, int
h, int fx, int fy, int
if (angle > final_angle)
angle = final_angle;
- a = atan(ch / cw);
- d = sqrt((cw / 2) * (cw / 2) + (ch / 2) * (ch / 2));
-
- points[0].x = cx + cos(angle - a) * d;
- points[0].y = cy + sin(angle - a) * d;
- points[1].x = cx + cos(angle + a) * d;
- points[1].y = cy + sin(angle + a) * d;
- points[2].x = cx + cos(angle - a + WM_PI) * d;
- points[2].y = cy + sin(angle - a + WM_PI) * d;
- points[3].x = cx + cos(angle + a + WM_PI) * d;
- points[3].y = cy + sin(angle + a + WM_PI) * d;
- points[4].x = cx + cos(angle - a) * d;
- points[4].y = cy + sin(angle - a) * d;
+ a = atan2f(ch, cw);
+ d = sqrtf((cw / 2) * (cw / 2) + (ch / 2) * (ch / 2));
+
+ points[0].x = cx + cosf(angle - a) * d;
+ points[0].y = cy + sinf(angle - a) * d;
+ points[1].x = cx + cosf(angle + a) * d;
+ points[1].y = cy + sinf(angle + a) * d;
+ points[2].x = cx + cosf(angle - a + (float)WM_PI) * d;
+ points[2].y = cy + sinf(angle - a + (float)WM_PI) * d;
+ points[3].x = cx + cosf(angle + a + (float)WM_PI) * d;
+ points[3].y = cy + sinf(angle + a + (float)WM_PI) * d;
+ points[4].x = cx + cosf(angle - a) * d;
+ points[4].y = cy + sinf(angle - a) * d;
XGrabServer(dpy);
XDrawLines(dpy, scr->root_win, scr->frame_gc, points, 5,
CoordModeOrigin);
XFlush(dpy);
http://repo.or.cz/w/wmaker-crm.git/commit/d28edde23e957920db47f3f8a86d099ed912a1ae
commit d28edde23e957920db47f3f8a86d099ed912a1ae
Author: Christophe CURIS <[email protected]>
Date: Sun May 24 15:49:07 2015 +0200
Added some explicit conversion to double precision
When the result of the operation is expected to use double precision, this
patchs adds an explicit conversion to that type to tell the compiler that
this is what we want, and not an unexpected side effect.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/WINGs/userdefaults.c b/WINGs/userdefaults.c
index 92f4e0f..65ed099 100644
--- a/WINGs/userdefaults.c
+++ b/WINGs/userdefaults.c
@@ -591,7 +591,7 @@ void WMSetUDFloatForKey(WMUserDefaults * database, float
value, const char *defa
WMPropList *object;
char buffer[128];
- sprintf(buffer, "%f", value);
+ sprintf(buffer, "%f", (double)value);
object = WMCreatePLString(buffer);
WMSetUDObjectForKey(database, object, defaultName);
diff --git a/WINGs/wbrowser.c b/WINGs/wbrowser.c
index 0475611..d49ce1f 100644
--- a/WINGs/wbrowser.c
+++ b/WINGs/wbrowser.c
@@ -565,7 +565,7 @@ static void scrollCallback(WMWidget * scroller, void *self)
floatValue = (floatValue * value) / value;
- newFirst = rint(floatValue * (float)(bPtr->columnCount
- bPtr->maxVisibleColumns));
+ newFirst = rint(floatValue * (double)(bPtr->columnCount
- bPtr->maxVisibleColumns));
if (bPtr->firstVisibleColumn != newFirst)
scrollToColumn(bPtr, newFirst, False);
diff --git a/WPrefs.app/MouseSettings.c b/WPrefs.app/MouseSettings.c
index 7859f14..528f695 100644
--- a/WPrefs.app/MouseSettings.c
+++ b/WPrefs.app/MouseSettings.c
@@ -301,7 +301,7 @@ static void showData(_Panel * panel)
WMSetSliderValue(panel->speedS, (accel - 0.25F) / 0.25F);
panel->acceleration = accel;
- sprintf(buffer, "%.2f", accel);
+ sprintf(buffer, "%.2f", (double)accel);
WMSetTextFieldText(panel->acceT, buffer);
/**/ b = GetIntegerForKey("DoubleClickTime");
http://repo.or.cz/w/wmaker-crm.git/commit/79a95d717393d50fa4d1c22a97cc88f6264de335
commit 79a95d717393d50fa4d1c22a97cc88f6264de335
Author: Christophe CURIS <[email protected]>
Date: Sun May 24 15:49:06 2015 +0200
Fixed floating point constants defined as double but expected as float
To preserve the accuracy of the operation, the C standard request that the
mathematical operation is performed using double precision, but in many
case this is not necessary so this patch fixes a few constants to avoid
that conversion.
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/WINGs/wcolorwell.c b/WINGs/wcolorwell.c
index a5d1a1d..c67c7d0 100644
--- a/WINGs/wcolorwell.c
+++ b/WINGs/wcolorwell.c
@@ -211,7 +211,7 @@ static void willResizeColorWell(W_ViewDelegate * self,
WMView * view, unsigned i
if (*height < MIN_HEIGHT)
*height = MIN_HEIGHT;
- bw = (int)((float)WMIN(*width, *height) * 0.24);
+ bw = (int)((float)WMIN(*width, *height) * 0.24F);
W_ResizeView(cPtr->colorView, *width - 2 * bw, *height - 2 *
bw);
diff --git a/WINGs/wscroller.c b/WINGs/wscroller.c
index f1daa3a..4a8f027 100644
--- a/WINGs/wscroller.c
+++ b/WINGs/wscroller.c
@@ -168,10 +168,10 @@ void WMSetScrollerParameters(WMScroller * sPtr, float
floatValue, float knobProp
assert(!isnan(floatValue));
- if (floatValue < 0.0)
- sPtr->floatValue = 0.0;
- else if (floatValue > 1.0)
- sPtr->floatValue = 1.0;
+ if (floatValue < 0.0F)
+ sPtr->floatValue = 0.0F;
+ else if (floatValue > 1.0F)
+ sPtr->floatValue = 1.0F;
else
sPtr->floatValue = floatValue;
@@ -180,9 +180,9 @@ void WMSetScrollerParameters(WMScroller * sPtr, float
floatValue, float knobProp
sPtr->knobProportion = min_knob_proportion;
sPtr->flags.documentFullyVisible = 0;
- } else if (knobProportion >= 1.0) {
+ } else if (knobProportion >= 1.0F) {
- sPtr->knobProportion = 1.0;
+ sPtr->knobProportion = 1.0F;
sPtr->flags.documentFullyVisible = 1;
} else {
@@ -344,7 +344,7 @@ static int knobLength(Scroller * sPtr)
length -= 2 * (BUTTON_SIZE + 1);
}
- tmp = (int)((float)length * sPtr->knobProportion + 0.5);
+ tmp = (int)((float)length * sPtr->knobProportion + 0.5F);
/* keep minimum size */
if (tmp < BUTTON_SIZE)
tmp = BUTTON_SIZE;
@@ -418,7 +418,7 @@ static void paintScroller(Scroller * sPtr)
length - (int)(knobP + knobL),
view->size.height - 4);
} else {
/* before */
- if (knobP > 0.0)
+ if (knobP > 0.0F)
XFillRectangle(scr->display, d, scr->stippleGC,
2, ofs, view->size.width - 4,
(int)knobP);
diff --git a/WINGs/wscrollview.c b/WINGs/wscrollview.c
index a21864e..a1b030e 100644
--- a/WINGs/wscrollview.c
+++ b/WINGs/wscrollview.c
@@ -506,7 +506,7 @@ static void updateScrollerProportion(ScrollView * sPtr)
prop = (float)sPtr->viewport->size.width /
(float)sPtr->contentView->size.width;
- if (oldP < 1.0)
+ if (oldP < 1.0F)
value = (prop * oldV) / oldP;
else
value = 0;
@@ -518,7 +518,7 @@ static void updateScrollerProportion(ScrollView * sPtr)
prop = (float)sPtr->viewport->size.height /
(float)sPtr->contentView->size.height;
- if (oldP < 1.0)
+ if (oldP < 1.0F)
value = (prop * oldV) / oldP;
else
value = 0;
diff --git a/WPrefs.app/MouseSettings.c b/WPrefs.app/MouseSettings.c
index 6df9300..7859f14 100644
--- a/WPrefs.app/MouseSettings.c
+++ b/WPrefs.app/MouseSettings.c
@@ -298,7 +298,7 @@ static void showData(_Panel * panel)
sprintf(buffer, "%i", a);
WMSetTextFieldText(panel->threT, buffer);
- WMSetSliderValue(panel->speedS, (accel - 0.25) / 0.25);
+ WMSetSliderValue(panel->speedS, (accel - 0.25F) / 0.25F);
panel->acceleration = accel;
sprintf(buffer, "%.2f", accel);
diff --git a/src/misc.c b/src/misc.c
index 99341d3..02aa401 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -201,14 +201,14 @@ void slide_windows(Window wins[], int n, int from_x, int
from_y, int to_x, int t
px = slide_steps;
else if (px > -slide_steps && px < 0)
px = -slide_steps;
- py = (is_dx_nul ? 0.0 : px * dy / dx);
+ py = (is_dx_nul ? 0.0F : px * dy / dx);
} else {
py = dy / slide_slowdown;
if (py < slide_steps && py > 0)
py = slide_steps;
else if (py > -slide_steps && py < 0)
py = -slide_steps;
- px = (is_dy_nul ? 0.0 : py * dx / dy);
+ px = (is_dy_nul ? 0.0F : py * dx / dy);
}
while (((int)x) != to_x ||
@@ -221,19 +221,19 @@ void slide_windows(Window wins[], int n, int from_x, int
from_y, int to_x, int t
y = (float)to_y;
if (dx_is_bigger) {
- px = px * (1.0 - 1 / (float)slide_slowdown);
+ px = px * (1.0F - 1 / (float)slide_slowdown);
if (px < slide_steps && px > 0)
px = slide_steps;
else if (px > -slide_steps && px < 0)
px = -slide_steps;
- py = (is_dx_nul ? 0.0 : px * dy / dx);
+ py = (is_dx_nul ? 0.0F : px * dy / dx);
} else {
- py = py * (1.0 - 1 / (float)slide_slowdown);
+ py = py * (1.0F - 1 / (float)slide_slowdown);
if (py < slide_steps && py > 0)
py = slide_steps;
else if (py > -slide_steps && py < 0)
py = -slide_steps;
- px = (is_dy_nul ? 0.0 : py * dx / dy);
+ px = (is_dy_nul ? 0.0F : py * dx / dy);
}
for (i = 0; i < n; i++) {
diff --git a/wrlib/alpha_combine.c b/wrlib/alpha_combine.c
index b410186..7f08a50 100644
--- a/wrlib/alpha_combine.c
+++ b/wrlib/alpha_combine.c
@@ -47,7 +47,7 @@ void RCombineAlpha(unsigned char *d, unsigned char *s, int
s_has_alpha,
cratio = 0;
} else {
ratio = (float)sa / alpha;
- cratio = 1.0 - ratio;
+ cratio = 1.0F - ratio;
}
*d = (int)*d * cratio + (int)*s * ratio;
diff --git a/wrlib/context.c b/wrlib/context.c
index 4c40c88..d74bf53 100644
--- a/wrlib/context.c
+++ b/wrlib/context.c
@@ -438,7 +438,7 @@ static void gatherconfig(RContext * context, int screen_n)
ptr = mygetenv("WRASTER_GAMMA", screen_n);
if (ptr) {
float g1, g2, g3;
- if (sscanf(ptr, "%f/%f/%f", &g1, &g2, &g3) != 3 || g1 <= 0.0 ||
g2 <= 0.0 || g3 <= 0.0) {
+ if (sscanf(ptr, "%f/%f/%f", &g1, &g2, &g3) != 3 || g1 <= 0.0F
|| g2 <= 0.0F || g3 <= 0.0F) {
printf("wrlib: invalid value(s) for gamma correction
\"%s\"\n", ptr);
} else {
context->attribs->flags |= RC_GammaCorrection;
diff --git a/wrlib/rotate.c b/wrlib/rotate.c
index 482b317..9ffaa30 100644
--- a/wrlib/rotate.c
+++ b/wrlib/rotate.c
@@ -48,26 +48,26 @@ RImage *RRotateImage(RImage *image, float angle)
* candidate for an Epsilon when trying to compare angle
* to known values
*/
- static const float min_usable_angle = 0.00699;
+ static const float min_usable_angle = 0.00699F;
angle = fmod(angle, 360.0);
- if (angle < 0.0)
- angle += 360.0;
+ if (angle < 0.0F)
+ angle += 360.0F;
if (angle < min_usable_angle) {
/* Rotate by 0 degree */
return RCloneImage(image);
- } else if ((angle > 90.0 - min_usable_angle) &&
- (angle < 90.0 + min_usable_angle)) {
+ } else if ((angle > 90.0F - min_usable_angle) &&
+ (angle < 90.0F + min_usable_angle)) {
return rotate_image_90(image);
- } else if ((angle > 180.0 - min_usable_angle) &&
- (angle < 180.0 + min_usable_angle)) {
+ } else if ((angle > 180.0F - min_usable_angle) &&
+ (angle < 180.0F + min_usable_angle)) {
return wraster_rotate_image_180(image);
- } else if ((angle > 270.0 - min_usable_angle) &&
- (angle < 270.0 + min_usable_angle)) {
+ } else if ((angle > 270.0F - min_usable_angle) &&
+ (angle < 270.0F + min_usable_angle)) {
return rotate_image_270(image);
} else {
@@ -341,8 +341,8 @@ static RImage *rotate_image_any(RImage *source, float angle)
int dpr, dpru, p;
/* only 180o for now */
- if (angle > 180.0)
- angle -= 180.0;
+ if (angle > 180.0F)
+ angle -= 180.0F;
angle = (angle * WM_PI) / 180.0;
http://repo.or.cz/w/wmaker-crm.git/commit/1df08cc492020c9e663f122fc3f293a2d20b1565
commit 1df08cc492020c9e663f122fc3f293a2d20b1565
Author: Christophe CURIS <[email protected]>
Date: Sun May 24 15:49:05 2015 +0200
configure: Add compiler detection on non optimal floating point constant
Signed-off-by: Christophe CURIS <[email protected]>
diff --git a/configure.ac b/configure.ac
index 40f76fb..c5d3167 100644
--- a/configure.ac
+++ b/configure.ac
@@ -153,6 +153,11 @@ AS_IF([test "x$debug" = "xyes"],
dnl too complicated to maintain
AX_CFLAGS_GCC_OPTION([-Wdisabled-optimization])
dnl
+ dnl Because of C's type promotion, the compiler has to generate
+ dnl less optimal code when a double constant is used in a
+ dnl float expression
+ AX_CFLAGS_GCC_OPTION([-Wdouble-promotion])
+ dnl
dnl Floating-point comparison is not a good idea
AX_CFLAGS_GCC_OPTION([-Wfloat-equal])
dnl
-----------------------------------------------------------------------
Summary of changes:
WINGs/userdefaults.c | 2 +-
WINGs/wbrowser.c | 2 +-
WINGs/wcolorwell.c | 2 +-
WINGs/wscroller.c | 16 ++++++++--------
WINGs/wscrollview.c | 4 ++--
WPrefs.app/Icons.c | 12 ++++++------
WPrefs.app/MouseSettings.c | 4 ++--
configure.ac | 5 +++++
m4/wm_libmath.m4 | 31 +++++++++++++++++++++++++++++++
src/actions.c | 37 ++++++++++++++++++++++---------------
src/misc.c | 12 ++++++------
wrlib/alpha_combine.c | 2 +-
wrlib/context.c | 28 ++++++++++++++++------------
wrlib/rotate.c | 22 +++++++++++-----------
14 files changed, 113 insertions(+), 66 deletions(-)
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].