f4f9549c70
* Features: - option to auto-save documents and recover auto-saves (after Edward Yang, Aiwarrior, Timo Kluck) - new Export to PDF code using cairo (and config option to enable legacy code) - horizontal view mode - improved touchscreen handling - pencil cursor option (patch by Luciano Siqueira) - added "new pages duplicate background" option (new default is false) - updated Windows build and packaging instructions * XInput device handling: - ignore events from non-drawing devices by default (ignore_other_devices) - "touchscreen as hand tool" option (after Rumen Zarev and Daniel German) - "pen disables touchscreen" option; dialog box to designate touch device - tweaks to xinput event processing for touchscreens * Bugfixes: - generate cursors from pixbufs (fixes a Win32 bug) - work around Win32 bug: refuse paste if mismatched format - fix configure.in for automake-1.13 (Florian Bruhin, Andreas Huettel) - smoother icons for eraser and shapes buttons (by Colin Macdonald) - fix a cross-platform g_basename() issue (after Daniel German) - bugfix for file paths with non-English characters in Win32 - add some margin around lasso selection rectangle (after Niklas Beisert) - warn for fontconfig cache generation in Win32 * Translations: - Chinese (simplified) translation (by Mutse) - updated German translation (Stefan Holtzhauer) - Polish translation (by Mis Uszatek) - Chinese (traditional) translation (William Chao) - Japanese translation (by Hiroshi Saito)
56 lines
1.3 KiB
C
56 lines
1.3 KiB
C
$NetBSD: patch-src_xo-shapes.c,v 1.1 2016/01/04 02:06:48 markd Exp $
|
|
|
|
gcc 5.3 didn't like the "inline"s
|
|
|
|
--- src/xo-shapes.c.orig 2014-06-15 20:21:05.000000000 +0000
|
|
+++ src/xo-shapes.c
|
|
@@ -72,42 +73,42 @@ void calc_inertia(double *pt, int start,
|
|
|
|
/* compute normalized quantities */
|
|
|
|
-inline double center_x(struct Inertia s)
|
|
+double center_x(struct Inertia s)
|
|
{
|
|
return s.sx/s.mass;
|
|
}
|
|
|
|
-inline double center_y(struct Inertia s)
|
|
+double center_y(struct Inertia s)
|
|
{
|
|
return s.sy/s.mass;
|
|
}
|
|
|
|
-inline double I_xx(struct Inertia s)
|
|
+double I_xx(struct Inertia s)
|
|
{
|
|
if (s.mass <= 0.) return 0.;
|
|
return (s.sxx - s.sx*s.sx/s.mass)/s.mass;
|
|
}
|
|
|
|
-inline double I_xy(struct Inertia s)
|
|
+double I_xy(struct Inertia s)
|
|
{
|
|
if (s.mass <= 0.) return 0.;
|
|
return (s.sxy - s.sx*s.sy/s.mass)/s.mass;
|
|
}
|
|
|
|
-inline double I_yy(struct Inertia s)
|
|
+double I_yy(struct Inertia s)
|
|
{
|
|
if (s.mass <= 0.) return 0.;
|
|
return (s.syy - s.sy*s.sy/s.mass)/s.mass;
|
|
}
|
|
|
|
-inline double I_rad(struct Inertia s)
|
|
+double I_rad(struct Inertia s)
|
|
{
|
|
double ixx = I_xx(s), iyy = I_yy(s);
|
|
if (ixx+iyy <= 0.) return 0.;
|
|
return sqrt(ixx+iyy);
|
|
}
|
|
|
|
-inline double I_det(struct Inertia s)
|
|
+double I_det(struct Inertia s)
|
|
{
|
|
double ixx = I_xx(s), iyy = I_yy(s), ixy = I_xy(s);
|
|
if (s.mass <= 0.) return 0.;
|