summaryrefslogtreecommitdiff
path: root/mi/mifpoly.h
diff options
context:
space:
mode:
authorAdam Jackson <ajax@benzedrine.nwnk.net>2007-05-09 18:38:33 -0400
committerAdam Jackson <ajax@benzedrine.nwnk.net>2007-05-11 11:43:19 -0400
commit6ff239cb4e67c0a2ea497a1714e5585c1d941af3 (patch)
tree42f099889349272299a77619c7dafc6870310753 /mi/mifpoly.h
parent178d426311bb3c7160f72b5d95b0a137eda09ba9 (diff)
Make the use of ICEIL slightly less ugly.
Diffstat (limited to 'mi/mifpoly.h')
-rw-r--r--mi/mifpoly.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/mi/mifpoly.h b/mi/mifpoly.h
index 8f0507601..7bd77b356 100644
--- a/mi/mifpoly.h
+++ b/mi/mifpoly.h
@@ -48,6 +48,8 @@ SOFTWARE.
#ifndef __MIFPOLY_H__
#define __MIFPOLY_H__
+#include <X11/Xfuncproto.h>
+
#define EPSILON 0.000001
#define ISEQUAL(a,b) (Fabs((a) - (b)) <= EPSILON)
#define UNEQUAL(a,b) (Fabs((a) - (b)) > EPSILON)
@@ -66,20 +68,11 @@ SOFTWARE.
#define SQSECANT 108.856472512142 /* 1/sin^2(11/2) - for 11o miter cutoff */
#define D2SECANT 5.21671526231167 /* 1/2*sin(11/2) - max extension per width */
-#ifdef NOINLINEICEIL
-#define ICEIL(x) ((int)ceil(x))
-#else
-#ifdef __GNUC__
-static __inline int ICEIL(double x)
+static _X_INLINE int ICEIL(double x)
{
int _cTmp = x;
return ((x == _cTmp) || (x < 0.0)) ? _cTmp : _cTmp+1;
}
-#else
-#define ICEIL(x) ((((x) == (_cTmp = (x))) || ((x) < 0.0)) ? _cTmp : _cTmp+1)
-#define ICEILTEMPDECL static int _cTmp;
-#endif
-#endif
/* Point with sub-pixel positioning. In this case we use doubles, but
* see mifpolycon.c for other suggestions